@arcgis/core 5.2.0-next.162 → 5.2.0-next.163

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 (112) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/092e311cb7aea92a6a26.js +1 -0
  3. package/assets/esri/core/workers/chunks/1e1c45f75020d5e05dc3.js +1 -0
  4. package/assets/esri/core/workers/chunks/{8e4a7027d171fb60e51e.js → 1f7f4f821d422b46cae7.js} +1 -1
  5. package/assets/esri/core/workers/chunks/1fe24ffcd88280d84fbe.js +1 -0
  6. package/assets/esri/core/workers/chunks/25a3bd8bede2d07d3a54.js +1 -0
  7. package/assets/esri/core/workers/chunks/2ad69cc496235702bbf2.js +1 -0
  8. package/assets/esri/core/workers/chunks/3f46acfda693c70abbdd.js +1 -0
  9. package/assets/esri/core/workers/chunks/434a8ba841a59e0deab9.js +1 -0
  10. package/assets/esri/core/workers/chunks/45fd2b456a6997584ca1.js +1 -0
  11. package/assets/esri/core/workers/chunks/53ff68d4f9e365fc15cd.js +1 -0
  12. package/assets/esri/core/workers/chunks/542e5640ea1b80ef801a.js +1 -0
  13. package/assets/esri/core/workers/chunks/5a9b7eb26f936f03d02e.js +1 -0
  14. package/assets/esri/core/workers/chunks/5d76f4d97beee494bbbf.js +1 -0
  15. package/assets/esri/core/workers/chunks/5dc604e3691f36f03959.js +1 -0
  16. package/assets/esri/core/workers/chunks/5f07f52bb8b7721f08d3.js +1 -0
  17. package/assets/esri/core/workers/chunks/{5f4feca26102088ea565.js → 60737732ce495bbdd0fc.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{9ce8b9b80da146a5bbf5.js → 60c79934799927114074.js} +1 -1
  19. package/assets/esri/core/workers/chunks/67f54efc817b241f8746.js +1 -0
  20. package/assets/esri/core/workers/chunks/7159d9c36869cd82599e.js +29 -0
  21. package/assets/esri/core/workers/chunks/771dd92cb3e6a3427f66.js +1 -0
  22. package/assets/esri/core/workers/chunks/792d2b62356a1d953c88.js +1 -0
  23. package/assets/esri/core/workers/chunks/89c8b0f684c1f27d149e.js +1 -0
  24. package/assets/esri/core/workers/chunks/8ab57cb1bfd3dc8d3c2a.js +1 -0
  25. package/assets/esri/core/workers/chunks/95b82cbbe355266c65d7.js +1 -0
  26. package/assets/esri/core/workers/chunks/97b5f4302fb867c829f4.js +1 -0
  27. package/assets/esri/core/workers/chunks/9de5ad77bc37ec142218.js +1 -0
  28. package/assets/esri/core/workers/chunks/a65951f1d5702cfd996e.js +1 -0
  29. package/assets/esri/core/workers/chunks/aa4f3751f0d830113bed.js +1 -0
  30. package/assets/esri/core/workers/chunks/b1d989b72203113a06fe.js +1 -0
  31. package/assets/esri/core/workers/chunks/{fc73737b41e086f0ce0b.js → b59aaf30c7fe2c8d1aaa.js} +1 -1
  32. package/assets/esri/core/workers/chunks/b6d71a4ab788a09714f3.js +1 -0
  33. package/assets/esri/core/workers/chunks/b704f489d0f072a0bfcd.js +1 -0
  34. package/assets/esri/core/workers/chunks/{d6cd0039d6e9c40961e3.js → d1f98c5249c487eb96f1.js} +1 -1
  35. package/assets/esri/core/workers/chunks/e077e321a3109c2fbbe2.js +1 -0
  36. package/assets/esri/core/workers/chunks/e251921bc5367258c4d2.js +1 -0
  37. package/assets/esri/core/workers/chunks/ee08ae5b73439a1ff666.js +1 -0
  38. package/assets/esri/core/workers/chunks/fcaf9450642fcef83286.js +1 -0
  39. package/assets/esri/core/workers/chunks/feb41abc03d677df6f73.js +1 -0
  40. package/config.d.ts +11 -30
  41. package/config.js +1 -1
  42. package/core/workers/workerFactory.js +1 -1
  43. package/core/workers.d.ts +17 -0
  44. package/kernel.js +1 -1
  45. package/layers/FeatureLayer.d.ts +32 -14
  46. package/layers/MapImageLayer.d.ts +2 -1
  47. package/layers/SubtypeGroupLayer.d.ts +63 -0
  48. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
  49. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  50. package/layers/graphics/sources/support/QueryTask.js +1 -1
  51. package/layers/support/LabelClass.d.ts +20 -2
  52. package/layers/support/Sublayer.d.ts +32 -2
  53. package/layers/support/TimeInformation.js +2 -0
  54. package/package.json +2 -2
  55. package/rest/layerSources/DynamicWorkspaceLayer.d.ts +10 -6
  56. package/rest/query/operations/queryUtils.js +1 -1
  57. package/rest/support/timeUtils.js +2 -0
  58. package/symbols/TextSymbol.d.ts +27 -2
  59. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  60. package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +1 -1
  61. package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
  62. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.js +1 -1
  63. package/views/3d/GroundView3D.js +1 -1
  64. package/views/3d/environment/SunLighting.d.ts +17 -1
  65. package/views/3d/environment/SunLighting.js +1 -1
  66. package/views/3d/environment/VirtualLighting.d.ts +17 -1
  67. package/views/3d/environment/VirtualLighting.js +1 -1
  68. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  69. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  70. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  71. package/views/BasemapView.js +1 -1
  72. package/views/GroundView.d.ts +1 -1
  73. package/views/GroundView.js +1 -1
  74. package/views/SceneView.js +1 -1
  75. package/views/support/ScheduledQueueProcessor.js +1 -1
  76. package/widgets/Daylight/DaylightViewModel.js +1 -1
  77. package/widgets/OrientedImageryViewer.js +1 -1
  78. package/widgets/Sketch/SketchViewModel.d.ts +61 -2
  79. package/widgets/Sketch/SketchViewModel.js +1 -1
  80. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +3 -2
  81. package/widgets/TimeSlider.d.ts +5 -4
  82. package/assets/esri/core/workers/chunks/0bd5012da287469b17d5.js +0 -1
  83. package/assets/esri/core/workers/chunks/112befb3b5b406f29298.js +0 -1
  84. package/assets/esri/core/workers/chunks/167b057ad50e6aef54de.js +0 -1
  85. package/assets/esri/core/workers/chunks/2d13a22f7b2427927fdc.js +0 -1
  86. package/assets/esri/core/workers/chunks/42fd2a7b22b03dacc6a7.js +0 -1
  87. package/assets/esri/core/workers/chunks/43cf862577bf37344ff4.js +0 -1
  88. package/assets/esri/core/workers/chunks/4be559c53fe5ac0d0d2e.js +0 -1
  89. package/assets/esri/core/workers/chunks/4e350d6c76957f5beb70.js +0 -1
  90. package/assets/esri/core/workers/chunks/4fe34da1c5d63e66ce98.js +0 -1
  91. package/assets/esri/core/workers/chunks/6c9266120d46e8c69dbf.js +0 -1
  92. package/assets/esri/core/workers/chunks/6c9acd9e4e201dc380e9.js +0 -1
  93. package/assets/esri/core/workers/chunks/6da7229433105a69eb3f.js +0 -1
  94. package/assets/esri/core/workers/chunks/74c866e0b66e61751861.js +0 -1
  95. package/assets/esri/core/workers/chunks/830ab9b8d000169da675.js +0 -1
  96. package/assets/esri/core/workers/chunks/849879c8aed16315194c.js +0 -1
  97. package/assets/esri/core/workers/chunks/8ff23ac0abeea0073b47.js +0 -1
  98. package/assets/esri/core/workers/chunks/939942b00ba380e2957e.js +0 -1
  99. package/assets/esri/core/workers/chunks/95dbbddac6581b9d671f.js +0 -1
  100. package/assets/esri/core/workers/chunks/a40b6d8b5c73e06e14d4.js +0 -1
  101. package/assets/esri/core/workers/chunks/aa1ac7954e4f0fefe15b.js +0 -1
  102. package/assets/esri/core/workers/chunks/b5df193c93e9c19f9700.js +0 -1
  103. package/assets/esri/core/workers/chunks/befa32b9e7b3fbdd431e.js +0 -1
  104. package/assets/esri/core/workers/chunks/c2c1f51a4668055c2838.js +0 -1
  105. package/assets/esri/core/workers/chunks/d0f5bee9db1ad51ae687.js +0 -1
  106. package/assets/esri/core/workers/chunks/d7429b58c90e015263ad.js +0 -1
  107. package/assets/esri/core/workers/chunks/d95d63e8d51244d71afb.js +0 -1
  108. package/assets/esri/core/workers/chunks/dfc81e66196c402f39b4.js +0 -29
  109. package/assets/esri/core/workers/chunks/dfd2dc5cdc97ffba8926.js +0 -1
  110. package/assets/esri/core/workers/chunks/e1b7806ab3e1967b15f0.js +0 -1
  111. package/assets/esri/core/workers/chunks/e1f5d00878f27e1d413e.js +0 -1
  112. package/assets/esri/core/workers/chunks/ffbcb816b611049a6276.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1549,1560,2938],{19334(e,t,r){r.d(t,{e:()=>o});var i=r(54639),n=r(14112);class l{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry.toJSON()}toAccessorGeometry(e){return this._geometry}toGxGeometry(e){return e.fromAccessorGeometry(this._geometry)}}function o(e){if(null==e)return null;switch(e.type){case"point":if((0,n.e6)(e))return null;break;case"polygon":if((0,n.Wq)(e))return null;break;case"polyline":if((0,n.IY)(e))return null;break;case"multipoint":if((0,n.DG)(e))return null;break;case"extent":if((0,n.As)(e))return null;break;default:return null}let t=i.R.of(e.type,e.spatialReference,e.hasZ,e.hasM,new l(e));return t.asAccessorGeometry(),t}},36983(e,t,r){r.d(t,{R:()=>u,p:()=>d});var i=r(54639),n=r(14112),l=r(16930),o=r(60408),a=r(65864);class s{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry}toAccessorGeometry(e){let t=(0,a.rS)(this._geometry);return t.spatialReference=e,t}toGxGeometry(e){return e.fromJsonGeometry(this._geometry)}}function u(e,t){if("object"!=typeof e||!e)return null;let r=t;if("spatialReference"in e&&(e.spatialReference instanceof l.A?r=e.spatialReference:"object"==typeof e.spatialReference&&null!=e.spatialReference&&(r=new l.A,r.read(e.spatialReference))),null==r)throw Error("Spatial reference required");return(0,o.fT)(e)?d("point",e,r):(0,o.Rg)(e)?d("polyline",e,r):(0,o.Bi)(e)?d("polygon",e,r):(0,o.U9)(e)?d("multipoint",e,r):(0,o.ZC)(e)?d("extent",e,r):null}function d(e,t,r){if(null==t)return null;let l=!1,o=!1;switch(e){case"point":if((0,n.e6)(t))return null;l=void 0!==t.z,o=void 0!==t.m;break;case"polygon":if((0,n.Wq)(t))return null;l=!0===t.hasZ,o=!0===t.hasM;break;case"polyline":if((0,n.IY)(t))return null;l=!0===t.hasZ,o=!0===t.hasM;break;case"multipoint":if((0,n.DG)(t))return null;l=!0===t.hasZ,o=!0===t.hasM;break;case"extent":if((0,n.As)(t))return null;l=null!=t.zmin&&null!=t.zmax,o=null!=t.mmin&&null!=t.mmax;break;default:throw Error("Unsupported geometry type: "+t.type)}return i.R.of(e,r,l,o,new s(t))}},14112(e,t,r){function i(e){return"NaN"===e.x||null===e.x||isNaN(e.x)}function n(e){if(0===(e.curveRings??e.rings).length)return!0;for(let t of e.curveRings??e.rings)if(t.length>0)return!1;return!0}function l(e){if(0===(e.curvePaths??e.paths).length)return!0;for(let t of e.curvePaths??e.paths)if(t.length>0)return!1;return!0}function o(e){return 0===e.points.length}function a(e){return"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)}r.d(t,{As:()=>a,DG:()=>o,IY:()=>l,Wq:()=>n,e6:()=>i})},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){let[r,l]=e.split("."),o=/^\s*\d+\s*$/;if(!r?.match||!o.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!l?.match||!o.test(l)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new n(parseInt(r,10),parseInt(l,10),t)}}},83508(e,t,r){r.r(t),r.d(t,{default:()=>we});var i=r(32198),n=r(56507),l=r(7762),o=r(49186),a=r(91869),s=r(25728),u=r(17676),d=r(84952),p=r(91429),c=r(4146),f=r(36563),y=r(66344),h=r(32587),m=r(36708),g=r(44794),v=r(78888),b=r(63074),w=r(25036),C=r(10873),M=r(91880),x=r(1873);let F=class extends((0,w.j)((0,b.dM)((0,s.M)(c.A)))){constructor(e){super(e),this._layerCache=new y.q(20,e=>e.destroy()),this._oidToReference=new h.A,this._layerToReference=new Map,this.legendEnabled=!0,this.layers=new l.A,this.maximumVisibleSublayers=10,this.opacity=1,this.parent=null,this.persistenceEnabled=!0,this.title="Layers in view",this.type="catalog-dynamic-group",this.visible=!0}initialize(){this.addHandles([this.layers.on("after-add",({item:e})=>{e.parent=this}),this.layers.on("after-remove",({item:e})=>{e.parent=null}),(0,m.wB)(()=>this._orderBy,()=>{this._updateLayerSortValues(),this._sortAllLayers()})])}load(e){return this.addResolvingPromise(this.parent.load()),Promise.resolve(this)}destroy(){this._layerCache.destroy(),this._oidToReference.clear(),this._layerToReference.clear()}get _orderBy(){return this.parent?this.parent.orderBy?.find(e=>!e.valueExpression&&e.field)??new M.A({field:this.parent.objectIdField}):null}get _referenceComparator(){let e=this._orderBy;if(!this.parent||!e)return()=>0;let t=this.parent.fieldsIndex.get(e.field),r=(0,x.FM)(t?.toJSON().type,"descending"===e.order,"case-sensitive"),i=(0,x.FM)("esriFieldTypeOID","descending"===e.order);return(e,t)=>r(t.sortValue,e.sortValue)||i(t.objectId,e.objectId)}get fullExtent(){return this.parent?.fullExtent??null}get updating(){return(0,a.Bs)(this._oidToReference,({pending:e})=>null!=e)}acquireLayer(e){if(this.destroyed)return(0,f.hA)();let t=this._getLayerReference(e);return t.count++,(0,f.hA)(()=>{t.count--,t.count||this._destroyLayerReference(t)})}_getLayerReference(e){let t=e.getObjectId();return(0,a.tE)(this._oidToReference,t,()=>{let t=e.getObjectId(),r=`${t}`,i=e.getAttribute(this.parent.itemSourceField),n=new S(e,t,i),l=this._layerCache.pop(r);return l?(this._addLayer(n,l),n):(n.pending=this.parent.createLayerFromFootprint(e).then(e=>{n.count?this._addLayer(n,e):(!this.destroyed&&!this._layerCache.get(r)&&this._layerCache.put(r,e),n.layer=null)}).catch(()=>{}).finally(()=>{n.pending=null}),n)})}_destroyLayerReference(e){e.layer&&=(this._layerToReference.delete(e.layer),this.layers.remove(e.layer),this.destroyed?e.layer.destroy():this._layerCache.put(`${e.objectId}`,e.layer),null),this._oidToReference.delete(e.objectId)}_addLayer(e,t){e.layer=t,t.persistenceEnabled=!1,this._layerToReference.set(t,e),this._updateLayerSortValue(e),this.layers.add(t),this._sortAllLayers()}_updateLayerSortValues(){for(let e of this._layerToReference.values())this._updateLayerSortValue(e)}_updateLayerSortValue(e){this._orderBy&&(e.sortValue=e.footprint.getAttribute(this._orderBy.field))}_sortAllLayers(){this.layers.sort((e,t)=>this._referenceComparator(this._layerToReference.get(e),this._layerToReference.get(t)))}};(0,i.Cg)([(0,p.MZ)()],F.prototype,"_orderBy",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],F.prototype,"_referenceComparator",null),(0,i.Cg)([(0,p.MZ)(C.fV)],F.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:["show","hide","hide-children"],json:{write:!0}})],F.prototype,"listMode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],F.prototype,"fullExtent",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0,isRequired:!0}}})],F.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],F.prototype,"layers",void 0),(0,i.Cg)([(0,p.MZ)({type:v.jz,range:{min:0,max:50},json:{write:!0,default:10}})],F.prototype,"maximumVisibleSublayers",void 0),(0,i.Cg)([(0,p.MZ)(C.ke)],F.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],F.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{ignoreOrigin:!0,isRequired:!0}}})],F.prototype,"title",void 0),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],F.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],F.prototype,"updating",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],F.prototype,"visible",void 0),F=(0,i.Cg)([(0,p.$K)("esri.layers.catalog.CatalogDynamicGroupLayer")],F);class S{constructor(e,t,r){this.footprint=e,this.objectId=t,this.itemSource=r,this.count=0,this.layer=null,this.sortValue=void 0,this._pending=(0,g.v)(null)}get pending(){return this._pending.value}set pending(e){this._pending.value=e}}var Z=r(37838),I=r(4718),E=r(78247),T=r(41910),j=r(55156),L=r(60950),A=r(89808),_=r(99959);const O=Symbol("isCatalogGraphicOrigin");var P;class V extends _.A{get[(P=O,L.ym)](){return this.layer}get[j.e](){return this.layer}get[A.Q](){return this.layer}get[T.e7](){return this.layer}constructor(e){super(),this[P]=!0,this.type="catalog",this.layer=e}get id(){return this.layer.id}}var R=r(87718),N=r(30279),D=r(16194),q=r(30524),z=r(46499),k=r(39383),B=r(96576),G=r(41214),$=r(30291),U=r(94985),J=r(43937);let K=class extends((0,w.j)((0,R.F)((0,b.dM)((0,s.M)(c.A))))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.elevationInfo=null,this.formTemplate=null,this.graphicOrigin=new V(this),this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.opacity=1,this.parent=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.title="Footprints",this.type="catalog-footprint",this.visible=!0}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.parent.load(e),(0,q.yp)(this.renderer,this.fieldsIndex),this.addHandles([this.parent.on("apply-edits",e=>this.emit("apply-edits",e)),this.parent.on("edits",e=>this.emit("edits",e)),this.parent.on("refresh",e=>this.emit("refresh",e))])}get apiKey(){return this.parent?.apiKey}get capabilities(){return this.parent?.capabilities}get customParameters(){return this.parent?.customParameters}get dateFieldsTimeZone(){return this.parent?.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this.parent?.datesInUnknownTimezone??!1}get definitionExpression(){return this.parent?.definitionExpression}get editingInfo(){return this.parent?.editingInfo}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get createQueryVersion(){return this.parent?.createQueryVersion}get defaultPopupTemplate(){return this.createPopupTemplate()}get displayField(){return this.parent?.displayField}get displayFilterEnabled(){return this.parent?.displayFilterEnabled??!0}get displayFilterInfo(){return this.parent?.displayFilterInfo??null}get effectiveEditingEnabled(){return!1}set fieldConfigurations(e){if(this._override("fieldConfigurations",e),!this.parent?.loaded)return;let t=(0,D.sS)(this,e);t&&this._set("popupTemplate",t)}get fieldConfigurations(){return this._isOverridden("fieldConfigurations")?this._get("fieldConfigurations"):(0,D.QX)(this)||null}get fields(){return this.parent?.fields}get fieldsIndex(){return this.parent?.fieldsIndex}get fullExtent(){return this.parent?.fullExtent}get geometryFieldsInfo(){return this.parent?.geometryFieldsInfo}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?.globalIdField}get hasM(){return this.parent?.hasM??!1}get hasZ(){return this.parent?.hasZ??!1}get objectIdField(){return this.parent?.objectIdField}get orderBy(){return this.parent?.orderBy??null}get outFields(){return this.parent?.outFields}get parsedUrl(){return this.parent?.parsedUrl??null}writePopupTemplate(e,t,r,i){e&&(t[r]=e.toJSON({...i,writeFieldFormat:!0}))}get preferredTimeZone(){return this.parent?.preferredTimeZone??null}set renderer(e){(0,q.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):function(){let e=new U.A({style:"solid",color:[0,0,0,0],outline:{style:"solid",color:[96,96,96,.75],width:.75}});return new B.A({symbol:e})}()}get returnM(){return this.parent?.returnM}get returnZ(){return this.parent?.returnZ}get source(){return this.parent?.source}get timeExtent(){return this.parent?.timeExtent}get timeInfo(){return this.parent?.timeInfo}get timeOffset(){return this.parent?.timeOffset}get typeIdField(){return this.parent?.typeIdField}get types(){return this.parent?.types}get useViewTime(){return this.parent?.useViewTime??!0}get version(){return this.parent?.version}async applyEdits(e,t){return await this.load(),this.parent.applyEdits(e,t)}createFieldConfigurations(){return(0,D.xY)(this)}createPopupTemplate(e){let t={fields:this.fields,objectIdField:this.objectIdField,title:this.title};return(0,$.tn)(t,e)}createQuery(){return this.parent?.createQuery()}getField(e){return this.parent?.getField(e)}getFieldAlias(e){let t=this.getField(e);if(t)return this.getFieldConfiguration(t.name)?.alias||t.alias}getFieldConfiguration(e){return e=e.toLowerCase(),this.fieldConfigurations?.find(t=>t.name.toLowerCase()===e)}getFieldDomain(e,t){return this.parent?.getFieldDomain(e,t)}async queryExtent(e,t){return await this.load(),this.parent.queryExtent(e,t)}async queryFeatures(e,t){return await this.load(),this.parent.queryFeatures(e,t)}async queryFeatureCount(e,t){return await this.load(),this.parent.queryFeatureCount(e,t)}async queryObjectIds(e,t){return await this.load(),this.parent.queryObjectIds(e,t)}async queryAttributeBins(e,t){return await this.load(),this.parent.queryAttributeBins(e,t)}};(0,i.Cg)([(0,p.MZ)(C.zQ)],K.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"apiKey",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"capabilities",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"customParameters",null),(0,i.Cg)([(0,p.MZ)()],K.prototype,"dateFieldsTimeZone",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"datesInUnknownTimezone",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"definitionExpression",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"editingInfo",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"effectiveCapabilities",null),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],K.prototype,"charts",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"createQueryVersion",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"displayField",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],K.prototype,"editingEnabled",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,p.MZ)((()=>{let e=(0,I.o8)(C.Yj);return e.json.origins["web-map"]={read:!1,write:!1},e})())],K.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,p.MZ)({type:[N.A],json:{name:"layerDefinition.fieldConfigurations",write:{overridePolicy(e,t){return{enabled:!0,ignoreOrigin:this.originIdOf(t)<3}}}}})],K.prototype,"fieldConfigurations",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"fields",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"fieldsIndex",null),(0,i.Cg)([(0,p.MZ)({type:E.A,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],K.prototype,"formTemplate",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"fullExtent",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"geometryFieldsInfo",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"geometryType",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"globalIdField",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0,clonable:!1})],K.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"hasM",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"hasZ",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0,isRequired:!0}}})],K.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:[z.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:k.w,write:!0}})],K.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,p.MZ)(C.kF)],K.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,p.MZ)(C.fV)],K.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:["show","hide"],json:{write:!0}})],K.prototype,"listMode",void 0),(0,i.Cg)([(0,p.MZ)((()=>{let e=(0,I.o8)(C.hG);return e.json.origins.service.read=!1,e})())],K.prototype,"maxScale",void 0),(0,i.Cg)([(0,p.MZ)((()=>{let e=(0,I.o8)(C.hn);return e.json.origins.service.read=!1,e})())],K.prototype,"minScale",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"objectIdField",null),(0,i.Cg)([(0,p.MZ)(C.ke)],K.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"orderBy",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"outFields",null),(0,i.Cg)([(0,p.MZ)({clonable:!1})],K.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"parsedUrl",null),(0,i.Cg)([(0,p.MZ)(C.M6)],K.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Z.A,json:{name:"popupInfo",write:!0}})],K.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,J.K)("popupTemplate")],K.prototype,"writePopupTemplate",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"preferredTimeZone",null),(0,i.Cg)([(0,p.MZ)({types:G.Hg,json:{origins:{"web-scene":{types:G.XJ}},name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(e,t){return{ignoreOrigin:this.originIdOf(t)<3}}}}})],K.prototype,"renderer",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"returnM",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"returnZ",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"source",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"timeExtent",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"timeInfo",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"timeOffset",null),(0,i.Cg)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{ignoreOrigin:!0,isRequired:!0}}})],K.prototype,"title",void 0),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],K.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"typeIdField",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"types",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"useViewTime",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],K.prototype,"visible",void 0),K=(0,i.Cg)([(0,p.$K)("esri.layers.catalog.CatalogFootprintLayer")],K);var H=r(60845),Q=r(52136),W=r(18768),Y=r(69208),X=r(6455),ee=r(47685),te=r(10086),re=r(34287),ie=r(32756),ne=r(8303),le=r(54310),oe=r(23502),ae=r(82935),se=r(15426),ue=r(33143),de=r(17036),pe=r(91908),ce=r(20655),fe=r(80812),ye=r(39131),he=r(97552);const me=(0,de.p)();function ge(e,t,r,i){let n=e.write({},i);(function(e){if(null==e)return!0;let t=Object.keys(e);return!t.length||1===t.length&&"id"===t[0]})(n)||(t[r]=n)}let ve=class extends((0,oe.Z)((0,X.FJ)((0,te.j)((0,ee.w6)((0,b.dM)((0,ie.fY)((0,ae.e)((0,w.j)((0,le.J)((0,W.b)((0,re.q)((0,ne.A)((0,s.M)((0,Y.d)((0,Q.p)(c.A)))))))))))))))){constructor(e){super(e),this.legendEnabled=!0,this._portals=new Map,this._layerToFootprint=new WeakMap,this.drawOrderField="cd_draworder",this.dynamicGroupLayer=new F({parent:this}),this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.footprintLayer=new K({parent:this}),this.itemNameField="cd_itemname",this.itemSourceField="cd_itemsource",this.itemTypeField="cd_itemtype",this.layers=new l.A([this.dynamicGroupLayer,this.footprintLayer]),this.maxScaleField="cd_maxscale",this.minScaleField="cd_minscale",this.orderBy=null,this.outFields=null,this.supportedPortalItemTypes=["Feature Service"],this.supportedSourceTypes=new Set(["Catalog Layer"]),this.source=new H.default({layer:this,supportedSourceTypes:this.supportedSourceTypes}),this.type="catalog",this.typeIdField=null,this.types=null}load(e){let t=null==e?null:e.signal,r=this.loadFromPortal({supportedTypes:this.supportedPortalItemTypes},e).catch(u.QP).then(async()=>{let{url:e,source:r}=this;if(!e)throw new o.A("catalog-layer:missing-url","Catalog layer must be created with a url");if(null==this.layerId){let r=await this._fetchFirstValidLayerId(t);if(null==r)throw new o.A("catalog-layer:missing-layerId","There is no Catalog Layer in the service",{service:e});this.layerId=r}await r.load({signal:t}),this._initLayerProperties(),this._verifyFields()}).then(()=>(0,se.VA)(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}destroy(){this.footprintLayer.destroy(),this.dynamicGroupLayer.destroy();for(let e of this._portals.values())e.destroy();this._portals.clear()}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return!1}async applyEdits(e,t){return(0,se.ct)(this,e,t)}async createLayerFromFootprint(e){let t=await this._createLayer(e);return this._configureLayer(t,e),this._layerToFootprint.set(t,e),t}createFootprintFromLayer(e){return this._layerToFootprint.get(e)?.clone()}createQuery(){let e=new he.A,t=this.capabilities?.query;e.returnGeometry=!0,t&&(e.compactGeometryEnabled=t.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=t.supportsDefaultSpatialReference),e.outFields=["*"];let{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e.where=this.definitionExpression||"1=1",e}getFeatureType(e){return(0,se.xd)(this.types,this.typeIdField,e)}getFieldDomain(e,t){let r=t?.feature,i=this.getFeatureType(r);if(i){let t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this.getField(e)?.domain}async reloadFromService(e){await this.source.reload({signal:e}),this._initLayerProperties(),this._verifyFields()}async hasDataChanged(){return(0,se.jp)(this)}async queryFeatures(e,t){let r=await this.load(),i=await r.source.queryFeatures(he.A.from(e)??r.createQuery(),t),n=r.footprintLayer.graphicOrigin;if(i?.features)for(let e of i.features)e.layer=e.sourceLayer=r.footprintLayer,e.origin=n;return i}async queryObjectIds(e,t){return(await this.load()).source.queryObjectIds(he.A.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){return(await this.load()).source.queryFeatureCount(he.A.from(e)??this.createQuery(),t)}async queryExtent(e,t){return(await this.load()).source.queryExtent(he.A.from(e)??this.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&(0,pe.D)(this,e)}read(e,t){if(super.read(e,t),e){let{footprintLayer:r,dynamicGroupLayer:i}=e;r&&this.footprintLayer.read(r,t),i&&this.dynamicGroupLayer.read(i,t)}}async queryAttributeBins(e,t){let{source:i,capabilities:n}=await this.load();(0,se.ZJ)(e,n,"CatalogLayer");let l=await r.e(6956).then(()=>r(14575)),o=await i.queryAttributeBins(l.default.from(e),t);if(o.features)for(let e of o.features)e.layer=e.sourceLayer=this.footprintLayer;return o}_initLayerProperties(){let{portalItem:e,source:t}=this,{sourceJSON:r}=t;r&&(this.sourceJSON=r,this.read(r,{origin:"service",portalItem:e,portal:e?.portal,url:this.parsedUrl}))}_verifyFields(){let e=[this.itemNameField,this.itemSourceField,this.itemTypeField,this.minScaleField,this.maxScaleField],t=e.filter(e=>!this.fieldsIndex.has(e));if(t.length)throw new o.A("catalog-layer:missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:t})}async _fetchFirstValidLayerId(e){let{data:t}=await(0,n.A)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(this.applyPreferredHost(t),Array.isArray(t?.layers))return t.layers.find(({type:e})=>!!e&&this.supportedSourceTypes.has(e))?.id}async _createLayer(e){let t=e.getAttribute(this.itemSourceField);if(!t)throw new o.A("catalog-layer:item-source-missing",`The footprint is missing the "${this.itemSourceField}" attribute`);let i=JSON.parse(t);if(function(e){return"object"==typeof e&&!!e&&"itemId"in e&&"portalUrl"in e}(i)){let e,{itemId:t,portalUrl:r}=i,n=(0,ye.qG)(r),l=this.portalItem?.portal,o=ce.A.getDefault(),s=!0;l&&(0,d.ut)(r,l.url)?e=l:(0,d.ut)(r,o.url)?e=o:(e=(0,a.tE)(this._portals,n,()=>new ce.A({url:n})),s=!1);let u=await c.A.fromPortalItem(new fe.default({id:t,portal:e}));return s||await be(u),u}if(function(e){return"object"==typeof e&&!!e&&"url"in e}(i))return c.A.fromArcGISServerUrl({url:i.url});let{default:n}=await r.e(7546).then(()=>r(45165));return new n}_configureLayer(e,t){let r=t.getAttribute(this.itemNameField);r&&(e.title=r);let i=t.getAttribute(this.maxScaleField);null!=i&&"maxScale"in e&&(e.maxScale=i);let n=t.getAttribute(this.minScaleField);null!=n&&"minScale"in e&&(e.minScale=n)}};async function be(e){if("portalItem"in e&&e.portalItem){try{await e.load()}catch{}e.portalItem=null,"group"===e.type&&await Promise.allSettled([...e.layers.map(e=>be(e)),...e.tables.map(e=>be(e))])}}(0,i.Cg)([(0,p.MZ)(C.fV)],ve.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"createQueryVersion",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"drawOrderField",void 0),(0,i.Cg)([(0,p.MZ)({type:F,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:ge}}})],ve.prototype,"dynamicGroupLayer",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"editingEnabled",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{name:"layerDefinition.elevationInfo",read:!1,write:!1}}}})],ve.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,p.MZ)({...me.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],ve.prototype,"fields",void 0),(0,i.Cg)([(0,p.MZ)(me.fieldsIndex)],ve.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{name:"layerDefinition.floorInfo",read:!1,write:!1}}}})],ve.prototype,"floorInfo",void 0),(0,i.Cg)([(0,p.MZ)({type:K,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:ge}}})],ve.prototype,"footprintLayer",void 0),(0,i.Cg)([(0,p.MZ)(C.id)],ve.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"itemNameField",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"itemSourceField",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"itemTypeField",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"layers",void 0),(0,i.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],ve.prototype,"listMode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"maxScaleField",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"minScaleField",void 0),(0,i.Cg)([(0,p.MZ)({value:"CatalogLayer",type:["CatalogLayer"]})],ve.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{name:"layerDefinition.orderBy",write:!0,read:!0}}}})],ve.prototype,"orderBy",void 0),(0,i.Cg)([(0,p.MZ)(me.outFields)],ve.prototype,"outFields",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"source",void 0),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],ve.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)({type:String})],ve.prototype,"typeIdField",void 0),(0,i.Cg)([(0,p.MZ)({type:[ue.A]})],ve.prototype,"types",void 0),ve=(0,i.Cg)([(0,p.$K)("esri.layers.CatalogLayer")],ve);const we=ve},47685(e,t,r){r.d(t,{Mk:()=>f,Zk:()=>p});var i=r(32198),n=r(65529),l=r(4718),o=r(91429),a=r(20816);const s=new n.bk;function u(e){return s.on("apply-edits",new WeakRef(e))}function d(e){return s.on("update-moment",new WeakRef(e))}function p(e,t,r=null,i=!1){let n=Promise.withResolvers();return i=null==t||i,s.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:n.promise}),n}const c=Symbol();function f(e){return"object"==typeof e&&!!e&&c in e}function y(e){return"object"==typeof e&&!!e&&"gdbVersion"in e}function h(e,t,r){let i=new URL(e).host,n=a.Z3.get(i),l=e=>!e||e===n;return l(t)&&l(r)||t===r}r.d(t,["w6",0,e=>{var t;let r=e,n=class extends r{static{t=c}constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{let{serviceUrl:t,layerId:r,gdbVersion:i,mayReceiveServiceEdits:n,result:o}=e,a=t===this.url,s=null!=r&&null!=this.layerId&&r===this.layerId,u=null!=r&&this.relationships?.some(e=>e.relatedTableId===r),d=y(this),p=y(this)&&h(t,i,this.gdbVersion);if(!a||d&&!p||!s&&!u&&!n)return;let c=o.then(e=>{if(this.lastEditsEventDate=new Date,s&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,l.o8)(e)),e;let r=e.editedFeatures?.find(({layerId:e})=>e===this.layerId);if(r){let{adds:t,updates:i,deletes:n}=r.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],deletedFeatures:n?n.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],updatedFeatures:i?i.map(({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],editedFeatures:(0,l.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,l.o8)(e.historicMoment)};return this.emit("edits",o),o}let n={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,l.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,l.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,n.historicMoment)&&this.emit("edits",n),n}).then(e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,e.historicMoment)&&(this.historicMoment=e.historicMoment),e));c.catch(()=>{}),this.emit("apply-edits",{result:c})},this._updateMomentHandler=e=>{let{serviceUrl:t,gdbVersion:r,moment:i}=e,n=t===this.url,l=y(this),o=y(this)&&h(t,r,this.gdbVersion),a=y(this)&&!h(t,this.gdbVersion,null);n&&l&&o&&a&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then(()=>{this.addHandles(u(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(d(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(e,t,r){return"historicMoment"in this&&this.historicMoment!==r&&(0,a.w5)(e,t)}};return(0,i.Cg)([(0,o.MZ)()],n.prototype,"lastEditsEventDate",void 0),n=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.EditBusLayer")],n),n}])},87718(e,t,r){r.d(t,{F:()=>Z,Y:()=>S});var i,n=r(32198),l=r(91429),o=r(49186),a=r(25482),s=r(93637),u=r(76369),d=r(66552),p=r(4718),c=r(50498),f=r(97552),y=r(79677);const h=new d.J({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),m=new d.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let g=i=class extends a.o{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){let{where:t,geometry:r,spatialRelationship:i,timeExtent:n,objectIds:l,units:o,distance:a}=this;return new f.A({geometry:(0,p.o8)(r),objectIds:(0,p.o8)(l),spatialRelationship:i,timeExtent:(0,p.o8)(n),where:t,units:o,distance:a,...e})}clone(){let{where:e,geometry:t,spatialRelationship:r,timeExtent:n,objectIds:l,units:o,distance:a}=this;return new i({geometry:(0,p.o8)(t),objectIds:(0,p.o8)(l),spatialRelationship:r,timeExtent:(0,p.o8)(n),where:e,units:o,distance:a})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],g.prototype,"where",void 0),(0,n.Cg)([(0,l.MZ)({types:c.yR,json:{write:!0}})],g.prototype,"geometry",void 0),(0,n.Cg)([(0,l.MZ)({type:h.apiValues,json:{name:"spatialRel",read:{reader:h.read},write:{allowNull:!1,writer:h.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],g.prototype,"spatialRelationship",void 0),(0,n.Cg)([(0,l.MZ)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],g.prototype,"distance",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],g.prototype,"objectIds",void 0),(0,n.Cg)([(0,l.MZ)({type:m.apiValues,json:{read:m.read,write:{writer:m.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],g.prototype,"units",void 0),(0,n.Cg)([(0,l.MZ)({type:y.A,json:{write:!0}})],g.prototype,"timeExtent",void 0),g=i=(0,n.Cg)([(0,l.$K)("esri.layers.support.FeatureFilter")],g);const v=g;var b;const w={read:{reader:u.LF},write:{writer:u.M9,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},C={read:{reader:u.LF},write:{writer:u.M9,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},M={name:"showExcludedLabels",default:!0};let x=b=class extends a.o{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){let r=super.write(e,t);if(t?.origin){if(r.filter){let e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new o.A("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new o.A("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new b({filter:null==this.filter?null:this.filter.clone(),includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,n.Cg)([(0,l.MZ)({type:v,json:{write:{allowNull:!0,writer(e,t,r,i){let n=e?.write({},i);n&&0!==Object.keys(n).length?(0,s.sM)(r,n,t):(0,s.sM)(r,null,t)}}}})],x.prototype,"filter",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:u.LF,write:{writer:u.M9,allowNull:!0},origins:{"web-map":w,"portal-item":w}}})],x.prototype,"includedEffect",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:u.LF,write:{writer:u.M9,allowNull:!0},origins:{"web-map":C,"portal-item":C}}})],x.prototype,"excludedEffect",void 0),(0,n.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":M,"portal-item":M}}})],x.prototype,"excludedLabelsVisible",void 0),x=b=(0,n.Cg)([(0,l.$K)("esri.layers.support.FeatureEffect")],x);const F={write:{allowNull:!0}},S={type:x,json:{origins:{"web-map":F,"portal-item":F}}},Z=e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.featureEffect=null}};return(0,n.Cg)([(0,l.MZ)(S)],r.prototype,"featureEffect",void 0),r=(0,n.Cg)([(0,l.$K)("esri.layers.mixins.FeatureEffectLayer")],r),r}},32756(e,t,r){r.d(t,{Rr:()=>a});var i=r(32198),n=r(93637),l=r(91429),o=r(91880);function a(e,t,r){if(!e)return null;let i=e.find(e=>!!e.field);if(!i)return null;let n=new o.A;return n.read(i,r),[n]}const s={type:[o.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,i){let l=e.find(e=>!!e.field);l&&(0,n.sM)(r,[l.toJSON()],t)}}}};r.d(t,["fY",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,l.MZ)(s)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,l.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,s])},29005(e,t,r){r.d(t,{A:()=>u});var i=r(32198),n=r(69540),l=r(66552),o=r(25482),a=r(91429);const s=new l.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:s.read,write:s.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,a.$K)("esri.layers.support.FeatureTemplate")],u)},33143(e,t,r){r.d(t,{A:()=>p});var i=r(32198),n=r(69540),l=r(25482),o=r(91429),a=r(8631),s=r(29005),u=r(36005),d=r(43937);let p=class extends((0,n.OU)(l.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){let t={};for(let r of Object.keys(e))t[r]=(0,a.r)(e[r]);return t}writeDomains(e,t){let r={};for(let t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"id",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"domains",void 0),(0,i.Cg)([(0,u.w)("domains")],p.prototype,"readDomains",null),(0,i.Cg)([(0,d.K)("domains")],p.prototype,"writeDomains",null),(0,i.Cg)([(0,o.MZ)({type:[s.A],json:{write:!0}})],p.prototype,"templates",void 0),p=(0,i.Cg)([(0,o.$K)("esri.layers.support.FeatureType")],p)},30279(e,t,r){r.d(t,{A:()=>u});var i=r(32198),n=r(69540),l=r(25482),o=r(10107),a=r(64108),s=r(39663);let u=class extends((0,n.OU)(l.o)){constructor(e){super(e),this.alias=null,this.name=void 0,this.fieldFormat=null}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"alias",void 0),(0,i.Cg)([(0,o.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0}}})],u.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({types:s.fg,json:{write:!0}})],u.prototype,"fieldFormat",void 0),u=(0,i.Cg)([(0,a.$)("esri.layers.support.FieldConfiguration")],u)},46499(e,t,r){r.d(t,{A:()=>F});var i,n,l=r(32198),o=(r(44208),r(66552)),a=r(25482),s=r(4718),u=r(90629),d=r(91429),p=r(90360),c=r(73913),f=r(32730),y=r(77548),h=r(59868),m=r(73838),g=r(33910),v=r(36005),b=r(43937);const w=new o.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function C(e,t,r){return{enabled:!(0,y.TU)(r?.layer)}}function M(e){return!e||"service"!==e.origin&&"map-image"!==e.layer?.type}function x(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let F=class extends a.o{static{i=f.vK}static{n=this}static evaluateWhere(e,t){let 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;let i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){let e=r(t[i[0]],i[1],i[2]),n=i[3],l=r(t[i[4]],i[5],i[6]);switch(n){case"AND":return e&&l;case"OR":return e||l}}return!1}catch{}}constructor(e){super(e),this[i]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.offsetDistance=0,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=h.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){let 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.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){let t=(0,f.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&M(i))e=new c.A({expression:this.getLabelExpressionArcade()});else if(!e)return;let n=e.toJSON(i);n.expression&&(t[r]=n)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,f.XJ)(this)}getLabelExpressionArcade(){return(0,f.BI)(this)}getLabelExpressionSingleField(){return(0,f.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new n({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,s.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,offsetDistance:this.offsetDistance,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,s.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,l.Cg)([(0,d.MZ)({type:String,json:{write:!0}})],F.prototype,"name",void 0),(0,l.Cg)([(0,d.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:C}}}}})],F.prototype,"allowOverrun",void 0),(0,l.Cg)([(0,d.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:C}}}}})],F.prototype,"deconflictionStrategy",void 0),(0,l.Cg)([(0,d.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&x(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],F.prototype,"labelExpression",void 0),(0,l.Cg)([(0,v.w)("labelExpression")],F.prototype,"readLabelExpression",null),(0,l.Cg)([(0,b.K)("labelExpression")],F.prototype,"writeLabelExpression",null),(0,l.Cg)([(0,d.MZ)({type:c.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return M(e)||x(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],F.prototype,"labelExpressionInfo",void 0),(0,l.Cg)([(0,b.K)("labelExpressionInfo")],F.prototype,"writeLabelExpressionInfo",null),(0,l.Cg)([(0,d.MZ)({type:w.apiValues,json:{type:w.jsonValues,read:w.read,write:w.write}})],F.prototype,"labelPlacement",void 0),(0,l.Cg)([(0,d.MZ)({type:Number,json:{read:!0,write:!0,default:0,origins:{"web-scene":{write:!1}}}})],F.prototype,"offsetDistance",void 0),(0,l.Cg)([(0,d.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],F.prototype,"labelPosition",void 0),(0,l.Cg)([(0,d.MZ)({type:Number})],F.prototype,"maxScale",void 0),(0,l.Cg)([(0,b.K)("maxScale")],F.prototype,"writeMaxScale",null),(0,l.Cg)([(0,d.MZ)({type:Number})],F.prototype,"minScale",void 0),(0,l.Cg)([(0,b.K)("minScale")],F.prototype,"writeMinScale",null),(0,l.Cg)([(0,d.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:C}}}}})],F.prototype,"repeatLabel",void 0),(0,l.Cg)([(0,d.MZ)({type:Number,cast:u.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:C}}}}})],F.prototype,"repeatLabelDistance",null),(0,l.Cg)([(0,d.MZ)({types:g.em,json:{types:g.em,origins:{"portal-item":{types:g.em,read:{reader:(0,p.C)({types:g.em})},default:null},"web-scene":{types:g.Rv,read:{reader:(0,p.C)({types:g.Rv})},write:m.oO,default:null}},write:m.oO,default:null}})],F.prototype,"symbol",void 0),(0,l.Cg)([(0,d.MZ)({type:Boolean,json:{write:!0}})],F.prototype,"useCodedValues",void 0),(0,l.Cg)([(0,d.MZ)({type:String,json:{write:!0}})],F.prototype,"where",void 0),F=n=(0,l.Cg)([(0,d.$K)("esri.layers.support.LabelClass")],F)},73913(e,t,r){r.d(t,{A:()=>d});var i,n=r(32198),l=r(25482),o=r(91429),a=r(32730),s=r(36005),u=r(43937);let d=class extends l.o{static{i=this}constructor(e){super(e),this.name=null,this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,a.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,a.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({name:this.name,expression:this.expression,title:this.title,value:this.value})}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],d.prototype,"name",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],d.prototype,"expression",void 0),(0,n.Cg)([(0,s.w)("expression",["expression","value"])],d.prototype,"readExpression",null),(0,n.Cg)([(0,u.K)("expression")],d.prototype,"writeExpression",null),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],d.prototype,"title",void 0),(0,n.Cg)([(0,o.MZ)({json:{read:!1,write:!1}})],d.prototype,"value",void 0),d=i=(0,n.Cg)([(0,o.$K)("esri.layers.support.LabelExpressionInfo")],d)},91880(e,t,r){r.d(t,{A:()=>u});var i,n=r(32198),l=r(66552),o=r(25482),a=r(91429);const s=new l.J({asc:"ascending",desc:"descending"});let u=class extends o.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,n.Cg)([(0,a.MZ)({type:s.apiValues,json:{type:s.jsonValues,read:s.read,write:s.write}})],u.prototype,"order",void 0),u=i=(0,n.Cg)([(0,a.$K)("esri.layers.support.OrderByInfo")],u)},41560(e,t,r){r.d(t,{Ch:()=>o,mW:()=>l});var i=r(34727),n=r(39516);function l(e,t){return{...t,filterMode:e.mode}}function o(e,t,r){let l=function(e){if("manual"===u(e))return null;let t=[-1/0,1/0];for(let{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],d(r)),t[1]=Math.min(t[1],p(i));return t}(e);if(l&&((0,i.gg)(t,l[0])||(0,i.ZH)(r,l[1])))return"";let o=Array.from(a(e,t,r)),s=function(e,t,r){if(0===e.length)return!0;let n=d(e.at(0)?.minScale),l=p(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(l,r))return!0;for(let t=0;t<e.length-1;t++){let r=e[t],n=e[t+1];if((0,i.ZH)(d(n.minScale),p(r.maxScale)))return!0}return!1}(o,t,r)?"1=1":o.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return s&&"1=1"!==s?s:""}function*a(e,t,r){if("manual"===u(e)){let t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(let i of e.filters)s(i.minScale,i.maxScale,t,r)&&(yield i)}}function s(e,t,r,n){return e=d(e),r=d(r),t=p(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function d(e){return e||1/0}function p(e){return e||0}},16194(e,t,r){r.d(t,{QX:()=>s,sS:()=>d,xY:()=>u});var i=r(4718),n=r(30279),l=r(39663),o=r(30524),a=r(41227);function s(e){let{popupTemplate:t,fieldsIndex:r}=e,i=t?.fieldInfos;if(!i?.length||!r)return;let o=[];for(let e of i){let{fieldName:t,label:i}=e,a=r.get(t);if(!a)continue;let s=i&&i!==a.alias?i:null,u=(0,l.iu)(e,a);(s||u)&&o.push(new n.A({name:a.name,alias:s,fieldFormat:u}))}return o.length?o:null}function u(e){let{fields:t}=e;if(!t?.length)return;let r=[];for(let e of t){let t=(0,l.qH)(e)?(0,l.$P)(e):null;t&&r.push(new n.A({name:e.name,fieldFormat:t}))}return r.length?r:null}function d(e,t){let{popupTemplate:r,fieldsIndex:n}=e;if(!r||!n)return;let o=function(e,t,r){t??=[],r=(0,i.o8)(r)??[];let n=!1,o=new Map;for(let r of t){let t=e.fieldsIndex.get(r.name);t&&o.set(t.name,r)}for(let t of r){let r=e.fieldsIndex.get(t.fieldName);if(!r)continue;let i=o.get(r.name);t.label=i?.alias||r.alias,t.format=(0,l.qH)(r)&&i?.fieldFormat?(0,l.PK)(i.fieldFormat,r):null,n=!0,o.delete(r.name)}for(let t of o.values()){let i=p(e,t);i&&(r.push(i),n=!0)}return n?r:null}(e,t,r.fieldInfos);if(!o)return;let a=r.clone();return a.fieldInfos=o,a}function p(e,t){let{name:r,alias:i,fieldFormat:n}=t,s=e.fieldsIndex.get(r);if(!s||!i&&!n)return;let u=i||s.alias,d=(0,l.qH)(s)&&n?(0,l.PK)(n,s):null;return new a.A({fieldName:s.name,label:u,format:d,visible:!1,isEditable:(0,o.R$)(s,e)})}},39383(e,t,r){r.d(t,{w:()=>s,z:()=>p});var i=r(49186),n=r(53966),l=r(46499);const o=()=>n.A.getLogger("esri.layers.support.labelingInfo"),a=/\[([^[\]]+)\]/gi;function s(e,t,r){return e?e.map(e=>{let i=new l.A;if(i.read(e,r),i.labelExpression){let e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(a,(t,r)=>`[${function(e,t){if(!t)return e;let r=e.toLowerCase();for(let e=0;e<t.length;e++){let i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`)}return i}):null}const u=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],d={esriGeometryPoint:u,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:u,esriGeometryEnvelope:null};function p(e,t){let r=[];for(let n of e){let e=n.labelPlacement,l=d[t];if(!n.symbol)return o().warn("No ILabelClass symbol specified."),[];if(!l)return o().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(l.includes(e))r.push(n);else{let i=l[0];e&&o().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${i}`);let a=n.clone();a.labelPlacement=i,r.push(a)}}return r}},73681(e,t,r){r.d(t,{n:()=>s});var i=r(49186),n=r(53966),l=r(46140),o=r(95466),a=r(55674);class s{static async from(e,t,r){let o=e.dictionary_version?l.A.parse(e.dictionary_version):null,d=new Set(e.itemsNames),p={};if(t)for(let e in t)p[e]=t[e];if(e.authoringInfo.configuration)for(let t of e.authoringInfo.configuration)p.hasOwnProperty(t.name)||(p[t.name]=t.value);let c=new Set(e.authoringInfo.symbol);for(let e of Object.keys(r))c.delete(e);c.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:c});let f=await(0,a.xR)(e.expression,null,p);if(!f)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");let y=!o||!o.greaterEqual(4,0);y&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});let h=new u(r,y);return new s(y,d,f,h)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);let t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){let t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);let t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},96520(e,t,r){r.d(t,{u:()=>s});var i=r(86211),n=r(21325),l=r(52006);function o(e,t,r){if(null==e.hasM||e.hasZ)for(let e of t)for(let t of e)t.length>2&&(t[2]*=r)}function a(e,t,r){if(null==e.hasM||e.hasZ)for(let e of t)for(let t of e){let e=(0,l.yP)(t);e.length>2&&(e[2]*=r)}}function s(e,t,r){if(!e&&!t||!r)return;let n=(0,i.G9)(r);u(e,r,n),u(t,r,n)}function u(e,t,r){if(e)for(let i of e)d(i.geometry,t,r)}function d(e,t,r){if(!e?.spatialReference||(0,n.aI)(e.spatialReference,t))return;let l=(0,i.G9)(e.spatialReference)/r;if(1!==l)if("x"in e)null!=e.z&&(e.z*=l);else if("curveRings"in e)a(e,e.curveRings,l);else if("curvePaths"in e)a(e,e.curvePaths,l);else if("rings"in e)o(e,e.rings,l);else if("paths"in e)o(e,e.paths,l);else if("points"in e&&(null==e.hasM||e.hasZ))for(let t of e.points)t.length>2&&(t[2]*=l)}},9760(e,t,r){r.d(t,{A:()=>d});var i=r(32198),n=r(66552),l=r(25482),o=r(91429),a=r(93223);const s=new n.J({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),u=new n.J({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let d=class extends l.o{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,i.Cg)([(0,a.e)({classBreaksDef:"class-breaks-definition"})],d.prototype,"type",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],d.prototype,"breakCount",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],d.prototype,"classificationField",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{read:s.read,write:s.write}})],d.prototype,"classificationMethod",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],d.prototype,"normalizationField",void 0),(0,i.Cg)([(0,o.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"normalizationType",void 0),(0,i.Cg)([(0,o.MZ)({value:null,json:{write:!0}})],d.prototype,"standardDeviationInterval",null),(0,i.Cg)([(0,o.MZ)({value:null,json:{write:!0}})],d.prototype,"definedInterval",null),d=(0,i.Cg)([(0,o.$K)("esri.rest.support.ClassBreaksDefinition")],d)},22671(e,t,r){r.d(t,{A:()=>v});var i,n=r(32198),l=r(52106),o=r(66552),a=r(25482),s=r(4718),u=r(91429),d=r(16930),p=r(60408),c=r(65864),f=r(50498),y=r(20437),h=r(36005),m=r(43937);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends a.o{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){return this.readFeaturesWithClass(e,t,l.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);let{features:n}=this;if(n)for(let e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,c.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=d.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,s.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,n]}=e,l=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=l.length;e<t;e++)o?.(l[e].geometry)||(l.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,n],scale:[l,o]}=r,a=null,s=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;s=r=>null==r?r:r*t+e}let u=this._getHydrationFunction(e,e=>e*l+i,e=>n-e*o,a,s);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=d.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){let l=e[t],o=r.fromJSON(l),a=l.geometry?.spatialReference;null!=o.geometry&&!a&&(o.geometry.spatialReference=i);let s=l.aggregateGeometries,u=o.aggregateGeometries;if(s&&null!=u)for(let e in u){let t=u[e],r=s[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}n.push(o)}return n}_quantizePoints(e,t,r){let i,n,l=[];for(let o=0,a=e.length;o<a;o++){let a=e[o];if(o>0){let e=t(a[0]),o=r(a[1]);(e!==i||o!==n)&&(l.push([e-i,o-n]),i=e,n=o)}else i=t(a[0]),n=r(a[1]),l.push([i,n])}return l.length>0?l: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=>{let i=(0,p.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,l=i.length;e<l;e++){let l=i[e],o=this._quantizePoints(l,t,r);o&&n.push(o)}return n.length>0?((0,p.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let l,o,a=(0,p.Bi)(e)?e.rings:e.paths;for(let e=0,i=a.length;e<i;e++){let i=a[e];for(let e=0,n=i.length;e<n;e++){let n=i[e];e>0?(l+=n[0],o+=n[1]):(l=n[0],o=n[1]),n[0]=t(l),n[1]=r(o)}}if(i&&n)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{let l,o,a=e.points;for(let e=0,i=a.length;e<i;e++){let i=a[e];e>0?(l+=i[0],o+=i[1]):(l=i[0],o=i[1]),i[0]=t(l),i[1]=r(o)}if(i&&n)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=i(t[2])}else if(n)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[l.A],json:{write:!0}})],v.prototype,"features",void 0),(0,n.Cg)([(0,h.w)("features")],v.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[y.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,n.Cg)([(0,m.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:f.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,h.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:d.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,n.Cg)([(0,m.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,n.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},84892(e,t,r){r.d(t,{t:()=>l});var i=r(53966);function n(e,t){return Number(e.toFixed(t))}function l(e,t){let{normalizationTotal:r}=e;return{classBreaks:o(e,t),normalizationTotal:r}}function o(e,t){let r=e.definition,{classificationMethod:i,normalizationType:l,definedInterval:o}=r,u=r.breakCount??1,d=[],p=e.values;if(0===p.length)return[];p=p.sort((e,t)=>e-t);let[c,f]=t??[p.at(0),p.at(-1)];if("equal-interval"===i)if(p.length>=u){let e=(f-c)/u,t=c;for(let r=1;r<u;r++){let i=n(c+r*e,6);d.push({minValue:t,maxValue:i,label:a(t,i,l)}),t=i}d.push({minValue:t,maxValue:f,label:a(t,f,l)})}else p.forEach(e=>{d.push({minValue:e,maxValue:e,label:a(e,e,l)})});else if("natural-breaks"===i){let t=function(e){let t=[],r=[],i=Number.MIN_VALUE,n=1,l=-1;for(let o=0;o<e.length;o++){let a=e[o];a===i?(n++,r[l]=n):null!==a&&(t.push(a),i=a,n=1,r.push(n),l++)}return{uniqueValues:t,valueFrequency:r}}(p),r=e.valueFrequency||t.valueFrequency,i=s(t.uniqueValues,r,u),o=c;for(let e=1;e<u;e++)if(t.uniqueValues.length>e){let r=n(t.uniqueValues[i[e]],6);d.push({minValue:o,maxValue:r,label:a(o,r,l)}),o=r}d.push({minValue:o,maxValue:f,label:a(o,f,l)})}else if("quantile"===i)if(p.length>=u&&c!==f){let e=c,t=Math.ceil(p.length/u),r=0;for(let i=1;i<u;i++){let n=t+r-1;n>p.length&&(n=p.length-1),n<0&&(n=0),d.push({minValue:e,maxValue:p[n],label:a(e,p[n],l)}),e=p[n],r+=t,t=Math.ceil((p.length-r)/(u-i))}d.push({minValue:e,maxValue:f,label:a(e,f,l)})}else{let e=-1;for(let t=0;t<p.length;t++){let r=p[t];r!==e&&(e=r,d.push({minValue:e,maxValue:r,label:a(e,r,l)}),e=r)}}else if("standard-deviation"===i){let e=function(e){let t=0;for(let r=0;r<e.length;r++)t+=e[r];return t/=e.length,t}(p),t=function(e,t){let r=0;for(let i=0;i<e.length;i++){let n=e[i];r+=(n-t)*(n-t)}return r/=e.length,Math.sqrt(r)}(p,e);if(0===t)d.push({minValue:p[0],maxValue:p[0],label:a(p[0],p[0],l)});else{let r=function(e,t,r,i,n){let l=Math.max(i-e,t-i)/n/r;return l=l>=1?1:l>=.5?.5:.25,l}(c,f,u,e,t)*t,i=0,o=c;for(let t=u;t>=1;t--){let s=n(e-(t-.5)*r,6);d.push({minValue:o,maxValue:s,label:a(o,s,l)}),o=s,i++}let s=n(e+.5*r,6);d.push({minValue:o,maxValue:s,label:a(o,s,l)}),o=s,i++;for(let t=1;t<=u;t++)s=i===2*u?f:n(e+(t+.5)*r,6),d.push({minValue:o,maxValue:s,label:a(o,s,l)}),o=s,i++}}else if("defined-interval"===i){if(!o)return d;let[e,r]=t??[p.at(0),p.at(-1)],i=Math.ceil((r-e)/o),s=e;for(let t=1;t<i;t++){let r=n(e+t*o,6);d.push({minValue:s,maxValue:r,label:a(s,r,l)}),s=r}d.push({minValue:s,maxValue:r,label:a(s,r,l)})}return d}function a(e,t,r){let i=null;return i=e===t?r&&"percent-of-total"===r?e+"%":e.toString():r&&"percent-of-total"===r?e+"% - "+t+"%":e+" - "+t,i}function s(e,t,r){let i=e.length,n=[];r>i&&(r=i);for(let e=0;e<r;e++)n.push(Math.round(e*i/r-1));n.push(i-1);let l=u(n,e,t,r);return function(e,t,r,i,n,l){let o=0,a=0,s=0,u=0,p=!0;for(let c=0;c<2&&p;c++){0===c&&(p=!1);for(let c=0;c<l-1;c++)for(;r[c+1]+1!==r[c+2];){r[c+1]=r[c+1]+1;let l=d(c,r,i,n);s=l.sbMean,o=l.sbSdcm;let f=d(c+1,r,i,n);if(u=f.sbMean,a=f.sbSdcm,!(o+a<t[c]+t[c+1])){r[c+1]=r[c+1]-1;break}t[c]=o,t[c+1]=a,e[c]=s,e[c+1]=u,p=!0}for(let c=l-1;c>0;c--)for(;r[c]!==r[c-1]+1;){r[c]=r[c]-1;let l=d(c-1,r,i,n);s=l.sbMean,o=l.sbSdcm;let f=d(c,r,i,n);if(u=f.sbMean,a=f.sbSdcm,!(o+a<t[c-1]+t[c])){r[c]=r[c]+1;break}t[c-1]=o,t[c]=a,e[c-1]=s,e[c]=u,p=!0}}return p}(l.mean,l.sdcm,n,e,t,r)&&(l=u(n,e,t,r)),n}function u(e,t,r,i){let n=[],l=[],o=[],a=0,s=[],u=[];for(let n=0;n<i;n++){let i=d(n,e,t,r);s.push(i.sbMean),u.push(i.sbSdcm),a+=u[n]}let p,c=a,f=!0;for(;f||a<c;){f=!1,n=[];for(let t=0;t<i;t++)n.push(e[t]);for(let r=0;r<i;r++)for(let n=e[r]+1;n<=e[r+1];n++)if(p=t[n],r>0&&n!==e[r+1]&&Math.abs(p-s[r])>Math.abs(p-s[r-1]))e[r]=n;else if(r<i-1&&e[r]!==n-1&&Math.abs(p-s[r])>Math.abs(p-s[r+1])){e[r+1]=n-1;break}c=a,a=0,l=[],o=[];for(let n=0;n<i;n++){l.push(s[n]),o.push(u[n]);let i=d(n,e,t,r);s[n]=i.sbMean,u[n]=i.sbSdcm,a+=u[n]}}if(a>c){for(let t=0;t<i;t++)e[t]=n[t],s[t]=l[t],u[t]=o[t];a=c}return{mean:s,sdcm:u}}function d(e,t,r,n){let l=0,o=0;for(let i=t[e]+1;i<=t[e+1];i++){let e=n[i];l+=r[i]*e,o+=e}o<=0&&i.A.getLogger("esri.rest.support.generateRendererUtils").warn("Exception in Natural Breaks calculation");let a=l/o,s=0;for(let i=t[e]+1;i<=t[e+1];i++)s+=n[i]*(r[i]-a)**2;return{sbMean:a,sbSdcm:s}}},1873(e,t,r){r.d(t,{$y:()=>O,Ak:()=>V,FM:()=>y,G_:()=>c,Rw:()=>A,Vb:()=>d,b3:()=>E,gJ:()=>u,jM:()=>_,lv:()=>j,oZ:()=>I,qg:()=>f,sU:()=>P,z9:()=>p,zS:()=>L});var i=r(9760),n=r(84892);const l=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,o=new Set(["esriFieldTypeDate","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeOID","esriFieldTypeBigInteger"]),a=new Set(["esriFieldTypeTimeOnly","esriFieldTypeDateOnly"]),s=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function u(e){return null==e||"string"==typeof e&&!e?"<Null>":e}function d(e){let t=null!=e.normalizationField||null!=e.normalizationType,r=null!=e.minValue||null!=e.maxValue,i=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!r&&!i}function p(e){let{outStatisticTypes:t}=e,r=e.returnDistinct?[...new Set(e.values)]:e.values,i=r.filter(e=>null!=e).sort(),n=i.length,l={count:n,min:i[0],max:i[n-1]};return e.supportsNullCount&&(l.nullcount=r.length-n),e.percentileParams&&(!t?.include?.length||t.include.includes("median"))&&(!t?.exclude?.length||!t.exclude.includes("median"))&&(l.median=f(r,e.percentileParams)),l}function c(e){let{values:t,useSampleStdDev:r,supportsNullCount:i,outStatisticTypes:n}=e,l=1/0,o=-1/0,a=null,s=null,u=null,d=null,p=0,c=null==e.minValue?-1/0:e.minValue,y=null==e.maxValue?1/0:e.maxValue;for(let e of t)Number.isFinite(e)?e>=c&&e<=y&&(a=null===a?e:a+e,l=Math.min(l,e),o=Math.max(o,e),p++):"string"==typeof e&&p++;if(p&&null!=a){s=a/p;let e=0;for(let r of t)Number.isFinite(r)&&r>=c&&r<=y&&(e+=(r-s)**2);d=r?p>1?e/(p-1):0:p>0?e/p:0,u=Math.sqrt(d)}else l=null,o=null;let h={avg:s,count:p,max:o,min:l,stddev:u,sum:a,variance:d};return i&&(h.nullcount=t.length-p),e.percentileParams&&(!n?.include?.length||n.include.includes("median"))&&(!n?.exclude?.length||!n.exclude.includes("median"))&&(h.median=f(t,e.percentileParams)),h}function f(e,t){let{fieldType:r,value:i,orderBy:n,isDiscrete:l}=t,o=y(r,"desc"===n,"case-insensitive");if(e=[...e].filter(e=>null!=e).sort((e,t)=>o(e,t)),0===e.length)return null;if(i<=0)return e[0];if(i>=1)return e[e.length-1];let a=(e.length-1)*i,s=Math.floor(a),u=s+1,d=a%1,p=e[s],c=e[u];return u>=e.length||l||"string"==typeof p||"string"==typeof c?p:p*(1-d)+c*d}function y(e,t,r="case-sensitive"){if(e){if(o.has(e))return S(t);if(a.has(e))return M(t,!0);if("esriFieldTypeTimestampOffset"===e)return function(e){return e?b:v}(t);let i=M(t,"case-sensitive"===r);if("esriFieldTypeString"===e)return i;if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e)return(e,t)=>i(Z(e),Z(t))}let i=t?1:-1,n=S(t),l=M(t,"case-sensitive"===r),s=g(t);return(e,t)=>"number"==typeof e&&"number"==typeof t?n(e,t):"string"==typeof e&&"string"==typeof t?l(e,t):s(e,t)??i}const h=(e,t)=>null==e?null==t?0:1:null==t?-1:null,m=(e,t)=>null==e?null==t?0:-1:null==t?1:null;function g(e){return e?h:m}const v=(e,t)=>m(e,t)??(e===t?0:new Date(e).getTime()-new Date(t).getTime()),b=(e,t)=>h(e,t)??(e===t?0:new Date(t).getTime()-new Date(e).getTime()),w=(e,t)=>m(e,t)??(e===t?0:e<t?-1:1),C=(e,t)=>h(e,t)??(e===t?0:e<t?1:-1);function M(e,t){if(t)return e?C:w;let r=g(e);return e?(e,t)=>r(e,t)??((e=e.toUpperCase())>(t=t.toUpperCase())?-1:+(e<t)):(e,t)=>r(e,t)??((e=e.toUpperCase())<(t=t.toUpperCase())?-1:+(e>t))}const x=(e,t)=>h(e,t)??t-e,F=(e,t)=>m(e,t)??e-t;function S(e){return e?x:F}function Z(e){return e.slice(24,36)+e.slice(19,23)+e.slice(16,18)+e.slice(14,16)+e.slice(11,13)+e.slice(9,11)+e.slice(6,8)+e.slice(4,6)+e.slice(2,4)+e.slice(0,2)}function I(e,t,r){let i;for(i in e)t?.include?.length&&!t.include.includes(i)||t?.exclude?.length&&t.exclude.includes(i)?delete e[i]:s.includes(i)&&(Number.isFinite(e[i])||(e[i]=null));return r&&["avg","stddev","variance"].forEach(t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]??0))}),e}function E(e){let t={};for(let r of e)(null==r||"string"==typeof r&&""===r.trim())&&(r=null),null==t[r]?t[r]={count:1,data:r}:t[r].count++;return{count:t}}function T(e){return"coded-value"===e?.type?e.codedValues.map(e=>e.code):[]}function j(e,t,r,i){let n=e.count,l=[];if(r&&t){let e=[],r=T(t[0]);for(let n of r)if(t[1]){let r=T(t[1]);for(let l of r)if(t[2]){let r=T(t[2]);for(let t of r)e.push(`${u(n)}${i}${u(l)}${i}${u(t)}`)}else e.push(`${u(n)}${i}${u(l)}`)}else e.push(n);for(let t of e)n.hasOwnProperty(t)||(n[t]={data:t,count:0})}for(let e in n){let t=n[e];l.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:l}}function L(e,t,r,i){let n=null;switch(t){case"log":0!==e&&(n=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(i)&&0!==i&&(n=e/i*100);break;case"field":Number.isFinite(r)&&0!==r&&(n=e/r);break;case"natural-log":e>0&&(n=Math.log(e));break;case"square-root":e>0&&(n=e**.5)}return n}function A(e,t,r){let l=function(e){let{breakCount:t,field:r,normalizationField:n,normalizationType:l}=e,o=e.classificationMethod||"equal-interval",a="standard-deviation"===o?e.standardDeviationInterval||1:void 0,s="defined-interval"===o?e.definedInterval:void 0;return new i.A({breakCount:t,classificationField:r,classificationMethod:o,normalizationField:"field"===l?n:void 0,normalizationType:l,standardDeviationInterval:a,definedInterval:s})}({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,definedInterval:t.definedInterval,breakCount:t.numClasses||5});return e=function(e,t,r){let i=t??-1/0,n=r??1/0;return e.filter(e=>Number.isFinite(e)&&e>=i&&e<=n)}(e,t.minValue,t.maxValue),(0,n.t)({definition:l,values:e,normalizationTotal:t.normalizationTotal},r)}function _(e,t){let r=e.classBreaks,i=r.length,n=r[0]?.minValue,o=r[i-1]?.maxValue,a="standard-deviation"===t,s=l;return r=r.map(e=>{let t=e.label,r={minValue:e.minValue,maxValue:e.maxValue,label:t};if(a&&t){let e=t.match(s)?.map(e=>+e.trim())??[];2===e.length?(r.minStdDev=e[0],r.maxStdDev=e[1],e[0]<0&&e[1]>0&&(r.hasAvg=!0)):1===e.length&&(t.includes("<")?(r.minStdDev=null,r.maxStdDev=e[0]):t.includes(">")&&(r.minStdDev=e[0],r.maxStdDev=null))}return r}),{minValue:n,maxValue:o,classBreakInfos:r,normalizationTotal:e.normalizationTotal}}function O(e,t){let r=P(e,t);if(null==r.min&&null==r.max)return{bins:[],minValue:r.min,maxValue:r.max,normalizationTotal:t.normalizationTotal};let i=r.intervals,n=r.min??0,l=r.max??0,o=i.map((e,t)=>({minValue:i[t][0],maxValue:i[t][1],count:0}));for(let t of e)if(null!=t&&t>=n&&t<=l){let e=V(i,t);e>-1&&o[e].count++}return{bins:o,minValue:n,maxValue:l,normalizationTotal:t.normalizationTotal}}function P(e,t,r=!1){let{field:i,classificationMethod:n,standardDeviationInterval:l,definedInterval:o,normalizationType:a,normalizationField:s,normalizationTotal:u,minValue:p,maxValue:f}=t,y=t.numBins||10,h=null,m=null,g=null;if(n&&"equal-interval"!==n||a){let{classBreaks:t}=A(e,{field:i,normalizationType:a,normalizationField:s,normalizationTotal:u,classificationMethod:n,standardDeviationInterval:l,definedInterval:o,minValue:p,maxValue:f,numClasses:y},null!=p&&null!=f?[p,f]:void 0);h=t[0]?.minValue,m=t[t.length-1]?.maxValue,g=t.map(e=>[e.minValue,e.maxValue])}else{if(null!=p&&null!=f)h=p,m=f;else{let t=c({values:e,minValue:p,maxValue:f,useSampleStdDev:!a,supportsNullCount:d({normalizationType:a,normalizationField:s,minValue:p,maxValue:f})});h=t.min??null,m=t.max??null}g=function(e,t,r){let i,n=(t-e)/r,l=[],o=e;for(let e=1;e<=r;e++)i=o+n,i=Number(i.toFixed(16)),l.push([o,e===r?t:i]),o=i;return l}(h??0,m??0,y)}if(r&&g.length){let e=g.at(-1)[1];g.push([e,e])}return{min:h,max:m,intervals:g}}function V(e,t){let r=-1;for(let i=e.length-1;i>=0;i--)if(t>=e[i][0]){r=i;break}return r}},20816(e,t,r){r.d(t,{We:()=>a,ZJ:()=>s,w5:()=>u});var i=r(56507);const n=(0,r(13069).vD)(),l=new Map,o=new Map;async function a(e,t,r){if(!e||!r)return!1;if(!t)return!0;let n=new URL(e).host,o=l.get(n);if(!o){let t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,i.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function s(e,t,i=!1){if(!e||!t)return!0;let l=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(l)?.entries();if(a)for(let[e,o]of a)if(o.name===t){let t=!o.stack?.hasForwardEdits();if(!t&&i){let[{deleteForwardEdits:t},{default:i}]=await Promise.all([r.e(2186).then(()=>r(32186)),r.e(2558).then(()=>r(32558))]),a=await t(l,e,new i({sessionId:n,moment:o.moment}));return a.success&&o.stack?.clearForwardEdits(),a.success}return t}return!0}function u(e,t){if(!e)return!1;let r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=o.get(r)?.entries();if(i)for(let[e,r]of i)if(r.name===t)return"edit"===r.lockType;return!1}new Map,r.d(t,["TA",0,n,"Z3",0,l])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1588,6553],{79608(t,n,e){e.d(n,{A:()=>f});var r=e(32198),a=e(69540),i=e(91429);let o=class extends a.Pw{constructor(t){super(t),this.type="web-scene"}equals(t){return this.type===t.type}};(0,r.Cg)([(0,i.MZ)()],o.prototype,"type",void 0),o=(0,r.Cg)([(0,i.$K)("esri.analysis.support.AnalysisOriginWebScene")],o);const u=o;var s=e(69622),c=e(4902),l=e(25482);let h=0,f=class extends((0,l.T)((0,a.OU)((0,c.s)(s.A)))){constructor(t){super(t),this.id=`${Date.now().toString(16)}-analysis-${h++}`,this.origin=null}get parent(){return this._get("parent")}set parent(t){let n=this.parent;if(null!=n)switch(n.type){case"line-of-sight":case"dimension":case"viewshed":n.releaseAnalysis(this);break;case"2d":case"3d":n.analyses.includes(this)&&n.analyses.remove(this)}this._set("parent",t)}equals(t){return this.type===t.type}};(0,r.Cg)([(0,i.MZ)({type:String,constructOnly:!0,clonable:!1})],f.prototype,"id",void 0),(0,r.Cg)([(0,i.MZ)({clonable:!1,value:null})],f.prototype,"parent",null),(0,r.Cg)([(0,i.MZ)({types:{key:"type",base:null,typeMap:{"web-scene":u}}})],f.prototype,"origin",void 0),f=(0,r.Cg)([(0,i.$K)("esri.analysis.Analysis")],f)},91715(t,n,e){e.d(n,{xH:()=>i,N1:()=>u}),e(35522);var r=e(51850),a=e(71351);function i(t,n){return o(t)===o(n)}function o(t){if(null==t)return null;let n=null==t.layer?"":t.layer.id,e=null;return e=null==t.objectId?null!=t.layer&&"objectIdField"in t.layer&&null!=t.layer.objectIdField&&null!=t.attributes?t.attributes[t.layer.objectIdField]:t.uid:t.objectId,null==e?null:`o-${n}-${e}`}e(44208),e(58083),e(70328),e(77548),e(6867),e(49718),(0,r.vt)();const u={json:{write:{writer:function(t,n){null!=t?.layer?.objectIdField&&null!=t.attributes&&(n.feature={layerId:t.layer.id,objectId:t.attributes[t.layer.objectIdField]})},target:{"feature.layerId":{type:[Number,String],isRequired:!0},"feature.objectId":{type:[Number,String],isRequired:!0}}},origins:{"web-scene":{read:function(t){if(null!=t.layerId&&null!=t.objectId)return{uid:null,layer:{id:t.layerId,objectIdField:"ObjectId"},attributes:{ObjectId:t.objectId}}}}}},clonable:"reference"};(0,a.vt)(),(0,r.vt)()},80200(t,n,e){e.d(n,{d:()=>h});const r={Base64:0,Hex:1,String:2,Raw:3};function a(t,n){let e=(65535&t)+(65535&n);return(t>>16)+(n>>16)+(e>>16)<<16|65535&e}function i(t,n,e,r,i,o){return a(function(t,n){return t<<n|t>>>32-n}(a(a(n,t),a(r,o)),i),e)}function o(t,n,e,r,a,o,u){return i(n&e|~n&r,t,n,a,o,u)}function u(t,n,e,r,a,o,u){return i(n&r|e&~r,t,n,a,o,u)}function s(t,n,e,r,a,o,u){return i(n^e^r,t,n,a,o,u)}function c(t,n,e,r,a,o,u){return i(e^(n|~r),t,n,a,o,u)}function l(t,n){t[n>>5]|=128<<n%32,t[14+(n+64>>>9<<4)]=n;let e=1732584193,r=-271733879,i=-1732584194,l=271733878;for(let n=0;n<t.length;n+=16){let h=e,f=r,d=i,M=l;e=o(e,r,i,l,t[n],7,-680876936),l=o(l,e,r,i,t[n+1],12,-389564586),i=o(i,l,e,r,t[n+2],17,606105819),r=o(r,i,l,e,t[n+3],22,-1044525330),e=o(e,r,i,l,t[n+4],7,-176418897),l=o(l,e,r,i,t[n+5],12,1200080426),i=o(i,l,e,r,t[n+6],17,-1473231341),r=o(r,i,l,e,t[n+7],22,-45705983),e=o(e,r,i,l,t[n+8],7,1770035416),l=o(l,e,r,i,t[n+9],12,-1958414417),i=o(i,l,e,r,t[n+10],17,-42063),r=o(r,i,l,e,t[n+11],22,-1990404162),e=o(e,r,i,l,t[n+12],7,1804603682),l=o(l,e,r,i,t[n+13],12,-40341101),i=o(i,l,e,r,t[n+14],17,-1502002290),r=o(r,i,l,e,t[n+15],22,1236535329),e=u(e,r,i,l,t[n+1],5,-165796510),l=u(l,e,r,i,t[n+6],9,-1069501632),i=u(i,l,e,r,t[n+11],14,643717713),r=u(r,i,l,e,t[n],20,-373897302),e=u(e,r,i,l,t[n+5],5,-701558691),l=u(l,e,r,i,t[n+10],9,38016083),i=u(i,l,e,r,t[n+15],14,-660478335),r=u(r,i,l,e,t[n+4],20,-405537848),e=u(e,r,i,l,t[n+9],5,568446438),l=u(l,e,r,i,t[n+14],9,-1019803690),i=u(i,l,e,r,t[n+3],14,-187363961),r=u(r,i,l,e,t[n+8],20,1163531501),e=u(e,r,i,l,t[n+13],5,-1444681467),l=u(l,e,r,i,t[n+2],9,-51403784),i=u(i,l,e,r,t[n+7],14,1735328473),r=u(r,i,l,e,t[n+12],20,-1926607734),e=s(e,r,i,l,t[n+5],4,-378558),l=s(l,e,r,i,t[n+8],11,-2022574463),i=s(i,l,e,r,t[n+11],16,1839030562),r=s(r,i,l,e,t[n+14],23,-35309556),e=s(e,r,i,l,t[n+1],4,-1530992060),l=s(l,e,r,i,t[n+4],11,1272893353),i=s(i,l,e,r,t[n+7],16,-155497632),r=s(r,i,l,e,t[n+10],23,-1094730640),e=s(e,r,i,l,t[n+13],4,681279174),l=s(l,e,r,i,t[n],11,-358537222),i=s(i,l,e,r,t[n+3],16,-722521979),r=s(r,i,l,e,t[n+6],23,76029189),e=s(e,r,i,l,t[n+9],4,-640364487),l=s(l,e,r,i,t[n+12],11,-421815835),i=s(i,l,e,r,t[n+15],16,530742520),r=s(r,i,l,e,t[n+2],23,-995338651),e=c(e,r,i,l,t[n],6,-198630844),l=c(l,e,r,i,t[n+7],10,1126891415),i=c(i,l,e,r,t[n+14],15,-1416354905),r=c(r,i,l,e,t[n+5],21,-57434055),e=c(e,r,i,l,t[n+12],6,1700485571),l=c(l,e,r,i,t[n+3],10,-1894986606),i=c(i,l,e,r,t[n+10],15,-1051523),r=c(r,i,l,e,t[n+1],21,-2054922799),e=c(e,r,i,l,t[n+8],6,1873313359),l=c(l,e,r,i,t[n+15],10,-30611744),i=c(i,l,e,r,t[n+6],15,-1560198380),r=c(r,i,l,e,t[n+13],21,1309151649),e=c(e,r,i,l,t[n+4],6,-145523070),l=c(l,e,r,i,t[n+11],10,-1120210379),i=c(i,l,e,r,t[n+2],15,718787259),r=c(r,i,l,e,t[n+9],21,-343485551),e=a(e,h),r=a(r,f),i=a(i,d),l=a(l,M)}return[e,r,i,l]}function h(t,n=r.Hex){let e=n||r.Base64,a=l(function(t){let n=[];for(let e=0,r=8*t.length;e<r;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return n}(t),8*t.length);switch(e){case r.Raw:return a;case r.Hex:return function(t){let n="0123456789abcdef",e=[];for(let r=0,a=4*t.length;r<a;r++)e.push(n.charAt(t[r>>2]>>r%4*8+4&15)+n.charAt(t[r>>2]>>r%4*8&15));return e.join("")}(a);case r.String:return function(t){let n=[];for(let e=0,r=32*t.length;e<r;e+=8)n.push(String.fromCharCode(t[e>>5]>>>e%32&255));return n.join("")}(a);case r.Base64:return function(t){let n=[];for(let e=0,r=4*t.length;e<r;e+=3){let r=(t[e>>2]>>e%4*8&255)<<16|(t[e+1>>2]>>(e+1)%4*8&255)<<8|t[e+2>>2]>>(e+2)%4*8&255;for(let a=0;a<4;a++)8*e+6*a>32*t.length?n.push("="):n.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6*(3-a)&63))}return n.join("")}(a)}}e.d(n,["T",0,r])},4341(t,n,e){e.d(n,{I:()=>a});var r=e(26390);class a{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){let t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*i);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,i));t++)this._items.push(this._allocator())}}const i=1024},87024(t,n,e){e.d(n,{P:()=>d});var r=e(49186),a=e(80200),i=e(76553),o=e(84952),u=e(13069),s=e(96156),c=e(35666),l=e(10107),h=e(85648),f=e(97159);function d(t){let n=t?.origins??[void 0];return(e,r)=>{let a=function(t,n,e){if("resource"===t?.type)return function(t,n,e){let r=(0,s.z4)(n,e);return{type:String,read:(t,n,e)=>{let a=(0,f.r)(t,n,e);return r.type===String?a:"function"==typeof r.type?new r.type({url:a}):void 0},write:{isRequired:r.json?.write?.isRequired,writer(n,a,u,s){if(!s?.resources)return"string"==typeof n?void(a[u]=(0,f.t)(n,s)):void(a[u]=n.write({},s));let l=function(t){return null==t?null:"string"==typeof t?t:t.url}(n),d=(0,f.t)(l,{...s,verifyItemRelativeUrls:s?.verifyItemRelativeUrls?{writtenUrls:s.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1),g=r.type!==String&&(!(0,i.H)(this)||s?.origin&&this.originIdOf(e)>(0,c.aB)(s.origin)),b={object:this,propertyName:e,value:n,targetUrl:d,dest:a,targetPropertyName:u,context:s,params:t};s?.portalItem&&d&&!(0,o.oP)(d)?g&&t?.contentAddressed?M(b):g?function(t){let{context:n,targetUrl:e,params:r,value:a,dest:i,targetPropertyName:u}=t;if(!n.portalItem)return;let s=n.portalItem.resourceFromPath(e),c=p(a,e,n),l=(0,h.n)(c),f=(0,o.Zo)(s.path),d=r?.compress??!1;l===f?(n.resources&&m({...t,resource:s,content:c,compress:d,updates:n.resources.toUpdate}),i[u]=e):M(t)}(b):function({context:t,targetUrl:n,dest:e,targetPropertyName:r}){t.portalItem&&t.resources&&(t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(n),compress:!1}),e[r]=n)}(b):s?.portalItem&&(null==d||null!=(0,f.i)(d)||(0,o.w8)(d)||g)?M(b):a[u]=d}}}}(t,n,e);switch(t?.type??"other"){case"other":return{read:!0,write:!0};case"url":{let{read:t,write:n}=f.b;return{read:t,write:n}}}}(t,e,r);for(let t of n){let n=(0,l.rM)(e,t,r);for(let t in a)n[t]=a[t]}}}function M(t){let{targetUrl:n,params:e,value:i,context:s,dest:c,targetPropertyName:l}=t;if(!s.portalItem)return;let d=(0,f.p)(n),M=p(i,n,s);if(e?.contentAddressed&&"json"!==M.type)return void s.messages?.push(new r.A("persistable:contentAddressingUnsupported",`Property "${l}" is trying to serializing a resource with content of type ${M.type} with content addressing. Content addressing is only supported for json resources.`,{content:M}));let g=e?.contentAddressed&&"json"===M.type?(0,a.d)(M.jsonString):d?.filename??(0,u.lk)(),b=e?.prefix??d?.prefix,y=(0,o.fj)(b,g),v=`${y}.${(0,h.n)(M)}`;if(e?.contentAddressed&&s.resources&&"json"===M.type){let t=s.resources.toKeep.find(({resource:t})=>t.path===v)??s.resources.toAdd.find(({resource:t})=>t.path===v);if(t)return void(c[l]=t.resource.itemRelativeUrl)}let _=s.portalItem.resourceFromPath(v);(0,o.w8)(n)&&s.resources&&s.resources.pendingOperations.push((0,o.tk)(n).then(t=>{_.path=`${y}.${(0,h.n)({type:"blob",blob:t})}`,c[l]=_.itemRelativeUrl}).catch(()=>{}));let x=e?.compress??!1;s.resources&&m({...t,resource:_,content:M,compress:x,updates:s.resources.toAdd}),c[l]=_.itemRelativeUrl}function m({object:t,propertyName:n,updates:e,resource:r,content:a,compress:i}){e.push({resource:r,content:a,compress:i,finish:e=>{!function(t,n,e){"string"==typeof t[n]?t[n]=e.url:t[n].url=e.url}(t,n,e)}})}function p(t,n,e){return"string"==typeof t?{type:"url",url:n}:{type:"json",jsonString:JSON.stringify(t.toJSON(e))}}},62885(t,n,e){e.d(n,{H:()=>i,V:()=>a});var r=e(7762);function a(t,n,e=r.A){return n||=new e,n===t||n.destroyed||(n.removeAll(),(a=t)&&(Array.isArray(a)||"items"in a&&Array.isArray(a.items))?n.addMany(t):t&&n.add(t)),n;var a}function i(t){return t}},9093(t,n,e){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function a(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}e.d(n,{o8:()=>a,vt:()=>r});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:a,create:r,fromValues:function(t,n,e,r,a,i,o,u,s,c,l,h,f,d,M,m){return[t,n,e,r,a,i,o,u,s,c,l,h,f,d,M,m]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["zK",0,i])},82534(t,n,e){function r(){return[0,0,0,1]}function a(t){return[t[0],t[1],t[2],t[3]]}e.d(n,{o8:()=>a,vt:()=>r});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:a,create:r,fromValues:function(t,n,e,r){return[t,n,e,r]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["zK",0,i])},48163(t,n,e){function r(){return[0,0]}function a(t){return[t[0],t[1]]}function i(t,n){return[t,n]}function o(){return i(1,1)}function u(){return i(-1,-1)}function s(){return i(1,0)}function c(){return i(0,1)}e.d(n,{fA:()=>i,o8:()=>a,vt:()=>r});const l=o(),h=u(),f=s(),d=c();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:h,ONES:l,UNIT_X:f,UNIT_Y:d,ZEROS:[0,0],clone:a,create:r,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){let e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:i,negativeOnes:u,ones:o,unitX:s,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["IA",0,h,"Un",0,l])},91829(t,n,e){function r(){return[0,0,0,0]}function a(t,n,e,r){return[t,n,e,r]}function i(){return a(1,1,1,1)}function o(){return a(1,0,0,0)}function u(){return a(0,1,0,0)}function s(){return a(0,0,1,0)}function c(){return a(0,0,0,1)}e.d(n,{_Y:()=>c,fA:()=>a,vt:()=>r});const l=[0,0,0,0],h=i(),f=o(),d=u(),M=s(),m=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:m,UNIT_X:f,UNIT_Y:d,UNIT_Z:M,ZEROS:l,clone:function(t){return[t[0],t[1],t[2],t[3]]},create:r,freeze:function(t,n,e,r){return[t,n,e,r]},fromArray:function(t,n=[0,0,0,0]){let e=Math.min(4,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:a,ones:i,unitW:c,unitX:o,unitY:u,unitZ:s,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["Un",0,h,"uY",0,l])},58083(t,n,e){e.d(n,{$0:()=>g,$h:()=>q,B8:()=>l,C:()=>i,D_:()=>u,N9:()=>y,O7:()=>A,Qw:()=>c,Tl:()=>f,X_:()=>I,e$:()=>M,eL:()=>m,hM:()=>b,hZ:()=>o,hs:()=>d,kN:()=>p,l:()=>w,lw:()=>h,mg:()=>s,o1:()=>j,sC:()=>x,t2:()=>P,t5:()=>S,tZ:()=>R,ut:()=>C});var r=e(51850),a=e(34304);function i(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function o(t,n,e,r,a,i,o,u,s,c,l,h,f,d,M,m,p){return t[0]=n,t[1]=e,t[2]=r,t[3]=a,t[4]=i,t[5]=o,t[6]=u,t[7]=s,t[8]=c,t[9]=l,t[10]=h,t[11]=f,t[12]=d,t[13]=M,t[14]=m,t[15]=p,t}function u(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function s(t,n){if(t===n){let e=n[1],r=n[2],a=n[3],i=n[6],o=n[7],u=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=e,t[6]=n[9],t[7]=n[13],t[8]=r,t[9]=i,t[11]=n[14],t[12]=a,t[13]=o,t[14]=u}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t}function c(t,n){return l(t,n)||u(t),t}function l(t,n){let e=n[0],r=n[1],a=n[2],i=n[3],o=n[4],u=n[5],s=n[6],c=n[7],l=n[8],h=n[9],f=n[10],d=n[11],M=n[12],m=n[13],p=n[14],g=n[15],b=e*u-r*o,y=e*s-a*o,v=e*c-i*o,_=r*s-a*u,x=r*c-i*u,I=a*c-i*s,w=l*m-h*M,j=l*p-f*M,A=l*g-d*M,q=h*p-f*m,S=h*g-d*m,O=f*g-d*p,P=b*O-y*S+v*q+_*A-x*j+I*w;return P?(P=1/P,t[0]=(u*O-s*S+c*q)*P,t[1]=(a*S-r*O-i*q)*P,t[2]=(m*I-p*x+g*_)*P,t[3]=(f*x-h*I-d*_)*P,t[4]=(s*A-o*O-c*j)*P,t[5]=(e*O-a*A+i*j)*P,t[6]=(p*v-M*I-g*y)*P,t[7]=(l*I-f*v+d*y)*P,t[8]=(o*S-u*A+c*w)*P,t[9]=(r*A-e*S-i*w)*P,t[10]=(M*x-m*v+g*b)*P,t[11]=(h*v-l*x-d*b)*P,t[12]=(u*j-o*q-s*w)*P,t[13]=(e*q-r*j+a*w)*P,t[14]=(m*y-M*_-p*b)*P,t[15]=(l*_-h*y+f*b)*P,t):null}function h(t,n,e){let r=n[0],a=n[1],i=n[2],o=n[3],u=n[4],s=n[5],c=n[6],l=n[7],h=n[8],f=n[9],d=n[10],M=n[11],m=n[12],p=n[13],g=n[14],b=n[15],y=e[0],v=e[1],_=e[2],x=e[3];return t[0]=y*r+v*u+_*h+x*m,t[1]=y*a+v*s+_*f+x*p,t[2]=y*i+v*c+_*d+x*g,t[3]=y*o+v*l+_*M+x*b,y=e[4],v=e[5],_=e[6],x=e[7],t[4]=y*r+v*u+_*h+x*m,t[5]=y*a+v*s+_*f+x*p,t[6]=y*i+v*c+_*d+x*g,t[7]=y*o+v*l+_*M+x*b,y=e[8],v=e[9],_=e[10],x=e[11],t[8]=y*r+v*u+_*h+x*m,t[9]=y*a+v*s+_*f+x*p,t[10]=y*i+v*c+_*d+x*g,t[11]=y*o+v*l+_*M+x*b,y=e[12],v=e[13],_=e[14],x=e[15],t[12]=y*r+v*u+_*h+x*m,t[13]=y*a+v*s+_*f+x*p,t[14]=y*i+v*c+_*d+x*g,t[15]=y*o+v*l+_*M+x*b,t}function f(t,n,e){let r=e[0],a=e[1],i=e[2];if(n===t)t[12]=n[0]*r+n[4]*a+n[8]*i+n[12],t[13]=n[1]*r+n[5]*a+n[9]*i+n[13],t[14]=n[2]*r+n[6]*a+n[10]*i+n[14],t[15]=n[3]*r+n[7]*a+n[11]*i+n[15];else{let e=n[0],o=n[1],u=n[2],s=n[3],c=n[4],l=n[5],h=n[6],f=n[7],d=n[8],M=n[9],m=n[10],p=n[11];t[0]=e,t[1]=o,t[2]=u,t[3]=s,t[4]=c,t[5]=l,t[6]=h,t[7]=f,t[8]=d,t[9]=M,t[10]=m,t[11]=p,t[12]=e*r+c*a+d*i+n[12],t[13]=o*r+l*a+M*i+n[13],t[14]=u*r+h*a+m*i+n[14],t[15]=s*r+f*a+p*i+n[15]}return t}function d(t,n,e){let r=e[0],a=e[1],i=e[2];return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*a,t[5]=n[5]*a,t[6]=n[6]*a,t[7]=n[7]*a,t[8]=n[8]*i,t[9]=n[9]*i,t[10]=n[10]*i,t[11]=n[11]*i,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function M(t,n,e,r){let o=r[0],u=r[1],s=r[2],c=Math.sqrt(o*o+u*u+s*s);if(c<=(0,a.FD)())return void i(t,n);c=1/c,o*=c,u*=c,s*=c;let l=Math.sin(e),h=Math.cos(e),f=1-h,d=n[0],M=n[1],m=n[2],p=n[3],g=n[4],b=n[5],y=n[6],v=n[7],_=n[8],x=n[9],I=n[10],w=n[11],j=o*o*f+h,A=u*o*f+s*l,q=s*o*f-u*l,S=o*u*f-s*l,O=u*u*f+h,P=s*u*f+o*l,C=o*s*f+u*l,R=u*s*f-o*l,T=s*s*f+h;t[0]=d*j+g*A+_*q,t[1]=M*j+b*A+x*q,t[2]=m*j+y*A+I*q,t[3]=p*j+v*A+w*q,t[4]=d*S+g*O+_*P,t[5]=M*S+b*O+x*P,t[6]=m*S+y*O+I*P,t[7]=p*S+v*O+w*P,t[8]=d*C+g*R+_*T,t[9]=M*C+b*R+x*T,t[10]=m*C+y*R+I*T,t[11]=p*C+v*R+w*T,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15])}function m(t,n,e){let r=Math.sin(e),a=Math.cos(e),i=n[4],o=n[5],u=n[6],s=n[7],c=n[8],l=n[9],h=n[10],f=n[11];return n!==t&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[4]=i*a+c*r,t[5]=o*a+l*r,t[6]=u*a+h*r,t[7]=s*a+f*r,t[8]=c*a-i*r,t[9]=l*a-o*r,t[10]=h*a-u*r,t[11]=f*a-s*r,t}function p(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function g(t,n,e){if(0===n)return u(t);let r=e[0],i=e[1],o=e[2],s=Math.sqrt(r*r+i*i+o*o);if(s<=(0,a.FD)())return null;s=1/s,r*=s,i*=s,o*=s;let c=Math.sin(n),l=Math.cos(n),h=1-l;return t[0]=r*r*h+l,t[1]=i*r*h+o*c,t[2]=o*r*h-i*c,t[3]=0,t[4]=r*i*h-o*c,t[5]=i*i*h+l,t[6]=o*i*h+r*c,t[7]=0,t[8]=r*o*h+i*c,t[9]=i*o*h-r*c,t[10]=o*o*h+l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function b(t,n){let e=Math.sin(n),r=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=e,t[7]=0,t[8]=0,t[9]=-e,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function y(t,n){let e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=0,t[4]=-e,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function v(t,n,e){let r=n[0],a=n[1],i=n[2],o=n[3],u=r+r,s=a+a,c=i+i,l=r*u,h=r*s,f=r*c,d=a*s,M=a*c,m=i*c,p=o*u,g=o*s,b=o*c;return t[0]=1-(d+m),t[1]=h+b,t[2]=f-g,t[3]=0,t[4]=h-b,t[5]=1-(l+m),t[6]=M+p,t[7]=0,t[8]=f+g,t[9]=M-p,t[10]=1-(l+d),t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}const _=(0,r.vt)();function x(t,n){return t[0]=n[12],t[1]=n[13],t[2]=n[14],t}function I(t,n){let e=n[0],r=n[1],a=n[2],i=n[4],o=n[5],u=n[6],s=n[8],c=n[9],l=n[10];return t[0]=Math.sqrt(e*e+r*r+a*a),t[1]=Math.sqrt(i*i+o*o+u*u),t[2]=Math.sqrt(s*s+c*c+l*l),t}function w(t,n){let e=n[0]+n[5]+n[10],r=0;return e>0?(r=2*Math.sqrt(e+1),t[3]=.25*r,t[0]=(n[6]-n[9])/r,t[1]=(n[8]-n[2])/r,t[2]=(n[1]-n[4])/r):n[0]>n[5]&&n[0]>n[10]?(r=2*Math.sqrt(1+n[0]-n[5]-n[10]),t[3]=(n[6]-n[9])/r,t[0]=.25*r,t[1]=(n[1]+n[4])/r,t[2]=(n[8]+n[2])/r):n[5]>n[10]?(r=2*Math.sqrt(1+n[5]-n[0]-n[10]),t[3]=(n[8]-n[2])/r,t[0]=(n[1]+n[4])/r,t[1]=.25*r,t[2]=(n[6]+n[9])/r):(r=2*Math.sqrt(1+n[10]-n[0]-n[5]),t[3]=(n[1]-n[4])/r,t[0]=(n[8]+n[2])/r,t[1]=(n[6]+n[9])/r,t[2]=.25*r),t}function j(t,n,e,r){let a=n[0],i=n[1],o=n[2],u=n[3],s=a+a,c=i+i,l=o+o,h=a*s,f=a*c,d=a*l,M=i*c,m=i*l,p=o*l,g=u*s,b=u*c,y=u*l,v=r[0],_=r[1],x=r[2];return t[0]=(1-(M+p))*v,t[1]=(f+y)*v,t[2]=(d-b)*v,t[3]=0,t[4]=(f-y)*_,t[5]=(1-(h+p))*_,t[6]=(m+g)*_,t[7]=0,t[8]=(d+b)*x,t[9]=(m-g)*x,t[10]=(1-(h+M))*x,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function A(t,n,e,r,a){let i=n[0],o=n[1],u=n[2],s=n[3],c=i+i,l=o+o,h=u+u,f=i*c,d=i*l,M=i*h,m=o*l,p=o*h,g=u*h,b=s*c,y=s*l,v=s*h,_=r[0],x=r[1],I=r[2],w=a[0],j=a[1],A=a[2],q=(1-(m+g))*_,S=(d+v)*_,O=(M-y)*_,P=(d-v)*x,C=(1-(f+g))*x,R=(p+b)*x,T=(M+y)*I,D=(p-b)*I,U=(1-(f+m))*I;return t[0]=q,t[1]=S,t[2]=O,t[3]=0,t[4]=P,t[5]=C,t[6]=R,t[7]=0,t[8]=T,t[9]=D,t[10]=U,t[11]=0,t[12]=e[0]+w-(q*w+P*j+T*A),t[13]=e[1]+j-(S*w+C*j+D*A),t[14]=e[2]+A-(O*w+R*j+U*A),t[15]=1,t}function q(t,n,e,r,a,i,o){let u=1/(e-n),s=1/(a-r),c=1/(i-o);return t[0]=2*i*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*s,t[6]=0,t[7]=0,t[8]=(e+n)*u,t[9]=(a+r)*s,t[10]=(o+i)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*i*2*c,t[15]=0,t}function S(t,n,e,r){let i=n[0],o=n[1],s=n[2],c=i-e[0],l=o-e[1],h=s-e[2],f=(0,a.FD)();if(Math.abs(c)<f&&Math.abs(l)<f&&Math.abs(h)<f)return void u(t);let d=1/Math.sqrt(c*c+l*l+h*h);c*=d,l*=d,h*=d;let M=r[0],m=r[1],p=r[2],g=m*h-p*l,b=p*c-M*h,y=M*l-m*c;d=Math.sqrt(g*g+b*b+y*y),d?(d=1/d,g*=d,b*=d,y*=d):(g=0,b=0,y=0);let v=l*y-h*b,_=h*g-c*y,x=c*b-l*g;d=Math.sqrt(v*v+_*_+x*x),d?(d=1/d,v*=d,_*=d,x*=d):(v=0,_=0,x=0),t[0]=g,t[1]=v,t[2]=c,t[3]=0,t[4]=b,t[5]=_,t[6]=l,t[7]=0,t[8]=y,t[9]=x,t[10]=h,t[11]=0,t[12]=-(g*i+b*o+y*s),t[13]=-(v*i+_*o+x*s),t[14]=-(c*i+l*o+h*s),t[15]=1}function O(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t[9]=n[9]-e[9],t[10]=n[10]-e[10],t[11]=n[11]-e[11],t[12]=n[12]-e[12],t[13]=n[13]-e[13],t[14]=n[14]-e[14],t[15]=n[15]-e[15],t}function P(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]}function C(t){let n=(0,a.FD)(),e=t[0],r=t[1],i=t[2],o=t[4],u=t[5],s=t[6],c=t[8],l=t[9],h=t[10];return Math.abs(1-(e*e+o*o+c*c))<=n&&Math.abs(1-(r*r+u*u+l*l))<=n&&Math.abs(1-(i*i+s*s+h*h))<=n}function R(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const T=h,D=O;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t[9]=n[9]+e[9],t[10]=n[10]+e[10],t[11]=n[11]+e[11],t[12]=n[12]+e[12],t[13]=n[13]+e[13],t[14]=n[14]+e[14],t[15]=n[15]+e[15],t},adjoint:function(t,n){let e=n[0],r=n[1],a=n[2],i=n[3],o=n[4],u=n[5],s=n[6],c=n[7],l=n[8],h=n[9],f=n[10],d=n[11],M=n[12],m=n[13],p=n[14],g=n[15];return t[0]=u*(f*g-d*p)-h*(s*g-c*p)+m*(s*d-c*f),t[1]=-(r*(f*g-d*p)-h*(a*g-i*p)+m*(a*d-i*f)),t[2]=r*(s*g-c*p)-u*(a*g-i*p)+m*(a*c-i*s),t[3]=-(r*(s*d-c*f)-u*(a*d-i*f)+h*(a*c-i*s)),t[4]=-(o*(f*g-d*p)-l*(s*g-c*p)+M*(s*d-c*f)),t[5]=e*(f*g-d*p)-l*(a*g-i*p)+M*(a*d-i*f),t[6]=-(e*(s*g-c*p)-o*(a*g-i*p)+M*(a*c-i*s)),t[7]=e*(s*d-c*f)-o*(a*d-i*f)+l*(a*c-i*s),t[8]=o*(h*g-d*m)-l*(u*g-c*m)+M*(u*d-c*h),t[9]=-(e*(h*g-d*m)-l*(r*g-i*m)+M*(r*d-i*h)),t[10]=e*(u*g-c*m)-o*(r*g-i*m)+M*(r*c-i*u),t[11]=-(e*(u*d-c*h)-o*(r*d-i*h)+l*(r*c-i*u)),t[12]=-(o*(h*p-f*m)-l*(u*p-s*m)+M*(u*f-s*h)),t[13]=e*(h*p-f*m)-l*(r*p-a*m)+M*(r*f-a*h),t[14]=-(e*(u*p-s*m)-o*(r*p-a*m)+M*(r*s-a*u)),t[15]=e*(u*f-s*h)-o*(r*f-a*h)+l*(r*s-a*u),t},copy:i,determinant:function(t){let n=t[0],e=t[1],r=t[2],a=t[3],i=t[4],o=t[5],u=t[6],s=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],M=t[13],m=t[14],p=t[15];return(n*o-e*i)*(h*p-f*m)-(n*u-r*i)*(l*p-f*M)+(n*s-a*i)*(l*m-h*M)+(e*u-r*o)*(c*p-f*d)-(e*s-a*o)*(c*m-h*d)+(r*s-a*u)*(c*M-l*d)},equals:function(t,n){if(t===n)return!0;let e=t[0],r=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],l=t[7],h=t[8],f=t[9],d=t[10],M=t[11],m=t[12],p=t[13],g=t[14],b=t[15],y=n[0],v=n[1],_=n[2],x=n[3],I=n[4],w=n[5],j=n[6],A=n[7],q=n[8],S=n[9],O=n[10],P=n[11],C=n[12],R=n[13],T=n[14],D=n[15],U=(0,a.FD)();return Math.abs(e-y)<=U*Math.max(1,Math.abs(e),Math.abs(y))&&Math.abs(r-v)<=U*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-_)<=U*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(o-x)<=U*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(u-I)<=U*Math.max(1,Math.abs(u),Math.abs(I))&&Math.abs(s-w)<=U*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(c-j)<=U*Math.max(1,Math.abs(c),Math.abs(j))&&Math.abs(l-A)<=U*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(h-q)<=U*Math.max(1,Math.abs(h),Math.abs(q))&&Math.abs(f-S)<=U*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(d-O)<=U*Math.max(1,Math.abs(d),Math.abs(O))&&Math.abs(M-P)<=U*Math.max(1,Math.abs(M),Math.abs(P))&&Math.abs(m-C)<=U*Math.max(1,Math.abs(m),Math.abs(C))&&Math.abs(p-R)<=U*Math.max(1,Math.abs(p),Math.abs(R))&&Math.abs(g-T)<=U*Math.max(1,Math.abs(g),Math.abs(T))&&Math.abs(b-D)<=U*Math.max(1,Math.abs(b),Math.abs(D))},exactEquals:P,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,n){let e=n[0],r=n[1],a=n[2],i=n[3],o=e+e,u=r+r,s=a+a,c=e*o,l=r*o,h=r*u,f=a*o,d=a*u,M=a*s,m=i*o,p=i*u,g=i*s;return t[0]=1-h-M,t[1]=l+g,t[2]=f-p,t[3]=0,t[4]=l-g,t[5]=1-c-M,t[6]=d+m,t[7]=0,t[8]=f+p,t[9]=d-m,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,n){let e=_,r=-n[0],a=-n[1],i=-n[2],o=n[3],u=n[4],s=n[5],c=n[6],l=n[7],h=r*r+a*a+i*i+o*o;return h>0?(e[0]=2*(u*o+l*r+s*i-c*a)/h,e[1]=2*(s*o+l*a+c*r-u*i)/h,e[2]=2*(c*o+l*i+u*a-s*r)/h):(e[0]=2*(u*o+l*r+s*i-c*a),e[1]=2*(s*o+l*a+c*r-u*i),e[2]=2*(c*o+l*i+u*a-s*r)),v(t,n,e),t},fromRotation:g,fromRotationTranslation:v,fromRotationTranslationScale:j,fromRotationTranslationScaleOrigin:A,fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:p,fromXRotation:b,fromYRotation:function(t,n){let e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=0,t[2]=-e,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=e,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:y,frustum:q,getRotation:w,getScale:I,getTranslation:x,hasIdentityRotation:R,identity:u,invert:l,invertOrIdentity:c,isOrthoNormal:C,lookAt:S,mul:T,multiply:h,multiplyScalar:function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12]*e,t[13]=n[13]*e,t[14]=n[14]*e,t[15]=n[15]*e,t},multiplyScalarAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t[9]=n[9]+e[9]*r,t[10]=n[10]+e[10]*r,t[11]=n[11]+e[11]*r,t[12]=n[12]+e[12]*r,t[13]=n[13]+e[13]*r,t[14]=n[14]+e[14]*r,t[15]=n[15]+e[15]*r,t},ortho:function(t,n,e,r,a,i,o){let u=1/(n-e),s=1/(r-a),c=1/(i-o);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(n+e)*u,t[13]=(a+r)*s,t[14]=(o+i)*c,t[15]=1,t},perspective:function(t,n,e,r,a){let i,o=1/Math.tan(n/2);return t[0]=o/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=a&&a!==1/0?(i=1/(r-a),t[10]=(a+r)*i,t[14]=2*a*r*i):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,n,e,r){let a=Math.tan(n.upDegrees*Math.PI/180),i=Math.tan(n.downDegrees*Math.PI/180),o=Math.tan(n.leftDegrees*Math.PI/180),u=Math.tan(n.rightDegrees*Math.PI/180),s=2/(o+u),c=2/(a+i);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(o-u)*s*.5,t[9]=(a-i)*c*.5,t[10]=r/(e-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*e/(e-r),t[15]=0,t},rotate:M,rotateX:m,rotateY:function(t,n,e){let r=Math.sin(e),a=Math.cos(e),i=n[0],o=n[1],u=n[2],s=n[3],c=n[8],l=n[9],h=n[10],f=n[11];return n!==t&&(t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=i*a-c*r,t[1]=o*a-l*r,t[2]=u*a-h*r,t[3]=s*a-f*r,t[8]=i*r+c*a,t[9]=o*r+l*a,t[10]=u*r+h*a,t[11]=s*r+f*a,t},rotateZ:function(t,n,e){let r=Math.sin(e),a=Math.cos(e),i=n[0],o=n[1],u=n[2],s=n[3],c=n[4],l=n[5],h=n[6],f=n[7];return n!==t&&(t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=i*a+c*r,t[1]=o*a+l*r,t[2]=u*a+h*r,t[3]=s*a+f*r,t[4]=c*a-i*r,t[5]=l*a-o*r,t[6]=h*a-u*r,t[7]=f*a-s*r,t},scale:d,set:o,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:D,subtract:O,targetTo:function(t,n,e,r){let a=n[0],i=n[1],o=n[2],u=r[0],s=r[1],c=r[2],l=a-e[0],h=i-e[1],f=o-e[2],d=l*l+h*h+f*f;d>0&&(d=1/Math.sqrt(d),l*=d,h*=d,f*=d);let M=s*f-c*h,m=c*l-u*f,p=u*h-s*l;return d=M*M+m*m+p*p,d>0&&(d=1/Math.sqrt(d),M*=d,m*=d,p*=d),t[0]=M,t[1]=m,t[2]=p,t[3]=0,t[4]=h*p-f*m,t[5]=f*M-l*p,t[6]=l*m-h*M,t[7]=0,t[8]=l,t[9]=h,t[10]=f,t[11]=0,t[12]=a,t[13]=i,t[14]=o,t[15]=1,t},translate:f,transpose:s},Symbol.toStringTag,{value:"Module"}))},35522(t,n,e){e.d(n,{$A:()=>j,Bw:()=>i,C:()=>o,Cc:()=>A,DI:()=>x,Io:()=>b,Ln:()=>g,Om:()=>w,Qr:()=>h,Re:()=>c,S8:()=>I,T9:()=>m,WQ:()=>s,Z0:()=>q,_S:()=>d,aI:()=>D,ei:()=>S,fw:()=>P,gL:()=>O,hG:()=>y,hZ:()=>u,hs:()=>p,jk:()=>M,lw:()=>l,m3:()=>v,oW:()=>U,t2:()=>T,tn:()=>f,ze:()=>_});var r=e(51850),a=e(34304);function i(t){let n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function u(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function s(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function c(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function l(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function h(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function d(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function M(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function m(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function p(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function g(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function b(t,n){let e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return Math.sqrt(e*e+r*r+a*a)}function y(t,n){let e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return e*e+r*r+a*a}function v(t){let n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function _(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function x(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function I(t,n=t){let e=n[0],r=n[1],a=n[2],i=e*e+r*r+a*a;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function w(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function j(t,n,e){let r=n[0],a=n[1],i=n[2],o=e[0],u=e[1],s=e[2];return t[0]=a*s-i*u,t[1]=i*o-r*s,t[2]=r*u-a*o,t}function A(t,n,e,r){let a=n[0],i=n[1],o=n[2];return t[0]=a+r*(e[0]-a),t[1]=i+r*(e[1]-i),t[2]=o+r*(e[2]-o),t}function q(t,n,e){let r=n[0],a=n[1],i=n[2];return t[0]=e[0]*r+e[4]*a+e[8]*i+e[12],t[1]=e[1]*r+e[5]*a+e[9]*i+e[13],t[2]=e[2]*r+e[6]*a+e[10]*i+e[14],t}function S(t,n,e){let r=n[0],a=n[1],i=n[2];return t[0]=r*e[0]+a*e[3]+i*e[6],t[1]=r*e[1]+a*e[4]+i*e[7],t[2]=r*e[2]+a*e[5]+i*e[8],t}function O(t,n,e){return P(t,n,e[0],e[1],e[2],e[3])}function P(t,n,e,r,a,i){let o=n[0],u=n[1],s=n[2],c=r*s-a*u,l=a*o-e*s,h=e*u-r*o,f=r*h-a*l,d=a*c-e*h,M=e*l-r*c,m=2*i;return t[0]=o+c*m+2*f,t[1]=u+l*m+2*d,t[2]=s+h*m+2*M,t}const C=(0,r.vt)(),R=(0,r.vt)();function T(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function D(t,n){if(t===n)return!0;let e=t[0],r=t[1],i=t[2],o=n[0],u=n[1],s=n[2],c=(0,a.FD)();return Math.abs(e-o)<=c*Math.max(1,Math.abs(e),Math.abs(o))&&Math.abs(r-u)<=c*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(i-s)<=c*Math.max(1,Math.abs(i),Math.abs(s))}function U(t,n,e){let r=e[0]-n[0],a=e[1]-n[1],i=e[2]-n[2],o=r*r+a*a+i*i;return o>0?(o=1/Math.sqrt(o),t[0]=r*o,t[1]=a*o,t[2]=i*o,t):(t[0]=0,t[1]=0,t[2]=0,t)}const N=c,z=l,F=h,$=b,Z=y,V=i,E=v;Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:s,angle:function(t,n){I(C,t),I(R,n);let e=w(C,R);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,a,i){let o=1-i,u=o*o,s=i*i,c=u*o,l=3*i*u,h=3*s*o,f=s*i;return t[0]=n[0]*c+e[0]*l+r[0]*h+a[0]*f,t[1]=n[1]*c+e[1]*l+r[1]*h+a[1]*f,t[2]=n[2]*c+e[2]*l+r[2]*h+a[2]*f,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},clamp:function(t,n=0,e=1){return t[0]=Math.min(Math.max(t[0],n),e),t[1]=Math.min(Math.max(t[1],n),e),t[2]=Math.min(Math.max(t[2],n),e),t},copy:o,cross:j,crossAndNormalize:function(t,n,e){let r=n[0],a=n[1],i=n[2],o=e[0],u=e[1],s=e[2],c=a*s-i*u,l=i*o-r*s,h=r*u-a*o,f=Math.sqrt(c*c+l*l+h*h);return t[0]=c/f,t[1]=l/f,t[2]=h/f,t},direction:U,dist:$,distance:b,div:F,divide:h,dot:w,equals:D,exactEquals:T,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,a,i){let o=i*i,u=o*(2*i-3)+1,s=o*(i-2)+i,c=o*(i-1),l=o*(3-2*i);return t[0]=n[0]*u+e[0]*s+r[0]*c+a[0]*l,t[1]=n[1]*u+e[1]*s+r[1]*c+a[1]*l,t[2]=n[2]*u+e[2]*s+r[2]*c+a[2]*l,t},inverse:x,len:V,length:i,lerp:A,max:m,min:M,mul:z,multiply:l,negate:_,normalize:I,random:function(t,n=1){let e=a.Ov,r=2*e()*Math.PI,i=2*e()-1,o=Math.sqrt(1-i*i)*n;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=i*n,t},rotateX:function(t,n,e,r){let a=[],i=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],i[0]=a[0],i[1]=a[1]*Math.cos(r)-a[2]*Math.sin(r),i[2]=a[1]*Math.sin(r)+a[2]*Math.cos(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateY:function(t,n,e,r){let a=[],i=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],i[0]=a[2]*Math.sin(r)+a[0]*Math.cos(r),i[1]=a[1],i[2]=a[2]*Math.cos(r)-a[0]*Math.sin(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateZ:function(t,n,e,r){let a=[],i=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],i[0]=a[0]*Math.cos(r)-a[1]*Math.sin(r),i[1]=a[0]*Math.sin(r)+a[1]*Math.cos(r),i[2]=a[2],t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:p,scaleAndAdd:g,scaleTo:function(t,n){return p(t,t,n/V(t))},set:u,sign:d,sqrDist:Z,sqrLen:E,squaredDistance:y,squaredLength:v,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:N,subtract:c,transformMat3:S,transformMat4:q,transformMat4Z:function(t,n){return n[2]*t[0]+n[6]*t[1]+n[10]*t[2]+n[14]},transformQuat:O,transformQuatValues:P},Symbol.toStringTag,{value:"Module"})),e.d(n,["Il",0,V,"jb",0,N,"lo",0,Z,"uE",0,E])},78955(t,n,e){e.d(n,{Bw:()=>p,C:()=>a,Cc:()=>v,LI:()=>f,Om:()=>y,S8:()=>b,T9:()=>h,WQ:()=>o,Z0:()=>_,aI:()=>I,hG:()=>m,hZ:()=>i,hs:()=>d,jk:()=>l,m3:()=>g,t2:()=>x});var r=e(34304);function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function i(t,n,e,r,a){return t[0]=n,t[1]=e,t[2]=r,t[3]=a,t}function o(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t}function u(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}function s(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t[3]=n[3]*e[3],t}function c(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t[3]=n[3]/e[3],t}function l(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t[3]=Math.min(n[3],e[3]),t}function h(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t[3]=Math.max(n[3],e[3]),t}function f(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t[3]=Math.round(n[3]),t}function d(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t}function M(t,n){let e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2],i=n[3]-t[3];return Math.sqrt(e*e+r*r+a*a+i*i)}function m(t,n){let e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2],i=n[3]-t[3];return e*e+r*r+a*a+i*i}function p(t){let n=t[0],e=t[1],r=t[2],a=t[3];return Math.sqrt(n*n+e*e+r*r+a*a)}function g(t){let n=t[0],e=t[1],r=t[2],a=t[3];return n*n+e*e+r*r+a*a}function b(t,n){let e=n[0],r=n[1],a=n[2],i=n[3],o=e*e+r*r+a*a+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e*o,t[1]=r*o,t[2]=a*o,t[3]=i*o),t}function y(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function v(t,n,e,r){let a=n[0],i=n[1],o=n[2],u=n[3];return t[0]=a+r*(e[0]-a),t[1]=i+r*(e[1]-i),t[2]=o+r*(e[2]-o),t[3]=u+r*(e[3]-u),t}function _(t,n,e){let r=n[0],a=n[1],i=n[2],o=n[3];return t[0]=e[0]*r+e[4]*a+e[8]*i+e[12]*o,t[1]=e[1]*r+e[5]*a+e[9]*i+e[13]*o,t[2]=e[2]*r+e[6]*a+e[10]*i+e[14]*o,t[3]=e[3]*r+e[7]*a+e[11]*i+e[15]*o,t}function x(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function I(t,n){let e=t[0],a=t[1],i=t[2],o=t[3],u=n[0],s=n[1],c=n[2],l=n[3],h=(0,r.FD)();return Math.abs(e-u)<=h*Math.max(1,Math.abs(e),Math.abs(u))&&Math.abs(a-s)<=h*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(i-c)<=h*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(o-l)<=h*Math.max(1,Math.abs(o),Math.abs(l))}const w=u,j=s,A=c,q=M,S=m,O=p,P=g;Object.freeze(Object.defineProperty({__proto__:null,add:o,ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t[3]=Math.ceil(n[3]),t},copy:a,copyVec3:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},dist:q,distance:M,div:A,divide:c,dot:y,equals:I,exactEquals:x,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t[3]=Math.floor(n[3]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},len:O,length:p,lerp:v,max:h,min:l,mul:j,multiply:s,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},normalize:b,random:function(t,n=1){let e,a,i,o,u,s,c=r.Ov;do{e=2*c()-1,a=2*c()-1,u=e*e+a*a}while(u>=1);do{i=2*c()-1,o=2*c()-1,s=i*i+o*o}while(s>=1);let l=Math.sqrt((1-u)/s);return t[0]=n*e,t[1]=n*a,t[2]=n*i*l,t[3]=n*o*l,t},round:f,scale:d,scaleAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t},set:i,sqrDist:S,sqrLen:P,squaredDistance:m,squaredLength:g,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:w,subtract:u,transformMat4:_,transformQuat:function(t,n,e){let r=n[0],a=n[1],i=n[2],o=e[0],u=e[1],s=e[2],c=e[3],l=c*r+u*i-s*a,h=c*a+s*r-o*i,f=c*i+o*a-u*r,d=-o*r-u*a-s*i;return t[0]=l*c+d*-o+h*-s-f*-u,t[1]=h*c+d*-u+f*-o-l*-s,t[2]=f*c+d*-s+l*-u-h*-o,t[3]=n[3],t}},Symbol.toStringTag,{value:"Module"}))},56512(t,n,e){function r(t){let n,e,r=[],a=!1;return function(...i){return a&&n===this&&function(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(t[e]!==n[e])return!1;return!0}(i,r)||(e=t.apply(this,i),n=this,r=i,a=!0),e}}e.d(n,{B:()=>r})},76553(t,n,e){function r(t){return t&&"getAtOrigin"in t&&"originOf"in t}e.d(n,{H:()=>r})},13069(t,n,e){e.d(n,{AG:()=>u,lk:()=>a,vD:()=>o,yS:()=>i});const r="randomUUID"in crypto;function a(){if(r)return crypto.randomUUID();let t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;let n=n=>t[n].toString(16).padStart(4,"0");return n(0)+n(1)+"-"+n(2)+"-"+n(3)+"-"+n(4)+"-"+n(5)+n(6)+n(7)}function i(){return`{${a().toUpperCase()}}`}function o(){return`{${a()}}`}function u(t){let n=t.toUpperCase();return t.startsWith("{")?n:`{${n}}`}},4197(t,n,e){e.d(n,{Vj:()=>l,cj:()=>c,jh:()=>i,l5:()=>u,yH:()=>s});var r=e(34275),a=e(9093);function i(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function o(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function u(t,n,e){return Array.isArray(t)?t.slice(n,n+e):t.subarray(n,n+e)}function s(t,n){if(0===n.length)return o(t);if(0===t.length)return o(n);let e=i(t.length+n.length);for(let n=0;n<t.length;++n)e[n]=t[n];for(let r=0;r<n.length;++r)e[t.length+r]=n[r];return e}function c(t){return[...t]}function l(t){let n=(0,a.vt)();for(let e=0;e<16;++e)n[e]=t[e];return n}},70328(t,n,e){e.d(n,{BI:()=>q,C:()=>o,DC:()=>f,Ej:()=>y,Ie:()=>j,Jt:()=>A,Lu:()=>_,Ne:()=>x,RF:()=>h,TF:()=>g,VL:()=>M,aI:()=>O,fA:()=>u,gE:()=>c,gX:()=>b,hZ:()=>w,iT:()=>d,is:()=>S,pg:()=>v,uJ:()=>p,vI:()=>I,vY:()=>s,vt:()=>i,w1:()=>l,yr:()=>m}),e(35522);var r=e(5443),a=(e(19419),e(4197));function i(t=C){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function o(t,n){for(let e=0;e<6;e++)t[e]=n[e];return t}function u(t,n,e,r,a,o,u=i()){return u[0]=t,u[1]=n,u[2]=e,u[3]=r,u[4]=a,u[5]=o,u}function s(t,n=i()){return function(t,n,e,r=i()){return w(r,P),function(t,n,e=0,r=n.length/3){let a=t[0],i=t[1],o=t[2],u=t[3],s=t[4],c=t[5];for(let t=0;t<r;t++)a=Math.min(a,n[e+3*t]),i=Math.min(i,n[e+3*t+1]),o=Math.min(o,n[e+3*t+2]),u=Math.max(u,n[e+3*t]),s=Math.max(s,n[e+3*t+1]),c=Math.max(c,n[e+3*t+2]);t[0]=a,t[1]=i,t[2]=o,t[3]=u,t[4]=s,t[5]=c}(r,t,n,e),r}(t,0,t.length/3,n)}function c(t,n=(0,a.jh)(24)){let[e,r,i,o,u,s]=t;return n[0]=e,n[1]=r,n[2]=i,n[3]=e,n[4]=r,n[5]=s,n[6]=e,n[7]=u,n[8]=i,n[9]=e,n[10]=u,n[11]=s,n[12]=o,n[13]=r,n[14]=i,n[15]=o,n[16]=r,n[17]=s,n[18]=o,n[19]=u,n[20]=i,n[21]=o,n[22]=u,n[23]=s,n}function l(t,n){return isFinite(t[2])||isFinite(t[5])?new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:n}):new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:n})}function h(t,n,e=t){e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e[4]=Math.max(t[4],n[4]),e[5]=Math.max(t[5],n[5])}function f(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[3]=Math.max(t[3],n[2]),t[4]=Math.max(t[4],n[3])}function d(t,[n,e,r]){!function(t,n,e,r){t[0]=Math.min(t[0],n),t[1]=Math.min(t[1],e),t[2]=Math.min(t[2],r),t[3]=Math.max(t[3],n),t[4]=Math.max(t[4],e),t[5]=Math.max(t[5],r)}(t,n,e,r)}function M(t){return t[0]>=t[3]?0:t[3]-t[0]}function m(t){return t[1]>=t[4]?0:t[4]-t[1]}function p(t){return t[2]>=t[5]?0:t[5]-t[2]}function g(t){let n=M(t),e=p(t),r=m(t);return n*n+e*e+r*r}function b(t,n=[0,0,0]){return n[0]=t[0]+M(t)/2,n[1]=t[1]+m(t)/2,n[2]=t[2]+p(t)/2,n}function y(t,n=[0,0,0]){return n[0]=M(t),n[1]=m(t),n[2]=p(t),n}function v(t,n){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}function _(t,n){return n[0]=t[3],n[1]=t[4],n[2]=t[5],n}function x(t,n,e=t){return e[0]=n[0],e[1]=n[1],e[2]=n[2],e!==t&&(e[3]=t[3],e[4]=t[4],e[5]=t[5]),e}function I(t,n,e=t){return e[3]=n[0],e[4]=n[1],e[5]=n[2],e!==t&&(e[0]=t[0],e[1]=t[1],e[2]=t[2]),t}function w(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function j(t){return t?w(t,P):i(P)}function A(t,n){return t[0]=n[0],t[1]=n[1],t[2]=-1/0,t[3]=n[2],t[4]=n[3],t[5]=1/0,t}function q(t,n,e,r,a){return t[0]=n,t[1]=e,t[2]=-1/0,t[3]=r,t[4]=a,t[5]=1/0,t}function S(t){return 6===t.length}function O(t,n,e){if(null==t||null==n)return t===n;if(!S(t)||!S(n))return!1;if(e){for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1}else for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}const P=[1/0,1/0,1/0,-1/0,-1/0,-1/0],C=[0,0,0,0,0,0];i(),e.d(n,["qv",0,P,"v_",0,C])},71351(t,n,e){e.d(n,{C:()=>h,Cr:()=>f,LV:()=>l,fA:()=>d,kb:()=>M,vt:()=>s});var r=e(4341),a=(e(77690),e(29242)),i=e(35522),o=e(51850),u=e(32114);function s(t){return t?c((0,o.o8)(t.origin),(0,o.o8)(t.direction)):c((0,o.vt)(),(0,o.vt)())}function c(t,n){return{origin:t,direction:n}}function l(t,n){let e=m.get();return e.origin=t,e.direction=n,e}function h(t,n=s()){return d(t.origin,t.direction,n)}function f(t,n,e=s()){return(0,i.C)(e.origin,t),(0,i.Re)(e.direction,n,t),e}function d(t,n,e=s()){return(0,i.C)(e.origin,t),(0,i.C)(e.direction,n),e}function M(t,n){let e=(0,i.$A)(u.rq.get(),(0,i.S8)(u.rq.get(),t.direction),(0,i.Re)(u.rq.get(),n,t.origin));return(0,i.Om)(e,e)}const m=new r.I(()=>s());(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,a.vt)()},32114(t,n,e){e.d(n,{Rc:()=>d,rq:()=>h,Km:()=>f}),e(44208);var r=e(26390),a=e(29242),i=e(9093),o=e(82534),u=e(48163),s=e(51850),c=e(91829);class l{constructor(t){this._create=t,this._items=[],this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){let t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new l(u.vt)}static createVec3f64(){return new l(s.vt)}static createVec4f64(){return new l(c.vt)}static createMat3f64(){return new l(a.vt)}static createMat4f64(){return new l(i.vt)}static createQuatf64(){return new l(o.vt)}get test(){}}l.createVec2f64();const h=l.createVec3f64(),f=l.createVec4f64(),d=(l.createMat3f64(),l.createMat4f64());l.createQuatf64()},85648(t,n,e){e.d(n,{n:()=>a});var r=e(84952);function a(t){return i[function(t){return"json"===t.type?"application/json":"blob"===t.type?t.blob.type:function(t){let n=(0,r.Zo)(t);return s[n]||o}(t.url)}(t)]||u}const i={},o="text/plain",u=i[o],s={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(let t in s)i[s[t]]=t},24212(t,n,e){e.d(n,{$7:()=>s,B:()=>u,M7:()=>h,XF:()=>l,tW:()=>c,w7:()=>o});var r=e(56512),a=e(86211),i=e(16271);function o(t,n){return function(t,n){return n?.mode?n.mode:function(t){return t?f:d}(t).mode}(null==t||(t.hasZ??!1),n)}function u(t,n,e){return e&&e.mode!==n?`${t} only support ${n} elevation mode`:null}function s(t,n,e){return e?.mode===n?`${t} do not support ${n} elevation mode`:null}function c(t,n){return null!=n?.featureExpressionInfo&&"0"!==n.featureExpressionInfo.expression?`${t} do not support featureExpressionInfo`:null}function l(t,n){n&&t.warn(".elevationInfo=",n)}function h(t){return(t?.offset??0)*(0,i.Ao)(t?.unit)}(0,r.B)((t,n,e)=>{if(!t||"decimal-degrees"===n)return 0;let r="unknown"!==n&&n?n:"meters",i=(0,a.mq)(e);return i?(0,a.oU)(t,r,i):0});const f={mode:"absolute-height",offset:0},d={mode:"on-the-ground",offset:null}},49718(t,n,e){e(51850),e(6867).w_},6867(t,n,e){e.d(n,{w_:()=>h});var r=e(58083),a=e(9093),i=e(35522),o=e(51850),u=e(78955),s=e(91829),c=e(71351);class l{constructor(){this.intersector=4}get distance(){return this._distance}get renderDistance(){return this._renderDistance}_init(){this._distance=this._renderDistance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=4}_setBase(t,n,e,r=null,a=null,i=null){this.intersector=t,this._distance=e,this._renderDistance=r,this.target=n,this.drapedLayerOrder=a,this.renderPriority=i}}class h extends l{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,i.hs)(d,this.ray.direction,this.distance),(0,i.Bw)(d))}withinDistance(t){return!!f(this)&&null!=this.distanceInRenderSpace&&this.distanceInRenderSpace<=t}getIntersectionPoint(t){return!!f(this)&&((0,i.hs)(d,this.ray.direction,this.distance),(0,i.WQ)(t,this.ray.origin,d),!0)}getTransformedNormal(t){return(0,i.C)(M,this.normal),M[3]=0,(0,u.Z0)(M,M,this.transformation),(0,i.C)(t,M),(0,i.S8)(t,t)}constructor(t){super(),this.normal=(0,o.vt)(),this.transformation=(0,a.vt)(),this._ray=(0,c.vt)(),this.init(t)}init(t){super._init(),t&&(0,c.C)(t,this._ray)}set(t,n,e,u,s,c,l,h){this._setBase(t,n,e,u,l,h),(0,i.C)(this.normal,s??o.Cb),(0,r.C)(this.transformation,c??a.zK)}copy(t){this._setBase(t.intersector,t.target,t.distance,t.renderDistance,t.drapedLayerOrder,t.renderPriority),(0,c.C)(t.ray,this._ray),(0,i.C)(this.normal,t.normal),(0,r.C)(this.transformation,t.transformation)}}function f(t){return null!=t?.distance&&null!=t?.renderDistance}const d=(0,o.vt)(),M=(0,s.vt)()},78553(t,n,e){e.d(n,{D:()=>i,p:()=>a});var r=e(78888);function a(t){let n=(0,r.Vr)(100*(1-t));return Math.max(0,Math.min(n,100))}function i(t){let n=1-t/100;return Math.max(0,Math.min(n,1))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5804,6553,7885,8768],{46130(e,t,r){r.d(t,{v:()=>s});var i=r(76553);function s(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},60999(e,t,r){r.d(t,{DZ:()=>y,Ke:()=>h,QA:()=>f,Tj:()=>d,UT:()=>g,aD:()=>v,jJ:()=>u});var i=r(32198),s=r(69622),n=r(97768),o=r(17676),a=r(10107),l=r(64108);function u(e,t,r){return(0,o.Lx)(e.map((e,i)=>t.apply(r,[e,i])))}async function d(e,t,r){return(await(0,o.Lx)(e.map((e,i)=>t.apply(r,[e,i])))).map(e=>e.value)}function p(e){return{ok:!0,value:e}}function c(e){return{ok:!1,error:e}}async function h(e){if(null==e)return{ok:!1,error:Error("no promise provided")};try{return p(await e)}catch(e){return c(e)}}async function y(e){try{return p(await e)}catch(e){return(0,o.QP)(e),c(e)}}function f(e){if(!0===e.ok)return e.value;throw e.error}function g(e,t){return new m(e,t)}let m=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=p(e),this._cleanup()},e=>{this._result=c(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,a.MZ)()],m.prototype,"value",null),(0,i.Cg)([(0,a.MZ)()],m.prototype,"error",null),(0,i.Cg)([(0,a.MZ)()],m.prototype,"finished",null),(0,i.Cg)([(0,a.MZ)()],m.prototype,"promise",void 0),(0,i.Cg)([(0,a.MZ)()],m.prototype,"_result",void 0),m=(0,i.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m);class v{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});let t=await e;return{[Symbol.dispose]:t}}async run(e){let t={stack:[],error:void 0,hasError:!1};try{return(0,i.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}}},56512(e,t,r){function i(e){let t,r,i=[],s=!1;return function(...n){return s&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}(n,i)||(r=e.apply(this,n),t=this,i=n,s=!0),r}}r.d(t,{B:()=>i})},76553(e,t,r){function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},13069(e,t,r){r.d(t,{AG:()=>a,lk:()=>s,vD:()=>o,yS:()=>n});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${s().toUpperCase()}}`}function o(){return`{${s()}}`}function a(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},54239(e,t,r){r.d(t,{A:()=>m});var i,s=r(32198),n=r(4576),o=r(66552),a=r(25482),l=r(86211),u=r(67076),d=r(91429),p=r(97348),c=r(43937),h=r(36005);const y=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=y.jsonValues.slice();(0,n.Xy)(f,"orthometric");const g=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=i=class extends a.o{constructor(e){super(e),this.origin=0,this.associatedSpatialReference=null,this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}read(e,t){super.read(e,t),("service"===t?.origin||"web-scene"===t?.origin)&&(this.origin="service"===t.origin?2:1,this.associatedSpatialReference=null)}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS,origin:this.origin,associatedSpatialReference:this.associatedSpatialReference})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static fromSpatialReference(e){let{latestVcsWkid:t,vcsWkid:r}=e;if(!r)return null;let s=(null==t?null:p.B.get(t))??p.B.get(r);return s?new i({heightModel:0===s.type?"gravity-related-height":"ellipsoidal",heightUnit:(0,l.LA)(s.unit.name),vertCRS:s.datum,origin:3,associatedSpatialReference:e}):null}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;let t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,d.MZ)()],m.prototype,"origin",void 0),(0,s.Cg)([(0,d.MZ)()],m.prototype,"associatedSpatialReference",void 0),(0,s.Cg)([(0,d.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal",write:{isRequired:!0,alwaysWriteDefaults:!0}}}}})],m.prototype,"heightModel",void 0),(0,s.Cg)([(0,c.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s.Cg)([(0,h.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s.Cg)([(0,d.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:{writer:g.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s.Cg)([(0,h.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s.Cg)([(0,h.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,d.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s.Cg)([(0,h.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=i=(0,s.Cg)([(0,d.$K)("esri.geometry.HeightModelInfo")],m)},99959(e,t,r){r.d(t,{A:()=>n});var i=r(32198),s=r(91429);let n=class{};n=(0,i.Cg)([(0,s.$K)("esri.graphic.GraphicOrigin")],n)},89808(e,t,r){const i=Symbol("getSliceableSymbol");r.d(t,["Q",0,i])},77885(e,t,r){r.r(t),r.d(t,{default:()=>le});var i=r(32198),s=r(37838),n=r(56507),o=r(69540),a=r(49186),l=r(4718),u=r(53966),d=r(25728),p=r(93637),c=r(17676),h=r(84952),y=r(91429),f=r(41910),g=r(60950),m=r(89808),v=r(99959);const w=Symbol("isPointCloudGraphicOrigin");var S;class I extends v.A{get[(S=w,g.ym)](){return this.layer}get[m.Q](){return this.layer}get[f.e7](){return this.layer}constructor(e){super(),this[S]=!0,this.type="point-cloud",this.layer=e}get id(){return this.layer.id}}var C=r(4146),b=r(52136),A=r(18768),P=r(69208),R=r(34287),x=r(8303),M=r(25036),_=r(58947),T=r(78888),E=r(25482);let U=class extends E.o{constructor(e){super(e),this.field=null,this.type=null}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}};(0,i.Cg)([(0,y.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],U.prototype,"field",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0,nonNullable:!0,json:{read:!1,write:{isRequired:!0}}})],U.prototype,"type",void 0),U=(0,i.Cg)([(0,y.$K)("esri.layers.pointCloudFilters.PointCloudFilter")],U);const L=U;var O,j=r(93223);let F=O=class extends L{constructor(e){super(e),this.requiredClearBits=null,this.requiredSetBits=null,this.type="bitfield"}clone(){return new O({field:this.field,requiredClearBits:(0,l.o8)(this.requiredClearBits),requiredSetBits:(0,l.o8)(this.requiredSetBits)})}};(0,i.Cg)([(0,y.MZ)({type:[T.jz],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredSetBits}}}}})],F.prototype,"requiredClearBits",void 0),(0,i.Cg)([(0,y.MZ)({type:[T.jz],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredClearBits}}}}})],F.prototype,"requiredSetBits",void 0),(0,i.Cg)([(0,j.e)({pointCloudBitfieldFilter:"bitfield"})],F.prototype,"type",void 0),F=O=(0,i.Cg)([(0,y.$K)("esri.layers.pointCloudFilters.PointCloudBitfieldFilter")],F);const Z=F;var $;let N=$=class extends L{constructor(e){super(e),this.includedReturns=[],this.type="return"}clone(){return new $({field:this.field,includedReturns:(0,l.o8)(this.includedReturns)})}};(0,i.Cg)([(0,y.MZ)({type:[["firstOfMany","last","lastOfMany","single"]],json:{write:{enabled:!0,isRequired:!0}}})],N.prototype,"includedReturns",void 0),(0,i.Cg)([(0,j.e)({pointCloudReturnFilter:"return"})],N.prototype,"type",void 0),N=$=(0,i.Cg)([(0,y.$K)("esri.layers.pointCloudFilters.PointCloudReturnFilter")],N);const K=N;var q;let k=q=class extends L{constructor(e){super(e),this.mode="exclude",this.type="value",this.values=[]}clone(){return new q({field:this.field,mode:this.mode,values:(0,l.o8)(this.values)})}};(0,i.Cg)([(0,y.MZ)({type:["exclude","include"],json:{write:{enabled:!0,isRequired:!0}}})],k.prototype,"mode",void 0),(0,i.Cg)([(0,j.e)({pointCloudValueFilter:"value"})],k.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],k.prototype,"values",void 0),k=q=(0,i.Cg)([(0,y.$K)("esri.layers.pointCloudFilters.PointCloudValueFilter")],k);const B={key:"type",base:L,typeMap:{value:k,bitfield:Z,return:K}};var D,H=r(10873),G=r(20437),V=r(17036),z=r(93705),Y=r(63531),J=r(51857);let Q=D=class extends J.A{constructor(e){super(e),this.type="point-cloud-rgb",this.field=null}clone(){return new D({...this.cloneProperties(),field:(0,l.o8)(this.field)})}};(0,i.Cg)([(0,j.e)({pointCloudRGBRenderer:"point-cloud-rgb"})],Q.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({type:String,json:{write:{isRequired:!0}}})],Q.prototype,"field",void 0),Q=D=(0,i.Cg)([(0,y.$K)("esri.renderers.PointCloudRGBRenderer")],Q);const W=Q;var X=r(69846),ee=r(48425);const te={key:"type",base:J.A,typeMap:{"point-cloud-class-breaks":Y.A,"point-cloud-rgb":W,"point-cloud-stretch":X.A,"point-cloud-unique-value":ee.A},errorContext:"renderer"};var re=r(24212),ie=r(30291),se=r(36005),ne=r(43937);const oe=(0,V.p)();let ae=class extends((0,_.w6)((0,A.b)((0,R.q)((0,x.A)((0,M.j)((0,d.M)((0,P.d)((0,b.p)((0,o.OU)(C.A)))))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud",this.graphicOrigin=new I(this),this.rootPagePromise=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){let t=this.fieldsIndex.get(e);return t?.domain?t.domain:null}readServiceFields(e,t,r){return Array.isArray(e)?e.map(e=>{let t=new G.A;return"FieldTypeInteger"===e.type&&((e=(0,l.o8)(e)).type="esriFieldTypeInteger"),t.read(e,r),t}):Array.isArray(t.attributeStorageInfo)?t.attributeStorageInfo.map(e=>new G.A({name:e.name,type:"ELEVATION"===e.name?"double":"integer"})):null}set elevationInfo(e){(null==e||"absolute-height"===e.mode)&&this._set("elevationInfo",e),this._validateElevationInfo(e)}writeRenderer(e,t,r,i){(0,p.sM)("layerDefinition.drawingInfo.renderer",e.write({},i),t)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.QP),await this._fetchService(e?.signal),await this._fetchRootPageAndUpdateExtent(e?.signal)}async _fetchRootPageAndUpdateExtent(e){this.rootPagePromise=this._fetchRootPage(e),this.rootPagePromise.catch(()=>{});let{fullExtent:t}=this;if(null!=t&&!t.hasZ){let e=await this.rootPagePromise;(0,_.qM)(t,e?.nodes?.[0]?.obb)}}async _fetchRootPage(e){let t=`${this.parsedUrl?.path??""}/nodepages/0`;try{return(await(0,n.A)(t,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data}catch(e){throw new a.A("pointcloudlayer:root-page-missing","Root page missing.",{error:e,url:t})}}createPopupTemplate(e){let t=(0,ie.tn)(this,e);return t&&(this._formatPopupTemplateReturnsField(t),this._formatPopupTemplateRGBField(t)),t}_formatPopupTemplateReturnsField(e){let t=this.fieldsIndex.get("RETURNS");if(!t)return;let r=e.fieldInfos?.find(e=>e.fieldName===t.name);if(!r)return;let i=new z.A({name:"pcl-returns-decoded",title:t.alias||t.name,expression:`\n var returnValue = $feature.${t.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){let t=this.fieldsIndex.get("RGB");if(!t)return;let r=e.fieldInfos?.find(e=>e.fieldName===t.name);if(!r)return;let i=new z.A({name:"pcl-rgb-decoded",title:t.alias||t.name,expression:`\n var rgb = $feature.${t.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,t){if(await this.load(t),!this.attributeStorageInfo)throw new a.A("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");let r=this.fieldsIndex.get(e);if(!r)throw new a.A("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(let e of this.attributeStorageInfo)if(e.name===r.name){let r=(0,h.fj)(this.parsedUrl?.path??"",`./statistics/${e.key}`);return(0,n.A)(r,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then(e=>e.data)}throw new a.A("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"})}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new a.A("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new a.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some(t=>t.name===e)}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(e){(0,re.XF)(u.A.getLogger(this),(0,re.B)("Point cloud layers","absolute-height",e)),(0,re.XF)(u.A.getLogger(this),(0,re.tW)("Point cloud layers",e))}};(0,i.Cg)([(0,y.MZ)({type:["PointCloudLayer"]})],ae.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,y.MZ)(H.M6)],ae.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,y.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],ae.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],ae.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],ae.prototype,"opacity",void 0),(0,i.Cg)([(0,y.MZ)({type:["show","hide"]})],ae.prototype,"listMode",void 0),(0,i.Cg)([(0,y.MZ)({types:[B],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],ae.prototype,"filters",void 0),(0,i.Cg)([(0,y.MZ)({type:[G.A]})],ae.prototype,"fields",void 0),(0,i.Cg)([(0,y.MZ)(oe.fieldsIndex)],ae.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,se.w)("service","fields",["fields","attributeStorageInfo"])],ae.prototype,"readServiceFields",null),(0,i.Cg)([(0,y.MZ)(oe.outFields)],ae.prototype,"outFields",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],ae.prototype,"attributeStorageInfo",void 0),(0,i.Cg)([(0,y.MZ)(H.Yj)],ae.prototype,"elevationInfo",null),(0,i.Cg)([(0,y.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],ae.prototype,"path",void 0),(0,i.Cg)([(0,y.MZ)(H.fV)],ae.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,y.MZ)({types:te,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:te},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],ae.prototype,"renderer",void 0),(0,i.Cg)([(0,ne.K)("renderer")],ae.prototype,"writeRenderer",null),(0,i.Cg)([(0,y.MZ)({json:{read:!1},readOnly:!0})],ae.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],ae.prototype,"graphicOrigin",void 0),ae=(0,i.Cg)([(0,y.$K)("esri.layers.PointCloudLayer")],ae);const le=ae},52136(e,t,r){var i=r(32198),s=r(91429);r.d(t,["p",0,e=>{let t=e,r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,i.Cg)([(0,s.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},18768(e,t,r){var i=r(32198),s=r(53966),n=r(91429),o=r(60694);r.d(t,["b",0,e=>{let t=e,r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){let e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,s.A.getLogger(this)))}};return(0,i.Cg)([(0,n.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],r),r}])},69208(e,t,r){var i=r(32198),s=r(91429);r.d(t,["d",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}])},85707(e,t,r){var i=r(32198),s=r(91429),n=r(54239);r.d(t,["a",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.heightModelInfo=null}read(e,t){super.read(e,t),"service"===t?.origin&&2===this.heightModelInfo?.origin&&(this.heightModelInfo.associatedSpatialReference=this.getAtOrigin("spatialReference","service"))}};return(0,i.Cg)([(0,s.MZ)({readOnly:!0,type:n.A})],r.prototype,"heightModelInfo",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.HeightModelInfoMixin")],r),r}])},8303(e,t,r){var i=r(32198),s=r(92602),n=r(70333),o=r(56507),a=r(60999),l=r(49186),u=r(36563),d=r(53966),p=r(97768),c=r(17676),h=r(84952),y=r(91429),f=r(77548),g=r(20655),m=r(80812),v=r(41318),w=r(10407),S=r(26121),I=r(36005),C=r(43937);const b={credential:null,user:null};r.d(t,["A",0,e=>{let t=e,A=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:i}=await r.e(1204).then(()=>r(41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let i=t?.signal?null:new AbortController;try{let{reload:s}=await r.e(1204).then(()=>r(41204));return i&&this.addHandles((0,u.rE)(i),"reloadFromPortal"),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:i.signal})}catch(e){throw(0,c.zf)(e)||d.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{i&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);let i,s,o=!n.id?.findCredential(this.url),a=e===r.id;if(a&&r.portal.user)return this._getUserPrivileges(r,o);if(a)i=r.portal.url;else try{i=await(0,f.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!i||!(0,h.b8)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;s=await(n.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(a?await r.reload():(r=new m.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,o)}catch(e){(0,c.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;let r=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let i=`${r.owningSystemUrl}/sharing/rest`,s=g.A.getDefault();if(s&&s.loaded&&(0,h.S8)(s.restUrl)===(0,h.S8)(i))return s.user;let l=`${i}/community/self`,u=null==e?null:e.signal,d=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return d.ok?v.A.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){return(0,S.wN)(this.portalItem,t)?(t?.messages?.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,y.MZ)({type:m.default})],A.prototype,"portalItem",null),(0,i.Cg)([(0,I.w)("web-document","portalItem",["itemId"])],A.prototype,"readPortalItem",null),(0,i.Cg)([(0,C.K)("web-document","portalItem",{itemId:{type:String}})],A.prototype,"writePortalItem",null),(0,i.Cg)([(0,y.MZ)({clonable:!1})],A.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasUpdateItemPrivileges",void 0),A=(0,i.Cg)([(0,y.$K)("esri.layers.mixins.PortalLayer")],A),A}])},25036(e,t,r){var i=r(32198),s=r(91429),n=r(83960);r.d(t,["j",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){let e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&(0,n.RH)(e,t.effectiveScaleRange);let r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}])},58947(e,t,r){r.d(t,{w6:()=>b,qM:()=>R});var i=r(32198),s=r(56507),n=r(49186),o=r(53966),a=r(17676),l=r(91429),u=r(46130),d=r(5443),p=r(16930),c=r(85707),h=r(60694),y=r(10873),f=r(83898),g=r(73179);var m=r(20655),v=r(80812),w=r(88788),S=r(91682),I=r(26121),C=r(36005);const b=e=>{let t=(0,c.a)(e),r=class extends t{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.minScale=0,this.maxScale=0,this.version={major:NaN,minor:NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.url=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.sg)(async(e,t,r)=>{switch(e){case 0:return this._save(t);case 1:return this._saveAs(r,t)}})}readSpatialReference(e,t){return P(t)}readFullExtent(e,t,r){if("object"==typeof e&&e){let i=null==e.spatialReference?{...e,spatialReference:P(t)}:e;return d.A.fromJSON(i,r)}let i=t.store,s=P(t);return null==s||null==i?.extent||!Array.isArray(i.extent)||i.extent.some(e=>e<A)?null:new d.A({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:s})}parseVersionString(e){let t={major:NaN,minor:NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){let r=t.store,i=null==r.version?"":r.version.toString();return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}readTitleService(e,t){if("item-title"===this.sublayerTitleMode)return this.url?(0,h.yG)(this.url,t.name):t.name;let r=t.name;if(!r&&this.url){let e=(0,h.qg)(this.url);null!=e&&(r=e.title)}let i=this.portalItem?.title;return"item-title-and-service-name"===this.sublayerTitleMode&&i&&(r=i+" - "+r),(0,h.cr)(r)}get parsedUrl(){return(0,g.h)(this,{separator:"layers"})}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,f.F)(this.parsedUrl?.path??"",this.rootNode,e,this.customParameters,this.apiKey,o.A.getLogger(this),t),this.indexInfo.catch(()=>{});let{fullExtent:r}=this;null!=r&&!r.hasZ&&this._updateExtent(r,await this.indexInfo)}_updateExtent(e,t){if("page"===t?.type){let r=t.rootIndex%t.pageSize,i=t.rootPage?.nodes?.[r];R(e,i?.obb)}else if("node"===t?.type){let r=t.rootNode?.mbs;if(!Array.isArray(r)||4!==r.length||r[0]<A)return;let i=r[2],s=r[3];e.zmin=i-s,e.zmax=i+s}}async _fetchService(e){if(null==this.url)throw new n.A("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){let t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){let t=await(0,s.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){let t=await(0,s.A)(this.parsedUrl?.path??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});t.ssl&&this.url&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();let i=t.data;this.read(i,this._getServiceContext()),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){let t=(await(0,s.A)(this.parsedUrl?.path+"/layer",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}async _saveAs(e,t){let r={..._,...t},i=v.default.from(e);if(!i)throw new n.A("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");i.id&&(i=i.clone(),i.id=null);let s=i.portal||m.A.getDefault();await this._ensureLoadBeforeSave(),i.type=M,i.portal=s;let o=(0,w.m)(i,"portal-item",{withResources:!0}),a={layers:[this.write({},o)]};return await Promise.all(o.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,o,r),this.url&&(i.url=this.url),i.title||(i.title=this.title),x(i,r,1),await s.signIn(),await s.user.addItem({item:i,folder:r?.folder,data:a}),await(0,S.r)(this.resourceReferences,o),this.portalItem=i,(0,u.v)(o),o.portalItem=i,i}async _save(e){let t={..._,...e};if(!this.portalItem)throw new n.A("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==M)throw new n.A("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${M}"`);await this._ensureLoadBeforeSave();let r=(0,w.m)(this.portalItem,"portal-item",{withResources:!0}),i=this.write({},r),o=await async function(e,t){let r=await e.fetchData("json")??{};return Array.isArray(r.layers)||(r.layers=await async function(e,t){let r=await async function(e){let t=E(e.url);if(!t)return null;let r=(await(0,s.A)(t,{query:{f:"json"},responseType:"json"})).data.layers;if(!Array.isArray(r))return null;let i=r.filter(({id:e})=>null!=e).map(({id:e})=>({id:e}));return i.length?i:null}(e).catch(()=>null);return r?.some(({id:e})=>e===t.id)?r:[t]}(e,t)),function(e,t){let r=e.findIndex(({id:e})=>e===t.id);-1===r?e.push(t):e[r]=t}(r.layers,t),r}(this.portalItem,i);await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(o,r,t);let a=function(e,t){return t&&function(e,t){let r=E(e);return!!r&&r===U(t).url}(e.url,t)?e.url:t}(this.portalItem,this.url);return a&&(this.portalItem.url=a),this.portalItem.title||(this.portalItem.title=this.title),x(this.portalItem,t,0),await(0,S.S)(this.portalItem,o,this.resourceReferences,r),(0,u.v)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){let i=r?.validationOptions;(0,I.ci)(t,{errorName:"sceneservice:save"},{ignoreUnsupported:i?.ignoreUnsupported,supplementalUnsupportedErrors:["scenemodification:unsupported"]});let s=i?.enabled,a=null;if(s&&a){let t=(await a()).validate(e,r.portalItemLayerType);if(!t.length)return;let s=`Layer item did not validate:\n${t.join("\n")}`;if(o.A.getLogger(this).error(`_validateAgainstJSONSchema(): ${s}`),"throw"===i.failPolicy){let e=t.map(e=>new n.A("sceneservice:schema-validation",e));throw new n.A("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{validationErrors:e})}}}};return(0,i.Cg)([(0,l.MZ)(y.id)],r.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({type:p.A})],r.prototype,"spatialReference",void 0),(0,i.Cg)([(0,C.w)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],r.prototype,"readSpatialReference",null),(0,i.Cg)([(0,l.MZ)({type:d.A})],r.prototype,"fullExtent",void 0),(0,i.Cg)([(0,C.w)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],r.prototype,"readFullExtent",null),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,i.Cg)([(0,C.w)("version",["store.version"])],r.prototype,"readVersion",null),(0,i.Cg)([(0,l.MZ)({type:String,json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{read:!1}})],r.prototype,"sublayerTitleMode",void 0),(0,i.Cg)([(0,l.MZ)({type:String})],r.prototype,"title",void 0),(0,i.Cg)([(0,C.w)("portal-item","title")],r.prototype,"readTitlePortalItem",null),(0,i.Cg)([(0,C.w)("service","title",["name"])],r.prototype,"readTitleService",null),(0,i.Cg)([(0,l.MZ)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],r.prototype,"layerId",void 0),(0,i.Cg)([(0,l.MZ)((0,g.b)({separator:"layers"}))],r.prototype,"url",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"parsedUrl",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"store",void 0),(0,i.Cg)([(0,l.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],r.prototype,"rootNode",void 0),r=(0,i.Cg)([(0,l.$K)("esri.layers.mixins.SceneService")],r),r},A=-1e38;function P(e){if(null!=e.spatialReference)return p.A.fromJSON(e.spatialReference);let t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.slice(r.lastIndexOf("/")+1),10);return null==i?null:new p.A(i)}function R(e,t){if(null==t?.center||null==t.halfSize)throw new n.A("sceneservice:invalid-node-page","Invalid node page.");if(t.center[0]<A)return;let r=t.halfSize,i=t.center[2],s=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);e.zmin=i-s,e.zmax=i+s}function x(e,t,r){e.typeKeywords||=[];let i=t.getTypeKeywords();for(let t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t),1===r&&(e.typeKeywords=e.typeKeywords.filter(e=>"Hosted Service"!==e)))}const M="Scene Service",_={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}},T={layerId:null};function E(e){if(!e)return null;let t=U(e);if(null!=t.layerId)return null;let r=(0,h.qg)(t.url);return null==r||"SceneServer"===r.serverType?t.url:null}function U(e){return(0,h.HZ)({layer:T,url:e,nonStandardUrlAllowed:!0})}},83898(e,t,r){r.d(t,{F:()=>n});var i=r(56507),s=r(49186);async function n(e,t,r,n,o,a,l){let u=null;if(null!=r){let t=`${e}/nodepages/`,s=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.A)(s,{query:{f:"json",...n,token:o},responseType:"json",signal:l})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){a?.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",s,e),u=e}}if(!t)return null;let d=t?.split("/").pop(),p=`${e}/nodes/`,c=p+d;try{return{type:"node",rootNode:(await(0,i.A)(c,{query:{f:"json",...n,token:o},responseType:"json",signal:l})).data,urlPrefix:p}}catch(e){throw new s.A("sceneservice:root-node-missing","Root node missing.",{pageError:u,nodeError:e,url:c})}}},17036(e,t,r){r.d(t,{p:()=>l});var i=r(44208),s=r(53966),n=r(20437),o=r(95466),a=r(30524);function l(){return{fields:{type:[n.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){let t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){let e=t.map(e=>`'${e.name}'`).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${2**53-1} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){let e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(let t of e)this.fieldsIndex?.has(t)||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e});return(0,a.DB)(this.fieldsIndex,e)}}}}},73179(e,t,r){r.d(t,{b:()=>l,h:()=>u});var i=r(4718),s=r(53966),n=r(84952),o=r(60694),a=r(10873);function l(e){let{nonStandardUrlAllowed:t=!1,separator:r}=e??{},n=(0,i.o8)(a.OZ),l=n.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,i,s){(0,o.LS)(this,e,r,t,s)}),{...n,set:function(e){if(null==e)return void this._set("url",e);let r=(0,o.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:s.A.getLogger(this)});this._set("url",r.url),null!=r.layerId&&this._set("layerId",r.layerId)}}}function u(e,t){let{separator:r}=t??{},i=(0,n.An)(e.url);return null!=i&&(null==e.dynamicDataSource?null!=e.layerId&&(i.path=(0,n.fj)(i.path,r??"",e.layerId.toString())):i.path=(0,n.fj)(i.path,"dynamicLayer")),i}},88788(e,t,r){r.d(t,{m:()=>o,v:()=>n});var i=r(84952),s=r(20655);function n(e,t){return{...a(e,t),readResourcePaths:[]}}function o(e,t,r){let s=(0,i.An)(r?.forceNewItemContext?null:e.itemUrl);return{...a(e,t,r),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:s?{rootPath:s.path,writtenUrls:[]}:null,resources:r?.withResources?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function a(e,t,r){return{origin:t,url:(0,i.An)(r?.forceNewItemContext?null:e.itemUrl),portal:e.portal||s.A.getDefault(),portalItem:e}}},10407(e,t,r){r.d(t,{It:()=>h,LG:()=>o,OM:()=>u,Sm:()=>d,Y:()=>a,bK:()=>l,sQ:()=>p});var i=r(99917),s=r(16930),n=r(28735);function o(e,t){if(!a(e,t)){let r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,c.HOSTED_SERVICE)}function u(e,t){let r=e.typeKeywords;if(r){let e=r.indexOf(t);e>-1&&r.splice(e,1)}}function d(e,t,r){r?o(e,t):u(e,t)}async function p(e){let t,r=e.clone().normalize();if(r.length>1)for(let e of r)t?e.width>t.width&&(t=e):t=e;else t=r[0];return async function(e){let t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);let r=s.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(t)}const c={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function h(e){let{portal:t,isOrgItem:r,itemControl:i}=e,s=t.user?.privileges,n=!s||s.includes("features:user:edit"),o=!!r&&!!s?.includes("features:user:fullEdit"),a="update"===i||"admin"===i;return a?o=n=!0:o&&(n=!0),{features:{edit:n,fullEdit:o},content:{updateItem:a}}}r.d(t,["mm",0,c])},15804(e,t,r){r.d(t,{addOrUpdateResources:()=>a,bg:()=>c,cL:()=>p,fetchResources:()=>o,removeAllResources:()=>u,removeResource:()=>l});var i=r(56507),s=r(49186),n=r(84952);async function o(e,t={},r){await e.load(r);let i=(0,n.fj)(e.itemUrl,"resources"),{start:s=1,num:o=10,sortOrder:a="asc",sortField:l="resource"}=t,u={query:{start:s,num:o,sortOrder:a,sortField:l,token:e.apiKey},signal:r?.signal},d=await e.portal.request(i,u);return{total:d.total,nextStart:d.nextStart,resources:d.resources.map(({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)}))}}async function a(e,t,r,i){let o=new Map;for(let{resource:e,content:i,compress:n,access:a}of t){if(!e.hasPath())throw new s.A(`portal-item-resource-${r}:invalid-path`,"Resource does not have a valid path");let[t,l]=d(e.path),u=`${t}/${n??""}/${a??""}`;o.has(u)||o.set(u,{prefix:t,compress:n,access:a,files:[]}),o.get(u).files.push({fileName:l,content:i})}await e.load(i);let a=(0,n.fj)(e.userItemUrl,"add"===r?"addResources":"updateResources");for(let{prefix:t,compress:r,access:n,files:l}of o.values())for(let o=0;o<l.length;o+=25){let u=l.slice(o,o+25),d=new FormData;t&&"."!==t&&d.append("resourcesPrefix",t),r&&d.append("compress","true"),n&&d.append("access",n);let p=0;for(let{fileName:e,content:t}of u)d.append("file"+ ++p,t,e);d.append("f","json");try{await e.portal.request(a,{method:"post",body:d,signal:i?.signal})}catch(e){if(i?.ignoreResourceCopyErrors&&e instanceof s.A&&"CONT_00942"===e.details?.messageCode)continue;throw e}}}async function l(e,t,r){if(!t.hasPath())throw new s.A("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);let i=(0,n.fj)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function u(e,t){await e.load(t);let r=(0,n.fj)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function d(e){let t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function p(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,i.A)(e.url,{responseType:"blob"})).data}function c(e,t){if(!e.hasPath())return null;let[r,,i]=function(e){let[t,r]=function(e){let t=(0,n.Zo)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,s]=d(t);return[i,s,r]}(e.path);return e.portalItem.resourceFromPath((0,n.fj)(r,t+i))}},24212(e,t,r){r.d(t,{$7:()=>l,B:()=>a,M7:()=>p,XF:()=>d,tW:()=>u,w7:()=>o});var i=r(56512),s=r(86211),n=r(16271);function o(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?c:h}(e).mode}(null==e||(e.hasZ??!1),t)}function a(e,t,r){return r&&r.mode!==t?`${e} only support ${t} elevation mode`:null}function l(e,t,r){return r?.mode===t?`${e} do not support ${t} elevation mode`:null}function u(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function d(e,t){t&&e.warn(".elevationInfo=",t)}function p(e){return(e?.offset??0)*(0,n.Ao)(e?.unit)}(0,i.B)((e,t,r)=>{if(!e||"decimal-degrees"===t)return 0;let i="unknown"!==t&&t?t:"meters",n=(0,s.mq)(r);return n?(0,s.oU)(e,i,n):0});const c={mode:"absolute-height",offset:0},h={mode:"on-the-ground",offset:null}},30291(e,t,r){r.d(t,{tn:()=>u});var i=r(37838),s=r(30524),n=r(41227),o=r(89893),a=r(66159),l=r(68780);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},h){if(!r)return null;let f=function(e,t){let r=t?.visibleFieldNames;return function({fields:e,ignoreFieldTypes:t,sortDisabled:r}){let i=e;return t&&(e=e.filter(e=>!t.includes(e.type))),e===i&&(e=e.slice()),!0!==r&&e.sort(p),e}({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||y,sortDisabled:t?.sortDisabled}).map(t=>new n.A({fieldName:t.name,isEditable:(0,s.R$)(t,e),label:t.alias,format:c(t),visible:d(t,{...e,visibleFieldNames:r})}))}({editFieldsInfo:t,fields:r,objectIdField:l},h);if(!f.length)return null;let g=function(e){let t=(0,s.mB)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),m=[new a.A,new o.A];return new i.A({title:g,content:m,fieldInfos:f})}const d=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,s.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function c(e){switch(e.type){case"small-integer":case"integer":return new l.A({digitSeparator:!0,places:0});case"single":case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,s.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):void 0;default:return}}function h(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===e.alias?.toLowerCase()}const y=["geometry","blob","raster","guid","xml"]},91682(e,t,r){r.d(t,{S:()=>l,r:()=>a});var i=r(49186),s=r(17676),n=r(13069),o=r(15804);async function a(e,t,r){await d(await u(e,t,r),t,r)}async function l(e,t,r,i,s){let n=await u(r,i,s);await e.update({data:t}),await d(n,i,s)}async function u(e,t,a){if(!t?.resources)return;let l=function(e,t){let{portalItem:r,portalItemResourcePath:i}=e,{portalItem:s,portalItemResourcePath:n}=t;return r===s&&(!(i||n)||i===n)}(e,t)?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem,e.portalItemResourcePath=t.portalItemResourcePath;let u=new Set(t.resources.toKeep.map(e=>e.resource.path)),d=new Set,p=[];u.forEach(t=>{l.delete(t),e.paths.push(t)});let c=[],h=[],y=[];for(let r of t.resources.toUpdate)if(l.delete(r.resource.path),u.has(r.resource.path)||d.has(r.resource.path)){let{resource:t,content:i,finish:s}=r,a=(0,o.bg)(t,(0,n.lk)());e.paths.push(a.path),c.push({resource:a,content:await(0,o.cL)(i),compress:r.compress}),s&&y.push(()=>s(a))}else{e.paths.push(r.resource.path),h.push({resource:r.resource,content:await(0,o.cL)(r.content),compress:r.compress});let t=r.finish;t&&y.push(()=>t(r.resource)),d.add(r.resource.path)}for(let r of t.resources.toAdd)if(e.paths.push(r.resource.path),l.has(r.resource.path))l.delete(r.resource.path);else{c.push({resource:r.resource,content:await(0,o.cL)(r.content),compress:r.compress});let e=r.finish;e&&y.push(()=>e(r.resource))}if(c.length||h.length){let{addOrUpdateResources:e}=await Promise.resolve().then(()=>r(15804));await e(t.portalItem,c,"add",a),await e(t.portalItem,h,"update",a)}if(y.forEach(e=>e()),0===p.length)return l;let f=await(0,s.Ol)(p);if((0,s.Te)(a),f.length>0)throw new i.A("save:resources","Failed to save one or more resources",{errors:f});return l}async function d(e,t,r){if(!e||!t.portalItem)return;let i=[];for(let s of e){let e=t.portalItem.resourceFromPath(s);i.push(e.portalItem.removeResource(e,r))}await(0,s.Lx)(i)}},26121(e,t,r){r.d(t,{I6:()=>d,ci:()=>u,dL:()=>l,wN:()=>p});var i=r(49186),s=r(84952),n=r(77548),o=r(20655),a=r(59923);async function l(e){let t=[];for(let r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){let e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function u(e,t,r){let s=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new i.A(e,t,r));if(e.blockedRelativeUrls&&(s=s.concat(e.blockedRelativeUrls.map(e=>(0,a.GL)("url",`Relative url '${e}' is not supported`)))),r){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=r;e&&(s=s.filter(({name:e})=>!(a.MG.has(e)||t.includes(e)))),i&&(s=s.filter(e=>"web-document-write:property-required"!==e.name))}if(s.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}function d(e){return(0,n.qd)(e).some(e=>!!e.charts?.length)}function p(e,t){let r=t?.portal,i=e?.id&&(e.portal||o.A.getDefault());return!!r&&!!i&&!(0,s.ut)(i.restUrl,r.restUrl)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3932,6553],{76553(e,t,r){function l(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>l})},96520(e,t,r){r.d(t,{u:()=>a});var l=r(86211),i=r(21325),n=r(52006);function o(e,t,r){if(null==e.hasM||e.hasZ)for(let e of t)for(let t of e)t.length>2&&(t[2]*=r)}function s(e,t,r){if(null==e.hasM||e.hasZ)for(let e of t)for(let t of e){let e=(0,n.yP)(t);e.length>2&&(e[2]*=r)}}function a(e,t,r){if(!e&&!t||!r)return;let i=(0,l.G9)(r);f(e,r,i),f(t,r,i)}function f(e,t,r){if(e)for(let l of e)u(l.geometry,t,r)}function u(e,t,r){if(!e?.spatialReference||(0,i.aI)(e.spatialReference,t))return;let n=(0,l.G9)(e.spatialReference)/r;if(1!==n)if("x"in e)null!=e.z&&(e.z*=n);else if("curveRings"in e)s(e,e.curveRings,n);else if("curvePaths"in e)s(e,e.curvePaths,n);else if("rings"in e)o(e,e.rings,n);else if("paths"in e)o(e,e.paths,n);else if("points"in e&&(null==e.hasM||e.hasZ))for(let t of e.points)t.length>2&&(t[2]*=n)}},22671(e,t,r){r.d(t,{A:()=>x});var l,i=r(32198),n=r(52106),o=r(66552),s=r(25482),a=r(4718),f=r(91429),u=r(16930),p=r(60408),y=r(65864),h=r(50498),m=r(20437),g=r(36005),c=r(43937);const d=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let x=l=class extends s.o{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){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,l){if(e)return void d.write(e,t,r,l);let{features:i}=this;if(i)for(let e of i)if(null!=e?.geometry)return void d.write(e.geometry.type,t,r,l)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,l=(0,y.rS)(e);return l&&!r&&t.spatialReference&&(l.spatialReference=u.A.fromJSON(t.spatialReference)),l}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new l(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let l=t.features[r];l.geometry&&=(e?.[r])?.toJSON()||l.geometry}return t}quantize(e){let{scale:[t,r],translate:[l,i]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-l)/t),e=>Math.round((i-e)/r));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[l,i],scale:[n,o]}=r,s=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;s=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}let f=this._getHydrationFunction(e,e=>e*n+l,e=>i-e*o,s,a);for(let{geometry:e}of t)null!=e&&f&&f(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let l=u.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){let n=e[t],o=r.fromJSON(n),s=n.geometry?.spatialReference;null!=o.geometry&&!s&&(o.geometry.spatialReference=l);let a=n.aggregateGeometries,f=o.aggregateGeometries;if(a&&null!=f)for(let e in f){let t=f[e],r=a[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=l)}i.push(o)}return i}_quantizePoints(e,t,r){let l,i,n=[];for(let o=0,s=e.length;o<s;o++){let s=e[o];if(o>0){let e=t(s[0]),o=r(s[1]);(e!==l||o!==i)&&(n.push([e-l,o-i]),l=e,i=o)}else l=t(s[0]),i=r(s[1]),n.push([l,i])}return n.length>0?n: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=>{let l=(0,p.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,n=l.length;e<n;e++){let n=l[e],o=this._quantizePoints(n,t,r);o&&i.push(o)}return i.length>0?((0,p.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{let l=this._quantizePoints(e.points,t,r);return l&&l.length>0?(e.points=l,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,l,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),l&&(e.z=l(e.z))}:"polyline"===e||"polygon"===e?e=>{let n,o,s=(0,p.Bi)(e)?e.rings:e.paths;for(let e=0,l=s.length;e<l;e++){let l=s[e];for(let e=0,i=l.length;e<i;e++){let i=l[e];e>0?(n+=i[0],o+=i[1]):(n=i[0],o=i[1]),i[0]=t(n),i[1]=r(o)}}if(l&&i)for(let e=0,t=s.length;e<t;e++){let t=s[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=l(r[2]),r[3]=i(r[3])}}else if(l)for(let e=0,t=s.length;e<t;e++){let t=s[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=l(r[2])}}else if(i)for(let e=0,t=s.length;e<t;e++){let t=s[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),l&&null!=e.zmax&&null!=e.zmin&&(e.zmax=l(e.zmax),e.zmin=l(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{let n,o,s=e.points;for(let e=0,l=s.length;e<l;e++){let l=s[e];e>0?(n+=l[0],o+=l[1]):(n=l[0],o=l[1]),l[0]=t(n),l[1]=r(o)}if(l&&i)for(let e=0,t=s.length;e<t;e++){let t=s[e];t[2]=l(t[2]),t[3]=i(t[3])}else if(l)for(let e=0,t=s.length;e<t;e++){let t=s[e];t[2]=l(t[2])}else if(i)for(let e=0,t=s.length;e<t;e++){let t=s[e];t[2]=i(t[2])}}:null}};(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],x.prototype,"displayFieldName",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],x.prototype,"exceededTransferLimit",void 0),(0,i.Cg)([(0,f.MZ)({type:[n.A],json:{write:!0}})],x.prototype,"features",void 0),(0,i.Cg)([(0,g.w)("features")],x.prototype,"readFeatures",null),(0,i.Cg)([(0,f.MZ)({type:[m.A],json:{write:!0}})],x.prototype,"fields",void 0),(0,i.Cg)([(0,f.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:d.read}}})],x.prototype,"geometryType",void 0),(0,i.Cg)([(0,c.K)("geometryType")],x.prototype,"writeGeometryType",null),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],x.prototype,"hasM",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],x.prototype,"hasZ",void 0),(0,i.Cg)([(0,f.MZ)({types:h.yR,json:{write:!0}})],x.prototype,"queryGeometry",void 0),(0,i.Cg)([(0,g.w)("queryGeometry")],x.prototype,"readQueryGeometry",null),(0,i.Cg)([(0,f.MZ)({type:u.A,json:{write:!0}})],x.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.K)("spatialReference")],x.prototype,"writeSpatialReference",null),(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],x.prototype,"transform",void 0),x=l=(0,i.Cg)([(0,f.$K)("esri.rest.support.FeatureSet")],x),x.prototype.toJSON.isDefaultToJSON=!0}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2958,5804,6553],{46130(e,t,r){r.d(t,{v:()=>o});var a=r(76553);function o(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,a.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},76553(e,t,r){function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>a})},13069(e,t,r){r.d(t,{AG:()=>i,lk:()=>o,vD:()=>n,yS:()=>s});const a="randomUUID"in crypto;function o(){if(a)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${o().toUpperCase()}}`}function n(){return`{${o()}}`}function i(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},32958(e,t,r){r.d(t,{save:()=>y,saveAs:()=>v});var a=r(71530),o=r(88788),s=r(10407),n=r(91682),i=r(26121);const l="Group Layer",u=s.mm.GROUP_LAYER_MAP;function c(e){return{isValid:"group"===e.type,errorMessage:"Layer.type should be 'group'"}}function p(e){return{isValid:(0,s.Y)(e,u),errorMessage:`Layer.portalItem.typeKeywords should have '${u}'`}}function m(e,t){return{...(0,o.m)(e,"web-map",{withResources:!0}),initiator:t}}function f(e){let t=e.layerJSON;return Promise.resolve(t&&Object.keys(t).length?t:null)}function d(e,t){(0,s.Sm)(t,s.mm.CHARTS,(0,i.I6)(e))}function h(e,t){d(e,t)}async function w(e,t){t.title||=e.title,(0,s.OM)(t,s.mm.METADATA),(0,s.LG)(t,u),d(e,t)}async function y(e,t){return(0,a.UN)({layer:e,itemType:l,validateLayer:c,validateItem:p,createJSONContext:t=>m(t,e),createItemData:f,errorNamePrefix:"group-layer-save",setItemProperties:h,saveResources:async(t,r)=>(e.sourceIsPortalItem||await t.removeAllResources().catch(()=>{}),(0,n.r)(e.resourceReferences,r))},t)}async function v(e,t,r){return(0,a.Uh)({layer:e,itemType:l,validateLayer:c,createJSONContext:t=>m(t,e),createItemData:f,errorNamePrefix:"group-layer-save-as",newItem:t,setItemProperties:w,saveResources:(t,r)=>(0,n.r)(e.resourceReferences,r)},r)}},71530(e,t,r){r.d(t,{UN:()=>v,Uh:()=>I});var a=r(49186),o=r(46130),s=r(20655),n=r(80812),i=r(88788),l=r(10407),u=r(26121);async function c(e){let{layer:t,errorNamePrefix:r,validateLayer:o}=e;await t.load(),function(e,t,r){let o=r(e);if(!o.isValid)throw new a.A(`${t}:invalid-parameters`,o.errorMessage,{layer:e})}(t,r,o)}function p(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function m(e){let{item:t,errorNamePrefix:r,layer:o,validateItem:s}=e;if(function(e){let{item:t,itemType:r,additionalItemType:o,errorNamePrefix:s,layer:n}=e,i=[r];if(o&&i.push(o),!i.includes(t.type)){let e=i.map(e=>`'${e}'`).join(", ");throw new a.A(`${s}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:t,layer:n})}}(e),s){let e=s(t);if(!e.isValid)throw new a.A(`${r}:invalid-parameters`,e.errorMessage,{layer:o})}}function f(e){let{layer:t,errorNamePrefix:r}=e,{portalItem:o}=t;if(!o)throw new a.A(`${r}:portal-item-not-set`,p(t,"requires the portalItem property to be set"));if(!o.loaded)throw new a.A(`${r}:portal-item-not-loaded`,p(t,"cannot be saved to a portal item that does not exist or is inaccessible"));m({...e,item:o})}function d(e){let{newItem:t,itemType:r}=e,a=n.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=s.A.getDefault(),m({...e,item:a}),a}function h(e){return(0,i.m)(e,"portal-item")}async function w(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();let a=e.write({},t);return await Promise.all(t.resources?.pendingOperations??[]),(0,u.ci)(t,{errorName:"layer-write:unsupported"},r),a}function y(e){(0,l.LG)(e,l.mm.JSAPI),e.typeKeywords&&=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t)}async function v(e,t){let{layer:r,createItemData:a,createJSONContext:s,setItemProperties:n,saveResources:i,supplementalUnsupportedErrors:l}=e;await c(e),f(e);let u=r.portalItem,p=s?s(u):h(u),m=await a({layer:r,layerJSON:await w(r,p,{...t,supplementalUnsupportedErrors:l})},u);return await(n?.(r,u,m)),y(u),await u.update({data:m}),(0,o.v)(p),await(i?.(u,p)),u}async function I(e,t){let{layer:r,createItemData:a,createJSONContext:s,setItemProperties:n,saveResources:i,supplementalUnsupportedErrors:l}=e;await c(e);let u=d(e),p=s?s(u):h(u),m=await a({layer:r,layerJSON:await w(r,p,{...t,supplementalUnsupportedErrors:l})},u);return await n(r,u,m),y(u),await async function(e,t,r){let a=e.portal;await a.signIn(),await a.user.addItem({item:e,data:t,folder:r?.folder})}(u,m,t),r.portalItem=u,(0,o.v)(p),await(i?.(u,p)),u}},88788(e,t,r){r.d(t,{m:()=>n,v:()=>s});var a=r(84952),o=r(20655);function s(e,t){return{...i(e,t),readResourcePaths:[]}}function n(e,t,r){let o=(0,a.An)(r?.forceNewItemContext?null:e.itemUrl);return{...i(e,t,r),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:o?{rootPath:o.path,writtenUrls:[]}:null,resources:r?.withResources?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function i(e,t,r){return{origin:t,url:(0,a.An)(r?.forceNewItemContext?null:e.itemUrl),portal:e.portal||o.A.getDefault(),portalItem:e}}},15804(e,t,r){r.d(t,{addOrUpdateResources:()=>i,bg:()=>m,cL:()=>p,fetchResources:()=>n,removeAllResources:()=>u,removeResource:()=>l});var a=r(56507),o=r(49186),s=r(84952);async function n(e,t={},r){await e.load(r);let a=(0,s.fj)(e.itemUrl,"resources"),{start:o=1,num:n=10,sortOrder:i="asc",sortField:l="resource"}=t,u={query:{start:o,num:n,sortOrder:i,sortField:l,token:e.apiKey},signal:r?.signal},c=await e.portal.request(a,u);return{total:c.total,nextStart:c.nextStart,resources:c.resources.map(({created:t,size:r,resource:a})=>({created:new Date(t),size:r,resource:e.resourceFromPath(a)}))}}async function i(e,t,r,a){let n=new Map;for(let{resource:e,content:a,compress:s,access:i}of t){if(!e.hasPath())throw new o.A(`portal-item-resource-${r}:invalid-path`,"Resource does not have a valid path");let[t,l]=c(e.path),u=`${t}/${s??""}/${i??""}`;n.has(u)||n.set(u,{prefix:t,compress:s,access:i,files:[]}),n.get(u).files.push({fileName:l,content:a})}await e.load(a);let i=(0,s.fj)(e.userItemUrl,"add"===r?"addResources":"updateResources");for(let{prefix:t,compress:r,access:s,files:l}of n.values())for(let n=0;n<l.length;n+=25){let u=l.slice(n,n+25),c=new FormData;t&&"."!==t&&c.append("resourcesPrefix",t),r&&c.append("compress","true"),s&&c.append("access",s);let p=0;for(let{fileName:e,content:t}of u)c.append("file"+ ++p,t,e);c.append("f","json");try{await e.portal.request(i,{method:"post",body:c,signal:a?.signal})}catch(e){if(a?.ignoreResourceCopyErrors&&e instanceof o.A&&"CONT_00942"===e.details?.messageCode)continue;throw e}}}async function l(e,t,r){if(!t.hasPath())throw new o.A("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);let a=(0,s.fj)(e.userItemUrl,"removeResources");await e.portal.request(a,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function u(e,t){await e.load(t);let r=(0,s.fj)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function c(e){let t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function p(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,a.A)(e.url,{responseType:"blob"})).data}function m(e,t){if(!e.hasPath())return null;let[r,,a]=function(e){let[t,r]=function(e){let t=(0,s.Zo)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[a,o]=c(t);return[a,o,r]}(e.path);return e.portalItem.resourceFromPath((0,s.fj)(r,t+a))}},91682(e,t,r){r.d(t,{S:()=>l,r:()=>i});var a=r(49186),o=r(17676),s=r(13069),n=r(15804);async function i(e,t,r){await c(await u(e,t,r),t,r)}async function l(e,t,r,a,o){let s=await u(r,a,o);await e.update({data:t}),await c(s,a,o)}async function u(e,t,i){if(!t?.resources)return;let l=function(e,t){let{portalItem:r,portalItemResourcePath:a}=e,{portalItem:o,portalItemResourcePath:s}=t;return r===o&&(!(a||s)||a===s)}(e,t)?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem,e.portalItemResourcePath=t.portalItemResourcePath;let u=new Set(t.resources.toKeep.map(e=>e.resource.path)),c=new Set,p=[];u.forEach(t=>{l.delete(t),e.paths.push(t)});let m=[],f=[],d=[];for(let r of t.resources.toUpdate)if(l.delete(r.resource.path),u.has(r.resource.path)||c.has(r.resource.path)){let{resource:t,content:a,finish:o}=r,i=(0,n.bg)(t,(0,s.lk)());e.paths.push(i.path),m.push({resource:i,content:await(0,n.cL)(a),compress:r.compress}),o&&d.push(()=>o(i))}else{e.paths.push(r.resource.path),f.push({resource:r.resource,content:await(0,n.cL)(r.content),compress:r.compress});let t=r.finish;t&&d.push(()=>t(r.resource)),c.add(r.resource.path)}for(let r of t.resources.toAdd)if(e.paths.push(r.resource.path),l.has(r.resource.path))l.delete(r.resource.path);else{m.push({resource:r.resource,content:await(0,n.cL)(r.content),compress:r.compress});let e=r.finish;e&&d.push(()=>e(r.resource))}if(m.length||f.length){let{addOrUpdateResources:e}=await Promise.resolve().then(()=>r(15804));await e(t.portalItem,m,"add",i),await e(t.portalItem,f,"update",i)}if(d.forEach(e=>e()),0===p.length)return l;let h=await(0,o.Ol)(p);if((0,o.Te)(i),h.length>0)throw new a.A("save:resources","Failed to save one or more resources",{errors:h});return l}async function c(e,t,r){if(!e||!t.portalItem)return;let a=[];for(let o of e){let e=t.portalItem.resourceFromPath(o);a.push(e.portalItem.removeResource(e,r))}await(0,o.Lx)(a)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5740,6553],{46130(e,t,r){r.d(t,{v:()=>n});var a=r(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,a.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},76553(e,t,r){function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>a})},33359(e,t,r){r.d(t,{save:()=>x,saveAs:()=>C});var a=r(4576),n=(r(49186),r(71530)),l=r(60694),i=r(23154),o=(r(20655),r(80812),r(88788)),s=r(10407);const u="Feature Service",y="feature-layer-utils",c=`${y}-save`,f=`${y}-save-as`;function p(e){let t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t||"dimension-feature"===t||"annotation-feature"===t)&&"feature-layer"===e?.source?.type}function m(e){return{isValid:p(e)&&(!("dynamicDataSource"in e)||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function d(e,t){let r=(0,o.m)(e,"portal-item");return t?.isTable&&(r.layerContainerType="tables"),r}function h(e){let t=[],r=[];for(let{layer:a,layerJSON:n}of e)w(a)?r.push(n):t.push(n);return{layers:t,tables:r}}function w(e,t){return e.isTable}function b(e){return h([e])}async function I(e,t){return/\/\d+\/?$/.test(e.url)?b(t[0]):async function(e,t){if(e.reverse(),!t)return h(e);let a=await async function(e,t){let a,n=await e.fetchData("json");if(!function(e){return!!(e&&Array.isArray(e.layers)&&Array.isArray(e.tables))}(n)||(0,s.Y)(e,s.mm.HOSTED_SERVICE))a=!0;else{if(function(e){return[...e.layers,...e.tables].every(e=>"layerType"in e&&!!e.layerType)}(n))return n;a=!1}n??={},function(e){e.layers??=[],e.tables??=[]}(n);let{layer:{url:l,customParameters:o,apiKey:u}}=t[0];return await async function(e,t,a,n){let{url:l,customParameters:o,apiKey:s}=t,{serviceJSON:u,layersJSON:y}=await(0,i.A6)(l,{customParameters:o,apiKey:s});if(!n)return void P(e,u);let c=A(e.layers,u.layers,a),f=A(e.tables,u.tables,a);e.layers=c.itemResources,e.tables=f.itemResources,P(e,u),await async function(e,t,a,n){let l=await async function(e){let t=new Set,a=[];for(let{type:n}of e){let e=(0,i.Jo)(n);if(e&&!t.has(n))switch(t.add(n),e){case"AnnotationFeatureLayer":a.push(r.e(737).then(()=>r(20737)).then(e=>e.default));break;case"CatalogLayer":a.push(Promise.all([r.e(1722),r.e(1214),r.e(6854),r.e(9789),r.e(893),r.e(7),r.e(1549)]).then(()=>r(83508)).then(e=>e.default));break;case"DimensionFeatureLayer":a.push(r.e(5077).then(()=>r(25077)).then(e=>e.default));break;case"FeatureLayer":a.push(Promise.all([r.e(6361),r.e(9953),r.e(1722),r.e(1214),r.e(6854),r.e(1017),r.e(9789),r.e(8589),r.e(2938)]).then(()=>r(18589)).then(e=>e.default));break;case"OrientedImageryLayer":a.push(Promise.all([r.e(6361),r.e(9953),r.e(1722),r.e(1214),r.e(6854),r.e(1017),r.e(9789),r.e(8589),r.e(4051)]).then(()=>r(16852)).then(e=>e.default))}}let n=await Promise.all(a),l=new Map;return Array.from(t).forEach((e,t)=>{l.set(e,n[t])}),l}(t),o=[];for(let{id:e,type:r}of t){let t=l.get(r);t&&o.push(new t({url:a,layerId:e,sourceJSON:n.find(({id:t})=>t===e)}))}await Promise.allSettled(o.map(e=>e.load()));for(let t of o){let{layerId:r,loaded:a}=t;if(!a||!("defaultPopupTemplate"in t)||!t.defaultPopupTemplate)continue;let n={id:r,popupInfo:t.defaultPopupTemplate.toJSON()};g(t,"ArcGISFeatureLayer"===t.operationalLayerType?n:{...n,layerType:t.operationalLayerType},e)}}(e,[...c.added,...f.added],l,y?[...y.layers,...y.tables]:[])}(n,{url:l??"",customParameters:o,apiKey:u},t.map(e=>e.layer.layerId),a),n}(t,e);for(let t of e)g(t.layer,t.layerJSON,a);return function(e,t){let r=[],a=[];for(let{layer:e}of t){let{isTable:t,layerId:n}=e;t?a.push(n):r.push(n)}S(e.layers,r),S(e.tables,a)}(a,e),a}(t,e)}function S(e,t){if(e.length<2)return;let r=[];for(let{id:t}of e)r.push(t);(0,a.aI)(r.sort(T),t.slice().sort(T))&&e.sort((e,r)=>{let a=t.indexOf(e.id),n=t.indexOf(r.id);return a<n?-1:+(a>n)})}function T(e,t){return e<t?-1:+(e>t)}function A(e,t,r){let n=(0,a.iv)(e,t,(e,t)=>e.id===t.id);e=e.filter(e=>!n.removed.some(t=>t.id===e.id));let l=n.added;for(let{id:t}of l)e.push({id:t});return{itemResources:e,added:l.filter(({id:e})=>!r.includes(e))}}function g(e,t,r){e.isTable?v(r.tables,t):v(r.layers,t)}function v(e,t){let r=e.findIndex(({id:e})=>e===t.id);-1===r?e.push(t):e[r]=t}function P(e,t){let r=e.layers??[],a=e.tables??[],n=[...t.layers??[],...t.tables??[]];for(let e of[...r,...a]){let{id:t}=e;if("layerType"in e&&e.layerType)continue;let r=n.find(({id:e})=>e===t);if(!r)continue;let l=(0,i.Aq)(r.type,a.includes(e));l&&L(0,l)&&O(l)&&(e.layerType=l)}}function L(e,t){return"ArcGISFeatureLayer"!==t&&"Table"!==t}function O(e){return"ArcGISFeatureLayer"!==e&&"Table"!==e}function N(e){if(!("layerType"in e))return!!e.charts?.length;switch(e.layerType){case"CatalogLayer":return!!e.footprintLayer?.charts?.length;case"OrientedImageryLayer":return!!e.charts?.length;case"SubtypeGroupLayer":return!!e.layers.some(e=>!!e.charts?.length);case"SubtypeGroupTable":return!!e.tables.some(e=>!!e.charts?.length)}return!1}function E(e,t){let r=0,a=0,n=0,l=0,i=0,o=0,u=0;for(let e of[...t.layers,...t.tables])if(N(e)&&u++,"layerType"in e)switch(e.layerType){case"CatalogLayer":r++;break;case"OrientedImageryLayer":a++;break;case"ParcelLayer":i++;break;case"SubtypeGroupLayer":n++;break;case"SubtypeGroupTable":l++;break;case"UtilityNetworkLayer":o++}(0,s.Sm)(e,s.mm.CATALOG_LAYER,r>0),(0,s.Sm)(e,s.mm.ORIENTED_IMAGERY_LAYER,a>0),(0,s.Sm)(e,s.mm.PARCEL_FABRIC,i>0),(0,s.Sm)(e,s.mm.SUBTYPE_GROUP_LAYER,n>0),(0,s.Sm)(e,s.mm.SUBTYPE_GROUP_TABLE,l>0),(0,s.Sm)(e,s.mm.UTILITY_NETWORK,o>0),(0,s.Sm)(e,s.mm.CHARTS,u>0)}function R(e,t,r){E(t,r)}async function U(e,t,r){let{url:a,layerId:n,title:i,fullExtent:o,isTable:u}=e;t.url=("FeatureServer"===(0,l.qg)(a)?.serverType?a:`${a}/${n}`)??null,t.title||=i,t.extent=null,!u&&null!=o&&(t.extent=await(0,s.sQ)(o)),function(e,t,r){(0,s.OM)(t,s.mm.METADATA),(0,s.Sm)(t,s.mm.MULTI_LAYER,e.length>1),(0,s.Sm)(t,s.mm.SINGLE_LAYER,1===e.length),(0,s.Sm)(t,s.mm.TABLE,r.tables.length>0&&0===r.layers.length),E(t,r)}([e],t,r)}async function x(e,t){return(0,n.UN)({layer:e,itemType:u,validateLayer:m,createJSONContext:t=>d(t,e),createItemData:(e,t)=>I(t,[e]),errorNamePrefix:c,setItemProperties:R},t)}async function C(e,t,r){return(0,n.Uh)({layer:e,itemType:u,validateLayer:m,createJSONContext:t=>d(t,e),createItemData:(e,t)=>Promise.resolve(b(e)),errorNamePrefix:f,newItem:t,setItemProperties:U},r)}},71530(e,t,r){r.d(t,{UN:()=>b,Uh:()=>I});var a=r(49186),n=r(46130),l=r(20655),i=r(80812),o=r(88788),s=r(10407),u=r(26121);async function y(e){let{layer:t,errorNamePrefix:r,validateLayer:n}=e;await t.load(),function(e,t,r){let n=r(e);if(!n.isValid)throw new a.A(`${t}:invalid-parameters`,n.errorMessage,{layer:e})}(t,r,n)}function c(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function f(e){let{item:t,errorNamePrefix:r,layer:n,validateItem:l}=e;if(function(e){let{item:t,itemType:r,additionalItemType:n,errorNamePrefix:l,layer:i}=e,o=[r];if(n&&o.push(n),!o.includes(t.type)){let e=o.map(e=>`'${e}'`).join(", ");throw new a.A(`${l}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:t,layer:i})}}(e),l){let e=l(t);if(!e.isValid)throw new a.A(`${r}:invalid-parameters`,e.errorMessage,{layer:n})}}function p(e){let{layer:t,errorNamePrefix:r}=e,{portalItem:n}=t;if(!n)throw new a.A(`${r}:portal-item-not-set`,c(t,"requires the portalItem property to be set"));if(!n.loaded)throw new a.A(`${r}:portal-item-not-loaded`,c(t,"cannot be saved to a portal item that does not exist or is inaccessible"));f({...e,item:n})}function m(e){let{newItem:t,itemType:r}=e,a=i.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=l.A.getDefault(),f({...e,item:a}),a}function d(e){return(0,o.m)(e,"portal-item")}async function h(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();let a=e.write({},t);return await Promise.all(t.resources?.pendingOperations??[]),(0,u.ci)(t,{errorName:"layer-write:unsupported"},r),a}function w(e){(0,s.LG)(e,s.mm.JSAPI),e.typeKeywords&&=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t)}async function b(e,t){let{layer:r,createItemData:a,createJSONContext:l,setItemProperties:i,saveResources:o,supplementalUnsupportedErrors:s}=e;await y(e),p(e);let u=r.portalItem,c=l?l(u):d(u),f=await a({layer:r,layerJSON:await h(r,c,{...t,supplementalUnsupportedErrors:s})},u);return await(i?.(r,u,f)),w(u),await u.update({data:f}),(0,n.v)(c),await(o?.(u,c)),u}async function I(e,t){let{layer:r,createItemData:a,createJSONContext:l,setItemProperties:i,saveResources:o,supplementalUnsupportedErrors:s}=e;await y(e);let u=m(e),c=l?l(u):d(u),f=await a({layer:r,layerJSON:await h(r,c,{...t,supplementalUnsupportedErrors:s})},u);return await i(r,u,f),w(u),await async function(e,t,r){let a=e.portal;await a.signIn(),await a.user.addItem({item:e,data:t,folder:r?.folder})}(u,f,t),r.portalItem=u,(0,n.v)(c),await(o?.(u,c)),u}},88788(e,t,r){r.d(t,{m:()=>i,v:()=>l});var a=r(84952),n=r(20655);function l(e,t){return{...o(e,t),readResourcePaths:[]}}function i(e,t,r){let n=(0,a.An)(r?.forceNewItemContext?null:e.itemUrl);return{...o(e,t,r),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:r?.withResources?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function o(e,t,r){return{origin:t,url:(0,a.An)(r?.forceNewItemContext?null:e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[514,2827,3932,6553],{78955(e,t,r){r.d(t,{Bw:()=>d,C:()=>i,Cc:()=>x,LI:()=>p,Om:()=>v,S8:()=>M,T9:()=>h,WQ:()=>o,Z0:()=>w,aI:()=>C,hG:()=>y,hZ:()=>l,hs:()=>c,jk:()=>f,m3:()=>g,t2:()=>R});var n=r(34304);function i(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function l(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function o(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function a(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function s(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function u(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function f(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function h(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function p(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function c(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function m(e,t){let r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],l=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+l*l)}function y(e,t){let r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],l=t[3]-e[3];return r*r+n*n+i*i+l*l}function d(e){let t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)}function g(e){let t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i}function M(e,t){let r=t[0],n=t[1],i=t[2],l=t[3],o=r*r+n*n+i*i+l*l;return o>0&&(o=1/Math.sqrt(o),e[0]=r*o,e[1]=n*o,e[2]=i*o,e[3]=l*o),e}function v(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function x(e,t,r,n){let i=t[0],l=t[1],o=t[2],a=t[3];return e[0]=i+n*(r[0]-i),e[1]=l+n*(r[1]-l),e[2]=o+n*(r[2]-o),e[3]=a+n*(r[3]-a),e}function w(e,t,r){let n=t[0],i=t[1],l=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*l+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*l+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*l+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*l+r[15]*o,e}function R(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function C(e,t){let r=e[0],i=e[1],l=e[2],o=e[3],a=t[0],s=t[1],u=t[2],f=t[3],h=(0,n.FD)();return Math.abs(r-a)<=h*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=h*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(l-u)<=h*Math.max(1,Math.abs(l),Math.abs(u))&&Math.abs(o-f)<=h*Math.max(1,Math.abs(o),Math.abs(f))}const S=a,b=s,Z=u,q=m,F=y,z=d,G=g;Object.freeze(Object.defineProperty({__proto__:null,add:o,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:i,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:q,distance:m,div:Z,divide:u,dot:v,equals:C,exactEquals:R,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:z,length:d,lerp:x,max:h,min:f,mul:b,multiply:s,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:M,random:function(e,t=1){let r,i,l,o,a,s,u=n.Ov;do{r=2*u()-1,i=2*u()-1,a=r*r+i*i}while(a>=1);do{l=2*u()-1,o=2*u()-1,s=l*l+o*o}while(s>=1);let f=Math.sqrt((1-a)/s);return e[0]=t*r,e[1]=t*i,e[2]=t*l*f,e[3]=t*o*f,e},round:p,scale:c,scaleAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e},set:l,sqrDist:F,sqrLen:G,squaredDistance:y,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:S,subtract:a,transformMat4:w,transformQuat:function(e,t,r){let n=t[0],i=t[1],l=t[2],o=r[0],a=r[1],s=r[2],u=r[3],f=u*n+a*l-s*i,h=u*i+s*n-o*l,p=u*l+o*i-a*n,c=-o*n-a*i-s*l;return e[0]=f*u+c*-o+h*-s-p*-a,e[1]=h*u+c*-a+p*-o-f*-s,e[2]=p*u+c*-s+f*-a-h*-o,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},76553(e,t,r){function n(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>n})},96520(e,t,r){r.d(t,{u:()=>s});var n=r(86211),i=r(21325),l=r(52006);function o(e,t,r){if(null==e.hasM||e.hasZ)for(let e of t)for(let t of e)t.length>2&&(t[2]*=r)}function a(e,t,r){if(null==e.hasM||e.hasZ)for(let e of t)for(let t of e){let e=(0,l.yP)(t);e.length>2&&(e[2]*=r)}}function s(e,t,r){if(!e&&!t||!r)return;let i=(0,n.G9)(r);u(e,r,i),u(t,r,i)}function u(e,t,r){if(e)for(let n of e)f(n.geometry,t,r)}function f(e,t,r){if(!e?.spatialReference||(0,i.aI)(e.spatialReference,t))return;let l=(0,n.G9)(e.spatialReference)/r;if(1!==l)if("x"in e)null!=e.z&&(e.z*=l);else if("curveRings"in e)a(e,e.curveRings,l);else if("curvePaths"in e)a(e,e.curvePaths,l);else if("rings"in e)o(e,e.rings,l);else if("paths"in e)o(e,e.paths,l);else if("points"in e&&(null==e.hasM||e.hasZ))for(let t of e.points)t.length>2&&(t[2]*=l)}},22671(e,t,r){r.d(t,{A:()=>M});var n,i=r(32198),l=r(52106),o=r(66552),a=r(25482),s=r(4718),u=r(91429),f=r(16930),h=r(60408),p=r(65864),c=r(50498),m=r(20437),y=r(36005),d=r(43937);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let M=n=class extends a.o{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){return this.readFeaturesWithClass(e,t,l.A)}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);let{features:i}=this;if(i)for(let e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,n=(0,p.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=f.A.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,s.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let n=t.features[r];n.geometry&&=(e?.[r])?.toJSON()||n.geometry}return t}quantize(e){let{scale:[t,r],translate:[n,i]}=e,l=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-n)/t),e=>Math.round((i-e)/r));for(let e=0,t=l.length;e<t;e++)o?.(l[e].geometry)||(l.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[n,i],scale:[l,o]}=r,a=null,s=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;s=r=>null==r?r:r*t+e}let u=this._getHydrationFunction(e,e=>e*l+n,e=>i-e*o,a,s);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let n=f.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){let l=e[t],o=r.fromJSON(l),a=l.geometry?.spatialReference;null!=o.geometry&&!a&&(o.geometry.spatialReference=n);let s=l.aggregateGeometries,u=o.aggregateGeometries;if(s&&null!=u)for(let e in u){let t=u[e],r=s[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=n)}i.push(o)}return i}_quantizePoints(e,t,r){let n,i,l=[];for(let o=0,a=e.length;o<a;o++){let a=e[o];if(o>0){let e=t(a[0]),o=r(a[1]);(e!==n||o!==i)&&(l.push([e-n,o-i]),n=e,i=o)}else n=t(a[0]),i=r(a[1]),l.push([n,i])}return l.length>0?l: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=>{let n=(0,h.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,l=n.length;e<l;e++){let l=n[e],o=this._quantizePoints(l,t,r);o&&i.push(o)}return i.length>0?((0,h.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{let n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{let l,o,a=(0,h.Bi)(e)?e.rings:e.paths;for(let e=0,n=a.length;e<n;e++){let n=a[e];for(let e=0,i=n.length;e<i;e++){let i=n[e];e>0?(l+=i[0],o+=i[1]):(l=i[0],o=i[1]),i[0]=t(l),i[1]=r(o)}}if(n&&i)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=n(r[2]),r[3]=i(r[3])}}else if(n)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=n(r[2])}}else if(i)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{let l,o,a=e.points;for(let e=0,n=a.length;e<n;e++){let n=a[e];e>0?(l+=n[0],o+=n[1]):(l=n[0],o=n[1]),n[0]=t(l),n[1]=r(o)}if(n&&i)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=n(t[2]),t[3]=i(t[3])}else if(n)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=n(t[2])}else if(i)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=i(t[2])}}:null}};(0,i.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],M.prototype,"displayFieldName",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],M.prototype,"exceededTransferLimit",void 0),(0,i.Cg)([(0,u.MZ)({type:[l.A],json:{write:!0}})],M.prototype,"features",void 0),(0,i.Cg)([(0,y.w)("features")],M.prototype,"readFeatures",null),(0,i.Cg)([(0,u.MZ)({type:[m.A],json:{write:!0}})],M.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],M.prototype,"geometryType",void 0),(0,i.Cg)([(0,d.K)("geometryType")],M.prototype,"writeGeometryType",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],M.prototype,"hasM",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],M.prototype,"hasZ",void 0),(0,i.Cg)([(0,u.MZ)({types:c.yR,json:{write:!0}})],M.prototype,"queryGeometry",void 0),(0,i.Cg)([(0,y.w)("queryGeometry")],M.prototype,"readQueryGeometry",null),(0,i.Cg)([(0,u.MZ)({type:f.A,json:{write:!0}})],M.prototype,"spatialReference",void 0),(0,i.Cg)([(0,d.K)("spatialReference")],M.prototype,"writeSpatialReference",null),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],M.prototype,"transform",void 0),M=n=(0,i.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],M),M.prototype.toJSON.isDefaultToJSON=!0},20816(e,t,r){r.d(t,{We:()=>a,ZJ:()=>s,w5:()=>u});var n=r(56507);const i=(0,r(13069).vD)(),l=new Map,o=new Map;async function a(e,t,r){if(!e||!r)return!1;if(!t)return!0;let i=new URL(e).host,o=l.get(i);if(!o){let t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,n.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function s(e,t,n=!1){if(!e||!t)return!0;let l=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(l)?.entries();if(a)for(let[e,o]of a)if(o.name===t){let t=!o.stack?.hasForwardEdits();if(!t&&n){let[{deleteForwardEdits:t},{default:n}]=await Promise.all([r.e(2186).then(()=>r(32186)),r.e(2558).then(()=>r(32558))]),a=await t(l,e,new n({sessionId:i,moment:o.moment}));return a.success&&o.stack?.clearForwardEdits(),a.success}return t}return!0}function u(e,t){if(!e)return!1;let r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),n=o.get(r)?.entries();if(n)for(let[e,r]of n)if(r.name===t)return"edit"===r.lockType;return!1}new Map,r.d(t,["TA",0,i,"Z3",0,l])}}]);