@arcgis/core 5.2.0-next.30 → 5.2.0-next.31

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 (157) hide show
  1. package/WebDocument2D.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/arcade/ArcadePortal.js +1 -1
  4. package/arcade/Attachment.js +1 -1
  5. package/arcade/Dictionary.js +1 -1
  6. package/arcade/Feature.js +1 -1
  7. package/arcade/arcadeAsyncRuntime.js +1 -1
  8. package/arcade/arcadeCompiler.js +1 -1
  9. package/arcade/arcadeRuntime.js +1 -1
  10. package/arcade/containerUtils.js +1 -1
  11. package/arcade/debug.js +1 -1
  12. package/arcade/deepClone.js +1 -1
  13. package/arcade/featureSetUtils.js +1 -1
  14. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  15. package/arcade/featureset/support/shared.js +1 -1
  16. package/arcade/functions/convertdirection.js +1 -1
  17. package/arcade/functions/date.js +1 -1
  18. package/arcade/functions/feature.js +1 -1
  19. package/arcade/functions/featuresetbase.js +1 -1
  20. package/arcade/functions/featuresetgeom.js +1 -1
  21. package/arcade/functions/featuresetstats.js +1 -1
  22. package/arcade/functions/featuresetstring.js +1 -1
  23. package/arcade/functions/geomasync.js +1 -1
  24. package/arcade/functions/geometry.js +1 -1
  25. package/arcade/functions/geomsync.js +1 -1
  26. package/arcade/functions/knowledgegraph.js +1 -1
  27. package/arcade/functions/maths.js +1 -1
  28. package/arcade/functions/stats.js +1 -1
  29. package/arcade/functions/string.js +1 -1
  30. package/arcade/geometry/constructors.js +1 -1
  31. package/arcade/geometry/functions.js +1 -1
  32. package/arcade/languageUtils.js +1 -1
  33. package/assets/esri/core/workers/RemoteClient.js +1 -1
  34. package/assets/esri/core/workers/chunks/{e5d2fab228d54b18a8a8.js → 08405116b5feb2d00101.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{774615303c1cc9a77e20.js → 11af659688cf963ea6cd.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{2665337e1b665e7e2b70.js → 15081b361fc42f40b865.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{bcb2092c87d8d21c6458.js → 197b9f8483fad2258650.js} +1 -1
  38. package/assets/esri/core/workers/chunks/1cd8dff4373494b01ad4.js +1 -0
  39. package/assets/esri/core/workers/chunks/1d92da90fbbc3f98b201.js +1 -0
  40. package/assets/esri/core/workers/chunks/210ffc448c73a7bf63aa.js +1 -0
  41. package/assets/esri/core/workers/chunks/{a14e5607c5c091c77e3d.js → 2540beb53f1443a070d7.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{689673173ca1c0e098fe.js → 25932fa010f9a32475c1.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{e2d500ac1a264d09c857.js → 32b5d2537feefe6e94a3.js} +1 -1
  44. package/assets/esri/core/workers/chunks/34a024eda22d228e1fbe.js +1 -0
  45. package/assets/esri/core/workers/chunks/3f63b14b53b5ca716e3a.js +1 -0
  46. package/assets/esri/core/workers/chunks/{6df54132299b9e8f6dad.js → 456b77b8f13933a75b68.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{3c342e662c13a05f4caf.js → 49713dfa4c8b788079d1.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{45e4b9069263adeae394.js → 49a45083a9a155614c1c.js} +1 -1
  49. package/assets/esri/core/workers/chunks/4be31fcc5482a2526d2b.js +1 -0
  50. package/assets/esri/core/workers/chunks/{31d92ba9089617aa59ab.js → 57c003c6745d450558a7.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{8104ac2eee69d79ada86.js → 6048c89fc4dcd2e9988d.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{1b9c68e8431bb4608209.js → 6162f6735ea4622e54d8.js} +1 -1
  53. package/assets/esri/core/workers/chunks/684c9b4bd9590d2db12f.js +1 -0
  54. package/assets/esri/core/workers/chunks/684d3cb4fb233180b2d0.js +1 -0
  55. package/assets/esri/core/workers/chunks/{fe6385115d76e16e8da0.js → 75baf6dff6e7658b17b3.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{166a0df6e37627e18976.js → 7a2dfa42610fe8414ed7.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{43847d66726fd0bcbbb7.js → 83ae56c7fa8d84865605.js} +1 -1
  58. package/assets/esri/core/workers/chunks/8722e2790272e90a1897.js +1 -0
  59. package/assets/esri/core/workers/chunks/{1282598516cd0e3056b7.js → 977e6f589bd266d6067d.js} +2 -2
  60. package/assets/esri/core/workers/chunks/9f3d37e5f42bf1529673.js +1 -0
  61. package/assets/esri/core/workers/chunks/a833fc9250635eb4152f.js +1 -0
  62. package/assets/esri/core/workers/chunks/{47290f27375c76bcc9c7.js → b0253fe7b3529bc22270.js} +1 -1
  63. package/assets/esri/core/workers/chunks/b324bdb9c74fc3f956db.js +1 -0
  64. package/assets/esri/core/workers/chunks/{1bd7b7f4ee7ea6cb7ef9.js → b60f24a6c777301803f4.js} +1 -1
  65. package/assets/esri/core/workers/chunks/bd155794e9bc16dd0474.js +1 -0
  66. package/assets/esri/core/workers/chunks/{906f4c0fa8135e6c2f03.js → c660a5a1086870a3a6b9.js} +1 -1
  67. package/assets/esri/core/workers/chunks/cb58aff1ff186fa18345.js +1 -0
  68. package/assets/esri/core/workers/chunks/{17b98787a0698f584882.js → e7cb1b72f0b54e845741.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{21122f3f3e19a7fd7d33.js → f69d3ff8a69c1985bca3.js} +1 -1
  70. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  71. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  72. package/chunks/ShadowCastVisualize.glsl.js +4 -10
  73. package/chunks/aiServices.js +1 -1
  74. package/chunks/array.js +1 -1
  75. package/chunks/languageUtils.js +1 -1
  76. package/chunks/lyr3DMain.js +1 -1
  77. package/config.js +1 -1
  78. package/core/has.js +1 -1
  79. package/graphic/AnnotationFeatureGraphicOrigin.d.ts +3 -3
  80. package/graphic/AnnotationFeatureGraphicOrigin.js +1 -1
  81. package/intl/messages.d.ts +12 -2
  82. package/intl/t9n.d.ts +8 -1
  83. package/intl.d.ts +4 -0
  84. package/kernel.js +1 -1
  85. package/layers/AnnotationFeatureLayer.d.ts +1 -4
  86. package/layers/AnnotationFeatureLayer.js +1 -1
  87. package/layers/DimensionFeatureLayer.js +1 -1
  88. package/layers/VoxelWasmPerSceneView.js +1 -1
  89. package/layers/mixins/DataElementMixin.js +2 -0
  90. package/layers/support/AnnotationFeatureSublayer.js +1 -1
  91. package/layers/support/parquetUtils.js +1 -1
  92. package/package.json +1 -1
  93. package/support/ArcadeExpression.js +1 -1
  94. package/support/arcadeUtils.js +1 -1
  95. package/support/revision.js +1 -1
  96. package/symbols/cim/supportUtils.js +2 -0
  97. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  98. package/views/2d/engine/webgl/util/DimensionMatcher.js +1 -1
  99. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  100. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  101. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  102. package/views/2d/layers/support/annodime/annotationSchema.js +1 -1
  103. package/views/2d/layers/support/annodime/dimensionSchema.js +1 -1
  104. package/views/2d/layers/support/annodime/utils.js +1 -1
  105. package/views/2d/layers/support/annodime/virtualFields.js +1 -1
  106. package/views/3d/camera/constraintUtils.js +1 -1
  107. package/views/3d/state/ConstraintsManager.js +1 -1
  108. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  109. package/views/3d/terrain/PatchRenderData.js +1 -1
  110. package/views/3d/terrain/PatchRenderDataWaterproofness.js +2 -0
  111. package/views/3d/terrain/PlanarPatch.js +1 -1
  112. package/views/3d/terrain/SphericalPatch.js +1 -1
  113. package/views/3d/terrain/TileRenderer.js +1 -1
  114. package/views/3d/webgl-engine/effects/OpaqueEnvironment.js +1 -1
  115. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  116. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  117. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.js +1 -1
  118. package/views/3d/webgl-engine/effects/geometry/ObjectAndLayerID.js +1 -1
  119. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  120. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  121. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.js +1 -1
  122. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  123. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  124. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  125. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  126. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  127. package/views/3d/webgl-engine/lib/CutFillComputation.js +1 -1
  128. package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
  129. package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
  130. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  131. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  132. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  133. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  134. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  135. package/views/3d/webgl.js +1 -1
  136. package/views/PopupView.js +1 -1
  137. package/views/layers/FeatureLikeLayerView.js +1 -1
  138. package/views/popupAdapter.js +1 -1
  139. package/webdoc/support/thumbnailUtils.js +1 -1
  140. package/webdoc/support/webdocSaveUtils.js +1 -1
  141. package/widgets/support/widget.d.ts +1 -0
  142. package/assets/esri/core/workers/chunks/125edba5c618c6257cb8.js +0 -1
  143. package/assets/esri/core/workers/chunks/168be2eac0fa3c67ae27.js +0 -1
  144. package/assets/esri/core/workers/chunks/32740b075d7a890d7888.js +0 -1
  145. package/assets/esri/core/workers/chunks/5189413a83faf3480e29.js +0 -1
  146. package/assets/esri/core/workers/chunks/a2be8784f2cfdbb42681.js +0 -1
  147. package/assets/esri/core/workers/chunks/a9db775210ebeee41738.js +0 -1
  148. package/assets/esri/core/workers/chunks/bca6abc185dedec0f41b.js +0 -1
  149. package/assets/esri/core/workers/chunks/bee56a6ac99312f03109.js +0 -1
  150. package/assets/esri/core/workers/chunks/d1d135a54233092ad637.js +0 -1
  151. package/assets/esri/core/workers/chunks/d750e4abeb777caa8c36.js +0 -1
  152. package/assets/esri/core/workers/chunks/daf539e9f88fc9e101e4.js +0 -1
  153. package/assets/esri/core/workers/chunks/e774303efefee31952d0.js +0 -1
  154. package/assets/esri/core/workers/chunks/e8546ab510fc9515bd23.js +0 -1
  155. package/assets/esri/core/workers/chunks/fc9664d3282b052ef40f.js +0 -1
  156. package/views/2d/layers/support/annodime/DimensionMatcherSchema.js +0 -2
  157. package/views/2d/layers/support/annodime/unsupported.js +0 -2
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3202,7157],{46140(e,t,r){r.d(t,{A:()=>i});var n=r(49186);class i{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new i(this.major,this.minor,this._context)}static parse(e,t=""){const[r,o]=e.split("."),s=/^\s*\d+\s*$/;if(!r?.match||!s.test(r))throw new n.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!o?.match||!s.test(o))throw new n.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const a=parseInt(r,10),l=parseInt(o,10);return new i(a,l,t)}}},6797(e,t,r){r.d(t,{Ui:()=>f});var n=r(69622),i=r(7762),o=r(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof n.A}function l(e){return e instanceof i.A?Object.keys(e.items):a(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function c(e,t){return e instanceof i.A?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const n=l(e),i=l(t);if(0===n.length&&0===i.length)return;if(!n.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=i.filter(e=>!n.includes(e)),f=n.filter(e=>!i.includes(e)),p=n.filter(r=>i.includes(r)&&c(e,r)!==c(t,r)).concat(o,f).sort(),h=u(e);if(h&&s.has(h)&&p.length)return{type:"complete",oldValue:e,newValue:t};let m;const y=a(e)&&a(t);for(const n of p){const i=c(e,n),o=c(t,n);let s;if((y||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(r&&r[n]&&"function"==typeof r[n])s=r[n]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;s={type:"complete",oldValue:i,newValue:o}}else s="object"==typeof i&&"object"==typeof o&&u(i)===u(o)?d(i,o):{type:"complete",oldValue:i,newValue:o};null!=s&&(null!=m?m.diff[n]=s:m={type:"partial",diff:{[n]:s}})}}return m}function f(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},91829(e,t,r){function n(){return[0,0,0,0]}function i(e,t,r,n){return[e,t,r,n]}function o(e,t,r,n){return[e,t,r,n]}function s(){return i(1,1,1,1)}function a(){return i(1,0,0,0)}function l(){return i(0,1,0,0)}function c(){return i(0,0,1,0)}function u(){return i(0,0,0,1)}r.d(t,{CN:()=>o,Un:()=>f,_Y:()=>u,fA:()=>i,uY:()=>d,vt:()=>n});const d=[0,0,0,0],f=s(),p=a(),h=l(),m=c(),y=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:f,UNIT_W:y,UNIT_X:p,UNIT_Y:h,UNIT_Z:m,ZEROS:d,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:n,freeze:o,fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let n=0;n<r;++n)t[n]=e[n];return t},fromValues:i,ones:s,unitW:u,unitX:a,unitY:l,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},78955(e,t,r){r.d(t,{Bw:()=>y,C:()=>i,Cc:()=>w,LI:()=>f,Om:()=>b,S8:()=>M,T9:()=>d,WQ:()=>s,Z0:()=>C,aI:()=>I,hG:()=>m,hZ:()=>o,hs:()=>p,jk:()=>u,m3:()=>g,t2:()=>v});var n=r(34304);function i(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function o(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function s(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function a(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function d(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function f(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function p(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function h(e,t){const r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+o*o)}function m(e,t){const r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return r*r+n*n+i*i+o*o}function y(e){const t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)}function g(e){const t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i}function M(e,t){const r=t[0],n=t[1],i=t[2],o=t[3];let s=r*r+n*n+i*i+o*o;return s>0&&(s=1/Math.sqrt(s),e[0]=r*s,e[1]=n*s,e[2]=i*s,e[3]=o*s),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function w(e,t,r,n){const i=t[0],o=t[1],s=t[2],a=t[3];return e[0]=i+n*(r[0]-i),e[1]=o+n*(r[1]-o),e[2]=s+n*(r[2]-s),e[3]=a+n*(r[3]-a),e}function C(e,t,r){const n=t[0],i=t[1],o=t[2],s=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*s,e[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*s,e[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*s,e[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*s,e}function v(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function I(e,t){const r=e[0],i=e[1],o=e[2],s=e[3],a=t[0],l=t[1],c=t[2],u=t[3],d=(0,n.FD)();return Math.abs(r-a)<=d*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-l)<=d*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(o-c)<=d*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(s-u)<=d*Math.max(1,Math.abs(s),Math.abs(u))}const S=a,T=l,x=c,A=h,F=m,_=y,k=g;Object.freeze(Object.defineProperty({__proto__:null,add:s,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:i,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:A,distance:h,div:x,divide:c,dot:b,equals:I,exactEquals:v,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:_,length:y,lerp:w,max:d,min:u,mul:T,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:M,random:function(e,t=1){const r=n.Ov;let i,o,s,a,l,c;do{i=2*r()-1,o=2*r()-1,l=i*i+o*o}while(l>=1);do{s=2*r()-1,a=2*r()-1,c=s*s+a*a}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*i,e[1]=t*o,e[2]=t*s*u,e[3]=t*a*u,e},round:f,scale:p,scaleAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e},set:o,sqrDist:F,sqrLen:k,squaredDistance:m,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:S,subtract:a,transformMat4:C,transformQuat:function(e,t,r){const n=t[0],i=t[1],o=t[2],s=r[0],a=r[1],l=r[2],c=r[3],u=c*n+a*o-l*i,d=c*i+l*n-s*o,f=c*o+s*i-a*n,p=-s*n-a*i-l*o;return e[0]=u*c+p*-s+d*-l-f*-a,e[1]=d*c+p*-a+f*-s-u*-l,e[2]=f*c+p*-l+u*-a-d*-s,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},16494(e,t,r){r.d(t,{Nd:()=>a,W5:()=>s});var n=r(17632);const i=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),o=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],s=new n.I({whiteList:i,onTagAttr:(e,t,r)=>{const n=`${t}="${r}"`;if(o.includes(t))return n},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new n.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},4146(e,t,r){r.d(t,{A:()=>M});var n=r(5482),i=r(11254),o=r(49186),s=r(65529),a=r(4902),l=r(92474),c=r(53966),u=r(17676),d=r(84952),f=r(91429),p=r(5443),h=r(16930),m=r(92602),y=r(79677);let g=0,M=class extends((0,s.Zt)((0,a.s)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new p.A(-180,-90,180,90,h.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=h.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:n}=await Promise.all([r.e(812),r.e(5613),r.e(909)]).then(r.bind(r,45613));try{return await n(t)}catch(e){const r=t?.portalItem,n=r?.id||"unset",i=r?.portal?.url||m.A.portalUrl;throw c.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+n+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||c.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new o.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,n.Cg)([(0,f.MZ)({type:String})],M.prototype,"attributionDataUrl",void 0),(0,n.Cg)([(0,f.MZ)({readOnly:!0})],M.prototype,"effectiveVisible",null),(0,n.Cg)([(0,f.MZ)({type:p.A})],M.prototype,"fullExtent",void 0),(0,n.Cg)([(0,f.MZ)({readOnly:!0})],M.prototype,"hasAttributionData",null),(0,n.Cg)([(0,f.MZ)({type:String,clonable:!1})],M.prototype,"id",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,nonNullable:!0})],M.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,f.MZ)({type:["show","hide","hide-children"]})],M.prototype,"listMode",void 0),(0,n.Cg)([(0,f.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],M.prototype,"opacity",void 0),(0,n.Cg)([(0,f.MZ)({clonable:!1})],M.prototype,"parent",void 0),(0,n.Cg)([(0,f.MZ)({readOnly:!0})],M.prototype,"parsedUrl",null),(0,n.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],M.prototype,"persistenceEnabled",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean})],M.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean})],M.prototype,"attributionVisible",void 0),(0,n.Cg)([(0,f.MZ)({type:h.A})],M.prototype,"spatialReference",void 0),(0,n.Cg)([(0,f.MZ)({type:String})],M.prototype,"title",void 0),(0,n.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],M.prototype,"type",void 0),(0,n.Cg)([(0,f.MZ)()],M.prototype,"url",void 0),(0,n.Cg)([(0,f.MZ)({type:y.A})],M.prototype,"visibilityTimeExtent",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,nonNullable:!0})],M.prototype,"visible",void 0),M=(0,n.Cg)([(0,f.$K)("esri.layers.Layer")],M)},52136(e,t,r){r.d(t,{p:()=>o});var n=r(5482),i=r(91429);const o=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,n.Cg)([(0,i.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.APIKeyMixin")],r),r}},47685(e,t,r){r.d(t,{Mk:()=>p,Zk:()=>d,w6:()=>y});var n=r(5482),i=r(65529),o=r(4718),s=r(91429),a=r(20816);const l=new i.bk;function c(e){return l.on("apply-edits",new WeakRef(e))}function u(e){return l.on("update-moment",new WeakRef(e))}function d(e,t,r=null,n=!1){const i=Promise.withResolvers();return n=null==t||n,l.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:n,result:i.promise}),i}const f=Symbol();function p(e){return null!=e&&"object"==typeof e&&f in e}function h(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function m(e,t,r){const n=new URL(e).host,i=a.Z3.get(n),o=e=>!e||e===i;return o(t)&&o(r)||t===r}const y=e=>{var t;const r=e;let i=class extends r{static{t=f}constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:n,mayReceiveServiceEdits:i,result:s}=e,a=t===this.url,l=null!=r&&null!=this.layerId&&r===this.layerId,c=h(this),u=h(this)&&m(t,n,this.gdbVersion);if(!a||c&&!u||!l&&!i)return;const d=s.then(e=>{if(this.lastEditsEventDate=new Date,l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,o.o8)(e)),e;const r=e.editedFeatures?.find(({layerId:e})=>e===this.layerId);if(r){const{adds:t,updates:n,deletes:i}=r.editedFeatures,s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],deletedFeatures:i?i.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],updatedFeatures:n?n.map(({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],editedFeatures:(0,o.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,o.o8)(e.historicMoment)};return this.emit("edits",s),s}const i={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,o.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,o.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,n,i.historicMoment)&&this.emit("edits",i),i}).then(e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,n,e.historicMoment)&&(this.historicMoment=e.historicMoment),e));d.catch(()=>{}),this.emit("apply-edits",{result:d})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:n}=e,i=t===this.url,o=h(this),s=h(this)&&m(t,r,this.gdbVersion),a=h(this)&&!m(t,this.gdbVersion,null);i&&o&&s&&a&&"historicMoment"in this&&this.historicMoment!==n&&(this.historicMoment=n)},this.when().then(()=>{this.addHandles(c(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(u(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(e,t,r){return"historicMoment"in this&&this.historicMoment!==r&&(0,a.w5)(e,t)}};return(0,n.Cg)([(0,s.MZ)()],i.prototype,"lastEditsEventDate",void 0),i=(0,n.Cg)([(0,s.$K)("esri.layers.mixins.EditBusLayer")],i),i}},32756(e,t,r){r.d(t,{Rr:()=>a,fY:()=>c,ne:()=>l});var n=r(5482),i=r(93637),o=r(91429),s=r(91880);function a(e,t,r){if(!e)return null;const n=e.find(e=>!!e.field);if(!n)return null;const i=new s.A;return i.read(n,r),[i]}const l={type:[s.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,n){const o=e.find(e=>!!e.field);o&&(0,i.sM)(r,[o.toJSON()],t)}}}},c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,n.Cg)([(0,o.MZ)(l)],r.prototype,"orderBy",void 0),r=(0,n.Cg)([(0,o.$K)("esri.layers.mixins.OrderedLayer")],r),r}},28032(e,t,r){r.d(t,{A:()=>l});var n=r(5482),i=r(69540),o=r(25482),s=r(91429),a=r(56400);let l=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,n.Cg)([(0,s.MZ)()],l.prototype,"creatorField",void 0),(0,n.Cg)([(0,s.MZ)()],l.prototype,"creationDateField",void 0),(0,n.Cg)([(0,s.MZ)()],l.prototype,"editorField",void 0),(0,n.Cg)([(0,s.MZ)()],l.prototype,"editDateField",void 0),(0,n.Cg)([(0,s.MZ)()],l.prototype,"realm",void 0),(0,n.Cg)([(0,s.MZ)((0,a.P6)("dateFieldsTimeReference",!0))],l.prototype,"timeZone",void 0),l=(0,n.Cg)([(0,s.$K)("esri.layers.support.EditFieldsInfo")],l)},33143(e,t,r){r.d(t,{A:()=>d});var n=r(5482),i=r(69540),o=r(25482),s=r(91429),a=r(8631),l=r(29005),c=r(36005),u=r(43937);let d=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,a.r)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,n.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,n.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,n.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,n.Cg)([(0,c.w)("domains")],d.prototype,"readDomains",null),(0,n.Cg)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,n.Cg)([(0,s.MZ)({type:[l.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,n.Cg)([(0,s.$K)("esri.layers.support.FeatureType")],d)},37352(e,t,r){r.d(t,{A:()=>l});var n,i=r(5482),o=r(7762),s=r(25482),a=r(91429);let l=n=class extends s.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.A}clone(){return new n({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],l.prototype,"floorField",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllMode",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllLevelIds",void 0),l=n=(0,i.Cg)([(0,a.$K)("esri.layers.support.LayerFloorInfo")],l)},91880(e,t,r){r.d(t,{A:()=>c});var n,i=r(5482),o=r(66552),s=r(25482),a=r(91429);const l=new o.J({asc:"ascending",desc:"descending"});let c=class extends s.o{static{n=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new n({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,i.Cg)([(0,a.MZ)({type:l.apiValues,json:{type:l.jsonValues,read:l.read,write:l.write}})],c.prototype,"order",void 0),c=n=(0,i.Cg)([(0,a.$K)("esri.layers.support.OrderByInfo")],c)},45067(e,t,r){r.d(t,{A:()=>u});var n=r(5482),i=r(69540),o=r(66552),s=r(25482),a=r(91429);const l=new o.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),c=new o.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let u=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,n.Cg)([(0,a.MZ)({json:{read:l.read,write:l.write}})],u.prototype,"cardinality",void 0),(0,n.Cg)([(0,a.MZ)({json:{name:"catalogID"}})],u.prototype,"catalogId",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],u.prototype,"composite",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],u.prototype,"id",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],u.prototype,"keyField",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],u.prototype,"keyFieldInRelationshipTable",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],u.prototype,"name",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],u.prototype,"relatedTableId",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],u.prototype,"relationshipTableId",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:c.read,write:c.write}})],u.prototype,"role",void 0),u=(0,n.Cg)([(0,a.$K)("esri.layers.support.Relationship")],u)},17311(e,t,r){r.d(t,{A:()=>p});var n=r(5482),i=r(69622),o=r(4576),s=r(60999),a=r(7762),l=r(16494),c=r(91429),u=r(30524),d=r(43668);const f=/<br\s*\/*>/gi;let p=class extends i.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,s.UT)(()=>(0,d.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([r.e(4560),r.e(9301)]).then(r.bind(r,99301)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new a.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),n=this.fieldsIndex.get(r.at(-1)??"");n&&e.add(n.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const n=t.getObjectId()??t.attributes?.[e.objectIdField];return(await this.getTitles(e,[t],r)).get(n)??""}async getTitles(e,t,r){const n=new Map,i=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:s,workingTitle:a}=this,c=a&&s;t.forEach(t=>{const u=t.getObjectId()??t.attributes[e.objectIdField];let d=c?o({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:s,globalAttributes:this._createFormattedAttributes(e,t,i).global,layer:e,text:a}):"";r?.removeHTML&&(d=l.Nd.sanitize(d).replaceAll(f," ")),n.set(u,d)})}catch{}return n}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(o.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,u.Kl)(e,this.requiredFields))){const n=e.createQuery();n.where="1=1",n.outFields=[...this.requiredFields],n.objectIds=r;const i=await e.queryFeatures(n);if(i?.features.length===t.length)return i.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),n=e?.name??r.fieldName;r.fieldName=n,t.set(n.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const n=this.effectivePopupTemplate?.fieldInfos??[],i={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{i[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const o={...t.attributes,...i};return{global:this._featureUtils.formatAttributes({fieldInfos:n,attributes:o,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,u.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,n.Cg)([(0,c.MZ)({readOnly:!0})],p.prototype,"_arcadeTask",null),(0,n.Cg)([(0,c.MZ)()],p.prototype,"_featureUtils",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0})],p.prototype,"featureUtilsPromise",null),(0,n.Cg)([(0,c.MZ)({readOnly:!0})],p.prototype,"calculatedExpressions",null),(0,n.Cg)([(0,c.MZ)()],p.prototype,"displayField",void 0),(0,n.Cg)([(0,c.MZ)()],p.prototype,"effectivePopupTemplate",void 0),(0,n.Cg)([(0,c.MZ)()],p.prototype,"expressionsUsedInTitle",null),(0,n.Cg)([(0,c.MZ)()],p.prototype,"fieldsIndex",void 0),(0,n.Cg)([(0,c.MZ)()],p.prototype,"fieldInfoMap",null),(0,n.Cg)([(0,c.MZ)()],p.prototype,"fields",void 0),(0,n.Cg)([(0,c.MZ)()],p.prototype,"objectIdField",void 0),(0,n.Cg)([(0,c.MZ)()],p.prototype,"requiredFields",null),p=(0,n.Cg)([(0,c.$K)("esri.layers.support.TitleCreator")],p)},41560(e,t,r){r.d(t,{Ch:()=>s,mW:()=>o});var n=r(34727),i=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function s(e,t,r){const o=function(e){if("manual"===c(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:n}of e.filters)t[0]=Math.max(t[0],u(r)),t[1]=Math.min(t[1],d(n));return t}(e);if(o&&((0,n.gg)(t,o[0])||(0,n.ZH)(r,o[1])))return"";const s=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const i=u(e.at(0)?.minScale),o=d(e.at(-1)?.maxScale);if((0,n.ZH)(i,t)||(0,n.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,n.ZH)(u(i.minScale),d(r.maxScale)))return!0}return!1}(s,t,r)?"1=1":s.map(e=>e.where||"1=1").reduce((e,t)=>(0,i.IW)(e,t),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===c(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const n of e.filters)l(n.minScale,n.maxScale,t,r)&&(yield n)}}function l(e,t,r,i){return e=u(e),r=u(r),t=d(t),!(!(0,n.Sp)(r,e)&&(i??r)>e||(0,n.Hx)(t,r)||void 0!==i&&(0,n.Sp)(i,e))}function c(e){return"mode"in e?e.mode:e.filterMode}function u(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},77548(e,t,r){r.d(t,{Gh:()=>E,tk:()=>x,BR:()=>T,p2:()=>I,qd:()=>A,wI:()=>S,G$:()=>_,$x:()=>F,Ov:()=>b,cM:()=>f,UC:()=>p,Qz:()=>h,OP:()=>k,TU:()=>M,F2:()=>m,XX:()=>g,Qi:()=>w,jy:()=>C});var n=r(70333),i=r(11254),o=r(7762),s=(r(84952),r(36563)),a=r(36708),l=r(4146);const c=new WeakMap;function u(e){return!e.destroyed&&(c.has(e)||e.addHandles([(0,a.wB)(()=>{const{parent:t}=e;return!!(t&&t instanceof l.A)&&("catalog-dynamic-group"===t.type||u(t))},t=>c.set(e,t),a.pc),(0,s.hA)(()=>c.delete(e))]),c.get(e))}function d(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function f(e){return d(e,"knowledge-graph")&&"layers"in e}function p(e){return d(e,"knowledge-graph-sublayer")}function h(e){return d(e,"link-chart")&&"layers"in e}function m(e){return d(e,"subtype-group")&&"sublayers"in e}function y(e){const t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}r(16215);const g={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function M(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function b(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function w(e){return null!=e&&"object"==typeof e&&"featureReduction"in e}function C(e){return function(e){return d(e,"catalog-footprint")}(e)||function(e){return d(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)||function(e){return d(e,"oriented-imagery")}(e)||function(e){return"subtype-sublayer"===e?.type}(e)}function v(e){const t=e?.type;return"binning"===t||"cluster"===t}function I(e,t){if(!C(e))return;const r=t?.graphic,n="featureReduction"in e?e.featureReduction:null;if(r){if(r.isAggregate){const e=r.origin;return e&&"featureReductionProvider"in e&&n?v(n)?n:null:void 0}return e}return t?.checkFeatureReduction&&n?v(n)?n:null:e}async function S(e,t){const r=n.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const o=e.toLowerCase().indexOf("/rest/services");if(-1===o)return null;const s=`${e.slice(0,o)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,i.A)(s,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function T(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"parquet":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function x(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function A(e){const t=new o.A;for(const r of e.allLayers.concat(e.allTables))u(r)||y(r)||"annotation-feature"===r.type||"dimension-feature"===r.type||("charts"in r&&t.push(r),"subtype-group"===r.type&&t.push(...r.sublayers));return t}function F(e,t){return null}function _(e){return null}function k(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function E(e,t){if(!t||!k(e))return;const r=(e.url,null);r&&(e.url=r)}},73681(e,t,r){r.d(t,{n:()=>l});var n=r(49186),i=r(53966),o=r(46140),s=r(95466),a=r(55674);class l{static async from(e,t,r){const s=e.dictionary_version?o.A.parse(e.dictionary_version):null,u=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const f=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))f.delete(e);f.size&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:f});const p=await(0,a.xR)(e.expression,null,d);if(!p)throw new n.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const h=!s||!s.greaterEqual(4,0);h&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:s});const m=new c(r,h);return new l(h,u,p,m)}constructor(e,t,r,n){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=n}get itemNames(){return this._itemNames}evaluate(e,t,r,n){try{return this._reader.bind(e,r,n),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new s.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new s.A(t)}}class c extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},41366(e,t,r){r.d(t,{K:()=>d,Q:()=>l});var n=r(5482),i=r(66552),o=r(53966),s=r(91429),a=r(93223);const l=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",u="field",d=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&u||r&&c||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==u&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n.Cg)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,n.Cg)([(0,a.e)(l,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,n.Cg)([(0,s.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},55674(e,t,r){r.d(t,{Ad:()=>p,Gj:()=>y,QY:()=>f,lL:()=>g,xR:()=>h});var n=r(66131),i=r(49186),o=(r(44208),r(44729)),s=r(15032),a=r(65864),l=r(95466),c=r(43668),u=r(98623);const d=["geometry","scale","timeProperties"];function f(e,t){if(null!=t)for(const r of d)t.hasArcadeDependency(r)&&e.add(r);return e}function p(e,t){return m.create(e,t,null,["$feature","$view"])}function h(e,t,r){return m.create(e,t,r,["$feature","$view","$config"])}class m{static async create(e,t,r,n){const{arcade:o,Dictionary:s}=await(0,c.l)();let a;try{a=o.parseScript(e)}catch(t){throw new i.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=o.scriptUsesGeometryEngine(a);l&&await o.enableGeometrySupport(),await o.loadDependentModules(new Set,a,null,!1,l);const u={vars:n.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},d=o.compileScript(a,u);let f=null;null!=r&&(f=new s(r),f.immutable=!0);const p=new s;return p.immutable=!1,p.setField("scale",0),new m(e,o,a,d,t,p,f,s)}constructor(e,t,r,n,i,o,s,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=n,this._spatialReference=i,this._viewDict=o,this._configDict=s,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new y,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:i,currentEnd:o}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=i?null!=r?n.lY.epochToArcadeDate(i,r):n.lY.unknownEpochToArcadeDate(i):void 0,currentEnd:null!=o?null!=r?n.lY.epochToArcadeDate(o,r):n.lY.unknownEpochToArcadeDate(o):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class y{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const n=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=n.fields,this._boundSchema.fieldsIndex=n,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===u.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return o.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return s.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return n.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?n.lY.unknownEpochToArcadeDate(t):n.lY.epochToArcadeDate(t,this.contextTimeZone??u.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(){return{attributes:this._boundTarget.attributes,geometry:this.geometry()?.toJSON()??null}}castAsJsonAsync(){return Promise.resolve(this.castAsJson())}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},16215(e,t,r){r.d(t,{S:()=>i,Y:()=>n});const n=Symbol("BasemapInstance");function i(e){return null!=e&&"object"==typeof e&&n in e}},28076(e,t,r){r.d(t,{D:()=>i});var n=r(13337);const i={CIMVectorMarker:{scalesymbolsproportionally:!1,respectframe:!0,anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMPictureMarker:{scalex:1,texturefilter:"Draft",anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMTextSymbol:{angle:0,anglex:0,angley:0,halosize:1,height:10,horizontalalignment:"Left",kerning:!0,letterspacing:0,letterwidth:100,ligatures:!0,linegap:0,offsetx:0,offsety:0,strikethrough:!1,textcase:"Normal",textstring:"",underline:!1,verticalalignment:"Bottom",enable:!0,colorlocked:!1},CIMSolidStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMPictureStroke:{texturefilter:"Draft",capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMGradientStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1,gradientMethod:"AcrossLine",gradientSize:75,gradientSizeUnits:n.h.Relative,gradientType:"Discrete",interval:5},CIMSolidFill:{enable:!0,colorlocked:!1},CIMPictureFill:{offsetx:0,offsety:0,rotation:0,scalex:1,height:10,texturefilter:"Draft",enable:!0,colorlocked:!1},CIMHatchFill:{offsetx:0,offsety:0,rotation:0,separation:4,enable:!0,colorlocked:!1},CIMGradientFill:{enable:!0,angle:90,gradientMethod:"Linear",gradientSize:75,gradientSizeUnits:n.h.Relative,gradientType:"Discrete",interval:5},CIMGeometricEffectAddControlPoints:{angletolerance:120},CIMGeometricEffectArrow:{arrowtype:"OpenEnded",width:5},CIMGeometricEffectBuffer:{size:1},CIMGeometricEffectCut:{begincut:1,endcut:1,middlecut:0,invert:!1},CIMGeometricEffectDashes:{customendingoffset:0,linedashending:"NoConstraint",offsetalongline:0},CIMGeometricEffectDonut:{method:"Mitered",option:"Accurate",width:2},CIMGeometricEffectJog:{angle:225,length:20,position:50},CIMGeometricEffectControlMeasureLine:{rule:"FullGeometry",width:25},CIMGeometricEffectMove:{offsetx:1,offsety:-1},CIMGeometricEffectOffset:{method:"Square",offset:1,option:"Fast"},CIMGeometricEffectRadial:{angle:0,length:5},CIMGeometricEffectRotate:{angle:15},CIMGeometricEffectScale:{xscalefactor:1.15,yscalefactor:1.15},CIMGeometricEffectWave:{amplitude:2,period:3,seed:1,waveform:"Sinus"},CIMMarkerPlacementAlongLine:{customendingoffset:0,endings:"WithHalfGap",offsetalongline:0,placeperpart:!0,angletoline:!0,offset:0},CIMMarkerPlacementAtExtremities:{extremityplacement:"Both",offsetalongline:0,angletoline:!0,offset:0},CIMMarkerPlacementAtRatioPositions:{beginposition:0,endposition:0,flipfirst:!0,angletoline:!0,offset:0},CIMMarkerPlacementInsidePolygon:{gridangle:0,gridtype:"Fixed",offsetx:0,offsety:0,randomness:100,seed:0,shiftoddrows:!1,stepx:16,stepy:16,clipping:"ClipAtBoundary"},CIMMarkerPlacementOnLine:{relativeto:"LineMiddle",startpointoffset:0,angletoline:!0,offset:0},CIMMarkerPlacementOnVertices:{placeperpart:!0,placeoncontrolpoints:!0,placeonendpoints:!0,placeonregularvertices:!0,angletoline:!0,offset:0},CIMMarkerPlacementPolygonCenter:{method:"OnPolygon",offsetx:0,offsety:0,clipatboundary:!1},CIMAnimatedSymbolProperties:{playanimation:!1,reverseanimation:!1,randomizestarttime:!1,randomizestartseed:0,starttimeoffset:0,duration:3,endingduration:3,useendingduration:!1,repeattype:"Loop",repeatdelay:0,easing:"Linear"},CIMSymbolAnimationSize:{tosize:10},CIMSymbolAnimationScale:{scalefactor:1},CIMSymbolAnimationColor:{tocolor:[255,255,255,1],colormode:"Multiply"},CIMSymbolAnimationTransparency:{totransparency:0},CIMSymbolAnimationRotation:{torotation:0,rotateclockwise:!1},CIMSymbolAnimationOffset:{offsetx:0,offsety:0},CIMSymbolAnimationMoveAlongLine:{speed:30,distancealong:100,movementtype:"Distance"}}},13337(e,t,r){r.d(t,{h:()=>n});const n={Relative:0,Absolute:1}},93397(e,t,r){r.d(t,{$w:()=>m,Bu:()=>T,DW:()=>C,FH:()=>E,FM:()=>a,Kn:()=>b,Kq:()=>G,MM:()=>d,Nl:()=>x,O2:()=>A,UE:()=>F,YC:()=>P,YF:()=>_,_1:()=>I,_d:()=>w,_h:()=>s,bs:()=>j,e6:()=>c,gQ:()=>o,jn:()=>p,lW:()=>u,ll:()=>R,mA:()=>f,oI:()=>V,pM:()=>v,pV:()=>M,pk:()=>L,rB:()=>D,xo:()=>S,yX:()=>$,z9:()=>g,zb:()=>k,zr:()=>h});var n=r(28076);function i(e){let t=e.length;for(;t--;)if(!" /-,\n".includes(e.charAt(t)))return!1;return!0}function o(e,t){const r=[];let n=0,o=-1;do{if(o=e.indexOf("[",n),o>=n){if(o>n){const t=e.slice(n,o);r.push([t,null,i(t)])}if(n=o+1,o=e.indexOf("]",n),o>=n){if(o>n){const i=t[e.slice(n,o)];i&&r.push([null,i,!1])}n=o+1}}}while(-1!==o);if(n<e.length){const t=e.slice(n);r.push([t,null,i(t)])}return r}function s(e,t,r){let n="",i=null;for(const r of t){const[t,o,s]=r;if(null!=t&&""!==t)s?i=t:(null!=i&&(n+=i,i=null),n+=t);else{const t=e.readAttribute(o);null!=t&&""!==t&&(null!==i&&(n+=i,i=null),n+=t)}}return l(n,r)}function a(e,t,r,n){let i="",o=null;for(const n of t){const[t,s,a]=n;if(null!=t&&""!==t)a?o=t:(null!=o&&(i+=o,o=null),i+=t);else{let t=s;null!=r&&(t=Z(s,r));const n=e.attributes[t];null!=n&&""!==n&&(null!=o&&(i+=o,o=null),i+=n)}}return l(i,n)}function l(e,t){switch("string"!=typeof e&&(e=String(e)),t){case"LowerCase":return e.toLowerCase();case"Allcaps":return e.toUpperCase();default:return e}}function c(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function u(e){return e.data?.symbol??null}function d(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function f(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function p(e){return null!=e&&("CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type)}function h(e){return null!=e&&("CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type)}const m=(e,t=0)=>null==e||isNaN(e)?t:e;class y{constructor(e){this._import=e}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(e=>this.module=e)),this._promise}}function g(e){return new y(e)}function M(e){if(!e)return"normal";switch(e.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function b(e){if(!e)return"normal";switch(e.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function w(e){let t="normal",r="normal";if(e){const n=e.toLowerCase();n.includes("italic")?t="italic":n.includes("oblique")&&(t="oblique"),n.includes("bold")?r="bold":n.includes("light")&&(r="lighter")}return{style:t,weight:r}}function C(e){return e.underline?"underline":e.strikethrough?"line-through":"none"}function v(e){if(!e)return null;switch(e.type){case"CIMPolygonSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=v(t);if(null!=e)return e}break;case"CIMTextSymbol":return v(e.symbol);case"CIMSolidFill":return e.color}return null}function I(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=I(e);if(null!=t)return t}break}case"CIMTextSymbol":return I(e.symbol);case"CIMSolidStroke":return e.color}}function S(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=S(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return S(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function T(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":return"center";case"Justify":return"justify"}}function x(e){switch(e){default:case"Bottom":return"bottom";case"Top":return"top";case"Center":return"middle";case"Baseline":return"baseline"}}function A(e){return(e?Object.keys(e):[]).map(t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"}))}const F=e=>e.includes("data:image/svg+xml");function _(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function k(e,t,r,n,i,o,s=!0){const{infos:a}=o;let l=1,c=0,u=0,d=0,f=1;for(const{absoluteAnchorPoint:e,offsetX:t,offsetY:r,rotation:n,size:i,frameHeight:o,rotateClockWise:p,scaleSymbolsProportionally:h}of a)f=e?1:l,u=N(t,r,c,f,u),d=z(t,r,c,f,d),o&&(h||s)&&(l*=i/o),c=U(n,p,c);const p=N(n,i,c,f,u),h=z(n,i,c,f,d);return{size:e*l,rotation:U(t,r,c),offsetX:p,offsetY:h}}function E(e){return e?.dashTemplate&&(e.dashTemplate=function(e){return"string"==typeof e?function(e){return e.split(" ").map(e=>Number(e))}(e):e}(e.dashTemplate)),e}function j(e){if(null==e)return"Normal";switch(e.type){case"CIMTextSymbol":return e.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const t=e.symbolLayers;if(!t)return"Normal";for(const e of t)if("CIMVectorMarker"===e.type)return j(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return j(e.symbol)}}return"Normal"}function P(e){if(e)switch(e.type){case"CIMTextSymbol":return e.height;case"CIMPointSymbol":{let t=0;if(e.symbolLayers)for(const r of e.symbolLayers)if(r)switch(r.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const e=r.size??n.D.CIMVectorMarker.size;e>t&&(t=e);break}}return t}case"CIMLineSymbol":case"CIMPolygonSymbol":{let t=0;if(e.symbolLayers)for(const r of e.symbolLayers)if(r)switch(r.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=r.width;null!=e&&e>t&&(t=e);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(r.markerPlacement&&h(r.markerPlacement)){const e=r.size??n.D.CIMVectorMarker.size;e>t&&(t=e)}break;case"CIMPictureFill":{const e=r.height;null!=e&&e>t&&(t=e)}}return t}}}function Z(e,t){if(null!==t){const r=t.get(e);return r?r.name:e}return e}function L(e){return e.map(e=>({...e,propertyName:_(e.propertyName)}))}function D(e){const t={};for(const r in e){const n=e[r];t[_(r)]=n}return t}function R(e){if(!e)return 0;let t=0;for(const r of e)t+=O(r);return t}function O(e){if(!e)return 0;if(G(e))return e.inflateSize??256;switch(e.type){case"CIMGeometricEffectArrow":return Math.abs(.5*e.width);case"CIMGeometricEffectBuffer":return Math.abs(e.size);case"CIMGeometricEffectControlMeasureLine":return 500;case"CIMGeometricEffectExtension":return Math.abs(e.length);case"CIMGeometricEffectJog":return Math.abs(.5*e.length);case"CIMGeometricEffectMove":return Math.max(Math.abs(m(e.offsetX)),Math.abs(m(e.offsetY)));case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":return Math.abs(e.offset);case"CIMGeometricEffectRadial":return Math.abs(e.length??5);case"CIMGeometricEffectRegularPolygon":return Math.abs(e.radius);case"CIMGeometricEffectRotate":case"CIMGeometricEffectScale":default:return 0;case"CIMGeometricEffectTaperedPolygon":return.5*Math.max(Math.abs(e.fromWidth),Math.abs(e.toWidth));case"CIMGeometricEffectWave":return Math.abs(e.amplitude);case"CIMGeometricEffectDonut":return Math.abs(e.width)}}function z(e,t,r,n,i){const o=r*Math.PI/180;if(o){const r=Math.cos(o);return(Math.sin(o)*e+r*t)*n+i}return t*n+i}function N(e,t,r,n,i){const o=r*Math.PI/180;return o?(Math.cos(o)*e-Math.sin(o)*t)*n+i:e*n+i}function U(e,t,r){return t?r-e:r+e}function $(e,t){return Math.max(Math.min((e??t)/100,1),0)}function G(e){return e.type.startsWith("Private")}function V(e){return null!=e&&function(e){return"setControlPoint"in e&&"getControlPoint"in e&&"setControlPointAt"in e&&"getControlPointAt"in e}(e)?e:void 0}},93470(e,t,r){r.d(t,{Cb:()=>o,HW:()=>u,JR:()=>i,JZ:()=>l,WR:()=>a,b6:()=>d,fT:()=>n,nC:()=>c,yM:()=>s});const n=[252,146,31,255],i=[153,153,153,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},c={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},79677(e,t,r){r.d(t,{A:()=>f});var n,i=r(5482),o=r(25482),s=r(88930),a=r(91429),l=r(98623),c=r(10184),u=r(36005),d=r(43937);let f=class extends o.o{static{n=this}static get allTime(){return p}static get empty(){return h}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}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?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===n&&r===i}expandTo(e,t=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let r=this.start;r&&(r=(0,s.lL)(r,new c.A({value:1,unit:e}),t));let i=this.end;if(i){const r=(0,s.lL)(i,new c.A({value:1,unit:e}),t);i=i.getTime()===r.getTime()?r:(0,s.S1)(r,1,e,t)}return new n({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,a;return i>=t&&i<=r?s=i:t>=i&&t<=o&&(s=t),r>=i&&r<=o?a=r:o>=t&&o<=r&&(a=o),null==s||null==a||isNaN(s)||isNaN(a)?n.empty:new n({start:s===-1/0?null:new Date(s),end:a===1/0?null:new Date(a)})}offset(e,t,r=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const i=new n,{start:o,end:a}=this;return null!=o&&(i.start=(0,s.S1)(o,e,t,r)),null!=a&&(i.end=(0,s.S1)(a,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,i.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],f.prototype,"end",void 0),(0,i.Cg)([(0,u.w)("end")],f.prototype,"readEnd",null),(0,i.Cg)([(0,d.K)("end")],f.prototype,"writeEnd",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],f.prototype,"isAllTime",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],f.prototype,"isEmpty",null),(0,i.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],f.prototype,"start",void 0),(0,i.Cg)([(0,u.w)("start")],f.prototype,"readStart",null),(0,i.Cg)([(0,d.K)("start")],f.prototype,"writeStart",null),f=n=(0,i.Cg)([(0,a.$K)("esri.time.TimeExtent")],f);const p=new f,h=new f({start:void 0,end:void 0})},10184(e,t,r){r.d(t,{A:()=>u});var n=r(5482),i=r(69540),o=r(25482),s=r(88930),a=r(91429),l=r(73133),c=r(93223);let u=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.t)(this.value,this.unit,"milliseconds")}};(0,n.Cg)([(0,c.e)(l.j,{nonNullable:!0})],u.prototype,"unit",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],u.prototype,"value",void 0),u=(0,n.Cg)([(0,a.$K)("esri.time.TimeInterval")],u)},20816(e,t,r){r.d(t,{TA:()=>i,We:()=>a,Z3:()=>o,ZJ:()=>l,w5:()=>c});var n=r(11254);const i=(0,r(13069).vD)(),o=new Map,s=new Map;async function a(e,t,r){if(!e||!r)return!1;if(!t)return!0;const i=new URL(e).host;let s=o.get(i);if(!s){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");s=(await(0,n.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return s===t}async function l(e,t,n=!1){if(!e||!t)return!0;const o=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=s.get(o)?.entries();if(a)for(const[e,s]of a)if(s.name===t){const t=!s.stack?.hasForwardEdits();if(!t&&n){const[{deleteForwardEdits:t},{default:n}]=await Promise.all([r.e(2186).then(r.bind(r,32186)),r.e(2558).then(r.bind(r,32558))]),a=await t(o,e,new n({sessionId:i,moment:s.moment}));return a.success&&s.stack?.clearForwardEdits(),a.success}return t}return!0}function c(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),n=s.get(r)?.entries();if(n)for(const[e,r]of n)if(r.name===t)return"edit"===r.lockType;return!1}new Map}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3202,7157],{46140(e,t,r){r.d(t,{A:()=>i});var n=r(49186);class i{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new i(this.major,this.minor,this._context)}static parse(e,t=""){const[r,o]=e.split("."),s=/^\s*\d+\s*$/;if(!r?.match||!s.test(r))throw new n.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!o?.match||!s.test(o))throw new n.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const a=parseInt(r,10),l=parseInt(o,10);return new i(a,l,t)}}},6797(e,t,r){r.d(t,{Ui:()=>f});var n=r(69622),i=r(7762),o=r(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof n.A}function l(e){return e instanceof i.A?Object.keys(e.items):a(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function c(e,t){return e instanceof i.A?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const n=l(e),i=l(t);if(0===n.length&&0===i.length)return;if(!n.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=i.filter(e=>!n.includes(e)),f=n.filter(e=>!i.includes(e)),p=n.filter(r=>i.includes(r)&&c(e,r)!==c(t,r)).concat(o,f).sort(),h=u(e);if(h&&s.has(h)&&p.length)return{type:"complete",oldValue:e,newValue:t};let m;const y=a(e)&&a(t);for(const n of p){const i=c(e,n),o=c(t,n);let s;if((y||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(r&&r[n]&&"function"==typeof r[n])s=r[n]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;s={type:"complete",oldValue:i,newValue:o}}else s="object"==typeof i&&"object"==typeof o&&u(i)===u(o)?d(i,o):{type:"complete",oldValue:i,newValue:o};null!=s&&(null!=m?m.diff[n]=s:m={type:"partial",diff:{[n]:s}})}}return m}function f(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},91829(e,t,r){function n(){return[0,0,0,0]}function i(e,t,r,n){return[e,t,r,n]}function o(e,t,r,n){return[e,t,r,n]}function s(){return i(1,1,1,1)}function a(){return i(1,0,0,0)}function l(){return i(0,1,0,0)}function c(){return i(0,0,1,0)}function u(){return i(0,0,0,1)}r.d(t,{CN:()=>o,Un:()=>f,_Y:()=>u,fA:()=>i,uY:()=>d,vt:()=>n});const d=[0,0,0,0],f=s(),p=a(),h=l(),m=c(),y=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:f,UNIT_W:y,UNIT_X:p,UNIT_Y:h,UNIT_Z:m,ZEROS:d,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:n,freeze:o,fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let n=0;n<r;++n)t[n]=e[n];return t},fromValues:i,ones:s,unitW:u,unitX:a,unitY:l,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},78955(e,t,r){r.d(t,{Bw:()=>y,C:()=>i,Cc:()=>w,LI:()=>f,Om:()=>b,S8:()=>M,T9:()=>d,WQ:()=>s,Z0:()=>C,aI:()=>I,hG:()=>m,hZ:()=>o,hs:()=>p,jk:()=>u,m3:()=>g,t2:()=>v});var n=r(34304);function i(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function o(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function s(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function a(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function d(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function f(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function p(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function h(e,t){const r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+o*o)}function m(e,t){const r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return r*r+n*n+i*i+o*o}function y(e){const t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)}function g(e){const t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i}function M(e,t){const r=t[0],n=t[1],i=t[2],o=t[3];let s=r*r+n*n+i*i+o*o;return s>0&&(s=1/Math.sqrt(s),e[0]=r*s,e[1]=n*s,e[2]=i*s,e[3]=o*s),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function w(e,t,r,n){const i=t[0],o=t[1],s=t[2],a=t[3];return e[0]=i+n*(r[0]-i),e[1]=o+n*(r[1]-o),e[2]=s+n*(r[2]-s),e[3]=a+n*(r[3]-a),e}function C(e,t,r){const n=t[0],i=t[1],o=t[2],s=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*s,e[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*s,e[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*s,e[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*s,e}function v(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function I(e,t){const r=e[0],i=e[1],o=e[2],s=e[3],a=t[0],l=t[1],c=t[2],u=t[3],d=(0,n.FD)();return Math.abs(r-a)<=d*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-l)<=d*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(o-c)<=d*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(s-u)<=d*Math.max(1,Math.abs(s),Math.abs(u))}const S=a,T=l,x=c,A=h,F=m,_=y,k=g;Object.freeze(Object.defineProperty({__proto__:null,add:s,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:i,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:A,distance:h,div:x,divide:c,dot:b,equals:I,exactEquals:v,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:_,length:y,lerp:w,max:d,min:u,mul:T,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:M,random:function(e,t=1){const r=n.Ov;let i,o,s,a,l,c;do{i=2*r()-1,o=2*r()-1,l=i*i+o*o}while(l>=1);do{s=2*r()-1,a=2*r()-1,c=s*s+a*a}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*i,e[1]=t*o,e[2]=t*s*u,e[3]=t*a*u,e},round:f,scale:p,scaleAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e},set:o,sqrDist:F,sqrLen:k,squaredDistance:m,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:S,subtract:a,transformMat4:C,transformQuat:function(e,t,r){const n=t[0],i=t[1],o=t[2],s=r[0],a=r[1],l=r[2],c=r[3],u=c*n+a*o-l*i,d=c*i+l*n-s*o,f=c*o+s*i-a*n,p=-s*n-a*i-l*o;return e[0]=u*c+p*-s+d*-l-f*-a,e[1]=d*c+p*-a+f*-s-u*-l,e[2]=f*c+p*-l+u*-a-d*-s,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},16494(e,t,r){r.d(t,{Nd:()=>a,W5:()=>s});var n=r(17632);const i=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),o=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],s=new n.I({whiteList:i,onTagAttr:(e,t,r)=>{const n=`${t}="${r}"`;if(o.includes(t))return n},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new n.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},4146(e,t,r){r.d(t,{A:()=>M});var n=r(5482),i=r(11254),o=r(49186),s=r(65529),a=r(4902),l=r(92474),c=r(53966),u=r(17676),d=r(84952),f=r(91429),p=r(5443),h=r(16930),m=r(92602),y=r(79677);let g=0,M=class extends((0,s.Zt)((0,a.s)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new p.A(-180,-90,180,90,h.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=h.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:n}=await Promise.all([r.e(812),r.e(5613),r.e(909)]).then(r.bind(r,45613));try{return await n(t)}catch(e){const r=t?.portalItem,n=r?.id||"unset",i=r?.portal?.url||m.A.portalUrl;throw c.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+n+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||c.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new o.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,n.Cg)([(0,f.MZ)({type:String})],M.prototype,"attributionDataUrl",void 0),(0,n.Cg)([(0,f.MZ)({readOnly:!0})],M.prototype,"effectiveVisible",null),(0,n.Cg)([(0,f.MZ)({type:p.A})],M.prototype,"fullExtent",void 0),(0,n.Cg)([(0,f.MZ)({readOnly:!0})],M.prototype,"hasAttributionData",null),(0,n.Cg)([(0,f.MZ)({type:String,clonable:!1})],M.prototype,"id",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,nonNullable:!0})],M.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,f.MZ)({type:["show","hide","hide-children"]})],M.prototype,"listMode",void 0),(0,n.Cg)([(0,f.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],M.prototype,"opacity",void 0),(0,n.Cg)([(0,f.MZ)({clonable:!1})],M.prototype,"parent",void 0),(0,n.Cg)([(0,f.MZ)({readOnly:!0})],M.prototype,"parsedUrl",null),(0,n.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],M.prototype,"persistenceEnabled",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean})],M.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean})],M.prototype,"attributionVisible",void 0),(0,n.Cg)([(0,f.MZ)({type:h.A})],M.prototype,"spatialReference",void 0),(0,n.Cg)([(0,f.MZ)({type:String})],M.prototype,"title",void 0),(0,n.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],M.prototype,"type",void 0),(0,n.Cg)([(0,f.MZ)()],M.prototype,"url",void 0),(0,n.Cg)([(0,f.MZ)({type:y.A})],M.prototype,"visibilityTimeExtent",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,nonNullable:!0})],M.prototype,"visible",void 0),M=(0,n.Cg)([(0,f.$K)("esri.layers.Layer")],M)},52136(e,t,r){r.d(t,{p:()=>o});var n=r(5482),i=r(91429);const o=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,n.Cg)([(0,i.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.APIKeyMixin")],r),r}},47685(e,t,r){r.d(t,{Mk:()=>p,Zk:()=>d,w6:()=>y});var n=r(5482),i=r(65529),o=r(4718),s=r(91429),a=r(20816);const l=new i.bk;function c(e){return l.on("apply-edits",new WeakRef(e))}function u(e){return l.on("update-moment",new WeakRef(e))}function d(e,t,r=null,n=!1){const i=Promise.withResolvers();return n=null==t||n,l.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:n,result:i.promise}),i}const f=Symbol();function p(e){return null!=e&&"object"==typeof e&&f in e}function h(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function m(e,t,r){const n=new URL(e).host,i=a.Z3.get(n),o=e=>!e||e===i;return o(t)&&o(r)||t===r}const y=e=>{var t;const r=e;let i=class extends r{static{t=f}constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:n,mayReceiveServiceEdits:i,result:s}=e,a=t===this.url,l=null!=r&&null!=this.layerId&&r===this.layerId,c=h(this),u=h(this)&&m(t,n,this.gdbVersion);if(!a||c&&!u||!l&&!i)return;const d=s.then(e=>{if(this.lastEditsEventDate=new Date,l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,o.o8)(e)),e;const r=e.editedFeatures?.find(({layerId:e})=>e===this.layerId);if(r){const{adds:t,updates:n,deletes:i}=r.editedFeatures,s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],deletedFeatures:i?i.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],updatedFeatures:n?n.map(({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],editedFeatures:(0,o.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,o.o8)(e.historicMoment)};return this.emit("edits",s),s}const i={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,o.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,o.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,n,i.historicMoment)&&this.emit("edits",i),i}).then(e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,n,e.historicMoment)&&(this.historicMoment=e.historicMoment),e));d.catch(()=>{}),this.emit("apply-edits",{result:d})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:n}=e,i=t===this.url,o=h(this),s=h(this)&&m(t,r,this.gdbVersion),a=h(this)&&!m(t,this.gdbVersion,null);i&&o&&s&&a&&"historicMoment"in this&&this.historicMoment!==n&&(this.historicMoment=n)},this.when().then(()=>{this.addHandles(c(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(u(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(e,t,r){return"historicMoment"in this&&this.historicMoment!==r&&(0,a.w5)(e,t)}};return(0,n.Cg)([(0,s.MZ)()],i.prototype,"lastEditsEventDate",void 0),i=(0,n.Cg)([(0,s.$K)("esri.layers.mixins.EditBusLayer")],i),i}},32756(e,t,r){r.d(t,{Rr:()=>a,fY:()=>c,ne:()=>l});var n=r(5482),i=r(93637),o=r(91429),s=r(91880);function a(e,t,r){if(!e)return null;const n=e.find(e=>!!e.field);if(!n)return null;const i=new s.A;return i.read(n,r),[i]}const l={type:[s.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,n){const o=e.find(e=>!!e.field);o&&(0,i.sM)(r,[o.toJSON()],t)}}}},c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,n.Cg)([(0,o.MZ)(l)],r.prototype,"orderBy",void 0),r=(0,n.Cg)([(0,o.$K)("esri.layers.mixins.OrderedLayer")],r),r}},28032(e,t,r){r.d(t,{A:()=>l});var n=r(5482),i=r(69540),o=r(25482),s=r(91429),a=r(56400);let l=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,n.Cg)([(0,s.MZ)()],l.prototype,"creatorField",void 0),(0,n.Cg)([(0,s.MZ)()],l.prototype,"creationDateField",void 0),(0,n.Cg)([(0,s.MZ)()],l.prototype,"editorField",void 0),(0,n.Cg)([(0,s.MZ)()],l.prototype,"editDateField",void 0),(0,n.Cg)([(0,s.MZ)()],l.prototype,"realm",void 0),(0,n.Cg)([(0,s.MZ)((0,a.P6)("dateFieldsTimeReference",!0))],l.prototype,"timeZone",void 0),l=(0,n.Cg)([(0,s.$K)("esri.layers.support.EditFieldsInfo")],l)},33143(e,t,r){r.d(t,{A:()=>d});var n=r(5482),i=r(69540),o=r(25482),s=r(91429),a=r(8631),l=r(29005),c=r(36005),u=r(43937);let d=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,a.r)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,n.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,n.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,n.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,n.Cg)([(0,c.w)("domains")],d.prototype,"readDomains",null),(0,n.Cg)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,n.Cg)([(0,s.MZ)({type:[l.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,n.Cg)([(0,s.$K)("esri.layers.support.FeatureType")],d)},37352(e,t,r){r.d(t,{A:()=>l});var n,i=r(5482),o=r(7762),s=r(25482),a=r(91429);let l=n=class extends s.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.A}clone(){return new n({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],l.prototype,"floorField",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllMode",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllLevelIds",void 0),l=n=(0,i.Cg)([(0,a.$K)("esri.layers.support.LayerFloorInfo")],l)},91880(e,t,r){r.d(t,{A:()=>c});var n,i=r(5482),o=r(66552),s=r(25482),a=r(91429);const l=new o.J({asc:"ascending",desc:"descending"});let c=class extends s.o{static{n=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new n({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,i.Cg)([(0,a.MZ)({type:l.apiValues,json:{type:l.jsonValues,read:l.read,write:l.write}})],c.prototype,"order",void 0),c=n=(0,i.Cg)([(0,a.$K)("esri.layers.support.OrderByInfo")],c)},45067(e,t,r){r.d(t,{A:()=>u});var n=r(5482),i=r(69540),o=r(66552),s=r(25482),a=r(91429);const l=new o.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),c=new o.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let u=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,n.Cg)([(0,a.MZ)({json:{read:l.read,write:l.write}})],u.prototype,"cardinality",void 0),(0,n.Cg)([(0,a.MZ)({json:{name:"catalogID"}})],u.prototype,"catalogId",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],u.prototype,"composite",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],u.prototype,"id",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],u.prototype,"keyField",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],u.prototype,"keyFieldInRelationshipTable",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],u.prototype,"name",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],u.prototype,"relatedTableId",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],u.prototype,"relationshipTableId",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:c.read,write:c.write}})],u.prototype,"role",void 0),u=(0,n.Cg)([(0,a.$K)("esri.layers.support.Relationship")],u)},17311(e,t,r){r.d(t,{A:()=>p});var n=r(5482),i=r(69622),o=r(4576),s=r(60999),a=r(7762),l=r(16494),c=r(91429),u=r(30524),d=r(43668);const f=/<br\s*\/*>/gi;let p=class extends i.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,s.UT)(()=>(0,d.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([r.e(4560),r.e(9301)]).then(r.bind(r,99301)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new a.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),n=this.fieldsIndex.get(r.at(-1)??"");n&&e.add(n.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const n=t.getObjectId()??t.attributes?.[e.objectIdField];return(await this.getTitles(e,[t],r)).get(n)??""}async getTitles(e,t,r){const n=new Map,i=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:s,workingTitle:a}=this,c=a&&s;t.forEach(t=>{const u=t.getObjectId()??t.attributes[e.objectIdField];let d=c?o({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:s,globalAttributes:this._createFormattedAttributes(e,t,i).global,layer:e,text:a}):"";r?.removeHTML&&(d=l.Nd.sanitize(d).replaceAll(f," ")),n.set(u,d)})}catch{}return n}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(o.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,u.Kl)(e,this.requiredFields))){const n=e.createQuery();n.where="1=1",n.outFields=[...this.requiredFields],n.objectIds=r;const i=await e.queryFeatures(n);if(i?.features.length===t.length)return i.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),n=e?.name??r.fieldName;r.fieldName=n,t.set(n.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const n=this.effectivePopupTemplate?.fieldInfos??[],i={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{i[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const o={...t.attributes,...i};return{global:this._featureUtils.formatAttributes({fieldInfos:n,attributes:o,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,u.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,n.Cg)([(0,c.MZ)({readOnly:!0})],p.prototype,"_arcadeTask",null),(0,n.Cg)([(0,c.MZ)()],p.prototype,"_featureUtils",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0})],p.prototype,"featureUtilsPromise",null),(0,n.Cg)([(0,c.MZ)({readOnly:!0})],p.prototype,"calculatedExpressions",null),(0,n.Cg)([(0,c.MZ)()],p.prototype,"displayField",void 0),(0,n.Cg)([(0,c.MZ)()],p.prototype,"effectivePopupTemplate",void 0),(0,n.Cg)([(0,c.MZ)()],p.prototype,"expressionsUsedInTitle",null),(0,n.Cg)([(0,c.MZ)()],p.prototype,"fieldsIndex",void 0),(0,n.Cg)([(0,c.MZ)()],p.prototype,"fieldInfoMap",null),(0,n.Cg)([(0,c.MZ)()],p.prototype,"fields",void 0),(0,n.Cg)([(0,c.MZ)()],p.prototype,"objectIdField",void 0),(0,n.Cg)([(0,c.MZ)()],p.prototype,"requiredFields",null),p=(0,n.Cg)([(0,c.$K)("esri.layers.support.TitleCreator")],p)},41560(e,t,r){r.d(t,{Ch:()=>s,mW:()=>o});var n=r(34727),i=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function s(e,t,r){const o=function(e){if("manual"===c(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:n}of e.filters)t[0]=Math.max(t[0],u(r)),t[1]=Math.min(t[1],d(n));return t}(e);if(o&&((0,n.gg)(t,o[0])||(0,n.ZH)(r,o[1])))return"";const s=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const i=u(e.at(0)?.minScale),o=d(e.at(-1)?.maxScale);if((0,n.ZH)(i,t)||(0,n.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,n.ZH)(u(i.minScale),d(r.maxScale)))return!0}return!1}(s,t,r)?"1=1":s.map(e=>e.where||"1=1").reduce((e,t)=>(0,i.IW)(e,t),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===c(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const n of e.filters)l(n.minScale,n.maxScale,t,r)&&(yield n)}}function l(e,t,r,i){return e=u(e),r=u(r),t=d(t),!(!(0,n.Sp)(r,e)&&(i??r)>e||(0,n.Hx)(t,r)||void 0!==i&&(0,n.Sp)(i,e))}function c(e){return"mode"in e?e.mode:e.filterMode}function u(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},77548(e,t,r){r.d(t,{Gh:()=>E,tk:()=>x,BR:()=>T,p2:()=>I,qd:()=>A,wI:()=>S,G$:()=>_,$x:()=>F,Ov:()=>b,cM:()=>f,UC:()=>p,Qz:()=>h,OP:()=>k,TU:()=>M,F2:()=>m,XX:()=>g,Qi:()=>w,jy:()=>C});var n=r(70333),i=r(11254),o=r(7762),s=(r(84952),r(36563)),a=r(36708),l=r(4146);const c=new WeakMap;function u(e){return!e.destroyed&&(c.has(e)||e.addHandles([(0,a.wB)(()=>{const{parent:t}=e;return!!(t&&t instanceof l.A)&&("catalog-dynamic-group"===t.type||u(t))},t=>c.set(e,t),a.pc),(0,s.hA)(()=>c.delete(e))]),c.get(e))}function d(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function f(e){return d(e,"knowledge-graph")&&"layers"in e}function p(e){return d(e,"knowledge-graph-sublayer")}function h(e){return d(e,"link-chart")&&"layers"in e}function m(e){return d(e,"subtype-group")&&"sublayers"in e}function y(e){const t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}r(16215);const g={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function M(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function b(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function w(e){return null!=e&&"object"==typeof e&&"featureReduction"in e}function C(e){return function(e){return d(e,"catalog-footprint")}(e)||function(e){return d(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)||function(e){return d(e,"oriented-imagery")}(e)||function(e){return"subtype-sublayer"===e?.type}(e)}function v(e){const t=e?.type;return"binning"===t||"cluster"===t}function I(e,t){if(!C(e))return;const r=t?.graphic,n="featureReduction"in e?e.featureReduction:null;if(r){if(r.isAggregate){const e=r.origin;return e&&"featureReductionProvider"in e&&n?v(n)?n:null:void 0}return e}return t?.checkFeatureReduction&&n?v(n)?n:null:e}async function S(e,t){const r=n.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const o=e.toLowerCase().indexOf("/rest/services");if(-1===o)return null;const s=`${e.slice(0,o)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,i.A)(s,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function T(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"parquet":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function x(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function A(e){const t=new o.A;for(const r of e.allLayers.concat(e.allTables))u(r)||y(r)||"annotation-feature"===r.type||"dimension-feature"===r.type||("charts"in r&&t.push(r),"subtype-group"===r.type&&t.push(...r.sublayers));return t}function F(e,t){return null}function _(e){return null}function k(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function E(e,t){if(!t||!k(e))return;const r=(e.url,null);r&&(e.url=r)}},73681(e,t,r){r.d(t,{n:()=>l});var n=r(49186),i=r(53966),o=r(46140),s=r(95466),a=r(55674);class l{static async from(e,t,r){const s=e.dictionary_version?o.A.parse(e.dictionary_version):null,u=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const f=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))f.delete(e);f.size&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:f});const p=await(0,a.xR)(e.expression,null,d);if(!p)throw new n.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const h=!s||!s.greaterEqual(4,0);h&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:s});const m=new c(r,h);return new l(h,u,p,m)}constructor(e,t,r,n){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=n}get itemNames(){return this._itemNames}evaluate(e,t,r,n){try{return this._reader.bind(e,r,n),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new s.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new s.A(t)}}class c extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},41366(e,t,r){r.d(t,{K:()=>d,Q:()=>l});var n=r(5482),i=r(66552),o=r(53966),s=r(91429),a=r(93223);const l=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",u="field",d=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&u||r&&c||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==u&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n.Cg)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,n.Cg)([(0,a.e)(l,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,n.Cg)([(0,s.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},55674(e,t,r){r.d(t,{Ad:()=>p,Gj:()=>y,QY:()=>f,lL:()=>g,xR:()=>h});var n=r(66131),i=r(49186),o=(r(44208),r(44729)),s=r(15032),a=r(65864),l=r(95466),c=r(43668),u=r(98623);const d=["geometry","scale","timeProperties"];function f(e,t){if(null!=t)for(const r of d)t.hasArcadeDependency(r)&&e.add(r);return e}function p(e,t){return m.create(e,t,null,["$feature","$view"])}function h(e,t,r){return m.create(e,t,r,["$feature","$view","$config"])}class m{static async create(e,t,r,n){const{arcade:o,Dictionary:s}=await(0,c.l)();let a;try{a=o.parseScript(e)}catch(t){throw new i.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=o.scriptUsesGeometryEngine(a);l&&await o.enableGeometrySupport(),await o.loadDependentModules(new Set,a,null,!1,l);const u={vars:n.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},d=o.compileScript(a,u);let f=null;null!=r&&(f=new s(r),f.immutable=!0);const p=new s;return p.immutable=!1,p.setField("scale",0),new m(e,o,a,d,t,p,f,s)}constructor(e,t,r,n,i,o,s,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=n,this._spatialReference=i,this._viewDict=o,this._configDict=s,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new y,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:i,currentEnd:o}=t.$view.timeProperties;e=new this._dictionaryCtor({__proto__:null,currentStart:null!=i?null!=r?n.lY.epochToArcadeDate(i,r):n.lY.unknownEpochToArcadeDate(i):void 0,currentEnd:null!=o?null!=r?n.lY.epochToArcadeDate(o,r):n.lY.unknownEpochToArcadeDate(o):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class y{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const n=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=n.fields,this._boundSchema.fieldsIndex=n,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===u.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return o.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return s.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return n.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?n.lY.unknownEpochToArcadeDate(t):n.lY.epochToArcadeDate(t,this.contextTimeZone??u.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(){return{attributes:this._boundTarget.attributes,geometry:this.geometry()?.toJSON()??null}}castAsJsonAsync(){return Promise.resolve(this.castAsJson())}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},16215(e,t,r){r.d(t,{S:()=>i,Y:()=>n});const n=Symbol("BasemapInstance");function i(e){return null!=e&&"object"==typeof e&&n in e}},28076(e,t,r){r.d(t,{D:()=>i});var n=r(13337);const i={CIMVectorMarker:{scalesymbolsproportionally:!1,respectframe:!0,anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMPictureMarker:{scalex:1,texturefilter:"Draft",anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMTextSymbol:{angle:0,anglex:0,angley:0,halosize:1,height:10,horizontalalignment:"Left",kerning:!0,letterspacing:0,letterwidth:100,ligatures:!0,linegap:0,offsetx:0,offsety:0,strikethrough:!1,textcase:"Normal",textstring:"",underline:!1,verticalalignment:"Bottom",enable:!0,colorlocked:!1},CIMSolidStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMPictureStroke:{texturefilter:"Draft",capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMGradientStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1,gradientMethod:"AcrossLine",gradientSize:75,gradientSizeUnits:n.h.Relative,gradientType:"Discrete",interval:5},CIMSolidFill:{enable:!0,colorlocked:!1},CIMPictureFill:{offsetx:0,offsety:0,rotation:0,scalex:1,height:10,texturefilter:"Draft",enable:!0,colorlocked:!1},CIMHatchFill:{offsetx:0,offsety:0,rotation:0,separation:4,enable:!0,colorlocked:!1},CIMGradientFill:{enable:!0,angle:90,gradientMethod:"Linear",gradientSize:75,gradientSizeUnits:n.h.Relative,gradientType:"Discrete",interval:5},CIMGeometricEffectAddControlPoints:{angletolerance:120},CIMGeometricEffectArrow:{arrowtype:"OpenEnded",width:5},CIMGeometricEffectBuffer:{size:1},CIMGeometricEffectCut:{begincut:1,endcut:1,middlecut:0,invert:!1},CIMGeometricEffectDashes:{customendingoffset:0,linedashending:"NoConstraint",offsetalongline:0},CIMGeometricEffectDonut:{method:"Mitered",option:"Accurate",width:2},CIMGeometricEffectJog:{angle:225,length:20,position:50},CIMGeometricEffectControlMeasureLine:{rule:"FullGeometry",width:25},CIMGeometricEffectMove:{offsetx:1,offsety:-1},CIMGeometricEffectOffset:{method:"Square",offset:1,option:"Fast"},CIMGeometricEffectRadial:{angle:0,length:5},CIMGeometricEffectRotate:{angle:15},CIMGeometricEffectScale:{xscalefactor:1.15,yscalefactor:1.15},CIMGeometricEffectWave:{amplitude:2,period:3,seed:1,waveform:"Sinus"},CIMMarkerPlacementAlongLine:{customendingoffset:0,endings:"WithHalfGap",offsetalongline:0,placeperpart:!0,angletoline:!0,offset:0},CIMMarkerPlacementAtExtremities:{extremityplacement:"Both",offsetalongline:0,angletoline:!0,offset:0},CIMMarkerPlacementAtRatioPositions:{beginposition:0,endposition:0,flipfirst:!0,angletoline:!0,offset:0},CIMMarkerPlacementInsidePolygon:{gridangle:0,gridtype:"Fixed",offsetx:0,offsety:0,randomness:100,seed:0,shiftoddrows:!1,stepx:16,stepy:16,clipping:"ClipAtBoundary"},CIMMarkerPlacementOnLine:{relativeto:"LineMiddle",startpointoffset:0,angletoline:!0,offset:0},CIMMarkerPlacementOnVertices:{placeperpart:!0,placeoncontrolpoints:!0,placeonendpoints:!0,placeonregularvertices:!0,angletoline:!0,offset:0},CIMMarkerPlacementPolygonCenter:{method:"OnPolygon",offsetx:0,offsety:0,clipatboundary:!1},CIMAnimatedSymbolProperties:{playanimation:!1,reverseanimation:!1,randomizestarttime:!1,randomizestartseed:0,starttimeoffset:0,duration:3,endingduration:3,useendingduration:!1,repeattype:"Loop",repeatdelay:0,easing:"Linear"},CIMSymbolAnimationSize:{tosize:10},CIMSymbolAnimationScale:{scalefactor:1},CIMSymbolAnimationColor:{tocolor:[255,255,255,1],colormode:"Multiply"},CIMSymbolAnimationTransparency:{totransparency:0},CIMSymbolAnimationRotation:{torotation:0,rotateclockwise:!1},CIMSymbolAnimationOffset:{offsetx:0,offsety:0},CIMSymbolAnimationMoveAlongLine:{speed:30,distancealong:100,movementtype:"Distance"}}},13337(e,t,r){r.d(t,{h:()=>n});const n={Relative:0,Absolute:1}},93397(e,t,r){r.d(t,{$w:()=>m,Bu:()=>T,DW:()=>C,FH:()=>E,FM:()=>a,Kn:()=>b,Kq:()=>G,MM:()=>d,Nl:()=>x,O2:()=>A,UE:()=>F,YC:()=>P,YF:()=>_,_1:()=>I,_d:()=>w,_h:()=>s,bs:()=>j,e6:()=>c,gQ:()=>o,jn:()=>p,lW:()=>u,ll:()=>R,mA:()=>f,oI:()=>V,pM:()=>v,pV:()=>M,pk:()=>L,rB:()=>D,xo:()=>S,yX:()=>$,z9:()=>g,zb:()=>k,zr:()=>h});var n=r(28076);function i(e){let t=e.length;for(;t--;)if(!" /-,\n".includes(e.charAt(t)))return!1;return!0}function o(e,t){const r=[];let n=0,o=-1;do{if(o=e.indexOf("[",n),o>=n){if(o>n){const t=e.slice(n,o);r.push([t,null,i(t)])}if(n=o+1,o=e.indexOf("]",n),o>=n){if(o>n){const i=t[e.slice(n,o)];i&&r.push([null,i,!1])}n=o+1}}}while(-1!==o);if(n<e.length){const t=e.slice(n);r.push([t,null,i(t)])}return r}function s(e,t,r){let n="",i=null;for(const r of t){const[t,o,s]=r;if(null!=t&&""!==t)s?i=t:(null!=i&&(n+=i,i=null),n+=t);else{const t=e.readAttribute(o);null!=t&&""!==t&&(null!==i&&(n+=i,i=null),n+=t)}}return l(n,r)}function a(e,t,r,n){let i="",o=null;for(const n of t){const[t,s,a]=n;if(null!=t&&""!==t)a?o=t:(null!=o&&(i+=o,o=null),i+=t);else{let t=s;null!=r&&(t=Z(s,r));const n=e.attributes[t];null!=n&&""!==n&&(null!=o&&(i+=o,o=null),i+=n)}}return l(i,n)}function l(e,t){switch("string"!=typeof e&&(e=String(e)),t){case"LowerCase":return e.toLowerCase();case"Allcaps":return e.toUpperCase();default:return e}}function c(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function u(e){return e.data?.symbol??null}function d(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function f(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function p(e){return null!=e&&("CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type)}function h(e){return null!=e&&("CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type)}const m=(e,t=0)=>null==e||isNaN(e)?t:e;class y{constructor(e){this._import=e}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(e=>this.module=e)),this._promise}}function g(e){return new y(e)}function M(e){if(!e)return"normal";switch(e.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function b(e){if(!e)return"normal";switch(e.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function w(e){let t="normal",r="normal";if(e){const n=e.toLowerCase();n.includes("italic")?t="italic":n.includes("oblique")&&(t="oblique"),n.includes("bold")?r="bold":n.includes("light")&&(r="lighter")}return{style:t,weight:r}}function C(e){return e.underline?"underline":e.strikethrough?"line-through":"none"}function v(e){if(!e)return null;switch(e.type){case"CIMPolygonSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=v(t);if(null!=e)return e}break;case"CIMTextSymbol":return v(e.symbol);case"CIMSolidFill":return e.color}return null}function I(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=I(e);if(null!=t)return t}break}case"CIMTextSymbol":return I(e.symbol);case"CIMSolidStroke":return e.color}}function S(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=S(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return S(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function T(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":return"center";case"Justify":return"justify"}}function x(e){switch(e){default:case"Bottom":return"bottom";case"Top":return"top";case"Center":return"middle";case"Baseline":return"baseline"}}function A(e){return(e?Object.keys(e):[]).map(t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"}))}const F=e=>e.includes("data:image/svg+xml");function _(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function k(e,t,r,n,i,o,s=!0){const{infos:a}=o;let l=1,c=0,u=0,d=0,f=1;for(const{absoluteAnchorPoint:e,offsetX:t,offsetY:r,rotation:n,size:i,frameHeight:o,rotateClockWise:p,scaleSymbolsProportionally:h}of a)f=e?1:l,u=N(t,r,c,f,u),d=z(t,r,c,f,d),o&&(h||s)&&(l*=i/o),c=U(n,p,c);const p=N(n,i,c,f,u),h=z(n,i,c,f,d);return{size:e*l,rotation:U(t,r,c),offsetX:p,offsetY:h}}function E(e){return e?.dashTemplate&&(e.dashTemplate=function(e){return"string"==typeof e?function(e){return e.split(" ").map(e=>Number(e))}(e):e}(e.dashTemplate)),e}function j(e){if(null==e)return"Normal";switch(e.type){case"CIMTextSymbol":return e.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const t=e.symbolLayers;if(!t)return"Normal";for(const e of t)if("CIMVectorMarker"===e.type)return j(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return j(e.symbol)}}return"Normal"}function P(e){if(e)switch(e.type){case"CIMTextSymbol":return e.height;case"CIMPointSymbol":{let t=0;if(e.symbolLayers)for(const r of e.symbolLayers)if(r)switch(r.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const e=r.size??n.D.CIMVectorMarker.size;e>t&&(t=e);break}}return t}case"CIMLineSymbol":case"CIMPolygonSymbol":{let t=0;if(e.symbolLayers)for(const r of e.symbolLayers)if(r)switch(r.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=r.width;null!=e&&e>t&&(t=e);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(r.markerPlacement&&h(r.markerPlacement)){const e=r.size??n.D.CIMVectorMarker.size;e>t&&(t=e)}break;case"CIMPictureFill":{const e=r.height;null!=e&&e>t&&(t=e)}}return t}}}function Z(e,t){if(null!==t){const r=t.get(e);return r?r.name:e}return e}function L(e){return e.map(e=>({...e,propertyName:_(e.propertyName)}))}function D(e){const t={};for(const r in e){const n=e[r];t[_(r)]=n}return t}function R(e){if(!e)return 0;let t=0;for(const r of e)t+=O(r);return t}function O(e){if(!e)return 0;if(G(e))return e.inflateSize??256;switch(e.type){case"CIMGeometricEffectArrow":return Math.abs(.5*e.width);case"CIMGeometricEffectBuffer":return Math.abs(e.size);case"CIMGeometricEffectControlMeasureLine":return 500;case"CIMGeometricEffectExtension":return Math.abs(e.length);case"CIMGeometricEffectJog":return Math.abs(.5*e.length);case"CIMGeometricEffectMove":return Math.max(Math.abs(m(e.offsetX)),Math.abs(m(e.offsetY)));case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":return Math.abs(e.offset);case"CIMGeometricEffectRadial":return Math.abs(e.length??5);case"CIMGeometricEffectRegularPolygon":return Math.abs(e.radius);case"CIMGeometricEffectRotate":case"CIMGeometricEffectScale":default:return 0;case"CIMGeometricEffectTaperedPolygon":return.5*Math.max(Math.abs(e.fromWidth),Math.abs(e.toWidth));case"CIMGeometricEffectWave":return Math.abs(e.amplitude);case"CIMGeometricEffectDonut":return Math.abs(e.width)}}function z(e,t,r,n,i){const o=r*Math.PI/180;if(o){const r=Math.cos(o);return(Math.sin(o)*e+r*t)*n+i}return t*n+i}function N(e,t,r,n,i){const o=r*Math.PI/180;return o?(Math.cos(o)*e-Math.sin(o)*t)*n+i:e*n+i}function U(e,t,r){return t?r-e:r+e}function $(e,t){return Math.max(Math.min((e??t)/100,1),0)}function G(e){return e.type.startsWith("Private")}function V(e){return null!=e&&function(e){return"setControlPoint"in e&&"getControlPoint"in e&&"setControlPointAt"in e&&"getControlPointAt"in e}(e)?e:void 0}},93470(e,t,r){r.d(t,{Cb:()=>o,HW:()=>u,JR:()=>i,JZ:()=>l,WR:()=>a,b6:()=>d,fT:()=>n,nC:()=>c,yM:()=>s});const n=[252,146,31,255],i=[153,153,153,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},c={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},79677(e,t,r){r.d(t,{A:()=>f});var n,i=r(5482),o=r(25482),s=r(88930),a=r(91429),l=r(98623),c=r(10184),u=r(36005),d=r(43937);let f=class extends o.o{static{n=this}static get allTime(){return p}static get empty(){return h}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}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?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===n&&r===i}expandTo(e,t=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let r=this.start;r&&(r=(0,s.lL)(r,new c.A({value:1,unit:e}),t));let i=this.end;if(i){const r=(0,s.lL)(i,new c.A({value:1,unit:e}),t);i=i.getTime()===r.getTime()?r:(0,s.S1)(r,1,e,t)}return new n({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,a;return i>=t&&i<=r?s=i:t>=i&&t<=o&&(s=t),r>=i&&r<=o?a=r:o>=t&&o<=r&&(a=o),null==s||null==a||isNaN(s)||isNaN(a)?n.empty:new n({start:s===-1/0?null:new Date(s),end:a===1/0?null:new Date(a)})}offset(e,t,r=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const i=new n,{start:o,end:a}=this;return null!=o&&(i.start=(0,s.S1)(o,e,t,r)),null!=a&&(i.end=(0,s.S1)(a,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,i.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],f.prototype,"end",void 0),(0,i.Cg)([(0,u.w)("end")],f.prototype,"readEnd",null),(0,i.Cg)([(0,d.K)("end")],f.prototype,"writeEnd",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],f.prototype,"isAllTime",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],f.prototype,"isEmpty",null),(0,i.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],f.prototype,"start",void 0),(0,i.Cg)([(0,u.w)("start")],f.prototype,"readStart",null),(0,i.Cg)([(0,d.K)("start")],f.prototype,"writeStart",null),f=n=(0,i.Cg)([(0,a.$K)("esri.time.TimeExtent")],f);const p=new f,h=new f({start:void 0,end:void 0})},10184(e,t,r){r.d(t,{A:()=>u});var n=r(5482),i=r(69540),o=r(25482),s=r(88930),a=r(91429),l=r(73133),c=r(93223);let u=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.t)(this.value,this.unit,"milliseconds")}};(0,n.Cg)([(0,c.e)(l.j,{nonNullable:!0})],u.prototype,"unit",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],u.prototype,"value",void 0),u=(0,n.Cg)([(0,a.$K)("esri.time.TimeInterval")],u)},20816(e,t,r){r.d(t,{TA:()=>i,We:()=>a,Z3:()=>o,ZJ:()=>l,w5:()=>c});var n=r(11254);const i=(0,r(13069).vD)(),o=new Map,s=new Map;async function a(e,t,r){if(!e||!r)return!1;if(!t)return!0;const i=new URL(e).host;let s=o.get(i);if(!s){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");s=(await(0,n.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return s===t}async function l(e,t,n=!1){if(!e||!t)return!0;const o=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=s.get(o)?.entries();if(a)for(const[e,s]of a)if(s.name===t){const t=!s.stack?.hasForwardEdits();if(!t&&n){const[{deleteForwardEdits:t},{default:n}]=await Promise.all([r.e(2186).then(r.bind(r,32186)),r.e(2558).then(r.bind(r,32558))]),a=await t(o,e,new n({sessionId:i,moment:s.moment}));return a.success&&s.stack?.clearForwardEdits(),a.success}return t}return!0}function c(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),n=s.get(r)?.entries();if(n)for(const[e,r]of n)if(r.name===t)return"edit"===r.lockType;return!1}new Map}}]);
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{clone as o,fromValues as r,create as a}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{ScreenSpacePass as t}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{BlendColorsPremultiplied as s,premultiplyAlpha as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/BlendColorsPremultiplied.glsl.js";import{CameraSpace as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{Float2PassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float4PassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{Float4sPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Float4sPassUniform.js";import{FloatPassUniform as h}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as p}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{glsl as u,If as c}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DPassUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{maxColorRampSize as w}from"../views/3d/webgl-engine/shaders/colorRampParameters.js";import{S as C}from"./ShadowCastAccumulate.glsl.js";import{NoParameters as f}from"../views/webgl/NoParameters.js";import{ShaderBuilder as b}from"../views/webgl/ShaderBuilder.js";class S extends f{constructor(r){super(),this._data=r,this.sampleScale=e(),this.opacityFromElevation=1,this.gradientColorRamp=y,this.thresholdColor=o($),this.bandedGradientColorRamp=M,this.bandSize=.1,this.threshold=.5}get shadowCastMap(){return this._data.shadowCastTexture}}const R=.7,j=50/255,y=[[0,r(0,0,1,0)],[1,r(0,0,1,R)]],$=r(1,0,0,R),M=[[0,r(j,j,j,0)],[1,r(j,j,j,R)]];function z(e){const o=new b,r=o.fragment;o.include(n),o.include(t);const{rendersSunlight:a,visualization:f}=e;r.constants.add("inverseSampleValue","float",C),r.uniforms.add(new v("shadowCastMap",e=>e.shadowCastMap),new i("sampleScale",e=>e.sampleScale),new h("opacityFromElevation",e=>e.opacityFromElevation));const S=2===f,R=3===f,j=1===f;R&&r.include(s);const y=!S;switch(y&&r.code.add(u`vec4 evaluateColorRamp(float value) {
2
+ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{clone as o,fromValues as r,create as a}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{ScreenSpacePass as t}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{BlendColorsPremultiplied as l,premultiplyAlpha as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/BlendColorsPremultiplied.glsl.js";import{CameraSpace as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{Float2PassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float4PassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{Float4sPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Float4sPassUniform.js";import{FloatPassUniform as h}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as p}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{glsl as u,If as c}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DPassUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{maxColorRampSize as w}from"../views/3d/webgl-engine/shaders/colorRampParameters.js";import{S as C}from"./ShadowCastAccumulate.glsl.js";import{NoParameters as f}from"../views/webgl/NoParameters.js";import{ShaderBuilder as b}from"../views/webgl/ShaderBuilder.js";class S extends f{constructor(){super(...arguments),this.sampleScale=e(),this.opacityFromElevation=1,this.gradientColorRamp=y,this.thresholdColor=o($),this.bandedGradientColorRamp=M,this.bandSize=.1,this.threshold=.5,this.data=null}get shadowCastMap(){return this.data?.shadowCastTexture??null}}const R=.7,j=50/255,y=[[0,r(0,0,1,0)],[1,r(0,0,1,R)]],$=r(1,0,0,R),M=[[0,r(j,j,j,0)],[1,r(j,j,j,R)]];function z(e){const o=new b,r=o.fragment;o.include(n),o.include(t);const{rendersSunlight:a,visualization:f}=e;r.constants.add("inverseSampleValue","float",C),r.uniforms.add(new v("shadowCastMap",e=>e.shadowCastMap),new i("sampleScale",e=>e.sampleScale),new h("opacityFromElevation",e=>e.opacityFromElevation));const S=2===f,R=3===f,j=1===f;R&&r.include(l);const y=!S;switch(y&&r.code.add(u`vec4 evaluateColorRamp(float value) {
3
3
  if (value <= vvColorValues[0]) {
4
4
  return vvColorColors[0];
5
5
  }
@@ -10,7 +10,7 @@ return mix(vvColorColors[i-1], vvColorColors[i], f);
10
10
  }
11
11
  }
12
12
  return vvColorColors[colorRampSize - 1];
13
- }`),f){case 0:r.uniforms.add(new m("vvColorColors",w,e=>e.gradientColorRamp.flatMap(([e,o])=>l(P,o))),new g("colorRampSize",e=>e.gradientColorRamp.length),new p("vvColorValues",w,e=>e.gradientColorRamp.map(([e,o])=>e)));break;case 1:r.uniforms.add(new m("vvColorColors",w,e=>e.bandedGradientColorRamp.flatMap(([e,o])=>l(P,o))),new g("colorRampSize",e=>e.bandedGradientColorRamp.length),new p("vvColorValues",w,e=>e.bandedGradientColorRamp.map(([e,o])=>e)),new h("bandSize",e=>e.bandSize));break;case 3:r.uniforms.add(new d("uColor",e=>l(P,e.thresholdColor)),new h("threshold",e=>e.threshold),new m("vvColorColors",w,e=>e.gradientColorRamp.flatMap(([e,o])=>l(P,o))),new g("colorRampSize",e=>e.gradientColorRamp.length),new p("vvColorValues",w,e=>e.gradientColorRamp.map(([e,o])=>e)));break;case 2:r.uniforms.add(new d("uColor",e=>l(P,e.thresholdColor)),new h("threshold",e=>e.threshold))}const{type:$,selector:M,thresholdStrengthSelector:z}=R?{type:"vec2",selector:"rg",thresholdStrengthSelector:"strength.x"}:{type:"float",selector:"r",thresholdStrengthSelector:"strength"},V=!a;return r.main.add(u`
13
+ }`),f){case 0:r.uniforms.add(new m("vvColorColors",w,e=>e.gradientColorRamp.flatMap(([e,o])=>s(P,o))),new g("colorRampSize",e=>e.gradientColorRamp.length),new p("vvColorValues",w,e=>e.gradientColorRamp.map(([e,o])=>e)));break;case 1:r.uniforms.add(new m("vvColorColors",w,e=>e.bandedGradientColorRamp.flatMap(([e,o])=>s(P,o))),new g("colorRampSize",e=>e.bandedGradientColorRamp.length),new p("vvColorValues",w,e=>e.bandedGradientColorRamp.map(([e,o])=>e)),new h("bandSize",e=>e.bandSize));break;case 3:r.uniforms.add(new d("uColor",e=>s(P,e.thresholdColor)),new h("threshold",e=>e.threshold),new m("vvColorColors",w,e=>e.gradientColorRamp.flatMap(([e,o])=>s(P,o))),new g("colorRampSize",e=>e.gradientColorRamp.length),new p("vvColorValues",w,e=>e.gradientColorRamp.map(([e,o])=>e)));break;case 2:r.uniforms.add(new d("uColor",e=>s(P,e.thresholdColor)),new h("threshold",e=>e.threshold))}const{type:$,selector:M,thresholdStrengthSelector:z}=R?{type:"vec2",selector:"rg",thresholdStrengthSelector:"strength.x"}:{type:"float",selector:"r",thresholdStrengthSelector:"strength"},V=!a;return r.main.add(u`
14
14
  ${$} numSamples = texture(shadowCastMap, uv).${M} * inverseSampleValue;
15
15
 
16
16
  fragColor = vec4(0.0);
@@ -38,9 +38,7 @@ return vvColorColors[colorRampSize - 1];
38
38
  // bail out if we are below the threshold
39
39
  ${c(S,u`if (${z} == 0.0) { return; }`)}
40
40
 
41
- ${c(j,u`
42
- strength = ceil(strength / bandSize) * bandSize;
43
- `)}
41
+ ${c(j,"strength = ceil(strength / bandSize) * bandSize;")}
44
42
 
45
43
  ${$} attenuation = opacityFromElevation * strength;
46
44
 
@@ -48,9 +46,5 @@ return vvColorColors[colorRampSize - 1];
48
46
  vec4 thresholdColor = uColor * attenuation.r;
49
47
  vec4 gradientColor = evaluateColorRamp(attenuation.g);
50
48
  fragColor = blendColorsPremultiplied(${c(a,u`gradientColor, thresholdColor`,u`thresholdColor, gradientColor`)});
51
- `,c(S,u`
52
- fragColor = uColor * attenuation;
53
- `,u`
54
- fragColor = evaluateColorRamp(attenuation);
55
- `))}
49
+ `,u`fragColor = ${c(S,"uColor * attenuation","evaluateColorRamp(attenuation)")};`)}
56
50
  `),o}const P=a(),V=Object.freeze(Object.defineProperty({__proto__:null,ShadowCastVisualizePassParameters:S,build:z},Symbol.toStringTag,{value:"Module"}));export{S,V as a,z as b};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{toSymbolId as t}from"../arcade/arcadeEnvironment.js";import e from"../arcade/Dictionary.js";import{ArcadeExecutionError as r}from"../arcade/executionError.js";import{B as s,j as n,S as o}from"./languageUtils.js";import{getDefaultPortal as a}from"../arcade/portalUtils.js";import i from"../core/Error.js";import u from"../core/Logger.js";import{getOrCreateMapValue as l}from"../core/MapUtils.js";import{translate as c}from"../rest/translate.js";import{TranslateContent as h}from"../rest/support/TranslateContent.js";import{TranslateParameters as p}from"../rest/support/TranslateParameters.js";import{TranslateResult as f}from"../rest/support/TranslateResult.js";import{isString as m,isArray as _}from"../support/guards.js";class d{constructor(t,e){this.portal=t,this._debugLog=e}async translate(t){this.portal.loaded||await this.portal.load();const e=this.portal.helperServices?.aiUtilityServices;if(null==e)return{success:!1};const r=e.api?.text_translate;if(null==r)return{success:!1};const s=e.url+r;try{t.requestSource??="arcade";return{success:!0,results:(await c(s,t,{authMode:"no-prompt"})).map(t=>t.toJSON())}}catch(n){return null!=this._debugLog&&(n instanceof Error||n instanceof i)&&this._debugLog(`TranslateText error: ${n.message}`),u.getLogger("esri.arcade.functions.aiServices").error(n),{success:!1}}}}class g{constructor(t,e,r){this._parameters=t,this._maxTotalContentSize=e,this._maxContentsLength=r,this._requests=[],this._normalizedContents=new Map,this._contentsTotalSize=0}tryAdd(t){const e=new Set(t.filter(t=>!this._normalizedContents.has(t.text)).map(t=>t.text));if(this._requests.length+e.size>this._maxContentsLength)return null;let r=0;for(const n of e)r+=n.length;if((r+this._contentsTotalSize)*(this._parameters.outputCultures.length??1)>this._maxTotalContentSize)return null;const s=this._requests.length;for(const{key:n,text:o}of t)l(this._normalizedContents,o,()=>[]).push({batchIdx:s,key:n});return this._requests.push(t),this._contentsTotalSize+=r,s}async send(t){const e=[],r=[];let s=0;for(const[i,u]of this._normalizedContents)e.push(new h({key:String(s++),text:i})),r.push(u);const n=new p(this._parameters);n.input=e;const o=await t.translate(n);if(!o.success)return Array.from(this._requests,()=>o);const a=Array.from(this._requests,()=>({success:!0,results:[]}));for(const i of o.results){const t=Number(i.key);for(const e of r[t])a[e.batchIdx].results.push({...i,key:e.key})}return a}}function y(t){const e=[...new Set(t.outputCultures)].sort(),r=t.inputCulture??null,s=t.portalUrl,n=t.provider;return JSON.stringify([e,r,s,n])}async function w(t,e,r){try{return(await t.yieldFor(r))[e]}catch{return{success:!1}}}class x{constructor(t,e,{maxTotalContentSize:r=5e4,maxContentsLength:s=1e3}={}){this._executor=t,this._service=e,this._openBatches=new Map,this._maxTotalContentSize=r,this._maxContentsLength=s}create(t){return{translate:async e=>{const r=y(e),{input:s,outputCultures:n,inputCulture:o,provider:a,portalUrl:i}=e;if(null==n)return{success:!1};if(null==s||s.every(t=>0===t.text.length))return{success:!1};const u=this._openBatches.get(r);if(null!=u){const e=u.data.tryAdd(s);if(null!=e)return await w(t,e,u);u.send()}const l=new g({outputCultures:n,inputCulture:o,provider:a,portalUrl:i},this._maxTotalContentSize,this._maxContentsLength),c=l.tryAdd(s);if(null!=c){const e=this._executor.openBatch(l,{open:t=>{this._openBatches.set(r,t)},execute:t=>t.send(this._service),close:t=>{this._openBatches.get(r)===t&&this._openBatches.delete(r)}});return await w(t,c,e)}return await this._service.translate(e)}}}}function C(i){"async"===i.mode&&(i.functions[t("TranslateText")]=function(t,u){return i.standardFunctionAsync(t,u,async(t,i,u)=>{if(s(u,2,3,i),!m(u[0])&&!_(u[0])&&!n(u[0]))throw new r("InvalidParameter",i);const l=o(u[0]);if(!m(u[1])&&!_(u[1])&&!n(u[1]))throw new r("InvalidParameter",i);const c=o(u[1]);let g=null;if(u.length>=3){if(!m(u[2]))throw new r("InvalidParameter",i);g=u[2]}const w=l.map((t,e)=>new h({key:String(e),text:t})),x=a(t),C=new p({outputCultures:c,input:w,inputCulture:g,portalUrl:x.restUrl.replace(/\/sharing\/rest$/,"")}),S=new Map;let T;if(null!=t.lrucache){const e=t.lrucache;T??=y(C),C.input=C.input?.filter(t=>{const r=e.getCachedTranslation(T,t.text);return null==r||(S.set(t.key,{...r,key:t.key}),!1)})}if(C.input?.length){const s=t.services?.translation??new d(x,t.console),n=await s.translate(C);if(!n.success)return new e({__proto__:null,success:!1});for(const e of n.results){const s=C.input?.find(t=>t.key===e.key)?.text;if(null==s)throw new r("NeverReach",null);S.set(e.key,e),null!=t.lrucache&&(T??=y(C),t.lrucache.setCachedTranslation(T,s,{detectedLanguage:e.detectedLanguage,translations:e.translations}))}}const v=Array.from(w,t=>{const s=f.fromJSON(S.get(t.key));if(null==s)throw new r("NeverReach",null);const n=Object.create(null);for(const e of s.translations)n[e.to]=e.text;return new e({__proto__:null,key:s.key,text:t.text,detectedLanguage:new e({__proto__:null,language:s.detectedLanguage,score:s.detectedLanguageScore}),translation:new e(n)})});return new e({__proto__:null,success:!0,results:v})})})}const S=Object.freeze(Object.defineProperty({__proto__:null,BatchTranslationServiceFactory:x,PortalTranslationService:d,getTranslateParametersKey:y,registerFunctions:C},Symbol.toStringTag,{value:"Module"}));export{S as A,x as B,d as P,y as g,C as r};
2
+ import{toSymbolId as t}from"../arcade/arcadeEnvironment.js";import e from"../arcade/Dictionary.js";import{ArcadeExecutionError as r}from"../arcade/executionError.js";import{B as s,g as n,Q as o}from"./languageUtils.js";import{getDefaultPortal as a}from"../arcade/portalUtils.js";import i from"../core/Error.js";import u from"../core/Logger.js";import{getOrCreateMapValue as l}from"../core/MapUtils.js";import{translate as c}from"../rest/translate.js";import{TranslateContent as h}from"../rest/support/TranslateContent.js";import{TranslateParameters as p}from"../rest/support/TranslateParameters.js";import{TranslateResult as f}from"../rest/support/TranslateResult.js";import{isString as m,isArray as _}from"../support/guards.js";class d{constructor(t,e){this.portal=t,this._debugLog=e}async translate(t){this.portal.loaded||await this.portal.load();const e=this.portal.helperServices?.aiUtilityServices;if(null==e)return{success:!1};const r=e.api?.text_translate;if(null==r)return{success:!1};const s=e.url+r;try{t.requestSource??="arcade";return{success:!0,results:(await c(s,t,{authMode:"no-prompt"})).map(t=>t.toJSON())}}catch(n){return null!=this._debugLog&&(n instanceof Error||n instanceof i)&&this._debugLog(`TranslateText error: ${n.message}`),u.getLogger("esri.arcade.functions.aiServices").error(n),{success:!1}}}}class g{constructor(t,e,r){this._parameters=t,this._maxTotalContentSize=e,this._maxContentsLength=r,this._requests=[],this._normalizedContents=new Map,this._contentsTotalSize=0}tryAdd(t){const e=new Set(t.filter(t=>!this._normalizedContents.has(t.text)).map(t=>t.text));if(this._requests.length+e.size>this._maxContentsLength)return null;let r=0;for(const n of e)r+=n.length;if((r+this._contentsTotalSize)*(this._parameters.outputCultures.length??1)>this._maxTotalContentSize)return null;const s=this._requests.length;for(const{key:n,text:o}of t)l(this._normalizedContents,o,()=>[]).push({batchIdx:s,key:n});return this._requests.push(t),this._contentsTotalSize+=r,s}async send(t){const e=[],r=[];let s=0;for(const[i,u]of this._normalizedContents)e.push(new h({key:String(s++),text:i})),r.push(u);const n=new p(this._parameters);n.input=e;const o=await t.translate(n);if(!o.success)return Array.from(this._requests,()=>o);const a=Array.from(this._requests,()=>({success:!0,results:[]}));for(const i of o.results){const t=Number(i.key);for(const e of r[t])a[e.batchIdx].results.push({...i,key:e.key})}return a}}function y(t){const e=[...new Set(t.outputCultures)].sort(),r=t.inputCulture??null,s=t.portalUrl,n=t.provider;return JSON.stringify([e,r,s,n])}async function w(t,e,r){try{return(await t.yieldFor(r))[e]}catch{return{success:!1}}}class x{constructor(t,e,{maxTotalContentSize:r=5e4,maxContentsLength:s=1e3}={}){this._executor=t,this._service=e,this._openBatches=new Map,this._maxTotalContentSize=r,this._maxContentsLength=s}create(t){return{translate:async e=>{const r=y(e),{input:s,outputCultures:n,inputCulture:o,provider:a,portalUrl:i}=e;if(null==n)return{success:!1};if(null==s||s.every(t=>0===t.text.length))return{success:!1};const u=this._openBatches.get(r);if(null!=u){const e=u.data.tryAdd(s);if(null!=e)return await w(t,e,u);u.send()}const l=new g({outputCultures:n,inputCulture:o,provider:a,portalUrl:i},this._maxTotalContentSize,this._maxContentsLength),c=l.tryAdd(s);if(null!=c){const e=this._executor.openBatch(l,{open:t=>{this._openBatches.set(r,t)},execute:t=>t.send(this._service),close:t=>{this._openBatches.get(r)===t&&this._openBatches.delete(r)}});return await w(t,c,e)}return await this._service.translate(e)}}}}function C(i){"async"===i.mode&&(i.functions[t("TranslateText")]=function(t,u){return i.standardFunctionAsync(t,u,async(t,i,u)=>{if(s(u,2,3,i),!m(u[0])&&!_(u[0])&&!n(u[0]))throw new r("InvalidParameter",i);const l=o(u[0]);if(!m(u[1])&&!_(u[1])&&!n(u[1]))throw new r("InvalidParameter",i);const c=o(u[1]);let g=null;if(u.length>=3){if(!m(u[2]))throw new r("InvalidParameter",i);g=u[2]}const w=l.map((t,e)=>new h({key:String(e),text:t})),x=a(t),C=new p({outputCultures:c,input:w,inputCulture:g,portalUrl:x.restUrl.replace(/\/sharing\/rest$/,"")}),S=new Map;let T;if(null!=t.lrucache){const e=t.lrucache;T??=y(C),C.input=C.input?.filter(t=>{const r=e.getCachedTranslation(T,t.text);return null==r||(S.set(t.key,{...r,key:t.key}),!1)})}if(C.input?.length){const s=t.services?.translation??new d(x,t.console),n=await s.translate(C);if(!n.success)return new e({__proto__:null,success:!1});for(const e of n.results){const s=C.input?.find(t=>t.key===e.key)?.text;if(null==s)throw new r("NeverReach",null);S.set(e.key,e),null!=t.lrucache&&(T??=y(C),t.lrucache.setCachedTranslation(T,s,{detectedLanguage:e.detectedLanguage,translations:e.translations}))}}const v=Array.from(w,t=>{const s=f.fromJSON(S.get(t.key));if(null==s)throw new r("NeverReach",null);const n=Object.create(null);for(const e of s.translations)n[e.to]=e.text;return new e({__proto__:null,key:s.key,text:t.text,detectedLanguage:new e({__proto__:null,language:s.detectedLanguage,score:s.detectedLanguageScore}),translation:new e(n)})});return new e({__proto__:null,success:!0,results:v})})})}const S=Object.freeze(Object.defineProperty({__proto__:null,BatchTranslationServiceFactory:x,PortalTranslationService:d,getTranslateParametersKey:y,registerFunctions:C},Symbol.toStringTag,{value:"Module"}));export{S as A,x as B,d as P,y as g,C as r};
package/chunks/array.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{deepClone as n}from"../arcade/deepClone.js";import{ArcadeExecutionError as t}from"../arcade/executionError.js";import r from"../arcade/ImmutableArray.js";import{B as e,O as o,j as i,r as u,v as a,n as c,s,w as l,i as f,q as d,T as h}from"./languageUtils.js";import{isPromiseLike as w}from"../core/promiseUtils.js";import{isArray as g,isBoolean as m,isInteger as F}from"../support/guards.js";function v(v){function p(n,e){if(n instanceof r)return n.toArray();if(g(n))return n;throw new t("InvalidParameter",e)}function y(n){const t=u(n);return Number.isNaN(t)||t<=0}function P(n,t){const r=n.length;if(r<=1)return n.slice();const e=Math.floor(r/2);return I(P(n.slice(0,e),t),P(n.slice(e,r),t),t)}function I(n,t,r){const e=[];for(;n.length>0||t.length>0;)n.length>0&&t.length>0?y(r(n[0],t[0]))?(e.push(n[0]),n=n.slice(1)):(e.push(t[0]),t=t.slice(1)):n.length>0?(e.push(n[0]),n=n.slice(1)):t.length>0&&(e.push(t[0]),t=t.slice(1));return e}async function N(n,t){const r=n.length;if(r<=1)return n.slice();const e=Math.floor(r/2);return O(await N(n.slice(0,e),t),await N(n.slice(e,r),t),t)}async function O(n,t,r){const e=[];for(;n.length>0||t.length>0;)n.length>0&&t.length>0?y(await r(n[0],t[0]))?(e.push(n[0]),n=n.slice(1)):(e.push(t[0]),t=t.slice(1)):n.length>0?(e.push(n[0]),n=n.slice(1)):t.length>0&&(e.push(t[0]),t=t.slice(1));return e}function A(n){if(n.length<=1)return n.slice();let t;for(t=0;t<n.length;t++){const r=n[t];if(null!=r&&!d(r))break}if(t>=n.length)return n.slice();let r=0!==t;const e=h(n[t]);let o=!0;for(t+=1;t<n.length;t++){const i=h(n[t]);if(""!==i){switch(i!==e&&(o=!1),i){case"String":case"Number":case"Boolean":case"Date":case"DateOnly":case"Time":continue}return n.slice()}r=!0}let i=function(n,t){const r=s(n),e=s(t);return r<e?-1:r===e?0:1};if(o&&("String"===e?i=function(n,t){return n<t?-1:n===t?0:1}:"Number"===e?i=function(n,t){return n<t?-1:n>t?1:Object.is(n,t)?0:Number.isNaN(n)?1:Number.isNaN(t)||Object.is(n,-0)?-1:1}:"Boolean"===e?i=function(n,t){return n===t?0:t?-1:1}:"Date"===e&&(i=function(n,t){return n.toNumber()-t.toNumber()})),r){const n=i;i=function(t,r){return null==t||d(t)?null==r||d(r)?0:1:null==r||d(r)?-1:n(t,r)}}return n.toSorted(i)}v.functions.array=function(r,a){return v.standardFunction(r,a,(r,c,s)=>{if(e(s,0,2,a),0===s.length)return[];if(1===s.length&&null===s[0])return[];if(g(s[0])){if(2===s.length&&!1===m(s[1]))throw new t("InvalidParameter",a);return!0===o(s[1],!1)?n(s[0]):s[0].slice()}if(i(s[0])){if(2===s.length&&!1===m(s[1]))throw new t("InvalidParameter",a);return!0===o(s[1],!1)?n(s[0]):s[0].toArray().slice()}const l=u(s[0]);if(isNaN(l)||!1===F(l))throw new t("InvalidParameter",a);const f=o(s[1],null),d=new Array(l);return d.fill(f),d})},v.functions.front=function(n,r){return v.standardFunction(n,r,(n,o,u)=>{if(e(u,1,1,r),i(u[0])){if(u[0].length()<=0)throw new t("OutOfBounds",r);return u[0].get(0)}if(g(u[0])){if(u[0].length<=0)throw new t("OutOfBounds",r);return u[0][0]}throw new t("InvalidParameter",r)})},v.functions.back=function(n,r){return v.standardFunction(n,r,(n,o,u)=>{if(e(u,1,1,r),i(u[0])){if(u[0].length()<=0)throw new t("OutOfBounds",r);return u[0].get(u[0].length()-1)}if(g(u[0])){if(u[0].length<=0)throw new t("OutOfBounds",r);return u[0][u[0].length-1]}throw new t("InvalidParameter",r)})},v.functions.push=function(n,r){return v.standardFunction(n,r,(n,o,i)=>{if(e(i,1,2,r),g(i[0]))return i[0][i[0].length]=i[1],i[0].length;throw new t("InvalidParameter",r)})},v.functions.pop=function(n,r){return v.standardFunction(n,r,(n,o,i)=>{if(e(i,1,1,r),g(i[0])){if(i[0].length<=0)throw new t("OutOfBounds",r);const n=i[0][i[0].length-1];return i[0].length=i[0].length-1,n}throw new t("InvalidParameter",r)})},v.functions.erase=function(n,r){return v.standardFunction(n,r,(n,o,i)=>{if(e(i,2,2,r),g(i[0])){let n=u(i[1]);if(isNaN(n)||!1===F(n))throw new t("InvalidParameter",r);const e=i[0];if(e.length<=0)throw new t("OutOfBounds",r);if(n<0&&(n=e.length+n),n<0)throw new t("OutOfBounds",r);if(n>=e.length)throw new t("OutOfBounds",r);return e.splice(n,1),a}if(c(i[0]))return i[0].eraseField(s(i[1])),a;throw new t("InvalidParameter",r)})},v.functions.insert=function(n,r){return v.standardFunction(n,r,(n,o,i)=>{if(e(i,3,3,r),g(i[0])){const n=u(i[1]);if(isNaN(n)||!1===F(n))throw new t("InvalidParameter",r);const e=i[2],o=i[0];if(n>o.length)throw new t("OutOfBounds",r);if(n<0&&n<-1*o.length)throw new t("OutOfBounds",r);return n===o.length?(o[n]=e,a):(o.splice(n,0,e),a)}if(c(i[0]))return i[0].setField(s(i[1]),i[2]),a;throw new t("InvalidParameter",r)})},v.functions.getkeys=function(n,r){return v.standardFunction(n,r,(n,r,o)=>{if(e(o,1,1,r),null==o[0])return[];if(c(o[0]))return o[0].keys();throw new t("InvalidParameter",r)})},v.functions.getvalues=function(n,r){return v.standardFunction(n,r,(n,r,o)=>{if(e(o,1,1,r),null==o[0])return[];if(c(o[0]))return o[0].values();throw new t("InvalidParameter",r)})},v.functions.resize=function(n,r){return v.standardFunction(n,r,(n,i,c)=>{if(e(c,2,3,r),g(c[0])){const n=u(c[1]);if(isNaN(n)||!1===F(n))throw new t("InvalidParameter",r);if(n<0)throw new t("InvalidParameter",r);const e=o(c[2],null),i=c[0];if(i.length>=n)return i.length=n,a;const s=i.length;i.length=n;for(let t=s;t<i.length;t++)i[t]=e;return a}throw new t("InvalidParameter",r)})},v.functions.includes=function(n,r){return v.standardFunction(n,r,(n,o,u)=>{if(e(u,2,2,r),g(u[0])){const n=u[1];return!!u[0].some(t=>l(t,n))}if(i(u[0])){const n=u[1];return!!u[0].toArray().some(t=>l(t,n))}throw new t("InvalidParameter",r)})},v.functions.slice=function(n,r){return v.standardFunction(n,r,(n,a,c)=>{if(e(c,1,3,r),g(c[0])){const n=u(o(c[1],0)),e=u(o(c[2],c[0].length));if(isNaN(n)||!1===F(n))throw new t("InvalidParameter",r);if(isNaN(e)||!1===F(e))throw new t("InvalidParameter",r);return c[0].slice(n,e)}if(i(c[0])){const n=c[0],e=u(o(c[1],0)),i=u(o(c[2],n.length()));if(isNaN(e)||!1===F(e))throw new t("InvalidParameter",r);if(isNaN(i)||!1===F(i))throw new t("InvalidParameter",r);return n.toArray().slice(e,i)}throw new t("InvalidParameter",r)})},v.functions.splice=function(n,t){return v.standardFunction(n,t,(n,t,r)=>{const e=[];for(let o=0;o<r.length;o++)g(r[o])?e.push(...r[o]):i(r[o])?e.push(...r[o].toArray()):e.push(r[o]);return e})},v.functions.top=function(n,r){return v.standardFunction(n,r,(n,o,a)=>{if(e(a,2,2,r),g(a[0]))return u(a[1])>=a[0].length?a[0].slice():a[0].slice(0,u(a[1]));if(i(a[0]))return u(a[1])>=a[0].length()?a[0].slice():a[0].slice(0,u(a[1]));throw new t("InvalidParameter",r)})},v.functions.first=function(n,t){return v.standardFunction(n,t,(n,r,o)=>(e(o,1,1,t),g(o[0])?0===o[0].length?null:o[0][0]:i(o[0])?0===o[0].length()?null:o[0].get(0):null))},"sync"===v.mode&&(v.functions.sort=function(n,r){return v.standardFunction(n,r,(r,o,u)=>{let a;if(e(u,1,2,o),g(u[0]))a=u[0];else{if(!i(u[0]))throw new t("InvalidParameter",o);a=u[0].toArray()}if(u.length>1){if(!f(u[1]))throw new t("InvalidParameter",o);return P(a,u[1].createFunction(n))}return A(a)})},v.functions.any=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){const t=i(n);if(m(t)&&!0===t)return!0}return!1})},v.functions.all=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){if(!0!==i(n))return!1}return!0})},v.functions.none=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){if(!0===i(n))return!1}return!0})},v.functions.reduce=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,3,r);const i=o[1].createFunction(n),u=p(o[0],r);return 2===o.length?0===u.length?null:u.reduce((n,t)=>{const r=i(n,t);return n=void 0!==r&&r!==a?r:null}):u.reduce((n,t)=>{const r=i(n,t);return n=void 0!==r&&r!==a?r:null},o[2])})},v.functions.map=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r),c=[];for(const n of u){const t=i(n);void 0!==t&&t!==a?c.push(t):c.push(null)}return c})},v.functions.filter=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r),a=[];for(const n of u){!0===i(n)&&a.push(n)}return a})}),"async"===v.mode&&(v.functions.sort=function(n,r){return v.standardFunctionAsync(n,r,async(r,o,u)=>{let a;if(e(u,1,2,o),g(u[0]))a=u[0];else{if(!i(u[0]))throw new t("InvalidParameter",o);a=u[0].toArray()}if(u.length>1){if(!f(u[1]))throw new t("InvalidParameter",o);return N(a,u[1].createFunction(n))}return A(a)})},v.functions.any=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){const t=await i(n);let r=null;if(r=w(r)?await t:t,m(r)&&!0===r)return!0}return!1})},v.functions.all=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){const t=await i(n);let r=null;if(r=w(r)?await t:t,!0!==r)return!1}return!0})},v.functions.none=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){const t=await i(n);let r=null;if(r=w(r)?await t:t,!0===r)return!1}return!0})},v.functions.filter=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r),a=[];for(const n of u){const t=await i(n);let r=null;r=w(r)?await t:t,!0===r&&a.push(n)}return a})},v.functions.reduce=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,i)=>{e(i,2,3,r);const u=i[1].createFunction(n),c=p(i[0],r);let s;if(i.length>2){const n=o(i[2],null);s=c.reduce(async(n,t)=>{let r=await n;return void 0!==r&&r!==a||(r=null),u(r,t)},Promise.resolve(n))}else{if(0===c.length)return null;s=c.reduce(async(n,t,r)=>{if(r<=1)return u(n,t);let e=await n;return void 0!==e&&e!==a||(e=null),u(e,t)})}return s.then(n=>void 0!==n&&n!==a?n:null)})},v.functions.map=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r),c=[];for(const n of u){const t=await i(n);let r=null;r=w(r)?await t:t,void 0!==r&&r!==a?c.push(r):c.push(null)}return c})})}const p=Object.freeze(Object.defineProperty({__proto__:null,registerFunctions:v},Symbol.toStringTag,{value:"Module"}));export{p as A,v as r};
2
+ import{deepClone as n}from"../arcade/deepClone.js";import{ArcadeExecutionError as t}from"../arcade/executionError.js";import r from"../arcade/ImmutableArray.js";import{B as e,O as o,g as i,r as u,v as a,l as c,s,w as l,i as f,q as d,S as h}from"./languageUtils.js";import{isPromiseLike as w}from"../core/promiseUtils.js";import{isArray as g,isBoolean as m,isInteger as F}from"../support/guards.js";function v(v){function p(n,e){if(n instanceof r)return n.toArray();if(g(n))return n;throw new t("InvalidParameter",e)}function y(n){const t=u(n);return Number.isNaN(t)||t<=0}function P(n,t){const r=n.length;if(r<=1)return n.slice();const e=Math.floor(r/2);return I(P(n.slice(0,e),t),P(n.slice(e,r),t),t)}function I(n,t,r){const e=[];for(;n.length>0||t.length>0;)n.length>0&&t.length>0?y(r(n[0],t[0]))?(e.push(n[0]),n=n.slice(1)):(e.push(t[0]),t=t.slice(1)):n.length>0?(e.push(n[0]),n=n.slice(1)):t.length>0&&(e.push(t[0]),t=t.slice(1));return e}async function N(n,t){const r=n.length;if(r<=1)return n.slice();const e=Math.floor(r/2);return O(await N(n.slice(0,e),t),await N(n.slice(e,r),t),t)}async function O(n,t,r){const e=[];for(;n.length>0||t.length>0;)n.length>0&&t.length>0?y(await r(n[0],t[0]))?(e.push(n[0]),n=n.slice(1)):(e.push(t[0]),t=t.slice(1)):n.length>0?(e.push(n[0]),n=n.slice(1)):t.length>0&&(e.push(t[0]),t=t.slice(1));return e}function A(n){if(n.length<=1)return n.slice();let t;for(t=0;t<n.length;t++){const r=n[t];if(null!=r&&!d(r))break}if(t>=n.length)return n.slice();let r=0!==t;const e=h(n[t]);let o=!0;for(t+=1;t<n.length;t++){const i=h(n[t]);if(""!==i){switch(i!==e&&(o=!1),i){case"String":case"Number":case"Boolean":case"Date":case"DateOnly":case"Time":continue}return n.slice()}r=!0}let i=function(n,t){const r=s(n),e=s(t);return r<e?-1:r===e?0:1};if(o&&("String"===e?i=function(n,t){return n<t?-1:n===t?0:1}:"Number"===e?i=function(n,t){return n<t?-1:n>t?1:Object.is(n,t)?0:Number.isNaN(n)?1:Number.isNaN(t)||Object.is(n,-0)?-1:1}:"Boolean"===e?i=function(n,t){return n===t?0:t?-1:1}:"Date"===e&&(i=function(n,t){return n.toNumber()-t.toNumber()})),r){const n=i;i=function(t,r){return null==t||d(t)?null==r||d(r)?0:1:null==r||d(r)?-1:n(t,r)}}return n.toSorted(i)}v.functions.array=function(r,a){return v.standardFunction(r,a,(r,c,s)=>{if(e(s,0,2,a),0===s.length)return[];if(1===s.length&&null===s[0])return[];if(g(s[0])){if(2===s.length&&!1===m(s[1]))throw new t("InvalidParameter",a);return!0===o(s[1],!1)?n(s[0]):s[0].slice()}if(i(s[0])){if(2===s.length&&!1===m(s[1]))throw new t("InvalidParameter",a);return!0===o(s[1],!1)?n(s[0]):s[0].toArray().slice()}const l=u(s[0]);if(isNaN(l)||!1===F(l))throw new t("InvalidParameter",a);const f=o(s[1],null),d=new Array(l);return d.fill(f),d})},v.functions.front=function(n,r){return v.standardFunction(n,r,(n,o,u)=>{if(e(u,1,1,r),i(u[0])){if(u[0].length()<=0)throw new t("OutOfBounds",r);return u[0].get(0)}if(g(u[0])){if(u[0].length<=0)throw new t("OutOfBounds",r);return u[0][0]}throw new t("InvalidParameter",r)})},v.functions.back=function(n,r){return v.standardFunction(n,r,(n,o,u)=>{if(e(u,1,1,r),i(u[0])){if(u[0].length()<=0)throw new t("OutOfBounds",r);return u[0].get(u[0].length()-1)}if(g(u[0])){if(u[0].length<=0)throw new t("OutOfBounds",r);return u[0][u[0].length-1]}throw new t("InvalidParameter",r)})},v.functions.push=function(n,r){return v.standardFunction(n,r,(n,o,i)=>{if(e(i,1,2,r),g(i[0]))return i[0][i[0].length]=i[1],i[0].length;throw new t("InvalidParameter",r)})},v.functions.pop=function(n,r){return v.standardFunction(n,r,(n,o,i)=>{if(e(i,1,1,r),g(i[0])){if(i[0].length<=0)throw new t("OutOfBounds",r);const n=i[0][i[0].length-1];return i[0].length=i[0].length-1,n}throw new t("InvalidParameter",r)})},v.functions.erase=function(n,r){return v.standardFunction(n,r,(n,o,i)=>{if(e(i,2,2,r),g(i[0])){let n=u(i[1]);if(isNaN(n)||!1===F(n))throw new t("InvalidParameter",r);const e=i[0];if(e.length<=0)throw new t("OutOfBounds",r);if(n<0&&(n=e.length+n),n<0)throw new t("OutOfBounds",r);if(n>=e.length)throw new t("OutOfBounds",r);return e.splice(n,1),a}if(c(i[0]))return i[0].eraseField(s(i[1])),a;throw new t("InvalidParameter",r)})},v.functions.insert=function(n,r){return v.standardFunction(n,r,(n,o,i)=>{if(e(i,3,3,r),g(i[0])){const n=u(i[1]);if(isNaN(n)||!1===F(n))throw new t("InvalidParameter",r);const e=i[2],o=i[0];if(n>o.length)throw new t("OutOfBounds",r);if(n<0&&n<-1*o.length)throw new t("OutOfBounds",r);return n===o.length?(o[n]=e,a):(o.splice(n,0,e),a)}if(c(i[0]))return i[0].setField(s(i[1]),i[2]),a;throw new t("InvalidParameter",r)})},v.functions.getkeys=function(n,r){return v.standardFunction(n,r,(n,r,o)=>{if(e(o,1,1,r),null==o[0])return[];if(c(o[0]))return o[0].keys();throw new t("InvalidParameter",r)})},v.functions.getvalues=function(n,r){return v.standardFunction(n,r,(n,r,o)=>{if(e(o,1,1,r),null==o[0])return[];if(c(o[0]))return o[0].values();throw new t("InvalidParameter",r)})},v.functions.resize=function(n,r){return v.standardFunction(n,r,(n,i,c)=>{if(e(c,2,3,r),g(c[0])){const n=u(c[1]);if(isNaN(n)||!1===F(n))throw new t("InvalidParameter",r);if(n<0)throw new t("InvalidParameter",r);const e=o(c[2],null),i=c[0];if(i.length>=n)return i.length=n,a;const s=i.length;i.length=n;for(let t=s;t<i.length;t++)i[t]=e;return a}throw new t("InvalidParameter",r)})},v.functions.includes=function(n,r){return v.standardFunction(n,r,(n,o,u)=>{if(e(u,2,2,r),g(u[0])){const n=u[1];return!!u[0].some(t=>l(t,n))}if(i(u[0])){const n=u[1];return!!u[0].toArray().some(t=>l(t,n))}throw new t("InvalidParameter",r)})},v.functions.slice=function(n,r){return v.standardFunction(n,r,(n,a,c)=>{if(e(c,1,3,r),g(c[0])){const n=u(o(c[1],0)),e=u(o(c[2],c[0].length));if(isNaN(n)||!1===F(n))throw new t("InvalidParameter",r);if(isNaN(e)||!1===F(e))throw new t("InvalidParameter",r);return c[0].slice(n,e)}if(i(c[0])){const n=c[0],e=u(o(c[1],0)),i=u(o(c[2],n.length()));if(isNaN(e)||!1===F(e))throw new t("InvalidParameter",r);if(isNaN(i)||!1===F(i))throw new t("InvalidParameter",r);return n.toArray().slice(e,i)}throw new t("InvalidParameter",r)})},v.functions.splice=function(n,t){return v.standardFunction(n,t,(n,t,r)=>{const e=[];for(let o=0;o<r.length;o++)g(r[o])?e.push(...r[o]):i(r[o])?e.push(...r[o].toArray()):e.push(r[o]);return e})},v.functions.top=function(n,r){return v.standardFunction(n,r,(n,o,a)=>{if(e(a,2,2,r),g(a[0]))return u(a[1])>=a[0].length?a[0].slice():a[0].slice(0,u(a[1]));if(i(a[0]))return u(a[1])>=a[0].length()?a[0].slice():a[0].slice(0,u(a[1]));throw new t("InvalidParameter",r)})},v.functions.first=function(n,t){return v.standardFunction(n,t,(n,r,o)=>(e(o,1,1,t),g(o[0])?0===o[0].length?null:o[0][0]:i(o[0])?0===o[0].length()?null:o[0].get(0):null))},"sync"===v.mode&&(v.functions.sort=function(n,r){return v.standardFunction(n,r,(r,o,u)=>{let a;if(e(u,1,2,o),g(u[0]))a=u[0];else{if(!i(u[0]))throw new t("InvalidParameter",o);a=u[0].toArray()}if(u.length>1){if(!f(u[1]))throw new t("InvalidParameter",o);return P(a,u[1].createFunction(n))}return A(a)})},v.functions.any=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){const t=i(n);if(m(t)&&!0===t)return!0}return!1})},v.functions.all=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){if(!0!==i(n))return!1}return!0})},v.functions.none=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){if(!0===i(n))return!1}return!0})},v.functions.reduce=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,3,r);const i=o[1].createFunction(n),u=p(o[0],r);return 2===o.length?0===u.length?null:u.reduce((n,t)=>{const r=i(n,t);return n=void 0!==r&&r!==a?r:null}):u.reduce((n,t)=>{const r=i(n,t);return n=void 0!==r&&r!==a?r:null},o[2])})},v.functions.map=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r),c=[];for(const n of u){const t=i(n);void 0!==t&&t!==a?c.push(t):c.push(null)}return c})},v.functions.filter=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r),a=[];for(const n of u){!0===i(n)&&a.push(n)}return a})}),"async"===v.mode&&(v.functions.sort=function(n,r){return v.standardFunctionAsync(n,r,async(r,o,u)=>{let a;if(e(u,1,2,o),g(u[0]))a=u[0];else{if(!i(u[0]))throw new t("InvalidParameter",o);a=u[0].toArray()}if(u.length>1){if(!f(u[1]))throw new t("InvalidParameter",o);return N(a,u[1].createFunction(n))}return A(a)})},v.functions.any=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){const t=await i(n);let r=null;if(r=w(r)?await t:t,m(r)&&!0===r)return!0}return!1})},v.functions.all=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){const t=await i(n);let r=null;if(r=w(r)?await t:t,!0!==r)return!1}return!0})},v.functions.none=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){const t=await i(n);let r=null;if(r=w(r)?await t:t,!0===r)return!1}return!0})},v.functions.filter=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r),a=[];for(const n of u){const t=await i(n);let r=null;r=w(r)?await t:t,!0===r&&a.push(n)}return a})},v.functions.reduce=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,i)=>{e(i,2,3,r);const u=i[1].createFunction(n),c=p(i[0],r);let s;if(i.length>2){const n=o(i[2],null);s=c.reduce(async(n,t)=>{let r=await n;return void 0!==r&&r!==a||(r=null),u(r,t)},Promise.resolve(n))}else{if(0===c.length)return null;s=c.reduce(async(n,t,r)=>{if(r<=1)return u(n,t);let e=await n;return void 0!==e&&e!==a||(e=null),u(e,t)})}return s.then(n=>void 0!==n&&n!==a?n:null)})},v.functions.map=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r),c=[];for(const n of u){const t=await i(n);let r=null;r=w(r)?await t:t,void 0!==r&&r!==a?c.push(r):c.push(null)}return c})})}const p=Object.freeze(Object.defineProperty({__proto__:null,registerFunctions:v},Symbol.toStringTag,{value:"Module"}));export{p as A,v as r};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{ArcadeDate as e,createDateTimeZone as t}from"../arcade/ArcadeDate.js";import{ArcadeModule as r}from"../arcade/ArcadeModule.js";import{ArcadeExecutionError as n}from"../arcade/executionError.js";import{ArcadeFunction as i}from"../arcade/FunctionWrapper.js";import a from"../arcade/ImmutableArray.js";import o from"../arcade/ImmutablePathArray.js";import s from"../arcade/ImmutablePointArray.js";import{esriFieldToJson as u,layerGeometryEsriRestConstants as l}from"../arcade/featureset/support/shared.js";import{format as f,parse as c}from"../core/number.js";import{DateOnly as m}from"../core/sql/DateOnly.js";import{TimeOnly as d}from"../core/sql/TimeOnly.js";import y from"../geometry/Extent.js";import p from"../geometry/Geometry.js";import g from"../geometry/Multipoint.js";import h from"../geometry/Point.js";import b from"../geometry/Polygon.js";import N from"../geometry/Polyline.js";import{isClockwise as S}from"../geometry/support/coordsUtils.js";import{fromJSON as Z}from"../geometry/support/jsonUtils.js";import{getLocale as T}from"../intl/locale.js";import{isBoolean as A,isNumber as D,isString as k,isDate as C,isArray as O,isInteger as x}from"../support/guards.js";import{DateTime as j}from"luxon";import{isGraphic as F}from"../support/graphicInstanceUtils.js";class w{constructor(e){this.value=e}}class J{constructor(e){this.value=e}}const M={type:"VOID"},R=Symbol("BREAK"),P=Symbol("CONTINUE");function I(e,t,r){return""===t||null==t||t===r||t===r?e:e=e.split(t).join(r)}function _(e){return e instanceof i}function v(e){return e instanceof r}function Y(e){return!!k(e)||(!!D(e)||(!!te(e)||(!!re(e)||(!!ne(e)||(!!A(e)||(null===e||e===M))))))}function L(e,t){return void 0===e?t:e}function G(e){return null==e?"":O(e)||ee(e)?"Array":te(e)?"Date":ne(e)?"Time":re(e)?"DateOnly":k(e)?"String":A(e)?"Boolean":D(e)?"Number":"esri.arcade.Attachment"===e?.declaredClass?"Attachment":"esri.arcade.Portal"===e?.declaredClass?"Portal":"esri.arcade.Dictionary"===e?.declaredClass?"Dictionary":X(e)?"KnowledgeGraph":e instanceof r?"Module":q(e)?"Feature":e instanceof h?"Point":e instanceof b?"Polygon":e instanceof N?"Polyline":e instanceof g?"Multipoint":e instanceof y?"Extent":_(e)?"Function":H(e)?"FeatureSet":Q(e)?"FeatureSetCollection":E(e)?"Voxel":U(e)?"Pixel":e===M?"":"number"==typeof e&&isNaN(e)?"Number":"Unrecognized Type"}function V(e){return e===M}function z(e){return e instanceof p}function q(e){return"esri.arcade.Feature"===e?.arcadeDeclaredClass}function E(e){return"esri.arcade.Voxel"===e?.arcadeDeclaredClass}function U(e){return"esri.arcade.Pixel"===e?.arcadeDeclaredClass}function H(e){return"esri.arcade.featureset.support.FeatureSet"===e?.declaredRootClass}function W(e){return"esri.arcade.Dictionary"===e?.declaredClass}function $(e){return"esri.arcade.Portal"===e?.declaredClass}function B(e){return"esri.arcade.Attachment"===e?.declaredClass}function K(e){return W(e)||q(e)||E(e)||U(e)}function Q(e){return"esri.arcade.featureSetCollection"===e?.declaredRootClass}function X(e){return"esri.rest.knowledgeGraph.KnowledgeGraph"===e?.declaredClass}function ee(e){return e instanceof a}function te(t){return t instanceof e}function re(e){return e instanceof m}function ne(e){return e instanceof d}function ie(e){return null!=e&&"object"==typeof e}function ae(e,t,r,i){if(e.length<t||e.length>r)throw new n("WrongNumberOfParameters",i)}function oe(e){return null==e||V(e)||""===e}function se(e){return e<0?-Math.round(-e):Math.round(e)}function ue(e,t){return isNaN(e)||null==t||""===t?e.toString():(t=I(t,"‰",""),t=I(t,"¤",""),f(e,{pattern:t}))}function le(e,t){return null==t||""===t?e.toISOString(!0):e.toFormat(fe(t),{locale:T(),numberingSystem:"latn"})}function fe(e,t=!1){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let r="";const n=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|Z{1,5}|.)/g;for(const i of e.match(n)||[])switch(i){case"D":r+="d";break;case"DD":r+="dd";break;case"DDD":r+="o";break;case"d":r+="c";break;case"ddd":r+="ccc";break;case"dddd":r+="cccc";break;case"M":r+="L";break;case"MM":r+="LL";break;case"MMM":r+="LLL";break;case"MMMM":r+="LLLL";break;case"YY":r+="yy";break;case"Y":case"YYYY":r+="yyyy";break;case"Q":r+="q";break;case"Z":r+="Z";break;case"ZZ":r+="ZZ";break;case"ZZZ":r+="ZZZ";break;case"ZZZZ":r+=t?"[ZZZZ]":"ZZZZ";break;case"ZZZZZ":r+=t?"[ZZZZZ]":"ZZZZZ";break;case"S":r+="'S'";break;case"SS":r+="'SS'";break;case"SSS":r+="u";break;case"A":case"a":r+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":r+=i;break;default:i.length>=2&&i.startsWith("[")&&i.endsWith("]")?r+=`'${i.slice(1,-1)}'`:r+=`'${i}'`}return r}function ce(e,t,r){switch(r){case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}return!1}function me(t,r,i){if(null===t){if(null===r||r===M)return ce(null,null,i);if(D(r))return ce(0,r,i);if(k(r))return ce(0,Ne(r),i);if(A(r))return ce(0,Ne(r),i);if(te(r))return ce(0,r.toNumber(),i);if(ne(r))return ce(t,r.toNumber(),i);if(re(r))return ce(t,r.toNumber(),i)}if(t===M){if(null===r||r===M)return ce(null,null,i);if(D(r))return ce(0,r,i);if(k(r))return ce(0,Ne(r),i);if(A(r))return ce(0,Ne(r),i);if(te(r))return ce(0,r.toNumber(),i);if(ne(r))return ce(t,r.toNumber(),i);if(re(r))return ce(t,r.toNumber(),i)}else if(D(t)){if(D(r))return ce(t,r,i);if(A(r))return ce(t,Ne(r),i);if(null===r||r===M)return ce(t,0,i);if(k(r))return ce(t,Ne(r),i);if(te(r))return ce(t,r.toNumber(),i);if(ne(r))return ce(t,r.toNumber(),i);if(re(r))return ce(t,r.toNumber(),i)}else if(k(t)){if(k(r))return ce(pe(t),pe(r),i);if(te(r))return ce(Ne(t),r.toNumber(),i);if(ne(r))return ce(Ne(t),r.toNumber(),i);if(re(r))return ce(Ne(t),r.toNumber(),i);if(D(r))return ce(Ne(t),r,i);if(null===r||r===M)return ce(Ne(t),0,i);if(A(r))return ce(Ne(t),Ne(r),i)}else if(te(t)){if(te(r))return t.timeZone!==r.timeZone&&(t.isUnknownTimeZone?t=e.arcadeDateAndZoneToArcadeDate(t,r.timeZone):r.isUnknownTimeZone&&(r=e.arcadeDateAndZoneToArcadeDate(r,t.timeZone))),ce(t.toNumber(),r.toNumber(),i);if(null===r||r===M)return ce(t.toNumber(),0,i);if(D(r))return ce(t.toNumber(),r,i);if(A(r))return ce(t.toNumber(),Ne(r),i);if(k(r))return ce(t.toNumber(),Ne(r),i);if(ne(r))throw new n("CannotCompareDateAndTime",null);if(re(r))return ce(t.toNumber(),r.toNumber(),i)}else if(A(t)){if(A(r))return ce(t,r,i);if(D(r))return ce(Ne(t),Ne(r),i);if(te(r))return ce(Ne(t),r.toNumber(),i);if(ne(r))return ce(Ne(t),r.toNumber(),i);if(re(r))return ce(Ne(t),r.toNumber(),i);if(null===r||r===M)return ce(Ne(t),0,i);if(k(r))return ce(Ne(t),Ne(r),i)}else if(re(t)){if(te(r))return ce(t.toNumber(),r.toNumber(),i);if(null===r||r===M)return ce(t.toNumber(),0,i);if(D(r))return ce(t.toNumber(),r,i);if(A(r))return ce(t.toNumber(),Ne(r),i);if(k(r))return ce(t.toNumber(),Ne(r),i);if(ne(r))throw new n("CannotCompareDateAndTime",null);if(re(r))return ce(t.toNumber(),r.toNumber(),i)}else if(ne(t)){if(te(r))throw new n("CannotCompareDateAndTime",null);if(null===r||r===M)return ce(t.toNumber(),0,i);if(D(r))return ce(t.toNumber(),r,i);if(A(r))return ce(t.toNumber(),Ne(r),i);if(k(r))return ce(t.toNumber(),Ne(r),i);if(ne(r))return ce(t.toNumber(),r.toNumber(),i);if(re(r))throw new n("CannotCompareDateAndTime",null)}return!!de(t,r)&&("<="===i||">="===i)}function de(e,t){if(e===t)return!0;if(null===e&&t===M||null===t&&e===M)return!0;if(te(e)&&te(t))return e.equals(t);if(ne(e)&&ne(t))return e.equals(t);if(re(e)&&re(t))return e.equals(t);if(e instanceof o)return e.equalityTest(t);if(e instanceof s)return e.equalityTest(t);if(e instanceof h&&t instanceof h){const r=e.cache._arcadeCacheId,n=t.cache._arcadeCacheId;if(null!=r)return r===n}if(ie(e)&&ie(t)){if(e._arcadeCacheId===t._arcadeCacheId&&void 0!==e._arcadeCacheId&&null!==e._arcadeCacheId)return!0;if(e._underlyingGraphic===t._underlyingGraphic&&void 0!==e._underlyingGraphic&&null!==e._underlyingGraphic)return!0}return!1}function ye(e,{useNumbersForDates:t}){let r="";for(const n in e){""!==r&&(r+=",");const i=e[n];null==i?r+=JSON.stringify(n)+":null":A(i)||D(i)||k(i)?r+=JSON.stringify(n)+":"+JSON.stringify(i):z(i)?r+=JSON.stringify(n)+":"+he(i):ne(i)||re(i)?r+=`${JSON.stringify(n)}:${JSON.stringify(i.toString())}`:ee(i)||Array.isArray(i)?r+=JSON.stringify(n)+":"+he(i,null,t):te(i)?r+=t?JSON.stringify(n)+":"+JSON.stringify(i.getTime()):JSON.stringify(n)+":"+i.stringify():null!==i&&"object"==typeof i&&"castToText"in i&&(r+=JSON.stringify(n)+":"+i.castToText(t))}return"{"+r+"}"}function pe(e,t){if(k(e))return e;if(null===e)return"";if(D(e))return ue(e,t);if(A(e))return e.toString();if(te(e))return le(e,t);if(ne(e))return e.toFormat(t);if(re(e))return e.toFormat(t);if(e instanceof p)return JSON.stringify(e.toJSON());if(O(e)){const t=[];for(let r=0;r<e.length;r++)t[r]=be(e[r]);return"["+t.join(",")+"]"}if(e instanceof a){const t=[];for(let r=0;r<e.length();r++)t[r]=be(e.get(r));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText():_(e)?"object, Function":e===M?"":v(e)?"object, Module":""}function ge(e){const t=[];if(e instanceof a){for(let r=0;r<e.length();r++)t[r]=Ne(e.get(r));return t}if(!O(e))return null;for(let r=0;r<e.length;r++)t[r]=Ne(e[r]);return t}function he(e,t,r=!1){if(k(e))return e;if(null===e)return"";if(D(e))return ue(e,t);if(A(e))return e.toString();if(te(e))return le(e,t);if(ne(e))return e.toFormat(t);if(re(e))return e.toFormat(t);if(e instanceof p)return e instanceof y?'{"xmin":'+e.xmin.toString()+',"ymin":'+e.ymin.toString()+","+(e.hasZ?'"zmin":'+e.zmin.toString()+",":"")+(e.hasM?'"mmin":'+e.mmin.toString()+",":"")+'"xmax":'+e.xmax.toString()+',"ymax":'+e.ymax.toString()+","+(e.hasZ?'"zmax":'+e.zmax.toString()+",":"")+(e.hasM?'"mmax":'+e.mmax.toString()+",":"")+'"spatialReference":'+Fe(e.spatialReference)+"}":Fe(e.toJSON(),(e,t)=>e.key===t.key?0:"spatialReference"===e.key?1:"spatialReference"===t.key||e.key<t.key?-1:e.key>t.key?1:0);if(O(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=be(e[n],r);return"["+t.join(",")+"]"}if(e instanceof a){const t=[];for(let n=0;n<e.length();n++)t[n]=be(e.get(n),r);return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText(r):_(e)?"object, Function":e===M?"":v(e)?"object, Module":""}function be(e,t=!1){if(null===e)return"null";if(A(e)||k(e))return JSON.stringify(e);if(D(e))return e.toString();if(e instanceof p)return he(e,null,t);if(e instanceof a)return he(e,null,t);if(Array.isArray(e))return he(e,null,t);if(te(e))return t?JSON.stringify(e.getTime()):JSON.stringify(le(e,""));if(ne(e))return JSON.stringify(e.toString());if(re(e))return JSON.stringify(e.toString());if(null!==e&&"object"==typeof e){if("castToText"in e)return e.castToText(t)}else if(e===M)return"null";return"null"}function Ne(e,t){return D(e)?e:null===e||""===e?0:te(e)||re(e)||ne(e)?NaN:A(e)?e?1:0:O(e)||""===e||void 0===e?NaN:void 0!==t&&k(e)?(t=I(t,"‰",""),t=I(t,"¤",""),c(e,{pattern:t})):e===M?0:Number(e)}function Se(t,r){if(te(t))return t;if(k(t)){const n=Ze(t,r);if(n)return e.dateTimeToArcadeDate(n)}return null}function Ze(e,r){const n=/ (\d\d)/,i=t(r);let a=j.fromISO(e,{zone:i});return a.isValid||n.test(e)&&(e=e.replace(n,"T$1"),a=j.fromISO(e,{zone:r}),a.isValid)?a:null}function Te(e){return A(e)?e:k(e)?"true"===(e=e.toLowerCase()):!!D(e)&&(0!==e&&!isNaN(e))}function Ae(e,t){const r=JSON.parse(e);return r&&!r.spatialReference&&(r.spatialReference=t),Z(r)}function De(e,t){return null==e?null:(null!==e.spatialReference&&void 0!==e.spatialReference||(e.spatialReference=t),e)}function ke(e){if(null===e)return null;if(e instanceof h)return"NaN"===e.x||null===e.x||isNaN(e.x)?null:e;if(e instanceof b){if(0===(e.curveRings??e.rings).length)return null;for(const t of e.curveRings??e.rings)if(t.length>0)return e;return null}if(e instanceof N){if(0===(e.curvePaths??e.paths).length)return null;for(const t of e.curvePaths??e.paths)if(t.length>0)return e;return null}return e instanceof g?0===e.points.length?null:e:e instanceof y?"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)?null:e:null}function Ce(e,t){if(!e)return t;if(!e.domain)return t;let r=null,n=null;if(te(t))r=t.toNumber();else if(re(t))r=t.toString();else if(ne(t))r=t.toStorageString();else if("string"===e.field.type||"esriFieldTypeString"===e.field.type)r=pe(t);else{if(null==t)return null;if(""===t)return t;r=Ne(t)}for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.code===r&&(n=t)}return null===n?pe(t):n.name}function Oe(e,t){if(!e)return t;if(!e.domain)return t;let r=null;const n=pe(t);for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.name===n&&(r=t)}return null===r?t:r.code}function xe(e,t,r=null,i=null){if(!t)return null;if(!t.fields)return null;let a,o,s=null;for(let n=0;n<t.fields.length;n++){const r=t.fields[n];r.name.toLowerCase()===e.toString().toLowerCase()&&(s=r)}if(null===s)throw new n("FieldNotFound",null,{key:e});let u=t.typeIdField,l="id",f=t.types;if(t.subtypeField&&(u=t.subtypeField,l="code",f=t.subtypes??[]),null===i&&r&&u)i=r.hasField(u)?r.field(u):null;else if(u&&null!==i){let e=!1;for(const t of f||[])if(i===t[l]){e=!0;break}if(!e)for(const t of f||[])if(i===t.name){i=t[l],e=!0;break}e||(i=null,r&&u&&(i=r.hasField(u)?r.field(u):null))}return null!=i&&f.some(e=>e[l]===i&&(a=e.domains?.[s.name],a&&"inherited"===a.type&&(a=je(s.name,t),o=!0),!0)),o||a||(a=je(e,t)),{field:s,domain:a}}function je(e,t){let r;return t.fields.some(t=>(t.name.toLowerCase()===e.toLowerCase()&&(r=t.domain),!!r)),r}function Fe(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const r="boolean"==typeof t.cycles&&t.cycles,n=t.cmp&&(i=t.cmp,function(e){return function(t,r){const n={key:t,value:e[t]},a={key:r,value:e[r]};return i(n,a)}});var i;const a=[];return function e(t){if(t?.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,o;if(Array.isArray(t)){for(o="[",i=0;i<t.length;i++)i&&(o+=","),o+=e(t[i])||"null";return o+"]"}if(null===t)return"null";if(a.includes(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const s=a.push(t)-1,u=Object.keys(t).sort(n?.(t));for(o="",i=0;i<u.length;i++){const r=u[i],n=e(t[r]);n&&(o&&(o+=","),o+=JSON.stringify(r)+":"+n)}return a.splice(s,1),"{"+o+"}"}(e)}function we(e){if(null===e)return null;const t=[];for(const r of e)q(r)?t.push(r.geometry()):t.push(r);return t}function Je(e,t){if(!(t instanceof h))throw new n("InvalidParameter",null);e.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}function Me(e,t){if(O(e)||ee(e)){let r=!1,i=!1,a=[],o=t;if(O(e)){for(const t of e)Je(a,t);a.length>0&&(o=e[0].spatialReference,r=e[0].hasZ,i=e[0].hasM)}else if(e instanceof s)a=e._elements,a.length>0&&(r=e._hasZ,i=e._hasM,o=e.get(0).spatialReference);else{if(!ee(e))throw new n("InvalidParameter",null);for(const t of e.toArray())Je(a,t);a.length>0&&(o=e.get(0).spatialReference,r=!0===e.get(0).hasZ,i=!0===e.get(0).hasM)}if(0===a.length)return null;return S(a)||(a=a.slice().reverse()),new b({rings:[a],spatialReference:o,hasZ:r,hasM:i})}return e}function Re(e,t){if(O(e)||ee(e)){let r=!1,n=!1,i=[],a=t;if(O(e)){for(const t of e)Je(i,t);i.length>0&&(a=e[0].spatialReference,r=!0===e[0].hasZ,n=!0===e[0].hasM)}else if(e instanceof s)i=e._elements,i.length>0&&(r=e._hasZ,n=e._hasM,a=e.get(0).spatialReference);else if(ee(e)){for(const t of e.toArray())Je(i,t);i.length>0&&(a=e.get(0).spatialReference,r=!0===e.get(0).hasZ,n=!0===e.get(0).hasM)}return 0===i.length?null:new N({paths:[i],spatialReference:a,hasZ:r,hasM:n})}return e}function Pe(e,t){if(O(e)||ee(e)){let r=!1,n=!1,i=[],a=t;if(O(e)){for(const t of e)Je(i,t);i.length>0&&(a=e[0].spatialReference,r=!0===e[0].hasZ,n=!0===e[0].hasM)}else if(e instanceof s)i=e._elements,i.length>0&&(r=e._hasZ,n=e._hasM,a=e.get(0).spatialReference);else if(ee(e)){for(const t of e.toArray())Je(i,t);i.length>0&&(a=e.get(0).spatialReference,r=!0===e.get(0).hasZ,n=!0===e.get(0).hasM)}return 0===i.length?null:new g({points:i,spatialReference:a,hasZ:r,hasM:n})}return e}function Ie(e,t=!0){if(null==e)return[];if(O(e)){const r=[];for(const n of e){const e=pe(n);(t||""!==e)&&r.push(e)}return r}if(ee(e)){const r=[];for(let n=0;n<e.length();n++){const i=pe(e.get(n));(t||""!==i)&&r.push(i)}return r}if(Y(e)){const r=pe(e);if(t||""!==r)return[r]}return[]}let _e=0;function ve(){return _e++,_e%100==0?(_e=0,new Promise(e=>{setTimeout(()=>{e()},0)})):Promise.resolve()}function Ye(e,t,r){switch(r){case"&":return e&t;case"|":return e|t;case"^":return e^t;case"<<":return e<<t;case">>":return e>>t;case">>>":return e>>>t}}function Le(e){return null==e?null:A(e)||D(e)||k(e)?e:e instanceof p?e.toJSON():e instanceof a?e.toArray().map(e=>Le(e)):Array.isArray(e)?e.map(e=>Le(e)):C(e)?e:te(e)?e.toJSDate():ne(e)?e.toString():re(e)?e.toJSDate():"castAsJson"in e?e.castAsJson():null}async function Ge(e,t=null){if(e instanceof a&&(e=e.toArray()),null==e)return null;if(Y(e)||e instanceof p||C(e)||te(e))return Le(e);if(Array.isArray(e)){const r=[],n=[];for(const i of e)if(null===i||Y(i)||i instanceof p||C(i)||te(i))n.push(Le(i));else{const i=n.push(null)-1;r.push(Ge(e,t).then(e=>{n[i]=e}))}return r.length>0&&await Promise.all(r),n}return"castAsJsonAsync"in e?e.castAsJsonAsync(t):null}function Ve(e){return ze(e)?e.parent:e}function ze(e){return e&&"declaredClass"in e&&"esri.layers.support.SubtypeSublayer"===e.declaredClass}function qe(e){return e&&"declaredClass"in e&&"esri.layers.SubtypeGroupLayer"===e.declaredClass}function Ee(e,t,r){const n=Ve(e.fullSchema());if(null===n)return null;if(!n.fields)return null;return xe(t,n,e,r)}function Ue(e){const t=Ve(e.fullSchema());return null===t?null:t.fields?t.subtypeField?{subtypeField:t.subtypeField,subtypes:t.subtypes?t.subtypes.map(e=>({name:e.name,code:e.code})):[]}:t.typeIdField?{subtypeField:t.typeIdField,subtypes:t.types?t.types.map(e=>({name:e.name,code:e.id})):[]}:null:null}function He(e,t,r,n){const i=Ve(e.fullSchema());if(null===i)return null;if(!i.fields)return null;const a=xe(t,i,e,n);if(void 0===r)try{r=e.field(t)}catch(o){return null}return Ce(a,r)}function We(e,t,r,n){const i=Ve(e.fullSchema());if(null===i)return null;if(!i.fields)return null;if(void 0===r){try{r=e.field(t)}catch(a){return null}return r}return Oe(xe(t,i,e,n),r)}function $e(e){return e?.timeZone??"system"}function Be(e){const t=Ve(e.fullSchema());if(null===t)return null;if(!t.fields)return null;const r=[];for(const n of t.fields)r.push(u(n));return{objectIdField:t.objectIdField,globalIdField:t.globalIdField??"",geometryType:void 0===l[t.geometryType]?"":l[t.geometryType],fields:r}}const Ke="1.36",Qe=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResult:J,ReturnResult:w,absRound:se,arcadeVersion:Ke,autoCastArrayOfPointsToMultiPoint:Pe,autoCastArrayOfPointsToPolygon:Me,autoCastArrayOfPointsToPolyline:Re,autoCastFeatureToGeometry:we,binaryOperator:Ye,breakResult:R,castAsJson:Le,castAsJsonAsync:Ge,castRecordToText:ye,continueResult:P,defaultTimeZone:$e,defaultUndefined:L,equalityTest:de,featureDomainCodeLookup:We,featureDomainValueLookup:He,featureFullDomain:Ee,featureSchema:Be,featureSubtypes:Ue,fixNullGeometry:ke,fixSpatialReference:De,formatDate:le,formatNumber:ue,getDomain:xe,getDomainCode:Oe,getDomainValue:Ce,getType:G,greaterThanLessThan:me,isArray:O,isAttachment:B,isBoolean:A,isDate:te,isDateOnly:re,isDictionary:W,isDictionaryLike:K,isEmpty:oe,isFeature:q,isFeatureSet:H,isFeatureSetCollection:Q,isFunctionParameter:_,isGeometry:z,isGraphic:F,isImmutableArray:ee,isInteger:x,isJsDate:C,isKnowledgeGraph:X,isModule:v,isNumber:D,isObject:ie,isPixel:U,isPortal:$,isSimpleType:Y,isString:k,isSubtypeGrouplayer:qe,isSubtypeSublayer:ze,isTime:ne,isVoid:V,isVoxel:E,multiReplace:I,parseGeometryFromJson:Ae,pcCheck:ae,stableStringify:Fe,standardiseDateFormat:fe,tick:ve,toBoolean:Te,toDate:Se,toNumber:Ne,toNumberArray:ge,toString:pe,toStringArray:Ie,toStringExplicit:he,voidOperation:M},Symbol.toStringTag,{value:"Module"}));export{Ue as $,P as A,ae as B,$ as C,B as D,U as E,E as F,v as G,we as H,J as I,De as J,Me as K,Re as L,Pe as M,Te as N,L as O,$e as P,oe as Q,w as R,Ie as S,G as T,Se as U,fe as V,se as W,Ee as X,We as Y,He as Z,Be as _,Le as a,ke as a0,I as a1,Ke as a2,ge as a3,ze as a4,ve as a5,xe as a6,Ce as a7,Oe as a8,le as a9,ue as aa,ie as ab,qe as ac,Ae as ad,Fe as ae,Y as b,ye as c,Ge as d,te as e,re as f,ne as g,z as h,_ as i,ee as j,q as k,Q as l,H as m,W as n,X as o,Qe as p,V as q,Ne as r,pe as s,he as t,me as u,M as v,de as w,Ye as x,K as y,R as z};
2
+ import{ArcadeDate as e,createDateTimeZone as t}from"../arcade/ArcadeDate.js";import{ArcadeModule as r}from"../arcade/ArcadeModule.js";import{ArcadeExecutionError as n}from"../arcade/executionError.js";import{ArcadeFunction as i}from"../arcade/FunctionWrapper.js";import a from"../arcade/ImmutableArray.js";import o from"../arcade/ImmutablePathArray.js";import s from"../arcade/ImmutablePointArray.js";import{esriFieldToJson as u,layerGeometryEsriRestConstants as l}from"../arcade/featureset/support/shared.js";import{format as f,parse as c}from"../core/number.js";import{DateOnly as m}from"../core/sql/DateOnly.js";import{TimeOnly as d}from"../core/sql/TimeOnly.js";import y from"../geometry/Extent.js";import p from"../geometry/Geometry.js";import g from"../geometry/Multipoint.js";import h from"../geometry/Point.js";import b from"../geometry/Polygon.js";import N from"../geometry/Polyline.js";import{isClockwise as S}from"../geometry/support/coordsUtils.js";import{fromJSON as Z}from"../geometry/support/jsonUtils.js";import{getLocale as T}from"../intl/locale.js";import{isBoolean as A,isNumber as D,isString as k,isDate as C,isArray as O,isInteger as x}from"../support/guards.js";import{DateTime as j}from"luxon";import{isGraphic as F}from"../support/graphicInstanceUtils.js";class w{constructor(e){this.value=e}}class J{constructor(e){this.value=e}}const M={type:"VOID"},R=Symbol("BREAK"),P=Symbol("CONTINUE");function I(e,t,r){return""===t||null==t||t===r||t===r?e:e=e.split(t).join(r)}function _(e){return e instanceof i}function v(e){return e instanceof r}function Y(e){return!!k(e)||(!!D(e)||(!!te(e)||(!!re(e)||(!!ne(e)||(!!A(e)||(null===e||e===M))))))}function L(e,t){return void 0===e?t:e}function G(e){return null==e?"":O(e)||ee(e)?"Array":te(e)?"Date":ne(e)?"Time":re(e)?"DateOnly":k(e)?"String":A(e)?"Boolean":D(e)?"Number":"esri.arcade.Attachment"===e?.declaredClass?"Attachment":"esri.arcade.Portal"===e?.declaredClass?"Portal":"esri.arcade.Dictionary"===e?.declaredClass?"Dictionary":X(e)?"KnowledgeGraph":e instanceof r?"Module":q(e)?"Feature":e instanceof h?"Point":e instanceof b?"Polygon":e instanceof N?"Polyline":e instanceof g?"Multipoint":e instanceof y?"Extent":_(e)?"Function":H(e)?"FeatureSet":Q(e)?"FeatureSetCollection":E(e)?"Voxel":U(e)?"Pixel":e===M?"":"number"==typeof e&&isNaN(e)?"Number":"Unrecognized Type"}function V(e){return e===M}function z(e){return e instanceof p}function q(e){return"esri.arcade.Feature"===e?.arcadeDeclaredClass}function E(e){return"esri.arcade.Voxel"===e?.arcadeDeclaredClass}function U(e){return"esri.arcade.Pixel"===e?.arcadeDeclaredClass}function H(e){return"esri.arcade.featureset.support.FeatureSet"===e?.declaredRootClass}function W(e){return"esri.arcade.Dictionary"===e?.declaredClass}function $(e){return"esri.arcade.Portal"===e?.declaredClass}function B(e){return"esri.arcade.Attachment"===e?.declaredClass}function K(e){return W(e)||q(e)||E(e)||U(e)}function Q(e){return"esri.arcade.featureSetCollection"===e?.declaredRootClass}function X(e){return"esri.rest.knowledgeGraph.KnowledgeGraph"===e?.declaredClass}function ee(e){return e instanceof a}function te(t){return t instanceof e}function re(e){return e instanceof m}function ne(e){return e instanceof d}function ie(e){return null!=e&&"object"==typeof e}function ae(e,t,r,i){if(e.length<t||e.length>r)throw new n("WrongNumberOfParameters",i)}function oe(e){return null==e||V(e)||""===e}function se(e){return e<0?-Math.round(-e):Math.round(e)}function ue(e,t){return isNaN(e)||null==t||""===t?e.toString():(t=I(t,"‰",""),t=I(t,"¤",""),f(e,{pattern:t}))}function le(e,t){return null==t||""===t?e.toISOString(!0):e.toFormat(fe(t),{locale:T(),numberingSystem:"latn"})}function fe(e,t=!1){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let r="";const n=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|Z{1,5}|.)/g;for(const i of e.match(n)||[])switch(i){case"D":r+="d";break;case"DD":r+="dd";break;case"DDD":r+="o";break;case"d":r+="c";break;case"ddd":r+="ccc";break;case"dddd":r+="cccc";break;case"M":r+="L";break;case"MM":r+="LL";break;case"MMM":r+="LLL";break;case"MMMM":r+="LLLL";break;case"YY":r+="yy";break;case"Y":case"YYYY":r+="yyyy";break;case"Q":r+="q";break;case"Z":r+="Z";break;case"ZZ":r+="ZZ";break;case"ZZZ":r+="ZZZ";break;case"ZZZZ":r+=t?"[ZZZZ]":"ZZZZ";break;case"ZZZZZ":r+=t?"[ZZZZZ]":"ZZZZZ";break;case"S":r+="'S'";break;case"SS":r+="'SS'";break;case"SSS":r+="u";break;case"A":case"a":r+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":r+=i;break;default:i.length>=2&&i.startsWith("[")&&i.endsWith("]")?r+=`'${i.slice(1,-1)}'`:r+=`'${i}'`}return r}function ce(e,t,r){switch(r){case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}return!1}function me(t,r,i){if(null===t){if(null===r||r===M)return ce(null,null,i);if(D(r))return ce(0,r,i);if(k(r))return ce(0,Ne(r),i);if(A(r))return ce(0,Ne(r),i);if(te(r))return ce(0,r.toNumber(),i);if(ne(r))return ce(t,r.toNumber(),i);if(re(r))return ce(t,r.toNumber(),i)}if(t===M){if(null===r||r===M)return ce(null,null,i);if(D(r))return ce(0,r,i);if(k(r))return ce(0,Ne(r),i);if(A(r))return ce(0,Ne(r),i);if(te(r))return ce(0,r.toNumber(),i);if(ne(r))return ce(t,r.toNumber(),i);if(re(r))return ce(t,r.toNumber(),i)}else if(D(t)){if(D(r))return ce(t,r,i);if(A(r))return ce(t,Ne(r),i);if(null===r||r===M)return ce(t,0,i);if(k(r))return ce(t,Ne(r),i);if(te(r))return ce(t,r.toNumber(),i);if(ne(r))return ce(t,r.toNumber(),i);if(re(r))return ce(t,r.toNumber(),i)}else if(k(t)){if(k(r))return ce(pe(t),pe(r),i);if(te(r))return ce(Ne(t),r.toNumber(),i);if(ne(r))return ce(Ne(t),r.toNumber(),i);if(re(r))return ce(Ne(t),r.toNumber(),i);if(D(r))return ce(Ne(t),r,i);if(null===r||r===M)return ce(Ne(t),0,i);if(A(r))return ce(Ne(t),Ne(r),i)}else if(te(t)){if(te(r))return t.timeZone!==r.timeZone&&(t.isUnknownTimeZone?t=e.arcadeDateAndZoneToArcadeDate(t,r.timeZone):r.isUnknownTimeZone&&(r=e.arcadeDateAndZoneToArcadeDate(r,t.timeZone))),ce(t.toNumber(),r.toNumber(),i);if(null===r||r===M)return ce(t.toNumber(),0,i);if(D(r))return ce(t.toNumber(),r,i);if(A(r))return ce(t.toNumber(),Ne(r),i);if(k(r))return ce(t.toNumber(),Ne(r),i);if(ne(r))throw new n("CannotCompareDateAndTime",null);if(re(r))return ce(t.toNumber(),r.toNumber(),i)}else if(A(t)){if(A(r))return ce(t,r,i);if(D(r))return ce(Ne(t),Ne(r),i);if(te(r))return ce(Ne(t),r.toNumber(),i);if(ne(r))return ce(Ne(t),r.toNumber(),i);if(re(r))return ce(Ne(t),r.toNumber(),i);if(null===r||r===M)return ce(Ne(t),0,i);if(k(r))return ce(Ne(t),Ne(r),i)}else if(re(t)){if(te(r))return ce(t.toNumber(),r.toNumber(),i);if(null===r||r===M)return ce(t.toNumber(),0,i);if(D(r))return ce(t.toNumber(),r,i);if(A(r))return ce(t.toNumber(),Ne(r),i);if(k(r))return ce(t.toNumber(),Ne(r),i);if(ne(r))throw new n("CannotCompareDateAndTime",null);if(re(r))return ce(t.toNumber(),r.toNumber(),i)}else if(ne(t)){if(te(r))throw new n("CannotCompareDateAndTime",null);if(null===r||r===M)return ce(t.toNumber(),0,i);if(D(r))return ce(t.toNumber(),r,i);if(A(r))return ce(t.toNumber(),Ne(r),i);if(k(r))return ce(t.toNumber(),Ne(r),i);if(ne(r))return ce(t.toNumber(),r.toNumber(),i);if(re(r))throw new n("CannotCompareDateAndTime",null)}return!!de(t,r)&&("<="===i||">="===i)}function de(e,t){if(e===t)return!0;if(null===e&&t===M||null===t&&e===M)return!0;if(te(e)&&te(t))return e.equals(t);if(ne(e)&&ne(t))return e.equals(t);if(re(e)&&re(t))return e.equals(t);if(e instanceof o)return e.equalityTest(t);if(e instanceof s)return e.equalityTest(t);if(e instanceof h&&t instanceof h){const r=e.cache._arcadeCacheId,n=t.cache._arcadeCacheId;if(null!=r)return r===n}if(ie(e)&&ie(t)){if(e._arcadeCacheId===t._arcadeCacheId&&void 0!==e._arcadeCacheId&&null!==e._arcadeCacheId)return!0;if(e._underlyingGraphic===t._underlyingGraphic&&void 0!==e._underlyingGraphic&&null!==e._underlyingGraphic)return!0}return!1}function ye(e,{useNumbersForDates:t}){let r="";for(const n in e){""!==r&&(r+=",");const i=e[n];null==i?r+=JSON.stringify(n)+":null":A(i)||D(i)||k(i)?r+=JSON.stringify(n)+":"+JSON.stringify(i):z(i)?r+=JSON.stringify(n)+":"+he(i):ne(i)||re(i)?r+=`${JSON.stringify(n)}:${JSON.stringify(i.toString())}`:ee(i)||Array.isArray(i)?r+=JSON.stringify(n)+":"+he(i,null,t):te(i)?r+=t?JSON.stringify(n)+":"+JSON.stringify(i.getTime()):JSON.stringify(n)+":"+i.stringify():null!==i&&"object"==typeof i&&"castToText"in i&&(r+=JSON.stringify(n)+":"+i.castToText(t))}return"{"+r+"}"}function pe(e,t){if(k(e))return e;if(null===e)return"";if(D(e))return ue(e,t);if(A(e))return e.toString();if(te(e))return le(e,t);if(ne(e))return e.toFormat(t);if(re(e))return e.toFormat(t);if(e instanceof p)return JSON.stringify(e.toJSON());if(O(e)){const t=[];for(let r=0;r<e.length;r++)t[r]=be(e[r]);return"["+t.join(",")+"]"}if(e instanceof a){const t=[];for(let r=0;r<e.length();r++)t[r]=be(e.get(r));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText():_(e)?"object, Function":e===M?"":v(e)?"object, Module":""}function ge(e){const t=[];if(e instanceof a){for(let r=0;r<e.length();r++)t[r]=Ne(e.get(r));return t}if(!O(e))return null;for(let r=0;r<e.length;r++)t[r]=Ne(e[r]);return t}function he(e,t,r=!1){if(k(e))return e;if(null===e)return"";if(D(e))return ue(e,t);if(A(e))return e.toString();if(te(e))return le(e,t);if(ne(e))return e.toFormat(t);if(re(e))return e.toFormat(t);if(e instanceof p)return e instanceof y?'{"xmin":'+e.xmin.toString()+',"ymin":'+e.ymin.toString()+","+(e.hasZ?'"zmin":'+e.zmin.toString()+",":"")+(e.hasM?'"mmin":'+e.mmin.toString()+",":"")+'"xmax":'+e.xmax.toString()+',"ymax":'+e.ymax.toString()+","+(e.hasZ?'"zmax":'+e.zmax.toString()+",":"")+(e.hasM?'"mmax":'+e.mmax.toString()+",":"")+'"spatialReference":'+Fe(e.spatialReference)+"}":Fe(e.toJSON(),(e,t)=>e.key===t.key?0:"spatialReference"===e.key?1:"spatialReference"===t.key||e.key<t.key?-1:e.key>t.key?1:0);if(O(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=be(e[n],r);return"["+t.join(",")+"]"}if(e instanceof a){const t=[];for(let n=0;n<e.length();n++)t[n]=be(e.get(n),r);return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText(r):_(e)?"object, Function":e===M?"":v(e)?"object, Module":""}function be(e,t=!1){if(null===e)return"null";if(A(e)||k(e))return JSON.stringify(e);if(D(e))return e.toString();if(e instanceof p)return he(e,null,t);if(e instanceof a)return he(e,null,t);if(Array.isArray(e))return he(e,null,t);if(te(e))return t?JSON.stringify(e.getTime()):JSON.stringify(le(e,""));if(ne(e))return JSON.stringify(e.toString());if(re(e))return JSON.stringify(e.toString());if(null!==e&&"object"==typeof e){if("castToText"in e)return e.castToText(t)}else if(e===M)return"null";return"null"}function Ne(e,t){return D(e)?e:null===e||""===e?0:te(e)||re(e)||ne(e)?NaN:A(e)?e?1:0:O(e)||""===e||void 0===e?NaN:void 0!==t&&k(e)?(t=I(t,"‰",""),t=I(t,"¤",""),c(e,{pattern:t})):e===M?0:Number(e)}function Se(t,r){if(te(t))return t;if(k(t)){const n=Ze(t,r);if(n)return e.dateTimeToArcadeDate(n)}return null}function Ze(e,r){const n=/ (\d\d)/,i=t(r);let a=j.fromISO(e,{zone:i});return a.isValid||n.test(e)&&(e=e.replace(n,"T$1"),a=j.fromISO(e,{zone:r}),a.isValid)?a:null}function Te(e){return A(e)?e:k(e)?"true"===(e=e.toLowerCase()):!!D(e)&&(0!==e&&!isNaN(e))}function Ae(e,t){const r=JSON.parse(e);return r&&!r.spatialReference&&(r.spatialReference=t),Z(r)}function De(e,t){return null==e?null:(null!==e.spatialReference&&void 0!==e.spatialReference||(e.spatialReference=t),e)}function ke(e){if(null===e)return null;if(e instanceof h)return"NaN"===e.x||null===e.x||isNaN(e.x)?null:e;if(e instanceof b){if(0===(e.curveRings??e.rings).length)return null;for(const t of e.curveRings??e.rings)if(t.length>0)return e;return null}if(e instanceof N){if(0===(e.curvePaths??e.paths).length)return null;for(const t of e.curvePaths??e.paths)if(t.length>0)return e;return null}return e instanceof g?0===e.points.length?null:e:e instanceof y?"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)?null:e:null}function Ce(e,t){if(!e)return t;if(!e.domain)return t;let r=null,n=null;if(te(t))r=t.toNumber();else if(re(t))r=t.toString();else if(ne(t))r=t.toStorageString();else if("string"===e.field.type||"esriFieldTypeString"===e.field.type)r=pe(t);else{if(null==t)return null;if(""===t)return t;r=Ne(t)}for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.code===r&&(n=t)}return null===n?pe(t):n.name}function Oe(e,t){if(!e)return t;if(!e.domain)return t;let r=null;const n=pe(t);for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.name===n&&(r=t)}return null===r?t:r.code}function xe(e,t,r=null,i=null){if(!t)return null;if(!t.fields)return null;let a,o,s=null;for(let n=0;n<t.fields.length;n++){const r=t.fields[n];r.name.toLowerCase()===e.toString().toLowerCase()&&(s=r)}if(null===s)throw new n("FieldNotFound",null,{key:e});let u=t.typeIdField,l="id",f=t.types;if(t.subtypeField&&(u=t.subtypeField,l="code",f=t.subtypes??[]),null===i&&r&&u)i=r.hasField(u)?r.field(u):null;else if(u&&null!==i){let e=!1;for(const t of f||[])if(i===t[l]){e=!0;break}if(!e)for(const t of f||[])if(i===t.name){i=t[l],e=!0;break}e||(i=null,r&&u&&(i=r.hasField(u)?r.field(u):null))}return null!=i&&f.some(e=>e[l]===i&&(a=e.domains?.[s.name],a&&"inherited"===a.type&&(a=je(s.name,t),o=!0),!0)),o||a||(a=je(e,t)),{field:s,domain:a}}function je(e,t){let r;return t.fields.some(t=>(t.name.toLowerCase()===e.toLowerCase()&&(r=t.domain),!!r)),r}function Fe(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const r="boolean"==typeof t.cycles&&t.cycles,n=t.cmp&&(i=t.cmp,function(e){return function(t,r){const n={key:t,value:e[t]},a={key:r,value:e[r]};return i(n,a)}});var i;const a=[];return function e(t){if(t?.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,o;if(Array.isArray(t)){for(o="[",i=0;i<t.length;i++)i&&(o+=","),o+=e(t[i])||"null";return o+"]"}if(null===t)return"null";if(a.includes(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const s=a.push(t)-1,u=Object.keys(t).sort(n?.(t));for(o="",i=0;i<u.length;i++){const r=u[i],n=e(t[r]);n&&(o&&(o+=","),o+=JSON.stringify(r)+":"+n)}return a.splice(s,1),"{"+o+"}"}(e)}function we(e){if(null===e)return null;const t=[];for(const r of e)q(r)?t.push(r.geometry()):t.push(r);return t}function Je(e,t){if(!(t instanceof h))throw new n("InvalidParameter",null);e.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}function Me(e,t){if(O(e)||ee(e)){let r=!1,i=!1,a=[],o=t;if(O(e)){for(const t of e)Je(a,t);a.length>0&&(o=e[0].spatialReference,r=e[0].hasZ,i=e[0].hasM)}else if(e instanceof s)a=e._elements,a.length>0&&(r=e._hasZ,i=e._hasM,o=e.get(0).spatialReference);else{if(!ee(e))throw new n("InvalidParameter",null);for(const t of e.toArray())Je(a,t);a.length>0&&(o=e.get(0).spatialReference,r=!0===e.get(0).hasZ,i=!0===e.get(0).hasM)}if(0===a.length)return null;return S(a)||(a=a.slice().reverse()),new b({rings:[a],spatialReference:o,hasZ:r,hasM:i})}return e}function Re(e,t){if(O(e)||ee(e)){let r=!1,n=!1,i=[],a=t;if(O(e)){for(const t of e)Je(i,t);i.length>0&&(a=e[0].spatialReference,r=!0===e[0].hasZ,n=!0===e[0].hasM)}else if(e instanceof s)i=e._elements,i.length>0&&(r=e._hasZ,n=e._hasM,a=e.get(0).spatialReference);else if(ee(e)){for(const t of e.toArray())Je(i,t);i.length>0&&(a=e.get(0).spatialReference,r=!0===e.get(0).hasZ,n=!0===e.get(0).hasM)}return 0===i.length?null:new N({paths:[i],spatialReference:a,hasZ:r,hasM:n})}return e}function Pe(e,t){if(O(e)||ee(e)){let r=!1,n=!1,i=[],a=t;if(O(e)){for(const t of e)Je(i,t);i.length>0&&(a=e[0].spatialReference,r=!0===e[0].hasZ,n=!0===e[0].hasM)}else if(e instanceof s)i=e._elements,i.length>0&&(r=e._hasZ,n=e._hasM,a=e.get(0).spatialReference);else if(ee(e)){for(const t of e.toArray())Je(i,t);i.length>0&&(a=e.get(0).spatialReference,r=!0===e.get(0).hasZ,n=!0===e.get(0).hasM)}return 0===i.length?null:new g({points:i,spatialReference:a,hasZ:r,hasM:n})}return e}function Ie(e,t=!0){if(null==e)return[];if(O(e)){const r=[];for(const n of e){const e=pe(n);(t||""!==e)&&r.push(e)}return r}if(ee(e)){const r=[];for(let n=0;n<e.length();n++){const i=pe(e.get(n));(t||""!==i)&&r.push(i)}return r}if(Y(e)){const r=pe(e);if(t||""!==r)return[r]}return[]}let _e=0;function ve(){return _e++,_e%100==0?(_e=0,new Promise(e=>{setTimeout(()=>{e()},0)})):Promise.resolve()}function Ye(e,t,r){switch(r){case"&":return e&t;case"|":return e|t;case"^":return e^t;case"<<":return e<<t;case">>":return e>>t;case">>>":return e>>>t}}function Le(e){return null==e?null:A(e)||D(e)||k(e)?e:e instanceof p?e.toJSON():e instanceof a?e.toArray().map(e=>Le(e)):Array.isArray(e)?e.map(e=>Le(e)):C(e)?e:te(e)?e.toJSDate():ne(e)?e.toString():re(e)?e.toJSDate():"castAsJson"in e?e.castAsJson():null}async function Ge(e,t=null){if(e instanceof a&&(e=e.toArray()),null==e)return null;if(Y(e)||e instanceof p||C(e)||te(e))return Le(e);if(Array.isArray(e)){const r=[],n=[];for(const i of e)if(null===i||Y(i)||i instanceof p||C(i)||te(i))n.push(Le(i));else{const i=n.push(null)-1;r.push(Ge(e,t).then(e=>{n[i]=e}))}return r.length>0&&await Promise.all(r),n}return"castAsJsonAsync"in e?e.castAsJsonAsync(t):null}function Ve(e){return ze(e)?e.parent:e}function ze(e){return e&&"declaredClass"in e&&"esri.layers.support.SubtypeSublayer"===e.declaredClass}function qe(e){return e&&"declaredClass"in e&&"esri.layers.SubtypeGroupLayer"===e.declaredClass}function Ee(e,t,r){const n=Ve(e.fullSchema());if(null===n)return null;if(!n.fields)return null;return xe(t,n,e,r)}function Ue(e){const t=Ve(e.fullSchema());return null===t?null:t.fields?t.subtypeField?{subtypeField:t.subtypeField,subtypes:t.subtypes?t.subtypes.map(e=>({name:e.name,code:e.code})):[]}:t.typeIdField?{subtypeField:t.typeIdField,subtypes:t.types?t.types.map(e=>({name:e.name,code:e.id})):[]}:null:null}function He(e,t,r,n){const i=Ve(e.fullSchema());if(null===i)return null;if(!i.fields)return null;const a=xe(t,i,e,n);if(void 0===r)try{r=e.field(t)}catch(o){return null}return Ce(a,r)}function We(e,t,r,n){const i=Ve(e.fullSchema());if(null===i)return null;if(!i.fields)return null;if(void 0===r){try{r=e.field(t)}catch(a){return null}return r}return Oe(xe(t,i,e,n),r)}function $e(e){return e?.timeZone??"system"}function Be(e){const t=Ve(e.fullSchema());if(null===t)return null;if(!t.fields)return null;const r=[];for(const n of t.fields)r.push(u(n));return{objectIdField:t.objectIdField,globalIdField:t.globalIdField??"",geometryType:void 0===l[t.geometryType]?"":l[t.geometryType],fields:r}}const Ke="1.36",Qe=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResult:J,ReturnResult:w,absRound:se,arcadeVersion:Ke,autoCastArrayOfPointsToMultiPoint:Pe,autoCastArrayOfPointsToPolygon:Me,autoCastArrayOfPointsToPolyline:Re,autoCastFeatureToGeometry:we,binaryOperator:Ye,breakResult:R,castAsJson:Le,castAsJsonAsync:Ge,castRecordToText:ye,continueResult:P,defaultTimeZone:$e,defaultUndefined:L,equalityTest:de,featureDomainCodeLookup:We,featureDomainValueLookup:He,featureFullDomain:Ee,featureSchema:Be,featureSubtypes:Ue,fixNullGeometry:ke,fixSpatialReference:De,formatDate:le,formatNumber:ue,getDomain:xe,getDomainCode:Oe,getDomainValue:Ce,getType:G,greaterThanLessThan:me,isArray:O,isAttachment:B,isBoolean:A,isDate:te,isDateOnly:re,isDictionary:W,isDictionaryLike:K,isEmpty:oe,isFeature:q,isFeatureSet:H,isFeatureSetCollection:Q,isFunctionParameter:_,isGeometry:z,isGraphic:F,isImmutableArray:ee,isInteger:x,isJsDate:C,isKnowledgeGraph:X,isModule:v,isNumber:D,isObject:ie,isPixel:U,isPortal:$,isSimpleType:Y,isString:k,isSubtypeGrouplayer:qe,isSubtypeSublayer:ze,isTime:ne,isVoid:V,isVoxel:E,multiReplace:I,parseGeometryFromJson:Ae,pcCheck:ae,stableStringify:Fe,standardiseDateFormat:fe,tick:ve,toBoolean:Te,toDate:Se,toNumber:Ne,toNumberArray:ge,toString:pe,toStringArray:Ie,toStringExplicit:he,voidOperation:M},Symbol.toStringTag,{value:"Module"}));export{Ue as $,P as A,ae as B,$ as C,B as D,U as E,E as F,v as G,we as H,J as I,De as J,Me as K,Re as L,Pe as M,Te as N,L as O,oe as P,Ie as Q,w as R,G as S,$e as T,Se as U,fe as V,se as W,Ee as X,We as Y,He as Z,Be as _,Le as a,ke as a0,I as a1,Ke as a2,ge as a3,ze as a4,ve as a5,xe as a6,Ce as a7,Oe as a8,le as a9,ue as aa,ie as ab,qe as ac,Ae as ad,Fe as ae,Y as b,ye as c,Ge as d,te as e,z as f,ee as g,q as h,_ as i,Q as j,H as k,W as l,X as m,ne as n,re as o,Qe as p,V as q,Ne as r,pe as s,he as t,me as u,M as v,de as w,Ye as x,K as y,R as z};