@arcgis/core 4.27.0-next.20230321 → 4.27.0-next.20230322

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 (136) hide show
  1. package/analysis/LineOfSightAnalysisObserver.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/02b6227c156ee0d8eb66.js +1 -0
  4. package/assets/esri/core/workers/chunks/{7e0c65aa61c2ff0c3504.js → 1c98b92933a48cf96c1e.js} +1 -1
  5. package/assets/esri/core/workers/chunks/321f272d4c7ed6b0cb46.js +1 -0
  6. package/assets/esri/core/workers/chunks/47bd558e2ce89f47f908.js +1 -0
  7. package/assets/esri/core/workers/chunks/76d6c1fc25f02bcf258e.js +1 -0
  8. package/assets/esri/core/workers/chunks/{c5d872adce711ec61ede.js → 8980c5dc389c27368b73.js} +1 -1
  9. package/assets/esri/core/workers/chunks/8d0143c0ff009b98a31f.js +1 -0
  10. package/assets/esri/core/workers/chunks/{6acaf28cba5d49a98fb6.js → 91b292f310f06a0cbf72.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{ff9efa829497557ec26a.js → aa4640a0207e0be224e2.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{92951b85676df776961f.js → ab8139e3a875a8b8dab9.js} +23 -25
  13. package/assets/esri/core/workers/chunks/{c8cd3fde6d8d43ddb954.js → b6cdf4daf07d9e55f61e.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{6b14673a4afd6ef81487.js → c76cabd2d2510a653dff.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{4be7647605300e07e843.js → c90fff7e28ba5b443b11.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{e637e47000f4dc48054d.js → cc7f4fd20443a2acf0f1.js} +1 -1
  17. package/assets/esri/core/workers/chunks/d19e9fab4f4fb765c6a3.js +1 -0
  18. package/assets/esri/core/workers/chunks/d9ef4891c8b0bdd90f5b.js +1 -0
  19. package/assets/esri/core/workers/chunks/{d92d6a43270fb0d366b4.js → de4f5c48efbcee82c3c1.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{32f9b488915a4a8864e5.js → f8b9e0c1671e55b61904.js} +1 -1
  21. package/assets/esri/views/3d/analysis/Slice/images/heading-rotate.ts.svg +7 -28
  22. package/assets/esri/views/3d/analysis/Slice/images/tilt-rotate.ts.svg +11 -0
  23. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  24. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  25. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  26. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  27. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  28. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  29. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  30. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  31. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  32. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  33. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  34. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  35. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  36. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  37. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  38. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  39. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  40. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  41. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  42. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  43. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  44. package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
  45. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  46. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  47. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  48. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  49. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  50. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  51. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  52. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  53. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  54. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  55. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  56. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  57. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  58. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  59. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  60. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  61. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  62. package/chunks/ComponentShader.glsl.js +1 -1
  63. package/chunks/DefaultMaterial.glsl.js +4 -4
  64. package/chunks/vec42.js +1 -1
  65. package/core/Loadable.js +1 -1
  66. package/core/accessorSupport/Property.js +1 -1
  67. package/core/accessorSupport/tracking/SimpleTrackingTarget.js +1 -1
  68. package/geometry/support/buffer/math/vec4.js +1 -1
  69. package/interfaces.d.ts +1 -1
  70. package/layers/LineOfSightLayer.js +1 -1
  71. package/layers/SceneLayer.js +1 -1
  72. package/layers/mixins/ImageryTileMixin.js +1 -1
  73. package/layers/mixins/RefreshableLayer.js +1 -1
  74. package/layers/support/rasterFunctions/clipUtils.js +1 -1
  75. package/layers/support/rasterFunctions/stretchUtils.js +1 -1
  76. package/package.json +1 -1
  77. package/support/revision.js +1 -1
  78. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  79. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  80. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  81. package/views/3d/analysis/Slice/images/Factory.js +1 -1
  82. package/views/3d/analysis/Slice/images/generateTextures.js +1 -1
  83. package/views/3d/analysis/Slice/images/heading-rotate-svg.js +1 -1
  84. package/views/3d/analysis/Slice/images/tilt-rotate-svg.js +5 -0
  85. package/views/3d/analysis/Slice/settings.js +5 -0
  86. package/views/3d/environment/Stars.js +1 -1
  87. package/views/3d/interactive/Manipulator3D.js +1 -1
  88. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  89. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  90. package/views/3d/layers/PointCloudWorker.js +1 -1
  91. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  92. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  93. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  94. package/views/3d/layers/i3s/PointCloudRendererUtil.js +1 -1
  95. package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
  96. package/views/3d/layers/i3s/PointGraphic.js +1 -1
  97. package/views/3d/state/ViewState.js +1 -1
  98. package/views/3d/state/controllers/SurfaceCollisionCorrectionController.js +1 -1
  99. package/views/3d/terrain/GeometryState.js +1 -1
  100. package/views/3d/terrain/PatchGeometry.js +1 -1
  101. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  102. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  103. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  104. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  105. package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +6 -5
  106. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +1 -1
  107. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +11 -11
  108. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeShadingNormal.glsl.js +1 -1
  109. package/views/3d/webgl-engine/lib/AnimationTimeStep.js +1 -1
  110. package/views/3d/webgl-engine/lib/AttributeArray.js +1 -1
  111. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
  112. package/views/3d/webgl-engine/lib/Normals.js +5 -0
  113. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  114. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  115. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  116. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  117. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  118. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  119. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  120. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  121. package/views/LayerViewManager.js +1 -1
  122. package/views/SceneView.js +1 -1
  123. package/views/layers/SceneLayerView.js +1 -1
  124. package/views/webgl/ShaderTranspiler.js +1 -1
  125. package/widgets/Expand.js +1 -1
  126. package/assets/esri/core/workers/chunks/0487ab23a20ec356ab4c.js +0 -1
  127. package/assets/esri/core/workers/chunks/29ee4f14602caf6967e4.js +0 -1
  128. package/assets/esri/core/workers/chunks/2c0775541cfec9d43acb.js +0 -1
  129. package/assets/esri/core/workers/chunks/4879164b48da9ad4547a.js +0 -1
  130. package/assets/esri/core/workers/chunks/69060e5cffc19e76062a.js +0 -1
  131. package/assets/esri/core/workers/chunks/a71a5c8a9aa302bf6f01.js +0 -1
  132. package/assets/esri/core/workers/chunks/bc002e4dff8859571a7a.js +0 -1
  133. package/assets/esri/views/3d/analysis/Slice/images/tilt-rotate.svg +0 -80
  134. package/assets/esri/views/3d/analysis/Slice/images/tilt-rotate.ts.png +0 -0
  135. package/views/3d/analysis/Slice/images/tilt-rotate-png.js +0 -5
  136. package/views/3d/webgl-engine/core/shaderLibrary/util/DecodeNormal.glsl.js +0 -8
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7316],{92835:(e,t,s)=>{s.d(t,{Z:()=>f});var i,n=s(43697),r=s(96674),l=s(70586),o=s(35463),a=s(5600),h=(s(75215),s(67676),s(80442),s(71715)),u=s(52011),c=s(30556);let p=i=class extends r.wq{static get allTime(){return d}static get empty(){return g}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,s=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,n=null!=e.end?e.end.getTime():e.end;return t===i&&s===n}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,l.yw)(this.start,(t=>(0,o.JE)(t,e))),s=(0,l.yw)(this.end,(t=>{const s=(0,o.JE)(t,e);return t.getTime()===s.getTime()?s:(0,o.Nm)(s,1,e)}));return new i({start:t,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let l,o;if(n>=t&&n<=s?l=n:t>=n&&t<=r&&(l=t),s>=n&&s<=r?o=s:r>=t&&r<=s&&(o=r),null!=l&&null!=o&&!isNaN(l)&&!isNaN(o)){const e=new i;return e.start=l===-1/0?null:new Date(l),e.end=o===1/0?null:new Date(o),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:n,end:r}=this;return null!=n&&(s.start=(0,o.Nm)(n,e,t)),null!=r&&(s.end=(0,o.Nm)(r,e,t)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,n._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,n._)([(0,h.r)("end")],p.prototype,"readEnd",null),(0,n._)([(0,c.c)("end")],p.prototype,"writeEnd",null),(0,n._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,n._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,n._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,n._)([(0,h.r)("start")],p.prototype,"readStart",null),(0,n._)([(0,c.c)("start")],p.prototype,"writeStart",null),p=i=(0,n._)([(0,u.j)("esri.TimeExtent")],p);const d=new p,g=new p({start:void 0,end:void 0}),f=p},4757:(e,t,s)=>{s.d(t,{Z:()=>d});var i=s(43697),n=s(15923),r=s(2368),l=s(10699),o=s(96674),a=s(70586),h=s(5600),u=(s(75215),s(67676),s(80442),s(52011));let c=0,p=class extends((0,o.eC)((0,r.J)((0,l.IG)(n.Z)))){constructor(e){super(e),this.id=`${Date.now().toString(16)}-analysis-${c++}`,this.title=null}get parent(){return this._get("parent")}set parent(e){const t=this.parent;if(null!=t)switch(t.type){case"line-of-sight":case"dimension":t.releaseAnalysis(this);break;case"2d":case"3d":t.analyses.includes(this)&&t.analyses.remove(this)}this._set("parent",e)}get isEditable(){return this.requiredPropertiesForEditing.every(a.pC)}};(0,i._)([(0,h.Cb)({type:String,constructOnly:!0,clonable:!1})],p.prototype,"id",void 0),(0,i._)([(0,h.Cb)({type:String})],p.prototype,"title",void 0),(0,i._)([(0,h.Cb)({constructOnly:!0})],p.prototype,"type",void 0),(0,i._)([(0,h.Cb)({clonable:!1,value:null})],p.prototype,"parent",null),(0,i._)([(0,h.Cb)({readOnly:!0})],p.prototype,"isEditable",null),(0,i._)([(0,h.Cb)({readOnly:!0})],p.prototype,"requiredPropertiesForEditing",void 0),p=(0,i._)([(0,u.j)("esri.analysis.Analysis")],p);const d=p},46791:(e,t,s)=>{s.d(t,{Z:()=>j});var i,n=s(43697),r=s(3894),l=s(32448),o=s(22974),a=s(70586),h=s(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(i||(i={}));var u,c=s(1654),p=s(75215),d=s(58971),g=s(5600),f=s(52421),m=s(52011),y=s(10661);const _=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1})),b=()=>{};function v(e){return e?e instanceof M?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e&&e.length)return e[0]}function E(e,t,s,i){const n=Math.min(e.length-s,t.length-i);let r=0;for(;r<n&&e[s+r]===t[i+r];)r++;return r}function C(e,t,s,i){t&&t.forEach(((t,n,r)=>{e.push(t),C(e,s.call(i,t,n,r),s,i)}))}const A=new Set,O=new Set,D=new Set,x=new Map;let I=0,M=u=class extends l.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof u}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new y.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:I++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof u?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,d.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,v(e)),this._emitAfterChanges(i.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,s={removed:!1,callback:t};return e.push(s),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=b,s.removed=!0,e.splice(e.indexOf(s),1)}}}return this._emitter.on(e,t)}once(e,t){const s=this.on(e,t);return{remove(){s.remove()}}}add(e,t){if((0,d.it)(this._observable),this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t??null);return this._splice(s,0,[e]),this._emitAfterChanges(i.ADD),this}addMany(e,t=this._items.length){if((0,d.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t);return this._splice(s,0,v(e)),this._emitAfterChanges(i.ADD),this}at(e){if((0,d.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,d.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(i.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,d.it)(this._observable),this._createNewInstance({items:this._items.map(o.d9)})}concat(...e){(0,d.it)(this._observable);const t=e.map(v);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,d.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const s=(0,a.j0)(this._splice(0,this.length)),n=s.length;for(let i=0;i<n;i++)e.call(t,s[i],i,s);this._emitAfterChanges(i.REMOVE)}every(e,t){return(0,d.it)(this._observable),this._items.every(e,t)}filter(e,t){let s;return(0,d.it)(this._observable),s=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:s})}find(e,t){return(0,d.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,d.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,d.it)(this._observable);const s=[];return C(s,this,e,t),new u(s)}forEach(e,t){return(0,d.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,d.it)(this._observable),this._items[e]}getNextIndex(e){(0,d.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,d.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,d.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,d.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,d.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,d.it)(this._observable);const s=this._items.map(e,t);return new u({items:s})}reorder(e,t=this.length-1){(0,d.it)(this._observable);const s=this.indexOf(e);if(-1!==s){if(t<0?t=0:t>=this.length&&(t=this.length-1),s!==t){if(this._emitBeforeChanges(i.MOVE))return e;this._splice(s,1),this._splice(t,0,[e]),this._emitAfterChanges(i.MOVE)}return e}}pop(){if((0,d.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),e}push(...e){return(0,d.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(i.ADD)),this.length}reduce(e,t){(0,d.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduce(e,t):s.reduce(e)}reduceRight(e,t){(0,d.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(e,t):s.reduceRight(e)}remove(e){return(0,d.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,d.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(i.REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(i.REMOVE),t}removeMany(e){if((0,d.it)(this._observable),!e||!e.length||this._emitBeforeChanges(i.REMOVE))return[];const t=e instanceof u?e.toArray():e,s=this._items,n=[],r=t.length;for(let e=0;e<r;e++){const i=t[e],r=s.indexOf(i);if(r>-1){const i=1+E(t,s,e+1,r+1),l=this._splice(r,i);l&&l.length>0&&n.push.apply(n,l),e+=i-1}}return this._emitAfterChanges(i.REMOVE),n}reverse(){if((0,d.it)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,d.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),e}slice(e=0,t=this.length){return(0,d.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,d.it)(this._observable),this._items.some(e,t)}sort(e){if((0,d.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))return this;const t=(0,a.j0)(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(i.MOVE),this}splice(e,t,...s){(0,d.it)(this._observable);const n=(t?i.REMOVE:0)|(s.length?i.ADD:0);if(this._emitBeforeChanges(n))return[];const r=this._splice(e,t,s)||[];return this._emitAfterChanges(n),r}toArray(){return(0,d.it)(this._observable),this._items.slice()}toJSON(){return(0,d.it)(this._observable),this.toArray()}toLocaleString(){return(0,d.it)(this._observable),this._items.toLocaleString()}toString(){return(0,d.it)(this._observable),this._items.toString()}unshift(...e){return(0,d.it)(this._observable),!e.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,e),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,s){const i=this._items,n=this.itemType;let r,l;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,c.Os)((()=>this._dispatchChange()))),t){if(l=i.splice(e,t),this.hasEventListener("before-remove")){const t=_.acquire();t.target=this,t.cancellable=!0;for(let s=0,n=l.length;s<n;s++)r=l[s],t.reset(r),this.emit("before-remove",t),t.defaultPrevented&&(l.splice(s,1),i.splice(e,0,r),e+=1,s-=1,n-=1);_.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=_.acquire();e.target=this,e.cancellable=!1;const t=l.length;for(let s=0;s<t;s++)e.reset(l[s]),this.emit("after-remove",e);_.release(e)}}if(s&&s.length){if(n){const e=[];for(const t of s){const s=n.ensureType(t);null==s&&null!=t||e.push(s)}s=e}const t=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),l=e===this.length;if(t||r){const n=_.acquire();n.target=this,n.cancellable=!0;const o=_.acquire();o.target=this,o.cancellable=!1;for(const a of s)t?(n.reset(a),this.emit("before-add",n),n.defaultPrevented||(l?i.push(a):i.splice(e++,0,a),this._set("length",i.length),r&&(o.reset(a),this.emit("after-add",o)))):(l?i.push(a):i.splice(e++,0,a),this._set("length",i.length),o.reset(a),this.emit("after-add",o));_.release(o),_.release(n)}else{if(l)for(const e of s)i.push(e);else i.splice(e,0,...s);this._set("length",i.length)}}return(s&&s.length||l&&l.length)&&this._notifyChangeEvent(s,l),l}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const s=_.acquire();s.target=this,s.cancellable=!0,s.type=e,this.emit("before-changes",s),t=s.defaultPrevented,_.release(s)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=_.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),_.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;A.clear(),O.clear(),D.clear();for(const{added:t,removed:s}of e){if(t)if(0===D.size&&0===O.size)for(const e of t)A.add(e);else for(const e of t)O.has(e)?(D.add(e),O.delete(e)):D.has(e)||A.add(e);if(s)if(0===D.size&&0===A.size)for(const e of s)O.add(e);else for(const e of s)A.has(e)?A.delete(e):(D.delete(e),O.add(e))}const s=r.Z.acquire();A.forEach((e=>{s.push(e)}));const i=r.Z.acquire();O.forEach((e=>{i.push(e)}));const n=this._items,l=t.items,o=r.Z.acquire();if(D.forEach((e=>{l.indexOf(e)!==n.indexOf(e)&&o.push(e)})),t.listeners&&(s.length||i.length||o.length)){const e={target:this,added:s,removed:i,moved:o},n=t.listeners.length;for(let s=0;s<n;s++){const i=t.listeners[s];i.removed||i.callback.call(this,e)}}r.Z.release(s),r.Z.release(i),r.Z.release(o)}A.clear(),O.clear(),D.clear()}};M.ofType=e=>{if(!e)return u;if(x.has(e))return x.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const s in e.typeMap){const i=e.typeMap[s].prototype.declaredClass;t?t+=` | ${i}`:t=i}let s=class extends u{};return(0,n._)([(0,f.c)({Type:e,ensureType:"function"==typeof e?(0,p.se)(e):(0,p.N7)(e)})],s.prototype,"itemType",void 0),s=(0,n._)([(0,m.j)(`esri.core.Collection<${t}>`)],s),x.set(e,s),s},(0,n._)([(0,g.Cb)()],M.prototype,"length",void 0),(0,n._)([(0,g.Cb)()],M.prototype,"items",null),M=u=(0,n._)([(0,m.j)("esri.core.Collection")],M);const j=M},28576:(e,t,s)=>{s.d(t,{B:()=>c});var i=s(81153),n=s(17452),r=s(41123),l=s(7628),o=s(31263),a=s(5600),h=s(66094),u=s(25929);function c(e){const t=e?.origins??[void 0];return(s,r)=>{const c=function(e,t,s){if("resource"===e?.type)return function(e,t,s){const r=(0,l.Oe)(t,s);return{type:String,read:(e,t,s)=>{const i=(0,u.r)(e,t,s);return r.type===String?i:"function"==typeof r.type?new r.type({url:i}):void 0},write:{writer(t,l,a,c){if(!c||!c.resources)return"string"==typeof t?void(l[a]=(0,u.t)(t,c)):void(l[a]=t.write({},c));const f=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),m=(0,u.t)(f,{...c,verifyItemRelativeUrls:c&&c.verifyItemRelativeUrls?{writtenUrls:c.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},u.M.NO),y=r.type!==String&&(!(0,i.l)(this)||c&&c.origin&&this.originIdOf(s)>(0,o.M9)(c.origin)),_={object:this,propertyName:s,value:t,targetUrl:m,dest:l,targetPropertyName:a,context:c,params:e};c&&c.portalItem&&m&&!(0,n.YP)(m)?y?function(e){const{context:t,targetUrl:s,params:i,value:r,dest:l,targetPropertyName:o}=e;if(!t.portalItem)return;const a=t.portalItem.resourceFromPath(s),u=g(r,s,t),c=(0,h.B)(u),f=(0,n.Ml)(a.path),m=i?.compress??!1;c===f?(t.resources&&d({...e,resource:a,content:u,compress:m,updates:t.resources.toUpdate}),l[o]=s):p(e)}(_):function({context:e,targetUrl:t,dest:s,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),s[i]=t)}(_):c&&c.portalItem&&(null==m||null!=(0,u.i)(m)||(0,n.jc)(m)||y)?p(_):l[a]=m}}}}(e,t,s);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=u.a;return{read:e,write:t}}}}(e,s,r);for(const e of t){const t=(0,a.CJ)(s,e,r);for(const e in c)t[e]=c[e]}}}function p(e){const{targetUrl:t,params:i,value:l,context:o,dest:a,targetPropertyName:c}=e;if(!o.portalItem)return;const p=(0,u.p)(t),f=p?.filename??(0,r.D)(),m=i?.prefix??p?.prefix,y=g(l,t,o),_=(0,n.v_)(m,f),b=`${_}.${(0,h.B)(y)}`,v=o.portalItem.resourceFromPath(b);(0,n.jc)(t)&&o.resources&&o.resources.pendingOperations.push(async function(e){const t=(await Promise.resolve().then(s.bind(s,3172))).default,{data:i}=await t(e,{responseType:"blob"});return i}(t).then((e=>{v.path=`${_}.${(0,h.B)(e)}`,a[c]=v.itemRelativeUrl})).catch((()=>{})));const w=i?.compress??!1;o.resources&&d({...e,resource:v,content:y,compress:w,updates:o.resources.toAdd}),a[c]=v.itemRelativeUrl}function d({object:e,propertyName:t,updates:s,resource:i,content:n,compress:r}){s.push({resource:i,content:n,compress:r,finish:s=>{!function(e,t,s){"string"==typeof e[t]?e[t]=s.url:e[t].url=s.url}(e,t,s)}})}function g(e,t,s){return"string"==typeof e?{url:t}:new Blob([JSON.stringify(e.toJSON(s))],{type:"application/json"})}},52421:(e,t,s)=>{function i(e){return(t,s)=>{t[s]=e}}s.d(t,{c:()=>i})},70921:(e,t,s)=>{s.d(t,{R:()=>r,Z:()=>n});var i=s(46791);function n(e,t,s=i.Z){return t||(t=new s),t===e||(t.removeAll(),(n=e)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?t.addMany(e):e&&t.add(e)),t;var n}function r(e){return e}},81153:(e,t,s)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}s.d(t,{l:()=>i})},17445:(e,t,s)=>{s.d(t,{N1:()=>p,YP:()=>a,Z_:()=>f,gx:()=>h,nn:()=>m,on:()=>c,tX:()=>y});var i=s(91460),n=s(50758),r=s(70586),l=s(95330),o=s(26258);function a(e,t,s={}){return u(e,t,s,d)}function h(e,t,s={}){return u(e,t,s,g)}function u(e,t,s={},i){let n=null;const l=s.once?(e,s)=>{i(e)&&((0,r.hw)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,o.aQ)(e,l,s.sync,s.equals),s.initial){const t=e();l(t,t)}return n}function c(e,t,s,l={}){let o=null,h=null,u=null;function c(){o&&h&&(h.remove(),l.onListenerRemove?.(o),o=null,h=null)}function p(e){l.once&&l.once&&(0,r.hw)(u),s(e)}const d=a(e,((e,s)=>{c(),(0,i.vT)(e)&&(o=e,h=(0,i.on)(e,t,p),l.onListenerAdd?.(e))}),{sync:l.sync,initial:!0});return u=(0,n.kB)((()=>{d.remove(),c()})),u}function p(e,t){return function(e,t,s){if((0,l.Hc)(s))return Promise.reject((0,l.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let o=null;function a(){o=(0,r.hw)(o)}return new Promise(((i,r)=>{o=(0,n.AL)([(0,l.fu)(s,(()=>{a(),r((0,l.zE)())})),u(e,(e=>{a(),i(e)}),{sync:!1,once:!0},t??d)])}))}(e,g,t)}function d(e){return!0}function g(e){return!!e}s(87538);const f={sync:!0},m={initial:!0},y={sync:!0,initial:!0}},35463:(e,t,s)=>{s.d(t,{JE:()=>l,Nm:()=>r,rJ:()=>o}),s(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},n={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function r(e,t,s){const i=new Date(e.getTime());if(t&&s){const e=n[s],{getter:r,setter:l,multiplier:o}=e;if("months"===s){const e=function(e,t){const s=new Date(e,t+1,1);return s.setDate(0),s.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[l](i[r]()+t*o)}return i}function l(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function o(e,t,s){return 0===e?0:e*i[t]/i[s]}},41123:(e,t,s)=>{s.d(t,{D:()=>n});const i="randomUUID"in crypto;function n(){if(i)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)}},30690:(e,t,s)=>{s.r(t),s.d(t,{default:()=>P});var i=s(43697),n=s(4757);function r(e,t){return l(e)===l(t)}function l(e){if(null==e)return null;const t=null!=e.layer?e.layer.id:"";let s=null;return s=null!=e.objectId?e.objectId:null!=e.layer&&"objectIdField"in e.layer&&null!=e.layer.objectIdField&&null!=e.attributes?e.attributes[e.layer.objectIdField]:e.uid,null==s?null:`o-${t}-${s}`}const o={json:{write:{writer:function(e,t){null!=e&&null!=e.layer?.objectIdField&&null!=e.attributes&&(t.feature={layerId:e.layer.id,objectId:e.attributes[e.layer.objectIdField]})},target:{"feature.layerId":{type:[Number,String]},"feature.objectId":{type:[Number,String]}}},origins:{"web-scene":{read:function(e){if(null!=e.layerId&&null!=e.objectId)return{uid:null,layer:{id:e.layerId,objectIdField:"ObjectId"},attributes:{ObjectId:e.objectId}}}}}}};var a=s(15923),h=s(2368),u=s(96674),c=s(70586),p=s(5600),d=(s(75215),s(67676),s(80442),s(52011)),g=s(28576),f=s(94139),m=s(86787);let y=class extends((0,u.eC)((0,h.J)(a.Z))){constructor(e){super(e),this.position=null,this.elevationInfo=null,this.feature=null}equals(e){return(0,c._W)(this.position,e.position)&&(0,c._W)(this.elevationInfo,e.elevationInfo)&&r(this.feature,e.feature)}};(0,i._)([(0,p.Cb)({type:f.Z}),(0,g.B)()],y.prototype,"position",void 0),(0,i._)([(0,p.Cb)({type:m.Z}),(0,g.B)()],y.prototype,"elevationInfo",void 0),(0,i._)([(0,p.Cb)(o)],y.prototype,"feature",void 0),y=(0,i._)([(0,d.j)("esri.analysis.LineOfSightAnalysisObserver")],y);const _=y;let b=class extends((0,u.eC)(h.j)){constructor(e){super(e),this.position=null,this.elevationInfo=null,this.feature=null}equals(e){return(0,c._W)(this.position,e.position)&&(0,c._W)(this.elevationInfo,e.elevationInfo)&&r(this.feature,e.feature)}};(0,i._)([(0,p.Cb)({type:f.Z}),(0,g.B)()],b.prototype,"position",void 0),(0,i._)([(0,p.Cb)({type:m.Z}),(0,g.B)()],b.prototype,"elevationInfo",void 0),(0,i._)([(0,p.Cb)(o)],b.prototype,"feature",void 0),b=(0,i._)([(0,d.j)("esri.analysis.LineOfSightAnalysisTarget")],b);const v=b;var w=s(46791),E=s(70921),C=s(17445),A=s(44547),O=s(60437);function D(e,t){return function(e,t){return null!=t&&t.mode?t.mode:function(e){return e?x:I}(e).mode}(null!=e&&e.hasZ,t)}s(12541);const x={mode:"absolute-height",offset:0},I={mode:"on-the-ground",offset:null},M=w.Z.ofType(v);let j=class extends n.Z{constructor(e){super(e),this.type="line-of-sight",this.observer=null,this.extent=null}initialize(){this.addHandles((0,C.YP)((()=>this._computeExtent()),(e=>{null!=e&&null!=e.pending||this._set("extent",null!=e?e.extent:null)}),C.tX))}get targets(){return this._get("targets")||new M}set targets(e){this._set("targets",(0,E.Z)(e,this.targets,M))}get spatialReference(){return null!=this.observer&&null!=this.observer.position?this.observer.position.spatialReference:null}get requiredPropertiesForEditing(){return[(0,c.yw)(this.observer,(e=>e.position))]}async waitComputeExtent(){const e=this._computeExtent();return null!=e?e.pending:Promise.resolve()}_computeExtent(){const e=this.spatialReference;if(null==this.observer||null==this.observer.position||null==e)return null;const t=e=>"absolute-height"===D(e.position,e.elevationInfo),s=this.observer.position,i=(0,O.al)(s.x,s.y,s.z,s.x,s.y,s.z);for(const t of this.targets)if(null!=t.position){const s=(0,A.dz)(t.position,e);if(null!=s.pending)return{pending:s.pending,extent:null};if(null!=s.geometry){const{x:e,y:t,z:n}=s.geometry;(0,O.pp)(i,[e,t,n])}}const n=(0,O.HH)(i,e);return t(this.observer)&&this.targets.every(t)||(n.zmin=void 0,n.zmax=void 0),{pending:null,extent:n}}clear(){this.observer=null,this.targets.removeAll()}};(0,i._)([(0,p.Cb)({type:["line-of-sight"]})],j.prototype,"type",void 0),(0,i._)([(0,p.Cb)({type:_,json:{read:!0,write:!0}})],j.prototype,"observer",void 0),(0,i._)([(0,p.Cb)({cast:E.R,type:M,nonNullable:!0,json:{read:!0,write:!0}})],j.prototype,"targets",null),(0,i._)([(0,p.Cb)({value:null,readOnly:!0})],j.prototype,"extent",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],j.prototype,"spatialReference",null),(0,i._)([(0,p.Cb)({readOnly:!0})],j.prototype,"requiredPropertiesForEditing",null),j=(0,i._)([(0,d.j)("esri.analysis.LineOfSightAnalysis")],j);const T=j;var R=s(16453),N=s(87085),S=s(38009);const F=w.Z.ofType(v);let L=class extends((0,S.q)((0,R.R)(N.Z))){constructor(e){super(e),this.type="line-of-sight",this.operationalLayerType="LineOfSightLayer",this.analysis=new T,this.opacity=1}initialize(){this.addHandles((0,C.YP)((()=>this.analysis),((e,t)=>{null!=t&&t.parent===this&&(t.parent=null),null!=e&&(e.parent=this)}),C.tX))}async load(){return null!=this.analysis&&this.addResolvingPromise(this.analysis.waitComputeExtent()),this}get observer(){return(0,c.yw)(this.analysis,(e=>e.observer))}set observer(e){(0,c.yw)(this.analysis,(t=>t.observer=e))}get targets(){return null!=this.analysis?this.analysis.targets:new w.Z}set targets(e){(0,E.Z)(e,this.analysis?.targets)}get fullExtent(){return null!=this.analysis?this.analysis.extent:null}get spatialReference(){return null!=this.analysis?this.analysis.spatialReference:null}releaseAnalysis(e){this.analysis===e&&(this.analysis=new T)}};(0,i._)([(0,p.Cb)({json:{read:!1},readOnly:!0})],L.prototype,"type",void 0),(0,i._)([(0,p.Cb)({type:["LineOfSightLayer"]})],L.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.Cb)({type:_,json:{read:!0,write:{ignoreOrigin:!0}}})],L.prototype,"observer",null),(0,i._)([(0,p.Cb)({type:F,json:{read:!0,write:{ignoreOrigin:!0}}})],L.prototype,"targets",null),(0,i._)([(0,p.Cb)({nonNullable:!0,json:{read:!1,write:!1}})],L.prototype,"analysis",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],L.prototype,"fullExtent",null),(0,i._)([(0,p.Cb)({readOnly:!0})],L.prototype,"spatialReference",null),(0,i._)([(0,p.Cb)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],L.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({type:["show","hide"]})],L.prototype,"listMode",void 0),L=(0,i._)([(0,d.j)("esri.layers.LineOfSightLayer")],L);const P=L},66094:(e,t,s)=>{s.d(t,{B:()=>n});var i=s(17452);function n(e){return r[function(e){return e instanceof Blob?e.type:function(e){const t=(0,i.Ml)(e);return a[t]||l}(e.url)}(e)]||o}const r={},l="text/plain",o=r[l],a={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in a)r[a[e]]=e}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7316],{92835:(e,t,s)=>{s.d(t,{Z:()=>f});var i,n=s(43697),r=s(96674),l=s(70586),o=s(35463),a=s(5600),h=(s(75215),s(67676),s(80442),s(71715)),u=s(52011),c=s(30556);let p=i=class extends r.wq{static get allTime(){return d}static get empty(){return g}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,s=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,n=null!=e.end?e.end.getTime():e.end;return t===i&&s===n}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,l.yw)(this.start,(t=>(0,o.JE)(t,e))),s=(0,l.yw)(this.end,(t=>{const s=(0,o.JE)(t,e);return t.getTime()===s.getTime()?s:(0,o.Nm)(s,1,e)}));return new i({start:t,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let l,o;if(n>=t&&n<=s?l=n:t>=n&&t<=r&&(l=t),s>=n&&s<=r?o=s:r>=t&&r<=s&&(o=r),null!=l&&null!=o&&!isNaN(l)&&!isNaN(o)){const e=new i;return e.start=l===-1/0?null:new Date(l),e.end=o===1/0?null:new Date(o),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:n,end:r}=this;return null!=n&&(s.start=(0,o.Nm)(n,e,t)),null!=r&&(s.end=(0,o.Nm)(r,e,t)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,n._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,n._)([(0,h.r)("end")],p.prototype,"readEnd",null),(0,n._)([(0,c.c)("end")],p.prototype,"writeEnd",null),(0,n._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,n._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,n._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,n._)([(0,h.r)("start")],p.prototype,"readStart",null),(0,n._)([(0,c.c)("start")],p.prototype,"writeStart",null),p=i=(0,n._)([(0,u.j)("esri.TimeExtent")],p);const d=new p,g=new p({start:void 0,end:void 0}),f=p},4757:(e,t,s)=>{s.d(t,{Z:()=>d});var i=s(43697),n=s(15923),r=s(2368),l=s(10699),o=s(96674),a=s(70586),h=s(5600),u=(s(75215),s(67676),s(80442),s(52011));let c=0,p=class extends((0,o.eC)((0,r.J)((0,l.IG)(n.Z)))){constructor(e){super(e),this.id=`${Date.now().toString(16)}-analysis-${c++}`,this.title=null}get parent(){return this._get("parent")}set parent(e){const t=this.parent;if(null!=t)switch(t.type){case"line-of-sight":case"dimension":t.releaseAnalysis(this);break;case"2d":case"3d":t.analyses.includes(this)&&t.analyses.remove(this)}this._set("parent",e)}get isEditable(){return this.requiredPropertiesForEditing.every(a.pC)}};(0,i._)([(0,h.Cb)({type:String,constructOnly:!0,clonable:!1})],p.prototype,"id",void 0),(0,i._)([(0,h.Cb)({type:String})],p.prototype,"title",void 0),(0,i._)([(0,h.Cb)({constructOnly:!0})],p.prototype,"type",void 0),(0,i._)([(0,h.Cb)({clonable:!1,value:null})],p.prototype,"parent",null),(0,i._)([(0,h.Cb)({readOnly:!0})],p.prototype,"isEditable",null),(0,i._)([(0,h.Cb)({readOnly:!0})],p.prototype,"requiredPropertiesForEditing",void 0),p=(0,i._)([(0,u.j)("esri.analysis.Analysis")],p);const d=p},46791:(e,t,s)=>{s.d(t,{Z:()=>M});var i,n=s(43697),r=s(3894),l=s(32448),o=s(22974),a=s(70586),h=s(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(i||(i={}));var u,c=s(1654),p=s(75215),d=s(58971),g=s(5600),f=s(52421),m=s(52011),y=s(10661);const _=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1})),b=()=>{};function v(e){return e?e instanceof j?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e&&e.length)return e[0]}function E(e,t,s,i){const n=Math.min(e.length-s,t.length-i);let r=0;for(;r<n&&e[s+r]===t[i+r];)r++;return r}function C(e,t,s,i){t&&t.forEach(((t,n,r)=>{e.push(t),C(e,s.call(i,t,n,r),s,i)}))}const A=new Set,O=new Set,D=new Set,x=new Map;let I=0,j=u=class extends l.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof u}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new y.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:I++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof u?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,d.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,v(e)),this._emitAfterChanges(i.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,s={removed:!1,callback:t};return e.push(s),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=b,s.removed=!0,e.splice(e.indexOf(s),1)}}}return this._emitter.on(e,t)}once(e,t){const s=this.on(e,t);return{remove(){s.remove()}}}add(e,t){if((0,d.it)(this._observable),this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t??null);return this._splice(s,0,[e]),this._emitAfterChanges(i.ADD),this}addMany(e,t=this._items.length){if((0,d.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t);return this._splice(s,0,v(e)),this._emitAfterChanges(i.ADD),this}at(e){if((0,d.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,d.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(i.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,d.it)(this._observable),this._createNewInstance({items:this._items.map(o.d9)})}concat(...e){(0,d.it)(this._observable);const t=e.map(v);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,d.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const s=(0,a.j0)(this._splice(0,this.length)),n=s.length;for(let i=0;i<n;i++)e.call(t,s[i],i,s);this._emitAfterChanges(i.REMOVE)}every(e,t){return(0,d.it)(this._observable),this._items.every(e,t)}filter(e,t){let s;return(0,d.it)(this._observable),s=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:s})}find(e,t){return(0,d.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,d.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,d.it)(this._observable);const s=[];return C(s,this,e,t),new u(s)}forEach(e,t){return(0,d.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,d.it)(this._observable),this._items[e]}getNextIndex(e){(0,d.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,d.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,d.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,d.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,d.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,d.it)(this._observable);const s=this._items.map(e,t);return new u({items:s})}reorder(e,t=this.length-1){(0,d.it)(this._observable);const s=this.indexOf(e);if(-1!==s){if(t<0?t=0:t>=this.length&&(t=this.length-1),s!==t){if(this._emitBeforeChanges(i.MOVE))return e;this._splice(s,1),this._splice(t,0,[e]),this._emitAfterChanges(i.MOVE)}return e}}pop(){if((0,d.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),e}push(...e){return(0,d.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(i.ADD)),this.length}reduce(e,t){(0,d.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduce(e,t):s.reduce(e)}reduceRight(e,t){(0,d.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(e,t):s.reduceRight(e)}remove(e){return(0,d.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,d.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(i.REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(i.REMOVE),t}removeMany(e){if((0,d.it)(this._observable),!e||!e.length||this._emitBeforeChanges(i.REMOVE))return[];const t=e instanceof u?e.toArray():e,s=this._items,n=[],r=t.length;for(let e=0;e<r;e++){const i=t[e],r=s.indexOf(i);if(r>-1){const i=1+E(t,s,e+1,r+1),l=this._splice(r,i);l&&l.length>0&&n.push.apply(n,l),e+=i-1}}return this._emitAfterChanges(i.REMOVE),n}reverse(){if((0,d.it)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,d.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),e}slice(e=0,t=this.length){return(0,d.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,d.it)(this._observable),this._items.some(e,t)}sort(e){if((0,d.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))return this;const t=(0,a.j0)(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(i.MOVE),this}splice(e,t,...s){(0,d.it)(this._observable);const n=(t?i.REMOVE:0)|(s.length?i.ADD:0);if(this._emitBeforeChanges(n))return[];const r=this._splice(e,t,s)||[];return this._emitAfterChanges(n),r}toArray(){return(0,d.it)(this._observable),this._items.slice()}toJSON(){return(0,d.it)(this._observable),this.toArray()}toLocaleString(){return(0,d.it)(this._observable),this._items.toLocaleString()}toString(){return(0,d.it)(this._observable),this._items.toString()}unshift(...e){return(0,d.it)(this._observable),!e.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,e),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,s){const i=this._items,n=this.itemType;let r,l;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,c.Os)((()=>this._dispatchChange()))),t){if(l=i.splice(e,t),this.hasEventListener("before-remove")){const t=_.acquire();t.target=this,t.cancellable=!0;for(let s=0,n=l.length;s<n;s++)r=l[s],t.reset(r),this.emit("before-remove",t),t.defaultPrevented&&(l.splice(s,1),i.splice(e,0,r),e+=1,s-=1,n-=1);_.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=_.acquire();e.target=this,e.cancellable=!1;const t=l.length;for(let s=0;s<t;s++)e.reset(l[s]),this.emit("after-remove",e);_.release(e)}}if(s&&s.length){if(n){const e=[];for(const t of s){const s=n.ensureType(t);null==s&&null!=t||e.push(s)}s=e}const t=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),l=e===this.length;if(t||r){const n=_.acquire();n.target=this,n.cancellable=!0;const o=_.acquire();o.target=this,o.cancellable=!1;for(const a of s)t?(n.reset(a),this.emit("before-add",n),n.defaultPrevented||(l?i.push(a):i.splice(e++,0,a),this._set("length",i.length),r&&(o.reset(a),this.emit("after-add",o)))):(l?i.push(a):i.splice(e++,0,a),this._set("length",i.length),o.reset(a),this.emit("after-add",o));_.release(o),_.release(n)}else{if(l)for(const e of s)i.push(e);else i.splice(e,0,...s);this._set("length",i.length)}}return(s&&s.length||l&&l.length)&&this._notifyChangeEvent(s,l),l}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const s=_.acquire();s.target=this,s.cancellable=!0,s.type=e,this.emit("before-changes",s),t=s.defaultPrevented,_.release(s)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=_.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),_.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;A.clear(),O.clear(),D.clear();for(const{added:t,removed:s}of e){if(t)if(0===D.size&&0===O.size)for(const e of t)A.add(e);else for(const e of t)O.has(e)?(D.add(e),O.delete(e)):D.has(e)||A.add(e);if(s)if(0===D.size&&0===A.size)for(const e of s)O.add(e);else for(const e of s)A.has(e)?A.delete(e):(D.delete(e),O.add(e))}const s=r.Z.acquire();A.forEach((e=>{s.push(e)}));const i=r.Z.acquire();O.forEach((e=>{i.push(e)}));const n=this._items,l=t.items,o=r.Z.acquire();if(D.forEach((e=>{l.indexOf(e)!==n.indexOf(e)&&o.push(e)})),t.listeners&&(s.length||i.length||o.length)){const e={target:this,added:s,removed:i,moved:o},n=t.listeners.length;for(let s=0;s<n;s++){const i=t.listeners[s];i.removed||i.callback.call(this,e)}}r.Z.release(s),r.Z.release(i),r.Z.release(o)}A.clear(),O.clear(),D.clear()}};j.ofType=e=>{if(!e)return u;if(x.has(e))return x.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const s in e.typeMap){const i=e.typeMap[s].prototype.declaredClass;t?t+=` | ${i}`:t=i}let s=class extends u{};return(0,n._)([(0,f.c)({Type:e,ensureType:"function"==typeof e?(0,p.se)(e):(0,p.N7)(e)})],s.prototype,"itemType",void 0),s=(0,n._)([(0,m.j)(`esri.core.Collection<${t}>`)],s),x.set(e,s),s},(0,n._)([(0,g.Cb)()],j.prototype,"length",void 0),(0,n._)([(0,g.Cb)()],j.prototype,"items",null),j=u=(0,n._)([(0,m.j)("esri.core.Collection")],j);const M=j},28576:(e,t,s)=>{s.d(t,{B:()=>c});var i=s(81153),n=s(17452),r=s(41123),l=s(7628),o=s(31263),a=s(5600),h=s(66094),u=s(25929);function c(e){const t=e?.origins??[void 0];return(s,r)=>{const c=function(e,t,s){if("resource"===e?.type)return function(e,t,s){const r=(0,l.Oe)(t,s);return{type:String,read:(e,t,s)=>{const i=(0,u.r)(e,t,s);return r.type===String?i:"function"==typeof r.type?new r.type({url:i}):void 0},write:{writer(t,l,a,c){if(!c||!c.resources)return"string"==typeof t?void(l[a]=(0,u.t)(t,c)):void(l[a]=t.write({},c));const f=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),m=(0,u.t)(f,{...c,verifyItemRelativeUrls:c&&c.verifyItemRelativeUrls?{writtenUrls:c.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},u.M.NO),y=r.type!==String&&(!(0,i.l)(this)||c&&c.origin&&this.originIdOf(s)>(0,o.M9)(c.origin)),_={object:this,propertyName:s,value:t,targetUrl:m,dest:l,targetPropertyName:a,context:c,params:e};c&&c.portalItem&&m&&!(0,n.YP)(m)?y?function(e){const{context:t,targetUrl:s,params:i,value:r,dest:l,targetPropertyName:o}=e;if(!t.portalItem)return;const a=t.portalItem.resourceFromPath(s),u=g(r,s,t),c=(0,h.B)(u),f=(0,n.Ml)(a.path),m=i?.compress??!1;c===f?(t.resources&&d({...e,resource:a,content:u,compress:m,updates:t.resources.toUpdate}),l[o]=s):p(e)}(_):function({context:e,targetUrl:t,dest:s,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),s[i]=t)}(_):c&&c.portalItem&&(null==m||null!=(0,u.i)(m)||(0,n.jc)(m)||y)?p(_):l[a]=m}}}}(e,t,s);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=u.a;return{read:e,write:t}}}}(e,s,r);for(const e of t){const t=(0,a.CJ)(s,e,r);for(const e in c)t[e]=c[e]}}}function p(e){const{targetUrl:t,params:i,value:l,context:o,dest:a,targetPropertyName:c}=e;if(!o.portalItem)return;const p=(0,u.p)(t),f=p?.filename??(0,r.D)(),m=i?.prefix??p?.prefix,y=g(l,t,o),_=(0,n.v_)(m,f),b=`${_}.${(0,h.B)(y)}`,v=o.portalItem.resourceFromPath(b);(0,n.jc)(t)&&o.resources&&o.resources.pendingOperations.push(async function(e){const t=(await Promise.resolve().then(s.bind(s,3172))).default,{data:i}=await t(e,{responseType:"blob"});return i}(t).then((e=>{v.path=`${_}.${(0,h.B)(e)}`,a[c]=v.itemRelativeUrl})).catch((()=>{})));const w=i?.compress??!1;o.resources&&d({...e,resource:v,content:y,compress:w,updates:o.resources.toAdd}),a[c]=v.itemRelativeUrl}function d({object:e,propertyName:t,updates:s,resource:i,content:n,compress:r}){s.push({resource:i,content:n,compress:r,finish:s=>{!function(e,t,s){"string"==typeof e[t]?e[t]=s.url:e[t].url=s.url}(e,t,s)}})}function g(e,t,s){return"string"==typeof e?{url:t}:new Blob([JSON.stringify(e.toJSON(s))],{type:"application/json"})}},52421:(e,t,s)=>{function i(e){return(t,s)=>{t[s]=e}}s.d(t,{c:()=>i})},70921:(e,t,s)=>{s.d(t,{R:()=>r,Z:()=>n});var i=s(46791);function n(e,t,s=i.Z){return t||(t=new s),t===e||(t.removeAll(),(n=e)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?t.addMany(e):e&&t.add(e)),t;var n}function r(e){return e}},81153:(e,t,s)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}s.d(t,{l:()=>i})},17445:(e,t,s)=>{s.d(t,{N1:()=>p,YP:()=>a,Z_:()=>f,gx:()=>h,nn:()=>m,on:()=>c,tX:()=>y});var i=s(91460),n=s(50758),r=s(70586),l=s(95330),o=s(26258);function a(e,t,s={}){return u(e,t,s,d)}function h(e,t,s={}){return u(e,t,s,g)}function u(e,t,s={},i){let n=null;const l=s.once?(e,s)=>{i(e)&&((0,r.hw)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,o.aQ)(e,l,s.sync,s.equals),s.initial){const t=e();l(t,t)}return n}function c(e,t,s,l={}){let o=null,h=null,u=null;function c(){o&&h&&(h.remove(),l.onListenerRemove?.(o),o=null,h=null)}function p(e){l.once&&l.once&&(0,r.hw)(u),s(e)}const d=a(e,((e,s)=>{c(),(0,i.vT)(e)&&(o=e,h=(0,i.on)(e,t,p),l.onListenerAdd?.(e))}),{sync:l.sync,initial:!0});return u=(0,n.kB)((()=>{d.remove(),c()})),u}function p(e,t){return function(e,t,s){if((0,l.Hc)(s))return Promise.reject((0,l.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let o=null;function a(){o=(0,r.hw)(o)}return new Promise(((i,r)=>{o=(0,n.AL)([(0,l.fu)(s,(()=>{a(),r((0,l.zE)())})),u(e,(e=>{a(),i(e)}),{sync:!1,once:!0},t??d)])}))}(e,g,t)}function d(e){return!0}function g(e){return!!e}s(87538);const f={sync:!0},m={initial:!0},y={sync:!0,initial:!0}},35463:(e,t,s)=>{s.d(t,{JE:()=>l,Nm:()=>r,rJ:()=>o}),s(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},n={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function r(e,t,s){const i=new Date(e.getTime());if(t&&s){const e=n[s],{getter:r,setter:l,multiplier:o}=e;if("months"===s){const e=function(e,t){const s=new Date(e,t+1,1);return s.setDate(0),s.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[l](i[r]()+t*o)}return i}function l(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function o(e,t,s){return 0===e?0:e*i[t]/i[s]}},41123:(e,t,s)=>{s.d(t,{D:()=>n});const i="randomUUID"in crypto;function n(){if(i)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)}},30690:(e,t,s)=>{s.r(t),s.d(t,{default:()=>P});var i=s(43697),n=s(4757);function r(e,t){return l(e)===l(t)}function l(e){if(null==e)return null;const t=null!=e.layer?e.layer.id:"";let s=null;return s=null!=e.objectId?e.objectId:null!=e.layer&&"objectIdField"in e.layer&&null!=e.layer.objectIdField&&null!=e.attributes?e.attributes[e.layer.objectIdField]:e.uid,null==s?null:`o-${t}-${s}`}const o={json:{write:{writer:function(e,t){null!=e&&null!=e.layer?.objectIdField&&null!=e.attributes&&(t.feature={layerId:e.layer.id,objectId:e.attributes[e.layer.objectIdField]})},target:{"feature.layerId":{type:[Number,String]},"feature.objectId":{type:[Number,String]}}},origins:{"web-scene":{read:function(e){if(null!=e.layerId&&null!=e.objectId)return{uid:null,layer:{id:e.layerId,objectIdField:"ObjectId"},attributes:{ObjectId:e.objectId}}}}}}};var a=s(15923),h=s(2368),u=s(96674),c=s(70586),p=s(5600),d=(s(75215),s(67676),s(80442),s(52011)),g=s(28576),f=s(94139),m=s(86787);let y=class extends((0,u.eC)((0,h.J)(a.Z))){constructor(e){super(e),this.position=null,this.elevationInfo=null,this.feature=null}equals(e){return(0,c._W)(this.position,e.position)&&(0,c._W)(this.elevationInfo,e.elevationInfo)&&r(this.feature,e.feature)}};(0,i._)([(0,p.Cb)({type:f.Z,json:{write:{isRequired:!0}}})],y.prototype,"position",void 0),(0,i._)([(0,p.Cb)({type:m.Z}),(0,g.B)()],y.prototype,"elevationInfo",void 0),(0,i._)([(0,p.Cb)(o)],y.prototype,"feature",void 0),y=(0,i._)([(0,d.j)("esri.analysis.LineOfSightAnalysisObserver")],y);const _=y;let b=class extends((0,u.eC)(h.j)){constructor(e){super(e),this.position=null,this.elevationInfo=null,this.feature=null}equals(e){return(0,c._W)(this.position,e.position)&&(0,c._W)(this.elevationInfo,e.elevationInfo)&&r(this.feature,e.feature)}};(0,i._)([(0,p.Cb)({type:f.Z}),(0,g.B)()],b.prototype,"position",void 0),(0,i._)([(0,p.Cb)({type:m.Z}),(0,g.B)()],b.prototype,"elevationInfo",void 0),(0,i._)([(0,p.Cb)(o)],b.prototype,"feature",void 0),b=(0,i._)([(0,d.j)("esri.analysis.LineOfSightAnalysisTarget")],b);const v=b;var w=s(46791),E=s(70921),C=s(17445),A=s(44547),O=s(60437);function D(e,t){return function(e,t){return null!=t&&t.mode?t.mode:function(e){return e?x:I}(e).mode}(null!=e&&e.hasZ,t)}s(12541);const x={mode:"absolute-height",offset:0},I={mode:"on-the-ground",offset:null},j=w.Z.ofType(v);let M=class extends n.Z{constructor(e){super(e),this.type="line-of-sight",this.observer=null,this.extent=null}initialize(){this.addHandles((0,C.YP)((()=>this._computeExtent()),(e=>{null!=e&&null!=e.pending||this._set("extent",null!=e?e.extent:null)}),C.tX))}get targets(){return this._get("targets")||new j}set targets(e){this._set("targets",(0,E.Z)(e,this.targets,j))}get spatialReference(){return null!=this.observer&&null!=this.observer.position?this.observer.position.spatialReference:null}get requiredPropertiesForEditing(){return[(0,c.yw)(this.observer,(e=>e.position))]}async waitComputeExtent(){const e=this._computeExtent();return null!=e?e.pending:Promise.resolve()}_computeExtent(){const e=this.spatialReference;if(null==this.observer||null==this.observer.position||null==e)return null;const t=e=>"absolute-height"===D(e.position,e.elevationInfo),s=this.observer.position,i=(0,O.al)(s.x,s.y,s.z,s.x,s.y,s.z);for(const t of this.targets)if(null!=t.position){const s=(0,A.dz)(t.position,e);if(null!=s.pending)return{pending:s.pending,extent:null};if(null!=s.geometry){const{x:e,y:t,z:n}=s.geometry;(0,O.pp)(i,[e,t,n])}}const n=(0,O.HH)(i,e);return t(this.observer)&&this.targets.every(t)||(n.zmin=void 0,n.zmax=void 0),{pending:null,extent:n}}clear(){this.observer=null,this.targets.removeAll()}};(0,i._)([(0,p.Cb)({type:["line-of-sight"]})],M.prototype,"type",void 0),(0,i._)([(0,p.Cb)({type:_,json:{read:!0,write:!0}})],M.prototype,"observer",void 0),(0,i._)([(0,p.Cb)({cast:E.R,type:j,nonNullable:!0,json:{read:!0,write:!0}})],M.prototype,"targets",null),(0,i._)([(0,p.Cb)({value:null,readOnly:!0})],M.prototype,"extent",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],M.prototype,"spatialReference",null),(0,i._)([(0,p.Cb)({readOnly:!0})],M.prototype,"requiredPropertiesForEditing",null),M=(0,i._)([(0,d.j)("esri.analysis.LineOfSightAnalysis")],M);const R=M;var T=s(16453),N=s(87085),S=s(38009);const F=w.Z.ofType(v);let L=class extends((0,S.q)((0,T.R)(N.Z))){constructor(e){super(e),this.type="line-of-sight",this.operationalLayerType="LineOfSightLayer",this.analysis=new R,this.opacity=1}initialize(){this.addHandles((0,C.YP)((()=>this.analysis),((e,t)=>{null!=t&&t.parent===this&&(t.parent=null),null!=e&&(e.parent=this)}),C.tX))}async load(){return null!=this.analysis&&this.addResolvingPromise(this.analysis.waitComputeExtent()),this}get observer(){return(0,c.yw)(this.analysis,(e=>e.observer))}set observer(e){(0,c.yw)(this.analysis,(t=>t.observer=e))}get targets(){return null!=this.analysis?this.analysis.targets:new w.Z}set targets(e){(0,E.Z)(e,this.analysis?.targets)}get fullExtent(){return null!=this.analysis?this.analysis.extent:null}get spatialReference(){return null!=this.analysis?this.analysis.spatialReference:null}releaseAnalysis(e){this.analysis===e&&(this.analysis=new R)}};(0,i._)([(0,p.Cb)({json:{read:!1},readOnly:!0})],L.prototype,"type",void 0),(0,i._)([(0,p.Cb)({type:["LineOfSightLayer"]})],L.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.Cb)({type:_,json:{read:!0,write:{isRequired:!0,ignoreOrigin:!0}}})],L.prototype,"observer",null),(0,i._)([(0,p.Cb)({type:F,json:{read:!0,write:{ignoreOrigin:!0}}})],L.prototype,"targets",null),(0,i._)([(0,p.Cb)({nonNullable:!0,json:{read:!1,write:!1}})],L.prototype,"analysis",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],L.prototype,"fullExtent",null),(0,i._)([(0,p.Cb)({readOnly:!0})],L.prototype,"spatialReference",null),(0,i._)([(0,p.Cb)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],L.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({type:["show","hide"]})],L.prototype,"listMode",void 0),L=(0,i._)([(0,d.j)("esri.layers.LineOfSightLayer")],L);const P=L},66094:(e,t,s)=>{s.d(t,{B:()=>n});var i=s(17452);function n(e){return r[function(e){return e instanceof Blob?e.type:function(e){const t=(0,i.Ml)(e);return a[t]||l}(e.url)}(e)]||o}const r={},l="text/plain",o=r[l],a={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in a)r[a[e]]=e}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5587],{83379:(t,e,r)=>{r.d(e,{Z:()=>m});var o=r(43697),s=r(20102),i=r(70586),l=r(609),n=r(95330),a=r(20941),u=r(5600),p=r(52011);const d="loaded",h=t=>{let e=class extends t{constructor(...t){super(...t),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((t=>{const e=this.load.bind(this);this.load=r=>{const o=new Promise(((t,e)=>{const o=(0,n.$F)(r,e);this.destroyed&&e(new s.Z("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this._promiseProps.when(t,e).finally((()=>{o&&o.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const t=this._loadController=new AbortController;e({signal:t.signal}),(0,n.fu)(t.signal,(()=>{this._promiseProps.abort()}))}return t(),o}}))),this.when((()=>{this._set("loadStatus",d),this._loadController=null}),(t=>{this._set("loadStatus","failed"),this._set("loadError",t),this._loadController=null}))}destroy(){this._loadController=(0,i.IM)(this._loadController),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===d}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new s.Z("load:cancelled","Cancelled")),this._loadController?.abort()),this}};return(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loaded",null),(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loadError",void 0),(0,o._)([(0,u.Cb)({clonable:!1})],e.prototype,"loadStatus",void 0),(0,o._)([(0,u.Cb)({type:[a.Z],readOnly:!0})],e.prototype,"loadWarnings",null),e=(0,o._)([(0,p.j)("esri.core.Loadable")],e),e};let c=class extends(h(l.D)){};var y;c=(0,o._)([(0,p.j)("esri.core.Loadable")],c),(y=c||(c={})).LoadableMixin=h,y.isLoadable=function(t){return!(!t||!t.load)};const m=c},609:(t,e,r)=>{r.d(e,{D:()=>h,v:()=>d});var o,s,i=r(43697),l=r(15923),n=r(70586),a=r(95330),u=r(52011);(s=o||(o={}))[s.PENDING=0]="PENDING",s[s.RESOLVED=1]="RESOLVED",s[s.REJECTED=2]="REJECTED";class p{constructor(t){this.instance=t,this._resolver=(0,a.dD)(),this._status=o.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=o.RESOLVED,this._cleanUp()}),(()=>{this._status=o.REJECTED,this._cleanUp()}))}destroy(){this._cleanUp()}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return this._status===o.RESOLVED}isRejected(){return this._status===o.REJECTED}isFulfilled(){return this._status!==o.PENDING}abort(){this._resolver.reject((0,a.zE)())}when(t,e){return this._resolver.promise.then(t,e)}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const t=(0,a.dD)(),e=[...this._resolvingPromises,(0,n.j0)(t.promise)],r=this._allPromise=Promise.all(e);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve(this.instance)}),(t=>{this.isFulfilled()||this._allPromise!==r||(0,a.D_)(t)||this._resolver.reject(t)})),t.resolve()}}const d=t=>{let e=class extends t{constructor(...t){super(...t),this._promiseProps=new p(this),this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps?.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(t,e){return new Promise(((t,e)=>{this._promiseProps.when(t,e)})).then(t,e)}catch(t){return this.when(null,t)}addResolvingPromise(t){t&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in t?t.when():t)}};return e=(0,i._)([(0,u.j)("esri.core.Promise")],e),e};let h=class extends(d(l.Z)){};h=(0,i._)([(0,u.j)("esri.core.Promise")],h)},70171:(t,e,r)=>{let o;r.d(e,{Kd:()=>l,Ze:()=>p,qe:()=>a});const s=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function i(){return s??globalThis.navigator?.language??"en"}function l(){return void 0===o&&(o=i()),o}const n=[];function a(t){return n.push(t),{remove(){n.splice(n.indexOf(t),1)}}}const u=[];function p(t){return u.push(t),{remove(){n.splice(u.indexOf(t),1)}}}globalThis.addEventListener?.("languagechange",(function(){const t=i();o!==t&&(o=t,[...u].forEach((e=>{e.call(null,t)})),[...n].forEach((e=>{e.call(null,t)})))}))},65587:(t,e,r)=>{r.d(e,{Z:()=>U});var o=r(43697),s=r(68773),i=r(40330),l=r(3172),n=r(20102),a=r(96674),u=r(83379),p=r(70586),d=r(95330),h=r(5600),c=r(75215),y=(r(67676),r(80442),r(71715)),m=r(52011),_=r(6570),v=r(70171),C=r(41253),b=r(15923);let f=class extends b.Z{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,o._)([(0,h.Cb)()],f.prototype,"nextQueryParams",void 0),(0,o._)([(0,h.Cb)()],f.prototype,"queryParams",void 0),(0,o._)([(0,h.Cb)()],f.prototype,"results",void 0),(0,o._)([(0,h.Cb)()],f.prototype,"total",void 0),f=(0,o._)([(0,m.j)("esri.portal.PortalQueryResult")],f);const g=f;var S,P=r(86082),O=r(71058);let w;const q={PortalGroup:()=>Promise.resolve().then(r.bind(r,68916)),PortalItem:()=>Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)),PortalUser:()=>Promise.resolve().then(r.bind(r,86082))};let G=S=class extends((0,a.eC)(u.Z)){constructor(t){super(t),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=s.Z.portalUrl,this.urlKey=null,this.user=null,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null,this._finalizationToken={}}normalizeCtorArgs(t){return"string"==typeof t?{url:t}:t}destroy(){E.unregister(this._finalizationToken),this.defaultBasemap=(0,p.SC)(this.defaultBasemap),this.defaultDevBasemap=(0,p.SC)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,p.SC)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,p.hw)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)s.Z.request.trustedServers.includes(e)||s.Z.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){const t=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!t?` AND orgid:${this.id}`:null}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get restUrl(){let t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.substring(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t?t.toLowerCase():t}readUser(t){let e=null;return t&&(e=P.default.fromJSON(t),e.portal=this),e}load(t){const e=Promise.all([r.e(5235),r.e(3668)]).then(r.bind(r,93668)).then((({default:e})=>{(0,d.k_)(t),w=e})).then((()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,t))).then((t=>{if(i.id){const t=i.id;this.credential=t.findCredential(this.restUrl),this.credential||this.authMode!==S.AUTH_MODE_AUTO||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=t.on("credential-create",function(t){const e=i.id;return()=>{const r=t.deref();r&&e.findCredential(r.restUrl)&&r.signIn().catch((()=>{}))}}(new WeakRef(this))),E.register(this,this._esriIdCredentialCreateHandle,this._finalizationToken))}this.sourceJSON=t,this.read(t)}));return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await Promise.all([r.e(163),r.e(4547),r.e(5235),r.e(3055),r.e(2763),r.e(9393)]).then(r.bind(r,65665))).default;return t?t.map((t=>new e({id:t.id,url:t.url}))):[]}fetchBasemaps(t,e){const r=new C.Z;return r.query=t||(s.Z.apiKey&&(0,O.r)(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0,this.queryGroups(r,e).then((t=>{if(r.num=100,r.query='type:"Web Map" -type:"Web Application"',t.total){const o=t.results[0];return r.sortField=o.sortField||"name",r.sortOrder=o.sortOrder||"desc",o.queryItems(r,e)}return null})).then((t=>{let e;return e=t&&t.total?t.results.filter((t=>"Web Map"===t.type)).map((t=>new w({portalItem:t}))):[],e}))}fetchCategorySchema(t){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",t).then((t=>t.categorySchema)):(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new C.Z;if(r.num=100,r.sortField="title",e&&e.length){const o=[];for(const t of e)o.push(`(title:"${t.title}" AND owner:${t.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,t).then((t=>t.results))}return(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchRegions(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return S._default&&!S._default.destroyed||(S._default=new S),S._default}queryGroups(t,e){return this.queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this.queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this.queryPortal("/community/users",t,"PortalUser",e)}fetchSelf(t=this.authMode,e=!1,r){const o=this.restUrl+"/portals/self",s={authMode:t,query:{culture:(0,v.Kd)().toLowerCase()},...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),e&&(s.query.default=!0),this.request(o,s)}queryPortal(t,e,r,o){const s=(0,c.se)(C.Z,e),i=e=>this.request(this.restUrl+t,{...s.toRequestOptions(this),...o}).then((t=>{const r=s.clone();return r.start=t.nextStart,new g({nextQueryParams:r,queryParams:s,total:t.total,results:S._resultsToTypedArray(e,{portal:this},t,o)})})).then((t=>Promise.all(t.results.map((e=>"function"==typeof e.when?e.when():t))).then((()=>t),(e=>((0,d.r9)(e),t)))));return r&&q[r]?q[r]().then((({default:t})=>((0,d.k_)(o),i(t)))):i()}signIn(){if(this.authMode===S.AUTH_MODE_ANONYMOUS)return Promise.reject(new n.Z("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const t=t=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(t||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=t,this.fetchSelf("immediate")))):this.user&&this.credential===t?null:(this.credential=t,this.fetchSelf("immediate")))).then((t=>{t&&(this.sourceJSON=t,this.read(t))}));return i.id?i.id.getCredential(this.restUrl).then((e=>t(e))):t(this.credential)}normalizeUrl(t){const e=this.credential&&this.credential.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}requestToTypedArray(t,e,r){return this.request(t,e).then((t=>{const e=S._resultsToTypedArray(r,{portal:this},t);return Promise.all(e.map((e=>"function"==typeof e.when?e.when():t))).then((()=>e),(()=>e))}))}request(t,e={}){const r={f:"json",...e.query},{authMode:o=(this.authMode===S.AUTH_MODE_ANONYMOUS?"anonymous":"auto"),body:s=null,cacheBust:i=!1,method:n="auto",responseType:a="json",signal:u}=e,p={authMode:o,body:s,cacheBust:i,method:n,query:r,responseType:a,timeout:0,signal:u};return(0,l.default)(this._normalizeSSL(t),p).then((t=>t.data))}toJSON(){throw new n.Z("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new S({sourceJSON:t})}_getHelperService(t){const e=this.helperServices&&this.helperServices[t];if(!e)throw new n.Z("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(t){if(t){const e=w.fromJSON(t);return e.portalItem={portal:this},e}return null}static _resultsToTypedArray(t,e,r,o){let s=[];if(r){const i=null!=o?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(s=s.map((r=>{const o=Object.assign(t?t.fromJSON(r):r,e);return"function"==typeof o.load&&o.load(i),o})))}else s=[];return s}};G.AUTH_MODE_ANONYMOUS="anonymous",G.AUTH_MODE_AUTO="auto",G.AUTH_MODE_IMMEDIATE="immediate",(0,o._)([(0,h.Cb)()],G.prototype,"access",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"allSSL",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"authMode",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"authorizedCrossOriginDomains",void 0),(0,o._)([(0,y.r)("authorizedCrossOriginDomains")],G.prototype,"readAuthorizedCrossOriginDomains",null),(0,o._)([(0,h.Cb)()],G.prototype,"basemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"bingKey",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canListApps",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canListData",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canListPreProvisionedItems",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canProvisionDirectPurchase",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canSearchPublic",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canShareBingPublic",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canSharePublic",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canSignInArcGIS",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canSignInIDP",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"colorSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"commentsEnabled",void 0),(0,o._)([(0,h.Cb)({type:Date})],G.prototype,"created",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"credential",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"culture",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"currentVersion",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"customBaseUrl",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"defaultBasemap",void 0),(0,o._)([(0,y.r)("defaultBasemap")],G.prototype,"readDefaultBasemap",null),(0,o._)([(0,h.Cb)()],G.prototype,"defaultDevBasemap",void 0),(0,o._)([(0,y.r)("defaultDevBasemap")],G.prototype,"readDefaultDevBasemap",null),(0,o._)([(0,h.Cb)({type:_.Z})],G.prototype,"defaultExtent",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"defaultVectorBasemap",void 0),(0,o._)([(0,y.r)("defaultVectorBasemap")],G.prototype,"readDefaultVectorBasemap",null),(0,o._)([(0,h.Cb)()],G.prototype,"description",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"devBasemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"eueiEnabled",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],G.prototype,"extraQuery",null),(0,o._)([(0,h.Cb)()],G.prototype,"featuredGroups",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"featuredItemsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"galleryTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"livingAtlasGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"hasCategorySchema",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"helpBase",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"helperServices",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"helpMap",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"homePageFeaturedContent",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"homePageFeaturedContentCount",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"httpPort",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"httpsPort",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"id",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"ipCntryCode",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],G.prototype,"isOrganization",null),(0,o._)([(0,h.Cb)()],G.prototype,"isPortal",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"isReadOnly",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],G.prototype,"itemPageUrl",null),(0,o._)([(0,h.Cb)()],G.prototype,"layerTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"maxTokenExpirationMinutes",void 0),(0,o._)([(0,h.Cb)({type:Date})],G.prototype,"modified",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"name",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"portalHostname",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"portalMode",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"portalProperties",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"region",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],G.prototype,"restUrl",null),(0,o._)([(0,h.Cb)()],G.prototype,"rotatorPanels",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"showHomePageDescription",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"sourceJSON",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"staticImagesUrl",void 0),(0,o._)([(0,h.Cb)({json:{name:"2DStylesGroupQuery"}})],G.prototype,"stylesGroupQuery2d",void 0),(0,o._)([(0,h.Cb)({json:{name:"stylesGroupQuery"}})],G.prototype,"stylesGroupQuery3d",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"supportsHostedServices",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"symbolSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"templatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"thumbnail",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],G.prototype,"thumbnailUrl",null),(0,o._)([(0,h.Cb)()],G.prototype,"units",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"url",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"urlKey",void 0),(0,o._)([(0,y.r)("urlKey")],G.prototype,"readUrlKey",null),(0,o._)([(0,h.Cb)()],G.prototype,"user",void 0),(0,o._)([(0,y.r)("user")],G.prototype,"readUser",null),(0,o._)([(0,h.Cb)()],G.prototype,"useStandardizedQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"useVectorBasemaps",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"vectorBasemapGalleryGroupQuery",void 0),G=S=(0,o._)([(0,m.j)("esri.portal.Portal")],G);const U=G,E=new FinalizationRegistry((t=>{t.remove()}))},68916:(t,e,r)=>{r.r(e),r.d(e,{default:()=>h});var o=r(43697),s=r(20102),i=r(96674),l=r(70586),n=r(5600),a=r(75215),u=(r(67676),r(80442),r(52011)),p=r(41253);let d=class extends i.wq{constructor(t){super(t),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.tags=null,this.title=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e&&this.portal?this.portal?.normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){const t=this.get("portal.restUrl");return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return(0,l.s3)(this.portal).request(this.url+"/categorySchema",t).then((e=>{const r=e.categorySchema||[];return r.some((t=>"contentCategorySetsGroupQuery.LivingAtlas"===t.source))?this._fetchCategorySchemaSet("LivingAtlas",t):r}))}fetchMembers(t){return(0,l.s3)(this.portal).request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}queryItems(t,e){let r=(0,a.se)(p.Z,t);const o=(0,l.s3)(this.portal);return parseFloat(o.currentVersion)>5?(r=r||new p.Z,o.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new p.Z,r.query="group:"+this.id+(r.query?" "+r.query:""),o.queryItems(r,e))}_fetchCategorySchemaSet(t,e){const r=(0,l.s3)(this.portal);return r.fetchSelf(r.authMode,!0,e).then((t=>{const o=t.contentCategorySetsGroupQuery;if(o){const t=new p.Z;return t.disableExtraQuery=!0,t.num=1,t.query=o,r.queryGroups(t,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const o=r.results[0],s=new p.Z;return s.num=1,s.query=`typekeywords:"${t}"`,o.queryItems(s,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((t=>t.total?t.results[0].fetchData("json",e).then((t=>{const e=t&&t.categorySchema;return e&&e.length?e:[]})):[]))}};(0,o._)([(0,n.Cb)()],d.prototype,"access",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"created",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"description",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"id",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"isInvitationOnly",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"modified",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"owner",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"portal",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"snippet",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortField",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortOrder",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"tags",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"thumbnail",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"thumbnailUrl",null),(0,o._)([(0,n.Cb)()],d.prototype,"title",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"url",null),d=(0,o._)([(0,u.j)("esri.portal.PortalGroup")],d);const h=d},41253:(t,e,r)=>{r.d(e,{Z:()=>m});var o,s=r(43697),i=r(15923),l=r(35454),n=r(22974),a=r(5600),u=(r(75215),r(52011)),p=r(6570),d=r(82971),h=r(40488);const c=new l.X({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let y=o=class extends i.Z{constructor(t){super(t),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(t){"asc"!==t&&"desc"!==t||this._set("sortOrder",t)}clone(){return new o({categories:this.categories?(0,n.d9)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(t,e){let r=[];this.categories&&(r=this.categories.map((t=>Array.isArray(t)?JSON.stringify(t):t)));let o="";if(this.extent){const t=(0,h.iV)(this.extent,d.Z.WGS84);null!=t&&(o=`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`)}let s=this.query;!this.disableExtraQuery&&t.extraQuery&&(s="("+s+")"+t.extraQuery);const i={categories:r,bbox:o,q:s,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(i.sortField=this.sortField.split(",").map((t=>c.toJSON(t.trim()))).join(","),i.sortOrder=this.sortOrder),{query:{...e,...i}}}};(0,s._)([(0,a.Cb)()],y.prototype,"categories",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"disableExtraQuery",void 0),(0,s._)([(0,a.Cb)({type:p.Z})],y.prototype,"extent",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"filter",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"num",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"query",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortField",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortOrder",null),(0,s._)([(0,a.Cb)()],y.prototype,"start",void 0),y=o=(0,s._)([(0,u.j)("esri.portal.PortalQueryParams")],y);const m=y},86082:(t,e,r)=>{r.r(e),r.d(e,{default:()=>c});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(75215),r(67676),r(80442),r(52011));let a=class extends i.wq{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,o._)([(0,l.Cb)({type:Date})],a.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],a.prototype,"url",null),(0,o._)([(0,l.Cb)()],a.prototype,"username",void 0),a=(0,o._)([(0,n.j)("esri.portal.PortalFolder")],a);const u=a;var p,d=r(68916);let h=p=class extends i.wq{constructor(...t){super(...t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}`:null}get url(){const t=this.get("portal.restUrl");return t?`${t}/community/users/${this.username}`:null}addItem(t){const e=t&&t.item,r=t&&t.data,o=t&&t.folder,s={method:"post"};e&&(s.query=e.createPostQuery(),null!=r&&("string"==typeof r?s.query.text=r:"object"==typeof r&&(s.query.text=JSON.stringify(r))));let i=this.userContentUrl;return o&&(i+="/"+("string"==typeof o?o:o.id)),this.portal.request(i+"/addItem",s).then((t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load())))}deleteItem(t){let e=this.userContentUrl;return t.ownerFolder&&(e+="/"+t.ownerFolder),this.portal.request(e+`/items/${t.id}/delete`,{method:"post"}).then((()=>{t.id=null,t.portal=null}))}deleteItems(t){const e=this.userContentUrl+"/deleteItems",r=t.map((t=>t.id));if(r.length){const o={method:"post",query:{items:r.join(",")}};return this.portal.request(e,o).then((()=>{t.forEach((t=>{t.id=null,t.portal=null}))}))}return Promise.resolve(void 0)}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then((t=>{let e;return e=t&&t.folders?t.folders.map((t=>{const e=u.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchGroups(){return this.portal.request(this.url??"").then((t=>{let e;return e=t&&t.groups?t.groups.map((t=>{const e=d.default.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchItems(t){const e=t??{};let o,s=this.userContentUrl??"";return e.folder&&(s+="/"+e.folder.id),Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)).then((({default:t})=>{o=t;const r={folders:!1,num:e.num||10,start:e.start||1,sortField:e.sortField||"created",sortOrder:e.sortOrder||"asc"};return this.portal.request(s,{query:r})})).then((t=>{let e;return t&&t.items?(e=t.items.map((t=>{const e=o.fromJSON(t);return e.portal=this.portal,e})),Promise.all(e.map((t=>t.load()))).catch((t=>t)).then((()=>({items:e,nextStart:t.nextStart,total:t.total})))):{items:[],nextStart:-1,total:0}}))}fetchTags(){return this.portal.request(this.url+"/tags").then((t=>t.tags))}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new d.default({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new s.Z("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new p;return e.sourceJSON=t,e.read(t),e}};(0,o._)([(0,l.Cb)()],h.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"culture",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"email",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"favGroupId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"fullName",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"orgId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"preferredView",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"privileges",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"region",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"role",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"roleId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"sourceJSON",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],h.prototype,"units",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"userContentUrl",null),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"url",null),(0,o._)([(0,l.Cb)()],h.prototype,"username",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"userType",void 0),h=p=(0,o._)([(0,n.j)("esri.portal.PortalUser")],h);const c=h}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[911],{17017:(e,t,r)=>{r.d(t,{N:()=>o});var n=r(43697),i=r(5600),s=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,n._)([(0,i.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,n._)([(0,s.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>h});var n=r(43697),i=r(92604),s=r(95330),o=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),a=r(46791),c=(r(20102),r(26258),r(87538));const p=new a.Z,u=new WeakMap;function d(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function b(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:b(t,e%t):0}let f=0,m=0;function w(){const e=Date.now();for(const t of p)t.refreshInterval&&e-(u.get(t)??0)+5>=6e4*t.refreshInterval&&(u.set(t,e),t.refresh(e))}(0,c.EH)((()=>{const e=Date.now();let t=0;for(const r of p)t=b(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?u.get(r)||u.set(r,e):u.delete(r);if(t!==m){if(m=t,clearInterval(f),0===m)return void(f=0);f=setInterval(w,m)}}));const h=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){d(e)&&p.push(e)}(this)}),(()=>{}))}destroy(){var e;d(e=this)&&p.includes(e)&&p.remove(e)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,s.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this.declaredClass).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,n._)([(0,o.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,o.Cb)()],t.prototype,"refreshParameters",null),t=(0,n._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},54306:(e,t,r)=>{r.d(t,{Z:()=>P});var n,i=r(43697),s=r(9790),o=r(35454),l=r(96674),a=r(22974),c=r(62357),p=r(5600),u=(r(75215),r(71715)),d=r(52011),b=r(30556),f=(r(67676),r(80442),r(8813));let m=n=class extends l.wq{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,f.dI)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,f.dI)(this.value)),null!=e&&(t[r]=e)}clone(){return new n({expression:this.expression,title:this.title,value:this.value})}};(0,i._)([(0,p.Cb)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],m.prototype,"expression",void 0),(0,i._)([(0,u.r)("expression",["expression","value"])],m.prototype,"readExpression",null),(0,i._)([(0,b.c)("expression")],m.prototype,"writeExpression",null),(0,i._)([(0,p.Cb)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],m.prototype,"title",void 0),(0,i._)([(0,p.Cb)({json:{read:!1,write:!1}})],m.prototype,"value",void 0),m=n=(0,i._)([(0,d.j)("esri.layers.support.LabelExpressionInfo")],m);const w=m;var h,y=r(84230),v=r(28412),g=r(21878);const x=new o.X({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 S(e,t,r){return{enabled:!(0,y.A2)(r?.layer)}}function L(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function C(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let E=h=class extends l.wq{static evaluateWhere(e,t){const r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const n=e.split(" ");if(3===n.length)return r(t[n[0]],n[1],n[2]);if(7===n.length){const e=r(t[n[0]],n[1],n[2]),i=n[3],s=r(t[n[4]],n[5],n[6]);switch(i){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=v.Rz,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,f.z7)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,f.el)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,n){if(null==e&&null!=this.labelExpression&&L(n))e=new w({expression:this.getLabelExpressionArcade()});else if(!e)return;const i=e.toJSON(n);i.expression&&(t[r]=i)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return(0,f.hV)(this)}getLabelExpressionArcade(){return(0,f.YI)(this)}getLabelExpressionSingleField(){return(0,f.UO)(this)}hash(){return JSON.stringify(this)}clone(){return new h({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,a.d9)(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,a.d9)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],E.prototype,"name",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:S}}}}})],E.prototype,"allowOverrun",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:S}}}}})],E.prototype,"deconflictionStrategy",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&C(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],E.prototype,"labelExpression",void 0),(0,i._)([(0,u.r)("labelExpression")],E.prototype,"readLabelExpression",null),(0,i._)([(0,b.c)("labelExpression")],E.prototype,"writeLabelExpression",null),(0,i._)([(0,p.Cb)({type:w,json:{write:{overridePolicy:(e,t,r)=>function(e){return L(e)||C(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],E.prototype,"labelExpressionInfo",void 0),(0,i._)([(0,b.c)("labelExpressionInfo")],E.prototype,"writeLabelExpressionInfo",null),(0,i._)([(0,p.Cb)({type:x.apiValues,json:{type:x.jsonValues,read:x.read,write:x.write}})],E.prototype,"labelPlacement",void 0),(0,i._)([(0,p.Cb)({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,i._)([(0,p.Cb)({type:Number})],E.prototype,"maxScale",void 0),(0,i._)([(0,b.c)("maxScale")],E.prototype,"writeMaxScale",null),(0,i._)([(0,p.Cb)({type:Number})],E.prototype,"minScale",void 0),(0,i._)([(0,b.c)("minScale")],E.prototype,"writeMinScale",null),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],E.prototype,"repeatLabel",void 0),(0,i._)([(0,p.Cb)({type:Number,cast:c.t_,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],E.prototype,"repeatLabelDistance",void 0),(0,i._)([(0,p.Cb)({types:s.yK,json:{origins:{"web-scene":{types:s.S6,write:g.vX,default:null}},write:g.vX,default:null}})],E.prototype,"symbol",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],E.prototype,"useCodedValues",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],E.prototype,"where",void 0),E=h=(0,i._)([(0,d.j)("esri.layers.support.LabelClass")],E);const P=E},8813:(e,t,r)=>{r.d(t,{UO:()=>w,YI:()=>m,dI:()=>h,el:()=>S,hV:()=>f,z7:()=>b});var n=r(19153);const i="__begin__",s="__end__",o=new RegExp(i,"ig"),l=new RegExp(s,"ig"),a=new RegExp("^"+i,"i"),c=new RegExp(s+"$","i"),p='"',u=p+" + ",d=" + "+p;function b(e){return e.replace(new RegExp("\\{","g"),"[").replace(new RegExp("\\}","g"),"]")}function f(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=function(e){return e.replace(new RegExp("\\[","g"),"{").replace(new RegExp("\\]","g"),"}")}(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return h(t.expression);case"arcade":return t.expression}return null}function w(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(y);return t&&t[1].trim()||null}(t.expression);case"arcade":return S(t.expression)}return null}function h(e){let t;return e?(t=(0,n.gx)(e,(e=>i+'$feature["'+e+'"]'+s)),t=a.test(t)?t.replace(a,""):p+t,t=c.test(t)?t.replace(c,""):t+p,t=t.replace(o,u).replace(l,d)):t='""',t}const y=/^\s*\{([^}]+)\}\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,g=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,x=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function S(e){if(!e)return null;let t=v.exec(e)||g.exec(e);return t?t[1]||t[3]:(t=x.exec(e),t?t[2]:null)}},30707:(e,t,r)=>{r.d(t,{a:()=>u,r:()=>c});var n=r(20102),i=r(22974),s=r(92604),o=r(54306);const l=s.Z.getLogger("esri.layers.support.labelingInfo"),a=/\[([^\[\]]+)\]/gi;function c(e,t,r){return e?e.map((e=>{const n=new o.Z;if(n.read(e,r),n.labelExpression){const e=t.fields||t.layerDefinition&&t.layerDefinition.fields||this.fields;n.labelExpression=n.labelExpression.replace(a,((t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const n=t[e].name;if(n.toLowerCase()===r)return n}return e}(r,e)}]`))}return n})):null}const p={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along"],esriGeometryMultipoint:null};function u(e,t){const r=(0,i.d9)(e);return r.some((e=>function(e,t){const r=e.labelPlacement,i=p[t];if(!e.symbol)return l.warn("No ILabelClass symbol specified."),!0;if(!i)return l.error(new n.Z("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),!0;if(!i.includes(r)){const n=i[0];r&&l.warn(`Found invalid label placement type ${r} for ${t}. Defaulting to ${n}`),e.labelPlacement=n}return!1}(e,t)))?[]:r}},32163:(e,t,r)=>{r.d(t,{eZ:()=>u});var n=r(51773),i=r(35671),s=r(84649),o=(r(63801),r(48074),r(38745),r(9190)),l=(r(10214),r(71423),r(44951),r(422)),a=r(63061);const c=["oid","global-id"],p=["oid","global-id","guid"];function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:a,title:c},p){if(!r)return null;const u=function({editFieldsInfo:e,fields:t,objectIdField:r},n){return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(f),e}(t??[],n?.ignoreFieldTypes||v).map((t=>new l.Z({fieldName:t.name,isEditable:w(t,e),label:t.alias,format:h(t),visible:b(t,{editFieldsInfo:e,objectIdField:r,visibleFieldNames:n?.visibleFieldNames})})))}({editFieldsInfo:t,fields:r,objectIdField:a},p);if(!u.length)return null;const d=function(e){const t=(0,i.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:c,fields:r,displayField:e}),m=[new o.Z,new s.Z];return new n.Z({title:d,content:m,fieldInfos:u})}const d=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i],b=(e,{editFieldsInfo:t,objectIdField:r,visibleFieldNames:n})=>n?n.has(e.name):!(m(e.name,t)||r&&e.name===r||c.includes(e.type)||d.some((t=>t.test(e.name))));function f(e,t){return"oid"===e.type?-1:"oid"===t.type?1:y(e)?-1:y(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function m(e,t){if(!e||!t)return!1;const{creationDateField:r,creatorField:n,editDateField:i,editorField:s}=t;return[r&&r.toLowerCase(),n&&n.toLowerCase(),i&&i.toLowerCase(),s&&s.toLowerCase()].includes(e.toLowerCase())}function w(e,t){return e.editable&&!p.includes(e.type)&&!m(e.name,t)}function h(e){switch(e.type){case"small-integer":case"integer":case"single":return new a.Z({digitSeparator:!0,places:0});case"double":return new a.Z({digitSeparator:!0,places:2});case"date":return new a.Z({dateFormat:"long-month-day-year"});default:return"string"===e.type&&(0,i.Ec)(e.name)?new a.Z({digitSeparator:!0,places:0}):null}}function y(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const v=["geometry","blob","raster","guid","xml"]},28412:(e,t,r)=>{r.d(t,{CJ:()=>c,Rz:()=>u,xA:()=>a,z3:()=>p}),r(80442);var n=r(20256),i=r(4095),s=r(77987),o=r(78724),l=r(58333);const a=s.Z.fromJSON(l.I4),c=i.Z.fromJSON(l.ET),p=n.Z.fromJSON(l.lF),u=o.Z.fromJSON(l.qP);s.Z.fromJSON(l.eG),i.Z.fromJSON(l.wW),n.Z.fromJSON(l.lj)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[739],{57435:(e,t,r)=>{r.d(t,{Z:()=>u});var s=r(43697),o=r(46791),i=(r(80442),r(20102),r(92604),r(26258),r(87538)),n=r(5600),l=r(52011);let a=class extends o.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.own((0,i.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new o.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,n.Cb)()],a.prototype,"getCollections",void 0),(0,s._)([(0,n.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,s._)([(0,n.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,s._)([(0,l.j)("esri.core.CollectionFlattener")],a);const u=a},42756:(e,t,r)=>{r.r(t),r.d(t,{default:()=>H});var s=r(43697),o=(r(66577),r(46791)),i=r(57435),n=r(16453),l=r(95330),a=r(17445),u=r(17452),y=r(5600),p=r(75215),h=(r(67676),r(80442),r(71715)),f=r(52011),c=r(30556),d=r(82971),m=r(87085),b=r(71612),g=r(38009),v=r(16859),_=r(34760),C=r(72965),w=r(21506),S=r(32448),x=r(96674),F=r(83379),k=r(19153),P=r(68773),G=r(40330),R=(r(51773),r(3172)),Z=r(22974),E=r(60437),I=r(20322);r(91423),r(74889);const T={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function O(e){const t=e.folders||[],r=t.slice(),s=new Map,o=new Map,i=new Map,n=new Map,l=new Map,a={esriGeometryPoint:o,esriGeometryPolyline:i,esriGeometryPolygon:n};(e.featureCollection&&e.featureCollection.layers||[]).forEach((e=>{const t=(0,Z.d9)(e);t.featureSet.features=[];const r=e.featureSet.geometryType;s.set(r,t);const l=e.layerDefinition.objectIdField;"esriGeometryPoint"===r?j(o,l,e.featureSet.features):"esriGeometryPolyline"===r?j(i,l,e.featureSet.features):"esriGeometryPolygon"===r&&j(n,l,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((e=>{l.set(e.id,e)})),t.forEach((t=>{t.networkLinkIds.forEach((s=>{const o=function(e,t,r){const s=function(e,t){let r;return t.some((t=>t.id===e&&(r=t,!0))),r}(e,r);return s&&(s.parentFolderId=t,s.networkLink=s),s}(s,t.id,e.networkLinks);o&&r.push(o)}))})),r.forEach((e=>{if(e.featureInfos){e.points=(0,Z.d9)(s.get("esriGeometryPoint")),e.polylines=(0,Z.d9)(s.get("esriGeometryPolyline")),e.polygons=(0,Z.d9)(s.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const r=a[t.type].get(t.id);r&&e[T[t.type]].featureSet.features.push(r);break}case"GroundOverlay":{const r=l.get(t.id);r&&e.mapImages.push(r);break}}e.fullExtent=M([e])}}));const u=M(r);return{folders:t,sublayers:r,extent:u}}function L(e,t,r,s){const o=G.id&&G.id.findCredential(e);e=(0,u.fl)(e,{token:o&&o.token});const i=P.Z.kmlServiceUrl;return(0,R.default)(i,{query:{url:e,model:"simple",folders:"",refresh:0!==r||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:s})}function N(e,t,r=null,s=[]){const o=[],i={},n=t.sublayers,l=t.folders.map((e=>e.id));return n.forEach((t=>{const n=new e;if(r?n.read(t,r):n.read(t),s.length&&l.includes(n.id)&&(n.visible=s.includes(n.id)),i[t.id]=n,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=i[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(n)}else o.unshift(n)})),o}function j(e,t,r){r.forEach((r=>{e.set(r.attributes[t],r)}))}function M(e){const t=(0,E.Ue)(E.Gv),r=(0,E.Ue)(E.Gv);for(const s of e){if(s.polygons&&s.polygons.featureSet&&s.polygons.featureSet.features)for(const e of s.polygons.featureSet.features)(0,I.Yg)(t,e.geometry),(0,E.TC)(r,t);if(s.polylines&&s.polylines.featureSet&&s.polylines.featureSet.features)for(const e of s.polylines.featureSet.features)(0,I.Yg)(t,e.geometry),(0,E.TC)(r,t);if(s.points&&s.points.featureSet&&s.points.featureSet.features)for(const e of s.points.featureSet.features)(0,I.Yg)(t,e.geometry),(0,E.TC)(r,t);if(s.mapImages)for(const e of s.mapImages)(0,I.Yg)(t,e.extent),(0,E.TC)(r,t)}return(0,E.fS)(r,E.Gv)?void 0:{xmin:r[0],ymin:r[1],zmin:r[2],xmax:r[3],ymax:r[4],zmax:r[5],spatialReference:d.Z.WGS84}}var z,q=r(6570);let D=z=class extends(S.Z.EventedMixin((0,x.eC)(F.Z))){constructor(...e){super(...e),this.description=null,this.id=null,this.networkLink=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.fullExtent=null,this.addHandles([(0,a.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),a.Z_),(0,a.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),a.Z_),(0,a.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),a.Z_)])}initialize(){(0,a.N1)((()=>this.networkLink)).then((()=>(0,a.N1)((()=>!0===this.visible)))).then((()=>this.load()))}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,r=this._fetchService(this._get("networkLink")?.href??"",t).then((e=>{const t=M(e.sublayers);this.fullExtent=q.Z.fromJSON(t),this.sourceJSON=e;const r=(0,p.se)(o.Z.ofType(z),N(z,e));this.sublayers?this.sublayers.addMany(r):this.sublayers=r,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")}));return this.addResolvingPromise(r),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}_fetchService(e,t){return L(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then((e=>O(e.data)))}};(0,s._)([(0,y.Cb)()],D.prototype,"description",void 0),(0,s._)([(0,y.Cb)()],D.prototype,"id",void 0),(0,s._)([(0,y.Cb)({readOnly:!0,value:null})],D.prototype,"networkLink",void 0),(0,s._)([(0,y.Cb)({json:{write:{allowNull:!0}}})],D.prototype,"parent",void 0),(0,s._)([(0,y.Cb)({type:o.Z.ofType(z),json:{write:{allowNull:!0}}})],D.prototype,"sublayers",void 0),(0,s._)([(0,y.Cb)({value:null,json:{read:{source:"name",reader:e=>(0,k.Cb)(e)}}})],D.prototype,"title",void 0),(0,s._)([(0,y.Cb)({value:!0})],D.prototype,"visible",null),(0,s._)([(0,h.r)("visible",["visibility"])],D.prototype,"readVisible",null),(0,s._)([(0,y.Cb)()],D.prototype,"sourceJSON",void 0),(0,s._)([(0,y.Cb)({value:null})],D.prototype,"layer",null),(0,s._)([(0,y.Cb)({type:q.Z})],D.prototype,"fullExtent",void 0),D=z=(0,s._)([(0,f.j)("esri.layers.support.KMLSublayer")],D);const J=D,U=["kml","xml"];let A=class extends((0,b.h)((0,_.Q)((0,C.M)((0,g.q)((0,v.I)((0,n.R)(m.Z))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new i.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=d.Z.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.YP)((()=>this.sublayers),((e,t)=>{t&&t.forEach((e=>{e.parent=null,e.layer=null})),e&&e.forEach((e=>{e.parent=this,e.layer=this}))}),a.Z_),this.on("sublayer-update",(()=>this.notifyChange("fullExtent")))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,r){return N(J,t,r,this._visibleFolders)}writeSublayers(e,t){const r=[],s=e.toArray();for(;s.length;){const e=s[0];e.networkLink||(e.visible&&r.push(e.id),e.sublayers&&s.push(...e.sublayers.toArray())),s.shift()}t.visibleFolders=r}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.vt)(this.url,U)||"KML":e||""}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],r=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(r))};return e&&e.forEach(r),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(l.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=O((await Promise.resolve().then((()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:L(this.url??"",this.outSpatialReference,this.refreshInterval,e)))).data);t&&this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=r=>{if(r.sublayers)for(const s of r.sublayers.items)t(s),s.visible&&s.fullExtent&&(null!=e?e.union(s.fullExtent):e=s.fullExtent.clone())};return t(this),e}};(0,s._)([(0,y.Cb)({readOnly:!0})],A.prototype,"allSublayers",void 0),(0,s._)([(0,y.Cb)({type:d.Z})],A.prototype,"outSpatialReference",void 0),(0,s._)([(0,y.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],A.prototype,"path",void 0),(0,s._)([(0,y.Cb)({readOnly:!0,json:{read:!1,write:!1}})],A.prototype,"legendEnabled",void 0),(0,s._)([(0,y.Cb)({type:["show","hide","hide-children"]})],A.prototype,"listMode",void 0),(0,s._)([(0,y.Cb)({type:["KML"]})],A.prototype,"operationalLayerType",void 0),(0,s._)([(0,y.Cb)({})],A.prototype,"resourceInfo",void 0),(0,s._)([(0,y.Cb)({type:o.Z.ofType(J),json:{write:{ignoreOrigin:!0}}})],A.prototype,"sublayers",void 0),(0,s._)([(0,h.r)(["web-map","portal-item"],"sublayers",["visibleFolders"])],A.prototype,"readSublayersFromItemOrWebMap",null),(0,s._)([(0,h.r)("service","sublayers",["sublayers"])],A.prototype,"readSublayers",null),(0,s._)([(0,c.c)("sublayers")],A.prototype,"writeSublayers",null),(0,s._)([(0,y.Cb)({readOnly:!0,json:{read:!1}})],A.prototype,"type",void 0),(0,s._)([(0,y.Cb)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],A.prototype,"title",null),(0,s._)([(0,y.Cb)(w.HQ)],A.prototype,"url",void 0),(0,s._)([(0,y.Cb)({readOnly:!0})],A.prototype,"visibleSublayers",null),(0,s._)([(0,y.Cb)({type:q.Z})],A.prototype,"extent",void 0),(0,s._)([(0,y.Cb)()],A.prototype,"fullExtent",null),A=(0,s._)([(0,f.j)("esri.layers.KMLLayer")],A);const H=A},34760:(e,t,r)=>{r.d(t,{Q:()=>b});var s=r(43697),o=r(92604),i=r(95330),n=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),a=r(46791),u=(r(20102),r(26258),r(87538));const y=new a.Z,p=new WeakMap;function h(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let c=0,d=0;function m(){const e=Date.now();for(const t of y)t.refreshInterval&&e-(p.get(t)??0)+5>=6e4*t.refreshInterval&&(p.set(t,e),t.refresh(e))}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of y)t=f(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?p.get(r)||p.set(r,e):p.delete(r);if(t!==d){if(d=t,clearInterval(c),0===d)return void(c=0);c=setInterval(m,d)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,i.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{!function(e){h(e)&&y.push(e)}(this)}),(()=>{}))}destroy(){h(this)&&y.includes(this)&&y.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,i.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{o.Z.getLogger(this.declaredClass).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,s._)([(0,n.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,s._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,s._)([(0,n.Cb)()],t.prototype,"refreshParameters",null),t=(0,s._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},51706:(e,t,r)=>{var s,o;function i(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function n(e){return null!=e&&!isNaN(e)&&isFinite(e)}function l(e){return e.valueExpression?s.Expression:e.field&&"string"==typeof e.field?s.Field:s.Unknown}function a(e,t){const r=t||l(e),i=e.valueUnit||"unknown";return r===s.Unknown?o.Constant:e.stops?o.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?o.ClampedLinear:"unknown"===i?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?o.Proportional:o.Additive:o.Identity:o.RealWorldSize}r.d(t,{PS:()=>l,QW:()=>a,RY:()=>s,hL:()=>o,iY:()=>i,qh:()=>n}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(s||(s={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(o||(o={}))},74889:(e,t,r)=>{r.d(t,{Z:()=>v});var s,o=r(43697),i=r(66577),n=r(38171),l=r(35454),a=r(96674),u=r(22974),y=r(5600),p=(r(75215),r(71715)),h=r(52011),f=r(30556),c=r(82971),d=r(33955),m=r(1231);const b=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=s=class extends a.wq{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=c.Z.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const o=e[t],i=n.Z.fromJSON(o),l=o.geometry&&o.geometry.spatialReference;null==i.geometry||l||(i.geometry.spatialReference=r);const a=o.aggregateGeometries,u=i.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],s=a[e],o=s?.spatialReference;null==t||o||(t.spatialReference=r)}s.push(i)}return s}writeGeometryType(e,t,r,s){if(e)return void b.write(e,t,r,s);const{features:o}=this;if(o)for(const e of o)if(e&&null!=e.geometry)return void b.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,d.im)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=c.Z.fromJSON(t.spatialReference)),s}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 s(this.cloneProperties())}cloneProperties(){return(0,u.d9)({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 s=t.features[r];if(s.geometry){const t=e&&e[r];s.geometry=t&&t.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,o]}=e,i=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=i.length;e<t;e++)n?.(i[e].geometry)||(i.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:[s,o],scale:[i,n]}=r,l=this._getHydrationFunction(e,(e=>e*i+s),(e=>o-e*n));for(const{geometry:e}of t)null!=e&&l&&l(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,o;const i=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===s&&n===o||(i.push([e-s,n-o]),s=e,o=n)}else s=t(l[0]),o=r(l[1]),i.push([s,o])}return i.length>0?i: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 s=(0,d.oU)(e)?e.rings:e.paths,o=[];for(let e=0,i=s.length;e<i;e++){const i=s[e],n=this._quantizePoints(i,t,r);n&&o.push(n)}return o.length>0?((0,d.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const s=(0,d.oU)(e)?e.rings:e.paths;let o,i;for(let e=0,n=s.length;e<n;e++){const n=s[e];for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(o+=s[0],i+=s[1]):(o=s[0],i=s[1]),s[0]=t(o),s[1]=r(i)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const s=e.points;let o,i;for(let e=0,n=s.length;e<n;e++){const n=s[e];e>0?(o+=n[0],i+=n[1]):(o=n[0],i=n[1]),n[0]=t(o),n[1]=r(i)}}:null}};(0,o._)([(0,y.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,o._)([(0,y.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,y.Cb)({type:[n.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,o._)([(0,p.r)("features")],g.prototype,"readFeatures",null),(0,o._)([(0,y.Cb)({type:[m.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,o._)([(0,y.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],g.prototype,"geometryType",void 0),(0,o._)([(0,f.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,o._)([(0,y.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,o._)([(0,y.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,o._)([(0,y.Cb)({types:i.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,o._)([(0,p.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,o._)([(0,y.Cb)({type:c.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,o._)([(0,f.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,o._)([(0,y.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=s=(0,o._)([(0,h.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const v=g}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[739],{57435:(e,t,r)=>{r.d(t,{Z:()=>u});var s=r(43697),o=r(46791),i=(r(80442),r(20102),r(92604),r(26258),r(87538)),n=r(5600),l=r(52011);let a=class extends o.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.own((0,i.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new o.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,n.Cb)()],a.prototype,"getCollections",void 0),(0,s._)([(0,n.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,s._)([(0,n.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,s._)([(0,l.j)("esri.core.CollectionFlattener")],a);const u=a},42756:(e,t,r)=>{r.r(t),r.d(t,{default:()=>H});var s=r(43697),o=(r(66577),r(46791)),i=r(57435),n=r(16453),l=r(95330),a=r(17445),u=r(17452),y=r(5600),p=r(75215),h=(r(67676),r(80442),r(71715)),f=r(52011),c=r(30556),d=r(82971),m=r(87085),b=r(71612),g=r(38009),v=r(16859),_=r(34760),C=r(72965),w=r(21506),S=r(32448),x=r(96674),F=r(83379),k=r(19153),P=r(68773),G=r(40330),R=(r(51773),r(3172)),Z=r(22974),E=r(60437),I=r(20322);r(91423),r(74889);const T={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function O(e){const t=e.folders||[],r=t.slice(),s=new Map,o=new Map,i=new Map,n=new Map,l=new Map,a={esriGeometryPoint:o,esriGeometryPolyline:i,esriGeometryPolygon:n};(e.featureCollection&&e.featureCollection.layers||[]).forEach((e=>{const t=(0,Z.d9)(e);t.featureSet.features=[];const r=e.featureSet.geometryType;s.set(r,t);const l=e.layerDefinition.objectIdField;"esriGeometryPoint"===r?j(o,l,e.featureSet.features):"esriGeometryPolyline"===r?j(i,l,e.featureSet.features):"esriGeometryPolygon"===r&&j(n,l,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((e=>{l.set(e.id,e)})),t.forEach((t=>{t.networkLinkIds.forEach((s=>{const o=function(e,t,r){const s=function(e,t){let r;return t.some((t=>t.id===e&&(r=t,!0))),r}(e,r);return s&&(s.parentFolderId=t,s.networkLink=s),s}(s,t.id,e.networkLinks);o&&r.push(o)}))})),r.forEach((e=>{if(e.featureInfos){e.points=(0,Z.d9)(s.get("esriGeometryPoint")),e.polylines=(0,Z.d9)(s.get("esriGeometryPolyline")),e.polygons=(0,Z.d9)(s.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const r=a[t.type].get(t.id);r&&e[T[t.type]].featureSet.features.push(r);break}case"GroundOverlay":{const r=l.get(t.id);r&&e.mapImages.push(r);break}}e.fullExtent=M([e])}}));const u=M(r);return{folders:t,sublayers:r,extent:u}}function L(e,t,r,s){const o=G.id&&G.id.findCredential(e);e=(0,u.fl)(e,{token:o&&o.token});const i=P.Z.kmlServiceUrl;return(0,R.default)(i,{query:{url:e,model:"simple",folders:"",refresh:0!==r||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:s})}function N(e,t,r=null,s=[]){const o=[],i={},n=t.sublayers,l=t.folders.map((e=>e.id));return n.forEach((t=>{const n=new e;if(r?n.read(t,r):n.read(t),s.length&&l.includes(n.id)&&(n.visible=s.includes(n.id)),i[t.id]=n,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=i[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(n)}else o.unshift(n)})),o}function j(e,t,r){r.forEach((r=>{e.set(r.attributes[t],r)}))}function M(e){const t=(0,E.Ue)(E.Gv),r=(0,E.Ue)(E.Gv);for(const s of e){if(s.polygons&&s.polygons.featureSet&&s.polygons.featureSet.features)for(const e of s.polygons.featureSet.features)(0,I.Yg)(t,e.geometry),(0,E.TC)(r,t);if(s.polylines&&s.polylines.featureSet&&s.polylines.featureSet.features)for(const e of s.polylines.featureSet.features)(0,I.Yg)(t,e.geometry),(0,E.TC)(r,t);if(s.points&&s.points.featureSet&&s.points.featureSet.features)for(const e of s.points.featureSet.features)(0,I.Yg)(t,e.geometry),(0,E.TC)(r,t);if(s.mapImages)for(const e of s.mapImages)(0,I.Yg)(t,e.extent),(0,E.TC)(r,t)}return(0,E.fS)(r,E.Gv)?void 0:{xmin:r[0],ymin:r[1],zmin:r[2],xmax:r[3],ymax:r[4],zmax:r[5],spatialReference:d.Z.WGS84}}var z,q=r(6570);let D=z=class extends(S.Z.EventedMixin((0,x.eC)(F.Z))){constructor(...e){super(...e),this.description=null,this.id=null,this.networkLink=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.fullExtent=null,this.addHandles([(0,a.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),a.Z_),(0,a.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),a.Z_),(0,a.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),a.Z_)])}initialize(){(0,a.N1)((()=>this.networkLink)).then((()=>(0,a.N1)((()=>!0===this.visible)))).then((()=>this.load()))}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,r=this._fetchService(this._get("networkLink")?.href??"",t).then((e=>{const t=M(e.sublayers);this.fullExtent=q.Z.fromJSON(t),this.sourceJSON=e;const r=(0,p.se)(o.Z.ofType(z),N(z,e));this.sublayers?this.sublayers.addMany(r):this.sublayers=r,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")}));return this.addResolvingPromise(r),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}_fetchService(e,t){return L(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then((e=>O(e.data)))}};(0,s._)([(0,y.Cb)()],D.prototype,"description",void 0),(0,s._)([(0,y.Cb)()],D.prototype,"id",void 0),(0,s._)([(0,y.Cb)({readOnly:!0,value:null})],D.prototype,"networkLink",void 0),(0,s._)([(0,y.Cb)({json:{write:{allowNull:!0}}})],D.prototype,"parent",void 0),(0,s._)([(0,y.Cb)({type:o.Z.ofType(z),json:{write:{allowNull:!0}}})],D.prototype,"sublayers",void 0),(0,s._)([(0,y.Cb)({value:null,json:{read:{source:"name",reader:e=>(0,k.Cb)(e)}}})],D.prototype,"title",void 0),(0,s._)([(0,y.Cb)({value:!0})],D.prototype,"visible",null),(0,s._)([(0,h.r)("visible",["visibility"])],D.prototype,"readVisible",null),(0,s._)([(0,y.Cb)()],D.prototype,"sourceJSON",void 0),(0,s._)([(0,y.Cb)({value:null})],D.prototype,"layer",null),(0,s._)([(0,y.Cb)({type:q.Z})],D.prototype,"fullExtent",void 0),D=z=(0,s._)([(0,f.j)("esri.layers.support.KMLSublayer")],D);const J=D,U=["kml","xml"];let A=class extends((0,b.h)((0,_.Q)((0,C.M)((0,g.q)((0,v.I)((0,n.R)(m.Z))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new i.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=d.Z.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.YP)((()=>this.sublayers),((e,t)=>{t&&t.forEach((e=>{e.parent=null,e.layer=null})),e&&e.forEach((e=>{e.parent=this,e.layer=this}))}),a.Z_),this.on("sublayer-update",(()=>this.notifyChange("fullExtent")))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,r){return N(J,t,r,this._visibleFolders)}writeSublayers(e,t){const r=[],s=e.toArray();for(;s.length;){const e=s[0];e.networkLink||(e.visible&&r.push(e.id),e.sublayers&&s.push(...e.sublayers.toArray())),s.shift()}t.visibleFolders=r}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.vt)(this.url,U)||"KML":e||""}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],r=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(r))};return e&&e.forEach(r),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(l.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=O((await Promise.resolve().then((()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:L(this.url??"",this.outSpatialReference,this.refreshInterval,e)))).data);t&&this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=r=>{if(r.sublayers)for(const s of r.sublayers.items)t(s),s.visible&&s.fullExtent&&(null!=e?e.union(s.fullExtent):e=s.fullExtent.clone())};return t(this),e}};(0,s._)([(0,y.Cb)({readOnly:!0})],A.prototype,"allSublayers",void 0),(0,s._)([(0,y.Cb)({type:d.Z})],A.prototype,"outSpatialReference",void 0),(0,s._)([(0,y.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],A.prototype,"path",void 0),(0,s._)([(0,y.Cb)({readOnly:!0,json:{read:!1,write:!1}})],A.prototype,"legendEnabled",void 0),(0,s._)([(0,y.Cb)({type:["show","hide","hide-children"]})],A.prototype,"listMode",void 0),(0,s._)([(0,y.Cb)({type:["KML"]})],A.prototype,"operationalLayerType",void 0),(0,s._)([(0,y.Cb)({})],A.prototype,"resourceInfo",void 0),(0,s._)([(0,y.Cb)({type:o.Z.ofType(J),json:{write:{ignoreOrigin:!0}}})],A.prototype,"sublayers",void 0),(0,s._)([(0,h.r)(["web-map","portal-item"],"sublayers",["visibleFolders"])],A.prototype,"readSublayersFromItemOrWebMap",null),(0,s._)([(0,h.r)("service","sublayers",["sublayers"])],A.prototype,"readSublayers",null),(0,s._)([(0,c.c)("sublayers")],A.prototype,"writeSublayers",null),(0,s._)([(0,y.Cb)({readOnly:!0,json:{read:!1}})],A.prototype,"type",void 0),(0,s._)([(0,y.Cb)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],A.prototype,"title",null),(0,s._)([(0,y.Cb)(w.HQ)],A.prototype,"url",void 0),(0,s._)([(0,y.Cb)({readOnly:!0})],A.prototype,"visibleSublayers",null),(0,s._)([(0,y.Cb)({type:q.Z})],A.prototype,"extent",void 0),(0,s._)([(0,y.Cb)()],A.prototype,"fullExtent",null),A=(0,s._)([(0,f.j)("esri.layers.KMLLayer")],A);const H=A},34760:(e,t,r)=>{r.d(t,{Q:()=>b});var s=r(43697),o=r(92604),i=r(95330),n=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),a=r(46791),u=(r(20102),r(26258),r(87538));const y=new a.Z,p=new WeakMap;function h(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let c=0,d=0;function m(){const e=Date.now();for(const t of y)t.refreshInterval&&e-(p.get(t)??0)+5>=6e4*t.refreshInterval&&(p.set(t,e),t.refresh(e))}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of y)t=f(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?p.get(r)||p.set(r,e):p.delete(r);if(t!==d){if(d=t,clearInterval(c),0===d)return void(c=0);c=setInterval(m,d)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,i.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){h(e)&&y.push(e)}(this)}),(()=>{}))}destroy(){h(this)&&y.includes(this)&&y.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,i.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{o.Z.getLogger(this.declaredClass).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,s._)([(0,n.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,s._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,s._)([(0,n.Cb)()],t.prototype,"refreshParameters",null),t=(0,s._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},51706:(e,t,r)=>{var s,o;function i(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function n(e){return null!=e&&!isNaN(e)&&isFinite(e)}function l(e){return e.valueExpression?s.Expression:e.field&&"string"==typeof e.field?s.Field:s.Unknown}function a(e,t){const r=t||l(e),i=e.valueUnit||"unknown";return r===s.Unknown?o.Constant:e.stops?o.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?o.ClampedLinear:"unknown"===i?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?o.Proportional:o.Additive:o.Identity:o.RealWorldSize}r.d(t,{PS:()=>l,QW:()=>a,RY:()=>s,hL:()=>o,iY:()=>i,qh:()=>n}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(s||(s={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(o||(o={}))},74889:(e,t,r)=>{r.d(t,{Z:()=>v});var s,o=r(43697),i=r(66577),n=r(38171),l=r(35454),a=r(96674),u=r(22974),y=r(5600),p=(r(75215),r(71715)),h=r(52011),f=r(30556),c=r(82971),d=r(33955),m=r(1231);const b=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=s=class extends a.wq{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=c.Z.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const o=e[t],i=n.Z.fromJSON(o),l=o.geometry&&o.geometry.spatialReference;null==i.geometry||l||(i.geometry.spatialReference=r);const a=o.aggregateGeometries,u=i.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],s=a[e],o=s?.spatialReference;null==t||o||(t.spatialReference=r)}s.push(i)}return s}writeGeometryType(e,t,r,s){if(e)return void b.write(e,t,r,s);const{features:o}=this;if(o)for(const e of o)if(e&&null!=e.geometry)return void b.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,d.im)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=c.Z.fromJSON(t.spatialReference)),s}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 s(this.cloneProperties())}cloneProperties(){return(0,u.d9)({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 s=t.features[r];if(s.geometry){const t=e&&e[r];s.geometry=t&&t.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,o]}=e,i=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=i.length;e<t;e++)n?.(i[e].geometry)||(i.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:[s,o],scale:[i,n]}=r,l=this._getHydrationFunction(e,(e=>e*i+s),(e=>o-e*n));for(const{geometry:e}of t)null!=e&&l&&l(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,o;const i=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===s&&n===o||(i.push([e-s,n-o]),s=e,o=n)}else s=t(l[0]),o=r(l[1]),i.push([s,o])}return i.length>0?i: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 s=(0,d.oU)(e)?e.rings:e.paths,o=[];for(let e=0,i=s.length;e<i;e++){const i=s[e],n=this._quantizePoints(i,t,r);n&&o.push(n)}return o.length>0?((0,d.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const s=(0,d.oU)(e)?e.rings:e.paths;let o,i;for(let e=0,n=s.length;e<n;e++){const n=s[e];for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(o+=s[0],i+=s[1]):(o=s[0],i=s[1]),s[0]=t(o),s[1]=r(i)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const s=e.points;let o,i;for(let e=0,n=s.length;e<n;e++){const n=s[e];e>0?(o+=n[0],i+=n[1]):(o=n[0],i=n[1]),n[0]=t(o),n[1]=r(i)}}:null}};(0,o._)([(0,y.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,o._)([(0,y.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,y.Cb)({type:[n.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,o._)([(0,p.r)("features")],g.prototype,"readFeatures",null),(0,o._)([(0,y.Cb)({type:[m.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,o._)([(0,y.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],g.prototype,"geometryType",void 0),(0,o._)([(0,f.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,o._)([(0,y.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,o._)([(0,y.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,o._)([(0,y.Cb)({types:i.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,o._)([(0,p.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,o._)([(0,y.Cb)({type:c.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,o._)([(0,f.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,o._)([(0,y.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=s=(0,o._)([(0,h.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const v=g}}]);