123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882 |
- import {
- d as d2,
- j as j2
- } from "./chunk-6EU7GFUT.js";
- import {
- a as a3
- } from "./chunk-MFUAILAT.js";
- import {
- p as p2
- } from "./chunk-HZJYXMI6.js";
- import {
- m as m4
- } from "./chunk-27P5ZSC7.js";
- import {
- c as c3
- } from "./chunk-UPD4MTCL.js";
- import {
- M,
- S as S2,
- b3 as b2,
- g,
- h2 as h,
- j2 as j
- } from "./chunk-EN7YGJWG.js";
- import {
- m as m3
- } from "./chunk-LY74KTXV.js";
- import {
- m as m2,
- p
- } from "./chunk-EOSZHC5H.js";
- import {
- a as a2
- } from "./chunk-C43UE3Z5.js";
- import {
- r as r2
- } from "./chunk-7ZIDBK7B.js";
- import {
- c as c2,
- i
- } from "./chunk-65BYCSII.js";
- import {
- F,
- b as b3
- } from "./chunk-WZQZRKNH.js";
- import {
- a as a4
- } from "./chunk-LRDX4TO7.js";
- import {
- n as n3,
- r as r3
- } from "./chunk-6A4U74YA.js";
- import {
- B
- } from "./chunk-4NKD334K.js";
- import {
- s as s5
- } from "./chunk-PDKDCAAD.js";
- import {
- o
- } from "./chunk-ECW2QABR.js";
- import {
- s as s4
- } from "./chunk-GCDJLKH4.js";
- import {
- r
- } from "./chunk-MRJEICT6.js";
- import {
- d,
- e,
- l3 as l,
- n2,
- s2 as s3,
- t as t2,
- y3 as y
- } from "./chunk-Y3WMVFTW.js";
- import {
- S,
- a,
- b,
- u
- } from "./chunk-IHXECKQQ.js";
- import {
- s,
- s3 as s2
- } from "./chunk-EMJ4ZSM2.js";
- import {
- m,
- n
- } from "./chunk-IKP3YN53.js";
- import {
- c,
- e as e2,
- t
- } from "./chunk-GZT4BVFP.js";
- // node_modules/@arcgis/core/renderers/support/AuthoringInfoClassBreakInfo.js
- var t3;
- var p3 = t3 = class extends l {
- constructor(r4) {
- super(r4), this.minValue = 0, this.maxValue = 0;
- }
- clone() {
- return new t3({ minValue: this.minValue, maxValue: this.maxValue });
- }
- };
- e([d({ type: Number, json: { write: true } })], p3.prototype, "minValue", void 0), e([d({ type: Number, json: { write: true } })], p3.prototype, "maxValue", void 0), p3 = t3 = e([n2("esri.renderer.support.AuthoringInfoClassBreakInfo")], p3);
- // node_modules/@arcgis/core/renderers/support/AuthoringInfoFieldInfo.js
- var n4;
- var p4 = n4 = class extends l {
- constructor(o3) {
- super(o3), this.field = "", this.normalizationField = "", this.label = "", this.classBreakInfos = [];
- }
- clone() {
- return new n4({ field: this.field, normalizationField: this.normalizationField, label: this.label, classBreakInfos: m(this.classBreakInfos) });
- }
- };
- e([d({ type: String, json: { write: true } })], p4.prototype, "field", void 0), e([d({ type: String, json: { write: true } })], p4.prototype, "normalizationField", void 0), e([d({ type: String, json: { write: true } })], p4.prototype, "label", void 0), e([d({ type: [p3], json: { write: true } })], p4.prototype, "classBreakInfos", void 0), p4 = n4 = e([n2("esri.renderers.support.AuthoringInfoFieldInfo")], p4);
- // node_modules/@arcgis/core/renderers/support/AuthoringInfoVisualVariable.js
- var n5;
- var l2 = new s5({ percentTotal: "percent-of-total", ratio: "ratio", percent: "percent" });
- var p5 = new s5({ sizeInfo: "size", colorInfo: "color", transparencyInfo: "opacity", rotationInfo: "rotation" });
- var a5 = { key: (e3) => typeof e3 == "number" ? "number" : "string", typeMap: { number: Number, string: String }, base: null };
- var u2 = ["high-to-low", "above-and-below", "centered-on", "extremes"];
- var m5 = [...new Set([...["high-to-low", "above-and-below", "centered-on", "extremes", "90-10", "above", "below"], ...["high-to-low", "above-and-below", "90-10", "above", "below"]])];
- var y2 = ["seconds", "minutes", "hours", "days", "months", "years"];
- var c4 = n5 = class extends l {
- constructor(e3) {
- super(e3), this.endTime = null, this.field = null, this.maxSliderValue = null, this.minSliderValue = null, this.startTime = null, this.type = null, this.units = null;
- }
- castEndTime(e3) {
- return typeof e3 == "string" || typeof e3 == "number" ? e3 : null;
- }
- castStartTime(e3) {
- return typeof e3 == "string" || typeof e3 == "number" ? e3 : null;
- }
- get style() {
- return this.type === "color" ? this._get("style") : null;
- }
- set style(e3) {
- this._set("style", e3);
- }
- get theme() {
- return this.type === "color" || this.type === "size" ? this._get("theme") || "high-to-low" : null;
- }
- set theme(e3) {
- this._set("theme", e3);
- }
- clone() {
- return new n5({ endTime: this.endTime, field: this.field, maxSliderValue: this.maxSliderValue, minSliderValue: this.minSliderValue, startTime: this.startTime, style: this.style, theme: this.theme, type: this.type, units: this.units });
- }
- };
- e([d({ types: a5, json: { write: true } })], c4.prototype, "endTime", void 0), e([s4("endTime")], c4.prototype, "castEndTime", null), e([d({ type: String, json: { write: true } })], c4.prototype, "field", void 0), e([d({ type: Number, json: { write: true } })], c4.prototype, "maxSliderValue", void 0), e([d({ type: Number, json: { write: true } })], c4.prototype, "minSliderValue", void 0), e([d({ types: a5, json: { write: true } })], c4.prototype, "startTime", void 0), e([s4("startTime")], c4.prototype, "castStartTime", null), e([d({ type: l2.apiValues, value: null, json: { type: l2.jsonValues, read: l2.read, write: l2.write } })], c4.prototype, "style", null), e([d({ type: m5, value: null, json: { type: m5, origins: { "web-scene": { type: u2, write: { writer: (e3, t4) => {
- u2.includes(e3) && (t4.theme = e3);
- } } } }, write: true } })], c4.prototype, "theme", null), e([d({ type: p5.apiValues, json: { type: p5.jsonValues, read: p5.read, write: p5.write } })], c4.prototype, "type", void 0), e([d({ type: y2, json: { type: y2, write: true } })], c4.prototype, "units", void 0), c4 = n5 = e([n2("esri.renderers.support.AuthoringInfoVisualVariable")], c4);
- var d3 = c4;
- // node_modules/@arcgis/core/renderers/support/AuthoringInfo.js
- var d4;
- var h2 = new s5({ esriClassifyDefinedInterval: "defined-interval", esriClassifyEqualInterval: "equal-interval", esriClassifyManual: "manual", esriClassifyNaturalBreaks: "natural-breaks", esriClassifyQuantile: "quantile", esriClassifyStandardDeviation: "standard-deviation" });
- var m6 = new s5({ pieChart: "pie-chart", classedSize: "class-breaks-size", classedColor: "class-breaks-color", univariateColorSize: "univariate-color-size", relationship: "relationship", predominance: "predominance", dotDensity: "dot-density", flow: "flow" });
- var y3 = new s5({ classedSize: "class-breaks-size", classedColor: "class-breaks-color", univariateColorSize: "univariate-color-size", relationship: "relationship", predominance: "predominance", dotDensity: "dot-density" });
- var f = ["inches", "feet", "yards", "miles", "nautical-miles", "millimeters", "centimeters", "decimeters", "meters", "kilometers", "decimal-degrees"];
- var v = ["high-to-low", "above-and-below", "above", "below", "90-10"];
- var w = ["flow-line", "wave-front"];
- var b4 = ["caret", "circle-caret", "arrow", "circle-arrow", "plus-minus", "circle-plus-minus", "square", "circle", "triangle", "happy-sad", "thumb", "custom"];
- var g2 = d4 = class extends l {
- constructor(e3) {
- super(e3), this.colorRamp = null, this.lengthUnit = null, this.maxSliderValue = null, this.minSliderValue = null, this.visualVariables = null;
- }
- get classificationMethod() {
- const e3 = this._get("classificationMethod"), t4 = this.type;
- return t4 && t4 !== "relationship" ? t4 === "class-breaks-size" || t4 === "class-breaks-color" ? e3 || "manual" : null : e3;
- }
- set classificationMethod(e3) {
- this._set("classificationMethod", e3);
- }
- readColorRamp(e3) {
- if (e3)
- return p(e3);
- }
- get fields() {
- return this.type && this.type !== "predominance" ? null : this._get("fields");
- }
- set fields(e3) {
- this._set("fields", e3);
- }
- get field1() {
- return this.type && this.type !== "relationship" ? null : this._get("field1");
- }
- set field1(e3) {
- this._set("field1", e3);
- }
- get field2() {
- return this.type && this.type !== "relationship" ? null : this._get("field2");
- }
- set field2(e3) {
- this._set("field2", e3);
- }
- get flowTheme() {
- return this.type === "flow" ? this._get("flowTheme") : null;
- }
- set flowTheme(e3) {
- this._set("flowTheme", e3);
- }
- get focus() {
- return this.type && this.type !== "relationship" ? null : this._get("focus");
- }
- set focus(e3) {
- this._set("focus", e3);
- }
- get numClasses() {
- return this.type && this.type !== "relationship" ? null : this._get("numClasses");
- }
- set numClasses(e3) {
- this._set("numClasses", e3);
- }
- get statistics() {
- return this.type === "univariate-color-size" && this.univariateTheme === "above-and-below" ? this._get("statistics") : null;
- }
- set statistics(e3) {
- this._set("statistics", e3);
- }
- get standardDeviationInterval() {
- const e3 = this.type;
- return e3 && e3 !== "relationship" && e3 !== "class-breaks-size" && e3 !== "class-breaks-color" || this.classificationMethod && this.classificationMethod !== "standard-deviation" ? null : this._get("standardDeviationInterval");
- }
- set standardDeviationInterval(e3) {
- this._set("standardDeviationInterval", e3);
- }
- get type() {
- return this._get("type");
- }
- set type(e3) {
- let t4 = e3;
- e3 === "classed-size" ? t4 = "class-breaks-size" : e3 === "classed-color" && (t4 = "class-breaks-color"), this._set("type", t4);
- }
- get univariateSymbolStyle() {
- return this.type === "univariate-color-size" && this.univariateTheme === "above-and-below" ? this._get("univariateSymbolStyle") : null;
- }
- set univariateSymbolStyle(e3) {
- this._set("univariateSymbolStyle", e3);
- }
- get univariateTheme() {
- return this.type === "univariate-color-size" ? this._get("univariateTheme") : null;
- }
- set univariateTheme(e3) {
- this._set("univariateTheme", e3);
- }
- clone() {
- return new d4({ classificationMethod: this.classificationMethod, colorRamp: m(this.colorRamp), fields: this.fields && this.fields.slice(0), field1: m(this.field1), field2: m(this.field2), focus: this.focus, numClasses: this.numClasses, maxSliderValue: this.maxSliderValue, minSliderValue: this.minSliderValue, lengthUnit: this.lengthUnit, statistics: this.statistics, standardDeviationInterval: this.standardDeviationInterval, type: this.type, visualVariables: this.visualVariables && this.visualVariables.map((e3) => e3.clone()), univariateSymbolStyle: this.univariateSymbolStyle, univariateTheme: this.univariateTheme, flowTheme: this.flowTheme });
- }
- };
- e([d({ type: h2.apiValues, value: null, json: { type: h2.jsonValues, read: h2.read, write: h2.write, origins: { "web-document": { default: "manual", type: h2.jsonValues, read: h2.read, write: h2.write } } } })], g2.prototype, "classificationMethod", null), e([d({ types: m2, json: { write: true } })], g2.prototype, "colorRamp", void 0), e([o("colorRamp")], g2.prototype, "readColorRamp", null), e([d({ type: [String], value: null, json: { write: true } })], g2.prototype, "fields", null), e([d({ type: p4, value: null, json: { write: true } })], g2.prototype, "field1", null), e([d({ type: p4, value: null, json: { write: true } })], g2.prototype, "field2", null), e([d({ type: w, value: null, json: { write: true, origins: { "web-scene": { write: false } } } })], g2.prototype, "flowTheme", null), e([d({ type: ["HH", "HL", "LH", "LL"], value: null, json: { write: true } })], g2.prototype, "focus", null), e([d({ type: Number, value: null, json: { type: S, write: true } })], g2.prototype, "numClasses", null), e([d({ type: f, json: { type: f, read: false, write: false, origins: { "web-scene": { read: true, write: true } } } })], g2.prototype, "lengthUnit", void 0), e([d({ type: Number, json: { write: true, origins: { "web-scene": { write: false, read: false } } } })], g2.prototype, "maxSliderValue", void 0), e([d({ type: Number, json: { write: true, origins: { "web-scene": { write: false, read: false } } } })], g2.prototype, "minSliderValue", void 0), e([d({ type: Object, value: null, json: { write: true, origins: { "web-scene": { write: false, read: false } } } })], g2.prototype, "statistics", null), e([d({ type: [0.25, 0.33, 0.5, 1], value: null, json: { type: [0.25, 0.33, 0.5, 1], write: true } })], g2.prototype, "standardDeviationInterval", null), e([d({ type: m6.apiValues, value: null, json: { type: m6.jsonValues, read: m6.read, write: m6.write, origins: { "web-scene": { type: y3.jsonValues, write: { writer: y3.write, overridePolicy: (e3) => ({ enabled: e3 !== "flow" }) } } } } })], g2.prototype, "type", null), e([d({ type: [d3], json: { write: true } })], g2.prototype, "visualVariables", void 0), e([d({ type: b4, value: null, json: { write: true, origins: { "web-scene": { write: false } } } })], g2.prototype, "univariateSymbolStyle", null), e([d({ type: v, value: null, json: { write: true, origins: { "web-scene": { write: false } } } })], g2.prototype, "univariateTheme", null), g2 = d4 = e([n2("esri.renderers.support.AuthoringInfo")], g2);
- var j3 = g2;
- // node_modules/@arcgis/core/renderers/Renderer.js
- var n6 = new s5({ simple: "simple", uniqueValue: "unique-value", classBreaks: "class-breaks", heatmap: "heatmap", dotDensity: "dot-density", dictionary: "dictionary", pieChart: "pie-chart" }, { ignoreUnknown: true });
- var a6 = class extends l {
- constructor(r4) {
- super(r4), this.authoringInfo = null, this.type = null;
- }
- async getRequiredFields(r4) {
- if (!this.collectRequiredFields)
- return [];
- const e3 = new Set();
- return await this.collectRequiredFields(e3, r4), Array.from(e3).sort();
- }
- getSymbol(r4, e3) {
- }
- async getSymbolAsync(r4, e3) {
- }
- getSymbols() {
- return [];
- }
- getAttributeHash() {
- return JSON.stringify(this);
- }
- getMeshHash() {
- return JSON.stringify(this);
- }
- };
- e([d({ type: j3, json: { write: true } })], a6.prototype, "authoringInfo", void 0), e([d({ type: n6.apiValues, readOnly: true, json: { type: n6.jsonValues, read: false, write: { writer: n6.write, ignoreOrigin: true } } })], a6.prototype, "type", void 0), a6 = e([n2("esri.renderers.Renderer")], a6);
- var p6 = a6;
- // node_modules/@arcgis/core/renderers/visualVariables/ColorVariable.js
- var i2;
- var p7 = i2 = class extends d2 {
- 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 i2({ 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([d({ readOnly: true })], p7.prototype, "cache", null), e([d({ type: ["color"], json: { type: ["colorInfo"] } })], p7.prototype, "type", void 0), e([d({ type: String, json: { write: true } })], p7.prototype, "normalizationField", void 0), e([d({ type: [a3], json: { write: true } })], p7.prototype, "stops", null), p7 = i2 = e([n2("esri.renderers.visualVariables.ColorVariable")], p7);
- var a7 = p7;
- // node_modules/@arcgis/core/renderers/visualVariables/support/OpacityStop.js
- var l3;
- var u3 = l3 = class extends l {
- constructor(r4) {
- super(r4), this.label = null, this.opacity = null, this.value = null;
- }
- readOpacity(r4, t4) {
- return r3(t4.transparency);
- }
- writeOpacity(r4, t4, o3) {
- t4[o3] = n3(r4);
- }
- clone() {
- return new l3({ label: this.label, opacity: this.opacity, value: this.value });
- }
- };
- e([d({ type: String, json: { write: true } })], u3.prototype, "label", void 0), e([d({ type: Number, json: { type: S, write: { target: "transparency" } } })], u3.prototype, "opacity", void 0), e([o("opacity", ["transparency"])], u3.prototype, "readOpacity", null), e([r("opacity")], u3.prototype, "writeOpacity", null), e([d({ type: Number, json: { write: true } })], u3.prototype, "value", void 0), u3 = l3 = e([n2("esri.renderers.visualVariables.support.OpacityStop")], u3);
- var y4 = u3;
- // node_modules/@arcgis/core/renderers/visualVariables/OpacityVariable.js
- var i3;
- var p8 = i3 = class extends d2 {
- 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 i3({ 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([d({ readOnly: true })], p8.prototype, "cache", null), e([d({ type: ["opacity"], json: { type: ["transparencyInfo"] } })], p8.prototype, "type", void 0), e([d({ type: String, json: { write: true } })], p8.prototype, "normalizationField", void 0), e([d({ type: [y4], json: { write: true } })], p8.prototype, "stops", null), p8 = i3 = e([n2("esri.renderers.visualVariables.OpacityVariable")], p8);
- var a8 = p8;
- // node_modules/@arcgis/core/renderers/visualVariables/RotationVariable.js
- var p9;
- var a9 = p9 = class extends d2 {
- constructor(e3) {
- super(e3), this.axis = null, this.type = "rotation", this.rotationType = "geographic", this.valueExpressionTitle = null;
- }
- get cache() {
- return { hasExpression: !!this.valueExpression, compiledFunc: null };
- }
- writeValueExpressionTitleWebScene(e3, s6, o3, r4) {
- if (r4 && r4.messages) {
- const e4 = `visualVariables[${this.index}]`;
- r4.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: e4 + ".valueExpressionTitle", context: r4 }));
- }
- }
- clone() {
- return new p9({ axis: this.axis, rotationType: this.rotationType, field: this.field, valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle, legendOptions: this.legendOptions && this.legendOptions.clone() });
- }
- };
- e([d({ readOnly: true })], a9.prototype, "cache", null), e([d({ type: ["heading", "tilt", "roll"], json: { origins: { "web-scene": { default: "heading", write: true } } } })], a9.prototype, "axis", void 0), e([d({ type: ["rotation"], json: { type: ["rotationInfo"] } })], a9.prototype, "type", void 0), e([d({ type: ["geographic", "arithmetic"], json: { write: true, origins: { "web-document": { write: true, default: "geographic" } } } })], a9.prototype, "rotationType", void 0), e([d({ type: String, json: { write: true } })], a9.prototype, "valueExpressionTitle", void 0), e([r("web-scene", "valueExpressionTitle")], a9.prototype, "writeValueExpressionTitleWebScene", null), a9 = p9 = e([n2("esri.renderers.visualVariables.RotationVariable")], a9);
- var n7 = a9;
- // node_modules/@arcgis/core/renderers/visualVariables/VisualVariableFactory.js
- var u4 = s.getLogger("esri.renderers.visualVariables.VisualVariableFactory");
- var b5 = { color: a7, size: j2, opacity: a8, rotation: n7 };
- var V = new s5({ colorInfo: "color", transparencyInfo: "opacity", rotationInfo: "rotation", sizeInfo: "size" });
- var h3 = /^\[([^\]]+)\]$/i;
- var m7 = class extends y {
- constructor() {
- super(...arguments), this.colorVariables = null, this.opacityVariables = null, this.rotationVariables = null, this.sizeVariables = null;
- }
- set visualVariables(r4) {
- if (this._resetVariables(), (r4 = r4 && r4.filter((r5) => !!r5)) && r4.length) {
- for (const s6 of r4)
- 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((r5) => !!r5.target) && r4.sort((r5, s6) => {
- let e3 = null;
- return e3 = r5.target === s6.target ? 0 : r5.target ? 1 : -1, e3;
- });
- }
- for (let s6 = 0; s6 < r4.length; s6++) {
- r4[s6].index = s6;
- }
- this._set("visualVariables", r4);
- } else
- this._set("visualVariables", r4);
- }
- readVariables(r4, s6, e3) {
- const { rotationExpression: a11, rotationType: t4 } = s6, i5 = a11 && a11.match(h3), l7 = i5 && i5[1];
- if (l7 && (r4 || (r4 = []), r4.push({ type: "rotationInfo", rotationType: t4, field: l7 })), r4)
- return r4.map((r5) => {
- const s7 = V.read(r5.type), a12 = b5[s7];
- a12 || (u4.warn(`Unknown variable type: ${s7}`), e3 && e3.messages && e3.messages.push(new t2("visual-variable:unsupported", `visualVariable of type '${s7}' is not supported`, { definition: r5, context: e3 })));
- const t5 = new a12();
- return t5.read(r5, e3), t5;
- });
- }
- writeVariables(r4, s6) {
- const e3 = [];
- for (const a11 of r4) {
- const r5 = a11.toJSON(s6);
- r5 && e3.push(r5);
- }
- return e3;
- }
- _resetVariables() {
- this.colorVariables = [], this.opacityVariables = [], this.rotationVariables = [], this.sizeVariables = [];
- }
- };
- e([d()], m7.prototype, "visualVariables", null), m7 = e([n2("esri.renderers.visualVariables.VisualVariableFactory")], m7);
- var f2 = m7;
- // node_modules/@arcgis/core/renderers/mixins/VisualVariablesMixin.js
- var b6 = { base: d2, key: "type", typeMap: { opacity: a8, color: a7, rotation: n7, size: j2 } };
- var v2 = (l7) => {
- let u5 = class extends l7 {
- constructor() {
- super(...arguments), this._vvFactory = new f2();
- }
- set visualVariables(r4) {
- this._vvFactory.visualVariables = r4, this._set("visualVariables", this._vvFactory.visualVariables);
- }
- readVisualVariables(r4, a11, s6) {
- return this._vvFactory.readVariables(r4, a11, s6);
- }
- writeVisualVariables(r4, a11, s6, i5) {
- a11[s6] = this._vvFactory.writeVariables(r4, i5);
- }
- get arcadeRequiredForVisualVariables() {
- if (!this.visualVariables)
- return false;
- for (const r4 of this.visualVariables)
- if (r4.arcadeRequired)
- return true;
- return false;
- }
- hasVisualVariables(r4, a11) {
- return r4 ? this.getVisualVariablesForType(r4, a11).length > 0 : this.getVisualVariablesForType("size", a11).length > 0 || this.getVisualVariablesForType("color", a11).length > 0 || this.getVisualVariablesForType("opacity", a11).length > 0 || this.getVisualVariablesForType("rotation", a11).length > 0;
- }
- getVisualVariablesForType(r4, a11) {
- const s6 = this.visualVariables;
- return s6 ? s6.filter((s7) => s7.type === r4 && (typeof a11 == "string" ? s7.target === a11 : a11 !== false || !s7.target)) : [];
- }
- async collectVVRequiredFields(r4, a11) {
- let s6 = [];
- this.visualVariables && (s6 = s6.concat(this.visualVariables));
- for (const i5 of s6)
- i5 && (i5.field && F(r4, a11, i5.field), i5.normalizationField && F(r4, a11, i5.normalizationField), i5.valueExpression && await b3(r4, a11, i5.valueExpression));
- }
- };
- return e([d({ types: [b6], value: null, json: { write: true } })], u5.prototype, "visualVariables", null), e([o("visualVariables", ["visualVariables", "rotationType", "rotationExpression"])], u5.prototype, "readVisualVariables", null), e([r("visualVariables")], u5.prototype, "writeVisualVariables", null), u5 = e([n2("esri.renderers.mixins.VisualVariablesMixin")], u5), u5;
- };
- // 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: S2, write: { writer: m4 } } } } };
- // node_modules/@arcgis/core/renderers/support/ClassBreakInfo.js
- var i4;
- var l5 = i4 = 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 i4({ 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([d({ type: String, json: { write: true } })], l5.prototype, "description", void 0), e([d({ type: String, json: { write: true } })], l5.prototype, "label", void 0), e([d({ type: Number, json: { read: { source: "classMinValue" }, write: { target: "classMinValue" } } })], l5.prototype, "minValue", void 0), e([d({ type: Number, json: { read: { source: "classMaxValue" }, write: { target: "classMaxValue" } } })], l5.prototype, "maxValue", void 0), e([d(l4)], l5.prototype, "symbol", void 0), l5 = i4 = e([n2("esri.renderers.support.ClassBreakInfo")], l5);
- var a10 = l5;
- // node_modules/@arcgis/core/renderers/ClassBreaksRenderer.js
- var F2;
- var E = s.getLogger("esri.renderers.ClassBreaksRenderer");
- var j4 = "log";
- var w2 = "percent-of-total";
- var z = "field";
- var T = new s5({ esriNormalizeByLog: j4, esriNormalizeByPercentOfTotal: w2, esriNormalizeByField: z });
- var _ = b(a10);
- var C = F2 = class extends v2(p6) {
- constructor(e3) {
- super(e3), 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(e3, s6, t4) {
- if (!Array.isArray(e3))
- return;
- let o3 = s6.minValue;
- return e3.map((e4) => {
- const s7 = new a10();
- return s7.read(e4, t4), s7.minValue == null && (s7.minValue = o3), s7.maxValue == null && (s7.maxValue = s7.minValue), o3 = s7.maxValue, s7;
- });
- }
- writeClassBreakInfos(e3, s6, t4, o3) {
- const r4 = e3.map((e4) => e4.write({}, o3));
- this._areClassBreaksConsecutive() && r4.forEach((e4) => delete e4.classMinValue), s6[t4] = r4;
- }
- castField(e3) {
- return e3 == null ? e3 : typeof e3 == "function" ? (E.error(".field: field must be a string value"), null) : u(e3);
- }
- get minValue() {
- return this.classBreakInfos && this.classBreakInfos[0] && this.classBreakInfos[0].minValue || 0;
- }
- get normalizationType() {
- let e3 = this._get("normalizationType");
- const s6 = !!this.normalizationField, t4 = this.normalizationTotal != null;
- return s6 || t4 ? (e3 = s6 && z || t4 && w2 || null, s6 && t4 && E.warn("warning: both normalizationField and normalizationTotal are set!")) : e3 !== z && e3 !== w2 || (e3 = null), e3;
- }
- set normalizationType(e3) {
- this._set("normalizationType", e3);
- }
- addClassBreakInfo(e3, t4, r4) {
- let i5 = null;
- i5 = typeof e3 == "number" ? new a10({ minValue: e3, maxValue: t4, symbol: g(r4) }) : _(m(e3)), this.classBreakInfos.push(i5), this.classBreakInfos.length === 1 && this.notifyChange("minValue");
- }
- removeClassBreakInfo(e3, s6) {
- const t4 = this.classBreakInfos.length;
- for (let o3 = 0; o3 < t4; o3++) {
- const t5 = [this.classBreakInfos[o3].minValue, this.classBreakInfos[o3].maxValue];
- if (t5[0] === e3 && t5[1] === s6) {
- this.classBreakInfos.splice(o3, 1);
- break;
- }
- }
- }
- getBreakIndex(e3, s6) {
- return this.valueExpression && (t(s6) || t(s6.arcade)) && E.warn(""), this.valueExpression ? this._getBreakIndexForExpression(e3, s6) : this._getBreakIndexForField(e3);
- }
- async getClassBreakInfo(e3, s6) {
- let t4 = s6;
- this.valueExpression && (t(s6) || t(s6.arcade)) && (t4 = { ...t4, arcade: await a4() });
- const o3 = this.getBreakIndex(e3, t4);
- return o3 !== -1 ? this.classBreakInfos[o3] : null;
- }
- getSymbol(e3, s6) {
- if (this.valueExpression && (t(s6) || t(s6.arcade)))
- return void E.error("#getSymbol()", "Please use getSymbolAsync if valueExpression is used");
- const t4 = this.getBreakIndex(e3, s6);
- return t4 > -1 ? this.classBreakInfos[t4].symbol : this.defaultSymbol;
- }
- async getSymbolAsync(e3, s6) {
- let t4 = s6;
- if (this.valueExpression && (t(s6) || t(s6.arcade))) {
- const e4 = await a4(), { arcadeUtils: s7 } = e4;
- s7.hasGeometryOperations(this.valueExpression) && await s7.enableGeometryOperations(), t4 = { ...t4, arcade: e4 };
- }
- const o3 = this.getBreakIndex(e3, t4);
- return o3 > -1 ? this.classBreakInfos[o3].symbol : this.defaultSymbol;
- }
- getSymbols() {
- const e3 = [];
- return this.classBreakInfos.forEach((s6) => {
- s6.symbol && e3.push(s6.symbol);
- }), this.defaultSymbol && e3.push(this.defaultSymbol), e3;
- }
- getAttributeHash() {
- return this.visualVariables && this.visualVariables.reduce((e3, s6) => e3 + s6.getAttributeHash(), "");
- }
- getMeshHash() {
- const e3 = JSON.stringify(this.backgroundFillSymbol), s6 = JSON.stringify(this.defaultSymbol), t4 = `${this.normalizationField}.${this.normalizationType}.${this.normalizationTotal}`;
- return `${e3}.${s6}.${this.classBreakInfos.reduce((e4, s7) => e4 + s7.getMeshHash(), "")}.${t4}.${this.field}.${this.valueExpression}`;
- }
- get arcadeRequired() {
- return this.arcadeRequiredForVisualVariables || !!this.valueExpression;
- }
- clone() {
- return new F2({ 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: m(this.classBreakInfos), isMaxInclusive: this.isMaxInclusive, normalizationField: this.normalizationField, normalizationTotal: this.normalizationTotal, normalizationType: this.normalizationType, visualVariables: m(this.visualVariables), legendOptions: m(this.legendOptions), authoringInfo: this.authoringInfo && this.authoringInfo.clone() });
- }
- async collectRequiredFields(e3, s6) {
- const t4 = [this.collectVVRequiredFields(e3, s6), this.collectSymbolFields(e3, s6)];
- await Promise.all(t4);
- }
- async collectSymbolFields(e3, s6) {
- const t4 = [...this.getSymbols().map((t5) => t5.collectRequiredFields(e3, s6)), b3(e3, s6, this.valueExpression)];
- F(e3, s6, this.field), F(e3, s6, this.normalizationField), await Promise.all(t4);
- }
- _getBreakIndexForExpression(e3, s6) {
- const { viewingMode: t4, scale: o3, spatialReference: r4, arcade: i5 } = c(s6, {});
- let n9 = this._compiledValueExpression.valueExpression === this.valueExpression ? this._compiledValueExpression.compiledFunction : null;
- const u5 = e2(i5).arcadeUtils;
- if (!n9) {
- const e4 = u5.createSyntaxTree(this.valueExpression);
- n9 = u5.createFunction(e4), this._compiledValueExpression.compiledFunction = n9;
- }
- this._compiledValueExpression.valueExpression = this.valueExpression;
- const c5 = u5.executeFunction(n9, u5.createExecContext(e3, u5.getViewInfo({ viewingMode: t4, scale: o3, spatialReference: r4 })));
- return this._getBreakIndexfromInfos(c5);
- }
- _getBreakIndexForField(e3) {
- const s6 = this.field, t4 = e3.attributes, o3 = this.normalizationType;
- let r4 = parseFloat(t4[s6]);
- if (o3) {
- const e4 = this.normalizationTotal, s7 = parseFloat(t4[this.normalizationField]);
- if (o3 === j4)
- r4 = Math.log(r4) * Math.LOG10E;
- else if (o3 !== w2 || isNaN(e4)) {
- if (o3 === z && !isNaN(s7)) {
- if (isNaN(r4) || isNaN(s7))
- return -1;
- r4 /= s7;
- }
- } else
- r4 = r4 / e4 * 100;
- }
- return this._getBreakIndexfromInfos(r4);
- }
- _getBreakIndexfromInfos(e3) {
- const s6 = this.isMaxInclusive;
- if (e3 != null && typeof e3 == "number" && !isNaN(e3))
- for (let t4 = 0; t4 < this.classBreakInfos.length; t4++) {
- const o3 = [this.classBreakInfos[t4].minValue, this.classBreakInfos[t4].maxValue];
- if (o3[0] <= e3 && (s6 ? e3 <= o3[1] : e3 < o3[1]))
- return t4;
- }
- return -1;
- }
- _areClassBreaksConsecutive() {
- const e3 = this.classBreakInfos, s6 = e3.length;
- for (let t4 = 1; t4 < s6; t4++)
- if (e3[t4 - 1].maxValue !== e3[t4].minValue)
- return false;
- return true;
- }
- };
- e([d(y5)], C.prototype, "backgroundFillSymbol", void 0), e([d({ type: [a10] })], C.prototype, "classBreakInfos", void 0), e([o("classBreakInfos")], C.prototype, "readClassBreakInfos", null), e([r("classBreakInfos")], C.prototype, "writeClassBreakInfos", null), e([d({ type: String, json: { write: true } })], C.prototype, "defaultLabel", void 0), e([d(l4)], C.prototype, "defaultSymbol", void 0), e([d({ type: String, json: { write: true } })], C.prototype, "field", void 0), e([s4("field")], C.prototype, "castField", null), e([d({ type: Boolean })], C.prototype, "isMaxInclusive", void 0), e([d({ type: p2, json: { write: true } })], C.prototype, "legendOptions", void 0), e([d({ type: Number, readOnly: true, value: null, json: { read: false, write: { overridePolicy() {
- return this.classBreakInfos.length !== 0 && this._areClassBreaksConsecutive() ? { enabled: true } : { enabled: false };
- } } } })], C.prototype, "minValue", null), e([d({ type: String, json: { write: true } })], C.prototype, "normalizationField", void 0), e([d({ type: Number, cast: (e3) => a(e3), json: { write: true } })], C.prototype, "normalizationTotal", void 0), e([d({ type: T.apiValues, value: null, json: { type: T.jsonValues, read: T.read, write: T.write } })], C.prototype, "normalizationType", null), e([r2({ classBreaks: "class-breaks" })], C.prototype, "type", void 0), e([d({ type: String, json: { write: true } })], C.prototype, "valueExpression", void 0), e([d({ type: String, json: { write: true } })], C.prototype, "valueExpressionTitle", void 0), C = F2 = e([n2("esri.renderers.ClassBreaksRenderer")], C);
- var N = C;
- // node_modules/@arcgis/core/renderers/support/UniqueValueInfo.js
- var l6;
- var p10 = l6 = class extends l {
- constructor(o3) {
- super(o3), this.description = null, this.label = null, this.symbol = null, this.value = null;
- }
- castValue(o3) {
- return o3 == null || typeof o3 == "string" || typeof o3 == "number" ? o3 : `${o3}`;
- }
- clone() {
- return new l6({ value: this.value, description: this.description, label: this.label, symbol: this.symbol ? this.symbol.clone() : null });
- }
- getMeshHash() {
- const o3 = JSON.stringify(this.symbol && this.symbol.toJSON());
- return `${this.value}.${o3}`;
- }
- };
- e([d({ type: String, json: { write: true } })], p10.prototype, "description", void 0), e([d({ type: String, json: { write: true } })], p10.prototype, "label", void 0), e([d(l4)], p10.prototype, "symbol", void 0), e([d({ json: { type: String, write: { writer: (o3, t4) => {
- t4.value = o3?.toString();
- } } } })], p10.prototype, "value", void 0), e([s4("value")], p10.prototype, "castValue", null), p10 = l6 = e([n2("esri.renderers.support.UniqueValueInfo")], p10);
- var n8 = p10;
- // node_modules/@arcgis/core/renderers/UniqueValueRenderer.js
- var E2;
- var M2 = s.getLogger("esri.renderers.UniqueValueRenderer");
- var N2 = b(n8);
- var R = E2 = class extends v2(p6) {
- constructor(e3) {
- super(e3), this._valueInfoMap = {}, this._isDefaultSymbolDerived = false, this.type = "unique-value", this.backgroundFillSymbol = null, this.field = null, this.field2 = null, this.field3 = null, this.valueExpression = null, this.valueExpressionTitle = null, this.legendOptions = null, this.defaultLabel = null, this.fieldDelimiter = null, this.portal = null, this.styleOrigin = null, this.diff = { uniqueValueInfos(e4, t4) {
- if (!e4 && !t4)
- return;
- if (!e4 || !t4)
- return { type: "complete", oldValue: e4, newValue: t4 };
- let i5 = false;
- const r4 = { type: "collection", added: [], removed: [], changed: [], unchanged: [] };
- for (let s6 = 0; s6 < t4.length; s6++) {
- const l7 = e4.find((e5) => e5.value === t4[s6].value);
- l7 ? m3(l7, t4[s6]) ? (r4.changed.push({ type: "complete", oldValue: l7, newValue: t4[s6] }), i5 = true) : r4.unchanged.push({ oldValue: l7, newValue: t4[s6] }) : (r4.added.push(t4[s6]), i5 = true);
- }
- for (let s6 = 0; s6 < e4.length; s6++) {
- t4.find((t5) => t5.value === e4[s6].value) || (r4.removed.push(e4[s6]), i5 = true);
- }
- return i5 ? r4 : void 0;
- } }, this._set("uniqueValueInfos", []);
- }
- get _cache() {
- return { compiledFunc: null };
- }
- castField(e3) {
- return e3 == null || typeof e3 == "function" ? e3 : u(e3);
- }
- writeField(e3, t4, r4, s6) {
- typeof e3 == "string" ? t4[r4] = e3 : s6 && s6.messages ? s6.messages.push(new s2("property:unsupported", "UniqueValueRenderer.field set to a function cannot be written to JSON")) : M2.error(".field: cannot write field to JSON since it's not a string value");
- }
- set defaultSymbol(e3) {
- this._isDefaultSymbolDerived = false, this._set("defaultSymbol", e3);
- }
- readPortal(e3, t4, i5) {
- return i5.portal || B.getDefault();
- }
- readStyleOrigin(e3, t4, i5) {
- if (t4.styleName)
- return Object.freeze({ styleName: t4.styleName });
- if (t4.styleUrl) {
- const e4 = i(t4.styleUrl, i5);
- return Object.freeze({ styleUrl: e4 });
- }
- }
- writeStyleOrigin(e3, t4, i5, r4) {
- e3.styleName ? t4.styleName = e3.styleName : e3.styleUrl && (t4.styleUrl = c2(e3.styleUrl, r4));
- }
- set uniqueValueInfos(e3) {
- this.styleOrigin ? M2.error("#uniqueValueInfos=", "Cannot modify unique value infos of a UniqueValueRenderer created from a web style") : (this._set("uniqueValueInfos", e3), this._updateValueInfoMap());
- }
- addUniqueValueInfo(e3, i5) {
- if (this.styleOrigin)
- return void M2.error("#addUniqueValueInfo()", "Cannot modify unique value infos of a UniqueValueRenderer created from a web style");
- let r4;
- r4 = typeof e3 == "object" ? N2(e3) : new n8({ value: e3, symbol: g(i5) }), this.uniqueValueInfos.push(r4), this._valueInfoMap[r4.value] = r4;
- }
- removeUniqueValueInfo(e3) {
- if (this.styleOrigin)
- M2.error("#removeUniqueValueInfo()", "Cannot modify unique value infos of a UniqueValueRenderer created from a web style");
- else
- for (let t4 = 0; t4 < this.uniqueValueInfos.length; t4++) {
- if (this.uniqueValueInfos[t4].value === e3 + "") {
- delete this._valueInfoMap[e3], this.uniqueValueInfos.splice(t4, 1);
- break;
- }
- }
- }
- async getUniqueValueInfo(e3, t4) {
- let i5 = t4;
- return this.valueExpression && (t(t4) || t(t4.arcade)) && (i5 = { ...i5, arcade: await a4() }), this._getUniqueValueInfo(e3, i5);
- }
- getSymbol(e3, t4) {
- if (this.valueExpression && (t(t4) || t(t4.arcade)))
- return void M2.error("#getSymbol()", "Please use getSymbolAsync if valueExpression is used");
- const i5 = this._getUniqueValueInfo(e3, t4);
- return i5 && i5.symbol || this.defaultSymbol;
- }
- async getSymbolAsync(e3, t4) {
- let i5 = t4;
- if (this.valueExpression && (t(i5) || t(i5.arcade))) {
- const e4 = await a4(), { arcadeUtils: t5 } = e4;
- t5.hasGeometryOperations(this.valueExpression) && await t5.enableGeometryOperations(), i5 = { ...i5, arcade: e4 };
- }
- const r4 = this._getUniqueValueInfo(e3, i5);
- return r4 && r4.symbol || this.defaultSymbol;
- }
- getSymbols() {
- const e3 = [];
- for (const t4 of this.uniqueValueInfos)
- t4.symbol && e3.push(t4.symbol);
- return this.defaultSymbol && e3.push(this.defaultSymbol), e3;
- }
- getAttributeHash() {
- return this.visualVariables && this.visualVariables.reduce((e3, t4) => e3 + t4.getAttributeHash(), "");
- }
- getMeshHash() {
- return `${JSON.stringify(this.backgroundFillSymbol)}.${JSON.stringify(this.defaultSymbol)}.${this.uniqueValueInfos.reduce((e3, t4) => e3 + t4.getMeshHash(), "")}.${`${this.field}.${this.field2}.${this.field3}.${this.fieldDelimiter}`}.${this.valueExpression}`;
- }
- clone() {
- const e3 = new E2({ field: this.field, field2: this.field2, field3: this.field3, defaultLabel: this.defaultLabel, defaultSymbol: m(this.defaultSymbol), valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle, fieldDelimiter: this.fieldDelimiter, visualVariables: m(this.visualVariables), legendOptions: m(this.legendOptions), authoringInfo: this.authoringInfo && this.authoringInfo.clone(), backgroundFillSymbol: m(this.backgroundFillSymbol) });
- this._isDefaultSymbolDerived && (e3._isDefaultSymbolDerived = true), e3._set("portal", this.portal);
- const t4 = m(this.uniqueValueInfos);
- return this.styleOrigin && (e3._set("styleOrigin", Object.freeze(m(this.styleOrigin))), Object.freeze(t4)), e3._set("uniqueValueInfos", t4), e3._updateValueInfoMap(), e3;
- }
- get arcadeRequired() {
- return this.arcadeRequiredForVisualVariables || !!this.valueExpression;
- }
- async collectRequiredFields(e3, t4) {
- const i5 = [this.collectVVRequiredFields(e3, t4), this.collectSymbolFields(e3, t4)];
- await Promise.all(i5);
- }
- async collectSymbolFields(e3, t4) {
- const i5 = [...this.getSymbols().map((i6) => i6.collectRequiredFields(e3, t4)), b3(e3, t4, this.valueExpression)];
- F(e3, t4, this.field), F(e3, t4, this.field2), F(e3, t4, this.field3), await Promise.all(i5);
- }
- populateFromStyle() {
- return c3(this.styleOrigin, { portal: this.portal }).then((e3) => {
- const t4 = [];
- return this._valueInfoMap = {}, e3 && e3.data && Array.isArray(e3.data.items) && e3.data.items.forEach((i5) => {
- const r4 = new b2({ styleUrl: e3.styleUrl, styleName: e3.styleName, portal: this.portal, name: i5.name });
- this.defaultSymbol || i5.name !== e3.data.defaultItem || (this.defaultSymbol = r4, this._isDefaultSymbolDerived = true);
- const s6 = new n8({ value: i5.name, symbol: r4 });
- t4.push(s6), this._valueInfoMap[i5.name] = s6;
- }), this._set("uniqueValueInfos", Object.freeze(t4)), !this.defaultSymbol && this.uniqueValueInfos.length && (this.defaultSymbol = this.uniqueValueInfos[0].symbol, this._isDefaultSymbolDerived = true), this;
- });
- }
- _updateValueInfoMap() {
- this._valueInfoMap = {}, this.uniqueValueInfos.forEach((e3) => this._valueInfoMap[e3.value + ""] = e3);
- }
- _getUniqueValueInfo(e3, t4) {
- return this.valueExpression ? this._getUnqiueValueInfoForExpression(e3, t4) : this._getUnqiueValueInfoForFields(e3);
- }
- _getUnqiueValueInfoForExpression(e3, t4) {
- const { viewingMode: i5, scale: r4, spatialReference: s6, arcade: l7 } = c(t4, {});
- let a11 = this._cache.compiledFunc;
- const u5 = e2(l7).arcadeUtils;
- if (!a11) {
- const e4 = u5.createSyntaxTree(this.valueExpression);
- a11 = u5.createFunction(e4), this._cache.compiledFunc = a11;
- }
- const p11 = u5.executeFunction(a11, u5.createExecContext(e3, u5.getViewInfo({ viewingMode: i5, scale: r4, spatialReference: s6 })));
- return this._valueInfoMap[p11 + ""];
- }
- _getUnqiueValueInfoForFields(e3) {
- const t4 = this.field, i5 = e3.attributes;
- let r4;
- if (typeof t4 != "function" && this.field2) {
- const e4 = this.field2, s6 = this.field3, l7 = [];
- t4 && l7.push(i5[t4]), e4 && l7.push(i5[e4]), s6 && l7.push(i5[s6]), r4 = l7.join(this.fieldDelimiter || "");
- } else
- typeof t4 == "function" ? r4 = t4(e3) : t4 && (r4 = i5[t4]);
- return this._valueInfoMap[r4 + ""];
- }
- static fromPortalStyle(e3, t4) {
- const i5 = new E2(t4 && t4.properties);
- i5._set("styleOrigin", Object.freeze({ styleName: e3 })), i5._set("portal", t4 && t4.portal || B.getDefault());
- const r4 = i5.populateFromStyle();
- return r4.catch((t5) => {
- M2.error(`#fromPortalStyle('${e3}'[, ...])`, "Failed to create unique value renderer from style name", t5);
- }), r4;
- }
- static fromStyleUrl(e3, t4) {
- const i5 = new E2(t4 && t4.properties);
- i5._set("styleOrigin", Object.freeze({ styleUrl: e3 }));
- const r4 = i5.populateFromStyle();
- return r4.catch((t5) => {
- M2.error(`#fromStyleUrl('${e3}'[, ...])`, "Failed to create unique value renderer from style URL", t5);
- }), r4;
- }
- };
- e([d({ readOnly: true })], R.prototype, "_cache", null), e([r2({ uniqueValue: "unique-value" })], R.prototype, "type", void 0), e([d(y5)], R.prototype, "backgroundFillSymbol", void 0), e([d({ json: { type: String, read: { source: "field1" }, write: { target: "field1" } } })], R.prototype, "field", void 0), e([s4("field")], R.prototype, "castField", null), e([r("field")], R.prototype, "writeField", null), e([d({ type: String, json: { write: true } })], R.prototype, "field2", void 0), e([d({ type: String, json: { write: true } })], R.prototype, "field3", void 0), e([d({ type: String, json: { write: true } })], R.prototype, "valueExpression", void 0), e([d({ type: String, json: { write: true } })], R.prototype, "valueExpressionTitle", void 0), e([d({ type: p2, json: { write: true } })], R.prototype, "legendOptions", void 0), e([d({ type: String, json: { write: true } })], R.prototype, "defaultLabel", void 0), e([d(n({ ...l4 }, { json: { write: { overridePolicy() {
- return { enabled: !this._isDefaultSymbolDerived };
- } }, origins: { "web-scene": { write: { overridePolicy() {
- return { enabled: !this._isDefaultSymbolDerived };
- } } } } } }))], R.prototype, "defaultSymbol", null), e([d({ type: String, json: { write: true } })], R.prototype, "fieldDelimiter", void 0), e([d({ type: B, readOnly: true })], R.prototype, "portal", void 0), e([o("portal", ["styleName"])], R.prototype, "readPortal", null), e([d({ readOnly: true, json: { write: { enabled: false, overridePolicy: () => ({ enabled: true }) } } })], R.prototype, "styleOrigin", void 0), e([o("styleOrigin", ["styleName", "styleUrl"])], R.prototype, "readStyleOrigin", null), e([r("styleOrigin", { styleName: { type: String }, styleUrl: { type: String } })], R.prototype, "writeStyleOrigin", null), e([d({ type: [n8], json: { write: { overridePolicy() {
- return this.styleOrigin ? { enabled: false } : { enabled: true };
- } } } })], R.prototype, "uniqueValueInfos", null), R = E2 = e([n2("esri.renderers.UniqueValueRenderer")], R);
- var P = R;
- // node_modules/@arcgis/core/core/accessorSupport/decorators/aliasOf.js
- function o2(o3, t4) {
- const e3 = t4 ? { ...t4, source: o3 } : o3;
- return d({ aliasOf: e3 });
- }
- export {
- j3 as j,
- p6 as p,
- n7 as n,
- v2 as v,
- l4 as l,
- a10 as a,
- N,
- o2 as o,
- n8 as n2,
- P
- };
- //# sourceMappingURL=chunk-FUD7XO3N.js.map
|