123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877 |
- import {
- c as c3,
- j as j2,
- j2 as j3
- } from "./chunk-ZOO4I2U4.js";
- import {
- a as a3
- } from "./chunk-JPUFJK2B.js";
- import {
- p
- } from "./chunk-HZ2WKB3G.js";
- import {
- m as m4
- } from "./chunk-RVCE264D.js";
- import {
- c as c2
- } from "./chunk-HKJ7X3BD.js";
- import {
- M,
- S,
- f,
- g,
- h2 as h,
- j2 as j
- } from "./chunk-3Z755LKF.js";
- import {
- m as m3
- } from "./chunk-IEU3AM37.js";
- import {
- i as i2
- } from "./chunk-JOYXMSKE.js";
- import {
- a as a2
- } from "./chunk-MCWCB5IY.js";
- import {
- l as l2
- } from "./chunk-TJV6ODRM.js";
- import {
- c,
- m as m2
- } from "./chunk-4ONPMX2F.js";
- import {
- S as S2,
- w
- } from "./chunk-CRGY2SDS.js";
- import {
- i as i3
- } from "./chunk-4T5ZGMEN.js";
- import {
- r as r3
- } from "./chunk-5N7JLUJJ.js";
- import {
- n as n3,
- r as r4
- } from "./chunk-P3XKUGLS.js";
- import {
- j as j4
- } from "./chunk-LU5IJZB4.js";
- import {
- s as s4
- } from "./chunk-HZRKBTHJ.js";
- import {
- o
- } from "./chunk-6T6G6LCQ.js";
- import {
- s as s5
- } from "./chunk-YEJL5NEF.js";
- import {
- r as r2
- } from "./chunk-PQFTYGF5.js";
- import {
- e,
- l3 as l,
- m,
- n5 as n2,
- s5 as s3,
- t5 as t2,
- y3 as y2
- } from "./chunk-2Z2TG5CU.js";
- import {
- T,
- a,
- b,
- u
- } from "./chunk-SQOPWYIT.js";
- import {
- s2 as s,
- s3 as s2
- } from "./chunk-E5O6P5I2.js";
- import {
- n,
- y
- } from "./chunk-SPWQ3AWG.js";
- import {
- e as e2,
- i,
- r,
- t
- } from "./chunk-YXWMMD76.js";
- // node_modules/@arcgis/core/renderers/Renderer.js
- var n4 = new s4({ simple: "simple", uniqueValue: "unique-value", classBreaks: "class-breaks", heatmap: "heatmap", dotDensity: "dot-density", dictionary: "dictionary", pieChart: "pie-chart" }, { ignoreUnknown: true });
- var a4 = class extends l {
- constructor(r5) {
- super(r5), this.authoringInfo = null, this.type = null;
- }
- async getRequiredFields(r5) {
- if (!this.collectRequiredFields)
- return [];
- const e4 = /* @__PURE__ */ new Set();
- return await this.collectRequiredFields(e4, r5), Array.from(e4).sort();
- }
- getSymbol(r5, e4) {
- }
- async getSymbolAsync(r5, e4) {
- }
- getSymbols() {
- return [];
- }
- getAttributeHash() {
- return JSON.stringify(this);
- }
- getMeshHash() {
- return JSON.stringify(this);
- }
- };
- e([y2({ type: j2, json: { write: true } })], a4.prototype, "authoringInfo", void 0), e([y2({ type: n4.apiValues, readOnly: true, json: { type: n4.jsonValues, read: false, write: { writer: n4.write, ignoreOrigin: true } } })], a4.prototype, "type", void 0), a4 = e([n2("esri.renderers.Renderer")], a4);
- var p2 = a4;
- // node_modules/@arcgis/core/renderers/support/randomRotationExpression.js
- function e3(e4) {
- var _a, _b, _c;
- return (_c = (_b = (_a = e4.match(t3)) == null ? void 0 : _a[1]) == null ? void 0 : _b.replace(/\\'/g, "'")) != null ? _c : null;
- }
- var t3 = /^hash\(\$feature\['((\\'|[^'])+)'\]\) \* 8\.381e-8$/;
- // node_modules/@arcgis/core/renderers/visualVariables/ColorVariable.js
- var i4;
- var p3 = i4 = class extends c3 {
- constructor(t4) {
- super(t4), this.type = "color", this.normalizationField = null;
- }
- get cache() {
- return { ipData: this._interpolateData(), hasExpression: !!this.valueExpression, compiledFunc: null };
- }
- set stops(t4) {
- t4 && Array.isArray(t4) && (t4 = t4.filter((t5) => !!t5)).sort((t5, s6) => t5.value - s6.value), this._set("stops", t4);
- }
- clone() {
- return new i4({ field: this.field, normalizationField: this.normalizationField, valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle, stops: this.stops && this.stops.map((t4) => t4.clone()), legendOptions: this.legendOptions && this.legendOptions.clone() });
- }
- getAttributeHash() {
- return `${super.getAttributeHash()}-${this.normalizationField}`;
- }
- _interpolateData() {
- return this.stops && this.stops.map((t4) => t4.value || 0);
- }
- };
- e([y2({ readOnly: true })], p3.prototype, "cache", null), e([y2({ type: ["color"], json: { type: ["colorInfo"] } })], p3.prototype, "type", void 0), e([y2({ type: String, json: { write: true } })], p3.prototype, "normalizationField", void 0), e([y2({ type: [a3], json: { write: true } })], p3.prototype, "stops", null), p3 = i4 = e([n2("esri.renderers.visualVariables.ColorVariable")], p3);
- var a5 = p3;
- // node_modules/@arcgis/core/renderers/visualVariables/support/OpacityStop.js
- var l3;
- var u2 = l3 = class extends l {
- constructor(r5) {
- super(r5), this.label = null, this.opacity = null, this.value = null;
- }
- readOpacity(r5, t4) {
- return r4(t4.transparency);
- }
- writeOpacity(r5, t4, o2) {
- t4[o2] = n3(r5);
- }
- clone() {
- return new l3({ label: this.label, opacity: this.opacity, value: this.value });
- }
- };
- e([y2({ type: String, json: { write: true } })], u2.prototype, "label", void 0), e([y2({ type: Number, json: { type: T, write: { target: "transparency" } } })], u2.prototype, "opacity", void 0), e([o("opacity", ["transparency"])], u2.prototype, "readOpacity", null), e([r2("opacity")], u2.prototype, "writeOpacity", null), e([y2({ type: Number, json: { write: true } })], u2.prototype, "value", void 0), u2 = l3 = e([n2("esri.renderers.visualVariables.support.OpacityStop")], u2);
- var y3 = u2;
- // node_modules/@arcgis/core/renderers/visualVariables/OpacityVariable.js
- var i5;
- var p4 = i5 = class extends c3 {
- constructor(t4) {
- super(t4), this.type = "opacity", this.normalizationField = null;
- }
- get cache() {
- return { ipData: this._interpolateData(), hasExpression: !!this.valueExpression, compiledFunc: null };
- }
- set stops(t4) {
- t4 && Array.isArray(t4) && (t4 = t4.filter((t5) => !!t5)).sort((t5, s6) => t5.value - s6.value), this._set("stops", t4);
- }
- clone() {
- return new i5({ field: this.field, normalizationField: this.normalizationField, valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle, stops: this.stops && this.stops.map((t4) => t4.clone()), legendOptions: this.legendOptions && this.legendOptions.clone() });
- }
- getAttributeHash() {
- return `${super.getAttributeHash()}-${this.normalizationField}`;
- }
- _interpolateData() {
- return this.stops && this.stops.map((t4) => t4.value || 0);
- }
- };
- e([y2({ readOnly: true })], p4.prototype, "cache", null), e([y2({ type: ["opacity"], json: { type: ["transparencyInfo"] } })], p4.prototype, "type", void 0), e([y2({ type: String, json: { write: true } })], p4.prototype, "normalizationField", void 0), e([y2({ type: [y3], json: { write: true } })], p4.prototype, "stops", null), p4 = i5 = e([n2("esri.renderers.visualVariables.OpacityVariable")], p4);
- var a6 = p4;
- // node_modules/@arcgis/core/renderers/visualVariables/RotationVariable.js
- var p5;
- var a7 = p5 = class extends c3 {
- constructor(e4) {
- super(e4), this.axis = null, this.type = "rotation", this.rotationType = "geographic", this.valueExpressionTitle = null;
- }
- get cache() {
- return { hasExpression: !!this.valueExpression, compiledFunc: null };
- }
- writeValueExpressionTitleWebScene(e4, s6, o2, r5) {
- if (r5 && r5.messages) {
- const e5 = `visualVariables[${this.index}]`;
- r5.messages.push(new s2("property:unsupported", this.type + "VisualVariable.valueExpressionTitle is not supported in Web Scene. Please remove this property to save the Web Scene.", { instance: this, propertyName: e5 + ".valueExpressionTitle", context: r5 }));
- }
- }
- clone() {
- return new p5({ axis: this.axis, rotationType: this.rotationType, field: this.field, valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle, legendOptions: this.legendOptions && this.legendOptions.clone() });
- }
- };
- e([y2({ readOnly: true })], a7.prototype, "cache", null), e([y2({ type: ["heading", "tilt", "roll"], json: { origins: { "web-scene": { default: "heading", write: true } } } })], a7.prototype, "axis", void 0), e([y2({ type: ["rotation"], json: { type: ["rotationInfo"] } })], a7.prototype, "type", void 0), e([y2({ type: ["geographic", "arithmetic"], json: { write: true, origins: { "web-document": { write: true, default: "geographic" } } } })], a7.prototype, "rotationType", void 0), e([y2({ type: String, json: { write: true } })], a7.prototype, "valueExpressionTitle", void 0), e([r2("web-scene", "valueExpressionTitle")], a7.prototype, "writeValueExpressionTitleWebScene", null), a7 = p5 = e([n2("esri.renderers.visualVariables.RotationVariable")], a7);
- var n5 = a7;
- // node_modules/@arcgis/core/renderers/visualVariables/VisualVariableFactory.js
- var u3 = { color: a5, size: j3, opacity: a6, rotation: n5 };
- var b2 = new s4({ colorInfo: "color", transparencyInfo: "opacity", rotationInfo: "rotation", sizeInfo: "size" });
- var h2 = /^\[([^\]]+)\]$/i;
- var V = class extends m {
- constructor() {
- super(...arguments), this.colorVariables = null, this.opacityVariables = null, this.rotationVariables = null, this.sizeVariables = null;
- }
- set visualVariables(r5) {
- if (this._resetVariables(), (r5 = r5 && r5.filter((r6) => !!r6)) && r5.length) {
- for (const s6 of r5)
- switch (s6.type) {
- case "color":
- this.colorVariables.push(s6);
- break;
- case "opacity":
- this.opacityVariables.push(s6);
- break;
- case "rotation":
- this.rotationVariables.push(s6);
- break;
- case "size":
- this.sizeVariables.push(s6);
- }
- if (this.sizeVariables.length) {
- this.sizeVariables.some((r6) => !!r6.target) && r5.sort((r6, s6) => {
- let e4 = null;
- return e4 = r6.target === s6.target ? 0 : r6.target ? 1 : -1, e4;
- });
- }
- for (let s6 = 0; s6 < r5.length; s6++) {
- r5[s6].index = s6;
- }
- this._set("visualVariables", r5);
- } else
- this._set("visualVariables", r5);
- }
- readVariables(r5, s6, e4) {
- const { rotationExpression: a9, rotationType: i8 } = s6, l7 = a9 && a9.match(h2), n8 = l7 && l7[1];
- if (n8 && (r5 || (r5 = []), r5.push({ type: "rotationInfo", rotationType: i8, field: n8 })), r5)
- return r5.map((r6) => {
- const s7 = b2.read(r6.type), a10 = u3[s7];
- a10 || (s.getLogger(this.declaredClass).warn(`Unknown variable type: ${s7}`), e4 && e4.messages && e4.messages.push(new t2("visual-variable:unsupported", `visualVariable of type '${s7}' is not supported`, { definition: r6, context: e4 })));
- const i9 = new a10();
- return i9.read(r6, e4), i9;
- });
- }
- writeVariables(r5, s6) {
- const e4 = [];
- for (const o2 of r5) {
- const r6 = o2.toJSON(s6);
- r6 && e4.push(r6);
- }
- return e4;
- }
- _resetVariables() {
- this.colorVariables = [], this.opacityVariables = [], this.rotationVariables = [], this.sizeVariables = [];
- }
- };
- e([y2()], V.prototype, "visualVariables", null), V = e([n2("esri.renderers.visualVariables.VisualVariableFactory")], V);
- var f2 = V;
- // node_modules/@arcgis/core/renderers/mixins/VisualVariablesMixin.js
- var v = { base: c3, key: "type", typeMap: { opacity: a6, color: a5, rotation: n5, size: j3 } };
- var y4 = (a9) => {
- let u6 = class extends a9 {
- constructor() {
- super(...arguments), this._vvFactory = new f2();
- }
- set visualVariables(r5) {
- this._vvFactory.visualVariables = r5, this._set("visualVariables", this._vvFactory.visualVariables);
- }
- readVisualVariables(r5, a10, s6) {
- return this._vvFactory.readVariables(r5, a10, s6);
- }
- writeVisualVariables(r5, a10, s6, i8) {
- a10[s6] = this._vvFactory.writeVariables(r5, i8);
- }
- get arcadeRequiredForVisualVariables() {
- if (!this.visualVariables)
- return false;
- for (const r5 of this.visualVariables)
- if (r5.arcadeRequired)
- return true;
- return false;
- }
- hasVisualVariables(r5, a10) {
- return r5 ? this.getVisualVariablesForType(r5, a10).length > 0 : this.getVisualVariablesForType("size", a10).length > 0 || this.getVisualVariablesForType("color", a10).length > 0 || this.getVisualVariablesForType("opacity", a10).length > 0 || this.getVisualVariablesForType("rotation", a10).length > 0;
- }
- getVisualVariablesForType(r5, a10) {
- const s6 = this.visualVariables;
- return s6 ? s6.filter((s7) => s7.type === r5 && ("string" == typeof a10 ? s7.target === a10 : false !== a10 || !s7.target)) : [];
- }
- async collectVVRequiredFields(r5, a10) {
- let s6 = [];
- this.visualVariables && (s6 = s6.concat(this.visualVariables));
- for (const i8 of s6)
- i8 && (i8.field && w(r5, a10, i8.field), i8.normalizationField && w(r5, a10, i8.normalizationField), i8.valueExpression && (f3(i8.valueExpression, r5, a10) || await S2(r5, a10, i8.valueExpression)));
- }
- };
- return e([y2({ types: [v], value: null, json: { write: true } })], u6.prototype, "visualVariables", null), e([o("visualVariables", ["visualVariables", "rotationType", "rotationExpression"])], u6.prototype, "readVisualVariables", null), e([r2("visualVariables")], u6.prototype, "writeVisualVariables", null), u6 = e([n2("esri.renderers.mixins.VisualVariablesMixin")], u6), u6;
- };
- function f3(r5, s6, i8) {
- const e4 = e3(r5);
- return !!r(e4) && (w(s6, i8, e4), true);
- }
- // node_modules/@arcgis/core/renderers/support/commonProperties.js
- var l4 = { types: M, json: { write: { writer: m4 }, origins: { "web-scene": { types: h, write: { writer: m4 }, read: { reader: s3({ types: h }) } } } } };
- var y5 = { types: { base: a2, key: "type", typeMap: { "simple-fill": j.typeMap["simple-fill"], "picture-fill": j.typeMap["picture-fill"], "polygon-3d": j.typeMap["polygon-3d"] } }, json: { write: { writer: m4 }, origins: { "web-scene": { type: S, write: { writer: m4 } } } } };
- var m5 = { cast: (e4) => null == e4 || "string" == typeof e4 || "number" == typeof e4 ? e4 : `${e4}`, json: { type: String, write: { writer: (e4, r5) => {
- r5.value = e4 == null ? void 0 : e4.toString();
- } } } };
- // node_modules/@arcgis/core/renderers/support/ClassBreakInfo.js
- var i6;
- var l5 = i6 = class extends l {
- constructor(s6) {
- super(s6), this.description = null, this.label = null, this.minValue = null, this.maxValue = 0, this.symbol = null;
- }
- clone() {
- return new i6({ description: this.description, label: this.label, minValue: this.minValue, maxValue: this.maxValue, symbol: this.symbol ? this.symbol.clone() : null });
- }
- getMeshHash() {
- const s6 = JSON.stringify(this.symbol);
- return `${this.minValue}.${this.maxValue}.${s6}`;
- }
- };
- e([y2({ type: String, json: { write: true } })], l5.prototype, "description", void 0), e([y2({ type: String, json: { write: true } })], l5.prototype, "label", void 0), e([y2({ type: Number, json: { read: { source: "classMinValue" }, write: { target: "classMinValue" } } })], l5.prototype, "minValue", void 0), e([y2({ type: Number, json: { read: { source: "classMaxValue" }, write: { target: "classMaxValue" } } })], l5.prototype, "maxValue", void 0), e([y2(l4)], l5.prototype, "symbol", void 0), l5 = i6 = e([n2("esri.renderers.support.ClassBreakInfo")], l5);
- var a8 = l5;
- // node_modules/@arcgis/core/renderers/ClassBreaksRenderer.js
- var V2;
- var E = "log";
- var j5 = "percent-of-total";
- var z = "field";
- var w2 = new s4({ esriNormalizeByLog: E, esriNormalizeByPercentOfTotal: j5, esriNormalizeByField: z });
- var T2 = b(a8);
- var C = V2 = class extends y4(p2) {
- constructor(e4) {
- super(e4), this._compiledValueExpression = { valueExpression: null, compiledFunction: null }, this.backgroundFillSymbol = null, this.classBreakInfos = null, this.defaultLabel = null, this.defaultSymbol = null, this.field = null, this.isMaxInclusive = true, this.legendOptions = null, this.normalizationField = null, this.normalizationTotal = null, this.type = "class-breaks", this.valueExpression = null, this.valueExpressionTitle = null, this._set("classBreakInfos", []);
- }
- readClassBreakInfos(e4, s6, t4) {
- if (!Array.isArray(e4))
- return;
- let o2 = s6.minValue;
- return e4.map((e5) => {
- const s7 = new a8();
- return s7.read(e5, t4), null == s7.minValue && (s7.minValue = o2), null == s7.maxValue && (s7.maxValue = s7.minValue), o2 = s7.maxValue, s7;
- });
- }
- writeClassBreakInfos(e4, s6, t4, o2) {
- const i8 = e4.map((e5) => e5.write({}, o2));
- this._areClassBreaksConsecutive() && i8.forEach((e5) => delete e5.classMinValue), s6[t4] = i8;
- }
- castField(e4) {
- return null == e4 ? e4 : "function" == typeof e4 ? (s.getLogger(this.declaredClass).error(".field: field must be a string value"), null) : u(e4);
- }
- get minValue() {
- return this.classBreakInfos && this.classBreakInfos[0] && this.classBreakInfos[0].minValue || 0;
- }
- get normalizationType() {
- let e4 = this._get("normalizationType");
- const s6 = !!this.normalizationField, t4 = null != this.normalizationTotal;
- return s6 || t4 ? (e4 = s6 && z || t4 && j5 || null, s6 && t4 && s.getLogger(this.declaredClass).warn("warning: both normalizationField and normalizationTotal are set!")) : e4 !== z && e4 !== j5 || (e4 = null), e4;
- }
- set normalizationType(e4) {
- this._set("normalizationType", e4);
- }
- addClassBreakInfo(e4, t4, i8) {
- let r5 = null;
- r5 = "number" == typeof e4 ? new a8({ minValue: e4, maxValue: t4, symbol: g(i8) }) : T2(y(e4)), this.classBreakInfos.push(r5), 1 === this.classBreakInfos.length && this.notifyChange("minValue");
- }
- removeClassBreakInfo(e4, s6) {
- const t4 = this.classBreakInfos.length;
- for (let o2 = 0; o2 < t4; o2++) {
- const t5 = [this.classBreakInfos[o2].minValue, this.classBreakInfos[o2].maxValue];
- if (t5[0] === e4 && t5[1] === s6) {
- this.classBreakInfos.splice(o2, 1);
- break;
- }
- }
- }
- getBreakIndex(e4, s6) {
- return this.valueExpression && (t(s6) || t(s6.arcade)) && s.getLogger(this.declaredClass).warn(""), this.valueExpression ? this._getBreakIndexForExpression(e4, s6) : this._getBreakIndexForField(e4);
- }
- async getClassBreakInfo(e4, s6) {
- let t4 = s6;
- this.valueExpression && (t(s6) || t(s6.arcade)) && (t4 = { ...t4, arcade: await i3() });
- const o2 = this.getBreakIndex(e4, t4);
- return -1 !== o2 ? this.classBreakInfos[o2] : null;
- }
- getSymbol(e4, s6) {
- if (this.valueExpression && (t(s6) || t(s6.arcade)))
- return void s.getLogger(this.declaredClass).error("#getSymbol()", "Please use getSymbolAsync if valueExpression is used");
- const t4 = this.getBreakIndex(e4, s6);
- return t4 > -1 ? this.classBreakInfos[t4].symbol : this.defaultSymbol;
- }
- async getSymbolAsync(e4, s6) {
- let t4 = s6;
- if (this.valueExpression && (t(s6) || t(s6.arcade))) {
- const e5 = await i3(), { arcadeUtils: s7 } = e5;
- s7.hasGeometryOperations(this.valueExpression) && await s7.enableGeometryOperations(), t4 = { ...t4, arcade: e5 };
- }
- const o2 = this.getBreakIndex(e4, t4);
- return o2 > -1 ? this.classBreakInfos[o2].symbol : this.defaultSymbol;
- }
- getSymbols() {
- const e4 = [];
- return this.classBreakInfos.forEach((s6) => {
- s6.symbol && e4.push(s6.symbol);
- }), this.defaultSymbol && e4.push(this.defaultSymbol), e4;
- }
- getAttributeHash() {
- return this.visualVariables && this.visualVariables.reduce((e4, s6) => e4 + s6.getAttributeHash(), "");
- }
- getMeshHash() {
- const e4 = JSON.stringify(this.backgroundFillSymbol), s6 = JSON.stringify(this.defaultSymbol), t4 = `${this.normalizationField}.${this.normalizationType}.${this.normalizationTotal}`;
- return `${e4}.${s6}.${this.classBreakInfos.reduce((e5, s7) => e5 + s7.getMeshHash(), "")}.${t4}.${this.field}.${this.valueExpression}`;
- }
- get arcadeRequired() {
- return this.arcadeRequiredForVisualVariables || !!this.valueExpression;
- }
- clone() {
- return new V2({ field: this.field, backgroundFillSymbol: this.backgroundFillSymbol && this.backgroundFillSymbol.clone(), defaultLabel: this.defaultLabel, defaultSymbol: this.defaultSymbol && this.defaultSymbol.clone(), valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle, classBreakInfos: y(this.classBreakInfos), isMaxInclusive: this.isMaxInclusive, normalizationField: this.normalizationField, normalizationTotal: this.normalizationTotal, normalizationType: this.normalizationType, visualVariables: y(this.visualVariables), legendOptions: y(this.legendOptions), authoringInfo: this.authoringInfo && this.authoringInfo.clone() });
- }
- async collectRequiredFields(e4, s6) {
- const t4 = [this.collectVVRequiredFields(e4, s6), this.collectSymbolFields(e4, s6)];
- await Promise.all(t4);
- }
- async collectSymbolFields(e4, s6) {
- const t4 = [...this.getSymbols().map((t5) => t5.collectRequiredFields(e4, s6)), S2(e4, s6, this.valueExpression)];
- w(e4, s6, this.field), w(e4, s6, this.normalizationField), await Promise.all(t4);
- }
- _getBreakIndexForExpression(e4, s6) {
- const { viewingMode: t4, scale: o2, spatialReference: i8, arcade: r5 } = i(s6, {}), { valueExpression: n8 } = this;
- let u6 = this._compiledValueExpression.valueExpression === n8 ? this._compiledValueExpression.compiledFunction : null;
- const c6 = e2(r5).arcadeUtils;
- if (!u6) {
- const e5 = c6.createSyntaxTree(n8);
- u6 = c6.createFunction(e5), this._compiledValueExpression.compiledFunction = u6;
- }
- this._compiledValueExpression.valueExpression = n8;
- const p7 = c6.executeFunction(u6, c6.createExecContext(e4, c6.getViewInfo({ viewingMode: t4, scale: o2, spatialReference: i8 })));
- return this._getBreakIndexfromInfos(p7);
- }
- _getBreakIndexForField(e4) {
- const s6 = this.field, t4 = e4.attributes, o2 = this.normalizationType;
- let i8 = parseFloat(t4[s6]);
- if (o2) {
- const e5 = this.normalizationTotal, s7 = parseFloat(this.normalizationField ? t4[this.normalizationField] : void 0);
- if (o2 === E)
- i8 = Math.log(i8) * Math.LOG10E;
- else if (o2 !== j5 || null == e5 || isNaN(e5)) {
- if (o2 === z && !isNaN(s7)) {
- if (isNaN(i8) || isNaN(s7))
- return -1;
- i8 /= s7;
- }
- } else
- i8 = i8 / e5 * 100;
- }
- return this._getBreakIndexfromInfos(i8);
- }
- _getBreakIndexfromInfos(e4) {
- const s6 = this.isMaxInclusive;
- if (null != e4 && "number" == typeof e4 && !isNaN(e4))
- for (let t4 = 0; t4 < this.classBreakInfos.length; t4++) {
- const o2 = [this.classBreakInfos[t4].minValue, this.classBreakInfos[t4].maxValue];
- if (o2[0] <= e4 && (s6 ? e4 <= o2[1] : e4 < o2[1]))
- return t4;
- }
- return -1;
- }
- _areClassBreaksConsecutive() {
- const e4 = this.classBreakInfos, s6 = e4.length;
- for (let t4 = 1; t4 < s6; t4++)
- if (e4[t4 - 1].maxValue !== e4[t4].minValue)
- return false;
- return true;
- }
- };
- e([y2(y5)], C.prototype, "backgroundFillSymbol", void 0), e([y2({ type: [a8] })], C.prototype, "classBreakInfos", void 0), e([o("classBreakInfos")], C.prototype, "readClassBreakInfos", null), e([r2("classBreakInfos")], C.prototype, "writeClassBreakInfos", null), e([y2({ type: String, json: { write: true } })], C.prototype, "defaultLabel", void 0), e([y2(l4)], C.prototype, "defaultSymbol", void 0), e([y2({ type: String, json: { write: true } })], C.prototype, "field", void 0), e([s5("field")], C.prototype, "castField", null), e([y2({ type: Boolean })], C.prototype, "isMaxInclusive", void 0), e([y2({ type: p, json: { write: true } })], C.prototype, "legendOptions", void 0), e([y2({ type: Number, readOnly: true, value: null, json: { read: false, write: { overridePolicy() {
- return 0 !== this.classBreakInfos.length && this._areClassBreaksConsecutive() ? { enabled: true } : { enabled: false };
- } } } })], C.prototype, "minValue", null), e([y2({ type: String, json: { write: true } })], C.prototype, "normalizationField", void 0), e([y2({ type: Number, cast: (e4) => a(e4), json: { write: true } })], C.prototype, "normalizationTotal", void 0), e([y2({ type: w2.apiValues, value: null, json: { type: w2.jsonValues, read: w2.read, write: w2.write } })], C.prototype, "normalizationType", null), e([r3({ classBreaks: "class-breaks" })], C.prototype, "type", void 0), e([y2({ type: String, json: { write: true } })], C.prototype, "valueExpression", void 0), e([y2({ type: String, json: { write: true } })], C.prototype, "valueExpressionTitle", void 0), C = V2 = e([n2("esri.renderers.ClassBreaksRenderer")], C);
- var _ = C;
- // node_modules/@arcgis/core/renderers/support/UniqueValue.js
- var u4 = class extends i2(l) {
- constructor(o2) {
- super(o2), this.value = null, this.value2 = null, this.value3 = null;
- }
- };
- e([y2(m5)], u4.prototype, "value", void 0), e([y2(m5)], u4.prototype, "value2", void 0), e([y2(m5)], u4.prototype, "value3", void 0), u4 = e([n2("esri.renderers.support.UniqueValue")], u4);
- var c4 = u4;
- // node_modules/@arcgis/core/renderers/support/UniqueValueClass.js
- var n6 = class extends i2(l) {
- constructor(r5) {
- super(r5), this.description = null, this.label = null, this.symbol = null, this.values = null;
- }
- castValues(r5) {
- if (null == r5)
- return null;
- const o2 = typeof (r5 = Array.isArray(r5) ? r5 : [r5])[0];
- return "string" === o2 || "number" === o2 ? r5.map((r6) => new c4({ value: r6 })) : "object" === o2 ? r5[0] instanceof c4 ? r5 : r5.map((r6) => new c4(r6)) : null;
- }
- };
- e([y2({ type: String, json: { write: true } })], n6.prototype, "description", void 0), e([y2({ type: String, json: { write: true } })], n6.prototype, "label", void 0), e([y2(l4)], n6.prototype, "symbol", void 0), e([y2({ type: [c4], json: { type: [[String]], read: { reader: (r5) => r5 ? r5.map((r6) => new c4({ value: r6[0], value2: r6[1], value3: r6[2] })) : null }, write: { writer: (r5, o2) => {
- const e4 = [];
- for (const s6 of r5) {
- const r6 = [s6.value, s6.value2, s6.value3].filter(r).map((r7) => r7.toString());
- e4.push(r6);
- }
- o2.values = e4;
- } } } })], n6.prototype, "values", void 0), e([s5("values")], n6.prototype, "castValues", null), n6 = e([n2("esri.renderers.support.UniqueValueClass")], n6);
- var u5 = n6;
- // node_modules/@arcgis/core/renderers/support/UniqueValueGroup.js
- var c5 = class extends i2(l) {
- constructor(r5) {
- super(r5), this.heading = null, this.classes = null;
- }
- };
- e([y2({ type: String, json: { write: true } })], c5.prototype, "heading", void 0), e([y2({ type: [u5], json: { write: true } })], c5.prototype, "classes", void 0), c5 = e([n2("esri.renderers.support.UniqueValueGroup")], c5);
- var i7 = c5;
- // node_modules/@arcgis/core/renderers/support/UniqueValueInfo.js
- var l6;
- var p6 = l6 = class extends l {
- constructor(o2) {
- super(o2), this.description = null, this.label = null, this.symbol = null, this.value = null;
- }
- clone() {
- return new l6({ value: this.value, description: this.description, label: this.label, symbol: this.symbol ? this.symbol.clone() : null });
- }
- getMeshHash() {
- const o2 = JSON.stringify(this.symbol && this.symbol.toJSON());
- return `${this.value}.${o2}`;
- }
- };
- e([y2({ type: String, json: { write: true } })], p6.prototype, "description", void 0), e([y2({ type: String, json: { write: true } })], p6.prototype, "label", void 0), e([y2(l4)], p6.prototype, "symbol", void 0), e([y2(m5)], p6.prototype, "value", void 0), p6 = l6 = e([n2("esri.renderers.support.UniqueValueInfo")], p6);
- var n7 = p6;
- // node_modules/@arcgis/core/renderers/UniqueValueRenderer.js
- var R;
- var P = "esri.renderers.UniqueValueRenderer";
- var $ = s.getLogger(P);
- var z2 = "uvInfos-watcher";
- var k = "uvGroups-watcher";
- var A = ",";
- var H = b(n7);
- function L(e4) {
- const { field1: t4, field2: s6, field3: i8, fieldDelimiter: o2, uniqueValueInfos: l7, valueExpression: r5 } = e4, u6 = !(!t4 || !s6);
- return [{ classes: (l7 != null ? l7 : []).map((e5) => {
- var _a;
- const { symbol: l8, label: n8, value: a9, description: p7 } = e5, [f4, d, c6] = u6 ? ((_a = a9 == null ? void 0 : a9.toString()) == null ? void 0 : _a.split(o2 || "")) || [] : [a9], h3 = [];
- return (t4 || r5) && h3.push(f4), s6 && h3.push(d), i8 && h3.push(c6), { symbol: l8, label: n8, values: [h3], description: p7 };
- }) }];
- }
- var T3 = R = class extends y4(p2) {
- constructor(e4) {
- super(e4), this._valueInfoMap = {}, this._isDefaultSymbolDerived = false, this._isInfosSource = null, this.type = "unique-value", this.backgroundFillSymbol = null, this.valueExpressionTitle = null, this.legendOptions = null, this.defaultLabel = null, this.portal = null, this.styleOrigin = null, this.diff = { uniqueValueInfos(e5, t4) {
- if (!e5 && !t4)
- return;
- if (!e5 || !t4)
- return { type: "complete", oldValue: e5, newValue: t4 };
- let s6 = false;
- const i8 = { type: "collection", added: [], removed: [], changed: [], unchanged: [] };
- for (let o2 = 0; o2 < t4.length; o2++) {
- const l7 = e5.find((e6) => e6.value === t4[o2].value);
- l7 ? m3(l7, t4[o2]) ? (i8.changed.push({ type: "complete", oldValue: l7, newValue: t4[o2] }), s6 = true) : i8.unchanged.push({ oldValue: l7, newValue: t4[o2] }) : (i8.added.push(t4[o2]), s6 = true);
- }
- for (let o2 = 0; o2 < e5.length; o2++) {
- t4.find((t5) => t5.value === e5[o2].value) || (i8.removed.push(e5[o2]), s6 = true);
- }
- return s6 ? i8 : void 0;
- } }, this._set("uniqueValueInfos", []), this._set("uniqueValueGroups", []);
- }
- get _cache() {
- return { compiledFunc: null };
- }
- set field(e4) {
- this._set("field", e4), this._updateFieldDelimiter(), this._updateUniqueValues();
- }
- castField(e4) {
- return null == e4 || "function" == typeof e4 ? e4 : u(e4);
- }
- writeField(e4, t4, i8, o2) {
- "string" == typeof e4 ? t4[i8] = e4 : o2 && o2.messages ? o2.messages.push(new s2("property:unsupported", "UniqueValueRenderer.field set to a function cannot be written to JSON")) : $.error(".field: cannot write field to JSON since it's not a string value");
- }
- set field2(e4) {
- this._set("field2", e4), this._updateFieldDelimiter(), this._updateUniqueValues();
- }
- set field3(e4) {
- this._set("field3", e4), this._updateUniqueValues();
- }
- set valueExpression(e4) {
- this._set("valueExpression", e4), this._updateUniqueValues();
- }
- set defaultSymbol(e4) {
- this._isDefaultSymbolDerived = false, this._set("defaultSymbol", e4);
- }
- set fieldDelimiter(e4) {
- this._set("fieldDelimiter", e4), this._updateUniqueValues();
- }
- readPortal(e4, t4, s6) {
- return s6.portal || j4.getDefault();
- }
- readStyleOrigin(e4, t4, s6) {
- if (t4.styleName)
- return Object.freeze({ styleName: t4.styleName });
- if (t4.styleUrl) {
- const e5 = c(t4.styleUrl, s6);
- return Object.freeze({ styleUrl: e5 });
- }
- }
- writeStyleOrigin(e4, t4, s6, i8) {
- e4.styleName ? t4.styleName = e4.styleName : e4.styleUrl && (t4.styleUrl = m2(e4.styleUrl, i8));
- }
- set uniqueValueGroups(e4) {
- this.styleOrigin ? $.error("#uniqueValueGroups=", "Cannot modify unique value groups of a UniqueValueRenderer created from a web style") : (this._set("uniqueValueGroups", e4), this._updateInfosFromGroups(), this._isInfosSource = false, this._watchUniqueValueGroups());
- }
- set uniqueValueInfos(e4) {
- this.styleOrigin ? $.error("#uniqueValueInfos=", "Cannot modify unique value infos of a UniqueValueRenderer created from a web style") : (this._set("uniqueValueInfos", e4), this._updateValueInfoMap(), this._updateGroupsFromInfos(), this._isInfosSource = true, this._watchUniqueValueInfos());
- }
- addUniqueValueInfo(e4, s6) {
- var _a;
- if (this.styleOrigin)
- return void $.error("#addUniqueValueInfo()", "Cannot modify unique value infos of a UniqueValueRenderer created from a web style");
- let i8;
- i8 = "object" == typeof e4 ? H(e4) : new n7({ value: e4, symbol: g(s6) }), (_a = this.uniqueValueInfos) == null ? void 0 : _a.push(i8), this._valueInfoMap[i8.value] = i8, this._updateGroupsFromInfos(), this._isInfosSource = true, this._watchUniqueValueInfos();
- }
- removeUniqueValueInfo(e4) {
- if (this.styleOrigin)
- return void $.error("#removeUniqueValueInfo()", "Cannot modify unique value infos of a UniqueValueRenderer created from a web style");
- const t4 = this.uniqueValueInfos;
- if (t4)
- for (let s6 = 0; s6 < t4.length; s6++) {
- if (t4[s6].value === e4 + "") {
- delete this._valueInfoMap[e4], t4.splice(s6, 1);
- break;
- }
- }
- this._updateGroupsFromInfos(), this._isInfosSource = true, this._watchUniqueValueInfos();
- }
- async getUniqueValueInfo(e4, t4) {
- let s6 = t4;
- return this.valueExpression && (t(t4) || t(t4.arcade)) && (s6 = { ...s6, arcade: await i3() }), this._getUniqueValueInfo(e4, s6);
- }
- getSymbol(e4, t4) {
- if (this.valueExpression && (t(t4) || t(t4.arcade)))
- return void $.error("#getSymbol()", "Please use getSymbolAsync if valueExpression is used");
- const s6 = this._getUniqueValueInfo(e4, t4);
- return s6 && s6.symbol || this.defaultSymbol;
- }
- async getSymbolAsync(e4, t4) {
- let s6 = t4;
- if (this.valueExpression && (t(s6) || t(s6.arcade))) {
- const e5 = await i3(), { arcadeUtils: t5 } = e5;
- t5.hasGeometryOperations(this.valueExpression) && await t5.enableGeometryOperations(), s6 = { ...s6, arcade: e5 };
- }
- const i8 = this._getUniqueValueInfo(e4, s6);
- return i8 && i8.symbol || this.defaultSymbol;
- }
- getSymbols() {
- var _a;
- const e4 = [];
- for (const t4 of (_a = this.uniqueValueInfos) != null ? _a : [])
- t4.symbol && e4.push(t4.symbol);
- return this.defaultSymbol && e4.push(this.defaultSymbol), e4;
- }
- getAttributeHash() {
- return this.visualVariables && this.visualVariables.reduce((e4, t4) => e4 + t4.getAttributeHash(), "");
- }
- getMeshHash() {
- var _a;
- const e4 = JSON.stringify(this.backgroundFillSymbol), t4 = JSON.stringify(this.defaultSymbol), s6 = (_a = this.uniqueValueInfos) == null ? void 0 : _a.reduce((e5, t5) => e5 + t5.getMeshHash(), "");
- return `${e4}.${t4}.${s6}.${`${this.field}.${this.field2}.${this.field3}.${this.fieldDelimiter}`}.${this.valueExpression}`;
- }
- clone() {
- const e4 = new R({ field: this.field, field2: this.field2, field3: this.field3, defaultLabel: this.defaultLabel, defaultSymbol: y(this.defaultSymbol), valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle, fieldDelimiter: this.fieldDelimiter, visualVariables: y(this.visualVariables), legendOptions: y(this.legendOptions), authoringInfo: this.authoringInfo && this.authoringInfo.clone(), backgroundFillSymbol: y(this.backgroundFillSymbol) });
- this._isDefaultSymbolDerived && (e4._isDefaultSymbolDerived = true), e4._set("portal", this.portal);
- const t4 = y(this.uniqueValueInfos), s6 = y(this.uniqueValueGroups);
- return this.styleOrigin && (e4._set("styleOrigin", Object.freeze(y(this.styleOrigin))), Object.freeze(t4), Object.freeze(s6)), e4._set("uniqueValueInfos", t4), e4._updateValueInfoMap(), e4._set("uniqueValueGroups", s6), e4._isInfosSource = this._isInfosSource, e4._watchUniqueValueInfosAndGroups(), e4;
- }
- get arcadeRequired() {
- return this.arcadeRequiredForVisualVariables || !!this.valueExpression;
- }
- async collectRequiredFields(e4, t4) {
- const s6 = [this.collectVVRequiredFields(e4, t4), this.collectSymbolFields(e4, t4)];
- await Promise.all(s6);
- }
- async collectSymbolFields(e4, t4) {
- const s6 = [...this.getSymbols().map((s7) => s7.collectRequiredFields(e4, t4)), S2(e4, t4, this.valueExpression)];
- w(e4, t4, this.field), w(e4, t4, this.field2), w(e4, t4, this.field3), await Promise.all(s6);
- }
- populateFromStyle() {
- return c2(this.styleOrigin, { portal: this.portal }).then((e4) => {
- var _a;
- const t4 = [];
- return this._valueInfoMap = {}, e4 && e4.data && Array.isArray(e4.data.items) && e4.data.items.forEach((s6) => {
- const i8 = new f({ styleUrl: e4.styleUrl, styleName: e4.styleName, portal: this.portal, name: s6.name });
- this.defaultSymbol || s6.name !== e4.data.defaultItem || (this.defaultSymbol = i8, this._isDefaultSymbolDerived = true);
- const o2 = new n7({ value: s6.name, symbol: i8 });
- t4.push(o2), this._valueInfoMap[s6.name] = o2;
- }), this._set("uniqueValueInfos", Object.freeze(t4)), this._updateGroupsFromInfos(true), this._isInfosSource = null, this._watchUniqueValueInfos(), !this.defaultSymbol && ((_a = this.uniqueValueInfos) == null ? void 0 : _a.length) && (this.defaultSymbol = this.uniqueValueInfos[0].symbol, this._isDefaultSymbolDerived = true), this;
- });
- }
- _updateFieldDelimiter() {
- this.field && this.field2 && !this.fieldDelimiter && this._set("fieldDelimiter", A);
- }
- _updateUniqueValues() {
- null != this._isInfosSource && (this._isInfosSource ? this._updateGroupsFromInfos() : this._updateInfosFromGroups());
- }
- _updateValueInfoMap() {
- this._valueInfoMap = {};
- const { uniqueValueInfos: e4 } = this;
- if (e4)
- for (const t4 of e4)
- this._valueInfoMap[t4.value + ""] = t4;
- }
- _watchUniqueValueInfosAndGroups() {
- this._watchUniqueValueInfos(), this._watchUniqueValueGroups();
- }
- _watchUniqueValueInfos() {
- this.removeHandles(z2);
- const { uniqueValueInfos: e4 } = this;
- if (e4) {
- const t4 = [];
- for (const s6 of e4)
- t4.push(l2(() => ({ symbol: s6.symbol, value: s6.value, label: s6.label, description: s6.description }), (e5, t5) => {
- e5 !== t5 && (this._updateGroupsFromInfos(), this._isInfosSource = true);
- }, { sync: true }));
- this.addHandles(t4, z2);
- }
- }
- _watchUniqueValueGroups() {
- this.removeHandles(k);
- const { uniqueValueGroups: e4 } = this;
- if (e4) {
- const t4 = [];
- for (const s6 of e4) {
- t4.push(l2(() => ({ classes: s6.classes }), (e5, t5) => {
- e5 !== t5 && (this._updateInfosFromGroups(), this._isInfosSource = false);
- }, { sync: true }));
- for (const e5 of s6.classes)
- t4.push(l2(() => ({ symbol: e5.symbol, values: e5.values, label: e5.label, description: e5.description }), (e6, t5) => {
- e6 !== t5 && (this._updateInfosFromGroups(), this._isInfosSource = false);
- }, { sync: true }));
- }
- this.addHandles(t4, k);
- }
- }
- _updateInfosFromGroups() {
- var _a;
- if (!this.uniqueValueGroups)
- return this._set("uniqueValueInfos", null), this._updateValueInfoMap(), void this._watchUniqueValueInfos();
- const e4 = [], { field: t4, field2: s6, field3: i8, fieldDelimiter: o2, uniqueValueGroups: l7, valueExpression: r5 } = this;
- if (!t4 && !r5)
- return this._set("uniqueValueInfos", e4), this._updateValueInfoMap(), void this._watchUniqueValueInfos();
- const u6 = !(!t4 || !s6);
- for (const n8 of l7)
- for (const t5 of (_a = n8.classes) != null ? _a : []) {
- const { symbol: l8, label: r6, values: n9, description: a9 } = t5;
- for (const t6 of n9 != null ? n9 : []) {
- const { value: n10, value2: p7, value3: f4 } = t6, d = [n10];
- s6 && d.push(p7), i8 && d.push(f4);
- const c6 = u6 ? d.join(o2 || "") : d[0];
- e4.push(new n7({ symbol: l8, label: r6, value: c6, description: a9 }));
- }
- }
- this._set("uniqueValueInfos", e4), this._updateValueInfoMap(), this._watchUniqueValueInfos();
- }
- _updateGroupsFromInfos(e4 = false) {
- if (!this.uniqueValueInfos)
- return this._set("uniqueValueGroups", null), void this._watchUniqueValueGroups();
- const { field: t4, field2: s6, valueExpression: i8, fieldDelimiter: o2, uniqueValueInfos: l7 } = this;
- if (!t4 && !i8 || !l7.length)
- return this._set("uniqueValueGroups", []), void this._watchUniqueValueGroups();
- const r5 = !(!t4 || !s6), u6 = l7.map((e5) => {
- var _a;
- const { symbol: t5, label: s7, value: i9, description: l8 } = e5, [u7, n9, a9] = r5 ? ((_a = i9 == null ? void 0 : i9.toString()) == null ? void 0 : _a.split(o2 || "")) || [] : [i9];
- return new u5({ symbol: t5, label: s7, description: l8, values: [new c4({ value: u7, value2: n9, value3: a9 })] });
- }), n8 = [new i7({ classes: u6 })];
- e4 && Object.freeze(n8), this._set("uniqueValueGroups", n8), this._watchUniqueValueGroups();
- }
- _getUniqueValueInfo(e4, t4) {
- return this.valueExpression ? this._getUnqiueValueInfoForExpression(e4, t4) : this._getUnqiueValueInfoForFields(e4);
- }
- _getUnqiueValueInfoForExpression(e4, t4) {
- const { viewingMode: s6, scale: i8, spatialReference: o2, arcade: l7 } = i(t4, {});
- let n8 = this._cache.compiledFunc;
- const a9 = e2(l7).arcadeUtils;
- if (!n8) {
- const e5 = a9.createSyntaxTree(this.valueExpression);
- n8 = a9.createFunction(e5), this._cache.compiledFunc = n8;
- }
- const p7 = a9.executeFunction(n8, a9.createExecContext(e4, a9.getViewInfo({ viewingMode: s6, scale: i8, spatialReference: o2 })));
- return this._valueInfoMap[p7 + ""];
- }
- _getUnqiueValueInfoForFields(e4) {
- const t4 = this.field, s6 = e4.attributes;
- let i8;
- if ("function" != typeof t4 && this.field2) {
- const e5 = this.field2, o2 = this.field3, l7 = [];
- t4 && l7.push(s6[t4]), e5 && l7.push(s6[e5]), o2 && l7.push(s6[o2]), i8 = l7.join(this.fieldDelimiter || "");
- } else
- "function" == typeof t4 ? i8 = t4(e4) : t4 && (i8 = s6[t4]);
- return this._valueInfoMap[i8 + ""];
- }
- static fromPortalStyle(e4, t4) {
- const s6 = new R(t4 && t4.properties);
- s6._set("styleOrigin", Object.freeze({ styleName: e4 })), s6._set("portal", t4 && t4.portal || j4.getDefault());
- const i8 = s6.populateFromStyle();
- return i8.catch((t5) => {
- $.error(`#fromPortalStyle('${e4}'[, ...])`, "Failed to create unique value renderer from style name", t5);
- }), i8;
- }
- static fromStyleUrl(e4, t4) {
- const s6 = new R(t4 && t4.properties);
- s6._set("styleOrigin", Object.freeze({ styleUrl: e4 }));
- const i8 = s6.populateFromStyle();
- return i8.catch((t5) => {
- $.error(`#fromStyleUrl('${e4}'[, ...])`, "Failed to create unique value renderer from style URL", t5);
- }), i8;
- }
- };
- e([y2({ readOnly: true })], T3.prototype, "_cache", null), e([r3({ uniqueValue: "unique-value" })], T3.prototype, "type", void 0), e([y2(y5)], T3.prototype, "backgroundFillSymbol", void 0), e([y2({ value: null, json: { type: String, read: { source: "field1" }, write: { target: "field1" } } })], T3.prototype, "field", null), e([s5("field")], T3.prototype, "castField", null), e([r2("field")], T3.prototype, "writeField", null), e([y2({ type: String, value: null, json: { write: true } })], T3.prototype, "field2", null), e([y2({ type: String, value: null, json: { write: true } })], T3.prototype, "field3", null), e([y2({ type: String, value: null, json: { write: true } })], T3.prototype, "valueExpression", null), e([y2({ type: String, json: { write: true } })], T3.prototype, "valueExpressionTitle", void 0), e([y2({ type: p, json: { write: true } })], T3.prototype, "legendOptions", void 0), e([y2({ type: String, json: { write: true } })], T3.prototype, "defaultLabel", void 0), e([y2(n({ ...l4 }, { json: { write: { overridePolicy() {
- return { enabled: !this._isDefaultSymbolDerived };
- } }, origins: { "web-scene": { write: { overridePolicy() {
- return { enabled: !this._isDefaultSymbolDerived };
- } } } } } }))], T3.prototype, "defaultSymbol", null), e([y2({ type: String, value: null, json: { write: true } })], T3.prototype, "fieldDelimiter", null), e([y2({ type: j4, readOnly: true })], T3.prototype, "portal", void 0), e([o("portal", ["styleName"])], T3.prototype, "readPortal", null), e([y2({ readOnly: true, json: { write: { enabled: false, overridePolicy: () => ({ enabled: true }) } } })], T3.prototype, "styleOrigin", void 0), e([o("styleOrigin", ["styleName", "styleUrl"])], T3.prototype, "readStyleOrigin", null), e([r2("styleOrigin", { styleName: { type: String }, styleUrl: { type: String } })], T3.prototype, "writeStyleOrigin", null), e([y2({ type: [i7], json: { read: { source: ["uniqueValueGroups", "uniqueValueInfos"], reader: (e4, t4, s6) => (t4.uniqueValueGroups || L(t4)).map((e5) => i7.fromJSON(e5, s6)) }, write: { overridePolicy() {
- return this.styleOrigin ? { enabled: false } : { enabled: true };
- } } } })], T3.prototype, "uniqueValueGroups", null), e([y2({ type: [n7], json: { read: false, write: { overridePolicy() {
- return this.styleOrigin ? { enabled: false } : { enabled: true };
- } } } })], T3.prototype, "uniqueValueInfos", null), T3 = R = e([n2(P)], T3);
- var C2 = T3;
- export {
- p2 as p,
- n5 as n,
- y4 as y,
- l4 as l,
- a8 as a,
- _,
- n7 as n2,
- C2 as C
- };
- //# sourceMappingURL=chunk-3FNKD2EB.js.map
|