{"version":3,"sources":["node_modules/@arcgis/core/renderers/visualVariables/support/visualVariableUtils.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport e from \"../../../Color.js\";\nimport a from \"../../../Graphic.js\";\nimport { neverReached as i } from \"../../../core/compilerUtils.js\";\nimport n from \"../../../core/Logger.js\";\nimport { meterIn as t } from \"../../support/lengthUtils.js\";\nimport { isSizeVariable as r, isValidNumber as s, TransformationType as l, InputValueType as o } from \"./sizeVariableUtils.js\";\nconst c = () => n.getLogger(\"esri.renderers.visualVariables.support.visualVariableUtils\"),\n u = e => c().warn(`The visualVariable should be an instance of esri.renderers.visualVariables.${e}`),\n f = () => c().error(\"Use of arcade expressions requires an arcade context\"),\n p = new a(),\n d = Math.PI,\n v = /^\\s*(return\\s+)?\\$view\\.scale\\s*(;)?\\s*$/i;\nfunction m(a, i, n) {\n const t = \"visualVariables\" in a && a.visualVariables ? a.visualVariables.find(e => \"color\" === e.type) : a;\n if (!t) return;\n if (\"esri.renderers.visualVariables.ColorVariable\" !== t.declaredClass) return void u(\"ColorVariable\");\n const r = \"number\" == typeof i,\n s = r ? null : i,\n l = s?.attributes;\n let o = r ? i : null;\n const c = t.field,\n {\n ipData: p,\n hasExpression: d\n } = t.cache;\n let v = t.cache.compiledFunc;\n if (!c && !d) {\n const e = t.stops;\n return e && e[0] && e[0].color;\n }\n if (\"number\" != typeof o) if (d) {\n if (null == n?.arcade) return void f();\n const e = {\n viewingMode: n.viewingMode,\n scale: n.scale,\n spatialReference: n.spatialReference\n },\n a = n.arcade.arcadeUtils,\n i = a.getViewInfo(e),\n r = a.createExecContext(s, i, n.timeZone);\n if (!v) {\n const e = a.createSyntaxTree(t.valueExpression);\n v = a.createFunction(e), t.cache.compiledFunc = v;\n }\n o = a.executeFunction(v, r);\n } else l && (o = l[c]);\n const m = t.normalizationField,\n b = null != l && null != m ? parseFloat(l[m]) : void 0;\n if (null != o && (!m || r || !isNaN(b) && 0 !== b)) {\n isNaN(b) || r || (o /= b);\n const a = U(o, p);\n if (a) {\n const i = a[0],\n r = a[1],\n s = i === r ? t.stops[i].color : e.blendColors(t.stops[i].color, t.stops[r].color, a[2], null != n ? n.color : void 0);\n return new e(s);\n }\n }\n}\nfunction b(e, a, i) {\n const n = \"visualVariables\" in e && e.visualVariables ? e.visualVariables.find(e => \"opacity\" === e.type) : e;\n if (!n) return;\n if (\"esri.renderers.visualVariables.OpacityVariable\" !== n.declaredClass) return void u(\"OpacityVariable\");\n const t = \"number\" == typeof a,\n r = t ? null : a,\n s = r?.attributes;\n let l = t ? a : null;\n const o = n.field,\n {\n ipData: c,\n hasExpression: p\n } = n.cache;\n let d = n.cache.compiledFunc;\n if (!o && !p) {\n const e = n.stops;\n return e && e[0] && e[0].opacity;\n }\n if (\"number\" != typeof l) if (p) {\n if (null == i?.arcade) return void f();\n const e = {\n viewingMode: i.viewingMode,\n scale: i.scale,\n spatialReference: i.spatialReference\n },\n a = i.arcade.arcadeUtils,\n t = a.getViewInfo(e),\n s = a.createExecContext(r, t, i.timeZone);\n if (!d) {\n const e = a.createSyntaxTree(n.valueExpression);\n d = a.createFunction(e), n.cache.compiledFunc = d;\n }\n l = a.executeFunction(d, s);\n } else s && (l = s[o]);\n const v = n.normalizationField,\n m = null != s && null != v ? parseFloat(s[v]) : void 0;\n if (null != l && (!v || t || !isNaN(m) && 0 !== m)) {\n isNaN(m) || t || (l /= m);\n const e = U(l, c);\n if (e) {\n const a = e[0],\n i = e[1];\n if (a === i) return n.stops[a].opacity;\n {\n const t = n.stops[a].opacity;\n return t + (n.stops[i].opacity - t) * e[2];\n }\n }\n }\n}\nfunction h(e, a, i) {\n const n = \"visualVariables\" in e && e.visualVariables ? e.visualVariables.find(e => \"rotation\" === e.type) : e;\n if (!n) return;\n if (\"esri.renderers.visualVariables.RotationVariable\" !== n.declaredClass) return void u(\"RotationVariable\");\n const t = n.axis || \"heading\",\n r = \"heading\" === t && \"arithmetic\" === n.rotationType ? 90 : 0,\n s = \"heading\" === t && \"arithmetic\" === n.rotationType ? -1 : 1,\n l = \"number\" == typeof a ? null : a,\n o = l?.attributes,\n c = n.field,\n {\n hasExpression: p\n } = n.cache;\n let d = n.cache.compiledFunc,\n v = 0;\n if (!c && !p) return v;\n if (p) {\n if (null == i?.arcade) return void f();\n const e = {\n viewingMode: i.viewingMode,\n scale: i.scale,\n spatialReference: i.spatialReference\n },\n a = i.arcade.arcadeUtils,\n t = a.getViewInfo(e),\n r = a.createExecContext(l, t, i.timeZone);\n if (!d) {\n const e = a.createSyntaxTree(n.valueExpression);\n d = a.createFunction(e), n.cache.compiledFunc = d;\n }\n v = a.executeFunction(d, r);\n } else o && (v = o[c] || 0);\n return v = \"number\" != typeof v || isNaN(v) ? null : r + s * v, v;\n}\nfunction V(e, a, i) {\n const n = \"number\" == typeof a,\n t = n ? null : a,\n r = t?.attributes;\n let l = n ? a : null;\n const {\n isScaleDriven: c\n } = e.cache;\n let u = e.cache.compiledFunc;\n if (c) {\n const a = null != i ? i.scale : void 0,\n n = null != i ? i.view : void 0;\n l = null == a || \"3d\" === n ? x(e) : a;\n } else if (!n) switch (e.inputValueType) {\n case o.Expression:\n {\n if (null == i?.arcade) return void f();\n const a = {\n viewingMode: i.viewingMode,\n scale: i.scale,\n spatialReference: i.spatialReference\n },\n n = i.arcade.arcadeUtils,\n r = n.getViewInfo(a),\n s = n.createExecContext(t, r, i.timeZone);\n if (!u) {\n const a = n.createSyntaxTree(e.valueExpression);\n u = n.createFunction(a), e.cache.compiledFunc = u;\n }\n l = n.executeFunction(u, s);\n break;\n }\n case o.Field:\n r && (l = r[e.field]);\n break;\n case o.Unknown:\n l = null;\n }\n if (!s(l)) return null;\n if (n || !e.normalizationField) return l;\n const p = r ? parseFloat(r[e.normalizationField]) : null;\n return s(p) && 0 !== p ? l / p : null;\n}\nfunction x(e) {\n let a = null,\n i = null;\n const n = e.stops;\n return n ? (a = n[0].value, i = n[n.length - 1].value) : (a = e.minDataValue || 0, i = e.maxDataValue || 0), (a + i) / 2;\n}\nfunction y(e, a, i) {\n const n = \"visualVariables\" in e && e.visualVariables ? e.visualVariables.find(e => \"size\" === e.type) : e;\n if (!n) return;\n if (\"esri.renderers.visualVariables.SizeVariable\" !== n.declaredClass) return void u(\"SizeVariable\");\n const t = k(V(n, a, i), n, a, i, n.cache.ipData);\n return null == t || isNaN(t) ? 0 : t;\n}\nfunction g(e, a, i) {\n return null == e ? null : r(e) ? y(e, a, i) : s(e) ? e : null;\n}\nfunction w(e, a, i) {\n return s(i) && e > i ? i : s(a) && e < a ? a : e;\n}\nfunction z(e, a, i, n) {\n return e + ((g(a.minSize, i, n) || a.minDataValue) ?? 0);\n}\nfunction F(e, a, i) {\n const n = e.stops;\n let t = n?.length && n[0].size;\n return null == t && (t = e.minSize), g(t, a, i);\n}\nfunction S(e, a, i, n) {\n const t = (e - a.minDataValue) / (a.maxDataValue - a.minDataValue),\n r = g(a.minSize, i, n),\n s = g(a.maxSize, i, n),\n l = null != n ? n.shape : void 0;\n if (e <= a.minDataValue) return r;\n if (e >= a.maxDataValue) return s;\n if (null == r || null == s) return null;\n if (\"area\" === a.scaleBy && l) {\n const e = \"circle\" === l,\n a = e ? d * (r / 2) ** 2 : r * r,\n i = a + t * ((e ? d * (s / 2) ** 2 : s * s) - a);\n return e ? 2 * Math.sqrt(i / d) : Math.sqrt(i);\n }\n return r + t * (s - r);\n}\nfunction E(e, a, i, n) {\n const t = null != n ? n.shape : void 0,\n r = e / a.minDataValue,\n s = g(a.minSize, i, n),\n l = g(a.maxSize, i, n);\n let o = null;\n return o = \"circle\" === t ? 2 * Math.sqrt(r * (s / 2) ** 2) : \"square\" === t || \"diamond\" === t || \"image\" === t ? Math.sqrt(r * s ** 2) : r * s, w(o, s, l);\n}\nfunction C(e, a, i, n, t) {\n const [r, s, l] = U(e, t);\n if (r === s) return g(a.stops?.[r].size, i, n);\n {\n const e = g(a.stops?.[r].size, i, n);\n return e + (g(a.stops?.[s].size, i, n) - e) * l;\n }\n}\nfunction D(e, a, i, n) {\n const r = (n?.resolution ?? 1) * t[a.valueUnit],\n s = g(a.minSize, i, n),\n l = g(a.maxSize, i, n),\n {\n valueRepresentation: o\n } = a;\n let c = null;\n return c = \"area\" === o ? 2 * Math.sqrt(e / d) / r : \"radius\" === o || \"distance\" === o ? 2 * e / r : e / r, w(c, s, l);\n}\nfunction M(e) {\n return e;\n}\nfunction k(e, a, i, n, t) {\n switch (a.transformationType) {\n case l.Additive:\n return z(e, a, i, n);\n case l.Constant:\n return F(a, i, n);\n case l.ClampedLinear:\n return S(e, a, i, n);\n case l.Proportional:\n return E(e, a, i, n);\n case l.Stops:\n return C(e, a, i, n, t);\n case l.RealWorldSize:\n return D(e, a, i, n);\n case l.Identity:\n return M(e);\n case l.Unknown:\n return null;\n }\n}\nfunction N(e, a, i) {\n const {\n isScaleDriven: n\n } = e.cache;\n if (!(n && \"3d\" === i || a)) return null;\n const t = {\n scale: a,\n view: i\n };\n let r = g(e.minSize, p, t),\n s = g(e.maxSize, p, t);\n if (null != r || null != s) {\n if (r > s) {\n const e = s;\n s = r, r = e;\n }\n return {\n minSize: r,\n maxSize: s\n };\n }\n}\nfunction R(e, a, i) {\n if (!e.visualVariables) return;\n const n = [],\n t = [],\n r = [],\n s = [],\n l = [];\n for (const o of e.visualVariables) switch (o.type) {\n case \"color\":\n t.push(o);\n break;\n case \"opacity\":\n r.push(o);\n break;\n case \"rotation\":\n l.push(o);\n break;\n case \"size\":\n s.push(o);\n }\n return t.forEach(e => {\n const t = m(e, a, i);\n n.push({\n variable: e,\n value: t\n });\n }), r.forEach(e => {\n const t = b(e, a, i);\n n.push({\n variable: e,\n value: t\n });\n }), l.forEach(e => {\n const t = h(e, a, i);\n n.push({\n variable: e,\n value: t\n });\n }), s.forEach(e => {\n const t = y(e, a, i);\n n.push({\n variable: e,\n value: t\n });\n }), n.filter(e => null != e.value);\n}\nfunction U(e, a) {\n if (!a) return;\n let i = 0,\n n = a.length - 1;\n return a.some((a, t) => e < a ? (n = t, !0) : (i = t, !1)), [i, n, (e - a[i]) / (a[n] - a[i])];\n}\nfunction T(e, a, n) {\n const t = [\"proportional\", \"proportional\", \"proportional\"];\n for (const r of e) {\n const e = r.useSymbolValue ? \"symbol-value\" : y(r, a, n);\n switch (r.axis) {\n case \"width\":\n t[0] = e;\n break;\n case \"depth\":\n t[1] = e;\n break;\n case \"height\":\n t[2] = e;\n break;\n case \"width-and-depth\":\n t[0] = e, t[1] = e;\n break;\n case \"all\":\n case void 0:\n case null:\n t[0] = e, t[1] = e, t[2] = e;\n break;\n default:\n i(r.axis);\n }\n }\n return t;\n}\nexport { T as getAllSizes, m as getColor, b as getOpacity, h as getRotationAngle, y as getSize, k as getSizeForValue, g as getSizeFromNumberOrVariable, N as getSizeRangeAtScale, R as getVisualVariableValues, v as viewScaleRE };"],"mappings":"6NAUA,IAAMA,EAAI,IAAMC,EAAE,UAAU,4DAA4D,EACtFC,EAAIC,GAAKH,EAAE,EAAE,KAAK,8EAA8EG,CAAC,EAAE,EACnGC,EAAI,IAAMJ,EAAE,EAAE,MAAM,sDAAsD,EAC1EK,EAAI,IAAIC,EACRA,EAAI,KAAK,GACTC,GAAI,4CACN,SAASC,EAAEC,EAAGC,EAAGT,EAAG,CAClB,IAAMU,EAAI,oBAAqBF,GAAKA,EAAE,gBAAkBA,EAAE,gBAAgB,KAAKN,GAAiBA,EAAE,OAAd,OAAkB,EAAIM,EAC1G,GAAI,CAACE,EAAG,OACR,GAAuDA,EAAE,gBAArD,+CAAoE,OAAO,KAAKT,EAAE,eAAe,EACrG,IAAMU,EAAgB,OAAOF,GAAnB,SACRG,EAAID,EAAI,KAAOF,EACf,EAAIG,GAAG,WACL,EAAID,EAAIF,EAAI,KACVV,EAAIW,EAAE,MACV,CACE,OAAQN,EACR,cAAeC,CACjB,EAAIK,EAAE,MACJJ,EAAII,EAAE,MAAM,aAChB,GAAI,CAACX,GAAK,CAACM,EAAG,CACZ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,CAAC,EAAIJ,EAAGI,EAAE,CAAC,EAAIJ,EAAGI,EAAE,CAAC,EAAIJ,EAC3B,MACF,QACIY,EAAE,IACR,CACF,CACA,OAAOR,CACT","names":["c","n","u","e","f","p","d","v","m","a","i","t","r","s","b","U","l","o","h","V","x","y","k","g","w","z","F","S","E","C","D","k","e","a","i","n","t","z","F","S","E","C","D","N","r","g","p","s","R","l","o","m","b","h","y","U","T"],"x_google_ignoreList":[0]}