@arcgis/core 4.27.0-rc.0 → 4.27.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/arcade/featureSetUtils.js +1 -1
  2. package/arcade/featureset/actions/GroupBy.js +1 -1
  3. package/arcade/featureset/actions/OrderBy.js +1 -1
  4. package/arcade/functions/featuresetbase.js +1 -1
  5. package/arcade/functions/featuresetstring.js +1 -1
  6. package/arcade/languageUtils.js +1 -1
  7. package/arcade/treeAnalysis.js +1 -1
  8. package/assets/esri/core/workers/RemoteClient.js +1 -1
  9. package/assets/esri/core/workers/chunks/0407bf97ad621c89a734.js +1 -0
  10. package/assets/esri/core/workers/chunks/0610691a0c0d9fbbd6d2.js +1 -0
  11. package/assets/esri/core/workers/chunks/{7ec6be2bc0f354011e46.js → 07651ef8348f702d59ac.js} +1 -1
  12. package/assets/esri/core/workers/chunks/0a02ac5628d1739372c6.js +1 -0
  13. package/assets/esri/core/workers/chunks/0a86c458916e83d6c523.js +1 -0
  14. package/assets/esri/core/workers/chunks/14145959a3dab1437818.js +1 -0
  15. package/assets/esri/core/workers/chunks/16db0bc87d87a7313dc4.js +1 -0
  16. package/assets/esri/core/workers/chunks/183e2e0cb86c1c640d94.js +1 -0
  17. package/assets/esri/core/workers/chunks/19d329b9d4ec2eff1d13.js +1 -0
  18. package/assets/esri/core/workers/chunks/1b8074269800b384ecf6.js +1 -0
  19. package/assets/esri/core/workers/chunks/2154d395f405be3cd3ba.js +1 -0
  20. package/assets/esri/core/workers/chunks/{33dbba3b7fc648437e50.js → 21e1f3b11e7d363b727a.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{31a158c73994603c169d.js → 2446e336b1f7256d4fde.js} +1 -1
  22. package/assets/esri/core/workers/chunks/29290a44fd3b183c24e3.js +1 -0
  23. package/assets/esri/core/workers/chunks/{f498c4d4831141125781.js → 2f5639886f577baedbca.js} +1 -1
  24. package/assets/esri/core/workers/chunks/33901eb1574e46abd9af.js +1 -0
  25. package/assets/esri/core/workers/chunks/{9c78ad5ab57e0d47ac43.js → 3ba2fcb9110230f8790c.js} +1 -1
  26. package/assets/esri/core/workers/chunks/3e239bfad611985e50fb.js +1 -0
  27. package/assets/esri/core/workers/chunks/42f3421740a5479559dc.js +1 -0
  28. package/assets/esri/core/workers/chunks/474d9b334812533bab36.js +1 -0
  29. package/assets/esri/core/workers/chunks/53ad34bf32f5f3d4fe18.js +1 -0
  30. package/assets/esri/core/workers/chunks/{97cdbec7532cfcdf9ad2.js → 595a2baa04d92de59558.js} +1 -1
  31. package/assets/esri/core/workers/chunks/624521961fe1f2c4f2c5.js +1 -0
  32. package/assets/esri/core/workers/chunks/{212d59764c275c763941.js → 659b7bad7281c0e2aed3.js} +1 -1
  33. package/assets/esri/core/workers/chunks/6a3d611e8842afbb50ab.js.LICENSE.txt +1 -1
  34. package/assets/esri/core/workers/chunks/6e562fa57c0347091154.js +1 -0
  35. package/assets/esri/core/workers/chunks/7479dc0c790337af7597.js +1 -0
  36. package/assets/esri/core/workers/chunks/{e88cff2537be52da6531.js → 74fd2059ddda9083cbcc.js} +1 -1
  37. package/assets/esri/core/workers/chunks/7dc6774c77c822b68c99.js +1 -0
  38. package/assets/esri/core/workers/chunks/82a103a8b5382300889d.js +1 -0
  39. package/assets/esri/core/workers/chunks/{3fe357df92afa1bee70a.js → 90da1ed112b82712d0ef.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{9849f64793f2ad39366b.js → 9290b0d330f02233d803.js} +1 -1
  41. package/assets/esri/core/workers/chunks/92e7f224a80195e606d6.js +1 -0
  42. package/assets/esri/core/workers/chunks/{36df72362b38759b895b.js → 9648a8f2b24f1ca3d637.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{ad18fb7bb54a0c4bdb38.js → a20361b4d3bdd7d196ca.js} +1 -1
  44. package/assets/esri/core/workers/chunks/a7fd2a95fde197c06828.js +1 -0
  45. package/assets/esri/core/workers/chunks/b0cda39b53ecd6c44cd0.js +1 -0
  46. package/assets/esri/core/workers/chunks/b2a423d9ce8bb784267c.js +1 -0
  47. package/assets/esri/core/workers/chunks/b5fc6f2044ed047c5afd.js +1 -0
  48. package/assets/esri/core/workers/chunks/{df0453cdfe685d6436cc.js → b6dc41fce601b9d3480e.js} +1 -1
  49. package/assets/esri/core/workers/chunks/b8e6c64792a512df4c4d.js +1 -0
  50. package/assets/esri/core/workers/chunks/c6617a937440701c0180.js +1 -0
  51. package/assets/esri/core/workers/chunks/c6efe2e04ea6a55bb6e3.js +1 -0
  52. package/assets/esri/core/workers/chunks/d8607326a199dd994844.js +1 -0
  53. package/assets/esri/core/workers/chunks/d8bd3f498b3fa8153404.js +1 -0
  54. package/assets/esri/core/workers/chunks/{39e473586579d11d6732.js → e2432871f1329f47465d.js} +1 -1
  55. package/assets/esri/core/workers/chunks/ee5ee03dd2c7dc940272.js +1 -0
  56. package/assets/esri/core/workers/chunks/{c83669cf08391a62fb72.js → f1da7b29eecad0e9efae.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{2e627c94e57c924e5917.js → f339db2b599fa9585283.js} +1 -1
  58. package/assets/esri/core/workers/chunks/f505ebd4bd3bfb6c790d.js +1 -0
  59. package/assets/esri/core/workers/chunks/{3c6c082157c916f8ddba.js → ffe61d5a6a9b34bee9d4.js} +1 -1
  60. package/assets/esri/themes/base/widgets/_Bookmarks.scss +5 -0
  61. package/assets/esri/themes/base/widgets/_Features.scss +5 -7
  62. package/assets/esri/themes/base/widgets/_Popup.scss +3 -3
  63. package/assets/esri/themes/base/widgets/_Swipe.scss +11 -0
  64. package/assets/esri/themes/dark/main.css +1 -1
  65. package/assets/esri/themes/light/main.css +1 -1
  66. package/assets/esri/themes/light/view.css +1 -1
  67. package/chunks/SSAO.glsl.js +1 -1
  68. package/chunks/languageUtils.js +1 -1
  69. package/geometry/Mesh.js +1 -1
  70. package/geometry/support/DoubleArray.js +1 -1
  71. package/geometry/support/meshUtils/bounds.js +5 -0
  72. package/geometry/support/meshUtils/georeference.js +1 -1
  73. package/interfaces.d.ts +2 -2
  74. package/kernel.js +1 -1
  75. package/layers/FeatureLayer.js +1 -1
  76. package/layers/StreamLayer.js +1 -1
  77. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  78. package/layers/graphics/data/QueryEngine.js +1 -1
  79. package/layers/graphics/data/attributeSupport.js +1 -1
  80. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  81. package/layers/support/FeatureReductionBinning.js +1 -1
  82. package/layers/support/FeatureReductionCluster.js +1 -1
  83. package/layers/support/featureLayerUtils.js +1 -1
  84. package/layers/support/rasterFunctions/colormaps.js +1 -1
  85. package/package.json +2 -2
  86. package/renderers/support/utils.js +1 -1
  87. package/support/arcadeUtils.js +1 -1
  88. package/support/revision.js +1 -1
  89. package/symbols/cim/CIMSymbolHelper.js +1 -1
  90. package/symbols/cim/effects/EffectBuffer.js +1 -1
  91. package/symbols/cim/effects/EffectDonut.js +1 -1
  92. package/symbols/cim/effects/EffectOffset.js +1 -1
  93. package/views/2d/layers/features/Store2D.js +1 -1
  94. package/views/2d/layers/features/sources/StreamSource.js +1 -1
  95. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  96. package/views/3d/layers/graphics/webStyleUtils.js +1 -1
  97. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  98. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  99. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  100. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  101. package/views/3d/webgl-engine/materials/pbrUtils.js +5 -0
  102. package/webdoc/support/writeUtils.js +1 -1
  103. package/widgets/Bookmarks/css.js +1 -1
  104. package/widgets/Bookmarks.js +1 -1
  105. package/widgets/Features.js +1 -1
  106. package/assets/esri/core/workers/chunks/0b03165dbf289797cefa.js +0 -1
  107. package/assets/esri/core/workers/chunks/0c1c0024879f944f44c4.js +0 -1
  108. package/assets/esri/core/workers/chunks/13a48796905613bc1679.js +0 -1
  109. package/assets/esri/core/workers/chunks/1ea1104651ab15f9a13c.js +0 -1
  110. package/assets/esri/core/workers/chunks/2108cfc7921430f0b805.js +0 -1
  111. package/assets/esri/core/workers/chunks/2eacca322737aafd8f0c.js +0 -1
  112. package/assets/esri/core/workers/chunks/39577683e334eb4d904c.js +0 -1
  113. package/assets/esri/core/workers/chunks/4d3deeb0ebd0ce8c1215.js +0 -1
  114. package/assets/esri/core/workers/chunks/576bddc3fa7d91a7e5bd.js +0 -1
  115. package/assets/esri/core/workers/chunks/623d6710a4f800c622ce.js +0 -1
  116. package/assets/esri/core/workers/chunks/6782cc3feb713676d544.js +0 -1
  117. package/assets/esri/core/workers/chunks/6e7178de0b2c3d2f7e6b.js +0 -1
  118. package/assets/esri/core/workers/chunks/78ce0b1af62435d8ebf4.js +0 -1
  119. package/assets/esri/core/workers/chunks/79d2baf392589588ef9b.js +0 -1
  120. package/assets/esri/core/workers/chunks/7bbdba52157da13a01fc.js +0 -1
  121. package/assets/esri/core/workers/chunks/84860b535a70ec448cfe.js +0 -1
  122. package/assets/esri/core/workers/chunks/9035d9e09a4e7cb94d37.js +0 -1
  123. package/assets/esri/core/workers/chunks/956b0fef7bc849415354.js +0 -1
  124. package/assets/esri/core/workers/chunks/9ab98321a4a7eaeeb018.js +0 -1
  125. package/assets/esri/core/workers/chunks/9cb7a68ff46e5c43e1d2.js +0 -1
  126. package/assets/esri/core/workers/chunks/a0f7f7f578521970c714.js +0 -1
  127. package/assets/esri/core/workers/chunks/a60eac45d3c65bd0216f.js +0 -1
  128. package/assets/esri/core/workers/chunks/aca5260f6984952a6e3d.js +0 -1
  129. package/assets/esri/core/workers/chunks/b05be356743fa5d24573.js +0 -1
  130. package/assets/esri/core/workers/chunks/ba6024465308c248170b.js +0 -1
  131. package/assets/esri/core/workers/chunks/d0983f808008920514f2.js +0 -1
  132. package/assets/esri/core/workers/chunks/dab832799bc06b0fec34.js +0 -1
  133. package/assets/esri/core/workers/chunks/e45d36aef2bc69ee9132.js +0 -1
  134. package/assets/esri/core/workers/chunks/e5bbd4cc5edbf7ab3624.js +0 -1
  135. package/assets/esri/core/workers/chunks/e700cf4d1f99291a4396.js +0 -1
  136. package/assets/esri/core/workers/chunks/f398a5cf33c3fd2522a5.js +0 -1
  137. package/assets/esri/core/workers/chunks/f4ee94a6cde4ea8837f1.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9469],{38171:(e,t,s)=>{s.d(t,{Z:()=>f});var i,l=s(43697),r=s(66577),n=s(51773),o=s(9790),a=s(2368),u=s(96674),p=s(99001),c=s(5600),d=(s(75215),s(67676),s(80442),s(52011)),h=s(33955);function y(e){if(null==e)return null;const t={};for(const s in e){const i=e[s];i&&(t[s]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let m=i=class extends((0,a.J)(u.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,p.D)(),configurable:!0})}normalizeCtorArgs(e,t,s,i){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:s,popupTemplate:i}}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const s=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",s,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:y(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:{...this.attributes},popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const s={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",s,s,e.action)}}_notifyLayer(e,t,s,i){if(!this.layer||!("graphicChanged"in this.layer))return;const l={graphic:this,property:e,oldValue:t,newValue:s};"origin-transform"===e&&(l.action=i),"attributes"===e&&(l.attributeName=i),this.layer.graphicChanged(l)}};(0,l._)([(0,c.Cb)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const s in e){const i=(0,h.im)(e[s]);i&&(t[s]=i)}return 0!==Object.keys(t).length?t:null}}})],m.prototype,"aggregateGeometries",null),(0,l._)([(0,c.Cb)({value:null})],m.prototype,"attributes",null),(0,l._)([(0,c.Cb)({value:null,types:r.qM,json:{read:h.im}})],m.prototype,"geometry",null),(0,l._)([(0,c.Cb)({type:Boolean})],m.prototype,"isAggregate",void 0),(0,l._)([(0,c.Cb)({clonable:"reference"})],m.prototype,"layer",void 0),(0,l._)([(0,c.Cb)({type:n.Z})],m.prototype,"popupTemplate",void 0),(0,l._)([(0,c.Cb)({clonable:"reference"})],m.prototype,"sourceLayer",void 0),(0,l._)([(0,c.Cb)({value:null,types:o.LB})],m.prototype,"symbol",null),(0,l._)([(0,c.Cb)({type:Boolean,value:!0})],m.prototype,"visible",null),m=i=(0,l._)([(0,d.j)("esri.Graphic")],m),(m||(m={})).generateUID=p.D;const f=m},74085:(e,t,s)=>{function i(e){}s.d(t,{Bg:()=>i}),s(80442)},60235:(e,t,s)=>{s.d(t,{Mr:()=>n,x9:()=>o});var i=s(80442);const l=new Set;function r(e,t,s=!1){s&&l.has(t)||(s&&l.add(t),e.warn(`🛑 DEPRECATED - ${t}`))}function n(e,t,s={}){if((0,i.Z)("esri-deprecation-warnings")){const{moduleName:i}=s;o(e,"Property: "+(i?i+"::":"")+t,s)}}function o(e,t,s={}){if((0,i.Z)("esri-deprecation-warnings")){const{replacement:i,version:l,see:n,warnOnce:o}=s;let a=t;i&&(a+=`\n\t🛠️ Replacement: ${i}`),l&&(a+=`\n\t⚙️ Version: ${l}`),n&&(a+=`\n\t🔗 See ${n} for more details.`),r(e,a,o)}}},16050:(e,t,s)=>{s.d(t,{Z:()=>z});var i,l=s(43697),r=s(9790),n=s(35454),o=s(22974),a=s(92604),u=s(5600),p=s(90578),c=s(36030),d=s(71715),h=s(52011),y=s(30556),m=s(75215),f=s(35671),b=s(5499),v=s(41733),g=s(32984),w=s(9833),_=s(66338),V=s(59266);const S="percent-of-total",x="field",C=new n.X({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:S,esriNormalizeByField:x}),I=(0,m.se)(g.Z);let j=i=class extends((0,v.W)(b.Z)){constructor(e){super(e),this._compiledValueExpression={valueExpression:null,compiledFunction:null},this.backgroundFillSymbol=null,this.classBreakInfos=null,this.defaultLabel=null,this.defaultSymbol=null,this.field=null,this.isMaxInclusive=!0,this.legendOptions=null,this.normalizationField=null,this.normalizationTotal=null,this.type="class-breaks",this.valueExpression=null,this.valueExpressionTitle=null,this._set("classBreakInfos",[])}readClassBreakInfos(e,t,s){if(!Array.isArray(e))return;let i=t.minValue;return e.map((e=>{const t=new g.Z;return t.read(e,s),null==t.minValue&&(t.minValue=i),null==t.maxValue&&(t.maxValue=t.minValue),i=t.maxValue,t}))}writeClassBreakInfos(e,t,s,i){const l=e.map((e=>e.write({},i)));this._areClassBreaksConsecutive()&&l.forEach((e=>delete e.classMinValue)),t[s]=l}castField(e){return null==e?e:"function"==typeof e?(a.Z.getLogger(this).error(".field: field must be a string value"),null):(0,m.Zs)(e)}get minValue(){return this.classBreakInfos&&this.classBreakInfos[0]&&this.classBreakInfos[0].minValue||0}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,s=null!=this.normalizationTotal;return t||s?(e=t&&x||s&&S||null,t&&s&&a.Z.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==x&&e!==S||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}addClassBreakInfo(e,t,s){let i=null;i="number"==typeof e?new g.Z({minValue:e,maxValue:t,symbol:(0,r.se)(s)}):I((0,o.d9)(e)),this.classBreakInfos.push(i),1===this.classBreakInfos.length&&this.notifyChange("minValue")}removeClassBreakInfo(e,t){const s=this.classBreakInfos.length;for(let i=0;i<s;i++){const s=[this.classBreakInfos[i].minValue,this.classBreakInfos[i].maxValue];if(s[0]===e&&s[1]===t){this.classBreakInfos.splice(i,1);break}}}getBreakIndex(e,t){return!this.valueExpression||null!=t&&null!=t.arcade||a.Z.getLogger(this).warn(""),this.valueExpression?this._getBreakIndexForExpression(e,t):this._getBreakIndexForField(e)}async getClassBreakInfo(e,t){let s=t;!this.valueExpression||null!=t&&null!=t.arcade||(s={...s,arcade:await(0,V.LC)()});const i=this.getBreakIndex(e,s);return-1!==i?this.classBreakInfos[i]:null}getSymbol(e,t){if(this.valueExpression&&(null==t||null==t.arcade))return void a.Z.getLogger(this).error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const s=this.getBreakIndex(e,t);return s>-1?this.classBreakInfos[s].symbol:this.defaultSymbol}async getSymbolAsync(e,t){let s=t;if(this.valueExpression&&(null==t||null==t.arcade)){const e=await(0,V.LC)(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),s={...s,arcade:e}}const i=this.getBreakIndex(e,s);return i>-1?this.classBreakInfos[i].symbol:this.defaultSymbol}getSymbols(){const e=[];return this.classBreakInfos.forEach((t=>{t.symbol&&e.push(t.symbol)})),this.defaultSymbol&&e.push(this.defaultSymbol),e}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){const e=JSON.stringify(this.backgroundFillSymbol),t=JSON.stringify(this.defaultSymbol),s=`${this.normalizationField}.${this.normalizationType}.${this.normalizationTotal}`;return`${e}.${t}.${this.classBreakInfos.reduce(((e,t)=>e+t.getMeshHash()),"")}.${s}.${this.field}.${this.valueExpression}`}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}clone(){return new i({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:(0,o.d9)(this.classBreakInfos),isMaxInclusive:this.isMaxInclusive,normalizationField:this.normalizationField,normalizationTotal:this.normalizationTotal,normalizationType:this.normalizationType,visualVariables:(0,o.d9)(this.visualVariables),legendOptions:(0,o.d9)(this.legendOptions),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}async collectRequiredFields(e,t){const s=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(s)}async collectSymbolFields(e,t){const s=[...this.getSymbols().map((s=>s.collectRequiredFields(e,t))),(0,f.io)(e,t,this.valueExpression)];(0,f.AB)(e,t,this.field),(0,f.AB)(e,t,this.normalizationField),await Promise.all(s)}_getBreakIndexForExpression(e,t){const{viewingMode:s,scale:i,spatialReference:l,arcade:r}=t??{},{valueExpression:n}=this;let o=this._compiledValueExpression.valueExpression===n?this._compiledValueExpression.compiledFunction:null;const a=r.arcadeUtils;if(!o){const e=a.createSyntaxTree(n);o=a.createFunction(e),this._compiledValueExpression.compiledFunction=o}this._compiledValueExpression.valueExpression=n;const u=a.executeFunction(o,a.createExecContext(e,a.getViewInfo({viewingMode:s,scale:i,spatialReference:l})));return this._getBreakIndexfromInfos(u)}_getBreakIndexForField(e){const t=this.field,s=e.attributes,i=this.normalizationType;let l=parseFloat(s[t]);if(i){const e=this.normalizationTotal,t=parseFloat(this.normalizationField?s[this.normalizationField]:void 0);if("log"===i)l=Math.log(l)*Math.LOG10E;else if(i!==S||null==e||isNaN(e)){if(i===x&&!isNaN(t)){if(isNaN(l)||isNaN(t))return-1;l/=t}}else l=l/e*100}return this._getBreakIndexfromInfos(l)}_getBreakIndexfromInfos(e){const t=this.isMaxInclusive;if(null!=e&&"number"==typeof e&&!isNaN(e))for(let s=0;s<this.classBreakInfos.length;s++){const i=[this.classBreakInfos[s].minValue,this.classBreakInfos[s].maxValue];if(i[0]<=e&&(t?e<=i[1]:e<i[1]))return s}return-1}_areClassBreaksConsecutive(){const e=this.classBreakInfos,t=e.length;for(let s=1;s<t;s++)if(e[s-1].maxValue!==e[s].minValue)return!1;return!0}};(0,l._)([(0,u.Cb)(w.KK)],j.prototype,"backgroundFillSymbol",void 0),(0,l._)([(0,u.Cb)({type:[g.Z]})],j.prototype,"classBreakInfos",void 0),(0,l._)([(0,d.r)("classBreakInfos")],j.prototype,"readClassBreakInfos",null),(0,l._)([(0,y.c)("classBreakInfos")],j.prototype,"writeClassBreakInfos",null),(0,l._)([(0,u.Cb)({type:String,json:{write:!0}})],j.prototype,"defaultLabel",void 0),(0,l._)([(0,u.Cb)(w.Gn)],j.prototype,"defaultSymbol",void 0),(0,l._)([(0,u.Cb)({type:String,json:{write:!0}})],j.prototype,"field",void 0),(0,l._)([(0,p.p)("field")],j.prototype,"castField",null),(0,l._)([(0,u.Cb)({type:Boolean})],j.prototype,"isMaxInclusive",void 0),(0,l._)([(0,u.Cb)({type:_.I,json:{write:!0}})],j.prototype,"legendOptions",void 0),(0,l._)([(0,u.Cb)({type:Number,readOnly:!0,value:null,json:{read:!1,write:{overridePolicy(){return 0!==this.classBreakInfos.length&&this._areClassBreaksConsecutive()?{enabled:!0}:{enabled:!1}}}}})],j.prototype,"minValue",null),(0,l._)([(0,u.Cb)({type:String,json:{write:!0}})],j.prototype,"normalizationField",void 0),(0,l._)([(0,u.Cb)({type:Number,cast:e=>(0,m.q9)(e),json:{write:!0}})],j.prototype,"normalizationTotal",void 0),(0,l._)([(0,u.Cb)({type:C.apiValues,value:null,json:{type:C.jsonValues,read:C.read,write:C.write}})],j.prototype,"normalizationType",null),(0,l._)([(0,c.J)({classBreaks:"class-breaks"})],j.prototype,"type",void 0),(0,l._)([(0,u.Cb)({type:String,json:{write:!0}})],j.prototype,"valueExpression",void 0),(0,l._)([(0,u.Cb)({type:String,json:{write:!0}})],j.prototype,"valueExpressionTitle",void 0),j=i=(0,l._)([(0,h.j)("esri.renderers.ClassBreaksRenderer")],j);const z=j},5499:(e,t,s)=>{s.d(t,{Z:()=>c});var i=s(43697),l=s(35454),r=s(96674),n=s(5600),o=(s(75215),s(67676),s(80442),s(52011)),a=s(69237);const u=new l.X({simple:"simple",uniqueValue:"unique-value",classBreaks:"class-breaks",heatmap:"heatmap",dotDensity:"dot-density",dictionary:"dictionary",pieChart:"pie-chart"},{ignoreUnknown:!0});let p=class extends r.wq{constructor(e){super(e),this.authoringInfo=null,this.type=null}async getRequiredFields(e){if(!this.collectRequiredFields)return[];const t=new Set;return await this.collectRequiredFields(t,e),Array.from(t).sort()}getSymbol(e,t){}async getSymbolAsync(e,t){}getSymbols(){return[]}getAttributeHash(){return JSON.stringify(this)}getMeshHash(){return JSON.stringify(this)}};(0,i._)([(0,n.Cb)({type:a.Z,json:{write:!0}})],p.prototype,"authoringInfo",void 0),(0,i._)([(0,n.Cb)({type:u.apiValues,readOnly:!0,json:{type:u.jsonValues,read:!1,write:{writer:u.write,ignoreOrigin:!0}}})],p.prototype,"type",void 0),p=(0,i._)([(0,o.j)("esri.renderers.Renderer")],p);const c=p},81571:(e,t,s)=>{s.d(t,{Z:()=>$});var i=s(43697),l=s(9790),r=s(20102),n=s(22974),o=s(92604),a=s(78286),u=s(17445),p=s(5600),c=s(90578),d=s(36030),h=s(71715),y=s(52011),m=s(30556),f=s(22862),b=s(75215),v=s(35671),g=s(48522),w=s(5499),_=s(41733),V=s(9833),S=s(66338),x=s(2368),C=s(96674),I=s(67676);s(80442);let j=class extends((0,x.J)(C.wq)){constructor(e){super(e),this.value=null,this.value2=null,this.value3=null}};(0,i._)([(0,p.Cb)(V.GY)],j.prototype,"value",void 0),(0,i._)([(0,p.Cb)(V.GY)],j.prototype,"value2",void 0),(0,i._)([(0,p.Cb)(V.GY)],j.prototype,"value3",void 0),j=(0,i._)([(0,y.j)("esri.renderers.support.UniqueValue")],j);const z=j;let q=class extends((0,x.J)(C.wq)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.values=null}castValues(e){if(null==e)return null;const t=typeof(e=Array.isArray(e)?e:[e])[0];return"string"===t||"number"===t?e.map((e=>new z({value:e}))):"object"===t?e[0]instanceof z?e:e.map((e=>new z(e))):null}};(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],q.prototype,"description",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],q.prototype,"label",void 0),(0,i._)([(0,p.Cb)(V.Gn)],q.prototype,"symbol",void 0),(0,i._)([(0,p.Cb)({type:[z],json:{type:[[String]],read:{reader:e=>e?e.map((e=>new z({value:e[0],value2:e[1],value3:e[2]}))):null},write:{writer:(e,t)=>{const s=[];for(const t of e){const e=[t.value,t.value2,t.value3].filter(I.pC).map((e=>e.toString()));s.push(e)}t.values=s}}}})],q.prototype,"values",void 0),(0,i._)([(0,c.p)("values")],q.prototype,"castValues",null),q=(0,i._)([(0,y.j)("esri.renderers.support.UniqueValueClass")],q);const F=q;let E=class extends((0,x.J)(C.wq)){constructor(e){super(e),this.heading=null,this.classes=null}};(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],E.prototype,"heading",void 0),(0,i._)([(0,p.Cb)({type:[F],json:{write:!0}})],E.prototype,"classes",void 0),E=(0,i._)([(0,y.j)("esri.renderers.support.UniqueValueGroup")],E);const T=E;var k,Z=s(44262),O=s(59266),D=s(25929),U=s(27883),L=s(59390);const M="esri.renderers.UniqueValueRenderer",B=o.Z.getLogger(M),N="uvInfos-watcher",R="uvGroups-watcher",A=(0,b.se)(Z.Z);let G=k=class extends((0,_.W)(w.Z)){constructor(e){super(e),this._valueInfoMap={},this._isDefaultSymbolDerived=!1,this._isInfosSource=null,this.type="unique-value",this.backgroundFillSymbol=null,this.orderByClassesEnabled=!1,this.valueExpressionTitle=null,this.legendOptions=null,this.defaultLabel=null,this.portal=null,this.styleOrigin=null,this.diff={uniqueValueInfos(e,t){if(!e&&!t)return;if(!e||!t)return{type:"complete",oldValue:e,newValue:t};let s=!1;const i={type:"collection",added:[],removed:[],changed:[],unchanged:[]};for(let l=0;l<t.length;l++){const r=e.find((e=>e.value===t[l].value));r?(0,f.Hg)(r,t[l])?(i.changed.push({type:"complete",oldValue:r,newValue:t[l]}),s=!0):i.unchanged.push({oldValue:r,newValue:t[l]}):(i.added.push(t[l]),s=!0)}for(let l=0;l<e.length;l++)t.find((t=>t.value===e[l].value))||(i.removed.push(e[l]),s=!0);return s?i:void 0}},this._set("uniqueValueInfos",[]),this._set("uniqueValueGroups",[])}get _cache(){return{compiledFunc:null}}set field(e){this._set("field",e),this._updateFieldDelimiter(),this._updateUniqueValues()}castField(e){return null==e||"function"==typeof e?e:(0,b.Zs)(e)}writeField(e,t,s,i){"string"==typeof e?t[s]=e:i&&i.messages?i.messages.push(new r.Z("property:unsupported","UniqueValueRenderer.field set to a function cannot be written to JSON")):B.error(".field: cannot write field to JSON since it's not a string value")}set field2(e){this._set("field2",e),this._updateFieldDelimiter(),this._updateUniqueValues()}set field3(e){this._set("field3",e),this._updateUniqueValues()}set valueExpression(e){this._set("valueExpression",e),this._updateUniqueValues()}set defaultSymbol(e){this._isDefaultSymbolDerived=!1,this._set("defaultSymbol",e)}set fieldDelimiter(e){this._set("fieldDelimiter",e),this._updateUniqueValues()}readPortal(e,t,s){return s.portal||g.Z.getDefault()}readStyleOrigin(e,t,s){if(t.styleName)return Object.freeze({styleName:t.styleName});if(t.styleUrl){const e=(0,D.f)(t.styleUrl,s);return Object.freeze({styleUrl:e})}}writeStyleOrigin(e,t,s,i){e.styleName?t.styleName=e.styleName:e.styleUrl&&(t.styleUrl=(0,D.t)(e.styleUrl,i))}set uniqueValueGroups(e){this.styleOrigin?B.error("#uniqueValueGroups=","Cannot modify unique value groups of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueGroups",e),this._updateInfosFromGroups(),this._isInfosSource=!1,this._watchUniqueValueGroups())}set uniqueValueInfos(e){this.styleOrigin?B.error("#uniqueValueInfos=","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos())}addUniqueValueInfo(e,t){if(this.styleOrigin)return void B.error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");let s;s="object"==typeof e?A(e):new Z.Z({value:e,symbol:(0,l.se)(t)}),this.uniqueValueInfos?.push(s),this._valueInfoMap[s.value]=s,this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}removeUniqueValueInfo(e){if(this.styleOrigin)return void B.error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");const t=this.uniqueValueInfos;if(t)for(let s=0;s<t.length;s++)if(t[s].value===e+""){delete this._valueInfoMap[e],t.splice(s,1);break}this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}async getUniqueValueInfo(e,t){let s=t;return!this.valueExpression||null!=t&&null!=t.arcade||(s={...s,arcade:await(0,O.LC)()}),this._getUniqueValueInfo(e,s)}getSymbol(e,t){if(this.valueExpression&&(null==t||null==t.arcade))return void B.error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const s=this._getUniqueValueInfo(e,t);return s&&s.symbol||this.defaultSymbol}async getSymbolAsync(e,t){let s=t;if(this.valueExpression&&(null==s||null==s.arcade)){const e=await(0,O.LC)(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),s={...s,arcade:e}}const i=this._getUniqueValueInfo(e,s);return i&&i.symbol||this.defaultSymbol}getSymbols(){const e=[];for(const t of this.uniqueValueInfos??[])t.symbol&&e.push(t.symbol);return this.defaultSymbol&&e.push(this.defaultSymbol),e}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){const e=JSON.stringify(this.backgroundFillSymbol),t=JSON.stringify(this.defaultSymbol),s=this.uniqueValueInfos?.reduce(((e,t)=>e+t.getMeshHash()),"");return`${e}.${t}.${s}.${this.field}.${this.field2}.${this.field3}.${this.fieldDelimiter}.${this.valueExpression}`}clone(){const e=new k({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:(0,n.d9)(this.defaultSymbol),orderByClassesEnabled:this.orderByClassesEnabled,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:(0,n.d9)(this.visualVariables),legendOptions:(0,n.d9)(this.legendOptions),authoringInfo:this.authoringInfo&&this.authoringInfo.clone(),backgroundFillSymbol:(0,n.d9)(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(e._isDefaultSymbolDerived=!0),e._set("portal",this.portal);const t=(0,n.d9)(this.uniqueValueInfos),s=(0,n.d9)(this.uniqueValueGroups);return this.styleOrigin&&(e._set("styleOrigin",Object.freeze((0,n.d9)(this.styleOrigin))),Object.freeze(t),Object.freeze(s)),e._set("uniqueValueInfos",t),e._updateValueInfoMap(),e._set("uniqueValueGroups",s),e._isInfosSource=this._isInfosSource,e._watchUniqueValueInfosAndGroups(),e}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}async collectRequiredFields(e,t){const s=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(s)}async collectSymbolFields(e,t){const s=[...this.getSymbols().map((s=>s.collectRequiredFields(e,t))),(0,v.io)(e,t,this.valueExpression)];(0,v.AB)(e,t,this.field),(0,v.AB)(e,t,this.field2),(0,v.AB)(e,t,this.field3),await Promise.all(s)}populateFromStyle(){return(0,U.n2)(this.styleOrigin,{portal:this.portal}).then((e=>{const t=[];return this._valueInfoMap={},e&&e.data&&Array.isArray(e.data.items)&&e.data.items.forEach((s=>{const i=new L.Z({styleUrl:e.styleUrl,styleName:e.styleName,portal:this.portal,name:s.name});this.defaultSymbol||s.name!==e.data.defaultItem||(this.defaultSymbol=i,this._isDefaultSymbolDerived=!0);const l=new Z.Z({value:s.name,symbol:i});t.push(l),this._valueInfoMap[s.name]=l})),this._set("uniqueValueInfos",Object.freeze(t)),this._updateGroupsFromInfos(!0),this._isInfosSource=null,this._watchUniqueValueInfos(),!this.defaultSymbol&&this.uniqueValueInfos?.length&&(this.defaultSymbol=this.uniqueValueInfos[0].symbol,this._isDefaultSymbolDerived=!0),this}))}_updateFieldDelimiter(){this.field&&this.field2&&!this.fieldDelimiter&&this._set("fieldDelimiter",",")}_updateUniqueValues(){null!=this._isInfosSource&&(this._isInfosSource?this._updateGroupsFromInfos():this._updateInfosFromGroups())}_updateValueInfoMap(){this._valueInfoMap={};const{uniqueValueInfos:e}=this;if(e)for(const t of e)this._valueInfoMap[t.value+""]=t}_watchUniqueValueInfosAndGroups(){this._watchUniqueValueInfos(),this._watchUniqueValueGroups()}_watchUniqueValueInfos(){this.removeHandles(N);const{uniqueValueInfos:e}=this;if(e){const t=[];for(const s of e)t.push((0,u.YP)((()=>({symbol:s.symbol,value:s.value,label:s.label,description:s.description})),((e,t)=>{e!==t&&(this._updateGroupsFromInfos(),this._isInfosSource=!0)}),{sync:!0}));this.addHandles(t,N)}}_watchUniqueValueGroups(){this.removeHandles(R);const{uniqueValueGroups:e}=this;if(e){const t=[];for(const s of e){t.push((0,u.YP)((()=>({classes:s.classes})),((e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)}),{sync:!0}));for(const e of s.classes??[])t.push((0,u.YP)((()=>({symbol:e.symbol,values:e.values,label:e.label,description:e.description})),((e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)}),{sync:!0}))}this.addHandles(t,R)}}_updateInfosFromGroups(){if(!this.uniqueValueGroups)return this._set("uniqueValueInfos",null),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const e=[],{field:t,field2:s,field3:i,fieldDelimiter:l,uniqueValueGroups:r,valueExpression:n}=this;if(!t&&!n)return this._set("uniqueValueInfos",e),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const o=!(!t||!s);for(const t of r)for(const r of t.classes??[]){const{symbol:t,label:n,values:a,description:u}=r;for(const r of a??[]){const{value:a,value2:p,value3:c}=r,d=[a];s&&d.push(p),i&&d.push(c);const h=o?d.join(l||""):d[0];e.push(new Z.Z({symbol:t,label:n,value:h,description:u}))}}this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._watchUniqueValueInfos()}_updateGroupsFromInfos(e=!1){if(!this.uniqueValueInfos)return this._set("uniqueValueGroups",null),void this._watchUniqueValueGroups();const{field:t,field2:s,valueExpression:i,fieldDelimiter:l,uniqueValueInfos:r}=this;if(!t&&!i||!r.length)return this._set("uniqueValueGroups",[]),void this._watchUniqueValueGroups();const n=!(!t||!s),o=r.map((e=>{const{symbol:t,label:s,value:i,description:r}=e,[o,a,u]=n?i?.toString()?.split(l||"")||[]:[i];return new F({symbol:t,label:s,description:r,values:[new z({value:o,value2:a,value3:u})]})})),a=[new T({classes:o})];e&&Object.freeze(a),this._set("uniqueValueGroups",a),this._watchUniqueValueGroups()}_getUniqueValueInfo(e,t){return this.valueExpression?this._getUnqiueValueInfoForExpression(e,t):this._getUnqiueValueInfoForFields(e)}_getUnqiueValueInfoForExpression(e,t){const{viewingMode:s,scale:i,spatialReference:l,arcade:r}=t??{};let n=this._cache.compiledFunc;const o=r.arcadeUtils;if(!n){const e=o.createSyntaxTree(this.valueExpression);n=o.createFunction(e),this._cache.compiledFunc=n}const a=o.executeFunction(n,o.createExecContext(e,o.getViewInfo({viewingMode:s,scale:i,spatialReference:l})));return this._valueInfoMap[a+""]}_getUnqiueValueInfoForFields(e){const t=this.field,s=e.attributes;let i;if("function"!=typeof t&&this.field2){const e=this.field2,l=this.field3,r=[];t&&r.push(s[t]),e&&r.push(s[e]),l&&r.push(s[l]),i=r.join(this.fieldDelimiter||"")}else"function"==typeof t?i=t(e):t&&(i=s[t]);return this._valueInfoMap[i+""]}static fromPortalStyle(e,t){const s=new k(t&&t.properties);s._set("styleOrigin",Object.freeze({styleName:e})),s._set("portal",t&&t.portal||g.Z.getDefault());const i=s.populateFromStyle();return i.catch((t=>{B.error(`#fromPortalStyle('${e}'[, ...])`,"Failed to create unique value renderer from style name",t)})),i}static fromStyleUrl(e,t){const s=new k(t&&t.properties);s._set("styleOrigin",Object.freeze({styleUrl:e}));const i=s.populateFromStyle();return i.catch((t=>{B.error(`#fromStyleUrl('${e}'[, ...])`,"Failed to create unique value renderer from style URL",t)})),i}};(0,i._)([(0,p.Cb)({readOnly:!0})],G.prototype,"_cache",null),(0,i._)([(0,d.J)({uniqueValue:"unique-value"})],G.prototype,"type",void 0),(0,i._)([(0,p.Cb)(V.KK)],G.prototype,"backgroundFillSymbol",void 0),(0,i._)([(0,p.Cb)({value:null,json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],G.prototype,"field",null),(0,i._)([(0,c.p)("field")],G.prototype,"castField",null),(0,i._)([(0,m.c)("field")],G.prototype,"writeField",null),(0,i._)([(0,p.Cb)({type:String,value:null,json:{write:!0}})],G.prototype,"field2",null),(0,i._)([(0,p.Cb)({type:String,value:null,json:{write:!0}})],G.prototype,"field3",null),(0,i._)([(0,p.Cb)({type:Boolean,json:{name:"drawInClassOrder",default:!1,write:!0,origins:{"web-scene":{write:!1}}}})],G.prototype,"orderByClassesEnabled",void 0),(0,i._)([(0,p.Cb)({type:String,value:null,json:{write:!0}})],G.prototype,"valueExpression",null),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],G.prototype,"valueExpressionTitle",void 0),(0,i._)([(0,p.Cb)({type:S.I,json:{write:!0}})],G.prototype,"legendOptions",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],G.prototype,"defaultLabel",void 0),(0,i._)([(0,p.Cb)((0,a.RH)({...V.Gn},{json:{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}},origins:{"web-scene":{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}}}}}}))],G.prototype,"defaultSymbol",null),(0,i._)([(0,p.Cb)({type:String,value:null,json:{write:!0}})],G.prototype,"fieldDelimiter",null),(0,i._)([(0,p.Cb)({type:g.Z,readOnly:!0})],G.prototype,"portal",void 0),(0,i._)([(0,h.r)("portal",["styleName"])],G.prototype,"readPortal",null),(0,i._)([(0,p.Cb)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:()=>({enabled:!0})}}})],G.prototype,"styleOrigin",void 0),(0,i._)([(0,h.r)("styleOrigin",["styleName","styleUrl"])],G.prototype,"readStyleOrigin",null),(0,i._)([(0,m.c)("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],G.prototype,"writeStyleOrigin",null),(0,i._)([(0,p.Cb)({type:[T],json:{read:{source:["uniqueValueGroups","uniqueValueInfos"],reader:(e,t,s)=>(t.uniqueValueGroups||function(e){const{field1:t,field2:s,field3:i,fieldDelimiter:l,uniqueValueInfos:r,valueExpression:n}=e,o=!(!t||!s);return[{classes:(r??[]).map((e=>{const{symbol:r,label:a,value:u,description:p}=e,[c,d,h]=o?u?.toString()?.split(l||"")||[]:[u],y=[];return(t||n)&&y.push(c),s&&y.push(d),i&&y.push(h),{symbol:r,label:a,values:[y],description:p}}))}]}(t)).map((e=>T.fromJSON(e,s)))},write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],G.prototype,"uniqueValueGroups",null),(0,i._)([(0,p.Cb)({type:[Z.Z],json:{read:!1,write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],G.prototype,"uniqueValueInfos",null),G=k=(0,i._)([(0,y.j)(M)],G);const $=G},41733:(e,t,s)=>{s.d(t,{W:()=>D});var i=s(43697),l=s(5600),r=s(75215),n=(s(67676),s(80442),s(71715)),o=s(52011),a=s(30556),u=s(35671);const p=/^hash\(\$feature\['((\\'|[^'])+)'\]\) \* 8\.381e-8$/;var c,d=s(77997),h=s(21849);let y=c=class extends d.Z{constructor(e){super(e),this.type="color",this.normalizationField=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null}}set stops(e){e&&Array.isArray(e)&&(e=e.filter((e=>!!e))).sort(((e,t)=>e.value-t.value)),this._set("stops",e)}clone(){return new c({field:this.field,normalizationField:this.normalizationField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,stops:this.stops&&this.stops.map((e=>e.clone())),legendOptions:this.legendOptions&&this.legendOptions.clone()})}getAttributeHash(){return`${super.getAttributeHash()}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map((e=>e.value||0))}};(0,i._)([(0,l.Cb)({readOnly:!0})],y.prototype,"cache",null),(0,i._)([(0,l.Cb)({type:["color"],json:{type:["colorInfo"]}})],y.prototype,"type",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"normalizationField",void 0),(0,i._)([(0,l.Cb)({type:[h.Z],json:{write:!0}})],y.prototype,"stops",null),y=c=(0,i._)([(0,o.j)("esri.renderers.visualVariables.ColorVariable")],y);const m=y;var f,b=s(96674),v=s(65242);let g=f=class extends b.wq{constructor(e){super(e),this.label=null,this.opacity=null,this.value=null}readOpacity(e,t){return(0,v.b)(t.transparency)}writeOpacity(e,t,s){t[s]=(0,v.a)(e)}clone(){return new f({label:this.label,opacity:this.opacity,value:this.value})}};(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],g.prototype,"label",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{type:r.z8,write:{target:"transparency"}}})],g.prototype,"opacity",void 0),(0,i._)([(0,n.r)("opacity",["transparency"])],g.prototype,"readOpacity",null),(0,i._)([(0,a.c)("opacity")],g.prototype,"writeOpacity",null),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],g.prototype,"value",void 0),g=f=(0,i._)([(0,o.j)("esri.renderers.visualVariables.support.OpacityStop")],g);const w=g;var _;let V=_=class extends d.Z{constructor(e){super(e),this.type="opacity",this.normalizationField=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null}}set stops(e){e&&Array.isArray(e)&&(e=e.filter((e=>!!e))).sort(((e,t)=>e.value-t.value)),this._set("stops",e)}clone(){return new _({field:this.field,normalizationField:this.normalizationField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,stops:this.stops&&this.stops.map((e=>e.clone())),legendOptions:this.legendOptions&&this.legendOptions.clone()})}getAttributeHash(){return`${super.getAttributeHash()}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map((e=>e.value||0))}};(0,i._)([(0,l.Cb)({readOnly:!0})],V.prototype,"cache",null),(0,i._)([(0,l.Cb)({type:["opacity"],json:{type:["transparencyInfo"]}})],V.prototype,"type",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],V.prototype,"normalizationField",void 0),(0,i._)([(0,l.Cb)({type:[w],json:{write:!0}})],V.prototype,"stops",null),V=_=(0,i._)([(0,o.j)("esri.renderers.visualVariables.OpacityVariable")],V);const S=V;var x=s(89513),C=s(23847),I=s(92036),j=s(35454),z=s(92604),q=s(20941);const F={color:m,size:C.Z,opacity:S,rotation:x.Z},E=new j.X({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"}),T=/^\[([^\]]+)\]$/i;let k=class extends I.Z{constructor(){super(...arguments),this.colorVariables=null,this.opacityVariables=null,this.rotationVariables=null,this.sizeVariables=null}set visualVariables(e){if(this._resetVariables(),(e=e&&e.filter((e=>!!e)))&&e.length){for(const t of e)switch(t.type){case"color":this.colorVariables.push(t);break;case"opacity":this.opacityVariables.push(t);break;case"rotation":this.rotationVariables.push(t);break;case"size":this.sizeVariables.push(t)}this.sizeVariables.length&&this.sizeVariables.some((e=>!!e.target))&&e.sort(((e,t)=>{let s=null;return s=e.target===t.target?0:e.target?1:-1,s}));for(let t=0;t<e.length;t++)e[t].index=t;this._set("visualVariables",e)}else this._set("visualVariables",e)}readVariables(e,t,s){const{rotationExpression:i,rotationType:l}=t,r=i&&i.match(T),n=r&&r[1];if(n&&(e||(e=[]),e.push({type:"rotationInfo",rotationType:l,field:n})),e)return e.map((e=>{const t=E.read(e.type),i=F[t];i||(z.Z.getLogger(this).warn(`Unknown variable type: ${t}`),s&&s.messages&&s.messages.push(new q.Z("visual-variable:unsupported",`visualVariable of type '${t}' is not supported`,{definition:e,context:s})));const l=new i;return l.read(e,s),l}))}writeVariables(e,t){const s=[];for(const i of e){const e=i.toJSON(t);e&&s.push(e)}return s}_resetVariables(){this.colorVariables=[],this.opacityVariables=[],this.rotationVariables=[],this.sizeVariables=[]}};(0,i._)([(0,l.Cb)()],k.prototype,"visualVariables",null),k=(0,i._)([(0,o.j)("esri.renderers.visualVariables.VisualVariableFactory")],k);const Z=k,O={base:d.Z,key:"type",typeMap:{opacity:S,color:m,rotation:x.Z,size:C.Z}},D=e=>{let t=class extends e{constructor(){super(...arguments),this._vvFactory=new Z}set visualVariables(e){this._vvFactory.visualVariables=e,this._set("visualVariables",this._vvFactory.visualVariables)}readVisualVariables(e,t,s){return this._vvFactory.readVariables(e,t,s)}writeVisualVariables(e,t,s,i){t[s]=this._vvFactory.writeVariables(e,i)}get arcadeRequiredForVisualVariables(){if(!this.visualVariables)return!1;for(const e of this.visualVariables)if(e.arcadeRequired)return!0;return!1}hasVisualVariables(e,t){return e?this.getVisualVariablesForType(e,t).length>0:this.getVisualVariablesForType("size",t).length>0||this.getVisualVariablesForType("color",t).length>0||this.getVisualVariablesForType("opacity",t).length>0||this.getVisualVariablesForType("rotation",t).length>0}getVisualVariablesForType(e,t){const s=this.visualVariables;return s?s.filter((s=>s.type===e&&("string"==typeof t?s.target===t:!1!==t||!s.target))):[]}async collectVVRequiredFields(e,t){let s=[];this.visualVariables&&(s=s.concat(this.visualVariables));for(const i of s)i&&(i.field&&(0,u.AB)(e,t,i.field),i.normalizationField&&(0,u.AB)(e,t,i.normalizationField),i.valueExpression&&(U(i.valueExpression,e,t)||await(0,u.io)(e,t,i.valueExpression)))}};return(0,i._)([(0,l.Cb)({types:[O],value:null,json:{write:!0}})],t.prototype,"visualVariables",null),(0,i._)([(0,n.r)("visualVariables",["visualVariables","rotationType","rotationExpression"])],t.prototype,"readVisualVariables",null),(0,i._)([(0,a.c)("visualVariables")],t.prototype,"writeVisualVariables",null),t=(0,i._)([(0,o.j)("esri.renderers.mixins.VisualVariablesMixin")],t),t};function U(e,t,s){const i=(l=e,l.match(p)?.[1]?.replace(/\\'/g,"'")??null);var l;return null!=i&&((0,u.AB)(t,s,i),!0)}},69237:(e,t,s)=>{s.d(t,{Z:()=>T});var i,l=s(43697),r=s(35454),n=s(96674),o=s(22974),a=s(5600),u=s(75215),p=s(71715),c=s(52011);s(67676),s(80442);let d=i=class extends n.wq{constructor(e){super(e),this.minValue=0,this.maxValue=0}clone(){return new i({minValue:this.minValue,maxValue:this.maxValue})}};var h;(0,l._)([(0,a.Cb)({type:Number,json:{write:!0}})],d.prototype,"minValue",void 0),(0,l._)([(0,a.Cb)({type:Number,json:{write:!0}})],d.prototype,"maxValue",void 0),d=i=(0,l._)([(0,c.j)("esri.renderer.support.AuthoringInfoClassBreakInfo")],d);let y=h=class extends n.wq{constructor(e){super(e),this.field="",this.normalizationField="",this.label="",this.classBreakInfos=[]}clone(){return new h({field:this.field,normalizationField:this.normalizationField,label:this.label,classBreakInfos:(0,o.d9)(this.classBreakInfos)})}};(0,l._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"field",void 0),(0,l._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"normalizationField",void 0),(0,l._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"label",void 0),(0,l._)([(0,a.Cb)({type:[d],json:{write:!0}})],y.prototype,"classBreakInfos",void 0),y=h=(0,l._)([(0,c.j)("esri.renderers.support.AuthoringInfoFieldInfo")],y);var m,f=s(90578);const b=new r.X({percentTotal:"percent-of-total",ratio:"ratio",percent:"percent"}),v=new r.X({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),g={key:e=>"number"==typeof e?"number":"string",typeMap:{number:Number,string:String},base:null},w=["high-to-low","above-and-below","centered-on","extremes"],_=[...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"])],V=["seconds","minutes","hours","days","months","years"];let S=m=class extends n.wq{constructor(e){super(e),this.endTime=null,this.field=null,this.maxSliderValue=null,this.minSliderValue=null,this.startTime=null,this.type=null,this.units=null}castEndTime(e){return"string"==typeof e||"number"==typeof e?e:null}castStartTime(e){return"string"==typeof e||"number"==typeof e?e:null}get style(){return"color"===this.type?this._get("style"):null}set style(e){this._set("style",e)}get theme(){return"color"===this.type||"size"===this.type?this._get("theme")||"high-to-low":null}set theme(e){this._set("theme",e)}clone(){return new m({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})}};(0,l._)([(0,a.Cb)({types:g,json:{write:!0}})],S.prototype,"endTime",void 0),(0,l._)([(0,f.p)("endTime")],S.prototype,"castEndTime",null),(0,l._)([(0,a.Cb)({type:String,json:{write:!0}})],S.prototype,"field",void 0),(0,l._)([(0,a.Cb)({type:Number,json:{write:!0}})],S.prototype,"maxSliderValue",void 0),(0,l._)([(0,a.Cb)({type:Number,json:{write:!0}})],S.prototype,"minSliderValue",void 0),(0,l._)([(0,a.Cb)({types:g,json:{write:!0}})],S.prototype,"startTime",void 0),(0,l._)([(0,f.p)("startTime")],S.prototype,"castStartTime",null),(0,l._)([(0,a.Cb)({type:b.apiValues,value:null,json:{type:b.jsonValues,read:b.read,write:b.write}})],S.prototype,"style",null),(0,l._)([(0,a.Cb)({type:_,value:null,json:{type:_,origins:{"web-scene":{type:w,write:{writer:(e,t)=>{w.includes(e)&&(t.theme=e)}}}},write:!0}})],S.prototype,"theme",null),(0,l._)([(0,a.Cb)({type:v.apiValues,json:{type:v.jsonValues,read:v.read,write:v.write}})],S.prototype,"type",void 0),(0,l._)([(0,a.Cb)({type:V,json:{type:V,write:!0}})],S.prototype,"units",void 0),S=m=(0,l._)([(0,c.j)("esri.renderers.support.AuthoringInfoVisualVariable")],S);const x=S;var C,I=s(94593);const j=new r.X({esriClassifyDefinedInterval:"defined-interval",esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation"}),z=new r.X({pieChart:"pie-chart",classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size",relationship:"relationship",predominance:"predominance",dotDensity:"dot-density",flow:"flow"}),q=new r.X({classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size",relationship:"relationship",predominance:"predominance",dotDensity:"dot-density"}),F=["inches","feet","yards","miles","nautical-miles","millimeters","centimeters","decimeters","meters","kilometers","decimal-degrees"];let E=C=class extends n.wq{constructor(e){super(e),this.colorRamp=null,this.fadeRatio=null,this.isAutoGenerated=!1,this.lengthUnit=null,this.maxSliderValue=null,this.minSliderValue=null,this.visualVariables=null}get classificationMethod(){const e=this._get("classificationMethod"),t=this.type;return t&&"relationship"!==t?"class-breaks-size"===t||"class-breaks-color"===t?e||"manual":null:e}set classificationMethod(e){this._set("classificationMethod",e)}readColorRamp(e){return e?(0,I.i)(e):void 0}get fields(){return this.type&&"predominance"!==this.type?null:this._get("fields")}set fields(e){this._set("fields",e)}get field1(){return this.type&&"relationship"!==this.type?null:this._get("field1")}set field1(e){this._set("field1",e)}get field2(){return this.type&&"relationship"!==this.type?null:this._get("field2")}set field2(e){this._set("field2",e)}get flowTheme(){return"flow"===this.type?this._get("flowTheme"):null}set flowTheme(e){this._set("flowTheme",e)}get focus(){return this.type&&"relationship"!==this.type?null:this._get("focus")}set focus(e){this._set("focus",e)}get numClasses(){return this.type&&"relationship"!==this.type?null:this._get("numClasses")}set numClasses(e){this._set("numClasses",e)}get statistics(){return"univariate-color-size"===this.type&&"above-and-below"===this.univariateTheme?this._get("statistics"):null}set statistics(e){this._set("statistics",e)}get standardDeviationInterval(){const e=this.type;return e&&"relationship"!==e&&"class-breaks-size"!==e&&"class-breaks-color"!==e||this.classificationMethod&&"standard-deviation"!==this.classificationMethod?null:this._get("standardDeviationInterval")}set standardDeviationInterval(e){this._set("standardDeviationInterval",e)}get type(){return this._get("type")}set type(e){let t=e;"classed-size"===e?t="class-breaks-size":"classed-color"===e&&(t="class-breaks-color"),this._set("type",t)}get univariateSymbolStyle(){return"univariate-color-size"===this.type&&"above-and-below"===this.univariateTheme?this._get("univariateSymbolStyle"):null}set univariateSymbolStyle(e){this._set("univariateSymbolStyle",e)}get univariateTheme(){return"univariate-color-size"===this.type?this._get("univariateTheme"):null}set univariateTheme(e){this._set("univariateTheme",e)}clone(){return new C({classificationMethod:this.classificationMethod,colorRamp:(0,o.d9)(this.colorRamp),fadeRatio:(0,o.d9)(this.fadeRatio),fields:this.fields&&this.fields.slice(0),field1:(0,o.d9)(this.field1),field2:(0,o.d9)(this.field2),isAutoGenerated:this.isAutoGenerated,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((e=>e.clone())),univariateSymbolStyle:this.univariateSymbolStyle,univariateTheme:this.univariateTheme,flowTheme:this.flowTheme})}};(0,l._)([(0,a.Cb)({type:j.apiValues,value:null,json:{type:j.jsonValues,read:j.read,write:j.write,origins:{"web-document":{default:"manual",type:j.jsonValues,read:j.read,write:j.write}}}})],E.prototype,"classificationMethod",null),(0,l._)([(0,a.Cb)({types:I.V,json:{write:!0}})],E.prototype,"colorRamp",void 0),(0,l._)([(0,p.r)("colorRamp")],E.prototype,"readColorRamp",null),(0,l._)([(0,a.Cb)({json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],E.prototype,"fadeRatio",void 0),(0,l._)([(0,a.Cb)({type:[String],value:null,json:{write:!0}})],E.prototype,"fields",null),(0,l._)([(0,a.Cb)({type:y,value:null,json:{write:!0}})],E.prototype,"field1",null),(0,l._)([(0,a.Cb)({type:y,value:null,json:{write:!0}})],E.prototype,"field2",null),(0,l._)([(0,a.Cb)({type:["flow-line","wave-front"],value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],E.prototype,"flowTheme",null),(0,l._)([(0,a.Cb)({type:["HH","HL","LH","LL"],value:null,json:{write:!0}})],E.prototype,"focus",null),(0,l._)([(0,a.Cb)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1}}}})],E.prototype,"isAutoGenerated",void 0),(0,l._)([(0,a.Cb)({type:Number,value:null,json:{type:u.z8,write:!0}})],E.prototype,"numClasses",null),(0,l._)([(0,a.Cb)({type:F,json:{type:F,read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],E.prototype,"lengthUnit",void 0),(0,l._)([(0,a.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],E.prototype,"maxSliderValue",void 0),(0,l._)([(0,a.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],E.prototype,"minSliderValue",void 0),(0,l._)([(0,a.Cb)({type:Object,value:null,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],E.prototype,"statistics",null),(0,l._)([(0,a.Cb)({type:[.25,.33,.5,1],value:null,json:{type:[.25,.33,.5,1],write:!0}})],E.prototype,"standardDeviationInterval",null),(0,l._)([(0,a.Cb)({type:z.apiValues,value:null,json:{type:z.jsonValues,read:z.read,write:z.write,origins:{"web-scene":{type:q.jsonValues,write:{writer:q.write,overridePolicy:e=>({enabled:"flow"!==e})}}}}})],E.prototype,"type",null),(0,l._)([(0,a.Cb)({type:[x],json:{write:!0}})],E.prototype,"visualVariables",void 0),(0,l._)([(0,a.Cb)({type:["caret","circle-caret","arrow","circle-arrow","plus-minus","circle-plus-minus","square","circle","triangle","happy-sad","thumb","custom"],value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],E.prototype,"univariateSymbolStyle",null),(0,l._)([(0,a.Cb)({type:["high-to-low","above-and-below","above","below","90-10"],value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],E.prototype,"univariateTheme",null),E=C=(0,l._)([(0,c.j)("esri.renderers.support.AuthoringInfo")],E);const T=E},32984:(e,t,s)=>{s.d(t,{Z:()=>p});var i,l=s(43697),r=s(96674),n=s(5600),o=(s(75215),s(67676),s(80442),s(52011)),a=s(9833);let u=i=class extends r.wq{constructor(e){super(e),this.description=null,this.label=null,this.minValue=null,this.maxValue=0,this.symbol=null}clone(){return new i({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,symbol:this.symbol?this.symbol.clone():null})}getMeshHash(){const e=JSON.stringify(this.symbol);return`${this.minValue}.${this.maxValue}.${e}`}};(0,l._)([(0,n.Cb)({type:String,json:{write:!0}})],u.prototype,"description",void 0),(0,l._)([(0,n.Cb)({type:String,json:{write:!0}})],u.prototype,"label",void 0),(0,l._)([(0,n.Cb)({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],u.prototype,"minValue",void 0),(0,l._)([(0,n.Cb)({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],u.prototype,"maxValue",void 0),(0,l._)([(0,n.Cb)(a.Gn)],u.prototype,"symbol",void 0),u=i=(0,l._)([(0,o.j)("esri.renderers.support.ClassBreakInfo")],u);const p=u},66338:(e,t,s)=>{s.d(t,{I:()=>a});var i,l=s(43697),r=s(96674),n=s(5600),o=(s(75215),s(67676),s(80442),s(52011));let a=i=class extends r.wq{constructor(){super(...arguments),this.title=null}clone(){return new i({title:this.title})}};(0,l._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),a=i=(0,l._)([(0,o.j)("esri.renderers.support.LegendOptions")],a)},44262:(e,t,s)=>{s.d(t,{Z:()=>p});var i,l=s(43697),r=s(96674),n=s(5600),o=(s(75215),s(67676),s(80442),s(52011)),a=s(9833);let u=i=class extends r.wq{constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.value=null}clone(){return new i({value:this.value,description:this.description,label:this.label,symbol:this.symbol?this.symbol.clone():null})}getMeshHash(){const e=JSON.stringify(this.symbol&&this.symbol.toJSON());return`${this.value}.${e}`}};(0,l._)([(0,n.Cb)({type:String,json:{write:!0}})],u.prototype,"description",void 0),(0,l._)([(0,n.Cb)({type:String,json:{write:!0}})],u.prototype,"label",void 0),(0,l._)([(0,n.Cb)(a.Gn)],u.prototype,"symbol",void 0),(0,l._)([(0,n.Cb)(a.GY)],u.prototype,"value",void 0),u=i=(0,l._)([(0,o.j)("esri.renderers.support.UniqueValueInfo")],u);const p=u},9833:(e,t,s)=>{s.d(t,{GY:()=>p,Gn:()=>a,KK:()=>u});var i=s(9790),l=s(63213),r=s(21878),n=s(89164),o=s(86114);const a={types:i.QT,json:{write:{writer:r.cW},origins:{"web-scene":{types:i.f_,write:{writer:r.cW},read:{reader:(0,l.d)({types:i.f_})}}}}},u={types:{base:n.Z,key:"type",typeMap:{"simple-fill":i.LB.typeMap["simple-fill"],"picture-fill":i.LB.typeMap["picture-fill"],"polygon-3d":i.LB.typeMap["polygon-3d"]}},json:{write:{writer:r.cW},origins:{"web-scene":{type:o.Z,write:{writer:r.cW}}}}},p={cast:e=>null==e||"string"==typeof e||"number"==typeof e?e:`${e}`,json:{type:String,write:{writer:(e,t)=>{t.value=e?.toString()}}}}},89513:(e,t,s)=>{s.d(t,{Z:()=>c});var i,l=s(43697),r=s(20102),n=s(5600),o=(s(75215),s(67676),s(80442),s(52011)),a=s(30556),u=s(77997);let p=i=class extends u.Z{constructor(e){super(e),this.axis=null,this.type="rotation",this.rotationType="geographic",this.valueExpressionTitle=null}get cache(){return{hasExpression:!!this.valueExpression,compiledFunc:null}}writeValueExpressionTitleWebScene(e,t,s,i){if(i&&i.messages){const e=`visualVariables[${this.index}]`;i.messages.push(new r.Z("property:unsupported",this.type+"VisualVariable.valueExpressionTitle is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:e+".valueExpressionTitle",context:i}))}}clone(){return new i({axis:this.axis,rotationType:this.rotationType,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,legendOptions:this.legendOptions&&this.legendOptions.clone()})}};(0,l._)([(0,n.Cb)({readOnly:!0})],p.prototype,"cache",null),(0,l._)([(0,n.Cb)({type:["heading","tilt","roll"],json:{origins:{"web-scene":{default:"heading",write:!0}}}})],p.prototype,"axis",void 0),(0,l._)([(0,n.Cb)({type:["rotation"],json:{type:["rotationInfo"]}})],p.prototype,"type",void 0),(0,l._)([(0,n.Cb)({type:["geographic","arithmetic"],json:{write:!0,origins:{"web-document":{write:!0,default:"geographic"}}}})],p.prototype,"rotationType",void 0),(0,l._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"valueExpressionTitle",void 0),(0,l._)([(0,a.c)("web-scene","valueExpressionTitle")],p.prototype,"writeValueExpressionTitleWebScene",null),p=i=(0,l._)([(0,o.j)("esri.renderers.visualVariables.RotationVariable")],p);const c=p},23847:(e,t,s)=>{s.d(t,{Z:()=>j});var i,l=s(43697),r=s(20102),n=s(35454),o=s(92604),a=s(62357),u=s(5600),p=s(90578),c=s(71715),d=s(52011),h=s(30556),y=s(77997),m=s(30856),f=(s(75215),s(67676),s(80442),s(58439));let b=i=class extends f.Z{constructor(){super(...arguments),this.customValues=null}clone(){return new i({title:this.title,showLegend:this.showLegend,customValues:this.customValues&&this.customValues.slice(0)})}};(0,l._)([(0,u.Cb)({type:[Number],json:{write:!0}})],b.prototype,"customValues",void 0),b=i=(0,l._)([(0,d.j)("esri.renderers.visualVariables.support.SizeVariableLegendOptions")],b);const v=b;var g,w=s(51706),_=s(28101);const V=new n.X({width:"width",depth:"depth",height:"height",widthAndDepth:"width-and-depth",all:"all"}),S=new n.X({unknown:"unknown",inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers","decimal-degree":"decimal-degrees"});function x(e){if(null!=e)return"string"==typeof e||"number"==typeof e?(0,a.t_)(e):"size"===e.type?(0,w.iY)(e)?e:(delete(e={...e}).type,new I(e)):void 0}function C(e,t,s){if("object"!=typeof e)return e;const i=new I;return i.read(e,s),i}let I=g=class extends y.Z{constructor(e){super(e),this.axis=null,this.legendOptions=null,this.normalizationField=null,this.scaleBy=null,this.target=null,this.type="size",this.useSymbolValue=null,this.valueExpression=null,this.valueRepresentation=null,this.valueUnit=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null,isScaleDriven:null!=this.valueExpression&&_.B3.test(this.valueExpression)}}set expression(e){o.Z.getLogger(this).warn("'expression' is deprecated since version 4.2. Use 'valueExpression' instead. The only supported expression is 'view.scale'."),"view.scale"===e?(this.valueExpression="$view.scale",this._set("expression",e)):this._set("expression",null)}set index(e){(0,w.iY)(this.maxSize)&&(this.maxSize.index=`visualVariables[${e}].maxSize`),(0,w.iY)(this.minSize)&&(this.minSize.index=`visualVariables[${e}].minSize`),this._set("index",e)}get inputValueType(){return(0,w.PS)(this)}set maxDataValue(e){e&&this.stops&&(o.Z.getLogger(this).warn("cannot set maxDataValue when stops is not null."),e=null),this._set("maxDataValue",e)}set maxSize(e){e&&this.stops&&(o.Z.getLogger(this).warn("cannot set maxSize when stops is not null."),e=null),this._set("maxSize",e)}castMaxSize(e){return x(e)}readMaxSize(e,t,s){return C(e,0,s)}set minDataValue(e){e&&this.stops&&(o.Z.getLogger(this).warn("cannot set minDataValue when stops is not null."),e=null),this._set("minDataValue",e)}set minSize(e){e&&this.stops&&(o.Z.getLogger(this).warn("cannot set minSize when stops is not null."),e=null),this._set("minSize",e)}castMinSize(e){return x(e)}readMinSize(e,t,s){return C(e,0,s)}get arcadeRequired(){return!!this.valueExpression||null!=this.minSize&&"object"==typeof this.minSize&&this.minSize.arcadeRequired||null!=this.maxSize&&"object"==typeof this.maxSize&&this.maxSize.arcadeRequired}set stops(e){null==this.minDataValue&&null==this.maxDataValue&&null==this.minSize&&null==this.maxSize?e&&Array.isArray(e)&&(e=e.filter((e=>!!e))).sort(((e,t)=>e.value-t.value)):e&&(o.Z.getLogger(this).warn("cannot set stops when one of minDataValue, maxDataValue, minSize or maxSize is not null."),e=null),this._set("stops",e)}get transformationType(){return(0,w.QW)(this,this.inputValueType)}readValueExpression(e,t){return e||t.expression&&"$view.scale"}writeValueExpressionWebScene(e,t,s,i){if("$view.scale"===e){if(i&&i.messages){const e=this.index,t="string"==typeof e?e:`visualVariables[${e}]`;i.messages.push(new r.Z("property:unsupported",this.type+"VisualVariable.valueExpression = '$view.scale' is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:t+".valueExpression",context:i}))}}else t[s]=e}readValueUnit(e){return e?S.read(e):null}clone(){return new g({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,maxDataValue:this.maxDataValue,maxSize:(0,w.iY)(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:(0,w.iY)(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:this.stops&&this.stops.map((e=>e.clone())),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:this.legendOptions&&this.legendOptions.clone()})}flipSizes(){if(this.transformationType===w.hL.ClampedLinear){const{minSize:e,maxSize:t}=this;return this.minSize=t,this.maxSize=e,this}if(this.transformationType===w.hL.Stops){const e=this.stops;if(!e)return this;const t=e.map((e=>e.size)).reverse(),s=e.length;for(let i=0;i<s;i++)e[i].size=t[i];return this}return this}getAttributeHash(){return`${super.getAttributeHash()}-${this.target}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map((e=>e.value||0))}};(0,l._)([(0,u.Cb)({readOnly:!0})],I.prototype,"cache",null),(0,l._)([(0,u.Cb)({type:V.apiValues,json:{type:V.jsonValues,origins:{"web-map":{read:!1}},read:V.read,write:V.write}})],I.prototype,"axis",void 0),(0,l._)([(0,u.Cb)({type:String,value:null,json:{read:!1}})],I.prototype,"expression",null),(0,l._)([(0,u.Cb)()],I.prototype,"index",null),(0,l._)([(0,u.Cb)({type:String,readOnly:!0})],I.prototype,"inputValueType",null),(0,l._)([(0,u.Cb)({type:v,json:{write:!0}})],I.prototype,"legendOptions",void 0),(0,l._)([(0,u.Cb)({type:Number,value:null,json:{write:!0}})],I.prototype,"maxDataValue",null),(0,l._)([(0,u.Cb)({type:Number,value:null,json:{write:!0}})],I.prototype,"maxSize",null),(0,l._)([(0,p.p)("maxSize")],I.prototype,"castMaxSize",null),(0,l._)([(0,c.r)("maxSize")],I.prototype,"readMaxSize",null),(0,l._)([(0,u.Cb)({type:Number,value:null,json:{write:!0}})],I.prototype,"minDataValue",null),(0,l._)([(0,u.Cb)({type:Number,value:null,json:{write:!0}})],I.prototype,"minSize",null),(0,l._)([(0,p.p)("minSize")],I.prototype,"castMinSize",null),(0,l._)([(0,c.r)("minSize")],I.prototype,"readMinSize",null),(0,l._)([(0,u.Cb)({type:String,json:{write:!0}})],I.prototype,"normalizationField",void 0),(0,l._)([(0,u.Cb)({readOnly:!0})],I.prototype,"arcadeRequired",null),(0,l._)([(0,u.Cb)({type:String})],I.prototype,"scaleBy",void 0),(0,l._)([(0,u.Cb)({type:[m.Z],value:null,json:{write:!0}})],I.prototype,"stops",null),(0,l._)([(0,u.Cb)({type:["outline"],json:{write:!0}})],I.prototype,"target",void 0),(0,l._)([(0,u.Cb)({type:String,readOnly:!0})],I.prototype,"transformationType",null),(0,l._)([(0,u.Cb)({type:["size"],json:{type:["sizeInfo"]}})],I.prototype,"type",void 0),(0,l._)([(0,u.Cb)({type:Boolean,json:{write:!0,origins:{"web-map":{read:!1}}}})],I.prototype,"useSymbolValue",void 0),(0,l._)([(0,u.Cb)({type:String,json:{write:!0}})],I.prototype,"valueExpression",void 0),(0,l._)([(0,c.r)("valueExpression",["valueExpression","expression"])],I.prototype,"readValueExpression",null),(0,l._)([(0,h.c)("web-scene","valueExpression")],I.prototype,"writeValueExpressionWebScene",null),(0,l._)([(0,u.Cb)({type:["radius","diameter","area","width","distance"],json:{write:!0}})],I.prototype,"valueRepresentation",void 0),(0,l._)([(0,u.Cb)({type:S.apiValues,json:{write:S.write,origins:{"web-map":{read:!1},"web-scene":{write:!0},"portal-item":{write:!0}}}})],I.prototype,"valueUnit",void 0),(0,l._)([(0,c.r)("valueUnit")],I.prototype,"readValueUnit",null),I=g=(0,l._)([(0,d.j)("esri.renderers.visualVariables.SizeVariable")],I);const j=I},77997:(e,t,s)=>{s.d(t,{Z:()=>y});var i=s(43697),l=s(35454),r=s(96674),n=s(92604),o=s(5600),a=s(90578),u=s(52011),p=s(75215),c=s(58439);const d=new l.X({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"});let h=class extends r.wq{constructor(e){super(e),this.index=null,this.type=null,this.field=null,this.valueExpression=null,this.valueExpressionTitle=null,this.legendOptions=null}castField(e){return null==e?e:"function"==typeof e?(n.Z.getLogger(this).error(".field: field must be a string value"),null):(0,p.Zs)(e)}get arcadeRequired(){return!!this.valueExpression}clone(){}getAttributeHash(){return`${this.type}-${this.field}-${this.valueExpression}`}};(0,i._)([(0,o.Cb)()],h.prototype,"index",void 0),(0,i._)([(0,o.Cb)({type:d.apiValues,readOnly:!0,json:{read:d.read,write:d.write}})],h.prototype,"type",void 0),(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"field",void 0),(0,i._)([(0,a.p)("field")],h.prototype,"castField",null),(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"valueExpression",void 0),(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"valueExpressionTitle",void 0),(0,i._)([(0,o.Cb)({readOnly:!0})],h.prototype,"arcadeRequired",null),(0,i._)([(0,o.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"legendOptions",void 0),h=(0,i._)([(0,u.j)("esri.renderers.visualVariables.VisualVariable")],h);const y=h},21849:(e,t,s)=>{s.d(t,{Z:()=>d});var i,l=s(43697),r=s(22303),n=s(96674),o=s(5600),a=s(75215),u=(s(67676),s(80442),s(52011)),p=s(30556);let c=i=class extends n.wq{constructor(e){super(e),this.color=null,this.label=null,this.value=null}writeValue(e,t,s){t[s]=e??0}clone(){return new i({color:this.color&&this.color.clone(),label:this.label,value:this.value})}};(0,l._)([(0,o.Cb)({type:r.Z,json:{type:[a.z8],write:!0}})],c.prototype,"color",void 0),(0,l._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,l._)([(0,o.Cb)({type:Number,json:{write:{writerEnsuresNonNull:!0}}})],c.prototype,"value",void 0),(0,l._)([(0,p.c)("value")],c.prototype,"writeValue",null),c=i=(0,l._)([(0,u.j)("esri.renderers.visualVariables.support.ColorStop")],c);const d=c},30856:(e,t,s)=>{s.d(t,{Z:()=>p});var i,l=s(43697),r=s(96674),n=s(62357),o=s(5600),a=(s(75215),s(67676),s(80442),s(52011));let u=i=class extends r.wq{constructor(e){super(e),this.label=null,this.size=null,this.value=null}clone(){return new i({label:this.label,size:this.size,value:this.value})}};(0,l._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"label",void 0),(0,l._)([(0,o.Cb)({type:Number,cast:n.t_,json:{write:!0}})],u.prototype,"size",void 0),(0,l._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"value",void 0),u=i=(0,l._)([(0,a.j)("esri.renderers.visualVariables.support.SizeStop")],u);const p=u},58439:(e,t,s)=>{s.d(t,{Z:()=>u});var i,l=s(43697),r=s(5600),n=(s(75215),s(67676),s(80442),s(52011)),o=s(66338);let a=i=class extends o.I{constructor(){super(...arguments),this.showLegend=null}clone(){return new i({title:this.title,showLegend:this.showLegend})}};(0,l._)([(0,r.Cb)({type:Boolean,json:{write:!0}})],a.prototype,"showLegend",void 0),a=i=(0,l._)([(0,n.j)("esri.renderers.visualVariables.support.VisualVariableLegendOptions")],a);const u=a},28101:(e,t,s)=>{s.d(t,{B3:()=>p,PR:()=>m,cM:()=>c}),s(22303);var i=s(38171),l=s(74085),r=s(92604),n=s(99282),o=s(51706);const a=r.Z.getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),u=(new i.Z,Math.PI),p=/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i;function c(e,t,s){const i="visualVariables"in e&&e.visualVariables?e.visualVariables.find((e=>"rotation"===e.type)):e;if(!i)return;if("esri.renderers.visualVariables.RotationVariable"!==i.declaredClass)return void a.warn("The visualVariable should be an instance of esri.renderers.visualVariables.RotationVariable");const l=i.axis||"heading",r="heading"===l&&"arithmetic"===i.rotationType?90:0,n="heading"===l&&"arithmetic"===i.rotationType?-1:1,o="number"==typeof t?null:t,u=o&&o.attributes,p=i.field,{hasExpression:c}=i.cache;let d=i.cache.compiledFunc,h=0;if(!p&&!c)return h;if(c){if(null==s||null==s.arcade)return void a.error("Use of arcade expressions requires an arcade context");const e={viewingMode:s.viewingMode,scale:s.scale,spatialReference:s.spatialReference},t=s.arcade.arcadeUtils,l=t.getViewInfo(e),r=t.createExecContext(o,l);if(!d){const e=t.createSyntaxTree(i.valueExpression);d=t.createFunction(e),i.cache.compiledFunc=d}h=t.executeFunction(d,r)}else u&&(h=u[p]||0);return h="number"!=typeof h||isNaN(h)?null:r+n*h,h}function d(e,t,s){const i="visualVariables"in e&&e.visualVariables?e.visualVariables.find((e=>"size"===e.type)):e;if(!i)return;if("esri.renderers.visualVariables.SizeVariable"!==i.declaredClass)return void a.warn("The visualVariable should be an instance of esri.renderers.visualVariables.SizeVariable");const l=function(e,t,s,i,l){switch(t.transformationType){case o.hL.Additive:return function(e,t,s,i){return e+((h(t.minSize,s,i)||t.minDataValue)??0)}(e,t,s,i);case o.hL.Constant:return function(e,t,s){const i=e.stops;let l=i&&i.length&&i[0].size;return null==l&&(l=e.minSize),h(l,t,s)}(t,s,i);case o.hL.ClampedLinear:return function(e,t,s,i){const l=(e-t.minDataValue)/(t.maxDataValue-t.minDataValue),r=h(t.minSize,s,i),n=h(t.maxSize,s,i),o=null!=i?i.shape:void 0;if(e<=t.minDataValue)return r;if(e>=t.maxDataValue)return n;if(null==r||null==n)return null;if("area"===t.scaleBy&&o){const e="circle"===o,t=e?u*(r/2)**2:r*r,s=t+l*((e?u*(n/2)**2:n*n)-t);return e?2*Math.sqrt(s/u):Math.sqrt(s)}return r+l*(n-r)}(e,t,s,i);case o.hL.Proportional:return function(e,t,s,i){const l=null!=i?i.shape:void 0,r=e/t.minDataValue,n=h(t.minSize,s,i),o=h(t.maxSize,s,i);let a=null;return a="circle"===l?2*Math.sqrt(r*(n/2)**2):"square"===l||"diamond"===l||"image"===l?Math.sqrt(r*n**2):r*n,y(a,n,o)}(e,t,s,i);case o.hL.Stops:return function(e,t,s,i,l){const[r,n,o]=function(e,t){if(!t)return;let s=0,i=t.length-1;return t.some(((t,l)=>e<t?(i=l,!0):(s=l,!1))),[s,i,(e-t[s])/(t[i]-t[s])]}(e,l);if(r===n)return h(t.stops?.[r].size,s,i);{const e=h(t.stops?.[r].size,s,i);return e+(h(t.stops?.[n].size,s,i)-e)*o}}(e,t,s,i,l);case o.hL.RealWorldSize:return function(e,t,s,i){const l=(null!=i&&i.resolution?i.resolution:1)*n.a[t.valueUnit],r=h(t.minSize,s,i),o=h(t.maxSize,s,i),{valueRepresentation:a}=t;let p=null;return p="area"===a?2*Math.sqrt(e/u)/l:"radius"===a||"distance"===a?2*e/l:e/l,y(p,r,o)}(e,t,s,i);case o.hL.Identity:return e;case o.hL.Unknown:return null}}(function(e,t,s){const i="number"==typeof t,l=i?null:t,r=l&&l.attributes;let n=i?t:null;const{isScaleDriven:u}=e.cache;let p=e.cache.compiledFunc;if(u){const t=null!=s?s.scale:void 0,i=null!=s?s.view:void 0;n=null==t||"3d"===i?function(e){let t=null,s=null;const i=e.stops;return i?(t=i[0].value,s=i[i.length-1].value):(t=e.minDataValue||0,s=e.maxDataValue||0),(t+s)/2}(e):t}else if(!i)switch(e.inputValueType){case o.RY.Expression:{if(null==s||null==s.arcade)return void a.error("Use of arcade expressions requires an arcade context");const t={viewingMode:s.viewingMode,scale:s.scale,spatialReference:s.spatialReference},i=s.arcade.arcadeUtils,r=i.getViewInfo(t),o=i.createExecContext(l,r);if(!p){const t=i.createSyntaxTree(e.valueExpression);p=i.createFunction(t),e.cache.compiledFunc=p}n=i.executeFunction(p,o);break}case o.RY.Field:r&&(n=r[e.field]);break;case o.RY.Unknown:n=null}if(!(0,o.qh)(n))return null;if(i||!e.normalizationField)return n;const c=r?parseFloat(r[e.normalizationField]):null;return(0,o.qh)(c)&&0!==c?n/c:null}(i,t,s),i,t,s,i.cache.ipData);return null==l||isNaN(l)?0:l}function h(e,t,s){return null==e?null:(0,o.iY)(e)?d(e,t,s):(0,o.qh)(e)?e:null}function y(e,t,s){return(0,o.qh)(s)&&e>s?s:(0,o.qh)(t)&&e<t?t:e}function m(e,t,s){const i=["proportional","proportional","proportional"];for(const r of e){const e=r.useSymbolValue?"symbol-value":d(r,t,s);switch(r.axis){case"width":i[0]=e;break;case"depth":i[1]=e;break;case"height":i[2]=e;break;case"width-and-depth":i[0]=e,i[1]=e;break;case"all":case void 0:case null:i[0]=e,i[1]=e,i[2]=e;break;default:(0,l.Bg)(r.axis)}}return i}},98046:(e,t,s)=>{s.d(t,{Z:()=>h});var i,l=s(43697),r=s(22303),n=s(22974),o=s(5600),a=s(75215),u=s(36030),p=s(52011),c=s(899);let d=i=class extends c.Z{constructor(e){super(e),this.algorithm=null,this.fromColor=null,this.toColor=null,this.type="algorithmic"}clone(){return new i({fromColor:(0,n.d9)(this.fromColor),toColor:(0,n.d9)(this.toColor),algorithm:this.algorithm})}};(0,l._)([(0,u.J)({esriCIELabAlgorithm:"cie-lab",esriHSVAlgorithm:"hsv",esriLabLChAlgorithm:"lab-lch"})],d.prototype,"algorithm",void 0),(0,l._)([(0,o.Cb)({type:r.Z,json:{type:[a.z8],write:!0}})],d.prototype,"fromColor",void 0),(0,l._)([(0,o.Cb)({type:r.Z,json:{type:[a.z8],write:!0}})],d.prototype,"toColor",void 0),(0,l._)([(0,o.Cb)({type:["algorithmic"]})],d.prototype,"type",void 0),d=i=(0,l._)([(0,p.j)("esri.rest.support.AlgorithmicColorRamp")],d);const h=d},899:(e,t,s)=>{s.d(t,{Z:()=>a});var i=s(43697),l=s(96674),r=s(5600),n=(s(75215),s(67676),s(80442),s(52011));let o=class extends l.wq{constructor(e){super(e),this.type=null}};(0,i._)([(0,r.Cb)({readOnly:!0,json:{read:!1,write:!0}})],o.prototype,"type",void 0),o=(0,i._)([(0,n.j)("esri.rest.support.ColorRamp")],o);const a=o},1515:(e,t,s)=>{s.d(t,{Z:()=>c});var i,l=s(43697),r=s(22974),n=s(5600),o=(s(75215),s(52011)),a=s(98046),u=s(899);let p=i=class extends u.Z{constructor(e){super(e),this.colorRamps=null,this.type="multipart"}clone(){return new i({colorRamps:(0,r.d9)(this.colorRamps)})}};(0,l._)([(0,n.Cb)({type:[a.Z],json:{write:!0}})],p.prototype,"colorRamps",void 0),(0,l._)([(0,n.Cb)({type:["multipart"]})],p.prototype,"type",void 0),p=i=(0,l._)([(0,o.j)("esri.rest.support.MultipartColorRamp")],p);const c=p},94593:(e,t,s)=>{s.d(t,{V:()=>n,i:()=>o});var i=s(98046),l=s(899),r=s(1515);const n={key:"type",base:l.Z,typeMap:{algorithmic:i.Z,multipart:r.Z}};function o(e){return e&&e.type?"algorithmic"===e.type?i.Z.fromJSON(e):"multipart"===e.type?r.Z.fromJSON(e):null:null}},72245:(e,t,s)=>{s.d(t,{K3:()=>l,Rx:()=>r});var i=s(80442);const l=()=>!!(0,i.Z)("enable-feature:force-wosr"),r=()=>!!(0,i.Z)("enable-feature:SceneLayer-editing");((e="i3s-patching")=>{switch(i.Z.add("enable-i3s-patching",!1,!0,!0),i.Z.add("enable-feature:direct-3d-object-feature-layer-display",!1,!0,!0),i.Z.add("enable-feature:SceneLayer-editing",!0,!0,!0),e){case"feature-layer-view":i.Z.add("enable-feature:direct-3d-object-feature-layer-display",!0,!0,!0);break;case"i3s-patching":i.Z.add("enable-i3s-patching",!0,!0,!0)}})("i3s-patching")},21878:(e,t,s)=>{s.d(t,{im:()=>x,cW:()=>w,vX:()=>_});var i=s(9790),l=s(20102),r=s(84230),n=s(87223),o=s(59390),a=s(42143),u=s(4095),p=s(98587),c=s(77987),d=s(37898),h=s(20256),y=s(3456),m=s(86114),f=s(78724),b=s(20825);const v={retainId:!1,ignoreDrivers:!1,hasLabelingContext:!0};function g(e,t=v){if(!e)return{symbol:null};const{retainId:s=v.retainId,ignoreDrivers:r=v.ignoreDrivers,hasLabelingContext:n=v.hasLabelingContext,retainCIM:g=v.retainCIM}=t;let w=null;if((0,i.dU)(e)||e instanceof o.Z)w=e.clone();else if("cim"===e.type){const t=e.data?.symbol?.type;if("CIMPointSymbol"!==t)return{error:new l.Z("symbol-conversion:unsupported-cim-symbol",`CIM symbol of type '${t||"unknown"}' is unsupported in 3D`,{symbol:e})};w=g?e.clone():a.Z.fromCIMSymbol(e)}else if(e instanceof u.Z)w=p.Z.fromSimpleLineSymbol(e);else if(e instanceof c.Z)w=a.Z.fromSimpleMarkerSymbol(e);else if(e instanceof d.Z)w=a.Z.fromPictureMarkerSymbol(e);else if(e instanceof h.Z)w=t.geometryType&&"mesh"===t.geometryType?y.Z.fromSimpleFillSymbol(e):m.Z.fromSimpleFillSymbol(e);else{if(!(e instanceof f.Z))return{error:new l.Z("symbol-conversion:unsupported-2d-symbol",`2D symbol of type '${e.type||e.declaredClass}' is unsupported in 3D`,{symbol:e})};w=n?b.Z.fromTextSymbol(e):a.Z.fromTextSymbol(e)}return s&&w&&"cim"!==w.type&&(w.id=e.id),r&&(0,i.dU)(w)&&w.symbolLayers.forEach((e=>e.ignoreDrivers=!0)),{symbol:w}}function w(e,t,s,i){const l=S(e,{},{context:i,isLabelSymbol:!1});null!=l&&(t[s]=l)}function _(e,t,s,i){const l=S(e,{},{context:i,isLabelSymbol:!0});null!=l&&(t[s]=l)}function V(e){return e instanceof n.Z||e instanceof o.Z}function S(e,t,s){if(null==e)return null;const{context:i,isLabelSymbol:n}=s,o=i?.origin,a=i?.messages;if("web-scene"===o&&!V(e)){const s=g(e,{retainCIM:!0,hasLabelingContext:n});return null!=s.symbol?s.symbol.write(t,i):(a?.push(new l.Z("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView`,{symbol:e,context:i,error:s.error})),null)}return("web-map"===o||"portal-item"===o&&!(0,r.A2)(i?.layer))&&V(e)?(a?.push(new l.Z("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in web maps and portal items. Use 2D symbology and CIMSymbol instead when working with MapView`,{symbol:e,context:i})),null):e.write(t,i)}function x(e,t){return(0,i.S9)(e,null,t)}},27883:(e,t,s)=>{s.d(t,{EJ:()=>y,KV:()=>d,n2:()=>c,v9:()=>h,wm:()=>b});var i=s(3172),l=s(20102),r=s(95330),n=s(81271),o=s(48522),a=s(41253),u=s(72245);let p={};function c(e,t,s){return e&&null!=e.styleUrl?async function(e,t){try{return{data:(await y(e,t)).data,baseUrl:(0,n.Yd)(e),styleUrl:e}}catch(e){return(0,r.r9)(e),null}}(e.styleUrl,s):e&&null!=e.styleName?function(e,t,s){const i=null!=t.portal?t.portal:o.Z.getDefault();let r;const n=`${i.url} - ${i.user&&i.user.username} - ${e}`;return p[n]||(p[n]=function(e,t,s){return t.load(s).then((()=>{const i=new a.Z({disableExtraQuery:!0,query:`owner:${m} AND type:${f} AND typekeywords:"${e}"`});return t.queryItems(i,s)})).then((({results:t})=>{let i=null;const r=e.toLowerCase();if(t&&Array.isArray(t))for(const e of t){const t=e.typeKeywords?.some((e=>e.toLowerCase()===r));if(t&&e.type===f&&e.owner===m){i=e;break}}if(!i)throw new l.Z("symbolstyleutils:style-not-found",`The style '${e}' could not be found`,{styleName:e});return i.load(s)}))}(e,i,s).then((e=>(r=e,e.fetchData()))).then((t=>({data:t,baseUrl:r.itemUrl??"",styleName:e})))),p[n]}(e.styleName,t,s):Promise.reject(new l.Z("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function d(e){return null===e||"CIMSymbolReference"===e.type?e:{type:"CIMSymbolReference",symbol:e}}function h(e,t,s=["gltf"]){if("cimRef"===t)return e.cimRef;if(e.formatInfos&&!(0,u.K3)())for(const t of s){const s=e.formatInfos.find((e=>e.type===t));if(s)return s.href}return e.webRef}function y(e,t){const s={responseType:"json",query:{f:"json"},...t};return(0,i.default)((0,n.Fv)(e),s)}const m="esri_en",f="Style",b="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json"}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9469],{38171:(e,t,i)=>{i.d(t,{Z:()=>f});var s,l=i(43697),r=i(66577),n=i(51773),o=i(9790),a=i(2368),u=i(96674),p=i(99001),c=i(5600),d=(i(75215),i(67676),i(80442),i(52011)),h=i(33955);function y(e){if(null==e)return null;const t={};for(const i in e){const s=e[i];s&&(t[i]=s.toJSON())}return 0!==Object.keys(t).length?t:null}let m=s=class extends((0,a.J)(u.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,p.D)(),configurable:!0})}normalizeCtorArgs(e,t,i,s){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:i,popupTemplate:s}}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new s({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:y(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:{...this.attributes},popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,s){if(!this.layer||!("graphicChanged"in this.layer))return;const l={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(l.action=s),"attributes"===e&&(l.attributeName=s),this.layer.graphicChanged(l)}};(0,l._)([(0,c.Cb)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const i in e){const s=(0,h.im)(e[i]);s&&(t[i]=s)}return 0!==Object.keys(t).length?t:null}}})],m.prototype,"aggregateGeometries",null),(0,l._)([(0,c.Cb)({value:null})],m.prototype,"attributes",null),(0,l._)([(0,c.Cb)({value:null,types:r.qM,json:{read:h.im}})],m.prototype,"geometry",null),(0,l._)([(0,c.Cb)({type:Boolean})],m.prototype,"isAggregate",void 0),(0,l._)([(0,c.Cb)({clonable:"reference"})],m.prototype,"layer",void 0),(0,l._)([(0,c.Cb)({type:n.Z})],m.prototype,"popupTemplate",void 0),(0,l._)([(0,c.Cb)({clonable:"reference"})],m.prototype,"sourceLayer",void 0),(0,l._)([(0,c.Cb)({value:null,types:o.LB})],m.prototype,"symbol",null),(0,l._)([(0,c.Cb)({type:Boolean,value:!0})],m.prototype,"visible",null),m=s=(0,l._)([(0,d.j)("esri.Graphic")],m),(m||(m={})).generateUID=p.D;const f=m},74085:(e,t,i)=>{function s(e){}i.d(t,{Bg:()=>s}),i(80442)},60235:(e,t,i)=>{i.d(t,{Mr:()=>n,x9:()=>o});var s=i(80442);const l=new Set;function r(e,t,i=!1){i&&l.has(t)||(i&&l.add(t),e.warn(`🛑 DEPRECATED - ${t}`))}function n(e,t,i={}){if((0,s.Z)("esri-deprecation-warnings")){const{moduleName:s}=i;o(e,"Property: "+(s?s+"::":"")+t,i)}}function o(e,t,i={}){if((0,s.Z)("esri-deprecation-warnings")){const{replacement:s,version:l,see:n,warnOnce:o}=i;let a=t;s&&(a+=`\n\t🛠️ Replacement: ${s}`),l&&(a+=`\n\t⚙️ Version: ${l}`),n&&(a+=`\n\t🔗 See ${n} for more details.`),r(e,a,o)}}},16050:(e,t,i)=>{i.d(t,{Z:()=>z});var s,l=i(43697),r=i(9790),n=i(35454),o=i(22974),a=i(92604),u=i(5600),p=i(90578),c=i(36030),d=i(71715),h=i(52011),y=i(30556),m=i(75215),f=i(35671),b=i(5499),v=i(41733),g=i(32984),w=i(9833),_=i(66338),V=i(59266);const S="percent-of-total",x="field",C=new n.X({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:S,esriNormalizeByField:x}),I=(0,m.se)(g.Z);let j=s=class extends((0,v.W)(b.Z)){constructor(e){super(e),this._compiledValueExpression={valueExpression:null,compiledFunction:null},this.backgroundFillSymbol=null,this.classBreakInfos=null,this.defaultLabel=null,this.defaultSymbol=null,this.field=null,this.isMaxInclusive=!0,this.legendOptions=null,this.normalizationField=null,this.normalizationTotal=null,this.type="class-breaks",this.valueExpression=null,this.valueExpressionTitle=null,this._set("classBreakInfos",[])}readClassBreakInfos(e,t,i){if(!Array.isArray(e))return;let s=t.minValue;return e.map((e=>{const t=new g.Z;return t.read(e,i),null==t.minValue&&(t.minValue=s),null==t.maxValue&&(t.maxValue=t.minValue),s=t.maxValue,t}))}writeClassBreakInfos(e,t,i,s){const l=e.map((e=>e.write({},s)));this._areClassBreaksConsecutive()&&l.forEach((e=>delete e.classMinValue)),t[i]=l}castField(e){return null==e?e:"function"==typeof e?(a.Z.getLogger(this).error(".field: field must be a string value"),null):(0,m.Zs)(e)}get minValue(){return this.classBreakInfos&&this.classBreakInfos[0]&&this.classBreakInfos[0].minValue||0}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&x||i&&S||null,t&&i&&a.Z.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==x&&e!==S||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}addClassBreakInfo(e,t,i){let s=null;s="number"==typeof e?new g.Z({minValue:e,maxValue:t,symbol:(0,r.se)(i)}):I((0,o.d9)(e)),this.classBreakInfos.push(s),1===this.classBreakInfos.length&&this.notifyChange("minValue")}removeClassBreakInfo(e,t){const i=this.classBreakInfos.length;for(let s=0;s<i;s++){const i=[this.classBreakInfos[s].minValue,this.classBreakInfos[s].maxValue];if(i[0]===e&&i[1]===t){this.classBreakInfos.splice(s,1);break}}}getBreakIndex(e,t){return!this.valueExpression||null!=t&&null!=t.arcade||a.Z.getLogger(this).warn(""),this.valueExpression?this._getBreakIndexForExpression(e,t):this._getBreakIndexForField(e)}async getClassBreakInfo(e,t){let i=t;!this.valueExpression||null!=t&&null!=t.arcade||(i={...i,arcade:await(0,V.LC)()});const s=this.getBreakIndex(e,i);return-1!==s?this.classBreakInfos[s]:null}getSymbol(e,t){if(this.valueExpression&&(null==t||null==t.arcade))return void a.Z.getLogger(this).error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const i=this.getBreakIndex(e,t);return i>-1?this.classBreakInfos[i].symbol:this.defaultSymbol}async getSymbolAsync(e,t){let i=t;if(this.valueExpression&&(null==t||null==t.arcade)){const e=await(0,V.LC)(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),i={...i,arcade:e}}const s=this.getBreakIndex(e,i);return s>-1?this.classBreakInfos[s].symbol:this.defaultSymbol}getSymbols(){const e=[];return this.classBreakInfos.forEach((t=>{t.symbol&&e.push(t.symbol)})),this.defaultSymbol&&e.push(this.defaultSymbol),e}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){const e=JSON.stringify(this.backgroundFillSymbol),t=JSON.stringify(this.defaultSymbol),i=`${this.normalizationField}.${this.normalizationType}.${this.normalizationTotal}`;return`${e}.${t}.${this.classBreakInfos.reduce(((e,t)=>e+t.getMeshHash()),"")}.${i}.${this.field}.${this.valueExpression}`}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}clone(){return new s({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:(0,o.d9)(this.classBreakInfos),isMaxInclusive:this.isMaxInclusive,normalizationField:this.normalizationField,normalizationTotal:this.normalizationTotal,normalizationType:this.normalizationType,visualVariables:(0,o.d9)(this.visualVariables),legendOptions:(0,o.d9)(this.legendOptions),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}async collectRequiredFields(e,t){const i=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(i)}async collectSymbolFields(e,t){const i=[...this.getSymbols().map((i=>i.collectRequiredFields(e,t))),(0,f.io)(e,t,this.valueExpression)];(0,f.AB)(e,t,this.field),(0,f.AB)(e,t,this.normalizationField),await Promise.all(i)}_getBreakIndexForExpression(e,t){const{viewingMode:i,scale:s,spatialReference:l,arcade:r}=t??{},{valueExpression:n}=this;let o=this._compiledValueExpression.valueExpression===n?this._compiledValueExpression.compiledFunction:null;const a=r.arcadeUtils;if(!o){const e=a.createSyntaxTree(n);o=a.createFunction(e),this._compiledValueExpression.compiledFunction=o}this._compiledValueExpression.valueExpression=n;const u=a.executeFunction(o,a.createExecContext(e,a.getViewInfo({viewingMode:i,scale:s,spatialReference:l})));return this._getBreakIndexfromInfos(u)}_getBreakIndexForField(e){const t=this.field,i=e.attributes,s=this.normalizationType;let l=parseFloat(i[t]);if(s){const e=this.normalizationTotal,t=parseFloat(this.normalizationField?i[this.normalizationField]:void 0);if("log"===s)l=Math.log(l)*Math.LOG10E;else if(s!==S||null==e||isNaN(e)){if(s===x&&!isNaN(t)){if(isNaN(l)||isNaN(t))return-1;l/=t}}else l=l/e*100}return this._getBreakIndexfromInfos(l)}_getBreakIndexfromInfos(e){const t=this.isMaxInclusive;if(null!=e&&"number"==typeof e&&!isNaN(e))for(let i=0;i<this.classBreakInfos.length;i++){const s=[this.classBreakInfos[i].minValue,this.classBreakInfos[i].maxValue];if(s[0]<=e&&(t?e<=s[1]:e<s[1]))return i}return-1}_areClassBreaksConsecutive(){const e=this.classBreakInfos,t=e.length;for(let i=1;i<t;i++)if(e[i-1].maxValue!==e[i].minValue)return!1;return!0}};(0,l._)([(0,u.Cb)(w.KK)],j.prototype,"backgroundFillSymbol",void 0),(0,l._)([(0,u.Cb)({type:[g.Z]})],j.prototype,"classBreakInfos",void 0),(0,l._)([(0,d.r)("classBreakInfos")],j.prototype,"readClassBreakInfos",null),(0,l._)([(0,y.c)("classBreakInfos")],j.prototype,"writeClassBreakInfos",null),(0,l._)([(0,u.Cb)({type:String,json:{write:!0}})],j.prototype,"defaultLabel",void 0),(0,l._)([(0,u.Cb)(w.Gn)],j.prototype,"defaultSymbol",void 0),(0,l._)([(0,u.Cb)({type:String,json:{write:!0}})],j.prototype,"field",void 0),(0,l._)([(0,p.p)("field")],j.prototype,"castField",null),(0,l._)([(0,u.Cb)({type:Boolean})],j.prototype,"isMaxInclusive",void 0),(0,l._)([(0,u.Cb)({type:_.I,json:{write:!0}})],j.prototype,"legendOptions",void 0),(0,l._)([(0,u.Cb)({type:Number,readOnly:!0,value:null,json:{read:!1,write:{overridePolicy(){return 0!==this.classBreakInfos.length&&this._areClassBreaksConsecutive()?{enabled:!0}:{enabled:!1}}}}})],j.prototype,"minValue",null),(0,l._)([(0,u.Cb)({type:String,json:{write:!0}})],j.prototype,"normalizationField",void 0),(0,l._)([(0,u.Cb)({type:Number,cast:e=>(0,m.q9)(e),json:{write:!0}})],j.prototype,"normalizationTotal",void 0),(0,l._)([(0,u.Cb)({type:C.apiValues,value:null,json:{type:C.jsonValues,read:C.read,write:C.write}})],j.prototype,"normalizationType",null),(0,l._)([(0,c.J)({classBreaks:"class-breaks"})],j.prototype,"type",void 0),(0,l._)([(0,u.Cb)({type:String,json:{write:!0}})],j.prototype,"valueExpression",void 0),(0,l._)([(0,u.Cb)({type:String,json:{write:!0}})],j.prototype,"valueExpressionTitle",void 0),j=s=(0,l._)([(0,h.j)("esri.renderers.ClassBreaksRenderer")],j);const z=j},5499:(e,t,i)=>{i.d(t,{Z:()=>c});var s=i(43697),l=i(35454),r=i(96674),n=i(5600),o=(i(75215),i(67676),i(80442),i(52011)),a=i(69237);const u=new l.X({simple:"simple",uniqueValue:"unique-value",classBreaks:"class-breaks",heatmap:"heatmap",dotDensity:"dot-density",dictionary:"dictionary",pieChart:"pie-chart"},{ignoreUnknown:!0});let p=class extends r.wq{constructor(e){super(e),this.authoringInfo=null,this.type=null}async getRequiredFields(e){if(!this.collectRequiredFields)return[];const t=new Set;return await this.collectRequiredFields(t,e),Array.from(t).sort()}getSymbol(e,t){}async getSymbolAsync(e,t){}getSymbols(){return[]}getAttributeHash(){return JSON.stringify(this)}getMeshHash(){return JSON.stringify(this)}};(0,s._)([(0,n.Cb)({type:a.Z,json:{write:!0}})],p.prototype,"authoringInfo",void 0),(0,s._)([(0,n.Cb)({type:u.apiValues,readOnly:!0,json:{type:u.jsonValues,read:!1,write:{writer:u.write,ignoreOrigin:!0}}})],p.prototype,"type",void 0),p=(0,s._)([(0,o.j)("esri.renderers.Renderer")],p);const c=p},81571:(e,t,i)=>{i.d(t,{Z:()=>$});var s=i(43697),l=i(9790),r=i(20102),n=i(22974),o=i(92604),a=i(78286),u=i(17445),p=i(5600),c=i(90578),d=i(36030),h=i(71715),y=i(52011),m=i(30556),f=i(22862),b=i(75215),v=i(35671),g=i(48522),w=i(5499),_=i(41733),V=i(9833),S=i(66338),x=i(2368),C=i(96674),I=i(67676);i(80442);let j=class extends((0,x.J)(C.wq)){constructor(e){super(e),this.value=null,this.value2=null,this.value3=null}};(0,s._)([(0,p.Cb)(V.GY)],j.prototype,"value",void 0),(0,s._)([(0,p.Cb)(V.GY)],j.prototype,"value2",void 0),(0,s._)([(0,p.Cb)(V.GY)],j.prototype,"value3",void 0),j=(0,s._)([(0,y.j)("esri.renderers.support.UniqueValue")],j);const z=j;let q=class extends((0,x.J)(C.wq)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.values=null}castValues(e){if(null==e)return null;const t=typeof(e=Array.isArray(e)?e:[e])[0];return"string"===t||"number"===t?e.map((e=>new z({value:e}))):"object"===t?e[0]instanceof z?e:e.map((e=>new z(e))):null}};(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],q.prototype,"description",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],q.prototype,"label",void 0),(0,s._)([(0,p.Cb)(V.Gn)],q.prototype,"symbol",void 0),(0,s._)([(0,p.Cb)({type:[z],json:{type:[[String]],read:{reader:e=>e?e.map((e=>new z({value:e[0],value2:e[1],value3:e[2]}))):null},write:{writer:(e,t)=>{const i=[];for(const t of e){const e=[t.value,t.value2,t.value3].filter(I.pC).map((e=>e.toString()));i.push(e)}t.values=i}}}})],q.prototype,"values",void 0),(0,s._)([(0,c.p)("values")],q.prototype,"castValues",null),q=(0,s._)([(0,y.j)("esri.renderers.support.UniqueValueClass")],q);const F=q;let E=class extends((0,x.J)(C.wq)){constructor(e){super(e),this.heading=null,this.classes=null}};(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],E.prototype,"heading",void 0),(0,s._)([(0,p.Cb)({type:[F],json:{write:!0}})],E.prototype,"classes",void 0),E=(0,s._)([(0,y.j)("esri.renderers.support.UniqueValueGroup")],E);const T=E;var k,Z=i(44262),O=i(59266),D=i(25929),U=i(27883),L=i(59390);const M="esri.renderers.UniqueValueRenderer",B=o.Z.getLogger(M),N="uvInfos-watcher",R="uvGroups-watcher",A=(0,b.se)(Z.Z);let G=k=class extends((0,_.W)(w.Z)){constructor(e){super(e),this._valueInfoMap={},this._isDefaultSymbolDerived=!1,this._isInfosSource=null,this.type="unique-value",this.backgroundFillSymbol=null,this.orderByClassesEnabled=!1,this.valueExpressionTitle=null,this.legendOptions=null,this.defaultLabel=null,this.portal=null,this.styleOrigin=null,this.diff={uniqueValueInfos(e,t){if(!e&&!t)return;if(!e||!t)return{type:"complete",oldValue:e,newValue:t};let i=!1;const s={type:"collection",added:[],removed:[],changed:[],unchanged:[]};for(let l=0;l<t.length;l++){const r=e.find((e=>e.value===t[l].value));r?(0,f.Hg)(r,t[l])?(s.changed.push({type:"complete",oldValue:r,newValue:t[l]}),i=!0):s.unchanged.push({oldValue:r,newValue:t[l]}):(s.added.push(t[l]),i=!0)}for(let l=0;l<e.length;l++)t.find((t=>t.value===e[l].value))||(s.removed.push(e[l]),i=!0);return i?s:void 0}},this._set("uniqueValueInfos",[]),this._set("uniqueValueGroups",[])}get _cache(){return{compiledFunc:null}}set field(e){this._set("field",e),this._updateFieldDelimiter(),this._updateUniqueValues()}castField(e){return null==e||"function"==typeof e?e:(0,b.Zs)(e)}writeField(e,t,i,s){"string"==typeof e?t[i]=e:s&&s.messages?s.messages.push(new r.Z("property:unsupported","UniqueValueRenderer.field set to a function cannot be written to JSON")):B.error(".field: cannot write field to JSON since it's not a string value")}set field2(e){this._set("field2",e),this._updateFieldDelimiter(),this._updateUniqueValues()}set field3(e){this._set("field3",e),this._updateUniqueValues()}set valueExpression(e){this._set("valueExpression",e),this._updateUniqueValues()}set defaultSymbol(e){this._isDefaultSymbolDerived=!1,this._set("defaultSymbol",e)}set fieldDelimiter(e){this._set("fieldDelimiter",e),this._updateUniqueValues()}readPortal(e,t,i){return i.portal||g.Z.getDefault()}readStyleOrigin(e,t,i){if(t.styleName)return Object.freeze({styleName:t.styleName});if(t.styleUrl){const e=(0,D.f)(t.styleUrl,i);return Object.freeze({styleUrl:e})}}writeStyleOrigin(e,t,i,s){e.styleName?t.styleName=e.styleName:e.styleUrl&&(t.styleUrl=(0,D.t)(e.styleUrl,s))}set uniqueValueGroups(e){this.styleOrigin?B.error("#uniqueValueGroups=","Cannot modify unique value groups of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueGroups",e),this._updateInfosFromGroups(),this._isInfosSource=!1,this._watchUniqueValueGroups())}set uniqueValueInfos(e){this.styleOrigin?B.error("#uniqueValueInfos=","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos())}addUniqueValueInfo(e,t){if(this.styleOrigin)return void B.error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");let i;i="object"==typeof e?A(e):new Z.Z({value:e,symbol:(0,l.se)(t)}),this.uniqueValueInfos?.push(i),this._valueInfoMap[i.value]=i,this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}removeUniqueValueInfo(e){if(this.styleOrigin)return void B.error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");const t=this.uniqueValueInfos;if(t)for(let i=0;i<t.length;i++)if(t[i].value===e+""){delete this._valueInfoMap[e],t.splice(i,1);break}this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}async getUniqueValueInfo(e,t){let i=t;return!this.valueExpression||null!=t&&null!=t.arcade||(i={...i,arcade:await(0,O.LC)()}),this._getUniqueValueInfo(e,i)}getSymbol(e,t){if(this.valueExpression&&(null==t||null==t.arcade))return void B.error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const i=this._getUniqueValueInfo(e,t);return i&&i.symbol||this.defaultSymbol}async getSymbolAsync(e,t){let i=t;if(this.valueExpression&&(null==i||null==i.arcade)){const e=await(0,O.LC)(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),i={...i,arcade:e}}const s=this._getUniqueValueInfo(e,i);return s&&s.symbol||this.defaultSymbol}getSymbols(){const e=[];for(const t of this.uniqueValueInfos??[])t.symbol&&e.push(t.symbol);return this.defaultSymbol&&e.push(this.defaultSymbol),e}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){const e=JSON.stringify(this.backgroundFillSymbol),t=JSON.stringify(this.defaultSymbol),i=this.uniqueValueInfos?.reduce(((e,t)=>e+t.getMeshHash()),"");return`${e}.${t}.${i}.${this.field}.${this.field2}.${this.field3}.${this.fieldDelimiter}.${this.valueExpression}`}clone(){const e=new k({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:(0,n.d9)(this.defaultSymbol),orderByClassesEnabled:this.orderByClassesEnabled,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:(0,n.d9)(this.visualVariables),legendOptions:(0,n.d9)(this.legendOptions),authoringInfo:this.authoringInfo&&this.authoringInfo.clone(),backgroundFillSymbol:(0,n.d9)(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(e._isDefaultSymbolDerived=!0),e._set("portal",this.portal);const t=(0,n.d9)(this.uniqueValueInfos),i=(0,n.d9)(this.uniqueValueGroups);return this.styleOrigin&&(e._set("styleOrigin",Object.freeze((0,n.d9)(this.styleOrigin))),Object.freeze(t),Object.freeze(i)),e._set("uniqueValueInfos",t),e._updateValueInfoMap(),e._set("uniqueValueGroups",i),e._isInfosSource=this._isInfosSource,e._watchUniqueValueInfosAndGroups(),e}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}async collectRequiredFields(e,t){const i=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(i)}async collectSymbolFields(e,t){const i=[...this.getSymbols().map((i=>i.collectRequiredFields(e,t))),(0,v.io)(e,t,this.valueExpression)];(0,v.AB)(e,t,this.field),(0,v.AB)(e,t,this.field2),(0,v.AB)(e,t,this.field3),await Promise.all(i)}populateFromStyle(){return(0,U.n2)(this.styleOrigin,{portal:this.portal}).then((e=>{const t=[];return this._valueInfoMap={},e&&e.data&&Array.isArray(e.data.items)&&e.data.items.forEach((i=>{const s=new L.Z({styleUrl:e.styleUrl,styleName:e.styleName,portal:this.portal,name:i.name});this.defaultSymbol||i.name!==e.data.defaultItem||(this.defaultSymbol=s,this._isDefaultSymbolDerived=!0);const l=new Z.Z({value:i.name,symbol:s});t.push(l),this._valueInfoMap[i.name]=l})),this._set("uniqueValueInfos",Object.freeze(t)),this._updateGroupsFromInfos(!0),this._isInfosSource=null,this._watchUniqueValueInfos(),!this.defaultSymbol&&this.uniqueValueInfos?.length&&(this.defaultSymbol=this.uniqueValueInfos[0].symbol,this._isDefaultSymbolDerived=!0),this}))}_updateFieldDelimiter(){this.field&&this.field2&&!this.fieldDelimiter&&this._set("fieldDelimiter",",")}_updateUniqueValues(){null!=this._isInfosSource&&(this._isInfosSource?this._updateGroupsFromInfos():this._updateInfosFromGroups())}_updateValueInfoMap(){this._valueInfoMap={};const{uniqueValueInfos:e}=this;if(e)for(const t of e)this._valueInfoMap[t.value+""]=t}_watchUniqueValueInfosAndGroups(){this._watchUniqueValueInfos(),this._watchUniqueValueGroups()}_watchUniqueValueInfos(){this.removeHandles(N);const{uniqueValueInfos:e}=this;if(e){const t=[];for(const i of e)t.push((0,u.YP)((()=>({symbol:i.symbol,value:i.value,label:i.label,description:i.description})),((e,t)=>{e!==t&&(this._updateGroupsFromInfos(),this._isInfosSource=!0)}),{sync:!0}));this.addHandles(t,N)}}_watchUniqueValueGroups(){this.removeHandles(R);const{uniqueValueGroups:e}=this;if(e){const t=[];for(const i of e){t.push((0,u.YP)((()=>({classes:i.classes})),((e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)}),{sync:!0}));for(const e of i.classes??[])t.push((0,u.YP)((()=>({symbol:e.symbol,values:e.values,label:e.label,description:e.description})),((e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)}),{sync:!0}))}this.addHandles(t,R)}}_updateInfosFromGroups(){if(!this.uniqueValueGroups)return this._set("uniqueValueInfos",null),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const e=[],{field:t,field2:i,field3:s,fieldDelimiter:l,uniqueValueGroups:r,valueExpression:n}=this;if(!t&&!n)return this._set("uniqueValueInfos",e),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const o=!(!t||!i);for(const t of r)for(const r of t.classes??[]){const{symbol:t,label:n,values:a,description:u}=r;for(const r of a??[]){const{value:a,value2:p,value3:c}=r,d=[a];i&&d.push(p),s&&d.push(c);const h=o?d.join(l||""):d[0];e.push(new Z.Z({symbol:t,label:n,value:h,description:u}))}}this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._watchUniqueValueInfos()}_updateGroupsFromInfos(e=!1){if(!this.uniqueValueInfos)return this._set("uniqueValueGroups",null),void this._watchUniqueValueGroups();const{field:t,field2:i,valueExpression:s,fieldDelimiter:l,uniqueValueInfos:r}=this;if(!t&&!s||!r.length)return this._set("uniqueValueGroups",[]),void this._watchUniqueValueGroups();const n=!(!t||!i),o=r.map((e=>{const{symbol:t,label:i,value:s,description:r}=e,[o,a,u]=n?s?.toString()?.split(l||"")||[]:[s];return new F({symbol:t,label:i,description:r,values:[new z({value:o,value2:a,value3:u})]})})),a=[new T({classes:o})];e&&Object.freeze(a),this._set("uniqueValueGroups",a),this._watchUniqueValueGroups()}_getUniqueValueInfo(e,t){return this.valueExpression?this._getUnqiueValueInfoForExpression(e,t):this._getUnqiueValueInfoForFields(e)}_getUnqiueValueInfoForExpression(e,t){const{viewingMode:i,scale:s,spatialReference:l,arcade:r}=t??{};let n=this._cache.compiledFunc;const o=r.arcadeUtils;if(!n){const e=o.createSyntaxTree(this.valueExpression);n=o.createFunction(e),this._cache.compiledFunc=n}const a=o.executeFunction(n,o.createExecContext(e,o.getViewInfo({viewingMode:i,scale:s,spatialReference:l})));return this._valueInfoMap[a+""]}_getUnqiueValueInfoForFields(e){const t=this.field,i=e.attributes;let s;if("function"!=typeof t&&this.field2){const e=this.field2,l=this.field3,r=[];t&&r.push(i[t]),e&&r.push(i[e]),l&&r.push(i[l]),s=r.join(this.fieldDelimiter||"")}else"function"==typeof t?s=t(e):t&&(s=i[t]);return this._valueInfoMap[s+""]}static fromPortalStyle(e,t){const i=new k(t&&t.properties);i._set("styleOrigin",Object.freeze({styleName:e})),i._set("portal",t&&t.portal||g.Z.getDefault());const s=i.populateFromStyle();return s.catch((t=>{B.error(`#fromPortalStyle('${e}'[, ...])`,"Failed to create unique value renderer from style name",t)})),s}static fromStyleUrl(e,t){const i=new k(t&&t.properties);i._set("styleOrigin",Object.freeze({styleUrl:e}));const s=i.populateFromStyle();return s.catch((t=>{B.error(`#fromStyleUrl('${e}'[, ...])`,"Failed to create unique value renderer from style URL",t)})),s}};(0,s._)([(0,p.Cb)({readOnly:!0})],G.prototype,"_cache",null),(0,s._)([(0,d.J)({uniqueValue:"unique-value"})],G.prototype,"type",void 0),(0,s._)([(0,p.Cb)(V.KK)],G.prototype,"backgroundFillSymbol",void 0),(0,s._)([(0,p.Cb)({value:null,json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],G.prototype,"field",null),(0,s._)([(0,c.p)("field")],G.prototype,"castField",null),(0,s._)([(0,m.c)("field")],G.prototype,"writeField",null),(0,s._)([(0,p.Cb)({type:String,value:null,json:{write:!0}})],G.prototype,"field2",null),(0,s._)([(0,p.Cb)({type:String,value:null,json:{write:!0}})],G.prototype,"field3",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{name:"drawInClassOrder",default:!1,write:!0,origins:{"web-scene":{write:!1}}}})],G.prototype,"orderByClassesEnabled",void 0),(0,s._)([(0,p.Cb)({type:String,value:null,json:{write:!0}})],G.prototype,"valueExpression",null),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],G.prototype,"valueExpressionTitle",void 0),(0,s._)([(0,p.Cb)({type:S.I,json:{write:!0}})],G.prototype,"legendOptions",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],G.prototype,"defaultLabel",void 0),(0,s._)([(0,p.Cb)((0,a.RH)({...V.Gn},{json:{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}},origins:{"web-scene":{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}}}}}}))],G.prototype,"defaultSymbol",null),(0,s._)([(0,p.Cb)({type:String,value:null,json:{write:!0}})],G.prototype,"fieldDelimiter",null),(0,s._)([(0,p.Cb)({type:g.Z,readOnly:!0})],G.prototype,"portal",void 0),(0,s._)([(0,h.r)("portal",["styleName"])],G.prototype,"readPortal",null),(0,s._)([(0,p.Cb)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:()=>({enabled:!0})}}})],G.prototype,"styleOrigin",void 0),(0,s._)([(0,h.r)("styleOrigin",["styleName","styleUrl"])],G.prototype,"readStyleOrigin",null),(0,s._)([(0,m.c)("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],G.prototype,"writeStyleOrigin",null),(0,s._)([(0,p.Cb)({type:[T],json:{read:{source:["uniqueValueGroups","uniqueValueInfos"],reader:(e,t,i)=>(t.uniqueValueGroups||function(e){const{field1:t,field2:i,field3:s,fieldDelimiter:l,uniqueValueInfos:r,valueExpression:n}=e,o=!(!t||!i);return[{classes:(r??[]).map((e=>{const{symbol:r,label:a,value:u,description:p}=e,[c,d,h]=o?u?.toString()?.split(l||"")||[]:[u],y=[];return(t||n)&&y.push(c),i&&y.push(d),s&&y.push(h),{symbol:r,label:a,values:[y],description:p}}))}]}(t)).map((e=>T.fromJSON(e,i)))},write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],G.prototype,"uniqueValueGroups",null),(0,s._)([(0,p.Cb)({type:[Z.Z],json:{read:!1,write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],G.prototype,"uniqueValueInfos",null),G=k=(0,s._)([(0,y.j)(M)],G);const $=G},41733:(e,t,i)=>{i.d(t,{W:()=>D});var s=i(43697),l=i(5600),r=i(75215),n=(i(67676),i(80442),i(71715)),o=i(52011),a=i(30556),u=i(35671);const p=/^hash\(\$feature\['((\\'|[^'])+)'\]\) \* 8\.381e-8$/;var c,d=i(77997),h=i(21849);let y=c=class extends d.Z{constructor(e){super(e),this.type="color",this.normalizationField=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null}}set stops(e){e&&Array.isArray(e)&&(e=e.filter((e=>!!e))).sort(((e,t)=>e.value-t.value)),this._set("stops",e)}clone(){return new c({field:this.field,normalizationField:this.normalizationField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,stops:this.stops&&this.stops.map((e=>e.clone())),legendOptions:this.legendOptions&&this.legendOptions.clone()})}getAttributeHash(){return`${super.getAttributeHash()}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map((e=>e.value||0))}};(0,s._)([(0,l.Cb)({readOnly:!0})],y.prototype,"cache",null),(0,s._)([(0,l.Cb)({type:["color"],json:{type:["colorInfo"]}})],y.prototype,"type",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"normalizationField",void 0),(0,s._)([(0,l.Cb)({type:[h.Z],json:{write:!0}})],y.prototype,"stops",null),y=c=(0,s._)([(0,o.j)("esri.renderers.visualVariables.ColorVariable")],y);const m=y;var f,b=i(96674),v=i(65242);let g=f=class extends b.wq{constructor(e){super(e),this.label=null,this.opacity=null,this.value=null}readOpacity(e,t){return(0,v.b)(t.transparency)}writeOpacity(e,t,i){t[i]=(0,v.a)(e)}clone(){return new f({label:this.label,opacity:this.opacity,value:this.value})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],g.prototype,"label",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{type:r.z8,write:{target:"transparency"}}})],g.prototype,"opacity",void 0),(0,s._)([(0,n.r)("opacity",["transparency"])],g.prototype,"readOpacity",null),(0,s._)([(0,a.c)("opacity")],g.prototype,"writeOpacity",null),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],g.prototype,"value",void 0),g=f=(0,s._)([(0,o.j)("esri.renderers.visualVariables.support.OpacityStop")],g);const w=g;var _;let V=_=class extends d.Z{constructor(e){super(e),this.type="opacity",this.normalizationField=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null}}set stops(e){e&&Array.isArray(e)&&(e=e.filter((e=>!!e))).sort(((e,t)=>e.value-t.value)),this._set("stops",e)}clone(){return new _({field:this.field,normalizationField:this.normalizationField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,stops:this.stops&&this.stops.map((e=>e.clone())),legendOptions:this.legendOptions&&this.legendOptions.clone()})}getAttributeHash(){return`${super.getAttributeHash()}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map((e=>e.value||0))}};(0,s._)([(0,l.Cb)({readOnly:!0})],V.prototype,"cache",null),(0,s._)([(0,l.Cb)({type:["opacity"],json:{type:["transparencyInfo"]}})],V.prototype,"type",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],V.prototype,"normalizationField",void 0),(0,s._)([(0,l.Cb)({type:[w],json:{write:!0}})],V.prototype,"stops",null),V=_=(0,s._)([(0,o.j)("esri.renderers.visualVariables.OpacityVariable")],V);const S=V;var x=i(89513),C=i(23847),I=i(92036),j=i(35454),z=i(92604),q=i(20941);const F={color:m,size:C.Z,opacity:S,rotation:x.Z},E=new j.X({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"}),T=/^\[([^\]]+)\]$/i;let k=class extends I.Z{constructor(){super(...arguments),this.colorVariables=null,this.opacityVariables=null,this.rotationVariables=null,this.sizeVariables=null}set visualVariables(e){if(this._resetVariables(),(e=e&&e.filter((e=>!!e)))&&e.length){for(const t of e)switch(t.type){case"color":this.colorVariables.push(t);break;case"opacity":this.opacityVariables.push(t);break;case"rotation":this.rotationVariables.push(t);break;case"size":this.sizeVariables.push(t)}this.sizeVariables.length&&this.sizeVariables.some((e=>!!e.target))&&e.sort(((e,t)=>{let i=null;return i=e.target===t.target?0:e.target?1:-1,i}));for(let t=0;t<e.length;t++)e[t].index=t;this._set("visualVariables",e)}else this._set("visualVariables",e)}readVariables(e,t,i){const{rotationExpression:s,rotationType:l}=t,r=s&&s.match(T),n=r&&r[1];if(n&&(e||(e=[]),e.push({type:"rotationInfo",rotationType:l,field:n})),e)return e.map((e=>{const t=E.read(e.type),s=F[t];s||(z.Z.getLogger(this).warn(`Unknown variable type: ${t}`),i&&i.messages&&i.messages.push(new q.Z("visual-variable:unsupported",`visualVariable of type '${t}' is not supported`,{definition:e,context:i})));const l=new s;return l.read(e,i),l}))}writeVariables(e,t){const i=[];for(const s of e){const e=s.toJSON(t);e&&i.push(e)}return i}_resetVariables(){this.colorVariables=[],this.opacityVariables=[],this.rotationVariables=[],this.sizeVariables=[]}};(0,s._)([(0,l.Cb)()],k.prototype,"visualVariables",null),k=(0,s._)([(0,o.j)("esri.renderers.visualVariables.VisualVariableFactory")],k);const Z=k,O={base:d.Z,key:"type",typeMap:{opacity:S,color:m,rotation:x.Z,size:C.Z}},D=e=>{let t=class extends e{constructor(){super(...arguments),this._vvFactory=new Z}set visualVariables(e){this._vvFactory.visualVariables=e,this._set("visualVariables",this._vvFactory.visualVariables)}readVisualVariables(e,t,i){return this._vvFactory.readVariables(e,t,i)}writeVisualVariables(e,t,i,s){t[i]=this._vvFactory.writeVariables(e,s)}get arcadeRequiredForVisualVariables(){if(!this.visualVariables)return!1;for(const e of this.visualVariables)if(e.arcadeRequired)return!0;return!1}hasVisualVariables(e,t){return e?this.getVisualVariablesForType(e,t).length>0:this.getVisualVariablesForType("size",t).length>0||this.getVisualVariablesForType("color",t).length>0||this.getVisualVariablesForType("opacity",t).length>0||this.getVisualVariablesForType("rotation",t).length>0}getVisualVariablesForType(e,t){const i=this.visualVariables;return i?i.filter((i=>i.type===e&&("string"==typeof t?i.target===t:!1!==t||!i.target))):[]}async collectVVRequiredFields(e,t){let i=[];this.visualVariables&&(i=i.concat(this.visualVariables));for(const s of i)s&&(s.field&&(0,u.AB)(e,t,s.field),s.normalizationField&&(0,u.AB)(e,t,s.normalizationField),s.valueExpression&&(U(s.valueExpression,e,t)||await(0,u.io)(e,t,s.valueExpression)))}};return(0,s._)([(0,l.Cb)({types:[O],value:null,json:{write:!0}})],t.prototype,"visualVariables",null),(0,s._)([(0,n.r)("visualVariables",["visualVariables","rotationType","rotationExpression"])],t.prototype,"readVisualVariables",null),(0,s._)([(0,a.c)("visualVariables")],t.prototype,"writeVisualVariables",null),t=(0,s._)([(0,o.j)("esri.renderers.mixins.VisualVariablesMixin")],t),t};function U(e,t,i){const s=(l=e,l.match(p)?.[1]?.replace(/\\'/g,"'")??null);var l;return null!=s&&((0,u.AB)(t,i,s),!0)}},69237:(e,t,i)=>{i.d(t,{Z:()=>T});var s,l=i(43697),r=i(35454),n=i(96674),o=i(22974),a=i(5600),u=i(75215),p=i(71715),c=i(52011);i(67676),i(80442);let d=s=class extends n.wq{constructor(e){super(e),this.minValue=0,this.maxValue=0}clone(){return new s({minValue:this.minValue,maxValue:this.maxValue})}};var h;(0,l._)([(0,a.Cb)({type:Number,json:{write:!0}})],d.prototype,"minValue",void 0),(0,l._)([(0,a.Cb)({type:Number,json:{write:!0}})],d.prototype,"maxValue",void 0),d=s=(0,l._)([(0,c.j)("esri.renderer.support.AuthoringInfoClassBreakInfo")],d);let y=h=class extends n.wq{constructor(e){super(e),this.field="",this.normalizationField="",this.label="",this.classBreakInfos=[]}clone(){return new h({field:this.field,normalizationField:this.normalizationField,label:this.label,classBreakInfos:(0,o.d9)(this.classBreakInfos)})}};(0,l._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"field",void 0),(0,l._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"normalizationField",void 0),(0,l._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"label",void 0),(0,l._)([(0,a.Cb)({type:[d],json:{write:!0}})],y.prototype,"classBreakInfos",void 0),y=h=(0,l._)([(0,c.j)("esri.renderers.support.AuthoringInfoFieldInfo")],y);var m,f=i(90578);const b=new r.X({percentTotal:"percent-of-total",ratio:"ratio",percent:"percent"}),v=new r.X({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),g={key:e=>"number"==typeof e?"number":"string",typeMap:{number:Number,string:String},base:null},w=["high-to-low","above-and-below","centered-on","extremes"],_=[...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"])],V=["seconds","minutes","hours","days","months","years"];let S=m=class extends n.wq{constructor(e){super(e),this.endTime=null,this.field=null,this.maxSliderValue=null,this.minSliderValue=null,this.startTime=null,this.type=null,this.units=null}castEndTime(e){return"string"==typeof e||"number"==typeof e?e:null}castStartTime(e){return"string"==typeof e||"number"==typeof e?e:null}get style(){return"color"===this.type?this._get("style"):null}set style(e){this._set("style",e)}get theme(){return"color"===this.type||"size"===this.type?this._get("theme")||"high-to-low":null}set theme(e){this._set("theme",e)}clone(){return new m({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})}};(0,l._)([(0,a.Cb)({types:g,json:{write:!0}})],S.prototype,"endTime",void 0),(0,l._)([(0,f.p)("endTime")],S.prototype,"castEndTime",null),(0,l._)([(0,a.Cb)({type:String,json:{write:!0}})],S.prototype,"field",void 0),(0,l._)([(0,a.Cb)({type:Number,json:{write:!0}})],S.prototype,"maxSliderValue",void 0),(0,l._)([(0,a.Cb)({type:Number,json:{write:!0}})],S.prototype,"minSliderValue",void 0),(0,l._)([(0,a.Cb)({types:g,json:{write:!0}})],S.prototype,"startTime",void 0),(0,l._)([(0,f.p)("startTime")],S.prototype,"castStartTime",null),(0,l._)([(0,a.Cb)({type:b.apiValues,value:null,json:{type:b.jsonValues,read:b.read,write:b.write}})],S.prototype,"style",null),(0,l._)([(0,a.Cb)({type:_,value:null,json:{type:_,origins:{"web-scene":{type:w,write:{writer:(e,t)=>{w.includes(e)&&(t.theme=e)}}}},write:!0}})],S.prototype,"theme",null),(0,l._)([(0,a.Cb)({type:v.apiValues,json:{type:v.jsonValues,read:v.read,write:v.write}})],S.prototype,"type",void 0),(0,l._)([(0,a.Cb)({type:V,json:{type:V,write:!0}})],S.prototype,"units",void 0),S=m=(0,l._)([(0,c.j)("esri.renderers.support.AuthoringInfoVisualVariable")],S);const x=S;var C,I=i(94593);const j=new r.X({esriClassifyDefinedInterval:"defined-interval",esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation"}),z=new r.X({pieChart:"pie-chart",classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size",relationship:"relationship",predominance:"predominance",dotDensity:"dot-density",flow:"flow"}),q=new r.X({classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size",relationship:"relationship",predominance:"predominance",dotDensity:"dot-density"}),F=["inches","feet","yards","miles","nautical-miles","millimeters","centimeters","decimeters","meters","kilometers","decimal-degrees"];let E=C=class extends n.wq{constructor(e){super(e),this.colorRamp=null,this.fadeRatio=null,this.isAutoGenerated=!1,this.lengthUnit=null,this.maxSliderValue=null,this.minSliderValue=null,this.visualVariables=null}get classificationMethod(){const e=this._get("classificationMethod"),t=this.type;return t&&"relationship"!==t?"class-breaks-size"===t||"class-breaks-color"===t?e||"manual":null:e}set classificationMethod(e){this._set("classificationMethod",e)}readColorRamp(e){return e?(0,I.i)(e):void 0}get fields(){return this.type&&"predominance"!==this.type?null:this._get("fields")}set fields(e){this._set("fields",e)}get field1(){return this.type&&"relationship"!==this.type?null:this._get("field1")}set field1(e){this._set("field1",e)}get field2(){return this.type&&"relationship"!==this.type?null:this._get("field2")}set field2(e){this._set("field2",e)}get flowTheme(){return"flow"===this.type?this._get("flowTheme"):null}set flowTheme(e){this._set("flowTheme",e)}get focus(){return this.type&&"relationship"!==this.type?null:this._get("focus")}set focus(e){this._set("focus",e)}get numClasses(){return this.type&&"relationship"!==this.type?null:this._get("numClasses")}set numClasses(e){this._set("numClasses",e)}get statistics(){return"univariate-color-size"===this.type&&"above-and-below"===this.univariateTheme?this._get("statistics"):null}set statistics(e){this._set("statistics",e)}get standardDeviationInterval(){const e=this.type;return e&&"relationship"!==e&&"class-breaks-size"!==e&&"class-breaks-color"!==e||this.classificationMethod&&"standard-deviation"!==this.classificationMethod?null:this._get("standardDeviationInterval")}set standardDeviationInterval(e){this._set("standardDeviationInterval",e)}get type(){return this._get("type")}set type(e){let t=e;"classed-size"===e?t="class-breaks-size":"classed-color"===e&&(t="class-breaks-color"),this._set("type",t)}get univariateSymbolStyle(){return"univariate-color-size"===this.type&&"above-and-below"===this.univariateTheme?this._get("univariateSymbolStyle"):null}set univariateSymbolStyle(e){this._set("univariateSymbolStyle",e)}get univariateTheme(){return"univariate-color-size"===this.type?this._get("univariateTheme"):null}set univariateTheme(e){this._set("univariateTheme",e)}clone(){return new C({classificationMethod:this.classificationMethod,colorRamp:(0,o.d9)(this.colorRamp),fadeRatio:(0,o.d9)(this.fadeRatio),fields:this.fields&&this.fields.slice(0),field1:(0,o.d9)(this.field1),field2:(0,o.d9)(this.field2),isAutoGenerated:this.isAutoGenerated,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((e=>e.clone())),univariateSymbolStyle:this.univariateSymbolStyle,univariateTheme:this.univariateTheme,flowTheme:this.flowTheme})}};(0,l._)([(0,a.Cb)({type:j.apiValues,value:null,json:{type:j.jsonValues,read:j.read,write:j.write,origins:{"web-document":{default:"manual",type:j.jsonValues,read:j.read,write:j.write}}}})],E.prototype,"classificationMethod",null),(0,l._)([(0,a.Cb)({types:I.V,json:{write:!0}})],E.prototype,"colorRamp",void 0),(0,l._)([(0,p.r)("colorRamp")],E.prototype,"readColorRamp",null),(0,l._)([(0,a.Cb)({json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],E.prototype,"fadeRatio",void 0),(0,l._)([(0,a.Cb)({type:[String],value:null,json:{write:!0}})],E.prototype,"fields",null),(0,l._)([(0,a.Cb)({type:y,value:null,json:{write:!0}})],E.prototype,"field1",null),(0,l._)([(0,a.Cb)({type:y,value:null,json:{write:!0}})],E.prototype,"field2",null),(0,l._)([(0,a.Cb)({type:["flow-line","wave-front"],value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],E.prototype,"flowTheme",null),(0,l._)([(0,a.Cb)({type:["HH","HL","LH","LL"],value:null,json:{write:!0}})],E.prototype,"focus",null),(0,l._)([(0,a.Cb)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1}}}})],E.prototype,"isAutoGenerated",void 0),(0,l._)([(0,a.Cb)({type:Number,value:null,json:{type:u.z8,write:!0}})],E.prototype,"numClasses",null),(0,l._)([(0,a.Cb)({type:F,json:{type:F,read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],E.prototype,"lengthUnit",void 0),(0,l._)([(0,a.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],E.prototype,"maxSliderValue",void 0),(0,l._)([(0,a.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],E.prototype,"minSliderValue",void 0),(0,l._)([(0,a.Cb)({type:Object,value:null,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],E.prototype,"statistics",null),(0,l._)([(0,a.Cb)({type:[.25,.33,.5,1],value:null,json:{type:[.25,.33,.5,1],write:!0}})],E.prototype,"standardDeviationInterval",null),(0,l._)([(0,a.Cb)({type:z.apiValues,value:null,json:{type:z.jsonValues,read:z.read,write:z.write,origins:{"web-scene":{type:q.jsonValues,write:{writer:q.write,overridePolicy:e=>({enabled:"flow"!==e})}}}}})],E.prototype,"type",null),(0,l._)([(0,a.Cb)({type:[x],json:{write:!0}})],E.prototype,"visualVariables",void 0),(0,l._)([(0,a.Cb)({type:["caret","circle-caret","arrow","circle-arrow","plus-minus","circle-plus-minus","square","circle","triangle","happy-sad","thumb","custom"],value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],E.prototype,"univariateSymbolStyle",null),(0,l._)([(0,a.Cb)({type:["high-to-low","above-and-below","above","below","90-10"],value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],E.prototype,"univariateTheme",null),E=C=(0,l._)([(0,c.j)("esri.renderers.support.AuthoringInfo")],E);const T=E},32984:(e,t,i)=>{i.d(t,{Z:()=>p});var s,l=i(43697),r=i(96674),n=i(5600),o=(i(75215),i(67676),i(80442),i(52011)),a=i(9833);let u=s=class extends r.wq{constructor(e){super(e),this.description=null,this.label=null,this.minValue=null,this.maxValue=0,this.symbol=null}clone(){return new s({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,symbol:this.symbol?this.symbol.clone():null})}getMeshHash(){const e=JSON.stringify(this.symbol);return`${this.minValue}.${this.maxValue}.${e}`}};(0,l._)([(0,n.Cb)({type:String,json:{write:!0}})],u.prototype,"description",void 0),(0,l._)([(0,n.Cb)({type:String,json:{write:!0}})],u.prototype,"label",void 0),(0,l._)([(0,n.Cb)({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],u.prototype,"minValue",void 0),(0,l._)([(0,n.Cb)({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],u.prototype,"maxValue",void 0),(0,l._)([(0,n.Cb)(a.Gn)],u.prototype,"symbol",void 0),u=s=(0,l._)([(0,o.j)("esri.renderers.support.ClassBreakInfo")],u);const p=u},66338:(e,t,i)=>{i.d(t,{I:()=>a});var s,l=i(43697),r=i(96674),n=i(5600),o=(i(75215),i(67676),i(80442),i(52011));let a=s=class extends r.wq{constructor(){super(...arguments),this.title=null}clone(){return new s({title:this.title})}};(0,l._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),a=s=(0,l._)([(0,o.j)("esri.renderers.support.LegendOptions")],a)},44262:(e,t,i)=>{i.d(t,{Z:()=>p});var s,l=i(43697),r=i(96674),n=i(5600),o=(i(75215),i(67676),i(80442),i(52011)),a=i(9833);let u=s=class extends r.wq{constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.value=null}clone(){return new s({value:this.value,description:this.description,label:this.label,symbol:this.symbol?this.symbol.clone():null})}getMeshHash(){const e=JSON.stringify(this.symbol&&this.symbol.toJSON());return`${this.value}.${e}`}};(0,l._)([(0,n.Cb)({type:String,json:{write:!0}})],u.prototype,"description",void 0),(0,l._)([(0,n.Cb)({type:String,json:{write:!0}})],u.prototype,"label",void 0),(0,l._)([(0,n.Cb)(a.Gn)],u.prototype,"symbol",void 0),(0,l._)([(0,n.Cb)(a.GY)],u.prototype,"value",void 0),u=s=(0,l._)([(0,o.j)("esri.renderers.support.UniqueValueInfo")],u);const p=u},9833:(e,t,i)=>{i.d(t,{GY:()=>p,Gn:()=>a,KK:()=>u});var s=i(9790),l=i(63213),r=i(21878),n=i(89164),o=i(86114);const a={types:s.QT,json:{write:{writer:r.cW},origins:{"web-scene":{types:s.f_,write:{writer:r.cW},read:{reader:(0,l.d)({types:s.f_})}}}}},u={types:{base:n.Z,key:"type",typeMap:{"simple-fill":s.LB.typeMap["simple-fill"],"picture-fill":s.LB.typeMap["picture-fill"],"polygon-3d":s.LB.typeMap["polygon-3d"]}},json:{write:{writer:r.cW},origins:{"web-scene":{type:o.Z,write:{writer:r.cW}}}}},p={cast:e=>null==e||"string"==typeof e||"number"==typeof e?e:`${e}`,json:{type:String,write:{writer:(e,t)=>{t.value=e?.toString()}}}}},89513:(e,t,i)=>{i.d(t,{Z:()=>c});var s,l=i(43697),r=i(20102),n=i(5600),o=(i(75215),i(67676),i(80442),i(52011)),a=i(30556),u=i(77997);let p=s=class extends u.Z{constructor(e){super(e),this.axis=null,this.type="rotation",this.rotationType="geographic",this.valueExpressionTitle=null}get cache(){return{hasExpression:!!this.valueExpression,compiledFunc:null}}writeValueExpressionTitleWebScene(e,t,i,s){if(s&&s.messages){const e=`visualVariables[${this.index}]`;s.messages.push(new r.Z("property:unsupported",this.type+"VisualVariable.valueExpressionTitle is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:e+".valueExpressionTitle",context:s}))}}clone(){return new s({axis:this.axis,rotationType:this.rotationType,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,legendOptions:this.legendOptions&&this.legendOptions.clone()})}};(0,l._)([(0,n.Cb)({readOnly:!0})],p.prototype,"cache",null),(0,l._)([(0,n.Cb)({type:["heading","tilt","roll"],json:{origins:{"web-scene":{default:"heading",write:!0}}}})],p.prototype,"axis",void 0),(0,l._)([(0,n.Cb)({type:["rotation"],json:{type:["rotationInfo"]}})],p.prototype,"type",void 0),(0,l._)([(0,n.Cb)({type:["geographic","arithmetic"],json:{write:!0,origins:{"web-document":{write:!0,default:"geographic"}}}})],p.prototype,"rotationType",void 0),(0,l._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"valueExpressionTitle",void 0),(0,l._)([(0,a.c)("web-scene","valueExpressionTitle")],p.prototype,"writeValueExpressionTitleWebScene",null),p=s=(0,l._)([(0,o.j)("esri.renderers.visualVariables.RotationVariable")],p);const c=p},23847:(e,t,i)=>{i.d(t,{Z:()=>j});var s,l=i(43697),r=i(20102),n=i(35454),o=i(92604),a=i(62357),u=i(5600),p=i(90578),c=i(71715),d=i(52011),h=i(30556),y=i(77997),m=i(30856),f=(i(75215),i(67676),i(80442),i(58439));let b=s=class extends f.Z{constructor(){super(...arguments),this.customValues=null}clone(){return new s({title:this.title,showLegend:this.showLegend,customValues:this.customValues&&this.customValues.slice(0)})}};(0,l._)([(0,u.Cb)({type:[Number],json:{write:!0}})],b.prototype,"customValues",void 0),b=s=(0,l._)([(0,d.j)("esri.renderers.visualVariables.support.SizeVariableLegendOptions")],b);const v=b;var g,w=i(51706),_=i(28101);const V=new n.X({width:"width",depth:"depth",height:"height",widthAndDepth:"width-and-depth",all:"all"}),S=new n.X({unknown:"unknown",inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers","decimal-degree":"decimal-degrees"});function x(e){if(null!=e)return"string"==typeof e||"number"==typeof e?(0,a.t_)(e):"size"===e.type?(0,w.iY)(e)?e:(delete(e={...e}).type,new I(e)):void 0}function C(e,t,i){if("object"!=typeof e)return e;const s=new I;return s.read(e,i),s}let I=g=class extends y.Z{constructor(e){super(e),this.axis=null,this.legendOptions=null,this.normalizationField=null,this.scaleBy=null,this.target=null,this.type="size",this.useSymbolValue=null,this.valueExpression=null,this.valueRepresentation=null,this.valueUnit=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null,isScaleDriven:null!=this.valueExpression&&_.B3.test(this.valueExpression)}}set expression(e){o.Z.getLogger(this).warn("'expression' is deprecated since version 4.2. Use 'valueExpression' instead. The only supported expression is 'view.scale'."),"view.scale"===e?(this.valueExpression="$view.scale",this._set("expression",e)):this._set("expression",null)}set index(e){(0,w.iY)(this.maxSize)&&(this.maxSize.index=`visualVariables[${e}].maxSize`),(0,w.iY)(this.minSize)&&(this.minSize.index=`visualVariables[${e}].minSize`),this._set("index",e)}get inputValueType(){return(0,w.PS)(this)}set maxDataValue(e){e&&this.stops&&(o.Z.getLogger(this).warn("cannot set maxDataValue when stops is not null."),e=null),this._set("maxDataValue",e)}set maxSize(e){e&&this.stops&&(o.Z.getLogger(this).warn("cannot set maxSize when stops is not null."),e=null),this._set("maxSize",e)}castMaxSize(e){return x(e)}readMaxSize(e,t,i){return C(e,0,i)}set minDataValue(e){e&&this.stops&&(o.Z.getLogger(this).warn("cannot set minDataValue when stops is not null."),e=null),this._set("minDataValue",e)}set minSize(e){e&&this.stops&&(o.Z.getLogger(this).warn("cannot set minSize when stops is not null."),e=null),this._set("minSize",e)}castMinSize(e){return x(e)}readMinSize(e,t,i){return C(e,0,i)}get arcadeRequired(){return!!this.valueExpression||null!=this.minSize&&"object"==typeof this.minSize&&this.minSize.arcadeRequired||null!=this.maxSize&&"object"==typeof this.maxSize&&this.maxSize.arcadeRequired}set stops(e){null==this.minDataValue&&null==this.maxDataValue&&null==this.minSize&&null==this.maxSize?e&&Array.isArray(e)&&(e=e.filter((e=>!!e))).sort(((e,t)=>e.value-t.value)):e&&(o.Z.getLogger(this).warn("cannot set stops when one of minDataValue, maxDataValue, minSize or maxSize is not null."),e=null),this._set("stops",e)}get transformationType(){return(0,w.QW)(this,this.inputValueType)}readValueExpression(e,t){return e||t.expression&&"$view.scale"}writeValueExpressionWebScene(e,t,i,s){if("$view.scale"===e){if(s&&s.messages){const e=this.index,t="string"==typeof e?e:`visualVariables[${e}]`;s.messages.push(new r.Z("property:unsupported",this.type+"VisualVariable.valueExpression = '$view.scale' is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:t+".valueExpression",context:s}))}}else t[i]=e}readValueUnit(e){return e?S.read(e):null}clone(){return new g({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,maxDataValue:this.maxDataValue,maxSize:(0,w.iY)(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:(0,w.iY)(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:this.stops&&this.stops.map((e=>e.clone())),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:this.legendOptions&&this.legendOptions.clone()})}flipSizes(){if(this.transformationType===w.hL.ClampedLinear){const{minSize:e,maxSize:t}=this;return this.minSize=t,this.maxSize=e,this}if(this.transformationType===w.hL.Stops){const e=this.stops;if(!e)return this;const t=e.map((e=>e.size)).reverse(),i=e.length;for(let s=0;s<i;s++)e[s].size=t[s];return this}return this}getAttributeHash(){return`${super.getAttributeHash()}-${this.target}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map((e=>e.value||0))}};(0,l._)([(0,u.Cb)({readOnly:!0})],I.prototype,"cache",null),(0,l._)([(0,u.Cb)({type:V.apiValues,json:{type:V.jsonValues,origins:{"web-map":{read:!1}},read:V.read,write:V.write}})],I.prototype,"axis",void 0),(0,l._)([(0,u.Cb)({type:String,value:null,json:{read:!1}})],I.prototype,"expression",null),(0,l._)([(0,u.Cb)()],I.prototype,"index",null),(0,l._)([(0,u.Cb)({type:String,readOnly:!0})],I.prototype,"inputValueType",null),(0,l._)([(0,u.Cb)({type:v,json:{write:!0}})],I.prototype,"legendOptions",void 0),(0,l._)([(0,u.Cb)({type:Number,value:null,json:{write:!0}})],I.prototype,"maxDataValue",null),(0,l._)([(0,u.Cb)({type:Number,value:null,json:{write:!0}})],I.prototype,"maxSize",null),(0,l._)([(0,p.p)("maxSize")],I.prototype,"castMaxSize",null),(0,l._)([(0,c.r)("maxSize")],I.prototype,"readMaxSize",null),(0,l._)([(0,u.Cb)({type:Number,value:null,json:{write:!0}})],I.prototype,"minDataValue",null),(0,l._)([(0,u.Cb)({type:Number,value:null,json:{write:!0}})],I.prototype,"minSize",null),(0,l._)([(0,p.p)("minSize")],I.prototype,"castMinSize",null),(0,l._)([(0,c.r)("minSize")],I.prototype,"readMinSize",null),(0,l._)([(0,u.Cb)({type:String,json:{write:!0}})],I.prototype,"normalizationField",void 0),(0,l._)([(0,u.Cb)({readOnly:!0})],I.prototype,"arcadeRequired",null),(0,l._)([(0,u.Cb)({type:String})],I.prototype,"scaleBy",void 0),(0,l._)([(0,u.Cb)({type:[m.Z],value:null,json:{write:!0}})],I.prototype,"stops",null),(0,l._)([(0,u.Cb)({type:["outline"],json:{write:!0}})],I.prototype,"target",void 0),(0,l._)([(0,u.Cb)({type:String,readOnly:!0})],I.prototype,"transformationType",null),(0,l._)([(0,u.Cb)({type:["size"],json:{type:["sizeInfo"]}})],I.prototype,"type",void 0),(0,l._)([(0,u.Cb)({type:Boolean,json:{write:!0,origins:{"web-map":{read:!1}}}})],I.prototype,"useSymbolValue",void 0),(0,l._)([(0,u.Cb)({type:String,json:{write:!0}})],I.prototype,"valueExpression",void 0),(0,l._)([(0,c.r)("valueExpression",["valueExpression","expression"])],I.prototype,"readValueExpression",null),(0,l._)([(0,h.c)("web-scene","valueExpression")],I.prototype,"writeValueExpressionWebScene",null),(0,l._)([(0,u.Cb)({type:["radius","diameter","area","width","distance"],json:{write:!0}})],I.prototype,"valueRepresentation",void 0),(0,l._)([(0,u.Cb)({type:S.apiValues,json:{write:S.write,origins:{"web-map":{read:!1},"web-scene":{write:!0},"portal-item":{write:!0}}}})],I.prototype,"valueUnit",void 0),(0,l._)([(0,c.r)("valueUnit")],I.prototype,"readValueUnit",null),I=g=(0,l._)([(0,d.j)("esri.renderers.visualVariables.SizeVariable")],I);const j=I},77997:(e,t,i)=>{i.d(t,{Z:()=>y});var s=i(43697),l=i(35454),r=i(96674),n=i(92604),o=i(5600),a=i(90578),u=i(52011),p=i(75215),c=i(58439);const d=new l.X({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"});let h=class extends r.wq{constructor(e){super(e),this.index=null,this.type=null,this.field=null,this.valueExpression=null,this.valueExpressionTitle=null,this.legendOptions=null}castField(e){return null==e?e:"function"==typeof e?(n.Z.getLogger(this).error(".field: field must be a string value"),null):(0,p.Zs)(e)}get arcadeRequired(){return!!this.valueExpression}clone(){}getAttributeHash(){return`${this.type}-${this.field}-${this.valueExpression}`}};(0,s._)([(0,o.Cb)()],h.prototype,"index",void 0),(0,s._)([(0,o.Cb)({type:d.apiValues,readOnly:!0,json:{read:d.read,write:d.write}})],h.prototype,"type",void 0),(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"field",void 0),(0,s._)([(0,a.p)("field")],h.prototype,"castField",null),(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"valueExpression",void 0),(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"valueExpressionTitle",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],h.prototype,"arcadeRequired",null),(0,s._)([(0,o.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"legendOptions",void 0),h=(0,s._)([(0,u.j)("esri.renderers.visualVariables.VisualVariable")],h);const y=h},21849:(e,t,i)=>{i.d(t,{Z:()=>d});var s,l=i(43697),r=i(22303),n=i(96674),o=i(5600),a=i(75215),u=(i(67676),i(80442),i(52011)),p=i(30556);let c=s=class extends n.wq{constructor(e){super(e),this.color=null,this.label=null,this.value=null}writeValue(e,t,i){t[i]=e??0}clone(){return new s({color:this.color&&this.color.clone(),label:this.label,value:this.value})}};(0,l._)([(0,o.Cb)({type:r.Z,json:{type:[a.z8],write:!0}})],c.prototype,"color",void 0),(0,l._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,l._)([(0,o.Cb)({type:Number,json:{write:{writerEnsuresNonNull:!0}}})],c.prototype,"value",void 0),(0,l._)([(0,p.c)("value")],c.prototype,"writeValue",null),c=s=(0,l._)([(0,u.j)("esri.renderers.visualVariables.support.ColorStop")],c);const d=c},30856:(e,t,i)=>{i.d(t,{Z:()=>p});var s,l=i(43697),r=i(96674),n=i(62357),o=i(5600),a=(i(75215),i(67676),i(80442),i(52011));let u=s=class extends r.wq{constructor(e){super(e),this.label=null,this.size=null,this.value=null}clone(){return new s({label:this.label,size:this.size,value:this.value})}};(0,l._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"label",void 0),(0,l._)([(0,o.Cb)({type:Number,cast:n.t_,json:{write:!0}})],u.prototype,"size",void 0),(0,l._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"value",void 0),u=s=(0,l._)([(0,a.j)("esri.renderers.visualVariables.support.SizeStop")],u);const p=u},58439:(e,t,i)=>{i.d(t,{Z:()=>u});var s,l=i(43697),r=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),o=i(66338);let a=s=class extends o.I{constructor(){super(...arguments),this.showLegend=null}clone(){return new s({title:this.title,showLegend:this.showLegend})}};(0,l._)([(0,r.Cb)({type:Boolean,json:{write:!0}})],a.prototype,"showLegend",void 0),a=s=(0,l._)([(0,n.j)("esri.renderers.visualVariables.support.VisualVariableLegendOptions")],a);const u=a},51706:(e,t,i)=>{var s,l;function r(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function n(e){return null!=e&&!isNaN(e)&&isFinite(e)}function o(e){return e.valueExpression?s.Expression:e.field&&"string"==typeof e.field?s.Field:s.Unknown}function a(e,t){const i=t||o(e),r=e.valueUnit||"unknown";return i===s.Unknown?l.Constant:e.stops?l.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?l.ClampedLinear:"unknown"===r?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?l.Proportional:l.Additive:l.Identity:l.RealWorldSize}i.d(t,{PS:()=>o,QW:()=>a,RY:()=>s,hL:()=>l,iY:()=>r,qh:()=>n}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(s||(s={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(l||(l={}))},28101:(e,t,i)=>{i.d(t,{B3:()=>p,PR:()=>m,cM:()=>c}),i(22303);var s=i(38171),l=i(74085),r=i(92604),n=i(99282),o=i(51706);const a=r.Z.getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),u=(new s.Z,Math.PI),p=/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i;function c(e,t,i){const s="visualVariables"in e&&e.visualVariables?e.visualVariables.find((e=>"rotation"===e.type)):e;if(!s)return;if("esri.renderers.visualVariables.RotationVariable"!==s.declaredClass)return void a.warn("The visualVariable should be an instance of esri.renderers.visualVariables.RotationVariable");const l=s.axis||"heading",r="heading"===l&&"arithmetic"===s.rotationType?90:0,n="heading"===l&&"arithmetic"===s.rotationType?-1:1,o="number"==typeof t?null:t,u=o&&o.attributes,p=s.field,{hasExpression:c}=s.cache;let d=s.cache.compiledFunc,h=0;if(!p&&!c)return h;if(c){if(null==i||null==i.arcade)return void a.error("Use of arcade expressions requires an arcade context");const e={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},t=i.arcade.arcadeUtils,l=t.getViewInfo(e),r=t.createExecContext(o,l);if(!d){const e=t.createSyntaxTree(s.valueExpression);d=t.createFunction(e),s.cache.compiledFunc=d}h=t.executeFunction(d,r)}else u&&(h=u[p]||0);return h="number"!=typeof h||isNaN(h)?null:r+n*h,h}function d(e,t,i){const s="visualVariables"in e&&e.visualVariables?e.visualVariables.find((e=>"size"===e.type)):e;if(!s)return;if("esri.renderers.visualVariables.SizeVariable"!==s.declaredClass)return void a.warn("The visualVariable should be an instance of esri.renderers.visualVariables.SizeVariable");const l=function(e,t,i,s,l){switch(t.transformationType){case o.hL.Additive:return function(e,t,i,s){return e+((h(t.minSize,i,s)||t.minDataValue)??0)}(e,t,i,s);case o.hL.Constant:return function(e,t,i){const s=e.stops;let l=s&&s.length&&s[0].size;return null==l&&(l=e.minSize),h(l,t,i)}(t,i,s);case o.hL.ClampedLinear:return function(e,t,i,s){const l=(e-t.minDataValue)/(t.maxDataValue-t.minDataValue),r=h(t.minSize,i,s),n=h(t.maxSize,i,s),o=null!=s?s.shape:void 0;if(e<=t.minDataValue)return r;if(e>=t.maxDataValue)return n;if(null==r||null==n)return null;if("area"===t.scaleBy&&o){const e="circle"===o,t=e?u*(r/2)**2:r*r,i=t+l*((e?u*(n/2)**2:n*n)-t);return e?2*Math.sqrt(i/u):Math.sqrt(i)}return r+l*(n-r)}(e,t,i,s);case o.hL.Proportional:return function(e,t,i,s){const l=null!=s?s.shape:void 0,r=e/t.minDataValue,n=h(t.minSize,i,s),o=h(t.maxSize,i,s);let a=null;return a="circle"===l?2*Math.sqrt(r*(n/2)**2):"square"===l||"diamond"===l||"image"===l?Math.sqrt(r*n**2):r*n,y(a,n,o)}(e,t,i,s);case o.hL.Stops:return function(e,t,i,s,l){const[r,n,o]=function(e,t){if(!t)return;let i=0,s=t.length-1;return t.some(((t,l)=>e<t?(s=l,!0):(i=l,!1))),[i,s,(e-t[i])/(t[s]-t[i])]}(e,l);if(r===n)return h(t.stops?.[r].size,i,s);{const e=h(t.stops?.[r].size,i,s);return e+(h(t.stops?.[n].size,i,s)-e)*o}}(e,t,i,s,l);case o.hL.RealWorldSize:return function(e,t,i,s){const l=(null!=s&&s.resolution?s.resolution:1)*n.a[t.valueUnit],r=h(t.minSize,i,s),o=h(t.maxSize,i,s),{valueRepresentation:a}=t;let p=null;return p="area"===a?2*Math.sqrt(e/u)/l:"radius"===a||"distance"===a?2*e/l:e/l,y(p,r,o)}(e,t,i,s);case o.hL.Identity:return e;case o.hL.Unknown:return null}}(function(e,t,i){const s="number"==typeof t,l=s?null:t,r=l&&l.attributes;let n=s?t:null;const{isScaleDriven:u}=e.cache;let p=e.cache.compiledFunc;if(u){const t=null!=i?i.scale:void 0,s=null!=i?i.view:void 0;n=null==t||"3d"===s?function(e){let t=null,i=null;const s=e.stops;return s?(t=s[0].value,i=s[s.length-1].value):(t=e.minDataValue||0,i=e.maxDataValue||0),(t+i)/2}(e):t}else if(!s)switch(e.inputValueType){case o.RY.Expression:{if(null==i||null==i.arcade)return void a.error("Use of arcade expressions requires an arcade context");const t={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},s=i.arcade.arcadeUtils,r=s.getViewInfo(t),o=s.createExecContext(l,r);if(!p){const t=s.createSyntaxTree(e.valueExpression);p=s.createFunction(t),e.cache.compiledFunc=p}n=s.executeFunction(p,o);break}case o.RY.Field:r&&(n=r[e.field]);break;case o.RY.Unknown:n=null}if(!(0,o.qh)(n))return null;if(s||!e.normalizationField)return n;const c=r?parseFloat(r[e.normalizationField]):null;return(0,o.qh)(c)&&0!==c?n/c:null}(s,t,i),s,t,i,s.cache.ipData);return null==l||isNaN(l)?0:l}function h(e,t,i){return null==e?null:(0,o.iY)(e)?d(e,t,i):(0,o.qh)(e)?e:null}function y(e,t,i){return(0,o.qh)(i)&&e>i?i:(0,o.qh)(t)&&e<t?t:e}function m(e,t,i){const s=["proportional","proportional","proportional"];for(const r of e){const e=r.useSymbolValue?"symbol-value":d(r,t,i);switch(r.axis){case"width":s[0]=e;break;case"depth":s[1]=e;break;case"height":s[2]=e;break;case"width-and-depth":s[0]=e,s[1]=e;break;case"all":case void 0:case null:s[0]=e,s[1]=e,s[2]=e;break;default:(0,l.Bg)(r.axis)}}return s}},98046:(e,t,i)=>{i.d(t,{Z:()=>h});var s,l=i(43697),r=i(22303),n=i(22974),o=i(5600),a=i(75215),u=i(36030),p=i(52011),c=i(899);let d=s=class extends c.Z{constructor(e){super(e),this.algorithm=null,this.fromColor=null,this.toColor=null,this.type="algorithmic"}clone(){return new s({fromColor:(0,n.d9)(this.fromColor),toColor:(0,n.d9)(this.toColor),algorithm:this.algorithm})}};(0,l._)([(0,u.J)({esriCIELabAlgorithm:"cie-lab",esriHSVAlgorithm:"hsv",esriLabLChAlgorithm:"lab-lch"})],d.prototype,"algorithm",void 0),(0,l._)([(0,o.Cb)({type:r.Z,json:{type:[a.z8],write:!0}})],d.prototype,"fromColor",void 0),(0,l._)([(0,o.Cb)({type:r.Z,json:{type:[a.z8],write:!0}})],d.prototype,"toColor",void 0),(0,l._)([(0,o.Cb)({type:["algorithmic"]})],d.prototype,"type",void 0),d=s=(0,l._)([(0,p.j)("esri.rest.support.AlgorithmicColorRamp")],d);const h=d},899:(e,t,i)=>{i.d(t,{Z:()=>a});var s=i(43697),l=i(96674),r=i(5600),n=(i(75215),i(67676),i(80442),i(52011));let o=class extends l.wq{constructor(e){super(e),this.type=null}};(0,s._)([(0,r.Cb)({readOnly:!0,json:{read:!1,write:!0}})],o.prototype,"type",void 0),o=(0,s._)([(0,n.j)("esri.rest.support.ColorRamp")],o);const a=o},1515:(e,t,i)=>{i.d(t,{Z:()=>c});var s,l=i(43697),r=i(22974),n=i(5600),o=(i(75215),i(52011)),a=i(98046),u=i(899);let p=s=class extends u.Z{constructor(e){super(e),this.colorRamps=null,this.type="multipart"}clone(){return new s({colorRamps:(0,r.d9)(this.colorRamps)})}};(0,l._)([(0,n.Cb)({type:[a.Z],json:{write:!0}})],p.prototype,"colorRamps",void 0),(0,l._)([(0,n.Cb)({type:["multipart"]})],p.prototype,"type",void 0),p=s=(0,l._)([(0,o.j)("esri.rest.support.MultipartColorRamp")],p);const c=p},94593:(e,t,i)=>{i.d(t,{V:()=>n,i:()=>o});var s=i(98046),l=i(899),r=i(1515);const n={key:"type",base:l.Z,typeMap:{algorithmic:s.Z,multipart:r.Z}};function o(e){return e&&e.type?"algorithmic"===e.type?s.Z.fromJSON(e):"multipart"===e.type?r.Z.fromJSON(e):null:null}},72245:(e,t,i)=>{i.d(t,{K3:()=>l,Rx:()=>r});var s=i(80442);const l=()=>!!(0,s.Z)("enable-feature:force-wosr"),r=()=>!!(0,s.Z)("enable-feature:SceneLayer-editing");((e="i3s-patching")=>{switch(s.Z.add("enable-i3s-patching",!1,!0,!0),s.Z.add("enable-feature:direct-3d-object-feature-layer-display",!1,!0,!0),s.Z.add("enable-feature:SceneLayer-editing",!0,!0,!0),e){case"feature-layer-view":s.Z.add("enable-feature:direct-3d-object-feature-layer-display",!0,!0,!0);break;case"i3s-patching":s.Z.add("enable-i3s-patching",!0,!0,!0)}})("i3s-patching")},21878:(e,t,i)=>{i.d(t,{im:()=>x,cW:()=>w,vX:()=>_});var s=i(9790),l=i(20102),r=i(84230),n=i(87223),o=i(59390),a=i(42143),u=i(4095),p=i(98587),c=i(77987),d=i(37898),h=i(20256),y=i(3456),m=i(86114),f=i(78724),b=i(20825);const v={retainId:!1,ignoreDrivers:!1,hasLabelingContext:!0};function g(e,t=v){if(!e)return{symbol:null};const{retainId:i=v.retainId,ignoreDrivers:r=v.ignoreDrivers,hasLabelingContext:n=v.hasLabelingContext,retainCIM:g=v.retainCIM}=t;let w=null;if((0,s.dU)(e)||e instanceof o.Z)w=e.clone();else if("cim"===e.type){const t=e.data?.symbol?.type;if("CIMPointSymbol"!==t)return{error:new l.Z("symbol-conversion:unsupported-cim-symbol",`CIM symbol of type '${t||"unknown"}' is unsupported in 3D`,{symbol:e})};w=g?e.clone():a.Z.fromCIMSymbol(e)}else if(e instanceof u.Z)w=p.Z.fromSimpleLineSymbol(e);else if(e instanceof c.Z)w=a.Z.fromSimpleMarkerSymbol(e);else if(e instanceof d.Z)w=a.Z.fromPictureMarkerSymbol(e);else if(e instanceof h.Z)w=t.geometryType&&"mesh"===t.geometryType?y.Z.fromSimpleFillSymbol(e):m.Z.fromSimpleFillSymbol(e);else{if(!(e instanceof f.Z))return{error:new l.Z("symbol-conversion:unsupported-2d-symbol",`2D symbol of type '${e.type||e.declaredClass}' is unsupported in 3D`,{symbol:e})};w=n?b.Z.fromTextSymbol(e):a.Z.fromTextSymbol(e)}return i&&w&&"cim"!==w.type&&(w.id=e.id),r&&(0,s.dU)(w)&&w.symbolLayers.forEach((e=>e.ignoreDrivers=!0)),{symbol:w}}function w(e,t,i,s){const l=S(e,{},{context:s,isLabelSymbol:!1});null!=l&&(t[i]=l)}function _(e,t,i,s){const l=S(e,{},{context:s,isLabelSymbol:!0});null!=l&&(t[i]=l)}function V(e){return e instanceof n.Z||e instanceof o.Z}function S(e,t,i){if(null==e)return null;const{context:s,isLabelSymbol:n}=i,o=s?.origin,a=s?.messages;if("web-scene"===o&&!V(e)){const i=g(e,{retainCIM:!0,hasLabelingContext:n});return null!=i.symbol?i.symbol.write(t,s):(a?.push(new l.Z("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView`,{symbol:e,context:s,error:i.error})),null)}return("web-map"===o||"portal-item"===o&&!(0,r.A2)(s?.layer))&&V(e)?(a?.push(new l.Z("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in web maps and portal items. Use 2D symbology and CIMSymbol instead when working with MapView`,{symbol:e,context:s})),null):e.write(t,s)}function x(e,t){return(0,s.S9)(e,null,t)}},27883:(e,t,i)=>{i.d(t,{EJ:()=>y,KV:()=>d,n2:()=>c,v9:()=>h,wm:()=>b});var s=i(3172),l=i(20102),r=i(95330),n=i(81271),o=i(48522),a=i(41253),u=i(72245);let p={};function c(e,t,i){return e&&null!=e.styleUrl?async function(e,t){try{return{data:(await y(e,t)).data,baseUrl:(0,n.Yd)(e),styleUrl:e}}catch(e){return(0,r.r9)(e),null}}(e.styleUrl,i):e&&null!=e.styleName?function(e,t,i){const s=null!=t.portal?t.portal:o.Z.getDefault();let r;const n=`${s.url} - ${s.user&&s.user.username} - ${e}`;return p[n]||(p[n]=function(e,t,i){return t.load(i).then((()=>{const s=new a.Z({disableExtraQuery:!0,query:`owner:${m} AND type:${f} AND typekeywords:"${e}"`});return t.queryItems(s,i)})).then((({results:t})=>{let s=null;const r=e.toLowerCase();if(t&&Array.isArray(t))for(const e of t){const t=e.typeKeywords?.some((e=>e.toLowerCase()===r));if(t&&e.type===f&&e.owner===m){s=e;break}}if(!s)throw new l.Z("symbolstyleutils:style-not-found",`The style '${e}' could not be found`,{styleName:e});return s.load(i)}))}(e,s,i).then((e=>(r=e,e.fetchData()))).then((t=>({data:t,baseUrl:r.itemUrl??"",styleName:e})))),p[n]}(e.styleName,t,i):Promise.reject(new l.Z("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function d(e){return null===e||"CIMSymbolReference"===e.type?e:{type:"CIMSymbolReference",symbol:e}}function h(e,t,i=["gltf"]){if("cimRef"===t)return e.cimRef;if(e.formatInfos&&!(0,u.K3)())for(const t of i){const i=e.formatInfos.find((e=>e.type===t));if(i)return i.href}return e.webRef}function y(e,t){const i={responseType:"json",query:{f:"json"},...t};return(0,s.default)((0,n.Fv)(e),i)}const m="esri_en",f="Style",b="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json"}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1596],{92835:(e,t,i)=>{i.d(t,{Z:()=>p});var r,s=i(43697),n=i(96674),o=i(70586),a=i(35463),l=i(5600),h=(i(75215),i(67676),i(80442),i(71715)),u=i(52011),d=i(30556);let c=r=class extends n.wq{static get allTime(){return m}static get empty(){return g}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,i=null!=this.end?this.end.getTime():this.end,r=null!=e.start?e.start.getTime():e.start,s=null!=e.end?e.end.getTime():e.end;return t===r&&i===s}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,o.yw)(this.start,(t=>(0,a.JE)(t,e))),i=(0,o.yw)(this.end,(t=>{const i=(0,a.JE)(t,e);return t.getTime()===i.getTime()?i:(0,a.Nm)(i,1,e)}));return new r({start:t,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;if(s>=t&&s<=i?o=s:t>=s&&t<=n&&(o=t),i>=s&&i<=n?a=i:n>=t&&n<=i&&(a=n),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new r;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return r.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const i=new r,{start:s,end:n}=this;return null!=s&&(i.start=(0,a.Nm)(s,e,t)),null!=n&&(i.end=(0,a.Nm)(n,e,t)),i}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return m.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s._)([(0,h.r)("end")],c.prototype,"readEnd",null),(0,s._)([(0,d.c)("end")],c.prototype,"writeEnd",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s._)([(0,h.r)("start")],c.prototype,"readStart",null),(0,s._)([(0,d.c)("start")],c.prototype,"writeStart",null),c=r=(0,s._)([(0,u.j)("esri.TimeExtent")],c);const m=new c,g=new c({start:void 0,end:void 0}),p=c},13867:(e,t,i)=>{i.d(t,{z:()=>s});var r=i(69801);class s{constructor(e,t){this._storage=new r.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,i)=>{i.d(t,{WJ:()=>a,Xq:()=>o});var r,s,n=i(44553);(s=r||(r={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class o{constructor(e,t,i){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),i&&(this._storage.registerRemoveFunc(this.id,i),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,i,r=0){this._storage.put(this,e,t,i,r)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,i){this._storage.updateSize(this,e,t,i)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n.Z,this._users=new n.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}put(e,t,i,s,n){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,r.ALL)),s>this._maxSize)return void this._notifyRemove(t,i,r.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return void console.warn("Refusing to cache entry with invalid size "+s);const a=1+Math.max(n,-3)- -3;this._db.set(t,{entry:i,size:s,lifetime:a,lives:a}),this._size+=s,e.size+=s,this._checkSizeLimits()}updateSize(e,t,i,s){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===i){for(this._size-=n.size,e.size-=n.size;s>this._maxSize;){const e=this._notifyRemove(t,i,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}n.size=s,this._size+=s,e.size+=s,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach(((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forAll((i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}}))}));const r={};this._users.forAll((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"}));const s=Object.keys(t);s.sort(((e,i)=>t[i]-t[e])),s.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]));for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,r.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i){let r;return this._removeFuncs.some((s=>{if(e.startsWith(s[0])){const e=s[1](t,i);return"number"==typeof e&&(r=e),!0}return!1})),r}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,i]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,i,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,i=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,r.SOME);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0},17445:(e,t,i)=>{i.d(t,{N1:()=>c,YP:()=>l,Z_:()=>p,gx:()=>h,nn:()=>y,on:()=>d,tX:()=>_});var r=i(91460),s=i(50758),n=i(70586),o=i(95330),a=i(26258);function l(e,t,i={}){return u(e,t,i,m)}function h(e,t,i={}){return u(e,t,i,g)}function u(e,t,i={},r){let s=null;const o=i.once?(e,i)=>{r(e)&&((0,n.hw)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,a.aQ)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return s}function d(e,t,i,o={}){let a=null,h=null,u=null;function d(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function c(e){o.once&&o.once&&(0,n.hw)(u),i(e)}const m=l(e,((e,i)=>{d(),(0,r.vT)(e)&&(a=e,h=(0,r.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,s.kB)((()=>{m.remove(),d()})),u}function c(e,t){return function(e,t,i){if((0,o.Hc)(i))return Promise.reject((0,o.zE)());const r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,n.hw)(a)}return new Promise(((r,n)=>{a=(0,s.AL)([(0,o.fu)(i,(()=>{l(),n((0,o.zE)())})),u(e,(e=>{l(),r(e)}),{sync:!1,once:!0},t??m)])}))}(e,g,t)}function m(e){return!0}function g(e){return!!e}i(87538);const p={sync:!0},y={initial:!0},_={sync:!0,initial:!0}},35463:(e,t,i)=>{i.d(t,{JE:()=>o,Nm:()=>n,rJ:()=>a}),i(80442);const r={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},s={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,i){const r=new Date(e.getTime());if(t&&i){const e=s[i],{getter:n,setter:o,multiplier:a}=e;if("months"===i){const e=function(e,t){const i=new Date(e,t+1,1);return i.setDate(0),i.getDate()}(r.getFullYear(),r.getMonth()+t);r.getDate()>e&&r.setDate(e)}r[o](r[n]()+t*a)}return r}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,i){return 0===e?0:e*r[t]/r[i]}},79235:(e,t,i)=>{i.d(t,{Z:()=>v});var r,s=i(43697),n=i(67676),o=i(35454),a=i(96674),l=i(67900),h=i(20941),u=i(5600),d=(i(75215),i(80442),i(71715)),c=i(52011),m=i(30556);const g=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),p=g.jsonValues.slice();(0,n.e$)(p,"orthometric");const y=(0,o.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let _=r=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return g.write(e,t,i)}readHeightModel(e,t,i){return g.read(e)||(i&&i.messages&&i.messages.push(function(e,t){return new h.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return y.read(e)||(i&&i.messages&&i.messages.push(f(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.$C)(e)||y.read(e)||(i&&i.messages&&i.messages.push(f(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.cM)(t);return new r({heightModel:e.heightModel,heightUnit:i,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function f(e,t){return new h.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.Cb)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:p,default:"ellipsoidal"}}}})],_.prototype,"heightModel",void 0),(0,s._)([(0,m.c)("web-scene","heightModel")],_.prototype,"writeHeightModel",null),(0,s._)([(0,d.r)(["web-scene","service"],"heightModel")],_.prototype,"readHeightModel",null),(0,s._)([(0,u.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y.jsonValues,write:y.write}}}})],_.prototype,"heightUnit",void 0),(0,s._)([(0,d.r)("web-scene","heightUnit")],_.prototype,"readHeightUnit",null),(0,s._)([(0,d.r)("service","heightUnit")],_.prototype,"readHeightUnitService",null),(0,s._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],_.prototype,"vertCRS",void 0),(0,s._)([(0,d.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],_.prototype,"readVertCRS",null),_=r=(0,s._)([(0,c.j)("esri.geometry.HeightModelInfo")],_);const v=_},90344:(e,t,i)=>{i.d(t,{LJ:()=>T,Xr:()=>_,Ze:()=>b,cZ:()=>h,i$:()=>M,o8:()=>D,p6:()=>S});var r=i(35454),s=i(70171),n=i(17126);const o={year:void 0,month:void 0,day:void 0,weekday:void 0},a={hour:void 0,minute:void 0,second:void 0},l={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},h={timeZone:"Etc/UTC"},u={year:"numeric",month:"numeric",day:"numeric"},d={year:"numeric",month:"long",day:"numeric"},c={year:"numeric",month:"short",day:"numeric"},m={year:"numeric",month:"long",weekday:"long",day:"numeric"},g={hour:"numeric",minute:"numeric"},p={...g,second:"numeric"},y={"short-date":u,"short-date-short-time":{...u,...g},"short-date-short-time-24":{...u,...g,hour12:!1},"short-date-long-time":{...u,...p},"short-date-long-time-24":{...u,...p,hour12:!1},"short-date-le":u,"short-date-le-short-time":{...u,...g},"short-date-le-short-time-24":{...u,...g,hour12:!1},"short-date-le-long-time":{...u,...p},"short-date-le-long-time-24":{...u,...p,hour12:!1},"long-month-day-year":d,"long-month-day-year-short-time":{...d,...g},"long-month-day-year-short-time-24":{...d,...g,hour12:!1},"long-month-day-year-long-time":{...d,...p},"long-month-day-year-long-time-24":{...d,...p,hour12:!1},"day-short-month-year":c,"day-short-month-year-short-time":{...c,...g},"day-short-month-year-short-time-24":{...c,...g,hour12:!1},"day-short-month-year-long-time":{...c,...p},"day-short-month-year-long-time-24":{...c,...p,hour12:!1},"long-date":m,"long-date-short-time":{...m,...g},"long-date-short-time-24":{...m,...g,hour12:!1},"long-date-long-time":{...m,...p},"long-date-long-time-24":{...m,...p,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":g,"long-time":p},_=(0,r.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),f={ar:"ar-u-nu-latn-ca-gregory"};let v=new WeakMap,w=y["short-date-short-time"];function b(e){return y[e]}function S(e,t){return function(e){const t=e||w;let i=v.get(t);if(!i){const e=(0,s.Kd)(),r=f[e]||e;i=new Intl.DateTimeFormat(r,t),v.set(t,i)}return i}(t).format(e)}function D(e,t=y["short-date"]){return S(new Date(e),{...t,...h,...a})}function T(e,t=y["short-time"]){return S(new Date(`1970-01-01T${e}Z`),{...t,...h,...o})}function M(e,t=y["short-date-short-time"]){const i=n.ou.fromISO(e,{setZone:!0}),r=(0,s.Kd)(),o=f[r]??r;return i.toLocaleString({...l,...t},{locale:o})}(0,s.Ze)((()=>{v=new WeakMap,w=y["short-date-short-time"]}))},18848:(e,t,i)=>{i.d(t,{sh:()=>l,uf:()=>h});var r=i(70586),s=i(70171);const n={ar:"ar-u-nu-latn"};let o=new WeakMap,a={};function l(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function h(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||a;if(!o.has(t)){const i=(0,s.Kd)(),r=n[(0,s.Kd)()]||i;o.set(t,new Intl.NumberFormat(r,e))}return(0,r.j0)(o.get(t))}(t).format(e)}(0,s.Ze)((()=>{o=new WeakMap,a={}}))},65665:(e,t,i)=>{i.r(t),i.d(t,{default:()=>k});var r=i(43697),s=i(3172),n=i(20102),o=i(70586),a=i(16453),l=i(95330),h=i(81271),u=i(5600),d=(i(75215),i(67676)),c=(i(80442),i(71715)),m=i(52011),g=i(79235),p=i(87085),y=i(46486),_=i(17287),f=i(38009),v=i(16859),w=i(21506);class b{constructor(e,t,i,r){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=i,this.noDataValue=r)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,r=-1/0,s=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(i=n<i?n:i,r=n>r?n:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}}var S=i(50758),D=i(92604),T=i(78346);class M{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._promise=(0,T.bA)(e,{...s,schedule:r}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>D.Z.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const i={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(i),this._connectListener(i),(0,S.kB)((()=>{i.removed=!0,(0,d.Od)(this._listeners,i),this._thread&&null!=i.threadHandle&&i.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,i){if(this._thread){const r=this._transferLists[e],s=r?r(t):[];return this._thread.invoke(e,t,{transferList:s,signal:i})}return this._promise?this._promise.then((()=>((0,l.k_)(i),this.invokeMethod(e,t,i)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}class z extends M{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(I.forEach(((e,t)=>{e===this&&I.delete(t)})),this.destroy())}}const I=new Map;let E=class extends((0,y.Z)((0,_.Y)((0,f.q)((0,v.I)((0,a.R)(p.Z)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=I.get(e);return t||(null!=e?(t=new z((t=>e.immediate.schedule(t))),I.set(e,t)):(t=new z,I.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.RY)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.r9).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,i,r){const n=null!=(r=r||{signal:null}).signal?r.signal:r.signal=(new AbortController).signal,o={responseType:"array-buffer",signal:n},a={noDataValue:r.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,i,r))).then((()=>(0,s.default)(this.getTileUrl(e,t,i),o))).then((e=>this._lercDecoder.decode(e.data,a,n))).then((e=>new b(e)))}getTileUrl(e,t,i){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.B7)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){const{ElevationQuery:r}=await i.e(5642).then(i.bind(i,55642));return(0,l.k_)(t),(new r).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:r}=await i.e(5642).then(i.bind(i,55642));return(0,l.k_)(t),(new r).createSampler(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,s.default)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[L]}};(0,r._)([(0,u.Cb)({readOnly:!0})],E.prototype,"capabilities",void 0),(0,r._)([(0,c.r)("service","capabilities",["capabilities"])],E.prototype,"readCapabilities",null),(0,r._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],E.prototype,"copyright",void 0),(0,r._)([(0,u.Cb)({readOnly:!0,type:g.Z})],E.prototype,"heightModelInfo",void 0),(0,r._)([(0,u.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],E.prototype,"path",void 0),(0,r._)([(0,u.Cb)({type:["show","hide"]})],E.prototype,"listMode",void 0),(0,r._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],E.prototype,"minScale",void 0),(0,r._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],E.prototype,"maxScale",void 0),(0,r._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],E.prototype,"opacity",void 0),(0,r._)([(0,u.Cb)({type:["ArcGISTiledElevationServiceLayer"]})],E.prototype,"operationalLayerType",void 0),(0,r._)([(0,u.Cb)()],E.prototype,"sourceJSON",void 0),(0,r._)([(0,u.Cb)({json:{read:!1},value:"elevation",readOnly:!0})],E.prototype,"type",void 0),(0,r._)([(0,u.Cb)(w.HQ)],E.prototype,"url",void 0),(0,r._)([(0,u.Cb)()],E.prototype,"version",void 0),(0,r._)([(0,c.r)("version",["currentVersion"])],E.prototype,"readVersion",null),E=(0,r._)([(0,m.j)("esri.layers.ElevationLayer")],E);const L=Symbol("default-fetch-tile");E.prototype.fetchTile[L]=!0;const k=E},16859:(e,t,i)=>{i.d(t,{I:()=>S});var r=i(43697),s=i(68773),n=i(40330),o=i(3172),a=i(66643),l=i(20102),h=i(92604),u=i(70586),d=i(95330),c=i(81271),m=i(5600),g=(i(75215),i(67676),i(80442),i(71715)),p=i(52011),y=i(30556),_=i(84230),f=i(48522),v=i(15235),w=i(86082),b=i(14661);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new v.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:r}=await i.e(8062).then(i.bind(i,18062));return(0,d.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.D_)(e)||h.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,d.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,b.Ss)(i);let s,o;if(r)s=i.portal.url;else try{s=await(0,_.oP)(this.url,t)}catch(e){(0,d.r9)(e)}if(!s||!(0,c.Zo)(s,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await i.reload():(i=new v.default({id:e,portal:{url:s}}),await i.load(t)),i.portal.user)return(0,b.Ss)(i)}catch(e){(0,d.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=D.credential===t?D.user:await this._fetchEditingUser(e);return D.credential=t,D.user=i,null==i||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=f.Z.getDefault();if(s&&s.loaded&&(0,c.Fv)(s.restUrl)===(0,c.Fv)(r))return s.user;const l=`${r}/community/self`,h=null!=e?e.signal:null,u=await(0,a.q6)((0,o.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?w.default.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||f.Z.getDefault());return i&&r&&!(0,c.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,m.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,r._)([(0,g.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,p.j)("esri.layers.mixins.PortalLayer")],t),t},D={credential:null,user:null}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1596],{92835:(e,t,i)=>{i.d(t,{Z:()=>p});var r,s=i(43697),n=i(96674),o=i(70586),a=i(35463),l=i(5600),h=(i(75215),i(67676),i(80442),i(71715)),u=i(52011),d=i(30556);let c=r=class extends n.wq{static get allTime(){return m}static get empty(){return g}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,i=null!=this.end?this.end.getTime():this.end,r=null!=e.start?e.start.getTime():e.start,s=null!=e.end?e.end.getTime():e.end;return t===r&&i===s}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,o.yw)(this.start,(t=>(0,a.JE)(t,e))),i=(0,o.yw)(this.end,(t=>{const i=(0,a.JE)(t,e);return t.getTime()===i.getTime()?i:(0,a.Nm)(i,1,e)}));return new r({start:t,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;if(s>=t&&s<=i?o=s:t>=s&&t<=n&&(o=t),i>=s&&i<=n?a=i:n>=t&&n<=i&&(a=n),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new r;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return r.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const i=new r,{start:s,end:n}=this;return null!=s&&(i.start=(0,a.Nm)(s,e,t)),null!=n&&(i.end=(0,a.Nm)(n,e,t)),i}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return m.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s._)([(0,h.r)("end")],c.prototype,"readEnd",null),(0,s._)([(0,d.c)("end")],c.prototype,"writeEnd",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s._)([(0,h.r)("start")],c.prototype,"readStart",null),(0,s._)([(0,d.c)("start")],c.prototype,"writeStart",null),c=r=(0,s._)([(0,u.j)("esri.TimeExtent")],c);const m=new c,g=new c({start:void 0,end:void 0}),p=c},13867:(e,t,i)=>{i.d(t,{z:()=>s});var r=i(69801);class s{constructor(e,t){this._storage=new r.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,i)=>{i.d(t,{WJ:()=>a,Xq:()=>o});var r,s,n=i(44553);(s=r||(r={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class o{constructor(e,t,i){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),i&&(this._storage.registerRemoveFunc(this.id,i),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,i,r=0){this._storage.put(this,e,t,i,r)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,i){this._storage.updateSize(this,e,t,i)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n.Z,this._users=new n.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}put(e,t,i,s,n){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,r.ALL)),s>this._maxSize)return void this._notifyRemove(t,i,r.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return void console.warn("Refusing to cache entry with invalid size "+s);const a=1+Math.max(n,-3)- -3;this._db.set(t,{entry:i,size:s,lifetime:a,lives:a}),this._size+=s,e.size+=s,this._checkSizeLimits()}updateSize(e,t,i,s){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===i){for(this._size-=n.size,e.size-=n.size;s>this._maxSize;){const e=this._notifyRemove(t,i,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}n.size=s,this._size+=s,e.size+=s,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach(((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forAll((i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}}))}));const r={};this._users.forAll((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"}));const s=Object.keys(t);s.sort(((e,i)=>t[i]-t[e])),s.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]));for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,r.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i){let r;return this._removeFuncs.some((s=>{if(e.startsWith(s[0])){const e=s[1](t,i);return"number"==typeof e&&(r=e),!0}return!1})),r}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,i]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,i,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,i=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,r.SOME);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0},17445:(e,t,i)=>{i.d(t,{N1:()=>c,YP:()=>l,Z_:()=>p,gx:()=>h,nn:()=>y,on:()=>d,tX:()=>_});var r=i(91460),s=i(50758),n=i(70586),o=i(95330),a=i(26258);function l(e,t,i={}){return u(e,t,i,m)}function h(e,t,i={}){return u(e,t,i,g)}function u(e,t,i={},r){let s=null;const o=i.once?(e,i)=>{r(e)&&((0,n.hw)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,a.aQ)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return s}function d(e,t,i,o={}){let a=null,h=null,u=null;function d(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function c(e){o.once&&o.once&&(0,n.hw)(u),i(e)}const m=l(e,((e,i)=>{d(),(0,r.vT)(e)&&(a=e,h=(0,r.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,s.kB)((()=>{m.remove(),d()})),u}function c(e,t){return function(e,t,i){if((0,o.Hc)(i))return Promise.reject((0,o.zE)());const r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,n.hw)(a)}return new Promise(((r,n)=>{a=(0,s.AL)([(0,o.fu)(i,(()=>{l(),n((0,o.zE)())})),u(e,(e=>{l(),r(e)}),{sync:!1,once:!0},t??m)])}))}(e,g,t)}function m(e){return!0}function g(e){return!!e}i(87538);const p={sync:!0},y={initial:!0},_={sync:!0,initial:!0}},35463:(e,t,i)=>{i.d(t,{JE:()=>o,Nm:()=>n,rJ:()=>a}),i(80442);const r={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},s={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,i){const r=new Date(e.getTime());if(t&&i){const e=s[i],{getter:n,setter:o,multiplier:a}=e;if("months"===i){const e=function(e,t){const i=new Date(e,t+1,1);return i.setDate(0),i.getDate()}(r.getFullYear(),r.getMonth()+t);r.getDate()>e&&r.setDate(e)}r[o](r[n]()+t*a)}return r}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,i){return 0===e?0:e*r[t]/r[i]}},79235:(e,t,i)=>{i.d(t,{Z:()=>v});var r,s=i(43697),n=i(67676),o=i(35454),a=i(96674),l=i(67900),h=i(20941),u=i(5600),d=(i(75215),i(80442),i(71715)),c=i(52011),m=i(30556);const g=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),p=g.jsonValues.slice();(0,n.e$)(p,"orthometric");const y=(0,o.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let _=r=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return g.write(e,t,i)}readHeightModel(e,t,i){return g.read(e)||(i&&i.messages&&i.messages.push(function(e,t){return new h.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return y.read(e)||(i&&i.messages&&i.messages.push(f(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.$C)(e)||y.read(e)||(i&&i.messages&&i.messages.push(f(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.cM)(t);return new r({heightModel:e.heightModel,heightUnit:i,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function f(e,t){return new h.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.Cb)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:p,default:"ellipsoidal"}}}})],_.prototype,"heightModel",void 0),(0,s._)([(0,m.c)("web-scene","heightModel")],_.prototype,"writeHeightModel",null),(0,s._)([(0,d.r)(["web-scene","service"],"heightModel")],_.prototype,"readHeightModel",null),(0,s._)([(0,u.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y.jsonValues,write:y.write}}}})],_.prototype,"heightUnit",void 0),(0,s._)([(0,d.r)("web-scene","heightUnit")],_.prototype,"readHeightUnit",null),(0,s._)([(0,d.r)("service","heightUnit")],_.prototype,"readHeightUnitService",null),(0,s._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],_.prototype,"vertCRS",void 0),(0,s._)([(0,d.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],_.prototype,"readVertCRS",null),_=r=(0,s._)([(0,c.j)("esri.geometry.HeightModelInfo")],_);const v=_},90344:(e,t,i)=>{i.d(t,{LJ:()=>T,Xr:()=>_,Ze:()=>b,cZ:()=>h,i$:()=>M,o8:()=>D,p6:()=>S});var r=i(35454),s=i(70171),n=i(17126);const o={year:void 0,month:void 0,day:void 0,weekday:void 0},a={hour:void 0,minute:void 0,second:void 0},l={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},h={timeZone:"Etc/UTC"},u={year:"numeric",month:"numeric",day:"numeric"},d={year:"numeric",month:"long",day:"numeric"},c={year:"numeric",month:"short",day:"numeric"},m={year:"numeric",month:"long",weekday:"long",day:"numeric"},g={hour:"numeric",minute:"numeric"},p={...g,second:"numeric"},y={"short-date":u,"short-date-short-time":{...u,...g},"short-date-short-time-24":{...u,...g,hour12:!1},"short-date-long-time":{...u,...p},"short-date-long-time-24":{...u,...p,hour12:!1},"short-date-le":u,"short-date-le-short-time":{...u,...g},"short-date-le-short-time-24":{...u,...g,hour12:!1},"short-date-le-long-time":{...u,...p},"short-date-le-long-time-24":{...u,...p,hour12:!1},"long-month-day-year":d,"long-month-day-year-short-time":{...d,...g},"long-month-day-year-short-time-24":{...d,...g,hour12:!1},"long-month-day-year-long-time":{...d,...p},"long-month-day-year-long-time-24":{...d,...p,hour12:!1},"day-short-month-year":c,"day-short-month-year-short-time":{...c,...g},"day-short-month-year-short-time-24":{...c,...g,hour12:!1},"day-short-month-year-long-time":{...c,...p},"day-short-month-year-long-time-24":{...c,...p,hour12:!1},"long-date":m,"long-date-short-time":{...m,...g},"long-date-short-time-24":{...m,...g,hour12:!1},"long-date-long-time":{...m,...p},"long-date-long-time-24":{...m,...p,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":g,"long-time":p},_=(0,r.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),f={ar:"ar-u-nu-latn-ca-gregory"};let v=new WeakMap,w=y["short-date-short-time"];function b(e){return y[e]}function S(e,t){return function(e){const t=e||w;let i=v.get(t);if(!i){const e=(0,s.Kd)(),r=f[e]||e;i=new Intl.DateTimeFormat(r,t),v.set(t,i)}return i}(t).format(e)}function D(e,t=y["short-date"]){return S(new Date(e),{...t,...h,...a})}function T(e,t=y["short-time"]){return S(new Date(`1970-01-01T${e}Z`),{...t,...h,...o})}function M(e,t=y["short-date-short-time"]){const i=n.ou.fromISO(e,{setZone:!0}),r=(0,s.Kd)(),o=f[r]??r;return i.toLocaleString({...l,...t},{locale:o})}(0,s.Ze)((()=>{v=new WeakMap,w=y["short-date-short-time"]}))},18848:(e,t,i)=>{i.d(t,{sh:()=>l,uf:()=>h});var r=i(70586),s=i(70171);const n={ar:"ar-u-nu-latn"};let o=new WeakMap,a={};function l(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function h(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||a;if(!o.has(t)){const i=(0,s.Kd)(),r=n[(0,s.Kd)()]||i;o.set(t,new Intl.NumberFormat(r,e))}return(0,r.j0)(o.get(t))}(t).format(e)}(0,s.Ze)((()=>{o=new WeakMap,a={}}))},65665:(e,t,i)=>{i.r(t),i.d(t,{default:()=>C});var r=i(43697),s=i(3172),n=i(20102),o=i(70586),a=i(16453),l=i(95330),h=i(81271),u=i(5600),d=(i(75215),i(67676)),c=(i(80442),i(71715)),m=i(52011),g=i(79235),p=i(87085),y=i(46486),_=i(17287),f=i(38009),v=i(16859),w=i(21506);class b{constructor(e,t,i,r){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=i,this.noDataValue=r)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,r=-1/0,s=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(i=n<i?n:i,r=n>r?n:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}}var S=i(50758),D=i(92604),T=i(78346);class M{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._promise=(0,T.bA)(e,{...s,schedule:r}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>D.Z.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const i={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(i),this._connectListener(i),(0,S.kB)((()=>{i.removed=!0,(0,d.Od)(this._listeners,i),this._thread&&null!=i.threadHandle&&i.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,i){if(this._thread){const r=this._transferLists[e],s=r?r(t):[];return this._thread.invoke(e,t,{transferList:s,signal:i})}return this._promise?this._promise.then((()=>((0,l.k_)(i),this.invokeMethod(e,t,i)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}class z extends M{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(I.forEach(((e,t)=>{e===this&&I.delete(t)})),this.destroy())}}const I=new Map;let E=class extends((0,y.Z)((0,_.Y)((0,f.q)((0,v.I)((0,a.R)(p.Z)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=I.get(e);return t||(null!=e?(t=new z((t=>e.immediate.schedule(t))),I.set(e,t)):(t=new z,I.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.RY)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.r9).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,i,r){const n=null!=(r=r||{signal:null}).signal?r.signal:r.signal=(new AbortController).signal,o={responseType:"array-buffer",signal:n},a={noDataValue:r.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,i,r))).then((()=>(0,s.default)(this.getTileUrl(e,t,i),o))).then((e=>this._lercDecoder.decode(e.data,a,n))).then((e=>new b(e)))}getTileUrl(e,t,i){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.B7)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){const{ElevationQuery:r}=await i.e(5642).then(i.bind(i,55642));return(0,l.k_)(t),(new r).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:r}=await i.e(5642).then(i.bind(i,55642));return(0,l.k_)(t),(new r).createSampler(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,s.default)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[L]}};(0,r._)([(0,u.Cb)({readOnly:!0})],E.prototype,"capabilities",void 0),(0,r._)([(0,c.r)("service","capabilities",["capabilities"])],E.prototype,"readCapabilities",null),(0,r._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],E.prototype,"copyright",void 0),(0,r._)([(0,u.Cb)({readOnly:!0,type:g.Z})],E.prototype,"heightModelInfo",void 0),(0,r._)([(0,u.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],E.prototype,"path",void 0),(0,r._)([(0,u.Cb)({type:["show","hide"]})],E.prototype,"listMode",void 0),(0,r._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],E.prototype,"minScale",void 0),(0,r._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],E.prototype,"maxScale",void 0),(0,r._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],E.prototype,"opacity",void 0),(0,r._)([(0,u.Cb)({type:["ArcGISTiledElevationServiceLayer"]})],E.prototype,"operationalLayerType",void 0),(0,r._)([(0,u.Cb)()],E.prototype,"sourceJSON",void 0),(0,r._)([(0,u.Cb)({json:{read:!1},value:"elevation",readOnly:!0})],E.prototype,"type",void 0),(0,r._)([(0,u.Cb)(w.HQ)],E.prototype,"url",void 0),(0,r._)([(0,u.Cb)()],E.prototype,"version",void 0),(0,r._)([(0,c.r)("version",["currentVersion"])],E.prototype,"readVersion",null),E=(0,r._)([(0,m.j)("esri.layers.ElevationLayer")],E);const L=Symbol("default-fetch-tile");E.prototype.fetchTile[L]=!0;const C=E},17287:(e,t,i)=>{i.d(t,{Y:()=>l});var r=i(43697),s=i(92604),n=i(5600),o=(i(75215),i(67676),i(80442),i(52011)),a=i(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,s.Z.getLogger(this)))}};return(0,r._)([(0,n.Cb)()],t.prototype,"title",null),(0,r._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,i)=>{i.d(t,{I:()=>S});var r=i(43697),s=i(68773),n=i(40330),o=i(3172),a=i(66643),l=i(20102),h=i(92604),u=i(70586),d=i(95330),c=i(81271),m=i(5600),g=(i(75215),i(67676),i(80442),i(71715)),p=i(52011),y=i(30556),_=i(84230),f=i(48522),v=i(15235),w=i(86082),b=i(14661);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new v.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:r}=await i.e(8062).then(i.bind(i,18062));return(0,d.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.D_)(e)||h.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,d.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,b.Ss)(i);let s,o;if(r)s=i.portal.url;else try{s=await(0,_.oP)(this.url,t)}catch(e){(0,d.r9)(e)}if(!s||!(0,c.Zo)(s,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await i.reload():(i=new v.default({id:e,portal:{url:s}}),await i.load(t)),i.portal.user)return(0,b.Ss)(i)}catch(e){(0,d.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=D.credential===t?D.user:await this._fetchEditingUser(e);return D.credential=t,D.user=i,null==i||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=f.Z.getDefault();if(s&&s.loaded&&(0,c.Fv)(s.restUrl)===(0,c.Fv)(r))return s.user;const l=`${r}/community/self`,h=null!=e?e.signal:null,u=await(0,a.q6)((0,o.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?w.default.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||f.Z.getDefault());return i&&r&&!(0,c.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,m.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,r._)([(0,g.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,p.j)("esri.layers.mixins.PortalLayer")],t),t},D={credential:null,user:null}}}]);