@arcgis/core 4.30.0-next.20240319 → 4.30.0-next.20240321

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 (119) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{ef19c4fabc3682fc7aa7.js → 0b1ccc2cfb7a6361eae6.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{2d0a01d0957b3e4512f6.js → 2cc832f9f5b10817f300.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{95d7b168991ddb3a96ca.js → 2fe91a15fcdae540babe.js} +1 -1
  5. package/assets/esri/core/workers/chunks/4be6d5660ec1c8ac7606.js +1 -0
  6. package/assets/esri/core/workers/chunks/4f854e0e3a65b768f6be.js +1 -0
  7. package/assets/esri/core/workers/chunks/505f35a02ac6a67a255b.js +1 -0
  8. package/assets/esri/core/workers/chunks/{51fc02ce8cab70b363b1.js → 5162ba2975b4b025590e.js} +1 -1
  9. package/assets/esri/core/workers/chunks/51700be6f50efba0bc82.js +1 -0
  10. package/assets/esri/core/workers/chunks/{766ca6ab0d11ab637278.js → 52274afa07468bc555aa.js} +1 -1
  11. package/assets/esri/core/workers/chunks/5628fa534b2560933230.js +1 -0
  12. package/assets/esri/core/workers/chunks/689a122c77b39e5c73eb.js +1 -0
  13. package/assets/esri/core/workers/chunks/7530fef3ee217643898e.js +1 -0
  14. package/assets/esri/core/workers/chunks/75bd66a0a1b42e057c1a.js +1 -0
  15. package/assets/esri/core/workers/chunks/7819a446d3c9749ff74f.js +1 -0
  16. package/assets/esri/core/workers/chunks/7ca976273f1f64f75aa7.js +1 -0
  17. package/assets/esri/core/workers/chunks/{36d697a3788b86f24588.js → 9403e2ee9c97488ce4f0.js} +1 -1
  18. package/assets/esri/core/workers/chunks/a0de5ad1d08f511cf3d8.js +1 -0
  19. package/assets/esri/core/workers/chunks/b3cd5f8691ba0b5b5729.js +1 -0
  20. package/assets/esri/core/workers/chunks/b3d905c6b100831ad3c4.js +1 -0
  21. package/assets/esri/core/workers/chunks/{50a7742a7e7f7eda5bee.js → df38774f63984be0a478.js} +1 -1
  22. package/assets/esri/core/workers/chunks/e22a13ff683d207e0434.js +1 -0
  23. package/assets/esri/core/workers/chunks/e93cc8cdeaaf81210dc2.js +1 -0
  24. package/assets/esri/core/workers/chunks/{ac8606f2e4719c96a732.js → ee1345b212cde1ff4755.js} +1 -1
  25. package/assets/esri/core/workers/chunks/eecb0064c5343e88bfde.js +1 -0
  26. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  27. package/geometry/support/normalizeUtils.js +1 -1
  28. package/interfaces.d.ts +33 -106
  29. package/layers/SceneLayer.js +1 -1
  30. package/layers/graphics/sources/support/QueryTask.js +1 -1
  31. package/package.json +1 -1
  32. package/rest/geoprocessor/utils.js +1 -1
  33. package/rest/utils.js +1 -1
  34. package/support/revision.js +1 -1
  35. package/views/2d/AnimationManager.js +1 -1
  36. package/views/2d/FrameTask.js +1 -1
  37. package/views/2d/engine/webgl/ClippingInfo.js +1 -1
  38. package/views/2d/engine/webgl/Mesh2D.js +1 -1
  39. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueDebugLayerView.js +1 -1
  40. package/views/2d/input/MapViewInputManager.js +1 -1
  41. package/views/2d/input/handlers/KeyPan.js +1 -1
  42. package/views/2d/input/handlers/KeyRotate.js +1 -1
  43. package/views/2d/layers/BaseDynamicLayerView2D.js +1 -1
  44. package/views/2d/layers/BaseLayerView2D.js +1 -1
  45. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  46. package/views/2d/layers/CatalogDynamicGroupLayerView2D.js +1 -1
  47. package/views/2d/layers/CatalogLayerView2D.js +1 -1
  48. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  49. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  50. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  51. package/views/2d/layers/GroupLayerView2D.js +1 -1
  52. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  53. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  54. package/views/2d/layers/KMLLayerView2D.js +1 -1
  55. package/views/2d/layers/KnowledgeGraphLayerView2D.js +1 -1
  56. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  57. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  58. package/views/2d/layers/MediaLayerView2D.js +1 -1
  59. package/views/2d/layers/RouteLayerView2D.js +1 -1
  60. package/views/2d/layers/TileLayerView2D.js +1 -1
  61. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  62. package/views/2d/layers/VideoLayerView2D.js +1 -1
  63. package/views/2d/layers/WMSLayerView2D.js +1 -1
  64. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  65. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  66. package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
  67. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  68. package/views/2d/navigation/MapViewNavigation.js +1 -1
  69. package/views/2d/navigation/ZoomBox.js +1 -1
  70. package/views/2d/navigation/actions/Pan.js +1 -1
  71. package/views/2d/navigation/actions/Pinch.js +1 -1
  72. package/views/2d/support/clippingUtils.js +5 -0
  73. package/views/2d/support/hitTestUtils.js +1 -1
  74. package/views/2d/viewpointUtils.js +1 -1
  75. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  76. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  77. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  78. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  79. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  80. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  81. package/views/3d/layers/graphics/Labeler.js +1 -1
  82. package/views/3d/layers/graphics/labelPlacement.js +1 -1
  83. package/views/3d/terrain/TerrainRenderer.js +1 -1
  84. package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
  85. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  86. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  87. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  88. package/views/draw/DrawOperation.js +1 -1
  89. package/views/input/InputManager.js +1 -1
  90. package/views/input/keys.js +1 -1
  91. package/views/interactive/snapping/SnappingManager.js +1 -1
  92. package/widgets/BasemapLayerList.js +1 -1
  93. package/widgets/Editor/workflowUtils.js +1 -1
  94. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  95. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  96. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  97. package/widgets/FeatureTable.js +1 -1
  98. package/widgets/LayerList.js +1 -1
  99. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  100. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  101. package/widgets/OrientedImageryViewer.js +1 -1
  102. package/widgets/Popup.js +1 -1
  103. package/widgets/TableList.js +1 -1
  104. package/assets/esri/core/workers/chunks/13b6de78894ba1a70ace.js +0 -1
  105. package/assets/esri/core/workers/chunks/17a33c1eca0f2908b1a1.js +0 -1
  106. package/assets/esri/core/workers/chunks/187e056c251e69c9b5d2.js +0 -1
  107. package/assets/esri/core/workers/chunks/2427699e34e1895ed024.js +0 -1
  108. package/assets/esri/core/workers/chunks/4e9740f3955a8c45fb2d.js +0 -1
  109. package/assets/esri/core/workers/chunks/5c9e6d1a88fac48baf3a.js +0 -1
  110. package/assets/esri/core/workers/chunks/5f5f6bba98e5671e63a7.js +0 -1
  111. package/assets/esri/core/workers/chunks/7bba67d345da6eced804.js +0 -1
  112. package/assets/esri/core/workers/chunks/92fc6c48ff9f50a7351a.js +0 -1
  113. package/assets/esri/core/workers/chunks/955d7a0c8b2cdabfa8a3.js +0 -1
  114. package/assets/esri/core/workers/chunks/99283ac67e6b73695df7.js +0 -1
  115. package/assets/esri/core/workers/chunks/b9e8c2e2c5b4c9564319.js +0 -1
  116. package/assets/esri/core/workers/chunks/d344e99dd999aaaabbe3.js +0 -1
  117. package/assets/esri/core/workers/chunks/e78e92e024275eccea4e.js +0 -1
  118. package/assets/esri/core/workers/chunks/f7cfdba77cb614fd3725.js +0 -1
  119. package/assets/esri/core/workers/chunks/fc2a12f9e4068ab89628.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7510,1053],{11053:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},55359:(e,t,s)=>{s.d(t,{q:()=>n});var i=s(57219);class n{constructor(e,t){this._storage=new i.F,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},57219:(e,t,s)=>{s.d(t,{F:()=>a,Mn:()=>o});var i,n,r=s(3694);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.A,this._users=new r.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new u(s,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0;class u{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},67482:(e,t,s)=>{function i(e){return null!=a(e)||null!=o(e)}function n(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let s=!0;if(h&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,i=0;for(;!t&&i<=e.length;)t=!u.test(e[i]),i++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const s=t.groups,i=+s.year,n=+s.month-1,r=+s.day,o=+(s.hours??"0"),a=+(s.minutes??"0"),u=+(s.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const h=s.ms??"0",d=h?+h.padEnd(3,"0").substring(0,3):0;let c;if(s.isUTC||!s.offsetSign)c=Date.UTC(i,n,r,o,a,u,d);else{const e=+s.offsetHours,t=+s.offsetMinutes;c=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,n,r,o,a,u,d)}return Number.isNaN(c)?null:c}s.d(t,{Br:()=>n,Cq:()=>i,_U:()=>r});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,h=!Number.isNaN(new Date("technology 10").getTime())},75503:(e,t,s)=>{s.d(t,{w:()=>o});var i=s(4576),n=s(3694),r=s(11006);class o{constructor(e=9,t){this._compareMinX=d,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),I.prune(),S.prune(),v.prune()}all(e){a(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(_(e,s))for(b.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;_(e,o)&&(s.leaf?t(r):g(e,o)?a(r,t):b.push(r))}s=b.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!_(e,t))return!1;for(b.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(_(e,r)){if(t.leaf||g(e,r))return!0;b.push(n)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(S.clear(),v.clear();s||S.length>0;){if(s||(s=S.pop(),n=S.data[S.length-1],r=v.pop()??0,o=!0),s.leaf&&(t=(0,i.qh)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),S.push(s),this._condense(S),this;o||s.leaf||!g(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(S.push(s),v.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new F(e.slice(t,s+1));return l(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new z([]);o.height=i;const a=Math.ceil(n/r),u=a*Math.ceil(Math.sqrt(r));x(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);x(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,i-1))}}return l(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);S.clear();const r=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=f(o),l=m(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(n,this._data,t,S);for(r.children.push(e),h(r,n);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)h(t.data[i],e)}(n,S,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),a=s.leaf?new F(o):new z(o);a.height=s.height,l(s,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new z([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,s,this._toBBox),l=y(t,a),h=f(t)+f(a);l<i?(i=l,r=o,n=h<n?h:n):l===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:d,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=u(e,0,t,n),o=u(e,s-t,s,n);let a=p(r)+p(o);for(let i=t;i<s-t;i++){const t=e.children[i];h(r,e.leaf?n(t):t),a+=p(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?n(t):t),a+=p(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.qh)(r,s,r.length,n.indexHint),1)}else this.clear();else l(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let s=e;for(I.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else I.pushArray(s.children);s=I.pop()??null}}function l(e,t){u(e,0,e.children.length,t,e)}function u(e,t,s,i,n){n||(n=new F([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],h(n,e.leaf?i(r):r);return n}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function f(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const b=new n.A,I=new n.A,S=new n.A,v=new n.A({deallocator:void 0});class B{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class M extends B{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class F extends M{constructor(e){super(),this.children=e,this.leaf=!0}}class z extends M{constructor(e){super(),this.children=e,this.leaf=!1}}},36708:(e,t,s)=>{s.d(t,{C_:()=>c,OH:()=>m,Vh:()=>y,on:()=>d,pc:()=>g,wB:()=>l,z7:()=>u}),s(60999),s(5503);var i=s(37955),n=s(36563),r=s(97768),o=s(74887),a=s(14012);function l(e,t,s={}){return h(e,t,s,f)}function u(e,t,s={}){return h(e,t,s,p)}function h(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.xt)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function d(e,t,s,o={}){let a=null,u=null,h=null;function d(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function c(e){o.once&&o.once&&(0,r.xt)(h),s(e)}const f=l(e,((e,s)=>{d(),(0,i.wb)(e)&&(a=e,u=(0,i.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,n.hA)((()=>{f.remove(),d()})),h}function c(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.xt)(a)}return new Promise(((i,r)=>{a=(0,n.vE)([(0,o.u7)(s,(()=>{l(),r((0,o.NK)())})),h(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??f)])}))}(e,p,t)}function f(e){return!0}function p(e){return!!e}s(80559);const m={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},17136:(e,t,s)=>{s.d(t,{el:()=>S});var i=s(92602),n=s(49186),r=s(53966),o=s(39829),a=s(82799),l=s(80754),u=s(21325),h=s(28735),d=(s(59456),s(78888)),c=s(65864),f=s(2272),p=s(84952),m=s(92300);const y=()=>r.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new n.A(e)}const s=(0,l.r8)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],l=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),u=(a-r)/l,h=(o-n)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const i=e*t,o=h*i+n,a=u*i+r;s.push([o,a])}const e=(l+Math.floor(d-1)*t)/2,i=h*e+n,o=u*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,h.ci)(t,!0)}return s&&(e=(0,l.kS)(e,s)),e}function b(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,l.kd)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,l.kd)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,l.kd)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,l.kd)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function I(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,l.r8)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.kd)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(g(e))for(const t of(0,l.r8)(r))e[n]=e[n].addRing(t);else if(_(e))for(const t of(0,l.r8)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function S(e,t,s){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let r,g,_,v,B,M,F,z,A=0;const w=[],R=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,g=(0,u.Vp)(r),_=r.isWebMercator,M=_?102100:4326,v=l.j7[M].maxX,B=l.j7[M].minX,F=l.j7[M].plus180Line,z=l.j7[M].minus180Line),g)if("mesh"===t.type)R.push(t);else if("point"===t.type)R.push(b(t.clone(),v,B));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,v,B))),R.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);R.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,s=(0,l.kd)(e.xmin,B)*(2*v);let i=0===s?t.clone():(0,l.kS)(t.clone(),s);e.offset(s,0),e.intersects(F)&&e.xmax!==v?(A=e.xmax>A?e.xmax:A,i=x(i,_),w.push(i),R.push("cut")):e.intersects(z)&&e.xmin!==B?(A=e.xmax*(2*v)>A?e.xmax*(2*v):A,i=x(i,_,360),w.push(i),R.push("cut")):R.push(i)}else R.push(t.clone());else R.push(t);else R.push(t);let E=(0,l.kd)(A,v),T=-90;const j=E,X=new a.A;for(;E>0;){const e=360*E-180;X.addPath([[e,T],[e,-1*T]]),T*=-1,E--}if(w.length>0&&j>0){const t=I(w,await async function(e,t,s,i){const n=(0,f.Dl)(e),r=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,u.YX)(r),target:JSON.stringify({geometryType:(0,c.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,d.A)(n.path+"/cut",o),{cutIndexes:l,geometries:h=[]}=a.data;return{cutIndexes:l,geometries:h.map((e=>{const t=(0,c.rS)(e);return t.spatialReference=r,t}))}}(n,w,X,s)),i=[],r=[];for(let s=0;s<R.length;s++){const n=R[s];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(_?(0,h.Gh)(n):n)}}if(!i.length)return r;const o=await async function(e,t,s){const i="string"==typeof e?(0,p.An)(e):e,n=t[0].spatialReference,r=(0,c.$B)(t[0]),o={...s,query:{...i.query,f:"json",sr:(0,u.YX)(n),geometries:JSON.stringify((0,m.X)(t))}},{data:a}=await(0,d.A)(i.path+"/simplify",o);return(0,m.V)(a.geometries,r,n)}(n,i,s),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(_?(0,h.Gh)(o.shift()):o.shift())}return a}const L=[];for(let e=0;e<R.length;e++){const t=R[e];if("cut"!==t)L.push(t);else{const e=w.shift();L.push(!0===_?(0,h.Gh)(e):e)}}return L}},80754:(e,t,s)=>{s.d(t,{j7:()=>o,kS:()=>l,kd:()=>a,r8:()=>u});var i=s(82799),n=s(16930),r=s(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,r.Bi)(e)?e.rings:e.paths}},6518:(e,t,s)=>{s.d(t,{F:()=>a});var i=s(44208),n=s(75503),r=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,s)=>{s.d(t,{A:()=>p});var i=s(4576),n=s(49186),r=s(65529),o=s(53966),a=s(70328),l=s(19419),u=s(90708),h=s(6518),d=s(51441),c=s(63517);const f=(0,a.vt)();class p{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.A,this.featureAdapter=c.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,d.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Jt)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(this._markedIds.add(t),s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.jQ)(null!=i?i:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},33032:(e,t,s)=>{s.d(t,{H:()=>n,L:()=>i});const i=1;function n(e,t){let s=0;for(const i of t){const t=i.attributes?.[e];"number"==typeof t&&isFinite(t)&&(s=Math.max(s,t))}return s}},29432:(e,t,s)=>{s.r(t),s.d(t,{default:()=>S});var i=s(49186),n=s(65864),r=s(21325),o=s(90708),a=s(33032),l=s(83221),u=s(31464),h=s(36791),d=s(64714),c=s(82832),f=s(95466),p=s(98453),m=s(30524),y=s(56400);const g=r.KK,_={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:r.KK},x={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!1,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};function b(e){return(0,n.fT)(e)?null!=e.z:!!e.hasZ}function I(e){return(0,n.fT)(e)?null!=e.m:!!e.hasM}class S{constructor(){this._queryEngine=null,this._nextObjectId=null}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e){const t=[],{features:s}=e,n=this._inferLayerProperties(s,e.fields),r=e.fields||[],o=null!=e.hasM?e.hasM:!!n.hasM,c=null!=e.hasZ?e.hasZ:!!n.hasZ,b=!e.spatialReference&&!n.spatialReference,I=b?g:e.spatialReference||n.spatialReference,S=b?_:null,v=e.geometryType||n.geometryType,B=!v;let M=e.objectIdField||n.objectIdField,F=e.timeInfo;const z=new f.A(r);if(!B&&(b&&t.push({name:"feature-layer:spatial-reference-not-found",message:"Spatial reference not provided or found in features. Defaults to WGS84"}),!v))throw new i.A("feature-layer:missing-property","geometryType not set and couldn't be inferred from the provided features");if(!M)throw new i.A("feature-layer:missing-property","objectIdField not set and couldn't be found in the provided fields");if(n.objectIdField&&M!==n.objectIdField&&(t.push({name:"feature-layer:duplicated-oid-field",message:`Provided objectIdField "${M}" doesn't match the field name "${n.objectIdField}", found in the provided fields`}),M=n.objectIdField),M&&!n.objectIdField){const e=z.get(M);e?(M=e.name,e.type="esriFieldTypeOID",e.editable=!1,e.nullable=!1):r.unshift({alias:M,name:M,type:"esriFieldTypeOID",editable:!1,nullable:!1})}for(const e of r){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new i.A("feature-layer:invalid-field-name","field name is missing",{field:e});if(e.name===M&&(e.type="esriFieldTypeOID"),!p.m.jsonValues.includes(e.type))throw new i.A("feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});null==e.length&&(e.length=(0,m._b)(e))}const A={};for(const e of r)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,m.lD)(e);void 0!==t&&(A[e.name]=t)}if(F){if(F.startTimeField){const e=z.get(F.startTimeField);e?(F.startTimeField=e.name,e.type="esriFieldTypeDate"):F.startTimeField=null}if(F.endTimeField){const e=z.get(F.endTimeField);e?(F.endTimeField=e.name,e.type="esriFieldTypeDate"):F.endTimeField=null}if(F.trackIdField){const e=z.get(F.trackIdField);e?F.trackIdField=e.name:(F.trackIdField=null,t.push({name:"feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:F}}))}F.startTimeField||F.endTimeField||(t.push({name:"feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing or invalid",details:{timeInfo:F}}),F=null)}const w=z.dateFields.length?{timeZoneIANA:e.dateFieldsTimeZone??y.n$}:null;this._createDefaultAttributes=(0,d.Vx)(A,M);const R={warnings:t,featureErrors:[],layerDefinition:{...x,drawingInfo:(0,d.F0)(v),templates:(0,d.e2)(A),extent:S,geometryType:v,objectIdField:M,fields:r,hasZ:c,hasM:o,timeInfo:F,dateFieldsTimeReference:w},assignedObjectIds:{}};if(this._queryEngine=new h.d({fieldsIndex:f.A.fromLayerJSON({fields:r,timeInfo:F,dateFieldsTimeReference:w}),geometryType:v,hasM:o,hasZ:c,objectIdField:M,spatialReference:I,featureStore:new l.A({geometryType:v,hasM:o,hasZ:c}),timeInfo:F,cacheSpatialQueries:!0}),!s?.length)return this._nextObjectId=a.L,R;const E=(0,a.H)(M,s);return this._nextObjectId=E+1,await(0,u.Nk)(s,I),this._loadInitialFeatures(R,s)}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([(0,c.$1)(t,s),(0,u.Nk)(e.adds,t),(0,u.Nk)(e.updates,t)]),this._applyEdits(e)}queryFeatures(e,t={}){return this._queryEngine.executeQuery(e,t.signal)}queryFeatureCount(e,t={}){return this._queryEngine.executeQueryForCount(e,t.signal)}queryObjectIds(e,t={}){return this._queryEngine.executeQueryForIds(e,t.signal)}queryExtent(e,t={}){return this._queryEngine.executeQueryForExtent(e,t.signal)}querySnapping(e,t={}){return this._queryEngine.executeQueryForSnapping(e,t.signal)}_inferLayerProperties(e,t){let s,i,r=null,o=null,a=null;for(const t of e){const e=t.geometry;if(null!=e&&(r||(r=(0,n.$B)(e)),o||(o=e.spatialReference),null==s&&(s=b(e)),null==i&&(i=I(e)),r&&o&&null!=s&&null!=i))break}if(t&&t.length){let e=null;t.some((t=>{const s="esriFieldTypeOID"===t.type,i=!t.type&&t.name&&"objectid"===t.name.toLowerCase();return e=t,s||i}))&&(a=e.name)}return{geometryType:r,spatialReference:o,objectIdField:a,hasM:i,hasZ:s}}async _loadInitialFeatures(e,t){const{geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:l,featureStore:h,fieldsIndex:d}=this._queryEngine,f=[];for(const i of t){if(null!=i.uid&&(e.assignedObjectIds[i.uid]=-1),i.geometry&&s!==(0,n.$B)(i.geometry)){e.featureErrors.push((0,c.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=(0,c.MB)(d,t,i.attributes,!0);r?e.featureErrors.push(r):(this._assignObjectId(t,i.attributes,!0),i.attributes=t,null!=i.uid&&(e.assignedObjectIds[i.uid]=i.attributes[a]),null!=i.geometry&&(i.geometry=(0,u.Cv)(i.geometry,i.geometry.spatialReference,l)),f.push(i))}h.addMany((0,o.Di)([],f,s,r,i,a));const{fullExtent:p,timeExtent:m}=await this._queryEngine.fetchRecomputedExtents();if(e.layerDefinition.extent=p,m){const{start:t,end:s}=m;e.layerDefinition.timeInfo.timeExtent=[t,s]}return e}async _applyEdits(e){const{adds:t,updates:s,deletes:i}=e,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(n,t),s?.length&&this._applyUpdateEdits(n,s),i?.length){for(const e of i)n.deleteResults.push((0,c.bP)(e));this._queryEngine.featureStore.removeManyById(i)}const{fullExtent:r,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:r,timeExtent:o,featureEditResults:n}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:i,hasM:r,hasZ:a,objectIdField:l,spatialReference:h,featureStore:d,fieldsIndex:f}=this._queryEngine,p=[];for(const r of t){if(r.geometry&&i!==(0,n.$B)(r.geometry)){s.push((0,c.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),o=(0,c.MB)(f,t,r.attributes);if(o)s.push(o);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,null!=r.uid){const t=r.attributes[l];e.uidToObjectId[r.uid]=t}if(null!=r.geometry){const e=r.geometry.spatialReference??h;r.geometry=(0,u.Cv)((0,c.CR)(r.geometry,e),e,h)}p.push(r),s.push((0,c.bP)(r.attributes[l]))}}d.addMany((0,o.Di)([],p,i,a,r,l))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:l,featureStore:h,fieldsIndex:d}=this._queryEngine;for(const f of t){const{attributes:t,geometry:p}=f,m=t?.[a];if(null==m){e.push((0,c.Yx)(`Identifier field ${a} missing`));continue}if(!h.has(m)){e.push((0,c.Yx)(`Feature with object id ${m} missing`));continue}const y=(0,o.oN)(h.getFeature(m),s,r,i);if(null!=p){if(s!==(0,n.$B)(p)){e.push((0,c.Yx)("Incorrect geometry type."));continue}const t=p.spatialReference??l;y.geometry=(0,u.Cv)((0,c.CR)(p,t),t,l)}if(t){const s=(0,c.MB)(d,y.attributes,t);if(s){e.push(s);continue}}h.add((0,o.E2)(y,s,r,i,a)),e.push((0,c.bP)(m))}}_assignObjectId(e,t,s=!1){const i=this._queryEngine.objectIdField;s&&t&&isFinite(t[i])?e[i]=t[i]:e[i]=this._nextObjectId++}}},64714:(e,t,s)=>{s.d(t,{F0:()=>a,Vx:()=>h,e2:()=>d,f:()=>c});var i=s(44208),n=s(4718),r=s(99352),o=s(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function h(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this.${t} = null;`;for(const t in e)s+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[t]:null,...e})}}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832:(e,t,s)=>{s.d(t,{$1:()=>y,CR:()=>m,MB:()=>c,Yx:()=>l,bP:()=>h});var i=s(67482),n=s(21325),r=s(30524);class o{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function l(e){return new a(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function h(e){return new u(e)}const d=new Set;function c(e,t,s,i=!1){d.clear();for(const n in s){const o=e.get(n);if(!o)continue;const a=f(o,s[n]);if(d.add(o.name),o&&(i||o.editable)){const e=(0,r.CJ)(o,a);if(e)return l((0,r.uo)(e,o,a));t[o.name]=a}}for(const t of e?.requiredFields??[])if(!d.has(t.name))return l(`missing required field "${t.name}"`);return null}function f(e,t){let s=t;return(0,r.WA)(e)&&"string"==typeof t?s=parseFloat(t):(0,r.yM)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,r.vE)(e)&&"string"==typeof t&&(s=(0,i._U)(t)),(0,r.WX)(s)}let p;function m(e,t){if(!e||!(0,n.fn)(t))return e;if("rings"in e||"paths"in e){if(null==p)throw new TypeError("geometry engine not loaded");return p.simplify(t,e)}return e}async function y(e,t){!(0,n.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==p&&(p=await Promise.all([s.e(9930),s.e(7559)]).then(s.bind(s,47559))),p}()}},92300:(e,t,s)=>{s.d(t,{V:()=>r,X:()=>n});var i=s(65864);function n(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function r(e,t,s){const n=(0,i.xD)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=s,t}))}},2272:(e,t,s)=>{s.d(t,{Dl:()=>o,jV:()=>r,lF:()=>a}),s(92602),s(70333);var i=s(4718),n=s(84952);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.An)(e):(0,i.o8)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))i[n]=r.map((e=>a({item:e},t,s).item));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(926)},93470:(e,t,s)=>{s.d(t,{Cb:()=>n,HW:()=>u,JZ:()=>a,WR:()=>o,b6:()=>h,nC:()=>l,yM:()=>r});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={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},l={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},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8961,5899,3069],{39516:(e,t,r)=>{async function n(e,t){const{WhereClause:n}=await Promise.all([r.e(835),r.e(4800)]).then(r.bind(r,50835));return n.create(e,t)}function i(e,t){return"1=1"===e?t:"1=1"===t?e:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>n,m:()=>i})},3330:(e,t,r)=>{r.d(t,{GB:()=>i,Qo:()=>s,Y4:()=>o});var n=r(96285);class i{}function o(e){return e instanceof n.bo?e===i.instance:"unknown"===e?.toString().toLowerCase()}function s(e){return o(e)?i.instance:e}i.instance=new n.oh("Etc/UTC")},13069:(e,t,r)=>{r.d(t,{lk:()=>i,vD:()=>s,yS:()=>o});const n="randomUUID"in crypto;function i(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}},70328:(e,t,r)=>{r.d(t,{BI:()=>h,Ej:()=>u,Hq:()=>p,Ie:()=>f,Jt:()=>m,Ne:()=>c,RF:()=>l,aI:()=>S,fA:()=>o,hZ:()=>y,iT:()=>a,is:()=>g,qv:()=>w,vI:()=>d,v_:()=>v,vt:()=>i,w1:()=>s});var n=r(5443);function i(e=v){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,n,o,s,l=i()){return l[0]=e,l[1]=t,l[2]=r,l[3]=n,l[4]=o,l[5]=s,l}function s(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t,r=0,n=t.length/3){let i=e[0],o=e[1],s=e[2],l=e[3],a=e[4],p=e[5];for(let e=0;e<n;e++)i=Math.min(i,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),p=Math.max(p,t[r+3*e+2]);e[0]=i,e[1]=o,e[2]=s,e[3]=l,e[4]=a,e[5]=p}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function c(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function f(e){return e?y(e,w):i(w)}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function h(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function S(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],v=[0,0,0,0,0,0];i()},17136:(e,t,r)=>{r.d(t,{el:()=>b});var n=r(92602),i=r(49186),o=r(53966),s=r(39829),l=r(82799),a=r(80754),p=r(21325),u=r(28735),c=(r(59456),r(78888)),d=r(65864),y=r(2272),f=r(84952),m=r(92300);const h=()=>o.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function S(e){return"polyline"===e[0].type}function w(e,t,r){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h().error(e),new i.A(e)}const r=(0,a.r8)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const i=e[n][0],o=e[n][1],s=e[n+1][0],l=e[n+1][1],a=Math.sqrt((s-i)*(s-i)+(l-o)*(l-o)),p=(l-o)/a,u=(s-i)/a,c=a/t;if(c>1){for(let e=1;e<=c-1;e++){const n=e*t,s=u*n+i,l=p*n+o;r.push([s,l])}const e=(a+Math.floor(c-1)*t)/2,n=u*e+i,s=p*e+o;r.push([n,s])}r.push([s,l])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:n,spatialReference:e.spatialReference}):new l.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.ci)(t,!0)}return r&&(e=(0,a.kS)(e,r)),e}function v(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,a.kd)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,a.kd)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,a.kd)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,a.kd)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function _(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const i=t.cutIndexes[n],o=t.geometries[n],s=(0,a.r8)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,a.kd)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(n,0))}return!0}}))}if(i===r){if(g(e))for(const t of(0,a.r8)(o))e[i]=e[i].addRing(t);else if(S(e))for(const t of(0,a.r8)(o))e[i]=e[i].addPath(t)}else r=i,e[i]=o}return e}async function b(e,t,r){if(!Array.isArray(e))return b([e],t);t&&"string"!=typeof t&&h().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let o,g,S,M,x,T,A,F,O=0;const N=[],R=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,g=(0,p.Vp)(o),S=o.isWebMercator,T=S?102100:4326,M=a.j7[T].maxX,x=a.j7[T].minX,A=a.j7[T].plus180Line,F=a.j7[T].minus180Line),g)if("mesh"===t.type)R.push(t);else if("point"===t.type)R.push(v(t.clone(),M,x));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>v(e,M,x))),R.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);R.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,a.kd)(e.xmin,x)*(2*M);let n=0===r?t.clone():(0,a.kS)(t.clone(),r);e.offset(r,0),e.intersects(A)&&e.xmax!==M?(O=e.xmax>O?e.xmax:O,n=w(n,S),N.push(n),R.push("cut")):e.intersects(F)&&e.xmin!==x?(O=e.xmax*(2*M)>O?e.xmax*(2*M):O,n=w(n,S,360),N.push(n),R.push("cut")):R.push(n)}else R.push(t.clone());else R.push(t);else R.push(t);let Z=(0,a.kd)(O,M),C=-90;const I=Z,L=new l.A;for(;Z>0;){const e=360*Z-180;L.addPath([[e,C],[e,-1*C]]),C*=-1,Z--}if(N.length>0&&I>0){const t=_(N,await async function(e,t,r,n){const i=(0,y.Dl)(e),o=t[0].spatialReference,s={...n,responseType:"json",query:{...i.query,f:"json",sr:(0,p.YX)(o),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},l=await(0,c.A)(i.path+"/cut",s),{cutIndexes:a,geometries:u=[]}=l.data;return{cutIndexes:a,geometries:u.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=o,t}))}}(i,N,L,r)),n=[],o=[];for(let r=0;r<R.length;r++){const i=R[r];if("cut"!==i)o.push(i);else{const i=t.shift(),s=e[r];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&i.rings.length>=s.rings.length?(n.push(i),o.push("simplify")):o.push(S?(0,u.Gh)(i):i)}}if(!n.length)return o;const s=await async function(e,t,r){const n="string"==typeof e?(0,f.An)(e):e,i=t[0].spatialReference,o=(0,d.$B)(t[0]),s={...r,query:{...n.query,f:"json",sr:(0,p.YX)(i),geometries:JSON.stringify((0,m.X)(t))}},{data:l}=await(0,c.A)(n.path+"/simplify",s);return(0,m.V)(l.geometries,o,i)}(i,n,r),l=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?l.push(t):l.push(S?(0,u.Gh)(s.shift()):s.shift())}return l}const E=[];for(let e=0;e<R.length;e++){const t=R[e];if("cut"!==t)E.push(t);else{const e=N.shift();E.push(!0===S?(0,u.Gh)(e):e)}}return E}},80754:(e,t,r)=>{r.d(t,{j7:()=>s,kS:()=>a,kd:()=>l,r8:()=>p});var n=r(82799),i=r(16930),o=r(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const r=p(e);for(const e of r)for(const r of e)r[0]+=t;return e}function p(e){return(0,o.Bi)(e)?e.rings:e.paths}},35079:(e,t,r)=>{r.r(t),r.d(t,{default:()=>K});var n=r(90237),i=(r(59456),r(52106)),o=(r(61147),r(5503)),s=r(49186),l=r(4718),a=r(92071),p=r(93637),u=r(67076),c=r(10107),d=(r(44208),r(53966),r(36005)),y=r(40608),f=r(43937),m=r(57251),h=r(19419),g=r(17136),S=r(21325),w=r(13600),v=(r(87811),r(62885));let _=class extends o.A{constructor(e){super(e),this.addHandles([this.on("before-add",(e=>{null==e.item&&e.preventDefault()})),this.on("after-add",(e=>this._own(e.item))),this.on("after-remove",(e=>this._release(e.item)))])}get owner(){return this._get("owner")}set owner(e){e!==this._get("owner")&&(this._releaseAll(),this._set("owner",e),this._ownAll())}_ownAll(){for(const e of this.items)this._own(e)}_releaseAll(){for(const e of this.items)this._release(e)}_createNewInstance(e){return this.itemType?new(o.A.ofType(this.itemType.Type))(e):new o.A(e)}};(0,n._)([(0,c.MZ)()],_.prototype,"owner",null),_=(0,n._)([(0,y.$)("esri.core.support.OwningCollection")],_);var b=r(4146),M=r(63074),x=r(25036),T=r(56507),A=r(7695);let F=class extends _{_own(e){e.layer&&"remove"in e.layer&&e.layer!==this.owner&&e.layer.remove(e),e.layer=this.owner}_release(e){e.layer===this.owner&&(e.layer=null)}};(0,n._)([(0,A.u)({Type:i.A,ensureType:(0,T.dp)(i.A)})],F.prototype,"itemType",void 0),F=(0,n._)([(0,y.$)("esri.support.GraphicsCollection")],F);var O=r(88625);let N=class extends((0,M.d)((0,x.j)(b.A))){constructor(e){super(e),this.elevationInfo=null,this.graphics=new F,this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}on(e,t){return super.on(e,t)}graphicChanged(e){this.emit("graphic-update",e)}};var R,Z;(0,n._)([(0,c.MZ)({type:O.A})],N.prototype,"elevationInfo",void 0),(0,n._)([(0,c.MZ)((R=F,Z="graphics",{type:R,cast:v.H,set(e){const t=(0,v.V)(e,this._get(Z),R);t.owner=this,this._set(Z,t)}}))],N.prototype,"graphics",void 0),(0,n._)([(0,c.MZ)({type:["show","hide"]})],N.prototype,"listMode",void 0),(0,n._)([(0,c.MZ)()],N.prototype,"screenSizePerspectiveEnabled",void 0),(0,n._)([(0,c.MZ)({readOnly:!0})],N.prototype,"type",void 0),(0,n._)([(0,c.MZ)({constructOnly:!0})],N.prototype,"internal",void 0),N=(0,n._)([(0,y.$)("esri.layers.GraphicsLayer")],N);const C=N;var I=r(33032),L=r(16131),E=r(8303),J=r(20437),j=r(94985),D=r(31593),z=r(53930),P=r(68249),G=r(16930),q=r(5443);function B(e){return"markup"===e.featureCollectionType||e.layers.some((e=>null!=e.layerDefinition.visibilityField||!V(e)))}function V({layerDefinition:e,featureSet:t}){const r=e.geometryType??t.geometryType;return H.find((t=>r===t.geometryTypeJSON&&e.drawingInfo?.renderer?.symbol?.type===t.identifyingSymbol.type))}function $(){return new q.A({xmin:-180,ymin:-90,xmax:180,ymax:90})}const Q=new J.A({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),k=new J.A({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0,length:255});let U=class extends C{constructor(e){super(e),this.visibilityMode="inherited"}initialize(){for(const e of this.graphics)e.sourceLayer=this.layer;this.graphics.on("after-add",(e=>{e.item.sourceLayer=this.layer})),this.graphics.on("after-remove",(e=>{e.item.sourceLayer=null}))}get fullExtent(){const e=this.layer?.spatialReference,t=this.fullBounds;return e?null==t?(0,m.projectOrLoad)($(),e).geometry:(0,h.w1)(t,e):null}get fullBounds(){const e=this.layer?.spatialReference;if(!e)return null;const t=(0,h.Ie)();return this.graphics.forEach((r=>{const n=null!=r.geometry?(0,m.projectOrLoad)(r.geometry,e).geometry:null;null!=n&&(0,h.fT)(t,"point"===n.type?n:n.extent,t)})),(0,h.aI)(t,h.qv)?null:t}get sublayers(){return this.graphics}};(0,n._)([(0,c.MZ)({readOnly:!0})],U.prototype,"fullExtent",null),(0,n._)([(0,c.MZ)({readOnly:!0})],U.prototype,"fullBounds",null),(0,n._)([(0,c.MZ)({readOnly:!0})],U.prototype,"sublayers",null),(0,n._)([(0,c.MZ)()],U.prototype,"layer",void 0),(0,n._)([(0,c.MZ)()],U.prototype,"layerId",void 0),(0,n._)([(0,c.MZ)({readOnly:!0})],U.prototype,"visibilityMode",void 0),U=(0,n._)([(0,y.$)("esri.layers.MapNotesLayer.MapNotesSublayer")],U);const H=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:(new j.A).toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:(new D.A).toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:(new z.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:(new z.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:(new P.A).toJSON()}];let W=class extends((0,M.d)((0,x.j)((0,L.q)((0,E.A)((0,a.P)(b.A)))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=G.A.WGS84,this.sublayers=new o.A(H.map((e=>new U({id:e.id,layerId:e.layerId,title:e.title,layer:this})))),this.title="Map Notes",this.type="map-notes",this.visibilityMode="inherited"}readCapabilities(e,t,r){return{operations:{supportsMapNotesEditing:!B(t)&&"portal-item"!==r?.origin}}}readFeatureCollections(e,t,r){if(!B(t))return null;const n=t.layers.map((e=>{const t=new w.default;return t.read(e,r),t}));return new o.A({items:n})}readLegacyfeatureCollectionJSON(e,t){return B(t)?(0,l.o8)(t.featureCollection):null}get fullExtent(){const e=this.spatialReference,t=(0,h.Ie)();return null!=this.sublayers?this.sublayers.forEach((({fullBounds:e})=>null!=e?(0,h.fT)(t,e,t):t),t):this.featureCollectionJSON?.layers.some((e=>e.layerDefinition.extent))&&this.featureCollectionJSON.layers.forEach((r=>{const n=(0,m.projectOrLoad)(r.layerDefinition.extent,e).geometry;null!=n&&(0,h.fT)(t,n,t)})),(0,h.aI)(t,h.qv)?(0,m.projectOrLoad)($(),e).geometry:(0,h.w1)(t,e)}readMinScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.minScale)return e.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.maxScale)return e.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?G.A.fromJSON(t.layers[0].layerDefinition.spatialReference):G.A.WGS84}readSublayers(e,t,r){if(B(t))return null;const n=[];let s=t.layers.reduce(((e,t)=>Math.max(e,t.layerDefinition.id??-1)),-1)+1;for(const e of t.layers){const{layerDefinition:t,featureSet:r}=e,o=t.id??s++,l=V(e);if(null!=l){const e=new U({id:l.id,title:t.name,layerId:o,layer:this,graphics:r.features.map((({geometry:e,symbol:t,attributes:r,popupInfo:n})=>i.A.fromJSON({attributes:r,geometry:e,symbol:t,popupTemplate:n})))});n.push(e)}}return new o.A(n)}writeSublayers(e,t,r,n){const{minScale:i,maxScale:o}=this;if(null==e)return;const l=e.some((e=>e.graphics.length>0));if(!this.capabilities.operations.supportsMapNotesEditing)return void(l&&n?.messages?.push(new s.A("map-notes-layer:editing-not-supported","New map notes cannot be added to this layer")));const a=[];let u=this.spatialReference.toJSON();e:for(const t of e)for(const e of t.graphics)if(null!=e.geometry){u=e.geometry.spatialReference.toJSON();break e}for(const t of H){const r=e.find((e=>t.id===e.id));this._writeMapNoteSublayer(a,r,t,i,o,u,n)}(0,p.sM)("featureCollection.layers",a,t)}get textLayer(){return this._findSublayer("textLayer")}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}read(e,t){"featureCollection"in e&&(e=(0,l.o8)(e),Object.assign(e,e.featureCollection)),super.read(e,t)}async beforeSave(){if(null==this.sublayers)return;let e=null;const t=[];for(const r of this.sublayers)for(const n of r.graphics)if(null!=n.geometry){const r=n.geometry;e?(0,S.aI)(r.spatialReference,e)||((0,m.canProjectWithoutEngine)(r.spatialReference,e)||(0,m.isLoaded)()||await(0,m.load)(),n.geometry=(0,m.project)(r,e)):e=r.spatialReference,t.push(n)}const r=await(0,g.el)(t.map((e=>e.geometry)));t.forEach(((e,t)=>e.geometry=r[t]))}_findSublayer(e){return null==this.sublayers?null:this.sublayers?.find((t=>t.id===e))??null}_writeMapNoteSublayer(e,t,r,n,i,o,s){const a=[];if(null!=t){for(const e of t.graphics)this._writeMapNote(a,e,r.geometryType,s);this._normalizeObjectIds(a,Q),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:(0,l.o8)(r.identifyingSymbol)}},id:t.layerId,geometryType:r.geometryTypeJSON,minScale:n,maxScale:i,objectIdField:"OBJECTID",fields:[Q.toJSON(),k.toJSON()],spatialReference:o},featureSet:{features:a,geometryType:r.geometryTypeJSON}})}}_writeMapNote(e,t,r,n){if(null==t)return;const{geometry:i,symbol:o,popupTemplate:s}=t;if(null==i)return;if(i.type!==r)return void n?.messages?.push(new u.A("map-notes-layer:invalid-geometry-type",`Geometry "${i.type}" cannot be saved in "${r}" layer`,{graphic:t}));if(null==o)return void n?.messages?.push(new u.A("map-notes-layer:no-symbol","Skipping map notes with no symbol",{graphic:t}));const l={attributes:{...t.attributes},geometry:i.toJSON(),symbol:o.toJSON()};null!=s&&(l.popupInfo=s.toJSON()),e.push(l)}_normalizeObjectIds(e,t){const r=t.name;let n=(0,I.H)(r,e)+1;const i=new Set;for(const t of e){t.attributes||(t.attributes={});const{attributes:e}=t;(null==e[r]||i.has(e[r]))&&(e[r]=n++),i.add(e[r])}}};(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"capabilities",void 0),(0,n._)([(0,d.w)(["portal-item","web-map"],"capabilities",["layers"])],W.prototype,"readCapabilities",null),(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"featureCollections",void 0),(0,n._)([(0,d.w)(["web-map","portal-item"],"featureCollections",["layers"])],W.prototype,"readFeatureCollections",null),(0,n._)([(0,c.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],W.prototype,"featureCollectionJSON",void 0),(0,n._)([(0,d.w)(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],W.prototype,"readLegacyfeatureCollectionJSON",null),(0,n._)([(0,c.MZ)({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],W.prototype,"featureCollectionType",void 0),(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"fullExtent",null),(0,n._)([(0,c.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{target:"featureCollection.showLegend",overridePolicy(){return{enabled:null!=this.featureCollectionJSON}}}}}}})],W.prototype,"legendEnabled",void 0),(0,n._)([(0,c.MZ)({type:["show","hide","hide-children"]})],W.prototype,"listMode",void 0),(0,n._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],W.prototype,"minScale",void 0),(0,n._)([(0,d.w)(["web-map","portal-item"],"minScale",["layers"])],W.prototype,"readMinScale",null),(0,n._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],W.prototype,"maxScale",void 0),(0,n._)([(0,d.w)(["web-map","portal-item"],"maxScale",["layers"])],W.prototype,"readMaxScale",null),(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"multipointLayer",null),(0,n._)([(0,c.MZ)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],W.prototype,"operationalLayerType",void 0),(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"pointLayer",null),(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"polygonLayer",null),(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"polylineLayer",null),(0,n._)([(0,c.MZ)({type:G.A})],W.prototype,"spatialReference",void 0),(0,n._)([(0,d.w)(["web-map","portal-item"],"spatialReference",["layers"])],W.prototype,"readSpatialReference",null),(0,n._)([(0,c.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],W.prototype,"sublayers",void 0),(0,n._)([(0,d.w)("web-map","sublayers",["layers"])],W.prototype,"readSublayers",null),(0,n._)([(0,f.K)("web-map","sublayers")],W.prototype,"writeSublayers",null),(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"textLayer",null),(0,n._)([(0,c.MZ)()],W.prototype,"title",void 0),(0,n._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],W.prototype,"type",void 0),W=(0,n._)([(0,y.$)("esri.layers.MapNotesLayer")],W);const K=W},33032:(e,t,r)=>{r.d(t,{H:()=>i,L:()=>n});const n=1;function i(e,t){let r=0;for(const n of t){const t=n.attributes?.[e];"number"==typeof t&&isFinite(t)&&(r=Math.max(r,t))}return r}},52136:(e,t,r)=>{r.d(t,{p:()=>s});var n=r(90237),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const s=e=>{let t=class extends e{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._)([(0,i.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,n._)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],t),t}},18768:(e,t,r)=>{r.d(t,{b:()=>a});var n=r(90237),i=r(53966),o=r(10107),s=(r(44208),r(87811),r(40608)),l=r(60694);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Jf)(e,i.A.getLogger(this)))}};return(0,n._)([(0,o.MZ)()],t.prototype,"title",null),(0,n._)([(0,o.MZ)({type:String})],t.prototype,"url",null),t=(0,n._)([(0,s.$)("esri.layers.mixins.ArcGISService")],t),t}},29005:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(90237),i=r(69540),o=r(66552),s=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const p=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,i.O)(s.oY)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,n._)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,n._)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,n._)([(0,l.MZ)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,n._)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,n._)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,n._)([(0,a.$)("esri.layers.support.FeatureTemplate")],u);const c=u},33143:(e,t,r)=>{r.d(t,{A:()=>y});var n=r(90237),i=r(69540),o=r(25482),s=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),p=r(43937),u=r(72088),c=r(29005);let d=class extends((0,i.O)(o.oY)){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,u.rS)(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._)([(0,s.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,n._)([(0,s.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,s.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,n._)([(0,l.w)("domains")],d.prototype,"readDomains",null),(0,n._)([(0,p.K)("domains")],d.prototype,"writeDomains",null),(0,n._)([(0,s.MZ)({type:[c.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,n._)([(0,a.$)("esri.layers.support.FeatureType")],d);const y=d},20437:(e,t,r)=>{r.d(t,{A:()=>h});var n,i=r(90237),o=r(66552),s=r(25482),l=r(10107),a=r(56507),p=(r(87811),r(44208),r(93223)),u=r(36005),c=r(40608),d=r(72088),y=r(98453);const f=new o.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=n=class extends s.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?f.fromJSON(r.fieldValueType):null}clone(){return new n({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,i._)([(0,l.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,i._)([(0,l.MZ)()],m.prototype,"description",void 0),(0,i._)([(0,u.w)("description")],m.prototype,"readDescription",null),(0,i._)([(0,l.MZ)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],m.prototype,"domain",void 0),(0,i._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,i._)([(0,l.MZ)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,i._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,i._)([(0,p.e)(y.m)],m.prototype,"type",void 0),(0,i._)([(0,l.MZ)()],m.prototype,"valueType",void 0),(0,i._)([(0,u.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,i._)([(0,l.MZ)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=n=(0,i._)([(0,c.$)("esri.layers.support.Field")],m);const h=m},95466:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(49186),i=r(25482),o=r(53966),s=r(91869),l=r(3330),a=r(30524),p=r(56400),u=r(96285);const c=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],h(e))}static fromLayerJSON(e){return new d(e.fields??[],h(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,n=f(t);if(t&&n){const i=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(n,e),r.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(o.A.getLogger("esri.layers.support.FieldsIndex").error(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),p.n$):m.has(t.type)?p.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===p.L5?l.GB.instance:t===p.n$?u.mQ.utcInstance:(0,s.tE)(c,t,(()=>u.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,i.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function f(e){return(0,a.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function h(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:i}=e,o=(n?"startField"in n?n.startField:n.startTimeField:"")??"",s=(n?"endField"in n?n.endField:n.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,p.ZS)(e.dateFieldsTimeReference):null,a=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.dateFieldsTimeReference?(0,p.ZS)(i.dateFieldsTimeReference):l??p.n$:null,u=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.timeReference?(0,p.ZS)(n.timeReference):l:null,c=new Map([[y(i?.creationDateField??""),a],[y(i?.editDateField??""),a],[y(o),u],[y(s),u]]);for(const{name:n,type:i}of e.fields)if(m.has(i))t.set(n,p.L5);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(n,null);else if(r)t.set(n,p.L5);else{const e=c.get(y(n??""))??l;t.set(n,e)}return t}},37352:(e,t,r)=>{r.d(t,{A:()=>u});var n,i=r(90237),o=r(5503),s=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let p=n=class extends s.oY{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._)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,i._)([(0,l.MZ)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,i._)([(0,l.MZ)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=n=(0,i._)([(0,a.$)("esri.layers.support.LayerFloorInfo")],p);const u=p},72088:(e,t,r)=>{r.d(t,{rS:()=>x,gK:()=>M}),r(44208);var n,i=r(90237),o=r(4718),s=r(10107),l=(r(53966),r(93223)),a=r(40608),p=r(25482);r(87811);let u=n=class extends p.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,s.MZ)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=n=(0,i._)([(0,a.$)("esri.layers.support.CodedValue")],u);const c=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends p.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,l.e)(c)],d.prototype,"type",void 0),d=(0,i._)([(0,a.$)("esri.layers.support.Domain")],d);const y=d;var f;let m=f=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,o.o8)(this.codedValues),name:this.name})}};(0,i._)([(0,s.MZ)({type:[u],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,i._)([(0,l.e)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=f=(0,i._)([(0,a.$)("esri.layers.support.CodedValueDomain")],m);const h=m;var g;r(49186);let S=g=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,i._)([(0,l.e)({inherited:"inherited"})],S.prototype,"type",void 0),S=g=(0,i._)([(0,a.$)("esri.layers.support.InheritedDomain")],S);const w=S;var v;let _=v=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new v({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i._)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],_.prototype,"maxValue",void 0),(0,i._)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],_.prototype,"minValue",void 0),(0,i._)([(0,l.e)({range:"range"})],_.prototype,"type",void 0),_=v=(0,i._)([(0,a.$)("esri.layers.support.RangeDomain")],_);const b=_,M={key:"type",base:y,typeMap:{range:_,"coded-value":h,inherited:w}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return b.fromJSON(e);case"codedValue":return h.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},98453:(e,t,r)=>{r.d(t,{m:()=>n});const n=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},32730:(e,t,r)=>{r.d(t,{BI:()=>h,D3:()=>f,XJ:()=>m,lc:()=>y,mX:()=>S,rU:()=>g,tH:()=>M});var n=r(799);const i="__begin__",o="__end__",s=new RegExp(i,"ig"),l=new RegExp(o,"ig"),a=new RegExp("^"+i,"i"),p=new RegExp(o+"$","i"),u='"',c=u+" + ",d=" + "+u;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function f(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function h(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return S(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return M(t.expression)}return null}function S(e){let t;return e?(t=(0,n.HC)(e,(e=>i+'$feature["'+e+'"]'+o)),t=a.test(t)?t.replace(a,""):u+t,t=p.test(t)?t.replace(p,""):t+u,t=t.replaceAll(s,c).replaceAll(l,d)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,b=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function M(e){if(!e)return null;let t=v.exec(e)||_.exec(e);return t?t[1]||t[3]:(t=b.exec(e),t?t[2]:null)}},22453:(e,t,r)=>{r.d(t,{S:()=>c});var n=r(44208),i=r(60694);function o(e,t,r){return!!l(e,t,r)}function s(e,t,r){return l(e,t,r)}function l(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const a={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function c(e,t){return{analytics:d(e),attachment:y(e),data:f(e),metadata:m(e),operations:h(e.capabilities,e,t),query:g(e,t),queryRelated:S(e),queryTopFeatures:w(e),editing:v(e)}}function d(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function y(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:o(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=a[e.name];t&&(r[t]=!!e.isEnabled)})),r}function f(e){return{isVersioned:o(e,"isDataVersioned",!1),supportsAttachment:o(e,"hasAttachments",!1),supportsM:o(e,"hasM",!1),supportsZ:o(e,"hasZ",!1)}}function m(e){return{supportsAdvancedFieldProperties:o(e,"supportsFieldDescriptionProperty",!1)}}function h(e,t,r){const n=e?e.toLowerCase().split(",").map((e=>e.trim())):[],s=r?(0,i.qg)(r):null,l=n.includes(null!=s&&"MapServer"===s.serverType?"data":"query"),a=n.includes("editing")&&!t.datesInUnknownTimezone;let p=a&&n.includes("create"),u=a&&n.includes("delete"),c=a&&n.includes("update");const d=n.includes("changetracking"),y=t.advancedQueryCapabilities;return a&&!(p||u||c)&&(p=u=c=!0),{supportsCalculate:o(t,"supportsCalculate",!1),supportsTruncate:o(t,"supportsTruncate",!1),supportsValidateSql:o(t,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:u,supportsEditing:a,supportsChangeTracking:d,supportsQuery:l,supportsQueryAnalytics:o(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:o(y,"supportsQueryAttachments",!1),supportsQueryTopFeatures:o(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:o(t,"supportsAttachmentsResizing",!1),supportsSync:n.includes("sync"),supportsUpdate:c,supportsExceedsLimitStatistics:o(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:o(t,"supportsAsyncConvert3D",!1)}}function g(e,t){const r=e.advancedQueryCapabilities,l=e.ownershipBasedAccessControlForFeatures,a=e.archivingInfo,c=e.currentVersion,d=t?.includes("MapServer"),y=!d||c>=(0,n.A)("mapserver-pbf-version-support"),f=(0,i.Wo)(t),m=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:o(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:o(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:o(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(r),supportsCentroid:o(r,"supportsReturningGeometryCentroid",!1),supportsDistance:o(r,"supportsQueryWithDistance",!1),supportsDistinct:o(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:o(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:o(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:o(r,"supportsHavingClause",!1),supportsOrderBy:o(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:o(r,"supportsPagination",!1),supportsQuantization:o(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:o(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:o(e,"supportsReturningQueryGeometry",!1),supportsResultType:o(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:o(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:o(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:o(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:o(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:o(l,"allowAnonymousToQuery",!0),supportsQueryByOthers:o(l,"allowOthersToQuery",!0),supportsHistoricMoment:o(a,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:y&&m.has("pbf"),supportsDisjointSpatialRelationship:o(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:o(r,"supportsQueryWithCacheHint",!1)||u(r,"query"),supportsDefaultSpatialReference:o(r,"supportsDefaultSR",!1),supportsCompactGeometry:f,supportsFullTextSearch:o(r,"supportsFullTextSearch",!1),maxRecordCountFactor:s(e,"maxRecordCountFactor",void 0),maxRecordCount:s(e,"maxRecordCount",void 0),standardMaxRecordCount:s(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:s(e,"tileMaxRecordCount",void 0)}}function S(e){const t=e.advancedQueryCapabilities,r=o(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:o(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:u(t,"queryRelated")}}function w(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function v(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:o(e,"allowGeometryUpdates",!0),supportsGlobalId:o(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:o(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:o(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:o(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:o(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:o(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:o(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:o(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:o(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:o(r,"supportsAsyncApplyEdits",!1),zDefault:s(e,"zDefault",void 0)}}},92300:(e,t,r)=>{r.d(t,{V:()=>o,X:()=>i});var n=r(65864);function i(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function o(e,t,r){const i=(0,n.xD)(t);return e.map((e=>{const t=i.fromJSON(e);return t.spatialReference=r,t}))}},58501:(e,t,r)=>{r.d(t,{q:()=>i});var n=r(62815);function i(e,t,r){if(!r?.features||!r.hasZ)return;const i=(0,n.N)(r.geometryType,t,e.outSpatialReference);if(null!=i)for(const e of r.features)i(e.geometry)}},22671:(e,t,r)=>{r.d(t,{A:()=>w});var n,i=r(90237),o=r(59456),s=r(52106),l=r(66552),a=r(25482),p=r(4718),u=r(10107),c=(r(44208),r(53966),r(36005)),d=r(40608),y=r(43937),f=r(16930),m=r(65864),h=r(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let S=n=class extends a.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const i=e[t],o=s.A.fromJSON(i),l=i.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=r);const a=i.aggregateGeometries,p=o.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[e],n=a[e],i=n?.spatialReference;null==t||i||(t.spatialReference=r)}n.push(o)}return n}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,m.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=f.A.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,p.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e?.[r];n.geometry=t?.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,i]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,i],scale:[o,s]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,(e=>e*o+n),(e=>i-e*s),l,a);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,r){let n,i;const o=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=r(l[1]);e===n&&s===i||(o.push([e-n,s-i]),n=e,i=s)}else n=t(l[0]),i=r(l[1]),o.push([n,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,m.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=n.length;e<o;e++){const o=n[e],s=this._quantizePoints(o,t,r);s&&i.push(s)}return i.length>0?((0,m.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,m.Bi)(e)?e.rings:e.paths;let s,l;for(let e=0,n=o.length;e<n;e++){const n=o[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(s+=i[0],l+=i[1]):(s=i[0],l=i[1]),i[0]=t(s),i[1]=r(l)}}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=i(r[3])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,l;for(let e=0,n=o.length;e<n;e++){const n=o[e];e>0?(s+=n[0],l+=n[1]):(s=n[0],l=n[1]),n[0]=t(s),n[1]=r(l)}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2]),t[3]=i(t[3])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],S.prototype,"displayFieldName",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],S.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,u.MZ)({type:[s.A],json:{write:!0}})],S.prototype,"features",void 0),(0,i._)([(0,c.w)("features")],S.prototype,"readFeatures",null),(0,i._)([(0,u.MZ)({type:[h.A],json:{write:!0}})],S.prototype,"fields",void 0),(0,i._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],S.prototype,"geometryType",void 0),(0,i._)([(0,y.K)("geometryType")],S.prototype,"writeGeometryType",null),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],S.prototype,"hasM",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],S.prototype,"hasZ",void 0),(0,i._)([(0,u.MZ)({types:o.yR,json:{write:!0}})],S.prototype,"queryGeometry",void 0),(0,i._)([(0,c.w)("queryGeometry")],S.prototype,"readQueryGeometry",null),(0,i._)([(0,u.MZ)({type:f.A,json:{write:!0}})],S.prototype,"spatialReference",void 0),(0,i._)([(0,y.K)("spatialReference")],S.prototype,"writeSpatialReference",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],S.prototype,"transform",void 0),S=n=(0,i._)([(0,d.$)("esri.rest.support.FeatureSet")],S),S.prototype.toJSON.isDefaultToJSON=!0;const w=S},2272:(e,t,r)=>{r.d(t,{Dl:()=>s,jV:()=>o,lF:()=>l}),r(92602),r(70333);var n=r(4718),i=r(84952);function o(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function s(e){return"string"==typeof e?(0,i.An)(e):(0,n.o8)(e)}function l(e,t,r){const n={};for(const i in e){if("declaredClass"===i)continue;const o=e[i];if(null!=o&&"function"!=typeof o)if(Array.isArray(o))n[i]=o.map((e=>l({item:e},t,r).item));else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(r?.[i]);n[i]=t?e:JSON.stringify(e)}else n[i]=t?o:JSON.stringify(o);else n[i]=o}return n}r(926)},59868:(e,t,r)=>{r.d(t,{A7:()=>p,Cx:()=>u,Hk:()=>c,UK:()=>a}),r(44208);var n=r(94985),i=r(31593),o=r(53930),s=r(68249),l=r(93470);const a=o.A.fromJSON(l.Cb),p=i.A.fromJSON(l.yM),u=n.A.fromJSON(l.WR),c=s.A.fromJSON(l.JZ);o.A.fromJSON(l.nC),i.A.fromJSON(l.HW),n.A.fromJSON(l.b6)},93470:(e,t,r)=>{r.d(t,{Cb:()=>i,HW:()=>p,JZ:()=>l,WR:()=>s,b6:()=>u,nC:()=>a,yM:()=>o});const n=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},s={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},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7202],{9775:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(62788),r=n(95488);class s{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new r.I,this._items=new Set}get length(){return(0,i.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,i.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,i.gc)(this._observable),yield*this._items}}},89317:(e,t,n)=>{n.d(t,{K:()=>i});const i=["operational-layers","basemap","ground"]},75503:(e,t,n)=>{n.d(t,{w:()=>o});var i=n(4576),r=n(3694),s=n(11006);class o{constructor(e=9,t){this._compareMinX=p,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),_.prune(),x.prune(),v.prune(),M.prune()}all(e){a(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(w(e,n))for(_.clear();n;){for(let r=0,s=n.children.length;r<s;r++){const s=n.children[r],o=n.leaf?i(s):s;w(e,o)&&(n.leaf?t(s):g(e,o)?a(s,t):_.push(s))}n=_.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!w(e,t))return!1;for(_.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],s=t.leaf?n(r):r;if(w(e,s)){if(t.leaf||g(e,s))return!0;_.push(r)}}t=_.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new L([]),this}remove(e){if(!e)return this;let t,n=this._data,r=null,s=0,o=!1;const a=this._toBBox(e);for(v.clear(),M.clear();n||v.length>0;){if(n||(n=v.pop(),r=v.data[v.length-1],s=M.pop()??0,o=!0),n.leaf&&(t=(0,i.qh)(n.children,e,n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),v.push(n),this._condense(v),this;o||n.leaf||!g(n,a)?r?(s++,n=r.children[s],o=!1):n=null:(v.push(n),M.push(s),s=0,r=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const r=n-t+1;let s=this._maxEntries;if(r<=s){const i=new L(e.slice(t,n+1));return l(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(i-1)));const o=new T([]);o.height=i;const a=Math.ceil(r/s),h=a*Math.ceil(Math.sqrt(s));b(e,t,n,h,this._compareMinX);for(let r=t;r<=n;r+=h){const t=Math.min(r+h-1,n);b(e,r,t,a,this._compareMinY);for(let n=r;n<=t;n+=a){const r=Math.min(n+a-1,t);o.children.push(this._build(e,n,r,i-1))}}return l(o,this._toBBox),o}_insert(e,t,n){const i=this._toBBox,r=n?e:i(e);v.clear();const s=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=c(o),l=m(e,o)-a;l<r?(r=l,i=a<i?a:i,n=o):l===r&&a<i&&(i=a,n=o)}t=n||t.children[0]}return t}(r,this._data,t,v);for(s.children.push(e),u(s,r);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)u(t.data[i],e)}(r,v,t)}_split(e,t){const n=e.data[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);const s=this._chooseSplitIndex(n,r,i);if(!s)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=n.children.splice(s,n.children.length-s),a=n.leaf?new L(o):new T(o);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,r,s;i=r=1/0;for(let o=t;o<=n-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,n,this._toBBox),l=f(t,a),u=c(t)+c(a);l<i?(i=l,s=o,r=u<r?u:r):l===i&&u<r&&(r=u,s=o)}return s}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:p,r=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const r=this._toBBox,s=h(e,0,t,r),o=h(e,n-t,n,r);let a=y(s)+y(o);for(let i=t;i<n-t;i++){const t=e.children[i];u(s,e.leaf?r(t):t),a+=y(s)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?r(t):t),a+=y(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const r=e.data[t-1],s=r.children;s.splice((0,i.qh)(s,n,s.length,r.indexHint),1)}else this.clear();else l(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let n=e;for(x.clear();n;){if(!0===n.leaf)for(const e of n.children)t(e);else x.pushArray(n.children);n=x.pop()??null}}function l(e,t){h(e,0,e.children.length,t,e)}function h(e,t,n,i,r){r||(r=new L([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=t;o<n;o++)s=e.children[o],u(r,e.leaf?i(s):s);return r}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function p(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function y(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){const n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,r-n)*Math.max(0,s-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function w(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function b(e,t,n,i,r){const o=[t,n];for(;o.length;){const t=o.pop(),n=o.pop();if(t-n<=i)continue;const a=n+Math.ceil((t-n)/i/2)*i;(0,s.q)(e,a,n,t,r),o.push(n,a,a,t)}}const _=new r.A,x=new r.A,v=new r.A,M=new r.A({deallocator:void 0});class k{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class E extends k{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class L extends E{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends E{constructor(e){super(),this.children=e,this.leaf=!1}}},39516:(e,t,n)=>{async function i(e,t){const{WhereClause:i}=await Promise.all([n.e(835),n.e(4800)]).then(n.bind(n,50835));return i.create(e,t)}function r(e,t){return"1=1"===e?t:"1=1"===t?e:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}n.d(t,{G:()=>i,m:()=>r})},10382:(e,t,n)=>{n.d(t,{A:()=>h});var i=n(36563),r=n(74887),s=n(9775),o=n(72457),a=n(52268),l=n(61322);class h{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new s.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((n,i)=>{let s=!0;const o=e=>{(0,r.Te)(t.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let s=0;s<e.length;++s){const a=e[s];(0,r.$X)(a)?this._clientPromises[s]=a.then((e=>(this._clients[s]=new l.default(e,t,this._ongoingJobsQueue),o(n),this._clients[s])),(()=>(o(i),null))):(this._clients[s]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[s]=Promise.resolve(this._clients[s]),o(n))}}))}broadcast(e,t,n){const i=new Array(this._clientPromises.length);for(let r=0;r<this._clientPromises.length;++r){const s=this._clientPromises[r];i[r]=s.then((i=>i?.invoke(e,t,n)))}return i}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,r.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.h)(this)}invoke(e,t,n){return this.apply(e,[t],n)}apply(e,t,n){const i=(0,r.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:n,resolver:i});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return i.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,i.vE)(this._clients.map((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let i=0;i<this._clientPromises.length;++i)this._clientPromises[i].then((r=>{r&&(t[i]=r.openPort()),0==--n&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},72457:(e,t,n)=>{n.d(t,{h:()=>s,k:()=>r});const i=new FinalizationRegistry((e=>{e.close()}));function r(e,t){i.register(e,t,t)}function s(e){i.unregister(e)}},29953:(e,t,n)=>{n.d(t,{ho:()=>q});var i=n(49186),r=n(44208),s=n(74887),o=n(10382),a=n(72457),l=n(61322),h=n(53966),u=n(97768),p=n(78888),d=n(84952);const c={async request(e,t){const n=e.options,i=n.responseType;n.signal=t?.signal,n.responseType="native"===i||"native-request-init"===i?"native-request-init":i&&["blob","json","text"].includes(i)&&(0,d.sC)(e.url)?.after?i:"array-buffer";const r=await(0,p.A)(e.url,n),s={data:r.data,httpStatus:r.httpStatus,ssl:r.ssl};switch(r.requestOptions?.responseType){case"native-request-init":return delete s.data.signal,s;case"blob":s.data=await s.data.arrayBuffer();break;case"json":s.data=(new TextEncoder).encode(JSON.stringify(s.data)).buffer;break;case"text":s.data=(new TextEncoder).encode(s.data).buffer}return{result:s,transferList:[s.data]}}};var y=n(8341),m=n(2741),f=n(92602),g=(n(47566),n(70333));const w={};var b=n(26390);class _{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...n)=>e[t](...n)}))}}class x{constructor(){this._dispatcher=new _,this._workerPostMessage({type:y.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,b.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,n){this._dispatcher.addEventListener(e,t,n)}removeEventListener(e,t,n){this._dispatcher.removeEventListener(e,t,n)}_workerPostMessage(e){(0,b.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,y.VI)(e);if(t&&t.type===y.Go.OPEN){const{modulePath:e,jobId:n}=t;let i=await l.default.loadWorker(e);i||(i=await import(e));const r=l.default.connect(i);this._workerPostMessage({type:y.Go.OPENED,jobId:n,data:r})}}}var v=n(73444),M=n(18357);const k=()=>h.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:E}=y.Go;let L,T;const I="Failed to create Worker. Fallback to execute module in main thread";async function A(e){return new Promise((t=>{function n(r){const s=(0,y.VI)(r);s&&s.type===E&&(e.removeEventListener("message",n),e.removeEventListener("error",i),t(e))}function i(t){t.preventDefault(),e.removeEventListener("message",n),e.removeEventListener("error",i),k().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new x).addEventListener("message",n),e.addEventListener("error",i)}e.addEventListener("message",n),e.addEventListener("error",i)}))}let C=0;const{ABORT:S,INVOKE:N,OPEN:D,OPENED:R,RESPONSE:j}=y.Go;class P{static async create(e){const t=await async function(){if(!(0,r.A)("esri-workers"))return A(new x);if(!L&&!T)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=f.A.default){const t={...f.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(f.A));e.assetsPath=(0,d.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,d.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,v.JK)(),e.has={"esri-csp-restrictions":(0,r.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,r.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,r.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,r.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,r.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,r.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,r.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,r.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,r.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,r.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,r.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,r.A)("esri-atomics"),"esri-shared-array-buffer":(0,r.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,r.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,r.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,r.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,d.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,d.s2)(e.workers.workerPath):e.workers.workerPath=(0,d.s2)((0,m.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.A.workers.loaderConfig,n=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=w.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,v.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),i={buildDate:M.$,fullVersion:g.ol,revision:M.u};return JSON.stringify({esriConfig:e,loaderConfig:n,kernelInfo:i})}()}'`);L=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){T=e||{}}let e;if(L)try{e=new Worker(L,{name:"esri-worker-"+C++})}catch(t){k().warn(I,T),e=new x}else k().warn(I,T),e=new x;return A(e)}();return new P(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),h.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:n}=t,i=(0,y.Jc)();return new Promise(((t,r)=>{const o={resolve:t,reject:r,abortHandle:(0,s.NY)(n,(()=>{this._outJobs.delete(i),this._post({type:S,jobId:i})}))};this._outJobs.set(i,o),this._post({type:D,jobId:i,modulePath:e})}))}_onMessage(e){const t=(0,y.VI)(e);if(t)switch(t.type){case R:this._onOpenedMessage(t);break;case j:this._onResponseMessage(t);break;case S:this._onAbortMessage(t);break;case N:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,n=e.jobId,i=t.get(n);i&&(i.controller&&i.controller.abort(),t.delete(n))}_onInvokeMessage(e){const{methodName:t,jobId:n,data:i,abortable:r}=e,o=r?new AbortController:null,a=this._inJobs,l=c[t];let h;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);h=l.call(null,i,{signal:o?o.signal:null})}catch(e){return void this._post({type:j,jobId:n,error:(0,y.mF)(e)})}(0,s.$X)(h)?(a.set(n,{controller:o,promise:h}),h.then((e=>{a.has(n)&&(a.delete(n),this._post({type:j,jobId:n},e))}),(e=>{a.has(n)&&(a.delete(n),e||(e={message:"Error encountered at method"+t}),(0,s.zf)(e)||this._post({type:j,jobId:n,error:(0,y.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:j,jobId:n},h)}_onOpenedMessage(e){const{jobId:t,data:n}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,u.xt)(i.abortHandle),i.resolve(n))}_onResponseMessage(e){const{jobId:t,error:n,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,u.xt)(s.abortHandle),n?s.reject(i.A.fromJSON(JSON.parse(n))):s.resolve(r))}_post(e,t,n){return(0,y.u1)(this.worker,e,t,n)}}const O=(0,r.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,r.A)("workers-pool-size")):0;let B=(0,r.A)("esri-mobile")?Math.min(O,3):O;B||(B=(0,r.A)("safari")&&(0,r.A)("mac")?7:2);let G=0;const F=[];async function Z(e,t){const n=new o.A,{registryTarget:i,...r}=t;return await n.open(e,r),i&&(0,a.k)(i,n),n}async function q(e,t={}){if("string"!=typeof e)throw new i.A("workers:undefined-module","modulePath is missing");let n=t.strategy||"distributed";if((0,r.A)("host-webworker")&&!(0,r.A)("esri-workers")&&(n="local"),"local"===n){let n=await l.default.loadWorker(e);n||(n=await import(e)),(0,s.Te)(t.signal);const i=t.client||n;return Z([l.default.connect(n,t.schedule)],{...t,client:i})}if(await async function(){if($)return $;J=new AbortController;const e=[];for(let t=0;t<B;t++){const n=P.create(t).then((e=>(F[t]=e,e)));e.push(n)}return $=Promise.all(e),$}(),(0,s.Te)(t.signal),"dedicated"===n){const n=G++%B;return Z([await F[n].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const n=Math.min(t.maxNumWorkers,B);if(n<B){const i=new Array(n);for(let r=0;r<n;++r){const n=G++%B;i[r]=F[n].open(e,t)}return Z(i,t)}}return Z(F.map((n=>n.open(e,t))),t)}let J,$=null},96628:(e,t,n)=>{n.d(t,{Hq:()=>x,Qj:()=>M,V2:()=>m,m_:()=>f}),n(44208);var i=n(34727),r=n(5443),s=n(39829),o=n(16930),a=n(79258),l=n(90708),h=n(92722),u=n(31464);const p=new Float64Array(2),d=new Float64Array(2),c="0123456789bcdefghjkmnpqrstuvwxyz",y=64;function m(e,t,n,i){const a=[e.xmin,e.ymin,e.xmax,e.ymax],p=s.A.fromExtent(r.A.fromBounds(a,i)),d=(0,u.Cv)(p,i,o.A.WGS84,{densificationStep:t*y});if(!d)return null;const c=(0,l.Ye)(new h.A,d,!1,!1),m=c.coords.filter(((e,t)=>!(t%2))),g=c.coords.filter(((e,t)=>t%2)),w=Math.min(...m),b=Math.min(...g),_=Math.max(...m),x=Math.max(...g),v=f(w,b,n,o.A.WGS84),M=f(_,x,n,o.A.WGS84);return v&&M?{bounds:a,geohashBounds:{xLL:v[0],yLL:v[1],xTR:M[0],yTR:M[1]},level:n}:null}function f(e,t,n,r){if(r.isWebMercator){const r=(0,i.KJ)(e/a.$O.radius),s=r-360*Math.floor((r+180)/360),o=[0,0];return v(o,0,(0,i.KJ)(Math.PI/2-2*Math.atan(Math.exp(-t/a.$O.radius))),s,n),o}const s=(0,u.Cv)({x:e,y:t},r,o.A.WGS84);if(!s)return null;const l=[0,0];return v(l,0,s.y,s.x,n),l}function g(e){return c[e]}function w(e){return(e[0]+e[1])/2}function b(e,t,n){return e[0]=t,e[1]=n,e}function _(e,t){const n=t>w(e);return function(e,t){const n=w(e),i=t,r=!t;e[0]=r*e[0]+i*n,e[1]=r*n+i*e[1]}(e,n),n}function x(e,t){let n=-90,i=90,r=-180,s=180;for(let o=0;o<t;o++){const t=Math.ceil((o+1)/2),a=Math.floor((o+1)/2),l=1-o%2,h=30-(3*t+2*a),u=30-(2*t+3*a),p=3*l+2*(1-l),d=2*l+3*(1-l),c=3*l+7*(1-l)<<u,y=(7*l+3*(1-l)<<h&e.geohashX)>>h,m=(c&e.geohashY)>>u;for(let e=p-1;e>=0;e--){const t=(r+s)/2,n=y&1<<e?1:0;r=(1-n)*r+n*t,s=(1-n)*t+n*s}for(let e=d-1;e>=0;e--){const t=(n+i)/2,r=m&1<<e?1:0;n=(1-r)*n+r*t,i=(1-r)*t+r*i}}return[r,n,s,i]}function v(e,t,n,i,r){r%2&&(r+=1);let s=0,o=0,a=-90,l=90,h=-180,u=180;for(let e=0;e<r/2;e++){for(let t=0;t<5;t++){const n=(h+u)/2,r=i>n?1:0;s|=r<<29-(t+5*e),h=(1-r)*h+r*n,u=(1-r)*n+r*u}for(let t=0;t<5;t++){const i=(a+l)/2,r=n>i?1:0;o|=r<<29-(t+5*e),a=(1-r)*a+r*i,l=(1-r)*i+r*l}}e[2*t]=s,e[2*t+1]=o}function M(e,t,n){let i="";const r=b(p,-90,90),s=b(d,-180,180);for(let o=0;o<n;o++){let n=0;o%2?(n|=_(r,e)<<4,n|=_(s,t)<<3,n|=_(r,e)<<2,n|=_(s,t)<<1,n|=0|_(r,e)):(n|=_(s,t)<<4,n|=_(r,e)<<3,n|=_(s,t)<<2,n|=_(r,e)<<1,n|=0|_(s,t)),i+=g(n)}return i}},17136:(e,t,n)=>{n.d(t,{el:()=>v});var i=n(92602),r=n(49186),s=n(53966),o=n(39829),a=n(82799),l=n(80754),h=n(21325),u=n(28735),p=(n(59456),n(78888)),d=n(65864),c=n(2272),y=n(84952),m=n(92300);const f=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function b(e,t,n){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw f().error(e),new r.A(e)}const n=(0,l.r8)(e),i=[];for(const e of n){const n=[];i.push(n),n.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const r=e[i][0],s=e[i][1],o=e[i+1][0],a=e[i+1][1],l=Math.sqrt((o-r)*(o-r)+(a-s)*(a-s)),h=(a-s)/l,u=(o-r)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const i=e*t,o=u*i+r,a=h*i+s;n.push([o,a])}const e=(l+Math.floor(p-1)*t)/2,i=u*e+r,o=h*e+s;n.push([i,o])}n.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.ci)(t,!0)}return n&&(e=(0,l.kS)(e,n)),e}function _(e,t,n){if(Array.isArray(e)){const i=e[0];if(i>t){const n=(0,l.kd)(i,t);e[0]=i+n*(-2*t)}else if(i<n){const t=(0,l.kd)(i,n);e[0]=i+t*(-2*n)}}else{const i=e.x;if(i>t){const n=(0,l.kd)(i,t);e=e.clone().offset(n*(-2*t),0)}else if(i<n){const t=(0,l.kd)(i,n);e=e.clone().offset(t*(-2*n),0)}}return e}function x(e,t){let n=-1;for(let i=0;i<t.cutIndexes.length;i++){const r=t.cutIndexes[i],s=t.geometries[i],o=(0,l.r8)(s);for(let e=0;e<o.length;e++){const t=o[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const i=t[e][0];n=i>n?i:n}n=Number(n.toFixed(9));const i=-360*(0,l.kd)(n,180);for(let n=0;n<t.length;n++){const t=s.getPoint(e,n);s.setPoint(e,n,t.clone().offset(i,0))}return!0}}))}if(r===n){if(g(e))for(const t of(0,l.r8)(s))e[r]=e[r].addRing(t);else if(w(e))for(const t of(0,l.r8)(s))e[r]=e[r].addPath(t)}else n=r,e[r]=s}return e}async function v(e,t,n){if(!Array.isArray(e))return v([e],t);t&&"string"!=typeof t&&f().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let s,g,w,M,k,E,L,T,I=0;const A=[],C=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,g=(0,h.Vp)(s),w=s.isWebMercator,E=w?102100:4326,M=l.j7[E].maxX,k=l.j7[E].minX,L=l.j7[E].plus180Line,T=l.j7[E].minus180Line),g)if("mesh"===t.type)C.push(t);else if("point"===t.type)C.push(_(t.clone(),M,k));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>_(e,M,k))),C.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);C.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,n=(0,l.kd)(e.xmin,k)*(2*M);let i=0===n?t.clone():(0,l.kS)(t.clone(),n);e.offset(n,0),e.intersects(L)&&e.xmax!==M?(I=e.xmax>I?e.xmax:I,i=b(i,w),A.push(i),C.push("cut")):e.intersects(T)&&e.xmin!==k?(I=e.xmax*(2*M)>I?e.xmax*(2*M):I,i=b(i,w,360),A.push(i),C.push("cut")):C.push(i)}else C.push(t.clone());else C.push(t);else C.push(t);let S=(0,l.kd)(I,M),N=-90;const D=S,R=new a.A;for(;S>0;){const e=360*S-180;R.addPath([[e,N],[e,-1*N]]),N*=-1,S--}if(A.length>0&&D>0){const t=x(A,await async function(e,t,n,i){const r=(0,c.Dl)(e),s=t[0].spatialReference,o={...i,responseType:"json",query:{...r.query,f:"json",sr:(0,h.YX)(s),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},a=await(0,p.A)(r.path+"/cut",o),{cutIndexes:l,geometries:u=[]}=a.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=s,t}))}}(r,A,R,n)),i=[],s=[];for(let n=0;n<C.length;n++){const r=C[n];if("cut"!==r)s.push(r);else{const r=t.shift(),o=e[n];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&r.rings.length>=o.rings.length?(i.push(r),s.push("simplify")):s.push(w?(0,u.Gh)(r):r)}}if(!i.length)return s;const o=await async function(e,t,n){const i="string"==typeof e?(0,y.An)(e):e,r=t[0].spatialReference,s=(0,d.$B)(t[0]),o={...n,query:{...i.query,f:"json",sr:(0,h.YX)(r),geometries:JSON.stringify((0,m.X)(t))}},{data:a}=await(0,p.A)(i.path+"/simplify",o);return(0,m.V)(a.geometries,s,r)}(r,i,n),a=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?a.push(t):a.push(w?(0,u.Gh)(o.shift()):o.shift())}return a}const j=[];for(let e=0;e<C.length;e++){const t=C[e];if("cut"!==t)j.push(t);else{const e=A.shift();j.push(!0===w?(0,u.Gh)(e):e)}}return j}},80754:(e,t,n)=>{n.d(t,{j7:()=>o,kS:()=>l,kd:()=>a,r8:()=>h});var i=n(82799),r=n(16930),s=n(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=h(e);for(const e of n)for(const n of e)n[0]+=t;return e}function h(e){return(0,s.Bi)(e)?e.rings:e.paths}},22780:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Se});var i=n(90237),r=(n(59456),n(5503)),s=n(49186),o=n(53966),a=n(74887),l=n(10107),h=(n(44208),n(87811),n(40608)),u=n(96628),p=n(4146),d=n(90708),c=n(92722),y=n(69622),m=n(91869),f=n(39516),g=n(39829),w=n(57251),b=n(21325),_=n(43334),x=n(65864);class v{constructor(){this._featureLookup=new Map}static getInstance(){return v.instance||(v.instance=new v),v.instance}static resetInstance(){v.instance&&(v.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const n=this.readFromStoreById(e);n&&t.push(n)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,n){const i=[];return e.forEach((e=>{if(!e?.id)return;e.properties||(e.properties=[]);let r,s=null;if(n&&e.properties[n]&&(s=(0,d.Ux)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties.ESRI__ORIGIN_ID=e.originId,e.properties.ESRI__DESTINATION_ID=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const i=this._featureLookup.get(e.id),o=JSON.parse(JSON.stringify(Object.assign(i.attributes,e.properties)));n&&e.properties[n]&&(o[n]=(0,x.rS)(e.properties[n])),r=new _.Om(s?JSON.parse(JSON.stringify(s)):i?.geometry?JSON.parse(JSON.stringify(i.geometry)):null,o,null,e.properties[t])}else r=new _.Om(s?JSON.parse(JSON.stringify(s)):null,e.properties,null,e.properties[t]);this._featureLookup.set(e.id,r),i.push(r)})),i}}n(78888);var M,k,E,L,T,I,A,C,S,N=n(43709),D=n(42538);function R(e){if(!e.spatialReference.isWGS84)throw new s.A("knowledge-graph:layer-support-utils","The extentToInBoundsRings function only supports WGS84 spatial references.");let t;return t=e.xmax>180&&e.xmin<180?[[[e.xmin,e.ymin],[e.xmin,e.ymax],[180,e.ymax],[180,e.ymin],[e.xmin,e.ymin]],[[-180,e.ymin],[-180,e.ymax],[e.xmax-360,e.ymax],[e.xmax-360,e.ymin],[-180,e.ymin]]]:e.xmax>180&&e.xmin>180?[[[e.xmin-360,e.ymin],[e.xmin-360,e.ymax],[e.xmax-360,e.ymax],[e.xmax-360,e.ymin],[e.xmin-360,e.ymin]]]:e.xmax>-180&&e.xmin<-180?[[[e.xmin+360,e.ymin],[e.xmin+360,e.ymax],[180,e.ymax],[180,e.ymin],[e.xmin+360,e.ymin]],[[-180,e.ymin],[-180,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[-180,e.ymin]]]:e.xmax<-180&&e.xmin<-180?[[[e.xmin+360,e.ymin],[e.xmin+360,e.ymax],[e.xmax+360,e.ymax],[e.xmax+360,e.ymin],[e.xmin+360,e.ymin]]]:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]],t}n(16930),(k=M||(M={})).ELEMENTUID="ELEMENTUID",k.TYPENAME="TYPENAME",M.ELEMENTUID,M.TYPENAME,function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME"}(E||(E={})),function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME",e[e.FROMUID=2]="FROMUID",e[e.TOUID=3]="TOUID"}(L||(L={})),n(45724),n(35448),(S=T||(T={}))[S.featureResult=0]="featureResult",S[S.countResult=1]="countResult",S[S.idsResult=2]="idsResult",function(e){e[e.upperLeft=0]="upperLeft",e[e.lowerLeft=1]="lowerLeft"}(I||(I={})),function(e){e[e.sqlTypeBigInt=0]="sqlTypeBigInt",e[e.sqlTypeBinary=1]="sqlTypeBinary",e[e.sqlTypeBit=2]="sqlTypeBit",e[e.sqlTypeChar=3]="sqlTypeChar",e[e.sqlTypeDate=4]="sqlTypeDate",e[e.sqlTypeDecimal=5]="sqlTypeDecimal",e[e.sqlTypeDouble=6]="sqlTypeDouble",e[e.sqlTypeFloat=7]="sqlTypeFloat",e[e.sqlTypeGeometry=8]="sqlTypeGeometry",e[e.sqlTypeGUID=9]="sqlTypeGUID",e[e.sqlTypeInteger=10]="sqlTypeInteger",e[e.sqlTypeLongNVarchar=11]="sqlTypeLongNVarchar",e[e.sqlTypeLongVarbinary=12]="sqlTypeLongVarbinary",e[e.sqlTypeLongVarchar=13]="sqlTypeLongVarchar",e[e.sqlTypeNChar=14]="sqlTypeNChar",e[e.sqlTypeNVarChar=15]="sqlTypeNVarChar",e[e.sqlTypeOther=16]="sqlTypeOther",e[e.sqlTypeReal=17]="sqlTypeReal",e[e.sqlTypeSmallInt=18]="sqlTypeSmallInt",e[e.sqlTypeSqlXml=19]="sqlTypeSqlXml",e[e.sqlTypeTime=20]="sqlTypeTime",e[e.sqlTypeTimestamp=21]="sqlTypeTimestamp",e[e.sqlTypeTimestamp2=22]="sqlTypeTimestamp2",e[e.sqlTypeTinyInt=23]="sqlTypeTinyInt",e[e.sqlTypeVarbinary=24]="sqlTypeVarbinary",e[e.sqlTypeVarchar=25]="sqlTypeVarchar"}(A||(A={})),function(e){e[e.OID_ARRAY=0]="OID_ARRAY",e[e.GLOBALID_ARRAY=1]="GLOBALID_ARRAY",e[e.STRING_ARRAY=2]="STRING_ARRAY",e[e.IDENTIFIER_ARRAY=3]="IDENTIFIER_ARRAY"}(C||(C={}));var j=n(61956),P=n(5443);const O="ESRI__ID",B="ESRI__ORIGIN_ID",G="ESRI__DESTINATION_ID",F="ESRI__LAYOUT_GEOMETRY",Z="ESRI__AGGREGATION_COUNT",q=12;let J=class extends y.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach((n=>{n.name&&(t.set(n.name,"entity"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(n.name),n.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((n=>{n.name&&(t.set(n.name,"relationship"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(n.name),n.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((n,i)=>{if("entity"===t.get(i))this.entityTypeNames.add(i);else{if("relationship"!==t.get(i))return o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(i);this.relationshipTypeNames.add(i)}const r=new Map;n.members?.forEach((e=>{(0,m.tE)(this.memberIdTypeLookup,e.id,(()=>new Set)).add(i);const t=this.getById(e.id);t&&r.set(e.id,t)})),this.sublayerCaches.set(i,r)}))}addToLayer(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new s.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const n=this.inclusionModeDefinition.namedTypeDefinitions.get(e);n.members||(n.members=new Map),n.members.set(t,{id:t}),(0,m.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),(0,m.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}))}getById(e){return v.getInstance().readFromStoreById(e)}async getData(e,t,n){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let i;if(i=e||new j.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,n=this._processingCacheUpdatesLookup.get(t.objectType.name??""),r=i.outFields,s=i.geometry;let o="",a="";s&&s.extent&&(o=(0,u.Qj)(s.extent.ymin,s.extent.xmin,q),a=(0,u.Qj)(s.extent.ymax,s.extent.xmax,q)),r&&1===r.length&&r[0]===O&&"1=1"===i.where||await Promise.all(n??[]);const l=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],h=[];return l.forEach((n=>{if(this.relationshipTypeNames.has(t.objectType.name)?n.geometry=e.relationshipLinkChartDiagramLookup.get(n.attributes[t.objectIdField]):n.geometry=e.entityLinkChartDiagramLookup.get(n.attributes[t.objectIdField]),n.attributes[F]=n.geometry,o&&a){const i=e.linkChartGeohashLookup.get(n.attributes[t.objectIdField]);i?i>=o&&i<=a&&h.push(n):h.push(n)}else h.push(n)})),h}return this.retrieveDataFromService(i,t,n)}async getConnectedRecordIds(e,t){const n=[];let i="";const r=[],s=new Map;if(e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(t))return;s.has(t)?s.get(t)?.push(e):s.set(t,[e])}})),t&&0!==t?.length){for(const e of t)i=i+e+"|";i=i.slice(0,-1)}return s.forEach(((e,s)=>{let a;a=t&&0!==t?.length?`MATCH (n:${s})-[r:${i}]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`:`MATCH (n:${s})-[r]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`;const l=new Promise((t=>{(async()=>{const t=(await(0,N.executeQueryStreaming)(this.knowledgeGraph,new D.A({openCypherQuery:a,bindParameters:{ids:e}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:i}=await t.read();if(e)break;for(let e=0;e<i.length;e++){const t=i[e];n.push({id:t[0],typeName:t[1]}),n.push({id:t[2],typeName:t[3]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}})().then((()=>{t()}))}));r.push(l)})),this.refreshCacheContent(),await Promise.all(r),n}async refreshCacheContent(e,t,n,i=!0){const r=v.getInstance(),o=[],a=new Map,l=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),e||this.inclusionModeDefinition?e?e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))a.has(t)?a.get(t)?.push(e):a.set(t,[e])})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?a.set(t,null):e.members&&e.members.forEach((e=>{a.has(t)&&null!==a.get(t)?a.get(t)?.push(e.id):a.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})));for(const[e,h]of a){const a=new Promise((o=>{(async()=>{const o=new Set,a=[];let u,p="",d=!1;if(t||l.get(e)?.properties?.forEach((e=>{e.name&&o.add(e.name)})),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&o.add(t)}if(this.entityTypeNames.has(e))p=`MATCH (n:${e}) ${h?"WHERE id(n) IN $ids ":""}return ID(n)`,o.forEach((e=>{p+=`, n.${e}`,a.push(e)}));else{if(!this.relationshipTypeNames.has(e))throw new s.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);d=!0,p=`MATCH ()-[n:${e}]->() ${h?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,o.forEach((e=>{p+=`, n.${e}`,a.push(e)}))}u=new D.A(h?{openCypherQuery:p,bindParameters:{ids:h}}:{openCypherQuery:p});const c=(await(0,N.executeQueryStreaming)(this.knowledgeGraph,u)).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await c.read();if(t)break;const s=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,r=0;const o={properties:{}};for(o.id=t[i],i++,r++,d&&(o.originId=t[i],i++,r++,o.destinationId=t[i],i++,r++,(0,m.tE)(this.nodeConnectionsLookup,o.originId,(()=>new Set)).add(o.id),(0,m.tE)(this.nodeConnectionsLookup,o.destinationId,(()=>new Set)).add(o.id),(0,m.tE)(this.relationshipConnectionsLookup,o.id,(()=>[o.originId,o.destinationId])));i<t.length;i++)o.properties[a[i-r]]=t[i];s.push(o)}const o=r.writeToStore(s,O,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);o.forEach((t=>{l?.set(t.attributes[O],t),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[O])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[O],{id:t.attributes[O]}),(0,m.tE)(this.memberIdTypeLookup,t.attributes[O],(()=>new Set)).add(e))}))}})().then((()=>{o(null)}))}));o.push(a),this._processingCacheUpdatesLookup.get(e)?.push(a)}await Promise.all(o)}removeFromLayer(e){const t=new Set,n=new Set(e.map((e=>e.id)));for(const n of e)t.add(n.typeName),1===this.memberIdTypeLookup.get(n.id)?.size?this.memberIdTypeLookup.delete(n.id):this.memberIdTypeLookup.get(n.id)?.delete(n.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{t===n.typeName&&e.members?.has(n.id)&&e.members.delete(n.id)}));t.forEach((e=>{this.sublayerCaches.get(e)?.forEach(((t,i)=>{n.has(i)&&this.sublayerCaches.get(e)?.delete(i)}))}))}async retrieveDataFromService(e,t,n){const i=v.getInstance(),r=new Set,o=[];let a,l="",h=[];const u="relationship"===t.graphType,p=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,d=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let c=!p&&d?Array.from(d).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(c=e.objectIds);else if(null!=e.objectIds&&c&&c.length>0){const t=e.objectIds;e.objectIds=c.filter((e=>t.includes(e)))}else if(null!=e.objectIds)c=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=c}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach((e=>{r.add(e.name)})):n.forEach((e=>{e!==O&&e!==t.geometryFieldName&&r.add(e)}))}if(null!=e.geometry){const n=e.geometry;let i;const h=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,p=h?.spatialReference,d=h?.serviceCapabilities?.geometryCapabilities;let c=d?.geometryMaxBoundingRectangleSizeX,y=d?.geometryMaxBoundingRectangleSizeY;if(n?.extent?.spatialReference&&!n.spatialReference?.isWGS84?(await(0,w.initializeProjection)(n.extent.spatialReference,b.KK),i=(0,w.project)(n.extent,b.KK)):i=n.extent,c&&y&&p){if(4326!==p.wkid){const e=new P.A({spatialReference:p,xmax:c,ymax:y}),t=(0,w.project)(e,b.KK);c=t.xmax,y=t.ymax}if(i.xmax-i.xmin>c)throw new s.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${c}° latitude, limit exceeded`);if(i.ymax-i.ymin>y)throw new s.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${y}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,f.G)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{n.fieldNames.includes(e.name)&&r.add(e.name)}))}l=u?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach((e=>{l+=`, n.${e}`,o.push(e)})),a=new D.A({openCypherQuery:l,bindParameters:{param_filter_geom:new g.A({rings:R(i)})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const i=await(0,f.G)(e.where,t.fieldsIndex);t.fields.forEach((e=>{i.fieldNames.includes(e.name)&&r.add(e.name)}));const s=new Set(["column-reference","string","number","binary-expression"]),o=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const l=e=>{if("column-reference"===e.type)return`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&s.has(e.left.type)&&s.has(e.right.type)&&o.has(e.operator))return`${l(e.left)} ${e.operator} ${l(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let n=e.right.value;"%"===n.charAt(0)&&(n=n.slice(1)),"%"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),t+=`'${n.toLowerCase()}')`}return t}return a=!0,""};n=l(i.parseTree),a&&(n="")}let i="";i=u?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let s=!1;c&&(s=!0,i+=" WHERE ID(n) IN $ids"),n&&(i+=s?" AND":" WHERE",i+=` ${n}`),i+=" return ID(n)",u&&(i+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach((e=>{i+=`, n.${e}`,o.push(e)})),a=new D.A(c?{openCypherQuery:i,bindParameters:{ids:c}}:{openCypherQuery:i})}const y=(await(0,N.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,n)).resultRowsStream.getReader();for(;;){const{done:e,value:n}=await y.read();if(e)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,s=0;const a={properties:{}};for(a.id=t[i],i++,s++,u&&(a.originId=t[i],i++,s++,a.destinationId=t[i],i++,s++);i<t.length;i++)a.properties[o[i-s]]=t[i];r.push(a)}h=h.concat(i.writeToStore(r,O,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return h}};(0,i._)([(0,l.MZ)()],J.prototype,"knowledgeGraph",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"inclusionModeDefinition",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"entityTypeNames",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"relationshipTypeNames",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"geographicLookup",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"sublayerCaches",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"nodeConnectionsLookup",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"relationshipConnectionsLookup",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"memberIdTypeLookup",void 0),J=(0,i._)([(0,h.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],J);var $=n(13874),U=(n(86162),n(94409),n(65345),n(42980),n(39290),n(92438),n(96576),n(93618),n(65494)),Y=n(15036),z=(n(29953),n(83221)),Q=n(36791),V=n(64714);const H=(0,n(17036).p)(),X=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,i._)([(0,l.MZ)(H.fields)],t.prototype,"fields",void 0),(0,i._)([(0,l.MZ)(H.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,i._)([(0,h.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};var W=n(63074),K=n(81149),ee=n(54310),te=n(25036),ne=n(55785),ie=n(20437),re=n(30524),se=n(22671),oe=n(30291),ae=n(61322),le=n(82799),he=n(50498);let ue=class extends((0,K.J)(X((0,W.d)((0,te.j)((0,ee.J)(p.A)))))){constructor(e){if(super(e),this.capabilities=(0,V.f)(!1,!1),this.definitionExpression="",this.displayField="",this.elevationInfo=null,this.geometryType=null,this.geometryFieldName=null,this.graphType=null,this.hasM=!1,this.hasZ=!1,this.labelsVisible=null,this.labelingInfo=null,this.objectIdField=O,this.objectType=null,this.parentCompositeLayer=null,this.popupEnabled=!0,this.popupTemplate=null,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new ae.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const n=j.A.fromJSON(e);return this.queryFeaturesJSON(n,t)}}}),[e.port2]}))},this.type="knowledge-graph-sublayer","link-chart"===e.parentCompositeLayer.type)"relationship"===e.graphType?this.geometryType="polyline":this.geometryType="point",this.geometryFieldName=F;else if(e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType&&"esriGeometryNull"!==e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType){const t=e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name);this.geometryFieldName=t?.name??null,this.geometryType=t?.geometryType?he.g.fromJSON(t.geometryType):null;const n=t?.name,i=n?e.objectType.properties?.[n]:null;i?(this.hasM=i.hasM??!1,this.hasZ=i.hasZ??!1):(this.hasM=!1,this.hasZ=!1)}else this.geometryType=null;e.objectType.properties?.forEach((e=>{let t=e.fieldType;"esriFieldTypeOID"===t&&(t="esriFieldTypeInteger"),this.fields.push(ie.A.fromJSON({name:e.name,type:t,alias:e.alias,defaultValue:null,editable:e.editable,nullable:e.nullable}))})),this.fields.push(ie.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1})),this.fields.push(ie.A.fromJSON({name:Z,type:"esriFieldTypeInteger",alias:Z,editable:!1})),this._set("fields",[...this.fields]),e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel?.spatialReference&&(this.spatialReference=e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel.spatialReference),"link-chart"===e.parentCompositeLayer.type?"relationship"===e.graphType?this.renderer=(0,U.r)((0,V.F0)(he.g.toJSON("polyline")).renderer):this.renderer=(0,U.r)((0,V.F0)(he.g.toJSON("point")).renderer):this.renderer=(0,U.r)((0,V.F0)(he.g.toJSON(this.geometryType)).renderer)}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,re.yp)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,oe.tn)(this,e)}createQuery(){return new j.A({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];return null}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e),r=se.A.fromJSON(await i.executeQuery(n.toJSON(),t?.signal));return r.features.forEach((e=>{e.sourceLayer=this})),r}async queryFeaturesJSON(e,t){const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return await i.executeQuery(n.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return i.executeQueryForCount(n.toJSON(),t?.signal)}async queryExtent(e={},t){const n={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:r}=await this._setupQueryObjects(n),s=await r.executeQueryForExtent(i.toJSON(),t?.signal);let o;return o=null!=s.extent?.xmin&&null!=s.extent?.xmax&&null!=s.extent?.ymin&&null!=s.extent?.ymax?new P.A(s.extent):new P.A,{count:s.count,extent:o}}async queryObjectIds(e,t){const n=j.A.from(e);let i;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);i=this.loadQueryEngine(e)}return i.executeQueryForIds(n.toJSON(),t?.signal)}loadQueryEngine(e){const t=new z.A({geometryType:he.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=new Q.d({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:he.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new j.A({where:"1=1",outFields:[O]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const n=j.A.from(e),i=n.geometry;let r;if(i&&!i.spatialReference?.isWGS84&&(await(0,w.initializeProjection)(i.spatialReference,b.KK),n.geometry=(0,w.project)(i instanceof g.A||i instanceof le.A?i:i.extent,b.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)r=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);r=this.loadQueryEngine(e)}return{resolvedQuery:n,queryEngine:r}}};(0,i._)([(0,l.MZ)()],ue.prototype,"capabilities",void 0),(0,i._)([(0,l.MZ)({readOnly:!0})],ue.prototype,"defaultPopupTemplate",null),(0,i._)([(0,l.MZ)()],ue.prototype,"definitionExpression",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"displayField",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"elevationInfo",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"geometryType",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"geometryFieldName",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"graphType",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"hasM",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"hasZ",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"labelsVisible",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"labelingInfo",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"objectIdField",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"objectType",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"parentCompositeLayer",void 0),(0,i._)([(0,l.MZ)(ne.M6)],ue.prototype,"popupEnabled",void 0),(0,i._)([(0,l.MZ)({type:$.A,json:{name:"popupInfo",write:!0}})],ue.prototype,"popupTemplate",void 0),(0,i._)([(0,l.MZ)({types:Y.H,json:{write:{target:"layerDefinition.drawingInfo.renderer"}}})],ue.prototype,"renderer",null),(0,i._)([(0,l.MZ)()],ue.prototype,"source",void 0),(0,i._)([(0,l.MZ)({json:{read:!1}})],ue.prototype,"type",void 0),ue=(0,i._)([(0,h.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],ue);const pe=ue;var de=n(2741);let ce,ye=null;var me,fe,ge,we,be,_e,xe,ve,Me,ke,Ee;function Le(e,t,n,i,r,s){const o=n.length,a=r.length,l=Float64Array.BYTES_PER_ELEMENT,h=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,p=15+o*(u+2*l)+a*(2*h),d=ye._malloc(p);try{const u=d+16-d%16,p=u+o*l,c=p+o*l,y=c+a*h,m=y+a*h,f=()=>[ye.HEAPF64.subarray(u>>3,(u>>3)+o),ye.HEAPF64.subarray(p>>3,(p>>3)+o),ye.HEAPU32.subarray(c>>2,(c>>2)+a),ye.HEAPU32.subarray(y>>2,(y>>2)+a),ye.HEAPU8.subarray(m,m+o)],[g,w,b,_,x]=f();g.set(n),w.set(i),b.set(r),_.set(s),x.set(t);let v=e(o,m,u,p,a,c,y),M=null;if(v){const e=ye.getLayoutLinksTypes(),t=ye.getLayoutLinksVerticesEndIndices(),n=ye.getLayoutLinksVertices(),i=ye.countLayoutLinksVertices();!a||e&&t?i&&!n?v=!1:M={types:new Uint8Array(ye.HEAPU8.subarray(e,e+a)),vertexEndIndex:new Uint32Array(ye.HEAPU32.subarray(t>>2,(t>>2)+a)),vertices:new Float64Array(ye.HEAPF64.subarray(n>>3,(n>>3)+2*i))}:v=!1}const[k,E,L,T,I]=f();return n.set(k),i.set(E),r.set(L),s.set(T),t.set(I),{success:v,links:M}}finally{ye._free(d),ye.cleanupLayout()}}(ge=me||(me={}))[ge.None=0]="None",ge[ge.IsMovable=1]="IsMovable",ge[ge.IsGeographic=2]="IsGeographic",ge[ge.IsRoot=4]="IsRoot",function(e){e[e.Regular=0]="Regular",e[e.Orthogonal=1]="Orthogonal",e[e.Curved=2]="Curved",e[e.Recursive=3]="Recursive"}(fe||(fe={})),function(e){e.getMinIdealEdgeLength=function(){return ye.getMinIdealEdgeLength()},e.apply=function(e,t,n,i,r,s=2,o=1,a=-1){return Le(((e,t,n,i,r,l,h)=>ye.applyForceDirectedLayout(e,t,n,i,r,l,h,s,o,a)),e,t,n,i,r)}}(we||(we={})),function(e){e.apply=function(e,t,n,i,r,s=2,o=1,a=-1){return Le(((e,t,n,i,r,l,h)=>ye.applyCommunityLayout(e,t,n,i,r,l,h,s,o,a)),e,t,n,i,r)}}(be||(be={})),function(e){e.apply=function(e,t,n,i,r){return Le(ye.applySimpleLayout,e,t,n,i,r)}}(_e||(_e={})),function(e){e.apply=function(e,t,n,i,r){return Le(ye.applyHierarchicalLayout,e,t,n,i,r)}}(xe||(xe={})),function(e){e.apply=function(e,t,n,i,r){return Le(ye.applyRadialTreeLayout,e,t,n,i,r)}}(ve||(ve={})),function(e){e.apply=function(e,t,n,i,r){return Le(ye.applySmartTreeLayout,e,t,n,i,r)}}(Me||(Me={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(ke||(ke={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(Ee||(Ee={}));var Te=n(66063),Ie=n(72294),Ae=n(86738);let Ce=class extends((0,W.d)((0,te.j)(p.A))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this.defaultLinkChartConfig=null,this._currentLinkChartConfig={layoutMode:"RADIAL_TREE"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new r.A,this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new P.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.linkChartGeohashLookup=new Map,this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.sublayerIdsCache=new Map,this.tables=new r.A,this.type="link-chart",this._originalInclusionList=e.inclusionModeDefinition,e.dataPreloadedInLocalCache&&!e.inclusionModeDefinition)throw new s.A("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it")}normalizeCtorArgs(e){return{url:e.url,title:e.title,dataPreloadedInLocalCache:e.dataPreloadedInLocalCache,defaultLinkChartConfig:e.defaultLinkChartConfig}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let n=[],i=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new s.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.inclusionModeDefinition?.generateAllSublayers?(n=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((r,s)=>{if(!this._graphTypeLookup.get(s))return o.A.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(s);this._graphTypeLookup.get(s)instanceof Ie.A||"strictOrigin"in this._graphTypeLookup.get(s)?t.has(s)||(t.add(s),i.push(this._graphTypeLookup.get(s))):this._graphTypeLookup.get(s)instanceof Te.A||"properties"in this._graphTypeLookup.get(s)?t.has(s)||(t.add(s),n.push(this._graphTypeLookup.get(s))):(o.A.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(s))})):(n=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]);const r=new J({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=n,this.memberRelationshipTypes=i,this.dataManager=r}load(e){return this.addResolvingPromise(new Promise((t=>{(0,N.fetchKnowledgeGraph)(this.url).then((n=>{if(this._initializeLayerProperties({knowledgeGraph:n,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache)this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1,e.members?.forEach((e=>{let t;t=e.linkChartLocation instanceof c.A?e.linkChartLocation:e.linkChartLocation?(0,d.Ux)(e.linkChartLocation):null,t&&2===t.coords.length&&0===t.lengths.length?(this.linkChartGeohashLookup.set(e.id,(0,u.Qj)(t.coords[1],t.coords[0],q)),this.entityLinkChartDiagramLookup.set(e.id,t)):(this.linkChartGeohashLookup.set(e.id,""),this.relationshipLinkChartDiagramLookup.set(e.id,t))})),this.addResolvingPromise(this._initializeDiagram().then((async()=>{this.layers.forEach((async e=>{await e.refreshCachedQueryEngine()})),this.tables.forEach((async e=>{await e.refreshCachedQueryEngine()}))})))}));else{const t="GEOGRAPHIC"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{(0,a.Te)(e);const t=[],n=[];this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1,this.dataManager.inclusionModeDefinition.namedTypeDefinitions.forEach((e=>{e.useAllData=!1}))),await this._initializeDiagram(),this.layers.forEach((e=>{n.push(e.refreshCachedQueryEngine()),t.push(new Promise((t=>{e.on("layerview-create",(()=>{t(null)}))})))})),this.tables.forEach((e=>{n.push(e.refreshCachedQueryEngine())})),await Promise.all(n)})))}t(null)}))}))),Promise.resolve(this)}async addRecords(e,t){let n=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(n=await async function(e,t){const n=[],i=new Map,r=[];if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&i.set(e.name,[]);for(const t of e)i.has(t.typeName)&&i.get(t.typeName)?.push(t.id);for(const[e,s]of i){if(s.length<1)continue;const i=new D.A({openCypherQuery:`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $ids RETURN id(n), labels(n)[0], id(m), labels(m)[0]`,bindParameters:{ids:s}});r.push((0,N.executeQueryStreaming)(t,i).then((async e=>{const t=e.resultRowsStream.getReader();for(;;){const{done:e,value:i}=await t.read();if(e)break;for(const e of i)n.push({id:e[0],typeName:e[1]}),n.push({id:e[2],typeName:e[3]})}})))}return await Promise.all(r),n}(e,this.dataManager.knowledgeGraph));const i=e.concat(n).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));await this._handleNewRecords(i)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:n=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1}){let i=[];for(const t of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id)&&i.push(t);if(t){const e=new Set,t=[];for(const t of i)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(const n of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(n);for(const n of e)if(this.dataManager.memberIdTypeLookup.has(n))for(const e of this.dataManager.memberIdTypeLookup.get(n))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:n,typeName:e});i=i.concat(t)}this.dataManager.removeFromLayer(i);for(const e of i)this.sublayerIdsCache.get(e.typeName)?.delete(e.id),this.dataManager.relationshipTypeNames.has(e.typeName)?this.relationshipLinkChartDiagramLookup.delete(e.id):this.entityLinkChartDiagramLookup.delete(e.id);n&&await this.calculateLinkChartLayout(this._currentLinkChartConfig.layoutMode,{});const r=[];return this.layers.forEach((e=>{r.push(e.refreshCachedQueryEngine())})),await Promise.all(r),this._refreshNamedTypes(),i}async expand(e,t){const n=await this.dataManager.getConnectedRecordIds(e,t),i=n.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));return await this._handleNewRecords(n),{records:i}}loadLayerAssumingLocalCache(){this.memberRelationshipTypes.forEach((e=>{const t=new pe({objectType:e,parentCompositeLayer:this,graphType:"relationship",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.memberEntityTypes.forEach((e=>{const t=new pe({objectType:e,parentCompositeLayer:this,graphType:"entity",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{const n=((e,t,n)=>(e.has(t)||e.set(t,new Set),e.get(t)))(this.sublayerIdsCache,t);e.members?.forEach((e=>{if(n.add(e.id),e.linkChartLocation)if(e.linkChartLocation instanceof c.A)this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e.id,e.linkChartLocation):this.entityLinkChartDiagramLookup.set(e.id,e.linkChartLocation),2===e.linkChartLocation.coords.length&&0===e.linkChartLocation.lengths.length?this.linkChartGeohashLookup.set(e.id,(0,u.Qj)(e.linkChartLocation.coords[1],e.linkChartLocation.coords[0],q)):this.linkChartGeohashLookup.set(e.id,"");else{const n=(0,d.Ux)(e.linkChartLocation);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e.id,e.linkChartLocation?n:null):this.entityLinkChartDiagramLookup.set(e.id,e.linkChartLocation?n:null),"x"in e.linkChartLocation&&"y"in e.linkChartLocation?this.linkChartGeohashLookup.set(e.id,(0,u.Qj)(e.linkChartLocation.x,e.linkChartLocation.y,q)):this.linkChartGeohashLookup.set(e.id,"")}}))}))}async calculateLinkChartLayout(e="RADIAL_TREE",t){const i=[],r=[],a=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{i.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{r.push({typeName:t,feature:e})}))})),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const l=new Map,h=new Map,p=new Map,c=new Map,y=new Uint8Array(i.length),m=new Float64Array(i.length),f=new Float64Array(i.length),g=new Uint32Array(r.length),w=new Uint32Array(r.length),b=[],_=new P.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let x,v="FORCE_DIRECTED",M=0,k=0;switch(v="GEOGRAPHIC"===e?"FORCE_DIRECTED":e,v){case"FORCE_DIRECTED":x=we.apply;break;case"COMMUNITY":x=be.apply;break;case"HIERARCHICAL":x=xe.apply;break;case"RADIAL_TREE":x=ve.apply;break;case"SMART_TREE":x=Me.apply;break;default:x=_e.apply}i.forEach((({typeName:n,feature:i})=>{if(t?.lockedNodeLocations?.has(i.attributes[O])){"GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(n)?y[M]=me.IsGeographic:y[M]=me.None;const r=t.lockedNodeLocations.get(i.attributes[O]);m[M]=r.x,f[M]=r.y}else if("GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(n)){y[M]=me.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(n).name],r=this.dataManager.geographicLookup.get(n)?.geometryType;switch(r){case"esriGeometryPoint":m[M]=t?.x,f[M]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(m[M]=e.x,f[M]=e.y):y[M]=me.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(m[M]=e.x,f[M]=e.y):y[M]=me.IsMovable;break;default:y[M]=me.IsMovable}(null==m[M]||null==f[M]||Number.isNaN(m[M])||Number.isNaN(f[M]))&&(y[M]=me.IsMovable,m[M]=0,f[M]=0)}else y[M]=me.IsMovable,m[M]=0,f[M]=0;c.set(i.attributes[O],M),b[M]={feature:i,typeName:n},M++}));let E=!1;const L=new Map;r.forEach((e=>{const t=e.feature.attributes[B],n=e.feature.attributes[G],i=c.get(t),r=c.get(n);if(void 0!==i&&void 0!==r){const s=t+"-"+n,o=L.get(s),l=o?.has(e.typeName);l||(g[k]=i,w[k]=r,void 0===o?L.set(s,new Map([[e.typeName,k]])):o.set(e.typeName,k),k++),a.push(e)}else E=!0,this.relationshipLinkChartDiagramLookup.set(t,null),this.linkChartGeohashLookup.set(t,null)})),E&&o.A.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null"),await(ce||(ce=n.e(3666).then(n.bind(n,3666)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,de.s)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){ye=e}(e)})),ce));const{success:T,links:I}=x(y,m,f,g.subarray(0,k),w.subarray(0,k));if(!T)throw new s.A("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");for(let e=0;e<b.length;e++){if(f[e]>84.9999?f[e]=84.9999:f[e]<-84.9999&&(f[e]=-84.9999),m[e]>179.9999?m[e]=179.9999:m[e]<-179.9999&&(m[e]=-179.9999),b[e].feature.attributes[F]=new Ae.A(m[e],f[e]),l.has(b[e].typeName)){const t=l.get(b[e].typeName);t?.set(b[e].feature.attributes[O],b[e].feature)}else{const t=new Map;t.set(b[e].feature.attributes[O],b[e].feature),l.set(b[e].typeName,t)}p.set(b[e].feature.attributes[O],b[e].feature);const t=(0,d.Ux)(b[e].feature.attributes[F]);this.entityLinkChartDiagramLookup.set(b[e].feature.attributes[O],b[e].feature.attributes[F]?t:null),this.linkChartGeohashLookup.set(b[e].feature.attributes[O],(0,u.Qj)(b[e].feature.attributes[F].y,b[e].feature.attributes[F].x,q)),b[e].feature.attributes[F].x<_.xmin&&(_.xmin=b[e].feature.attributes[F].x),b[e].feature.attributes[F].x>_.xmax&&(_.xmax=b[e].feature.attributes[F].x),b[e].feature.attributes[F].y<_.ymin&&(_.ymin=b[e].feature.attributes[F].y),b[e].feature.attributes[F].y>_.ymax&&(_.ymax=b[e].feature.attributes[F].y)}if(this.linkChartExtent.xmin=_.xmin,this.linkChartExtent.xmax=_.xmax,this.linkChartExtent.ymin=_.ymin,this.linkChartExtent.ymax=_.ymax,!I)throw new s.A("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const A=new Map,C=new Map,S=new Map,N=new Set;for(let e=0;e<a.length;e++){const t=[],n=a[e],i=n.feature.attributes[B],r=n.feature.attributes[G],s=i+"-"+r,l=L.get(s).get(n.typeName),u=0===l?0:I?.vertexEndIndex[l-1];if(!N.has(l)){if(N.add(l),I.types[l]===fe.Recursive){const e=[I.vertices[2*u],I.vertices[2*u+1]],n=[I.vertices[2*(u+1)],I.vertices[2*(u+1)+1]],i=[.5*(e[0]+n[0]),.5*(e[1]+n[1])],r=[i[0]-e[0],i[1]-e[1]],s=[i[0]+r[1],i[1]-r[0]],o=[i[0]-r[1],i[1]+r[0]];t.push(e),t.push(s),t.push(n),t.push(o),t.push(e)}else{if(I.types[l]!==fe.Regular){o.A.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=u;e<I.vertexEndIndex[l];e++)t.push([I.vertices[2*e],I.vertices[2*e+1]])}const e=b[c.get(i)]?.feature.attributes[F],n=b[c.get(r)]?.feature.attributes[F];t[0][0]===e.x&&t[0][1]===e.y||(t[0]=[e.x,e.y]),t[t.length-1][0]===n.x&&t[t.length-1][1]===n.y||(t[t.length-1]=[n.x,n.y]);for(let e=1;e<t.length-1;e++)t[e][1]>85.5?t[e][1]=85.5:t[e][1]<-85.5&&(t[e][1]=-85.5),t[e][0]>179.9999?t[e][0]=179.9999:t[e][0]<-179.9999&&(t[e][0]=-179.9999);A.has(s)?A.get(s).push(t):A.set(s,[t])}const y=A.get(s);C.has(s)||(C.set(s,new Map),S.set(s,new Map));const m=C.get(s),f=S.get(s);m.has(n.typeName)||(m.set(n.typeName,y.shift()),f.set(n.typeName,0));const g=m.get(n.typeName);f.set(n.typeName,f.get(n.typeName)+1);const w=new le.A({paths:g});if(n.feature.attributes[F]=w,h.has(n.typeName)){const e=h.get(n.typeName);e?.set(n.feature.attributes[O],n.feature)}else{const e=new Map;e.set(n.feature.attributes[O],n.feature),h.set(n.typeName,e)}p.set(n.feature.attributes[O],n.feature);const _=(0,d.Ux)(n.feature.attributes[F]);this.relationshipLinkChartDiagramLookup.set(n.feature.attributes[O],n.feature.attributes[F]?_:null),this.linkChartGeohashLookup.set(n.feature.attributes[O],"")}for(const e of a)e.feature.attributes[Z]=S.get(e.feature.attributes[B]+"-"+e.feature.attributes[G])?.get(e.typeName)??null;return this._currentLinkChartConfig={layoutMode:e},{nodes:l,links:h,idMap:p}}async applyNewLinkChartLayout(e="RADIAL_TREE",t){const n=[];await this.calculateLinkChartLayout(e,t),this.layers.forEach((e=>{n.push(e.refreshCachedQueryEngine())})),await Promise.all(n),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;return this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((t=>{t?.members?.forEach((t=>{const n=t.linkChartLocation;let i;const r=t.id;n&&(i="x"in n?{x:n.x,y:n.y}:{x:n.coords[0],y:n.coords[1]},e.set(r,new Ae.A({x:i.x,y:i.y})))}))})),e}async synchronizeInclusionListWithCache(){return new Promise((e=>{this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{if(e.useAllData=!1,e.members&&e.members.size>0){if(!this.dataManager.sublayerCaches.get(t))return;const n=new Set(Array.from(this.dataManager.sublayerCaches.get(t).keys()));Array.from(e.members.keys()).filter((e=>!n.has(e))).forEach((t=>{e.members?.delete(t)}))}})),e()}))}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async _handleNewRecords(e){const t=[];this.dataManager.addToLayer(e);for(const n of e)this.sublayerIdsCache.has(n.typeName)||(this.sublayerIdsCache.set(n.typeName,new Set),t.push(n.typeName)),this.sublayerIdsCache.get(n.typeName).add(n.id);for(const e of t)if(this._graphTypeLookup.has(e)){const t=this._graphTypeLookup.get(e),n="endPoints"in t?"relationship":"entity",i=new pe({objectType:t,parentCompositeLayer:this,graphType:n,title:e});"entity"===n?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),i.geometryType?this.layers.push(i):this.tables.push(i),this.dataManager.sublayerCaches.set(e,new Map)}await this.dataManager.refreshCacheContent(e.map((e=>e.id))),await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode)}async _initializeDiagram(){this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e?.members?.forEach((e=>{const n=e.linkChartLocation;let i;const r=e.id;if(!n)return;i="x"in n?{x:n.x,y:n.y}:{x:n.coords[0],y:n.coords[1]};const s=(0,d.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(r,s):this.entityLinkChartDiagramLookup.set(r,s),this.linkChartGeohashLookup.set(r,(0,u.Qj)(i.x,i.y,q)),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[B]),n=this.relationshipLinkChartDiagramLookup.get(e.attributes[G]);if(t&&n){const i=(0,d.Ux)(new le.A({paths:[[t.coords[0],t.coords[1]],[n.coords[0],n.coords[1]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[O],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[O],null);this.linkChartGeohashLookup.set(e.attributes[O],"")}))}))):await this.calculateLinkChartLayout(this.defaultLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations()}):await this.calculateLinkChartLayout("RADIAL_TREE",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}};(0,i._)([(0,l.MZ)()],Ce.prototype,"dataPreloadedInLocalCache",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"defaultLinkChartConfig",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"dataManager",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"knowledgeGraph",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"layers",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"entityLinkChartDiagramLookup",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"relationshipLinkChartDiagramLookup",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"linkChartExtent",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"linkChartGeohashLookup",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"memberEntityTypes",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"memberRelationshipTypes",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"sublayerIdsCache",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"tables",void 0),(0,i._)([(0,l.MZ)({json:{read:!1}})],Ce.prototype,"type",void 0),Ce=(0,i._)([(0,h.$)("esri.layers.LinkChartLayer")],Ce);const Se=Ce},6518:(e,t,n)=>{n.d(t,{F:()=>a});var i=n(44208),r=n(75503),s=n(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.w(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((n,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,s.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,n)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,n)=>{n.d(t,{A:()=>y});var i=n(4576),r=n(49186),s=n(65529),o=n(53966),a=n(70328),l=n(19419),h=n(90708),u=n(6518),p=n(51441),d=n(63517);const c=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new u.F,this._featuresById=new Map,this._markedIds=new Set,this.events=new s.A,this.featureAdapter=d.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,n,i,r]=this.fullBounds;return{xmin:t,ymin:n,xmax:i,ymax:r,spatialReference:(0,p.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const n of e){const e=this._boundsStore.get(n.objectId);e&&t((0,a.Jt)(c,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,n)=>{this._markedIds.has(n)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let i;if(this._markedIds.add(t),n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,h.jQ)(null!=i?i:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const n=this._featuresById.get(t);if(!n)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:s}=e;for(const e in s)n.attributes[e]=s[e];return i&&(n.geometry=i,this._boundsStore.set(t,(0,h.jQ)((0,l.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),n}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},64714:(e,t,n)=>{n.d(t,{F0:()=>a,Vx:()=>u,e2:()=>p,f:()=>d});var i=n(44208),r=n(4718),s=n(99352),o=n(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function u(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this.${t} = null;`;for(const t in e)n+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new i}catch(n){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},20437:(e,t,n)=>{n.d(t,{A:()=>f});var i,r=n(90237),s=n(66552),o=n(25482),a=n(10107),l=n(56507),h=(n(87811),n(44208),n(93223)),u=n(36005),p=n(40608),d=n(72088),c=n(98453);const y=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=i=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?y.fromJSON(n.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,r._)([(0,a.MZ)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,r._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,r._)([(0,a.MZ)()],m.prototype,"description",void 0),(0,r._)([(0,u.w)("description")],m.prototype,"readDescription",null),(0,r._)([(0,a.MZ)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],m.prototype,"domain",void 0),(0,r._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,r._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,r._)([(0,a.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,r._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,r._)([(0,h.e)(c.m)],m.prototype,"type",void 0),(0,r._)([(0,a.MZ)()],m.prototype,"valueType",void 0),(0,r._)([(0,u.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,r._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,r._)([(0,p.$)("esri.layers.support.Field")],m);const f=m},81457:(e,t,n)=>{n.d(t,{A:()=>L});var i,r=n(90237),s=n(61147),o=n(66552),a=n(25482),l=n(4718),h=n(90629),u=n(10107),p=(n(44208),n(53966),n(36005)),d=n(40608),c=n(43937),y=(n(87811),n(32730));let m=i=class extends a.oY{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,y.mX)(t.value):e}writeExpression(e,t,n){null!=this.value&&(e=(0,y.mX)(this.value)),null!=e&&(t[n]=e)}clone(){return new i({expression:this.expression,title:this.title,value:this.value})}};(0,r._)([(0,u.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],m.prototype,"expression",void 0),(0,r._)([(0,p.w)("expression",["expression","value"])],m.prototype,"readExpression",null),(0,r._)([(0,c.K)("expression")],m.prototype,"writeExpression",null),(0,r._)([(0,u.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],m.prototype,"title",void 0),(0,r._)([(0,u.MZ)({json:{read:!1,write:!1}})],m.prototype,"value",void 0),m=i=(0,r._)([(0,d.$)("esri.layers.support.LabelExpressionInfo")],m);const f=m;var g,w=n(83531),b=n(59868),_=n(54031);const x=new o.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function v(e,t,n){return{enabled:!(0,w.TU)(n?.layer)}}function M(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function k(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let E=g=class extends a.oY{static evaluateWhere(e,t){const n=(e,t,n)=>{switch(t){case"=":return e==n;case"<>":return e!=n;case">":return e>n;case">=":return e>=n;case"<":return e<n;case"<=":return e<=n}return!1};try{if(null==e)return!0;const i=e.split(" ");if(3===i.length)return n(t[i[0]],i[1],i[2]);if(7===i.length){const e=n(t[i[0]],i[1],i[2]),r=i[3],s=n(t[i[4]],i[5],i[6]);switch(r){case"AND":return e&&s;case"OR":return e||s}}return!1}catch(t){console.log("Error.: can't parse = "+e)}}constructor(e){super(e),this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.repeatLabelDistance=null,this.symbol=b.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const n=t.labelExpressionInfo;if(!n||!n.value&&!n.expression)return e}writeLabelExpression(e,t,n){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,y.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,y.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[n]=e)}writeLabelExpressionInfo(e,t,n,i){if(null==e&&null!=this.labelExpression&&M(i))e=new f({expression:this.getLabelExpressionArcade()});else if(!e)return;const r=e.toJSON(i);r.expression&&(t[n]=r)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return(0,y.XJ)(this)}getLabelExpressionArcade(){return(0,y.BI)(this)}getLabelExpressionSingleField(){return(0,y.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new g({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,l.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,l.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,r._)([(0,u.MZ)({type:String,json:{write:!0}})],E.prototype,"name",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:v}}}}})],E.prototype,"allowOverrun",void 0),(0,r._)([(0,u.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:v}}}}})],E.prototype,"deconflictionStrategy",void 0),(0,r._)([(0,u.MZ)({type:String,json:{write:{overridePolicy(e,t,n){return this.labelExpressionInfo&&"service"===n?.origin&&k(n.layer)?{enabled:!1}:{allowNull:!0}}}}})],E.prototype,"labelExpression",void 0),(0,r._)([(0,p.w)("labelExpression")],E.prototype,"readLabelExpression",null),(0,r._)([(0,c.K)("labelExpression")],E.prototype,"writeLabelExpression",null),(0,r._)([(0,u.MZ)({type:f,json:{write:{overridePolicy:(e,t,n)=>function(e){return M(e)||k(e?.layer)}(n)?{allowNull:!0}:{enabled:!1}}}})],E.prototype,"labelExpressionInfo",void 0),(0,r._)([(0,c.K)("labelExpressionInfo")],E.prototype,"writeLabelExpressionInfo",null),(0,r._)([(0,u.MZ)({type:x.apiValues,json:{type:x.jsonValues,read:x.read,write:x.write}})],E.prototype,"labelPlacement",void 0),(0,r._)([(0,u.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],E.prototype,"labelPosition",void 0),(0,r._)([(0,u.MZ)({type:Number})],E.prototype,"maxScale",void 0),(0,r._)([(0,c.K)("maxScale")],E.prototype,"writeMaxScale",null),(0,r._)([(0,u.MZ)({type:Number})],E.prototype,"minScale",void 0),(0,r._)([(0,c.K)("minScale")],E.prototype,"writeMinScale",null),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:v}}}}})],E.prototype,"repeatLabel",void 0),(0,r._)([(0,u.MZ)({type:Number,cast:h.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:v}}}}})],E.prototype,"repeatLabelDistance",void 0),(0,r._)([(0,u.MZ)({types:s.em,json:{origins:{"web-scene":{types:s.Rv,write:_.oO,default:null}},write:_.oO,default:null}})],E.prototype,"symbol",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"useCodedValues",void 0),(0,r._)([(0,u.MZ)({type:String,json:{write:!0}})],E.prototype,"where",void 0),E=g=(0,r._)([(0,d.$)("esri.layers.support.LabelClass")],E);const L=E},55785:(e,t,n)=>{n.d(t,{ui:()=>x,Yj:()=>f,id:()=>M,kF:()=>c,fV:()=>m,C1:()=>L,hG:()=>E,hn:()=>k,ke:()=>b,Ih:()=>_,M6:()=>d,Qo:()=>g,Fm:()=>v,PY:()=>p,OZ:()=>y});var i=n(60945),r=n(89317),s=n(5443),o=n(16930),a=n(97159),l=(n(4576),n(4718),n(88930)),h=n(88625),u=n(78553);const p={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:{enabled:!0,layerContainerTypes:r.K}}},d={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,writer(e,t,n){t[n]=!e}}}},c={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:{enabled:!0,layerContainerTypes:r.K}}},y={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:a.w}}},m={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:{enabled:!0,layerContainerTypes:r.K}}},f={value:null,type:h.A,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:{enabled:!0,layerContainerTypes:r.K}}};function g(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const w={write:{enabled:!0,layerContainerTypes:r.K},read:!0},b={type:Number,json:{origins:{"web-document":w,"portal-item":{write:!0}}}},_={...b,json:{...b.json,origins:{"web-document":{...w,write:{enabled:!0,layerContainerTypes:r.K,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,t,n)=>n&&"service"!==n.origin||!t.drawingInfo||void 0===t.drawingInfo.transparency?t.layerDefinition?.drawingInfo&&void 0!==t.layerDefinition.drawingInfo.transparency?(0,u.D)(t.layerDefinition.drawingInfo.transparency):void 0:(0,u.D)(t.drawingInfo.transparency)}}},x={type:i.A,readOnly:!0,get(){const e=null!=this.layer?.timeInfo?this.layer:null!=this.i3slayer?.timeInfo?this.i3slayer:null;if(null==e)return null;const{datesInUnknownTimezone:t,timeOffset:n,useViewTime:r}=e,s=this.view?.timeExtent;let o=e.timeExtent;t&&(o=function(e){if(!e)return e;const{start:t,end:n}=e;return new i.A({start:null!=t?(0,l.S1)(t,t.getTimezoneOffset(),"minutes"):t,end:null!=n?(0,l.S1)(n,n.getTimezoneOffset(),"minutes"):n})}(o));let a=r?s&&o?s.intersection(o):s||o:o;if(!a||a.isEmpty||a.isAllTime)return a;n&&(a=a.offset(-n.value,n.unit)),t&&(a=function(e){if(!e)return e;const{start:t,end:n}=e;return new i.A({start:null!=t?(0,l.S1)(t,-t.getTimezoneOffset(),"minutes"):t,end:null!=n?(0,l.S1)(n,-n.getTimezoneOffset(),"minutes"):n})}(a));const h=this._get("timeExtent");return a.equals(h)?h:a}},v={type:s.A,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,t)=>{const n=s.A.fromJSON(e);return null!=t.spatialReference&&"object"==typeof t.spatialReference&&(n.spatialReference=o.A.fromJSON(t.spatialReference)),n}}}},read:!1}},M={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},k={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.minScale",write:{enabled:!0,layerContainerTypes:r.K}}},name:"layerDefinition.minScale",write:!0}},E={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.maxScale",write:{enabled:!0,layerContainerTypes:r.K}}},name:"layerDefinition.maxScale",write:!0}},L={json:{write:{ignoreOrigin:!0,layerContainerTypes:r.K},origins:{"web-map":{read:!1,write:!1}}}}},72088:(e,t,n)=>{n.d(t,{rS:()=>k,gK:()=>M}),n(44208);var i,r=n(90237),s=n(4718),o=n(10107),a=(n(53966),n(93223)),l=n(40608),h=n(25482);n(87811);let u=i=class extends h.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,r._)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,r._)([(0,o.MZ)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=i=(0,r._)([(0,l.$)("esri.layers.support.CodedValue")],u);const p=new(n(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends h.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,r._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,r._)([(0,a.e)(p)],d.prototype,"type",void 0),d=(0,r._)([(0,l.$)("esri.layers.support.Domain")],d);const c=d;var y;let m=y=class extends c{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,r._)([(0,o.MZ)({type:[u],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,r._)([(0,a.e)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=y=(0,r._)([(0,l.$)("esri.layers.support.CodedValueDomain")],m);const f=m;var g;n(49186);let w=g=class extends c{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,r._)([(0,a.e)({inherited:"inherited"})],w.prototype,"type",void 0),w=g=(0,r._)([(0,l.$)("esri.layers.support.InheritedDomain")],w);const b=w;var _;let x=_=class extends c{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new _({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],x.prototype,"maxValue",void 0),(0,r._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],x.prototype,"minValue",void 0),(0,r._)([(0,a.e)({range:"range"})],x.prototype,"type",void 0),x=_=(0,r._)([(0,l.$)("esri.layers.support.RangeDomain")],x);const v=x,M={key:"type",base:c,typeMap:{range:x,"coded-value":f,inherited:b}};function k(e){if(!e?.type)return null;switch(e.type){case"range":return v.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},32730:(e,t,n)=>{n.d(t,{BI:()=>f,D3:()=>y,XJ:()=>m,lc:()=>c,mX:()=>w,rU:()=>g,tH:()=>M});var i=n(799);const r="__begin__",s="__end__",o=new RegExp(r,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+r,"i"),h=new RegExp(s+"$","i"),u='"',p=u+" + ",d=" + "+u;function c(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function y(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=c(e.labelExpression),t.type="conventional"),t}function f(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return w(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(b);return t?.[1].trim()||null}(t.expression);case"arcade":return M(t.expression)}return null}function w(e){let t;return e?(t=(0,i.HC)(e,(e=>r+'$feature["'+e+'"]'+s)),t=l.test(t)?t.replace(l,""):u+t,t=h.test(t)?t.replace(h,""):t+u,t=t.replaceAll(o,p).replaceAll(a,d)):t='""',t}const b=/^\s*\{([^}]+)\}\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,x=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function M(e){if(!e)return null;let t=_.exec(e)||x.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}},31756:(e,t,n)=>{n.d(t,{j:()=>s});var i=n(83047),r=n(79258);const s={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",r.$O.radius)}},92300:(e,t,n)=>{n.d(t,{V:()=>s,X:()=>r});var i=n(65864);function r(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function s(e,t,n){const r=(0,i.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=n,t}))}},25927:(e,t,n)=>{n.d(t,{A:()=>h});var i=n(90237),r=(n(59456),n(10107)),s=(n(44208),n(53966),n(87811),n(40608)),o=n(54238),a=n(86738);let l=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,i._)([(0,r.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,i._)([(0,s.$)("esri.rest.knowledgeGraph.Entity")],l);const h=l},54238:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(90237),r=n(10107),s=(n(44208),n(53966),n(87811),n(40608)),o=n(77901);let a=class extends o.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,i._)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,i._)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,i._)([(0,s.$)("esri.rest.knowledgeGraph.GraphNamedObject")],a);const l=a},77901:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(90237),r=n(25482),s=n(10107),o=(n(44208),n(53966),n(87811),n(40608));let a=class extends r.oY{constructor(e){super(e),this.properties=null}};(0,i._)([(0,s.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,i._)([(0,o.$)("esri.rest.knowledgeGraph.GraphObject")],a);const l=a},42538:(e,t,n)=>{n.d(t,{A:()=>u});var i=n(90237),r=n(10107),s=(n(44208),n(53966),n(87811),n(40608)),o=n(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,i._)([(0,r.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,i._)([(0,s.$)("esri.rest.knowledgeGraph.GraphQuery")],a);const l=a;let h=class extends l{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null}};(0,i._)([(0,r.MZ)()],h.prototype,"bindParameters",void 0),(0,i._)([(0,r.MZ)()],h.prototype,"bindGeometryQuantizationParameters",void 0),(0,i._)([(0,r.MZ)()],h.prototype,"outputQuantizationParameters",void 0),(0,i._)([(0,r.MZ)()],h.prototype,"outputSpatialReference",void 0),h=(0,i._)([(0,s.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],h);const u=h},40662:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(90237),r=(n(53966),n(44208),n(87811),n(49186),n(40608)),s=n(77901);let o=class extends s.A{constructor(e){super(e)}};o=(0,i._)([(0,r.$)("esri.rest.knowledgeGraph.ObjectValue")],o);const a=o},42095:(e,t,n)=>{n.d(t,{A:()=>h});var i=n(90237),r=n(25482),s=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),a=n(77901);let l=class extends r.oY{constructor(e){super(e),this.path=null}};(0,i._)([(0,s.MZ)({type:[a.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,i._)([(0,o.$)("esri.rest.knowledgeGraph.Path")],l);const h=l},23150:(e,t,n)=>{n.d(t,{A:()=>h});var i=n(90237),r=(n(59456),n(10107)),s=(n(44208),n(53966),n(87811),n(40608)),o=n(54238),a=n(82799);let l=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,i._)([(0,r.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,i._)([(0,r.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,i._)([(0,r.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,i._)([(0,s.$)("esri.rest.knowledgeGraph.Relationship")],l);const h=l},54546:(e,t,n)=>{n.d(t,{A:()=>d});var i,r=n(90237),s=n(25482),o=n(4718),a=n(10107),l=n(56507),h=n(40608),u=n(43937);let p=i=class extends s.oY{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new i((0,o.o8)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,r._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"attachmentTypes",void 0),(0,r._)([(0,a.MZ)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],p.prototype,"attachmentsWhere",void 0),(0,r._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],p.prototype,"cacheHint",void 0),(0,r._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"keywords",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"globalIds",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],p.prototype,"num",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"objectIds",void 0),(0,r._)([(0,a.MZ)({type:Boolean,json:{default:!1,write:!0}})],p.prototype,"returnMetadata",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"size",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],p.prototype,"start",void 0),(0,r._)([(0,u.K)("start"),(0,u.K)("num")],p.prototype,"writeStart",null),(0,r._)([(0,a.MZ)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],p.prototype,"where",void 0),p=i=(0,r._)([(0,h.$)("esri.rest.support.AttachmentQuery")],p),p.from=(0,l.dp)(p);const d=p},22671:(e,t,n)=>{n.d(t,{A:()=>b});var i,r=n(90237),s=n(59456),o=n(52106),a=n(66552),l=n(25482),h=n(4718),u=n(10107),p=(n(44208),n(53966),n(36005)),d=n(40608),c=n(43937),y=n(16930),m=n(65864),f=n(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const n=y.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const r=e[t],s=o.A.fromJSON(r),a=r.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=n);const l=r.aggregateGeometries,h=s.aggregateGeometries;if(l&&null!=h)for(const e in h){const t=h[e],i=l[e],r=i?.spatialReference;null==t||r||(t.spatialReference=n)}i.push(s)}return i}writeGeometryType(e,t,n,i){if(e)return void g.write(e,t,n,i);const{features:r}=this;if(r)for(const e of r)if(null!=e?.geometry)return void g.write(e.geometry.type,t,n,i)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,i=(0,m.rS)(e);return i&&!n&&t.spatialReference&&(i.spatialReference=y.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,h.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let n=0;n<t.features.length;n++){const i=t.features[n];if(i.geometry){const t=e?.[n];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,n],translate:[i,r]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((r-e)/n)));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[i,r],scale:[s,o]}=n;let a=null,l=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;a=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;l=n=>null==n?n:n*t+e}const h=this._getHydrationFunction(e,(e=>e*s+i),(e=>r-e*o),a,l);for(const{geometry:e}of t)null!=e&&h&&h(e);return this.transform=null,this}_quantizePoints(e,t,n){let i,r;const s=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=n(a[1]);e===i&&o===r||(s.push([e-i,o-r]),i=e,r=o)}else i=t(a[0]),r=n(a[1]),s.push([i,r])}return s.length>0?s:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,m.Bi)(e)?e.rings:e.paths,r=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,n);o&&r.push(o)}return r.length>0?((0,m.Bi)(e)?e.rings=r:e.paths=r,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,n);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,i,r){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,m.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,r=i.length;e<r;e++){const r=i[e];e>0?(o+=r[0],a+=r[1]):(o=r[0],a=r[1]),r[0]=t(o),r[1]=n(a)}}if(i&&r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=i(n[2]),n[3]=r(n[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=i(n[2])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),r&&null!=e.mmax&&null!=e.mmin&&(e.mmax=r(e.mmax),e.mmin=r(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=n(a)}if(i&&r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=r(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}}:null}};(0,r._)([(0,u.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,r._)([(0,u.MZ)({type:[o.A],json:{write:!0}})],w.prototype,"features",void 0),(0,r._)([(0,p.w)("features")],w.prototype,"readFeatures",null),(0,r._)([(0,u.MZ)({type:[f.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,r._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,r._)([(0,c.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,r._)([(0,u.MZ)({types:s.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,r._)([(0,p.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,r._)([(0,u.MZ)({type:y.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,r._)([(0,c.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,r._)([(0,d.$)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const b=w},2272:(e,t,n)=>{n.d(t,{Dl:()=>o,jV:()=>s,lF:()=>a}),n(92602),n(70333);var i=n(4718),r=n(84952);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,r.An)(e):(0,i.o8)(e)}function a(e,t,n){const i={};for(const r in e){if("declaredClass"===r)continue;const s=e[r];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[r]=s.map((e=>a({item:e},t,n).item));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(n?.[r]);i[r]=t?e:JSON.stringify(e)}else i[r]=t?s:JSON.stringify(s);else i[r]=s}return i}n(926)},30291:(e,t,n)=>{n.d(t,{tn:()=>h});var i=n(13874),r=n(30524),s=n(28122),o=(n(84424),n(80737),n(96808),n(66159)),a=(n(67336),n(92094),n(23721),n(41227)),l=n(68780);function h({displayField:e,editFieldsInfo:t,fields:n,objectIdField:l,title:h},c){if(!n)return null;const m=function(e,t){const n=t?.visibleFieldNames;return function(e,t){const n=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===n&&(e=e.slice()),e.sort(p),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new a.A({fieldName:t.name,isEditable:(0,r.R$)(t,e),label:t.alias,format:d(t),visible:u(t,{...e,visibleFieldNames:n})})))}({editFieldsInfo:t,fields:n,objectIdField:l},c);if(!m.length)return null;const f=function(e){const t=(0,r.mB)(e),{titleBase:n}=e;return t?`${n}: {${t.trim()}}`:n??""}({titleBase:h,fields:n,displayField:e}),g=[new o.A,new s.A];return new i.A({title:f,content:g,fieldInfos:m})}const u=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,r.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:c(e)?-1:c(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.A({digitSeparator:!0,places:0});case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,r.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):null;default:return null}}function c(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const y=["geometry","blob","raster","guid","xml"]},88625:(e,t,n)=>{n.d(t,{A:()=>_});var i,r=n(90237),s=n(66552),o=n(25482),a=n(97768),l=n(10107),h=(n(44208),n(53966),n(87811),n(36005)),u=n(40608),p=n(43937),d=n(30524);let c=i=class extends o.oY{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,d.Dx)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,r._)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"expression",void 0),(0,r._)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=i=(0,r._)([(0,u.$)("esri.symbols.support.FeatureExpressionInfo")],c);const y=c;var m,f=n(16271);const g=(0,s.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),w=new s.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let b=m=class extends o.oY{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,n,i){t[n]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new m({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,r._)([(0,l.MZ)({type:y,json:{write:!0}})],b.prototype,"featureExpressionInfo",void 0),(0,r._)([(0,h.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],b.prototype,"readFeatureExpressionInfo",null),(0,r._)([(0,p.K)("featureExpressionInfo",{featureExpressionInfo:{type:y},"featureExpression.value":{type:[0]}})],b.prototype,"writeFeatureExpressionInfo",null),(0,r._)([(0,l.MZ)({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],b.prototype,"mode",null),(0,r._)([(0,l.MZ)({type:Number,json:{write:!0}})],b.prototype,"offset",void 0),(0,r._)([(0,l.MZ)({type:f.KQ,json:{type:String,read:w.read,write:w.write}})],b.prototype,"unit",null),b=m=(0,r._)([(0,u.$)("esri.symbols.support.ElevationInfo")],b);const _=b},59868:(e,t,n)=>{n.d(t,{A7:()=>h,Cx:()=>u,Hk:()=>p,UK:()=>l}),n(44208);var i=n(94985),r=n(31593),s=n(53930),o=n(68249),a=n(93470);const l=s.A.fromJSON(a.Cb),h=r.A.fromJSON(a.yM),u=i.A.fromJSON(a.WR),p=o.A.fromJSON(a.JZ);s.A.fromJSON(a.nC),r.A.fromJSON(a.HW),i.A.fromJSON(a.b6)},93470:(e,t,n)=>{n.d(t,{Cb:()=>r,HW:()=>h,JZ:()=>a,WR:()=>o,b6:()=>u,nC:()=>l,yM:()=>s});const i=[252,146,31,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={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},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},16271:(e,t,n)=>{n.d(t,{Ao:()=>r,KQ:()=>s});var i=n(31756);function r(e){return 1/(i.j[e]||1)}const s=function(){const e=Object.keys(i.j);return e.sort(),e}()},78553:(e,t,n)=>{n.d(t,{D:()=>s,p:()=>r});var i=n(56507);function r(e){const t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function s(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);