123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866 |
- import {
- A,
- Z,
- a,
- o,
- r as r2,
- t,
- te,
- x
- } from "./chunk-MWIFVNKP.js";
- import {
- e as e2,
- i,
- n
- } from "./chunk-YLVXZ2PS.js";
- import {
- dt
- } from "./chunk-WFSV2B2I.js";
- import {
- B,
- C,
- q,
- v
- } from "./chunk-Q34L5KZA.js";
- import {
- C as C2,
- M,
- e as e3,
- i as i2,
- n as n2,
- o as o2,
- p
- } from "./chunk-TRK7CKWP.js";
- import {
- l
- } from "./chunk-7XXXCK2A.js";
- import {
- i as i3,
- o as o3
- } from "./chunk-LRDX4TO7.js";
- import {
- e,
- u
- } from "./chunk-WEMIK25H.js";
- import {
- c as c2,
- s as s3,
- y
- } from "./chunk-2Z6LERTI.js";
- import {
- s,
- s3 as s2
- } from "./chunk-EMJ4ZSM2.js";
- import {
- c,
- m
- } from "./chunk-IKP3YN53.js";
- import {
- r
- } from "./chunk-GZT4BVFP.js";
- // node_modules/@arcgis/core/views/2d/arcade/callExpressionWithFeature.js
- function s4(e6, t3, o5, n5, a3) {
- const s6 = e6.referencesGeometry() && a3 ? u2(t3, n5, a3) : t3, i6 = e6.repurposeFeature(s6);
- try {
- return e6.evaluate({ ...o5, $feature: i6 });
- } catch (c7) {
- return s.getLogger("esri.views.2d.support.arcadeOnDemand").warn("Feature arcade evaluation failed:", c7), null;
- }
- }
- var i4 = new Map();
- function u2(e6, r5, t3) {
- const { transform: o5, hasZ: n5, hasM: a3 } = t3;
- i4.has(r5) || i4.set(r5, c3(r5));
- const s6 = i4.get(r5)(e6.geometry, o5, n5, a3);
- return { ...e6, geometry: s6 };
- }
- function c3(s6) {
- const i6 = {};
- switch (s6) {
- case "esriGeometryPoint":
- return (e6, r5, t3, o5) => v(r5, i6, e6, t3, o5);
- case "esriGeometryPolygon":
- return (e6, r5, t3, o5) => B(r5, i6, e6, t3, o5);
- case "esriGeometryPolyline":
- return (e6, r5, t3, n5) => C(r5, i6, e6, t3, n5);
- case "esriGeometryMultipoint":
- return (e6, r5, o5, n5) => q(r5, i6, e6, o5, n5);
- default:
- return s.getLogger("esri.views.2d.support.arcadeOnDemand").error(new s2("mapview-arcade", `Unable to handle geometryType: ${s6}`)), (e6) => e6;
- }
- }
- // node_modules/@arcgis/core/symbols/cim/SDFHelper.js
- function r3(t3) {
- if (!t3)
- return null;
- switch (t3.type) {
- case "CIMPointSymbol": {
- const n5 = t3.symbolLayers;
- return n5 && n5.length === 1 ? r3(n5[0]) : null;
- }
- case "CIMVectorMarker": {
- const n5 = t3.markerGraphics;
- if (!n5 || n5.length !== 1)
- return null;
- const o5 = n5[0];
- if (!o5)
- return null;
- const r5 = o5.geometry;
- if (!r5)
- return null;
- const l2 = o5.symbol;
- return !l2 || l2.type !== "CIMPolygonSymbol" && l2.type !== "CIMLineSymbol" || l2.symbolLayers?.some((t4) => !!t4.effects) ? null : { geom: r5, asFill: l2.type === "CIMPolygonSymbol" };
- }
- case "sdf":
- return { geom: t3.geom, asFill: t3.asFill };
- }
- return null;
- }
- function e4(t3) {
- return t3 ? t3.rings ? t3.rings : t3.paths ? t3.paths : t3.xmin !== void 0 && t3.ymin !== void 0 && t3.xmax !== void 0 && t3.ymax !== void 0 ? [[[t3.xmin, t3.ymin], [t3.xmin, t3.ymax], [t3.xmax, t3.ymax], [t3.xmax, t3.ymin], [t3.xmin, t3.ymin]]] : null : null;
- }
- function s5(t3) {
- let n5 = 1 / 0, r5 = -1 / 0, l2 = 1 / 0, e6 = -1 / 0;
- for (const o5 of t3)
- for (const t4 of o5)
- t4[0] < n5 && (n5 = t4[0]), t4[0] > r5 && (r5 = t4[0]), t4[1] < l2 && (l2 = t4[1]), t4[1] > e6 && (e6 = t4[1]);
- return new t(n5, l2, r5 - n5, e6 - l2);
- }
- function i5(t3) {
- let n5 = 1 / 0, o5 = -1 / 0, r5 = 1 / 0, l2 = -1 / 0;
- for (const e6 of t3)
- for (const t4 of e6)
- t4[0] < n5 && (n5 = t4[0]), t4[0] > o5 && (o5 = t4[0]), t4[1] < r5 && (r5 = t4[1]), t4[1] > l2 && (l2 = t4[1]);
- return [n5, r5, o5, l2];
- }
- function f(t3) {
- return t3 ? t3.rings ? i5(t3.rings) : t3.paths ? i5(t3.paths) : s3(t3) ? [t3.xmin, t3.ymin, t3.xmax, t3.ymax] : null : null;
- }
- function m2(t3, n5, o5, r5, l2) {
- const [e6, s6, i6, f3] = t3;
- if (i6 < e6 || f3 < s6)
- return [0, 0, 0];
- const m3 = i6 - e6, a3 = f3 - s6, u5 = 128, c7 = 1, y3 = Math.floor(0.5 * (0.5 * u5 - c7)), h = (u5 - 2 * (y3 + c7)) / Math.max(m3, a3), x3 = Math.round(m3 * h) + 2 * y3, M2 = Math.round(a3 * h) + 2 * y3;
- let g = 1;
- if (n5) {
- g = M2 / h / (n5.ymax - n5.ymin);
- }
- let p2 = 0, d = 0;
- if (r5)
- if (l2) {
- if (n5 && o5 && n5.ymax - n5.ymin > 0) {
- const t4 = (n5.xmax - n5.xmin) / (n5.ymax - n5.ymin);
- p2 = r5.x / (o5 * t4), d = r5.y / o5;
- }
- } else
- p2 = r5.x, d = r5.y;
- p2 = 0.5 * (n5.xmax + n5.xmin) + p2 * (n5.xmax - n5.xmin), d = 0.5 * (n5.ymax + n5.ymin) + d * (n5.ymax - n5.ymin), p2 -= e6, d -= s6, p2 *= h, d *= h, p2 += y3, d += y3;
- return [g, p2 / x3 - 0.5, -(d / M2 - 0.5)];
- }
- function a2(t3) {
- const n5 = e4(t3.geom), o5 = s5(n5), r5 = 128, l2 = 1, i6 = Math.floor(0.5 * (0.5 * r5 - l2)), f3 = (r5 - 2 * (i6 + l2)) / Math.max(o5.width, o5.height), m3 = Math.round(o5.width * f3) + 2 * i6, a3 = Math.round(o5.height * f3) + 2 * i6, h = [];
- for (const e6 of n5)
- if (e6 && e6.length > 1) {
- const n6 = [];
- for (const r6 of e6) {
- let [l3, e7] = r6;
- l3 -= o5.x, e7 -= o5.y, l3 *= f3, e7 *= f3, l3 += i6 - 0.5, e7 += i6 - 0.5, t3.asFill ? n6.push([l3, e7]) : n6.push([Math.round(l3), Math.round(e7)]);
- }
- if (t3.asFill) {
- const t4 = n6.length - 1;
- n6[0][0] === n6[t4][0] && n6[0][1] === n6[t4][1] || n6.push(n6[0]);
- }
- h.push(n6);
- }
- const x3 = u3(h, m3, a3, i6);
- return t3.asFill && c4(h, m3, a3, i6, x3), [y2(x3, i6), m3, a3];
- }
- function u3(t3, n5, o5, r5) {
- const l2 = n5 * o5, e6 = new Array(l2), s6 = r5 * r5 + 1;
- for (let i6 = 0; i6 < l2; ++i6)
- e6[i6] = s6;
- for (const i6 of t3) {
- const t4 = i6.length;
- for (let l3 = 1; l3 < t4; ++l3) {
- const t5 = i6[l3 - 1], s7 = i6[l3];
- let f3, m3, a3, u5;
- t5[0] < s7[0] ? (f3 = t5[0], m3 = s7[0]) : (f3 = s7[0], m3 = t5[0]), t5[1] < s7[1] ? (a3 = t5[1], u5 = s7[1]) : (a3 = s7[1], u5 = t5[1]);
- let c7 = Math.floor(f3) - r5, y3 = Math.floor(m3) + r5, h = Math.floor(a3) - r5, x3 = Math.floor(u5) + r5;
- c7 < 0 && (c7 = 0), y3 > n5 && (y3 = n5), h < 0 && (h = 0), x3 > o5 && (x3 = o5);
- const M2 = s7[0] - t5[0], g = s7[1] - t5[1], p2 = M2 * M2 + g * g;
- for (let r6 = c7; r6 < y3; r6++)
- for (let l4 = h; l4 < x3; l4++) {
- let i7, f4, m4 = (r6 - t5[0]) * M2 + (l4 - t5[1]) * g;
- m4 < 0 ? (i7 = t5[0], f4 = t5[1]) : m4 > p2 ? (i7 = s7[0], f4 = s7[1]) : (m4 /= p2, i7 = t5[0] + m4 * M2, f4 = t5[1] + m4 * g);
- const a4 = (r6 - i7) * (r6 - i7) + (l4 - f4) * (l4 - f4), u6 = (o5 - l4 - 1) * n5 + r6;
- a4 < e6[u6] && (e6[u6] = a4);
- }
- }
- }
- for (let i6 = 0; i6 < l2; ++i6)
- e6[i6] = Math.sqrt(e6[i6]);
- return e6;
- }
- function c4(t3, n5, o5, r5, l2) {
- for (const e6 of t3) {
- const t4 = e6.length;
- for (let s6 = 1; s6 < t4; ++s6) {
- const t5 = e6[s6 - 1], i6 = e6[s6];
- let f3, m3, a3, u5;
- t5[0] < i6[0] ? (f3 = t5[0], m3 = i6[0]) : (f3 = i6[0], m3 = t5[0]), t5[1] < i6[1] ? (a3 = t5[1], u5 = i6[1]) : (a3 = i6[1], u5 = t5[1]);
- let c7 = Math.floor(f3), y3 = Math.floor(m3) + 1, h = Math.floor(a3), x3 = Math.floor(u5) + 1;
- c7 < r5 && (c7 = r5), y3 > n5 - r5 && (y3 = n5 - r5), h < r5 && (h = r5), x3 > o5 - r5 && (x3 = o5 - r5);
- for (let e7 = h; e7 < x3; ++e7) {
- if (t5[1] > e7 == i6[1] > e7)
- continue;
- const s7 = (o5 - e7 - 1) * n5;
- for (let n6 = c7; n6 < y3; ++n6)
- n6 < (i6[0] - t5[0]) * (e7 - t5[1]) / (i6[1] - t5[1]) + t5[0] && (l2[s7 + n6] = -l2[s7 + n6]);
- for (let t6 = r5; t6 < c7; ++t6)
- l2[s7 + t6] = -l2[s7 + t6];
- }
- }
- }
- }
- function y2(n5, o5) {
- const r5 = 2 * o5, l2 = n5.length, e6 = new Uint8Array(4 * l2);
- for (let s6 = 0; s6 < l2; ++s6) {
- const o6 = 0.5 - n5[s6] / r5;
- o(o6, e6, 4 * s6);
- }
- return e6;
- }
- // node_modules/@arcgis/core/symbols/cim/effects/CIMEffectHelper.js
- var c5 = 96 / 72;
- var f2 = class {
- static executeEffects(t3, s6, r5) {
- const f3 = a(s6), p2 = c5;
- let u5 = new r2(f3);
- for (const e6 of t3) {
- const t4 = A(e6);
- t4 && (u5 = t4.execute(u5, e6, p2, r5));
- }
- return u5;
- }
- static next(t3) {
- const s6 = t3.next();
- return x(s6), s6;
- }
- static applyEffects(e6, r5, c7) {
- if (!e6)
- return r5;
- let f3 = new r2(r5);
- for (const t3 of e6) {
- const s6 = A(t3);
- s6 && (f3 = s6.execute(f3, t3, 1, c7));
- }
- let p2, u5 = null;
- for (; p2 = f3.next(); )
- u5 ? y(u5) ? y(p2) && u5.paths.push(...p2.paths) : c2(u5) && c2(p2) && u5.rings.push(...p2.rings) : u5 = p2;
- return u5;
- }
- };
- // node_modules/@arcgis/core/views/2d/engine/webgl/fontUtils.js
- function t2(e6) {
- const r5 = e6.toLowerCase().split(" ").join("-");
- switch (r5) {
- case "serif":
- return "noto-serif";
- case "sans-serif":
- return "arial-unicode-ms";
- case "monospace":
- return "ubuntu-mono";
- case "fantasy":
- return "cabin-sketch";
- case "cursive":
- return "redressed";
- default:
- return r5;
- }
- }
- function n3(e6) {
- const r5 = u4(e6) + c6(e6);
- return t2(e6.family) + (r5.length > 0 ? r5 : "-regular");
- }
- function u4(e6) {
- if (!e6.weight)
- return "";
- switch (e6.weight.toLowerCase()) {
- case "bold":
- case "bolder":
- return "-bold";
- }
- return "";
- }
- function c6(e6) {
- if (!e6.style)
- return "";
- switch (e6.style.toLowerCase()) {
- case "italic":
- case "oblique":
- return "-italic";
- }
- return "";
- }
- // node_modules/@arcgis/core/views/2d/engine/webgl/grouping.js
- function e5(e6, o5) {
- let r5;
- if (typeof e6 == "string")
- r5 = c(e6 + `-seed(${o5})`);
- else {
- let t3 = 12;
- r5 = e6 ^ o5;
- do {
- r5 = 107 * (r5 >> 8 ^ r5) + t3 | 0;
- } while (--t3 != 0);
- }
- return (1 + r5 / (1 << 31)) / 2;
- }
- function o4(t3) {
- return Math.floor(e5(t3, r4) * n4);
- }
- var r4 = 53290320;
- var n4 = 10;
- // node_modules/@arcgis/core/symbols/cim/cimAnalyzer.js
- var w = s.getLogger("esri.symbols.cim.cimAnalyzer");
- function L(e6) {
- switch (e6) {
- case "Butt":
- return e2.BUTT;
- case "Square":
- return e2.SQUARE;
- default:
- return e2.ROUND;
- }
- }
- function X(e6) {
- switch (e6) {
- case "Bevel":
- return n.BEVEL;
- case "Miter":
- return n.MITER;
- default:
- return n.ROUND;
- }
- }
- function z(e6) {
- switch (e6) {
- case "Left":
- default:
- return "left";
- case "Right":
- return "right";
- case "Center":
- return "center";
- case "Justify":
- return w.warnOnce("Horizontal alignment 'justify' is not implemented. Falling back to 'center'."), "center";
- }
- }
- function A2(e6) {
- switch (e6) {
- case "Top":
- default:
- return "top";
- case "Center":
- return "middle";
- case "Baseline":
- return "baseline";
- case "Bottom":
- return "bottom";
- }
- }
- function R(e6) {
- let t3 = "", i6 = "";
- if (e6) {
- const o5 = e6.toLowerCase();
- o5.includes("italic") ? t3 = "italic" : o5.includes("oblique") && (t3 = "oblique"), o5.includes("bold") ? i6 = "bold" : o5.includes("light") && (i6 = "lighter");
- }
- return { style: t3, weight: i6 };
- }
- function J(e6) {
- return e6.underline ? "underline" : e6.strikethrough ? "line-through" : "none";
- }
- function x2(e6, t3, i6, o5) {
- let r5;
- e6[t3] ? r5 = e6[t3] : (r5 = {}, e6[t3] = r5), r5[i6] = o5;
- }
- function H(e6) {
- const t3 = e6.markerPlacement;
- return t3 && t3.angleToLine ? i.MAP : i.SCREEN;
- }
- async function Y(e6, t3, i6, o5, r5) {
- const n5 = o5 ?? [];
- if (!e6)
- return n5;
- let l2, s6;
- const c7 = {};
- if (e6.type !== "CIMSymbolReference")
- return w.error("Expect cim type to be 'CIMSymbolReference'"), n5;
- if (l2 = e6.symbol, s6 = e6.primitiveOverrides, s6) {
- const e7 = [];
- for (const i7 of s6) {
- const o6 = i7.valueExpressionInfo;
- if (o6 && t3) {
- const r6 = o6.expression, n6 = i3(r6, t3.spatialReference, t3.fields).then((e8) => {
- e8 && x2(c7, i7.primitiveName, i7.propertyName, e8);
- });
- e7.push(n6);
- } else
- i7.value != null && x2(c7, i7.primitiveName, i7.propertyName, i7.value);
- }
- e7.length > 0 && await Promise.all(e7);
- }
- const f3 = [];
- switch (fe(l2, i6, f3), f3.length > 0 && await Promise.all(f3), l2.type) {
- case "CIMPointSymbol":
- case "CIMLineSymbol":
- case "CIMPolygonSymbol":
- $(l2, s6, c7, t3, n5, i6, r5);
- }
- return n5;
- }
- function $(e6, t3, i6, o5, r5, n5, l2) {
- if (!e6)
- return;
- const a3 = e6.symbolLayers;
- if (!a3)
- return;
- const s6 = e6.effects;
- let p2;
- const u5 = Z.getSize(e6);
- e6.type === "CIMPointSymbol" && e6.angleAlignment === "Map" && (p2 = i.MAP);
- let y3 = a3.length;
- for (; y3--; ) {
- const c7 = a3[y3];
- if (!c7 || c7.enable === false)
- continue;
- let m3;
- s6 && s6.length && (m3 = [...s6]);
- const h = c7.effects;
- h && h.length && (s6 ? m3.push(...h) : m3 = [...h]);
- const g = [];
- let d;
- te.findEffectOverrides(m3, t3, g), d = g.length > 0 ? re(m3, g, i6, o5) : m3;
- const S = [];
- switch (te.findApplicableOverrides(c7, t3, S), c7.type) {
- case "CIMSolidFill":
- E(c7, d, i6, S, o5, r5);
- break;
- case "CIMPictureFill":
- T(c7, d, i6, S, o5, n5, r5);
- break;
- case "CIMHatchFill":
- j(c7, d, i6, S, o5, r5);
- break;
- case "CIMGradientFill":
- F(c7, d, i6, S, o5, r5);
- break;
- case "CIMSolidStroke":
- W(c7, d, i6, S, o5, r5, e6.type === "CIMPolygonSymbol", u5);
- break;
- case "CIMPictureStroke":
- D(c7, d, i6, S, o5, r5, e6.type === "CIMPolygonSymbol", u5);
- break;
- case "CIMGradientStroke":
- U(c7, d, i6, S, o5, r5, e6.type === "CIMPolygonSymbol", u5);
- break;
- case "CIMCharacterMarker":
- if (G(c7, d, i6, S, o5, r5))
- break;
- break;
- case "CIMPictureMarker":
- if (G(c7, d, i6, S, o5, r5))
- break;
- e6.type === "CIMLineSymbol" && (p2 = H(c7)), B2(c7, d, i6, S, o5, n5, r5, p2, u5);
- break;
- case "CIMVectorMarker":
- if (G(c7, d, i6, S, o5, r5))
- break;
- e6.type === "CIMLineSymbol" && (p2 = H(c7)), q2(c7, d, i6, S, o5, r5, n5, p2, u5, l2);
- break;
- default:
- w.error("Cannot analyze CIM layer", c7.type);
- }
- }
- }
- function E(e6, t3, i6, o5, r5, n5) {
- const a3 = e6.primitiveName, s6 = i2(e6.color), [c7, f3] = ce(o5, a3, t3, null, null), m3 = c(JSON.stringify(e6) + f3).toString();
- n5.push({ type: "fill", templateHash: m3, materialHash: c7 ? () => m3 : m3, cim: e6, materialOverrides: null, colorLocked: e6.colorLocked, color: ie(a3, i6, "Color", r5, s6, te2), height: 0, angle: 0, offsetX: 0, offsetY: 0, scaleX: 1, effects: t3, applyRandomOffset: false, sampleAlphaOnly: true });
- }
- function T(e6, t3, i6, r5, n5, a3, s6) {
- const c7 = e6.primitiveName, f3 = e6.tintColor ? i2(e6.tintColor) : { r: 255, g: 255, b: 255, a: 1 }, [m3, p2] = ce(r5, c7, t3, null, null), u5 = c(JSON.stringify(e6) + p2).toString(), y3 = c(`${e6.url}${JSON.stringify(e6.colorSubstitutions)}`).toString();
- let h = M(e6.scaleX);
- if ("width" in e6) {
- const t4 = e6.width;
- let i7 = 1;
- const r6 = a3.getResource(e6.url);
- r(r6) && (i7 = r6.width / r6.height), h /= i7 * (e6.height / t4);
- }
- s6.push({ type: "fill", templateHash: u5, materialHash: m3 ? () => y3 : y3, cim: e6, materialOverrides: null, colorLocked: e6.colorLocked, effects: t3, color: ie(c7, i6, "TintColor", n5, f3, te2), height: ie(c7, i6, "Height", n5, e6.height), scaleX: ie(c7, i6, "ScaleX", n5, h), angle: ie(c7, i6, "Rotation", n5, M(e6.rotation)), offsetX: ie(c7, i6, "OffsetX", n5, M(e6.offsetX)), offsetY: ie(c7, i6, "OffsetY", n5, M(e6.offsetY)), url: e6.url, applyRandomOffset: false, sampleAlphaOnly: false });
- }
- function j(e6, t3, i6, o5, r5, n5) {
- const a3 = ["Rotation", "OffsetX", "OffsetY"], s6 = o5.filter((t4) => t4.primitiveName !== e6.primitiveName && !a3.includes(t4.propertyName)), c7 = e6.primitiveName, [f3, m3] = ce(o5, c7, t3, null, null), p2 = c(JSON.stringify(e6) + m3).toString(), u5 = c(`${e6.separation}${JSON.stringify(e6.lineSymbol)}`).toString();
- let y3 = { r: 255, g: 255, b: 255, a: 1 };
- if (e6.lineSymbol) {
- const t4 = e6.lineSymbol?.symbolLayers.find((e7) => e7.type === "CIMSolidStroke");
- t4 && (y3 = i2(t4.color));
- }
- n5.push({ type: "fill", templateHash: p2, materialHash: f3 ? ae(u5, i6, s6, r5) : u5, cim: e6, materialOverrides: s6, colorLocked: e6.colorLocked, effects: t3, color: y3, height: ie(c7, i6, "Separation", r5, e6.separation), scaleX: 1, angle: ie(c7, i6, "Rotation", r5, M(e6.rotation)), offsetX: ie(c7, i6, "OffsetX", r5, M(e6.offsetX)), offsetY: ie(c7, i6, "OffsetY", r5, M(e6.offsetY)), applyRandomOffset: false, sampleAlphaOnly: true });
- }
- function F(e6, t3, i6, o5, r5, n5) {
- const a3 = e6.primitiveName, [s6, c7] = ce(o5, a3, t3, null, null), f3 = c(JSON.stringify(e6) + c7).toString();
- n5.push({ type: "fill", templateHash: f3, materialHash: s6 ? ae(f3, i6, o5, r5) : f3, cim: e6, materialOverrides: null, colorLocked: e6.colorLocked, effects: t3, color: { r: 128, g: 128, b: 128, a: 1 }, height: 0, angle: 0, offsetX: 0, offsetY: 0, scaleX: 1, applyRandomOffset: false, sampleAlphaOnly: false });
- }
- function W(e6, t3, i6, o5, r5, n5, a3, s6) {
- const c7 = e6.primitiveName, f3 = i2(e6.color), m3 = e6.width !== void 0 ? e6.width : 4, p2 = L(e6.capStyle), u5 = X(e6.joinStyle), y3 = e6.miterLimit, [h, d] = ce(o5, c7, t3, null, null), S = c(JSON.stringify(e6) + d).toString();
- let v2, N;
- if (t3 && t3 instanceof Array && t3.length > 0) {
- const e7 = t3[t3.length - 1];
- if (e7.type === "CIMGeometricEffectDashes" && e7.lineDashEnding === "NoConstraint" && e7.offsetAlongLine === null) {
- const e8 = (t3 = [...t3]).pop();
- v2 = e8.dashTemplate, N = e8.scaleDash;
- }
- }
- n5.push({ type: "line", templateHash: S, materialHash: h ? () => S : S, cim: e6, materialOverrides: null, isOutline: a3, colorLocked: e6.colorLocked, effects: t3, color: ie(c7, i6, "Color", r5, f3, te2), width: ie(c7, i6, "Width", r5, m3), cap: ie(c7, i6, "CapStyle", r5, p2), join: ie(c7, i6, "JoinStyle", r5, u5), miterLimit: ie(c7, i6, "MiterLimit", r5, y3), referenceWidth: s6, zOrder: ee(e6.name), dashTemplate: v2, scaleDash: N, sampleAlphaOnly: true });
- }
- function D(e6, t3, i6, o5, r5, n5, a3, s6) {
- const c7 = c(`${e6.url}${JSON.stringify(e6.colorSubstitutions)}`).toString(), f3 = e6.primitiveName, m3 = i2(e6.tintColor), p2 = e6.width !== void 0 ? e6.width : 4, u5 = L(e6.capStyle), y3 = X(e6.joinStyle), h = e6.miterLimit, [d, S] = ce(o5, f3, t3, null, null), v2 = c(JSON.stringify(e6) + S).toString();
- n5.push({ type: "line", templateHash: v2, materialHash: d ? () => c7 : c7, cim: e6, materialOverrides: null, isOutline: a3, colorLocked: e6.colorLocked, effects: t3, color: ie(f3, i6, "TintColor", r5, m3, te2), width: ie(f3, i6, "Width", r5, p2), cap: ie(f3, i6, "CapStyle", r5, u5), join: ie(f3, i6, "JoinStyle", r5, y3), miterLimit: ie(f3, i6, "MiterLimit", r5, h), referenceWidth: s6, zOrder: ee(e6.name), dashTemplate: null, scaleDash: false, url: e6.url, sampleAlphaOnly: false });
- }
- function U(e6, t3, i6, o5, r5, n5, a3, s6) {
- const c7 = e6.primitiveName, f3 = e6.width !== void 0 ? e6.width : 4, m3 = L(e6.capStyle), p2 = X(e6.joinStyle), u5 = e6.miterLimit, [y3, h] = ce(o5, c7, t3, null, null), g = c(JSON.stringify(e6) + h).toString();
- n5.push({ type: "line", templateHash: g, materialHash: y3 ? ae(g, i6, o5, r5) : g, cim: e6, materialOverrides: null, isOutline: a3, colorLocked: e6.colorLocked, effects: t3, color: { r: 128, g: 128, b: 128, a: 1 }, width: ie(c7, i6, "Width", r5, f3), cap: ie(c7, i6, "CapStyle", r5, m3), join: ie(c7, i6, "JoinStyle", r5, p2), miterLimit: ie(c7, i6, "MiterLimit", r5, u5), referenceWidth: s6, zOrder: ee(e6.name), dashTemplate: null, scaleDash: false, sampleAlphaOnly: false });
- }
- function G(e6, t3, i6, o5, r5, a3) {
- const s6 = e6.markerPlacement;
- if (!s6 || s6.type !== "CIMMarkerPlacementInsidePolygon")
- return false;
- const c7 = s6, f3 = Math.abs(c7.stepX), m3 = Math.abs(c7.stepY);
- if (f3 === 0 || m3 === 0)
- return true;
- const p2 = ["Rotation", "OffsetX", "OffsetY"], u5 = o5.filter((t4) => t4.primitiveName !== e6.primitiveName && !p2.includes(t4.propertyName)), y3 = "url" in e6 ? e6.url : null, [h, S] = ce(o5, c7.primitiveName, t3, null, null), v2 = c(JSON.stringify(e6) + S).toString();
- let N, b, O = null;
- if (s6.gridType === "Random") {
- const e7 = e(dt), t4 = Math.max(Math.floor(e7 / f3), 1), i7 = Math.max(Math.floor(e7 / m3), 1);
- N = m3 * i7, O = (e8) => e8 ? e8 * i7 : 0;
- b = t4 * f3 / N;
- } else
- s6.shiftOddRows ? (N = 2 * m3, O = (e7) => e7 ? 2 * e7 : 0, b = f3 / m3 * 0.5) : (N = m3, O = null, b = f3 / m3);
- let C3 = { r: 255, g: 255, b: 255, a: 1 };
- return "tintColor" in e6 && (C3 = i2(e6.tintColor)), a3.push({ type: "fill", templateHash: v2, materialHash: h ? ae(v2, i6, u5, r5) : v2, cim: e6, materialOverrides: u5, colorLocked: e6.colorLocked, effects: t3, color: ie(c7.primitiveName, i6, "TintColor", r5, C3, te2), height: ie(c7.primitiveName, i6, "StepY", r5, N, O), scaleX: b, angle: ie(c7.primitiveName, i6, "GridAngle", r5, c7.gridAngle), offsetX: ie(c7.primitiveName, i6, "OffsetX", r5, M(c7.offsetX)), offsetY: ie(c7.primitiveName, i6, "OffsetY", r5, M(c7.offsetY)), url: y3, applyRandomOffset: s6.gridType === "Random", sampleAlphaOnly: !y3 }), true;
- }
- function B2(e6, t3, i6, r5, n5, a3, s6, c7, f3) {
- const m3 = e6.primitiveName, p2 = M(e6.size);
- let u5 = M(e6.scaleX);
- const y3 = M(e6.rotation), h = M(e6.offsetX), S = M(e6.offsetY), v2 = e6.tintColor ? i2(e6.tintColor) : { r: 255, g: 255, b: 255, a: 1 }, b = c(`${e6.url}${JSON.stringify(e6.colorSubstitutions)}${JSON.stringify(e6.animatedSymbolProperties)}`).toString(), O = ne(e6.markerPlacement, r5, i6, n5), C3 = le(e6.animatedSymbolProperties, r5, i6, n5), [k, P] = ce(r5, m3, t3, O, C3), M2 = c(JSON.stringify(e6) + P).toString(), w2 = e6.anchorPoint ?? { x: 0, y: 0 };
- if ("width" in e6) {
- const t4 = e6.width;
- let i7 = 1;
- const r6 = a3.getResource(e6.url);
- r(r6) && (i7 = r6.width / r6.height), u5 /= i7 * (p2 / t4);
- }
- function L2(e7, t4) {
- return e3(C3, e7, t4);
- }
- const X2 = e6.animatedSymbolProperties && e6.animatedSymbolProperties.randomizeStartTime === true ? (e7, t4, i7, o5) => {
- const r6 = o4(o5), n6 = L2(e7, t4);
- return b + `-MATERIALGROUP(${r6})-ASP(${JSON.stringify(n6)})`;
- } : k ? (e7, t4) => {
- const i7 = L2(e7, t4);
- return b + `-ASP(${JSON.stringify(i7)})`;
- } : b;
- s6.push({ type: "marker", templateHash: M2, materialHash: X2, cim: e6, materialOverrides: null, colorLocked: e6.colorLocked, effects: t3, scaleSymbolsProportionally: false, alignment: c7, size: ie(m3, i6, "Size", n5, p2), scaleX: ie(m3, i6, "ScaleX", n5, u5), rotation: ie(m3, i6, "Rotation", n5, y3), offsetX: ie(m3, i6, "OffsetX", n5, h), offsetY: ie(m3, i6, "OffsetY", n5, S), color: ie(m3, i6, "TintColor", n5, v2, te2), anchorPoint: { x: w2.x, y: -w2.y }, isAbsoluteAnchorPoint: e6.anchorPointUnits !== "Relative", outlineColor: { r: 0, g: 0, b: 0, a: 0 }, outlineWidth: 0, frameHeight: 0, rotateClockwise: e6.rotateClockwise, referenceSize: f3, sizeRatio: 1, markerPlacement: O, url: e6.url, animatedSymbolProperties: C3 });
- }
- function q2(e6, t3, i6, o5, r5, n5, l2, a3, s6, c7) {
- const f3 = e6.markerGraphics;
- if (!f3)
- return;
- let m3 = 0;
- if (e6.scaleSymbolsProportionally) {
- const t4 = e6.frame;
- t4 && (m3 = t4.ymax - t4.ymin);
- }
- const p2 = ne(e6.markerPlacement, o5, i6, r5);
- for (const u5 of f3)
- if (u5) {
- const f4 = u5.symbol;
- if (!f4)
- continue;
- switch (f4.type) {
- case "CIMPointSymbol":
- case "CIMLineSymbol":
- case "CIMPolygonSymbol":
- K(e6, t3, p2, null, u5, o5, i6, r5, n5, l2, a3, s6, m3, c7);
- break;
- case "CIMTextSymbol":
- V(e6, t3, p2, u5, i6, o5, r5, n5, a3, s6, m3);
- }
- }
- }
- function V(e6, t3, i6, o5, r5, n5, a3, s6, m3, p2, u5) {
- const y3 = [];
- te.findApplicableOverrides(o5, n5, y3);
- const h = o5.geometry;
- if (!("x" in h) || !("y" in h))
- return;
- const b = o5.symbol, O = J(b), C3 = R(b.fontStyleName), k = t2(b.fontFamilyName);
- b.font = { family: k, decoration: O, ...C3 };
- const P = e6.frame, I = h.x - 0.5 * (P.xmin + P.xmax), w2 = h.y - 0.5 * (P.ymin + P.ymax), L2 = e6.size / u5, X2 = e6.primitiveName, x3 = M(b.height) * L2, H2 = M(b.angle), Y2 = M(e6.offsetX) + (M(b.offsetX) + I) * L2, $2 = M(e6.offsetY) + (M(b.offsetY) + w2) * L2, E2 = i2(Z.getFillColor(b));
- let T2 = i2(Z.getStrokeColor(b)), j2 = Z.getStrokeWidth(b);
- j2 || (T2 = i2(Z.getFillColor(b.haloSymbol)), j2 = b.haloSize * L2);
- const [F2, W2] = ce(n5, X2, t3, i6, null), D2 = JSON.stringify(e6.effects) + Number(e6.colorLocked) + JSON.stringify(e6.anchorPoint) + e6.anchorPointUnits + JSON.stringify(e6.markerPlacement), U2 = c(JSON.stringify(o5) + D2 + W2).toString();
- let G2 = ie(o5.primitiveName, r5, "TextString", a3, o5.textString, o2, b.textCase);
- if (G2 == null)
- return;
- const { fontStyleName: B3 } = b, q3 = k + (B3 ? "-" + B3.toLowerCase() : "-regular"), V2 = q3;
- typeof G2 == "string" && G2.includes("[") && b.fieldMap && (G2 = n2(b.fieldMap, G2, b.textCase)), s6.push({ type: "text", templateHash: U2, materialHash: F2 || typeof G2 == "function" || G2.match(/\[(.*?)\]/) ? (e7, t4, i7) => V2 + "-" + e3(G2, e7, t4, i7) : V2 + "-" + c(G2), cim: b, materialOverrides: null, colorLocked: e6.colorLocked, effects: t3, alignment: m3, anchorPoint: { x: e6.anchorPoint ? e6.anchorPoint.x : 0, y: e6.anchorPoint ? e6.anchorPoint.y : 0 }, isAbsoluteAnchorPoint: e6.anchorPointUnits !== "Relative", fontName: q3, decoration: O, weight: ie(X2, r5, "Weight", a3, C3.weight), style: ie(X2, r5, "Size", a3, C3.style), size: ie(X2, r5, "Size", a3, x3), angle: ie(X2, r5, "Rotation", a3, H2), offsetX: ie(X2, r5, "OffsetX", a3, Y2), offsetY: ie(X2, r5, "OffsetY", a3, $2), horizontalAlignment: z(b.horizontalAlignment), verticalAlignment: A2(b.verticalAlignment), text: G2, color: E2, outlineColor: T2, outlineSize: j2, referenceSize: p2, sizeRatio: 1, markerPlacement: i6 });
- }
- function K(e6, t3, i6, r5, n5, a3, s6, f3, m3, p2, u5, S, v2, N) {
- const b = n5.symbol, O = b.symbolLayers;
- if (!O)
- return;
- if (N)
- return void _(e6, t3, i6, r5, n5, s6, a3, f3, m3, p2, u5, S, v2);
- let k = O.length;
- if (me(O))
- return void Q(e6, t3, i6, r5, n5, O, a3, s6, f3, m3, u5, S, v2);
- const P = f2.applyEffects(b.effects, n5.geometry, p2.geometryEngine);
- if (P)
- for (; k--; ) {
- const N2 = O[k];
- if (N2 && N2.enable !== false)
- switch (N2.type) {
- case "CIMSolidFill":
- case "CIMSolidStroke": {
- const b2 = f2.applyEffects(N2.effects, P, p2.geometryEngine), O2 = f(b2);
- if (!O2)
- continue;
- const [k2, M2, I] = m2(O2, e6.frame, e6.size, e6.anchorPoint, e6.anchorPointUnits !== "Relative"), w2 = N2.type === "CIMSolidFill", L2 = { type: "sdf", geom: b2, asFill: w2 }, X2 = e6.primitiveName, z2 = M(e6.size) ?? 10, A3 = M(e6.rotation), R2 = M(e6.offsetX), J2 = M(e6.offsetY), x3 = N2.path, H2 = N2.primitiveName, Y2 = i2(w2 ? Z.getFillColor(N2) : Z.getStrokeColor(N2)), $2 = w2 ? { r: 0, g: 0, b: 0, a: 0 } : i2(Z.getStrokeColor(N2)), E2 = Z.getStrokeWidth(N2);
- if (!w2 && !E2)
- break;
- let T2 = false, j2 = "";
- for (const e7 of a3)
- e7.primitiveName !== H2 && e7.primitiveName !== X2 || (e7.value !== void 0 ? j2 += `-${e7.primitiveName}-${e7.propertyName}-${JSON.stringify(e7.value)}` : e7.valueExpressionInfo && (T2 = true));
- r(t3) && typeof t3 == "function" && (T2 = true);
- const F2 = JSON.stringify({ ...e6, markerGraphics: null }), W2 = c(JSON.stringify(L2) + x3).toString(), D2 = { type: "marker", templateHash: c(JSON.stringify(n5) + JSON.stringify(N2) + F2 + j2).toString(), materialHash: T2 ? () => W2 : W2, cim: L2, materialOverrides: null, colorLocked: e6.colorLocked, effects: t3, scaleSymbolsProportionally: e6.scaleSymbolsProportionally, alignment: u5, anchorPoint: { x: M2, y: I }, isAbsoluteAnchorPoint: false, size: ie(e6.primitiveName, s6, "Size", f3, z2), rotation: ie(e6.primitiveName, s6, "Rotation", f3, A3), offsetX: ie(e6.primitiveName, s6, "OffsetX", f3, R2), offsetY: ie(e6.primitiveName, s6, "OffsetY", f3, J2), scaleX: 1, frameHeight: v2, rotateClockwise: e6.rotateClockwise, referenceSize: S, sizeRatio: k2, color: ie(H2, s6, "Color", f3, Y2, te2), outlineColor: ie(H2, s6, "Color", f3, $2, te2), outlineWidth: ie(H2, s6, "Width", f3, E2), markerPlacement: i6, animatedSymbolProperties: r5, path: x3 };
- m3.push(D2);
- break;
- }
- default:
- _(e6, t3, i6, r5, n5, s6, a3, f3, m3, p2, u5, S, v2);
- }
- }
- }
- function Q(e6, t3, i6, o5, r5, n5, a3, s6, f3, m3, p2, u5, S) {
- const v2 = r5.geometry, N = n5[0], b = n5[1], O = f(v2);
- if (!O)
- return;
- const [C3, k, P] = m2(O, e6.frame, e6.size, e6.anchorPoint, e6.anchorPointUnits !== "Relative"), M2 = { type: "sdf", geom: v2, asFill: true }, I = e6.primitiveName, w2 = M(e6.size), L2 = M(e6.rotation), X2 = M(e6.offsetX), z2 = M(e6.offsetY), A3 = b.path, R2 = b.primitiveName, J2 = N.primitiveName, x3 = i2(Z.getFillColor(b)), H2 = i2(Z.getStrokeColor(N)), Y2 = Z.getStrokeWidth(N);
- let $2 = false, E2 = "";
- for (const l2 of a3)
- l2.primitiveName !== R2 && l2.primitiveName !== J2 && l2.primitiveName !== I || (l2.value !== void 0 ? E2 += `-${l2.primitiveName}-${l2.propertyName}-${JSON.stringify(l2.value)}` : l2.valueExpressionInfo && ($2 = true));
- const T2 = JSON.stringify({ ...e6, markerGraphics: null }), j2 = c(JSON.stringify(M2) + A3).toString(), F2 = { type: "marker", templateHash: c(JSON.stringify(r5) + JSON.stringify(b) + JSON.stringify(N) + T2 + E2).toString(), materialHash: $2 ? () => j2 : j2, cim: M2, materialOverrides: null, colorLocked: e6.colorLocked, effects: t3, scaleSymbolsProportionally: e6.scaleSymbolsProportionally, alignment: p2, anchorPoint: { x: k, y: P }, isAbsoluteAnchorPoint: false, size: ie(e6.primitiveName, s6, "Size", f3, w2), rotation: ie(e6.primitiveName, s6, "Rotation", f3, L2), offsetX: ie(e6.primitiveName, s6, "OffsetX", f3, X2), offsetY: ie(e6.primitiveName, s6, "OffsetY", f3, z2), scaleX: 1, frameHeight: S, rotateClockwise: e6.rotateClockwise, referenceSize: u5, sizeRatio: C3, color: ie(R2, s6, "Color", f3, x3, te2), outlineColor: ie(J2, s6, "Color", f3, H2, te2), outlineWidth: ie(J2, s6, "Width", f3, Y2), markerPlacement: i6, path: A3, animatedSymbolProperties: o5 };
- m3.push(F2);
- }
- function _(e6, t3, i6, n5, a3, s6, f3, m3, p2, u5, y3, h, g) {
- const S = Z2(e6, a3);
- let v2 = [];
- const N = ["Rotation", "OffsetX", "OffsetY"];
- v2 = f3.filter((t4) => t4.primitiveName !== e6.primitiveName || !N.includes(t4.propertyName));
- let b = "";
- for (const o5 of f3)
- o5.value !== void 0 && (b += `-${o5.primitiveName}-${o5.propertyName}-${JSON.stringify(o5.value)}`);
- const [O, C3, k] = Z.getTextureAnchor(S, u5), P = e6.primitiveName, M2 = M(e6.rotation), I = M(e6.offsetX), w2 = M(e6.offsetY), L2 = c(JSON.stringify(S) + b).toString(), X2 = { type: "marker", templateHash: L2, materialHash: v2.length > 0 || r(t3) && typeof t3 == "function" ? ae(L2, s6, v2, m3) : L2, cim: S, materialOverrides: v2, colorLocked: e6.colorLocked, effects: t3, scaleSymbolsProportionally: e6.scaleSymbolsProportionally, alignment: y3, anchorPoint: { x: O, y: C3 }, isAbsoluteAnchorPoint: false, size: e6.size, rotation: ie(P, s6, "Rotation", m3, M2), offsetX: ie(P, s6, "OffsetX", m3, I), offsetY: ie(P, s6, "OffsetY", m3, w2), color: { r: 255, g: 255, b: 255, a: 1 }, outlineColor: { r: 0, g: 0, b: 0, a: 0 }, outlineWidth: 0, scaleX: 1, frameHeight: g, rotateClockwise: e6.rotateClockwise, referenceSize: h, sizeRatio: k / u(e6.size), markerPlacement: i6, animatedSymbolProperties: n5 };
- p2.push(X2);
- }
- function Z2(e6, t3) {
- return { type: e6.type, enable: true, name: e6.name, colorLocked: e6.colorLocked, primitiveName: e6.primitiveName, anchorPoint: e6.anchorPoint, anchorPointUnits: e6.anchorPointUnits, offsetX: 0, offsetY: 0, rotateClockwise: e6.rotateClockwise, rotation: 0, size: e6.size, billboardMode3D: e6.billboardMode3D, depth3D: e6.depth3D, frame: e6.frame, markerGraphics: [t3], scaleSymbolsProportionally: e6.scaleSymbolsProportionally, respectFrame: e6.respectFrame, clippingPath: e6.clippingPath };
- }
- function ee(e6) {
- if (e6 && e6.indexOf("Level_") === 0) {
- const t3 = parseInt(e6.substr(6), 10);
- if (!isNaN(t3))
- return t3;
- }
- return 0;
- }
- function te2(t3) {
- if (!t3 || t3.length === 0)
- return null;
- const i6 = new l(t3).toRgba();
- return { r: i6[0], g: i6[1], b: i6[2], a: i6[3] };
- }
- function ie(e6, t3, i6, o5, r5, n5, l2) {
- const a3 = t3[e6];
- if (a3) {
- const e7 = a3[i6];
- if (typeof e7 == "string" || typeof e7 == "number" || e7 instanceof Array)
- return n5 ? n5.call(null, e7, l2) : e7;
- if (e7 != null && e7 instanceof o3)
- return (t4, i7, a4) => {
- let s6 = s4(e7, t4, { $view: a4 }, o5.geometryType, i7);
- return s6 !== null && n5 && (s6 = n5.call(null, s6, l2)), s6 !== null ? s6 : r5;
- };
- }
- return r5;
- }
- function oe(e6) {
- return e6 ? e6.charAt(0).toLowerCase() + e6.substr(1) : e6;
- }
- function re(e6, i6, o5, r5) {
- for (const t3 of i6) {
- if (t3.valueExpressionInfo) {
- const e7 = o5[t3.primitiveName] && o5[t3.primitiveName][t3.propertyName];
- e7 instanceof o3 && (t3.fn = (t4, i7, o6) => s4(e7, t4, { $view: o6 }, r5.geometryType, i7));
- }
- }
- return (o6, r6, n5) => {
- for (const e7 of i6)
- e7.fn && (e7.value = e7.fn(o6, r6, n5));
- const l2 = [];
- for (let a3 of e6) {
- const e7 = a3?.primitiveName;
- if (e7) {
- let o7 = false;
- for (const r7 of i6)
- if (r7.primitiveName === e7) {
- const e8 = oe(r7.propertyName);
- r7.value != null && r7.value !== a3[e8] && (o7 || (a3 = m(a3), o7 = true), a3[e8] = r7.value);
- }
- }
- l2.push(a3);
- }
- return l2;
- };
- }
- function ne(e6, i6, o5, r5) {
- const n5 = [];
- if (te.findApplicableOverrides(e6, i6, n5), n5.length === 0)
- return e6;
- for (const t3 of n5) {
- if (t3.valueExpressionInfo) {
- const e7 = o5[t3.primitiveName] && o5[t3.primitiveName][t3.propertyName];
- e7 instanceof o3 && (t3.fn = (t4, i7, o6) => s4(e7, t4, { $view: o6 }, r5.geometryType, i7));
- }
- }
- return (i7, o6, r6) => {
- for (const e7 of n5)
- e7.fn && (e7.value = e7.fn(i7, o6, r6));
- const l2 = m(e6), a3 = e6.primitiveName;
- for (const e7 of n5)
- if (e7.primitiveName === a3) {
- const t3 = oe(e7.propertyName);
- e7.value != null && e7.value !== l2[t3] && (l2[t3] = e7.value);
- }
- return l2;
- };
- }
- function le(e6, i6, o5, r5) {
- const n5 = [];
- if (te.findApplicableOverrides(e6, i6, n5), n5.length === 0)
- return e6;
- for (const t3 of n5) {
- if (t3.valueExpressionInfo) {
- const e7 = o5[t3.primitiveName] && o5[t3.primitiveName][t3.propertyName];
- e7 instanceof o3 && (t3.fn = (t4, i7, o6) => s4(e7, t4, { $view: o6 }, r5.geometryType, i7));
- }
- }
- return (i7, o6, r6) => {
- for (const e7 of n5)
- e7.fn && (e7.value = e7.fn(i7, o6, r6));
- const l2 = m(e6), a3 = e6.primitiveName;
- for (const e7 of n5)
- if (e7.primitiveName === a3) {
- const t3 = oe(e7.propertyName);
- e7.value != null && e7.value !== l2[t3] && (l2[t3] = e7.value);
- }
- return l2;
- };
- }
- function ae(e6, t3, i6, o5) {
- for (const r5 of i6) {
- if (r5.valueExpressionInfo) {
- const e7 = t3[r5.primitiveName] && t3[r5.primitiveName][r5.propertyName];
- e7 instanceof o3 && (r5.fn = (t4, i7, r6) => s4(e7, t4, { $view: r6 }, o5.geometryType, i7));
- }
- }
- return (t4, o6, r5) => {
- for (const e7 of i6)
- e7.fn && (e7.value = e7.fn(t4, o6, r5));
- return c(e6 + te.buildOverrideKey(i6)).toString();
- };
- }
- function se(e6, t3) {
- if (!t3 || t3.length === 0)
- return e6;
- const i6 = JSON.parse(JSON.stringify(e6));
- return te.applyOverrides(i6, t3), i6;
- }
- function ce(e6, t3, i6, r5, n5) {
- let l2 = false, a3 = "";
- for (const o5 of e6)
- o5.primitiveName === t3 && (o5.value !== void 0 ? a3 += `-${o5.primitiveName}-${o5.propertyName}-${JSON.stringify(o5.value)}` : o5.valueExpressionInfo && (l2 = true));
- return r(i6) && typeof i6 == "function" && (l2 = true), r(r5) && typeof r5 == "function" && (l2 = true), r(n5) && typeof n5 == "function" && (l2 = true), [l2, a3];
- }
- function fe(e6, t3, i6) {
- if (e6 && t3)
- switch (e6.type) {
- case "CIMPointSymbol":
- case "CIMLineSymbol":
- case "CIMPolygonSymbol": {
- const o5 = e6.symbolLayers;
- if (!o5)
- return;
- for (const e7 of o5)
- switch (ue(e7, t3, i6), e7.type) {
- case "CIMPictureFill":
- case "CIMHatchFill":
- case "CIMGradientFill":
- case "CIMPictureStroke":
- case "CIMGradientStroke":
- case "CIMCharacterMarker":
- case "CIMPictureMarker":
- "url" in e7 && e7.url && i6.push(t3.fetchResource(e7.url, null));
- break;
- case "CIMVectorMarker": {
- const o6 = e7.markerGraphics;
- if (!o6)
- continue;
- for (const e8 of o6)
- if (e8) {
- const o7 = e8.symbol;
- o7 && fe(o7, t3, i6);
- }
- }
- }
- }
- }
- }
- var me = (e6) => e6 && e6.length === 2 && e6[0].enable && e6[1].enable && e6[0].type === "CIMSolidStroke" && e6[1].type === "CIMSolidFill" && !e6[0].effects && !e6[1].effects;
- var pe;
- function ue(e6, t3, i6) {
- if (!e6.effects || r(t3.geometryEngine))
- return;
- if (pe)
- return void i6.push(pe);
- p(e6.effects) && (pe = C2(), i6.push(pe), pe.then((e7) => t3.geometryEngine = e7));
- }
- export {
- f2 as f,
- r3 as r,
- a2 as a,
- s4 as s,
- n3 as n,
- e5 as e,
- o4 as o,
- Y,
- se
- };
- //# sourceMappingURL=chunk-54X4RLMR.js.map
|