@arcgis/core 5.1.0-next.59 → 5.1.0-next.60
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.
- package/applications/Components/arcadeFeatureUtils.js +1 -1
- package/applications/Components/featureUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{9321f5ec514805307219.js → 05c8d2c0362af4511d86.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad1946c084219bb678a0.js → 06868e4f52de9d918255.js} +1 -1
- package/assets/esri/core/workers/chunks/{8df0c154bb0d79a905c0.js → 06c0b93e276cfc1fb7ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{05d25a98c54679233902.js → 0888baa99c9007ad63bc.js} +1 -1
- package/assets/esri/core/workers/chunks/{1613123918e9b0f7cfdb.js → 0f597c690e5c60fe944b.js} +1 -1
- package/assets/esri/core/workers/chunks/{e2e3c39876bbe019c57a.js → 0f8736242544f9e9a57a.js} +1 -1
- package/assets/esri/core/workers/chunks/{c9c5e6996f36ec4b1558.js → 11a8541f3909f9ffb000.js} +1 -1
- package/assets/esri/core/workers/chunks/{3de17e89973160b42923.js → 16806f5044a9da553b66.js} +1 -1
- package/assets/esri/core/workers/chunks/{3e0752a81a7247c567ab.js → 185f59f90070d5d6ac94.js} +1 -1
- package/assets/esri/core/workers/chunks/1984c0f037065acd21d3.js +1 -0
- package/assets/esri/core/workers/chunks/1af247c86d1c4ae8fef3.js +1 -0
- package/assets/esri/core/workers/chunks/{1f91280032aa42b1585b.js → 2a7e7a497823e9f05aa3.js} +1 -1
- package/assets/esri/core/workers/chunks/2d92ba11781a3cfc3a78.js +1 -0
- package/assets/esri/core/workers/chunks/{9d580b5bcd59857a5702.js → 2f74147597805828cb38.js} +23 -7
- package/assets/esri/core/workers/chunks/{d9444dd0d40aa8332b28.js → 31e0bfc2cab055aebf9a.js} +1 -1
- package/assets/esri/core/workers/chunks/{93d1118f7a909d123b40.js → 32360a55d1836b2a737e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a9eb90b901e64e67b7a3.js → 368b4c0a5eecbb06feac.js} +1 -1
- package/assets/esri/core/workers/chunks/{7b6e3cc086d13da770fa.js → 37729578a7c4cf15eded.js} +1 -1
- package/assets/esri/core/workers/chunks/{4b3622fc355fd2fd8678.js → 3af1e2f0b3d30c58d0c2.js} +1 -1
- package/assets/esri/core/workers/chunks/{83113a9e284701d053b5.js → 3c155efd5768003a91eb.js} +1 -1
- package/assets/esri/core/workers/chunks/{7ed2aa1092c0a2c839c0.js → 3f0d9fdd8c37605dd85d.js} +1 -1
- package/assets/esri/core/workers/chunks/{86a6dd19903fa5023cc7.js → 58614f12796dbba013f4.js} +1 -1
- package/assets/esri/core/workers/chunks/{26cafd20c8d03c274389.js → 5c1abb46b9937a050c32.js} +1 -1
- package/assets/esri/core/workers/chunks/{1f8e22df08c2f5fbb8c8.js → 6172715b2b2853819d8a.js} +1 -1
- package/assets/esri/core/workers/chunks/{87077f4cbca13e030411.js → 62c2757f5dc4aaca2df8.js} +1 -1
- package/assets/esri/core/workers/chunks/{23f6d24bf850bc3280ec.js → 6355de3ee89916b74dae.js} +1 -1
- package/assets/esri/core/workers/chunks/64ad6130de549083caba.js +1 -0
- package/assets/esri/core/workers/chunks/{9b53aa2429573f1b977f.js → 68475eba323b4aa892a3.js} +1 -1
- package/assets/esri/core/workers/chunks/{a7a553e245ba011d259f.js → 78c7eace6ec3fa5c7413.js} +1 -1
- package/assets/esri/core/workers/chunks/7cee28575fd57430cf02.js +1 -0
- package/assets/esri/core/workers/chunks/{b20f4c82d0b44fdb4670.js → 7e1ef2a55f8d123f31e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{5a9f5a49dc68b42762bb.js → 8083dface1ca2dbd12b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{85c72d9fa533552a6e8a.js → 82e0691995d821137d5f.js} +1 -1
- package/assets/esri/core/workers/chunks/{ec1b2eb05410848081c9.js → 8432ffc33843e898bab7.js} +1 -1
- package/assets/esri/core/workers/chunks/{bacc343a79828e456de7.js → 8435b6bf356959009b76.js} +1 -1
- package/assets/esri/core/workers/chunks/{56bce3a6701f8549606b.js → 8878ab87ef7961fafae8.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ef740d25dc17bef11b2.js → 8a893f23827769d42092.js} +1 -1
- package/assets/esri/core/workers/chunks/{e8a23ae30d586e3a973c.js → 8e68b4628e9616356c34.js} +1 -1
- package/assets/esri/core/workers/chunks/{e7e565e7c0ce1464c6b0.js → 8ea67b502f9355dab7e9.js} +1 -1
- package/assets/esri/core/workers/chunks/{66fc3c4d6c54eee231b9.js → 8edae79554843dd77ada.js} +1 -1
- package/assets/esri/core/workers/chunks/{0e88e61d89f89994c4bf.js → 909ef35fa33be2b6da41.js} +1 -1
- package/assets/esri/core/workers/chunks/{c91d39e8e14be3d8bdf5.js → 90b7acc70adba193b215.js} +1 -1
- package/assets/esri/core/workers/chunks/{b1a0a7cdaf50f98adb3e.js → 97f10efb0fe05bedcebd.js} +1 -1
- package/assets/esri/core/workers/chunks/98f5bf1b91f3696b2fce.js +1 -0
- package/assets/esri/core/workers/chunks/{4fb718174c6e07d752e0.js → 9c52d4b54dfdb69dee29.js} +1 -1
- package/assets/esri/core/workers/chunks/{5143f74f1fe7533a6069.js → 9c72127de7afcbaafbaf.js} +1 -1
- package/assets/esri/core/workers/chunks/{155c741a9839d24f04a2.js → 9def5d17b94e5db71883.js} +1 -1
- package/assets/esri/core/workers/chunks/{a41fabf8b2cf15b7d0c9.js → a10be7eb05a007fff1ed.js} +1 -1
- package/assets/esri/core/workers/chunks/{ab3183f2327ff26e2b45.js → a226ba96d9a3ecc14e3e.js} +1 -1
- package/assets/esri/core/workers/chunks/{2bc6edeb3156d241677b.js → a32c87b89567a9fd1efc.js} +1 -1
- package/assets/esri/core/workers/chunks/{e26894655823849947f4.js → a446dff865332268625a.js} +1 -1
- package/assets/esri/core/workers/chunks/a520f83ae0c3c3e78858.js +1 -0
- package/assets/esri/core/workers/chunks/{bb047157f09471ecea53.js → a6d166058e3025bb280e.js} +1 -1
- package/assets/esri/core/workers/chunks/{691d0a60354b6458b9de.js → a80eb704e75d13732878.js} +1 -1
- package/assets/esri/core/workers/chunks/{75e28458e08b0738b35a.js → ab223c508f3dd562e7d3.js} +2 -2
- package/assets/esri/core/workers/chunks/{3cb0f020f9bfc6653c5d.js → b42487c6a989e11a2559.js} +1 -1
- package/assets/esri/core/workers/chunks/b6d94cbd1c5adad2f247.js +1 -0
- package/assets/esri/core/workers/chunks/{cd391415b8b8320e12e4.js → b75165880704efccc47c.js} +1 -1
- package/assets/esri/core/workers/chunks/{45eddf3918973fa8d751.js → ba72989749543122a6fe.js} +1 -1
- package/assets/esri/core/workers/chunks/{0b4a2361b9f9a6c0b8a7.js → ba9e107edc2027238be3.js} +1 -1
- package/assets/esri/core/workers/chunks/be1d2c3a61e6447fbbc7.js +1 -0
- package/assets/esri/core/workers/chunks/{e9dd60d0220036545ebb.js → bf4bad2c9a541cd425f5.js} +1 -1
- package/assets/esri/core/workers/chunks/{78cb6b9ab32abdd1d530.js → c08e9914deb1dc62bc0f.js} +1 -1
- package/assets/esri/core/workers/chunks/{52dbfd7519555028a8af.js → c0bb53d8d58ad18334d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{c6149e0ac1c103e03baf.js → c0d453f93af2d4a6ce64.js} +1 -1
- package/assets/esri/core/workers/chunks/c72e90a952543d06d84b.js +1 -0
- package/assets/esri/core/workers/chunks/{005fe95c3329cfe74219.js → cf7acf5acb6d322fd996.js} +1 -1
- package/assets/esri/core/workers/chunks/{457bbf27e9bc18132464.js → d23dd7da45a7aa341540.js} +1 -1
- package/assets/esri/core/workers/chunks/{929b26999321519824b9.js → d2801df3fa44dee15ec8.js} +1 -1
- package/assets/esri/core/workers/chunks/{932a0b39d85a76377d52.js → d626e08d23330d84413b.js} +1 -1
- package/assets/esri/core/workers/chunks/{9d11e7972bc298cb94ce.js → db6e03fe8dd316f5005f.js} +1 -1
- package/assets/esri/core/workers/chunks/{a37697ef360e2425768a.js → dca595fdd5e1a571e441.js} +1 -1
- package/assets/esri/core/workers/chunks/{da2a10e72a315c3c1f82.js → e2779965db231fb666a5.js} +1 -1
- package/assets/esri/core/workers/chunks/{f7af90c5f9d371eb7009.js → e4144ccc85ad4c76a9b7.js} +1 -1
- package/assets/esri/core/workers/chunks/{9066f095f16448c0a04e.js → e4e2f059c52674dcae5b.js} +1 -1
- package/assets/esri/core/workers/chunks/edc2e87968c958bc852b.js +1 -0
- package/assets/esri/core/workers/chunks/{a256edc8337e462f80f0.js → efdd75896ca53eb6242f.js} +1 -1
- package/assets/esri/core/workers/chunks/{c250799c131aa4ed2c35.js → f1c348cf2a1e35da9b20.js} +1 -1
- package/assets/esri/core/workers/chunks/{861a7d0e665add901e11.js → f4d577ff61da7964e08a.js} +1 -1
- package/assets/esri/core/workers/chunks/{5aff2d6ae0d2a2d92ecc.js → f7da652f8dab57677cc3.js} +1 -1
- package/chunks/GlobalIllumination.glsl.js +24 -8
- package/chunks/OITBlend.glsl.js +4 -3
- package/config.js +1 -1
- package/interfaces.d.ts +7 -0
- package/kernel.js +1 -1
- package/layers/graphics/OptimizedGeometry.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/RasterJobHandlerMixin.js +1 -1
- package/layers/raster/functions/vectorFieldUtils.js +1 -1
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/TitleCreator.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/networks/support/NamedTraceConfiguration.d.ts +2 -1
- package/networks/support/NamedTraceConfiguration.js +1 -1
- package/networks/support/TraceConfiguration.d.ts +4 -2
- package/networks/support/TraceConfiguration.js +1 -1
- package/package.json +2 -2
- package/popup/Feature.d.ts +250 -0
- package/popup/Feature.js +2 -0
- package/popup/support/arcadeFeatureUtils.js +2 -0
- package/popup/support/featureUtils.js +2 -0
- package/popup/support/relatedFeatureUtils.js +2 -0
- package/popup/types.d.ts +17 -3
- package/support/revision.js +1 -1
- package/tables/AttributeTableTemplate.d.ts +2 -2
- package/tables/elements/AttributeTableGroupElement.d.ts +3 -16
- package/tables/support/tablesUtils.d.ts +6 -5
- package/tables/types.d.ts +18 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/schema/SourceSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
- package/views/2d/layers/imagery/ImageryVFStrategy.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
- package/views/3d/support/GaussianSplatSortWorker.js +1 -1
- package/views/3d/support/GaussianSplatWorkerHandle.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/shaders/GlobalIllumination.glsl.js +1 -1
- package/widgets/Attachments/AttachmentsViewModel.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/support/EditorEditingCapabilities.js +1 -1
- package/widgets/Feature/FeatureContent/FeatureContentViewModel.js +1 -1
- package/widgets/Feature/FeatureContent.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureFields/FeatureFieldsViewModel.js +1 -1
- package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm/RelationshipInput.js +1 -1
- package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +1 -1
- package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Popup/actionUtils.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0f2ab57e4eb722b3b0c0.js +0 -1
- package/assets/esri/core/workers/chunks/522bc1d79dbe957301e4.js +0 -1
- package/assets/esri/core/workers/chunks/60ad54e5707d4414d8b9.js +0 -1
- package/assets/esri/core/workers/chunks/76064c2c801da55cd844.js +0 -1
- package/assets/esri/core/workers/chunks/ad4f0a4e2dde44cd43d4.js +0 -1
- package/assets/esri/core/workers/chunks/b3e5dcb530cef678c8f8.js +0 -1
- package/assets/esri/core/workers/chunks/d01a98c13501c89205b6.js +0 -1
- package/assets/esri/core/workers/chunks/d3b3e8c6d7096bc59489.js +0 -1
- package/assets/esri/core/workers/chunks/d53c6fc10425adc2c0cf.js +0 -1
- package/assets/esri/core/workers/chunks/e543bb228f3f9d937d43.js +0 -1
- package/assets/esri/core/workers/chunks/f8ee1a99580a7da42cde.js +0 -1
- package/widgets/Feature/support/arcadeFeatureUtils.js +0 -2
- package/widgets/Feature/support/featureUtils.js +0 -2
- package/widgets/Feature/support/relatedFeatureUtils.js +0 -2
- /package/assets/esri/core/workers/chunks/{75e28458e08b0738b35a.js.LICENSE.txt → ab223c508f3dd562e7d3.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8190],{52106(e,t,r){r.d(t,{A:()=>Z});var o,s,i=r(5482),n=r(37838),l=r(69540),a=r(51447),u=r(25482),p=r(53966),d=r(36708),h=r(24326),c=r(91429),y=r(12195),g=r(65864),m=r(50498),f=r(55156),v=r(60950),C=r(54339),M=r(94128),b=r(33910);function w(e){if(null==e)return null;const t={};for(const r in e){const o=e[r];o&&(t[r]=o.toJSON())}return 0!==Object.keys(t).length?t:null}let Z=class extends((0,l.OU)(u.o)){static{o=M.Z}static{s=this}constructor(e){super(e),this[o]=!0,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,h.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new s({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,v.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,f.I)(this.origin);if(e)return(0,C.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,C.r)(this,t):null}getGlobalId(){const e=(0,f.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:w(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,y.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,o){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(s.action=o),"attributes"===e&&(s.attributeName=o),this.layer.graphicChanged(s)}_watchMeshGeometryChanges(){this.addHandles([(0,d.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,d.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,i.Cg)([(0,c.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const o=(0,g.rS)(e[r]);o&&(t[r]=o)}return 0!==Object.keys(t).length?t:null}}})],Z.prototype,"aggregateGeometries",null),(0,i.Cg)([(0,c.MZ)({value:null})],Z.prototype,"attributes",null),(0,i.Cg)([(0,c.MZ)({value:null,types:m.yR,json:{read:g.rS}})],Z.prototype,"geometry",null),(0,i.Cg)([(0,c.MZ)({type:Boolean})],Z.prototype,"isAggregate",void 0),(0,i.Cg)([(0,c.MZ)({clonable:!1})],Z.prototype,"layer",void 0),(0,i.Cg)([(0,c.MZ)({clonable:"reference"})],Z.prototype,"origin",void 0),(0,i.Cg)([(0,c.MZ)({type:n.A,value:null})],Z.prototype,"popupTemplate",null),(0,i.Cg)([(0,c.MZ)({clonable:"reference"})],Z.prototype,"sourceLayer",void 0),(0,i.Cg)([(0,c.MZ)({value:null,types:b.Es})],Z.prototype,"symbol",null),(0,i.Cg)([(0,c.MZ)({clonable:!1,json:{read:!1,write:!1}})],Z.prototype,"_version",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,value:!0})],Z.prototype,"visible",null),Z=s=(0,i.Cg)([(0,c.$K)("esri.Graphic")],Z)},4902(e,t,r){r.d(t,{s:()=>n});var o=r(5482),s=r(64108);let i=0;const n=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+i++})}};return r=(0,o.Cg)([(0,s.$)("esri.core.Identifiable")],r),r};n(class{})},92474(e,t,r){r.d(t,{WV:()=>h,Zm:()=>y,x_:()=>c});var o=r(5482),s=r(49186),i=r(97768),n=r(61893),l=r(17676),a=r(67076),u=r(10107),p=r(64108);const d="loaded",h=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise(e=>{const t=this.load.bind(this);this.load=r=>{const o=new Promise((e,t)=>{const o=(0,l.NY)(r,t);this.destroyed&&t(new s.A("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(e,t).finally(()=>{o&&o.remove()})});if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const e=this._loadController=new AbortController;t({signal:e.signal})}return e(),o}})),this.when(()=>{this._set("loadStatus",d),this._loadController=null},e=>{this.destroyed||(this._set("loadStatus","failed"),this._set("loadError",e),this._loadController=null)})}destroy(){this._loadController&&(this._loadController=(0,i.DC)(this._loadController),this._promiseProps.abort()),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===d}get loadWarnings(){return this._get("loadWarnings")}load(e){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new s.A("load:cancelled","Cancelled")),this._loadController?.abort(),this._promiseProps.abort()),this}};return(0,o.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"loaded",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"loadError",void 0),(0,o.Cg)([(0,u.MZ)({clonable:!1})],r.prototype,"loadStatus",void 0),(0,o.Cg)([(0,u.MZ)({type:[a.A],readOnly:!0})],r.prototype,"loadWarnings",null),r=(0,o.Cg)([(0,p.$)("esri.core.Loadable")],r),r},c=h(n.Z);function y(e){return!(!e||!e.load)}},61893(e,t,r){r.d(t,{Z:()=>p,g:()=>u});var o=r(5482),s=r(69622),i=r(36563),n=r(17676),l=r(64108);class a{constructor(){this._resolver=Promise.withResolvers(),this._status=0,this._resolvingPromises=[],this._resolver.promise.then(()=>{this._status=1,this._cleanUp()},()=>{this._status=2,this._cleanUp()}),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(e){this._resolvingPromises.push(e),this._tryResolve()}isResolved(){return 1===this._status}isRejected(){return 2===this._status}isFulfilled(){return 0!==this._status}abort(){this._resolver.reject((0,n.NK)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const e=Promise.withResolvers(),t=[...this._resolvingPromises,e.promise],r=this._allPromise=Promise.all(t);r.then(()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()},e=>{this.isFulfilled()||this._allPromise!==r||(0,n.zf)(e)||this._resolver.reject(e)}),e.resolve()}}const u=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),this._promiseProps=new a,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(e,t){return this._promiseProps.promise.then(()=>this).then(e,t)}catch(e){return this.when(null,e)}addResolvingPromise(e){e&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in e?e.when():e)}addResolvingTask(e){e&&!this._promiseProps.isFulfilled()&&(this.addHandles((0,i.rE)(e)),this._promiseProps.addResolvingPromise(e.promise))}};return r=(0,o.Cg)([(0,l.$)("esri.core.Promise")],r),r},p=u(s.A)},16494(e,t,r){r.d(t,{Nd:()=>l,W5:()=>n});var o=r(17632);const s=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),i=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],n=new o.I({whiteList:s,onTagAttr:(e,t,r)=>{const o=`${t}="${r}"`;if(i.includes(t))return o},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),l=new o.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},55156(e,t,r){r.d(t,{I:()=>s,e:()=>o});const o=Symbol("idFieldsProviderSymbol");function s(e){return(t=e)&&o in t?e[o]:void 0;var t}},4146(e,t,r){r.d(t,{A:()=>v});var o=r(5482),s=r(11254),i=r(49186),n=r(65529),l=r(4902),a=r(92474),u=r(53966),p=r(17676),d=r(84952),h=r(91429),c=r(5443),y=r(16930),g=r(92602),m=r(79677);let f=0,v=class extends((0,n.Zt)((0,l.s)(a.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new c.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+f++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:o}=await Promise.all([r.e(812),r.e(5613),r.e(5710)]).then(r.bind(r,45613));try{return await o(t)}catch(e){const r=t?.portalItem,o=r?.id||"unset",s=r?.portal?.url||g.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+o+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,p.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new i.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new i.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,o.Cg)([(0,h.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,o.Cg)([(0,h.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,o.Cg)([(0,h.MZ)({type:c.A})],v.prototype,"fullExtent",void 0),(0,o.Cg)([(0,h.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,o.Cg)([(0,h.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,o.Cg)([(0,h.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,o.Cg)([(0,h.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,o.Cg)([(0,h.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,o.Cg)([(0,h.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,o.Cg)([(0,h.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,o.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,o.Cg)([(0,h.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,o.Cg)([(0,h.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,o.Cg)([(0,h.MZ)({type:y.A})],v.prototype,"spatialReference",void 0),(0,o.Cg)([(0,h.MZ)({type:String})],v.prototype,"title",void 0),(0,o.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,o.Cg)([(0,h.MZ)()],v.prototype,"url",void 0),(0,o.Cg)([(0,h.MZ)({type:m.A})],v.prototype,"visibilityTimeExtent",void 0),(0,o.Cg)([(0,h.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,o.Cg)([(0,h.$K)("esri.layers.Layer")],v)},52136(e,t,r){r.d(t,{p:()=>i});var o=r(5482),s=r(91429);const i=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,o.Cg)([(0,s.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,o.Cg)([(0,s.$K)("esri.layers.mixins.APIKeyMixin")],r),r}},32756(e,t,r){r.d(t,{Rr:()=>l,fY:()=>u,ne:()=>a});var o=r(5482),s=r(93637),i=r(91429),n=r(91880);function l(e,t,r){if(!e)return null;const o=e.find(e=>!!e.field);if(!o)return null;const s=new n.A;return s.read(o,r),[s]}const a={type:[n.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,o){const i=e.find(e=>!!e.field);i&&(0,s.sM)(r,[i.toJSON()],t)}}}},u=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,o.Cg)([(0,i.MZ)(a)],r.prototype,"orderBy",void 0),r=(0,o.Cg)([(0,i.$K)("esri.layers.mixins.OrderedLayer")],r),r}},28032(e,t,r){r.d(t,{A:()=>a});var o=r(5482),s=r(69540),i=r(25482),n=r(91429),l=r(56400);let a=class extends((0,s.OU)(i.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,o.Cg)([(0,n.MZ)()],a.prototype,"creatorField",void 0),(0,o.Cg)([(0,n.MZ)()],a.prototype,"creationDateField",void 0),(0,o.Cg)([(0,n.MZ)()],a.prototype,"editorField",void 0),(0,o.Cg)([(0,n.MZ)()],a.prototype,"editDateField",void 0),(0,o.Cg)([(0,n.MZ)()],a.prototype,"realm",void 0),(0,o.Cg)([(0,n.MZ)((0,l.P6)("dateFieldsTimeReference",!0))],a.prototype,"timeZone",void 0),a=(0,o.Cg)([(0,n.$K)("esri.layers.support.EditFieldsInfo")],a)},29005(e,t,r){r.d(t,{A:()=>u});var o=r(5482),s=r(69540),i=r(66552),n=r(25482),l=r(91429);const a=new i.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,s.OU)(n.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,o.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,o.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,o.Cg)([(0,l.MZ)({json:{read:a.read,write:a.write}})],u.prototype,"drawingTool",void 0),(0,o.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,o.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,o.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],u)},33143(e,t,r){r.d(t,{A:()=>d});var o=r(5482),s=r(69540),i=r(25482),n=r(91429),l=r(8631),a=r(29005),u=r(36005),p=r(43937);let d=class extends((0,s.OU)(i.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,l.r)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,o.Cg)([(0,n.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,o.Cg)([(0,n.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,o.Cg)([(0,n.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,o.Cg)([(0,u.w)("domains")],d.prototype,"readDomains",null),(0,o.Cg)([(0,p.K)("domains")],d.prototype,"writeDomains",null),(0,o.Cg)([(0,n.MZ)({type:[a.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,o.Cg)([(0,n.$K)("esri.layers.support.FeatureType")],d)},37352(e,t,r){r.d(t,{A:()=>a});var o,s=r(5482),i=r(7762),n=r(25482),l=r(91429);let a=o=class extends n.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new i.A}clone(){return new o({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"floorField",void 0),(0,s.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllMode",void 0),(0,s.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllLevelIds",void 0),a=o=(0,s.Cg)([(0,l.$K)("esri.layers.support.LayerFloorInfo")],a)},91880(e,t,r){r.d(t,{A:()=>u});var o,s=r(5482),i=r(66552),n=r(25482),l=r(91429);const a=new i.J({asc:"ascending",desc:"descending"});let u=class extends n.o{static{o=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new o({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,s.Cg)([(0,l.MZ)({type:a.apiValues,json:{type:a.jsonValues,read:a.read,write:a.write}})],u.prototype,"order",void 0),u=o=(0,s.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],u)},45067(e,t,r){r.d(t,{A:()=>p});var o=r(5482),s=r(69540),i=r(66552),n=r(25482),l=r(91429);const a=new i.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new i.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let p=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,o.Cg)([(0,l.MZ)({json:{read:a.read,write:a.write}})],p.prototype,"cardinality",void 0),(0,o.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],p.prototype,"catalogId",void 0),(0,o.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"composite",void 0),(0,o.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"id",void 0),(0,o.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyField",void 0),(0,o.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyFieldInRelationshipTable",void 0),(0,o.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"name",void 0),(0,o.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"relatedTableId",void 0),(0,o.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"relationshipTableId",void 0),(0,o.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"role",void 0),p=(0,o.Cg)([(0,l.$K)("esri.layers.support.Relationship")],p)},17311(e,t,r){r.d(t,{A:()=>c});var o=r(5482),s=r(69622),i=r(4576),n=r(60999),l=r(7762),a=r(16494),u=r(91429),p=r(30524),d=r(43668);const h=/<br\s*\/*>/gi;let c=class extends s.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,n.UT)(()=>(0,d.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([r.e(4560),r.e(9926)]).then(r.bind(r,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),o=this.fieldsIndex.get(r.at(-1)??"");o&&e.add(o.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const o=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(o)??""}async getTitles(e,t,r){const o=new Map,s=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:i}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:n,workingTitle:l}=this,u=l&&n;t.forEach(t=>{const p=t.getObjectId()??t.attributes[e.objectIdField];let d=u?i({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:n,globalAttributes:this._createFormattedAttributes(e,t,s).global,layer:e,text:l}):"";r?.removeHTML&&(d=a.Nd.sanitize(d).replaceAll(h," ")),o.set(p,d)})}catch{}return o}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(i.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,p.Kl)(e,this.requiredFields))){const o=e.createQuery();o.where="1=1",o.outFields=[...this.requiredFields],o.objectIds=r;const s=await e.queryFeatures(o);if(s?.features.length===t.length)return s.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),o=e?.name??r.fieldName;r.fieldName=o,t.set(o.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const o=this.effectivePopupTemplate?.fieldInfos??[],s={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{s[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const i={...t.attributes,...s};return{global:this._featureUtils.formatAttributes({fieldInfos:o,attributes:i,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,p.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,o.Cg)([(0,u.MZ)({readOnly:!0})],c.prototype,"_arcadeTask",null),(0,o.Cg)([(0,u.MZ)()],c.prototype,"_featureUtils",void 0),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],c.prototype,"featureUtilsPromise",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],c.prototype,"calculatedExpressions",null),(0,o.Cg)([(0,u.MZ)()],c.prototype,"displayField",void 0),(0,o.Cg)([(0,u.MZ)()],c.prototype,"effectivePopupTemplate",void 0),(0,o.Cg)([(0,u.MZ)()],c.prototype,"expressionsUsedInTitle",null),(0,o.Cg)([(0,u.MZ)()],c.prototype,"fieldsIndex",void 0),(0,o.Cg)([(0,u.MZ)()],c.prototype,"fieldInfoMap",null),(0,o.Cg)([(0,u.MZ)()],c.prototype,"fields",void 0),(0,o.Cg)([(0,u.MZ)()],c.prototype,"objectIdField",void 0),(0,o.Cg)([(0,u.MZ)()],c.prototype,"requiredFields",null),c=(0,o.Cg)([(0,u.$K)("esri.layers.support.TitleCreator")],c)},77548(e,t,r){r.d(t,{Gh:()=>T,tk:()=>Z,BR:()=>w,p2:()=>M,qd:()=>_,wI:()=>b,G$:()=>P,$x:()=>S,Ov:()=>m,UC:()=>h,W_:()=>f,OP:()=>A,TU:()=>g,XX:()=>y,jy:()=>v});var o=r(70333),s=r(11254),i=r(7762),n=(r(84952),r(36563)),l=r(36708),a=r(4146);const u=new WeakMap;function p(e){return!e.destroyed&&(u.has(e)||e.addHandles([(0,l.wB)(()=>{const{parent:t}=e;return!!(t&&t instanceof a.A)&&("catalog-dynamic-group"===t.type||p(t))},t=>u.set(e,t),l.pc),(0,n.hA)(()=>u.delete(e))]),u.get(e))}function d(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function h(e){return d(e,"knowledge-graph-sublayer")}function c(e){const t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}r(16215);const y={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function g(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function m(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function f(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function v(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"oriented-imagery"===e.type}(e)||function(e){return d(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}function C(e){const t=e?.type;return"binning"===t||"cluster"===t}function M(e,t){if(!v(e))return;const r=t?.graphic,o=e.featureReduction;if(r){if(r.isAggregate){const e=r.origin;return e&&"featureReductionProvider"in e&&o?C(o)?o:null:void 0}return e}return t?.checkFeatureReduction&&o?C(o)?o:null:e}async function b(e,t){const r=o.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const i=e.toLowerCase().indexOf("/rest/services");if(-1===i)return null;const n=`${e.slice(0,i)}/rest/info`,l=null!=t?t.signal:null,{data:a}=await(0,s.A)(n,{query:{f:"json"},responseType:"json",signal:l});return a?.owningSystemUrl||null}function w(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function Z(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function _(e){const t=new i.A;for(const r of e.allLayers.concat(e.allTables))p(r)||c(r)||("charts"in r&&t.push(r),"subtype-group"===r.type&&t.push(...r.sublayers));return t}function S(e,t){return null}function P(e){return null}function A(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function T(e,t){if(!t||!A(e))return;const r=(e.url,null);r&&(e.url=r)}},20655(e,t,r){r.d(t,{A:()=>T});var o=r(5482),s=r(92602),i=r(70333),n=r(11254),l=r(49186),a=r(44208),u=r(25482),p=r(92474),d=r(97768),h=r(17676),c=r(91429),y=r(56507),g=r(5443),m=r(73444);let f;var v=r(96360),C=r(16405),M=r(69622);let b=class extends M.A{constructor(e){super(e),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,o.Cg)([(0,c.MZ)()],b.prototype,"nextQueryParams",void 0),(0,o.Cg)([(0,c.MZ)()],b.prototype,"queryParams",void 0),(0,o.Cg)([(0,c.MZ)()],b.prototype,"results",void 0),(0,o.Cg)([(0,c.MZ)()],b.prototype,"total",void 0),b=(0,o.Cg)([(0,c.$K)("esri.portal.PortalQueryResult")],b);var w,Z=r(41318),_=r(926),S=r(36005);let P;const A={PortalGroup:()=>Promise.resolve({default:v.A}),PortalItem:()=>r.e(812).then(r.bind(r,80812)),PortalUser:()=>Promise.resolve({default:Z.A})};let T=class extends((0,u.T)(p.x_)){static{w=this}static{this.AUTH_MODE_ANONYMOUS="anonymous"}static{this.AUTH_MODE_AUTO="auto"}static{this.AUTH_MODE_IMMEDIATE="immediate"}static{this.AUTH_MODE_NO_PROMPT="no-prompt"}constructor(e){super(e),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.g3DTilesGalleryGroupQuery=null,this.g3dTilesEnabled=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.default3DBasemapQuery=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.layoutGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.hasClassificationSchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.recycleBinEnabled=!1,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=s.A.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useDefault3dBasemap=!1,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e}destroy(){O.unregister(this),this.defaultBasemap=(0,d.pR)(this.defaultBasemap),this.defaultDevBasemap=(0,d.pR)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,d.pR)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,d.xt)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(e){if(e)for(const t of e)s.A.request.trustedServers.includes(t)||s.A.request.trustedServers.push(t);return e}readDefaultBasemap(e){return this._readBasemap(e)}readDefaultDevBasemap(e){return this._readBasemap(e)}readDefaultVectorBasemap(e){return this._readBasemap(e)}get extraQuery(){const e=this.user?.orgId,t=!e||this.canSearchPublic;return this.id&&!t?` AND orgid:${this.id}`:null}get hasAPIKey(){return(0,_.Jn)(this.restUrl)}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get loaded(){return super.loaded}get restUrl(){let e=this.url;if(e){const t=e.indexOf("/sharing");e=t>0?e.slice(0,t):this.url.replace(/\/+$/,""),e+="/sharing/rest"}return e}get thumbnailUrl(){const e=this.restUrl,t=this.thumbnail;return e&&t?this._normalizeSSL(e+"/portals/self/resources/"+t):null}readUrlKey(e){return e?e.toLowerCase():e}readUser(e){let t=null;return e&&(t=Z.A.fromJSON(e),t.portal=this),t}load(e){const t=Promise.all([r.e(812),r.e(3116)]).then(r.bind(r,83116)).then(({default:t})=>{(0,h.Te)(e),P=t}).then(()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,e)).then(e=>{if(!this.hasAPIKey&&i.id){const e=i.id;this.credential=e.findCredential(this.restUrl),this.credential||this.authMode!==w.AUTH_MODE_AUTO&&this.authMode!==w.AUTH_MODE_NO_PROMPT||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=e.on("credential-create",function(e){const t=i.id;return()=>{const r=e.deref();r&&t.findCredential(r.restUrl)&&r.signIn().catch(()=>{})}}(new WeakRef(this))),O.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=e,this.read(e)});return this.addResolvingPromise(t),Promise.resolve(this)}async createElevationLayers(){await this.load();const e=this._getHelperService("defaultElevationLayers"),t=(await Promise.all([r.e(3508),r.e(9953),r.e(812),r.e(9186),r.e(2369),r.e(7716)]).then(r.bind(r,62369))).default;return e?e.map(e=>new t({id:e.id,url:e.url})):[]}async fetchBasemaps(e,t){const r=await this._fetchBasemaps(e,t);if(!0===t?.include3d&&!1!==this.use3dBasemaps){if(this.g3dTilesEnabled&&this.g3DTilesGalleryGroupQuery&&(0,a.A)("enable-feature:basemap-groundlayers")){const e=await this._fetchBasemaps3D(this.g3DTilesGalleryGroupQuery,t);r.unshift(...e)}const o=await this._fetchBasemaps3D(e,t);r.unshift(...o)}return r}async fetchDefault3DBasemap(e){if(!this.useDefault3dBasemap||!this.default3DBasemapQuery||"none"===this.default3DBasemapQuery)return null;const t=new C.A;t.query=this.default3DBasemapQuery,t.disableExtraQuery=!0;const r=(await this.queryItems(t,e)).results.find(e=>"Web Scene"===e.type);return r?new P({portalItem:r}):null}fetchCategorySchema(e){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",e).then(e=>e.categorySchema):(0,h.G4)(e)?Promise.reject((0,h.NK)()):Promise.resolve([])}async fetchClassificationSchema(e){return this.hasClassificationSchema?this.request(this.restUrl+"/portals/self/classification/classificationSchema",e).then(e=>e.classificationSchema):null}fetchFeaturedGroups(e){const t=this.featuredGroups,r=new C.A({num:100,sortField:"title"});if(t?.length){const o=[];for(const e of t)o.push(`(title:"${e.title}" AND owner:${e.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,e).then(e=>e.results)}return(0,h.G4)(e)?Promise.reject((0,h.NK)()):Promise.resolve([])}fetchRegions(e){const t=this.user?.culture||this.culture||(0,m.JK)();return this.request(this.restUrl+"/portals/regions",{...e,query:{culture:t}})}fetchSettings(e){const t=this.user?.culture||this.culture||(0,m.JK)();return this.request(this.restUrl+"/portals/self/settings",{...e,query:{culture:t}})}static getDefault(){return f&&!f.destroyed||(f=new w),f}queryGroups(e,t){return this.queryPortal("/community/groups",e,"PortalGroup",t)}queryItems(e,t){return this.queryPortal("/search",e,"PortalItem",t)}queryUsers(e,t){return e.sortField||(e.sortField="username"),this.queryPortal("/community/users",e,"PortalUser",t)}fetchSelf(e=this.authMode,t=!1,r){const o=this.restUrl+"/portals/self",s={authMode:e,query:{culture:(0,m.JK)().toLowerCase()},withCredentials:!0,...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),t&&(s.query.default=!0),this.request(o,s)}queryPortal(e,t,r,o){const s=(0,y.dp)(C.A,t),i=t=>this.request(this.restUrl+e,{...s.toRequestOptions(this),...o}).then(e=>{const r=s.clone();return r.start=e.nextStart,new b({nextQueryParams:r,queryParams:s,total:e.total,results:w._resultsToTypedArray(t,{portal:this},e,o)})}).then(e=>Promise.all(e.results.map(t=>"function"==typeof t.when?t.when():e)).then(()=>e,t=>((0,h.QP)(t),e)));return r&&A[r]?A[r]().then(({default:e})=>((0,h.Te)(o),i(e))):i()}signIn(){if(this.hasAPIKey)return this.load().then(()=>{if(!this.user)throw new l.A("portal:not-authenticated","Unable to authenticate user. Portal.user is missing")});if(this.authMode===w.AUTH_MODE_ANONYMOUS||this.authMode===w.AUTH_MODE_NO_PROMPT&&!i.id)return Promise.reject(new l.A("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const e=e=>Promise.resolve().then(()=>"not-loaded"===this.loadStatus?(e||(this.authMode="immediate"),this.load().then(()=>null)):"loading"===this.loadStatus?this.load().then(()=>this.credential?null:(this.credential=e,this.fetchSelf("immediate"))):this.user&&this.credential===e?null:(this.credential=e,this.fetchSelf("immediate"))).then(e=>{e&&(this.sourceJSON=e,this.read(e))});return i.id?i.id.getCredential(this.restUrl,{prompt:this.authMode!==w.AUTH_MODE_NO_PROMPT}).then(t=>e(t)):e(this.credential)}normalizeUrl(e){const t=this.credential?.token;return this._normalizeSSL(t?e+(e.includes("?")?"&":"?")+"token="+t:e)}requestToTypedArray(e,t,r){return this.request(e,t).then(e=>{const t=w._resultsToTypedArray(r,{portal:this},e);return Promise.all(t.map(t=>"function"==typeof t.when?t.when():e)).then(()=>t,()=>t)})}request(e,t={}){const r={f:"json",...t.query},{authMode:o=(this.authMode===w.AUTH_MODE_ANONYMOUS||this.authMode===w.AUTH_MODE_NO_PROMPT?this.authMode:"auto"),body:s=null,cacheBust:i=!1,method:l="auto",responseType:a="json",signal:u}=t,p={authMode:o,body:s,cacheBust:i,method:l,query:r,responseType:a,timeout:0,signal:u};return t.withCredentials&&(p.withCredentials=!0),(0,n.A)(this._normalizeSSL(e),p).then(e=>e.data)}toJSON(){throw new l.A("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new w({sourceJSON:e})}_getHelperService(e){const t=this.helperServices?.[e];if(!t)throw new l.A("portal:service-not-found",`The \`helperServices\` do not include an entry named "${e}"`);return t}async _fetchBasemaps(e,t){const r=new C.A;r.query=e||((0,_.Dd)()?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const o=await this.queryGroups(r,t);if(!o.total)return[];const s=o.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=s.sortField||"name",r.sortOrder=s.sortOrder||"desc";const i=await s.queryItems(r,t);return i.total?i.results.filter(e=>"Web Map"===e.type).map(e=>new P({portalItem:e})):[]}async _fetchBasemaps3D(e,t){const r=e||this.basemapGalleryGroupQuery3D;if(!r)return[];if((0,_.Dd)())return[];const o=new C.A({query:r,disableExtraQuery:!0}),s=await this.queryGroups(o,t);if(!s.total)return[];const i=s.results[0];o.num=100,o.query='type:"Web Scene"',o.sortField=i.sortField||"name",o.sortOrder=i.sortOrder||"desc";const n=await i.queryItems(o,t);return n.total?n.results.filter(e=>"Web Scene"===e.type).map(e=>new P({portalItem:e})):[]}_normalizeSSL(e){return e.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(e){if(e){const t=P.fromJSON(e);return t.portalItem={portal:this},t}return null}static _resultsToTypedArray(e,t,r,o){let s;if(r){const i=null!=o?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(e||t)&&(s=s.map(r=>{const o=Object.assign(e?e.fromJSON(r):r,t);return"function"==typeof o.load&&o.load(i),o}))}else s=[];return s}};(0,o.Cg)([(0,c.MZ)()],T.prototype,"access",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"allSSL",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"authMode",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"authorizedCrossOriginDomains",void 0),(0,o.Cg)([(0,S.w)("authorizedCrossOriginDomains")],T.prototype,"readAuthorizedCrossOriginDomains",null),(0,o.Cg)([(0,c.MZ)()],T.prototype,"basemapGalleryGroupQuery",void 0),(0,o.Cg)([(0,c.MZ)({json:{name:"3DBasemapGalleryGroupQuery"}})],T.prototype,"basemapGalleryGroupQuery3D",void 0),(0,o.Cg)([(0,c.MZ)({json:{name:"g3DTilesGalleryGroupQuery"}})],T.prototype,"g3DTilesGalleryGroupQuery",void 0),(0,o.Cg)([(0,c.MZ)({json:{name:"g3dTilesEnabled"}})],T.prototype,"g3dTilesEnabled",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"bingKey",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"canListApps",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"canListData",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"canListPreProvisionedItems",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"canProvisionDirectPurchase",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"canSearchPublic",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"canShareBingPublic",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"canSharePublic",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"canSignInArcGIS",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"canSignInIDP",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"colorSetsGroupQuery",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"commentsEnabled",void 0),(0,o.Cg)([(0,c.MZ)({type:Date})],T.prototype,"created",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"credential",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"culture",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"currentVersion",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"customBaseUrl",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"default3DBasemapQuery",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"defaultBasemap",void 0),(0,o.Cg)([(0,S.w)("defaultBasemap")],T.prototype,"readDefaultBasemap",null),(0,o.Cg)([(0,c.MZ)()],T.prototype,"defaultDevBasemap",void 0),(0,o.Cg)([(0,S.w)("defaultDevBasemap")],T.prototype,"readDefaultDevBasemap",null),(0,o.Cg)([(0,c.MZ)({type:g.A})],T.prototype,"defaultExtent",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"defaultVectorBasemap",void 0),(0,o.Cg)([(0,S.w)("defaultVectorBasemap")],T.prototype,"readDefaultVectorBasemap",null),(0,o.Cg)([(0,c.MZ)()],T.prototype,"description",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"devBasemapGalleryGroupQuery",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"eueiEnabled",void 0),(0,o.Cg)([(0,c.MZ)({readOnly:!0})],T.prototype,"extraQuery",null),(0,o.Cg)([(0,c.MZ)()],T.prototype,"featuredGroups",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"featuredItemsGroupQuery",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"galleryTemplatesGroupQuery",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"layoutGroupQuery",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"livingAtlasGroupQuery",void 0),(0,o.Cg)([(0,c.MZ)({readOnly:!0})],T.prototype,"hasAPIKey",null),(0,o.Cg)([(0,c.MZ)()],T.prototype,"hasCategorySchema",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"hasClassificationSchema",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"helpBase",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"helperServices",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"helpMap",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"homePageFeaturedContent",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"homePageFeaturedContentCount",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"httpPort",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"httpsPort",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"id",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"ipCntryCode",void 0),(0,o.Cg)([(0,c.MZ)({readOnly:!0})],T.prototype,"isOrganization",null),(0,o.Cg)([(0,c.MZ)()],T.prototype,"isPortal",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"isReadOnly",void 0),(0,o.Cg)([(0,c.MZ)({readOnly:!0})],T.prototype,"itemPageUrl",null),(0,o.Cg)([(0,c.MZ)()],T.prototype,"layerTemplatesGroupQuery",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"maxTokenExpirationMinutes",void 0),(0,o.Cg)([(0,c.MZ)({type:Date})],T.prototype,"modified",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"name",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"portalHostname",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"portalMode",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"portalProperties",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"region",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"recycleBinEnabled",void 0),(0,o.Cg)([(0,c.MZ)({readOnly:!0})],T.prototype,"restUrl",null),(0,o.Cg)([(0,c.MZ)()],T.prototype,"rotatorPanels",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"showHomePageDescription",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"sourceJSON",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"staticImagesUrl",void 0),(0,o.Cg)([(0,c.MZ)({json:{name:"2DStylesGroupQuery"}})],T.prototype,"stylesGroupQuery2d",void 0),(0,o.Cg)([(0,c.MZ)({json:{name:"stylesGroupQuery"}})],T.prototype,"stylesGroupQuery3d",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"supportsHostedServices",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"symbolSetsGroupQuery",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"templatesGroupQuery",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"thumbnail",void 0),(0,o.Cg)([(0,c.MZ)({readOnly:!0})],T.prototype,"thumbnailUrl",null),(0,o.Cg)([(0,c.MZ)()],T.prototype,"units",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"url",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"urlKey",void 0),(0,o.Cg)([(0,S.w)("urlKey")],T.prototype,"readUrlKey",null),(0,o.Cg)([(0,c.MZ)()],T.prototype,"user",void 0),(0,o.Cg)([(0,S.w)("user")],T.prototype,"readUser",null),(0,o.Cg)([(0,c.MZ)()],T.prototype,"use3dBasemaps",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"useDefault3dBasemap",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"useStandardizedQuery",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"useVectorBasemaps",void 0),(0,o.Cg)([(0,c.MZ)()],T.prototype,"vectorBasemapGalleryGroupQuery",void 0),T=w=(0,o.Cg)([(0,c.$K)("esri.portal.Portal")],T);const O=new FinalizationRegistry(e=>{e.remove()})},96360(e,t,r){r.d(t,{A:()=>p});var o,s=r(5482),i=r(49186),n=r(25482),l=r(91429),a=r(56507),u=r(16405);let p=o=class extends n.o{constructor(e){super(e),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.sourceJSON=null,this.tags=null,this.title=null}get thumbnailUrl(){const e=this.url,t=this.thumbnail;return e&&t&&this.portal?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`):null}get url(){const e=this.portal?.restUrl;return e?e+"/community/groups/"+this.id:null}fetchCategorySchema(e){return this.portal.request(this.url+"/categorySchema",e).then(t=>{const r=t.categorySchema||[];return r.some(e=>"contentCategorySetsGroupQuery.LivingAtlas"===e.source)?this._fetchCategorySchemaSet("LivingAtlas",e):r})}fetchMembers(e){return this.portal.request(this.url+"/users",e)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}toJSON(){throw new i.A("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const t=new o({sourceJSON:e});return t.read(e),t}queryItems(e,t){let r=(0,a.dp)(u.A,e);const o=this.portal;return parseFloat(o.currentVersion)>5?(r=r||new u.A,o.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",t)):(r=r?r.clone():new u.A,r.query="group:"+this.id+(r.query?" "+r.query:""),o.queryItems(r,t))}_fetchCategorySchemaSet(e,t){const r=this.portal;return r.fetchSelf(r.authMode,!0,t).then(e=>{const o=e.contentCategorySetsGroupQuery;if(o){const e=new u.A({disableExtraQuery:!0,num:1,query:o});return r.queryGroups(e,t)}throw new i.A("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")}).then(r=>{if(r.total){const o=r.results[0],s=new u.A({num:1,query:`typekeywords:"${e}"`});return o.queryItems(s,t)}throw new i.A("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")}).then(e=>e.total?e.results[0].fetchData("json",t).then(e=>{const t=e?.categorySchema;return t?.length?t:[]}):[])}};(0,s.Cg)([(0,l.MZ)()],p.prototype,"access",void 0),(0,s.Cg)([(0,l.MZ)({type:Date})],p.prototype,"created",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"description",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"id",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"isInvitationOnly",void 0),(0,s.Cg)([(0,l.MZ)({type:Date})],p.prototype,"modified",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"owner",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"portal",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"snippet",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"sortField",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"sortOrder",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"tags",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"thumbnail",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"thumbnailUrl",null),(0,s.Cg)([(0,l.MZ)()],p.prototype,"title",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"url",null),p=o=(0,s.Cg)([(0,l.$K)("esri.portal.PortalGroup")],p)},16405(e,t,r){r.d(t,{A:()=>c});var o,s=r(5482),i=r(69622),n=r(66552),l=r(4718),a=r(91429),u=r(5443),p=r(16930),d=r(28735);const h=new n.J({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let c=o=class extends i.A{constructor(e){super(e),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(e){"asc"!==e&&"desc"!==e||this._set("sortOrder",e)}clone(){return new o({categories:this.categories?(0,l.o8)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(e,t){let r=[];this.categories&&(r=this.categories.map(e=>Array.isArray(e)?JSON.stringify(e):e));let o="";if(this.extent){const e=(0,d.Cv)(this.extent,p.A.WGS84);null!=e&&(o=`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`)}let s=this.query;!this.disableExtraQuery&&e.extraQuery&&(s="("+s+")"+e.extraQuery);const i={categories:r,bbox:o,q:s,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(i.sortField=this.sortField.split(",").map(e=>h.toJSON(e.trim())).join(","),i.sortOrder=this.sortOrder),{query:{...t,...i}}}};(0,s.Cg)([(0,a.MZ)()],c.prototype,"categories",void 0),(0,s.Cg)([(0,a.MZ)()],c.prototype,"disableExtraQuery",void 0),(0,s.Cg)([(0,a.MZ)({type:u.A})],c.prototype,"extent",void 0),(0,s.Cg)([(0,a.MZ)()],c.prototype,"filter",void 0),(0,s.Cg)([(0,a.MZ)()],c.prototype,"num",void 0),(0,s.Cg)([(0,a.MZ)()],c.prototype,"query",void 0),(0,s.Cg)([(0,a.MZ)()],c.prototype,"sortField",void 0),(0,s.Cg)([(0,a.MZ)()],c.prototype,"sortOrder",null),(0,s.Cg)([(0,a.MZ)()],c.prototype,"start",void 0),c=o=(0,s.Cg)([(0,a.$K)("esri.portal.PortalQueryParams")],c)},41318(e,t,r){r.d(t,{A:()=>p});var o=r(5482),s=r(49186),i=r(25482),n=r(91429);let l=class extends i.o{constructor(e){super(e),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const e=this.portal?.restUrl;return e?`${e}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new s.A("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,o.Cg)([(0,n.MZ)({type:Date})],l.prototype,"created",void 0),(0,o.Cg)([(0,n.MZ)()],l.prototype,"id",void 0),(0,o.Cg)([(0,n.MZ)()],l.prototype,"portal",void 0),(0,o.Cg)([(0,n.MZ)()],l.prototype,"title",void 0),(0,o.Cg)([(0,n.MZ)({readOnly:!0})],l.prototype,"url",null),(0,o.Cg)([(0,n.MZ)()],l.prototype,"username",void 0),l=(0,o.Cg)([(0,n.$K)("esri.portal.PortalFolder")],l);var a,u=r(96360);let p=a=class extends i.o{constructor(e){super(e),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.id=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userLicenseTypeId=null,this.userType=null}get thumbnailUrl(){const e=this.url,t=this.thumbnail;return e&&t?this.portal.normalizeUrl(`${e}/info/${t}?f=json`):null}get userContentUrl(){const e=this.portal?.restUrl;return e?`${e}/content/users/${this.id}`:null}get url(){const e=this.portal?.restUrl;return e?`${e}/community/users/${this.id}`:null}addItem(e){const t=e&&e.item,r=e?.data,o=e?.folder,s={method:"post"};t&&(s.query=t.createPostQuery(),null!=r&&("string"==typeof r?s.query.text=r:"object"==typeof r&&(s.query.text=JSON.stringify(r))));let i=this.userContentUrl;return o&&(i+="/"+("string"==typeof o?o:o.id)),this.portal.request(i+"/addItem",s).then(e=>(t.id=e.id,t.portal=this.portal,t.loaded?t.reload():t.load()))}async deleteItem(e,t=!1){let r=this.userContentUrl;e.ownerFolder&&(r+="/"+e.ownerFolder);const o=t?{permanentDelete:!0}:{};await this.portal.request(r+`/items/${e.id}/delete`,{method:"post",query:o}),e.id=null,e.portal=null}async deleteItems(e,t=!1){e=e.slice();const r=this.userContentUrl+"/deleteItems",o=[],i=e.map(e=>e.id);if(i.length){const n={method:"post",query:{items:i.join(","),permanentDelete:t}},l=await this.portal.request(r,n);for(const t of l.results){const r=e.find(e=>t.itemId===e.id),i=t.success;let n=null;i?(r.id=null,r.portal=null):t.error&&(n=new s.A("portal:delete-item-failed",t.error.message,t.error)),o.push({item:r,success:i,error:n})}}return o}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then(e=>{let t;return t=e&&e.folders?e.folders.map(e=>{const t=l.fromJSON(e);return t.portal=this.portal,t}):[],t})}fetchGroups(){return this.portal.request(this.url??"").then(e=>{let t;return t=e&&e.groups?e.groups.map(e=>{const t=u.A.fromJSON(e);return t.portal=this.portal,t}):[],t})}async fetchItems(e){e??={};let t=this.userContentUrl??"";e.folder&&(t+="/"+e.folder.id);const{default:o}=await r.e(812).then(r.bind(r,80812)),s={folders:!1,inRecycleBin:!!e.inRecycleBin||null,foldersContent:!(e.folder||!e.includeSubfolderItems)||null,num:e.num||10,start:e.start||1,sortField:e.sortField||"created",sortOrder:e.sortOrder||"asc"},i=await this.portal.request(t,{query:s});let n;return i?.items?(n=i.items.map(e=>{const t=o.fromJSON(e);return t.portal=this.portal,t}),await Promise.all(n.map(e=>e.load())),{items:n,nextStart:i.nextStart,total:i.total}):{items:[],nextStart:-1,total:0}}fetchTags(){return this.portal.request(this.url+"/tags").then(e=>e.tags)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}queryFavorites(e){return this.favGroupId?(this._favGroup||(this._favGroup=new u.A({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(e)):Promise.reject(new s.A("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}async restoreItem(e,t){const r=this.userContentUrl,o=t?{folderID:"string"==typeof t?t:t.id}:null;await this.portal.request(r+`/items/${e.id}/restore`,{method:"post",query:o})}toJSON(){throw new s.A("internal:not-yet-implemented","PortalUser.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const t=new a({sourceJSON:e});return t.read(e),t}};(0,o.Cg)([(0,n.MZ)()],p.prototype,"access",void 0),(0,o.Cg)([(0,n.MZ)({type:Date})],p.prototype,"created",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"culture",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"description",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"email",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"favGroupId",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"fullName",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"id",void 0),(0,o.Cg)([(0,n.MZ)({type:Date})],p.prototype,"modified",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"orgId",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"portal",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"preferredView",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"privileges",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"region",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"role",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"roleId",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"sourceJSON",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"thumbnail",void 0),(0,o.Cg)([(0,n.MZ)({readOnly:!0})],p.prototype,"thumbnailUrl",null),(0,o.Cg)([(0,n.MZ)()],p.prototype,"units",void 0),(0,o.Cg)([(0,n.MZ)({readOnly:!0})],p.prototype,"userContentUrl",null),(0,o.Cg)([(0,n.MZ)({readOnly:!0})],p.prototype,"url",null),(0,o.Cg)([(0,n.MZ)()],p.prototype,"username",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"userLicenseTypeId",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"userType",void 0),p=a=(0,o.Cg)([(0,n.$K)("esri.portal.PortalUser")],p)},22671(e,t,r){r.d(t,{A:()=>v});var o,s=r(5482),i=r(52106),n=r(66552),l=r(25482),a=r(4718),u=r(91429),p=r(16930),d=r(60408),h=r(65864),c=r(50498),y=r(20437),g=r(36005),m=r(43937);const f=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=o=class extends l.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,i.A)}writeGeometryType(e,t,r,o){if(e)return void f.write(e,t,r,o);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void f.write(e.geometry.type,t,r,o)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,o=(0,h.rS)(e);return o&&!r&&t.spatialReference&&(o.spatialReference=p.A.fromJSON(t.spatialReference)),o}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new o(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){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const o=t.features[r];if(o.geometry){const t=e?.[r];o.geometry=t?.toJSON()||o.geometry}}return t}quantize(e){const{scale:[t,r],translate:[o,s]}=e,i=this.features,n=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-o)/t),e=>Math.round((s-e)/r));for(let e=0,t=i.length;e<t;e++)n?.(i[e].geometry)||(i.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[o,s],scale:[i,n]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*i+o,e=>s-e*n,l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const o=p.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const i=e[t],n=r.fromJSON(i),l=i.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=o);const a=i.aggregateGeometries,u=n.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],s=r?.spatialReference;null==t||s||(t.spatialReference=o)}s.push(n)}return s}_quantizePoints(e,t,r){let o,s;const i=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===o&&n===s||(i.push([e-o,n-s]),o=e,s=n)}else o=t(l[0]),s=r(l[1]),i.push([o,s])}return i.length>0?i:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const o=(0,d.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,i=o.length;e<i;e++){const i=o[e],n=this._quantizePoints(i,t,r);n&&s.push(n)}return s.length>0?((0,d.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const o=this._quantizePoints(e.points,t,r);return o&&o.length>0?(e.points=o,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,o,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),o&&(e.z=o(e.z))}:"polyline"===e||"polygon"===e?e=>{const i=(0,d.Bi)(e)?e.rings:e.paths;let n,l;for(let e=0,o=i.length;e<o;e++){const o=i[e];for(let e=0,s=o.length;e<s;e++){const s=o[e];e>0?(n+=s[0],l+=s[1]):(n=s[0],l=s[1]),s[0]=t(n),s[1]=r(l)}}if(o&&s)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2]),r[3]=s(r[3])}}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}else if(s)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(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),o&&null!=e.zmax&&null!=e.zmin&&(e.zmax=o(e.zmax),e.zmin=o(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const i=e.points;let n,l;for(let e=0,o=i.length;e<o;e++){const o=i[e];e>0?(n+=o[0],l+=o[1]):(n=o[0],l=o[1]),o[0]=t(n),o[1]=r(l)}if(o&&s)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=o(t[2]),t[3]=s(t[3])}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=o(t[2])}else if(s)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=s(t[2])}}:null}};(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,s.Cg)([(0,u.MZ)({type:[i.A],json:{write:!0}})],v.prototype,"features",void 0),(0,s.Cg)([(0,g.w)("features")],v.prototype,"readFeatures",null),(0,s.Cg)([(0,u.MZ)({type:[y.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,s.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],v.prototype,"geometryType",void 0),(0,s.Cg)([(0,m.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,s.Cg)([(0,u.MZ)({types:c.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,s.Cg)([(0,g.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,s.Cg)([(0,u.MZ)({type:p.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,s.Cg)([(0,m.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,s.Cg)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=o=(0,s.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},94128(e,t,r){r.d(t,{D:()=>s,Z:()=>o});const o=Symbol("GraphicInstance");function s(e){return null!=e&&"object"==typeof e&&o in e}},16215(e,t,r){r.d(t,{S:()=>s,Y:()=>o});const o=Symbol("BasemapInstance");function s(e){return null!=e&&"object"==typeof e&&o in e}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5856],{35856(t,e,r){r.r(e),r.d(e,{SplatSortWorkerInput:()=>s,SplatSortWorkerOutput:()=>n,clear:()=>m,destroy:()=>d,sort:()=>h});class s{constructor(t,e,r,s=!1){this.distances=t,this.sortOrderIndices=e,this.numGaussians=r,this.preciseSort=s}}class n{constructor(t,e){this.distances=t,this.sortedOrderIndices=e}}let o=null,l=null,a=0,i=0;function u(t,e){let r=Math.max(1,t);for(;r<e;)r=Math.ceil(1.5*r);return r}function c(t,e){t>a&&(a=u(a,t),o=new Uint32Array(a)),e>i&&(i=u(i,e),l=new Uint32Array(i)),l.fill(0,0,e)}function f(t,e){const r=t.length,s=Math.max(10,Math.min(20,Math.round(Math.log2(r/.25)))),n=1+(1<<s);c(r,n);let a=t[0],i=t[0];for(let e=0;e<t.length;e++)a=Math.min(a,t[e]),i=Math.max(i,t[e]);const u=i-a;if(u<1e-6)for(let t=0;t<r;++t)o[t]=0,l[0]++;else{const e=(1<<s)/u;for(let s=0;s<r;s++){const r=(t[s]-a)*e>>>0;o[s]=r,l[r]++}}for(let t=1;t<n;t++)l[t]+=l[t-1];for(let t=0;t<r;t++){const r=o[t];e[--l[r]]=t}}async function h(t){const{distances:e,sortOrderIndices:r,preciseSort:s,numGaussians:o}=t,l=e.subarray(0,o),a=r.subarray(0,o);if(0===l.length||0===a.length)return{result:new n(e,r),transferList:[e.buffer,r.buffer]};if(s){const t=Array.from(a.keys());t.sort((t,e)=>l[t]-l[e]||t-e);const e=t.map(t=>a[t]);a.set(e)}else f(l,a);return{result:new n(e,r),transferList:[e.buffer,r.buffer]}}function d(){m()}function m(){o=null,l=null,a=0,i=0}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7867],{66344(e,t,s){s.d(t,{q:()=>a});const i=!!(0,s(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,r,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==s&&this._notifyRemove(t,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(t,s,r,0);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return i||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,s,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new n(s,r,l)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t){t=e.id+t;const s=this._db.get(t);if(!s)return;this._size-=s.size,e.size-=s.size;let i=s.entry.usedMemory;for(;i>this._maxSize;){const e=this._notifyRemove(t,s.entry,i,1);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}s.size=i,this._size+=i,e.size+=i,this._checkSize()}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach((e,i)=>{const r=e.lifetime;s[r]=(s[r]||0)+e.size,this._clients.forEach(s=>{const{id:r,name:n}=s;if(i.startsWith(r)){const s=t[n]||0;t[n]=s+e.size}})});const i={};this._clients.forEach(e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[s]||0;t[s]=r,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"});const r=Object.keys(t);r.sort((e,s)=>t[s]-t[e]),r.forEach(s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]);for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,s]of this._db)t.startsWith(e.id)&&(yield s.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){const r=this._clients.get(e.split(o)[0])?.removeFunc,n=r?.(t,i,s);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const s=t??this;if(s.size<=e)return;const i=t?.id;let r=!0;for(;r;){r=!1;for(const[n,a]of this._db)if(0===a.lifetime&&(!i||n.startsWith(i))){const i=t??this._clients.get(n.split(o)[0]);if(this._purgeItem(n,a,i),s.size<=.9*e)return;r||=this._db.has(n)}}for(const[r,n]of this._db)if(!i||r.startsWith(i)){const i=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,n,i),s.size<=.9*e)return}}_purgeItem(e,t,s){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,1);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new r(0);class n{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new r(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},9775(e,t,s){s.d(t,{A:()=>n});var i=s(62788),r=s(95488);class n{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new r.I,this._items=new Set}get length(){return(0,i.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,i.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach(t=>{e(t)||this._items.delete(t)}),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,i.gc)(this._observable),yield*this._items}}},48459(e,t,s){s.r(t),s.d(t,{default:()=>P});var i=s(5482),r=s(7762),n=s(21818),o=s(49186),a=s(44208),l=s(53966),u=s(17676),c=s(563),p=s(39516),d=s(16930),h=s(70328),f=s(56390),y=s(8384),m=s(58727),g=s(64714),w=s(17754),_=s(20437),S=s(95466),x=s(10427),b=s(16238);function z(e){switch(e.type){case"wkb":return b.A.fromJSON(e);case"location":return x.A.fromJSON(e)}}var F=s(42760),v=s(39412),R=s(63892),C=s(30661),I=s(28923),A=s(44320),q=s(35258),E=s(16630);const M=new C.Z,O="__OBJECTID",T=new TextDecoder;class P{constructor(){this._fileInfos=new Map,this._queue=new c.QueueProcessor({concurrency:4,process:(e,t)=>this._executeQuery(e,t)}),this._indexMap={}}async load(e){const t=e.spatialReference?d.A.fromJSON(e.spatialReference):void 0;if(t&&!t.isWGS84&&!t.isWebMercator)throw new o.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");const s=await(0,F.nc)({urls:new r.A(e.urls),fields:e.fields?.map(e=>_.A.fromJSON(e)),geometryEncoding:e.geometryEncoding?z(e.geometryEncoding):null,geometryType:e.geometryType?(0,F.hG)(e.geometryType):null,displayOptimization:e.displayOptimization,spatialReference:t},{customParameters:e.customParameters});if(!s.fields)throw new o.A("parquet:unsupported","Fields must be defined");let n;if(s.spatialReference&&s.geometryType){if(!s.spatialReference)throw new o.A("parquet:unsupported","SpatialReference must be defined");if(!s.spatialReference.isGeographic&&!s.spatialReference.isWebMercator)throw new o.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");s.spatialReference.isGeographic&&!s.spatialReference.isWGS84&&(l.A.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:s.spatialReference}),s.spatialReference=d.A.WGS84),n={geometry:s.geometryEncoding?{geometryType:(0,F.sA)(s.geometryType),spatialReference:s.spatialReference.toJSON(),encoding:s.geometryEncoding.toJSON()}:null,displayOptimization:s.displayOptimization}}this.setCustomParameters(e.customParameters),this._geometryInfo=n;const a=e.urls;for(const e of a)this._addFile(e);this._capabilities=N(await this.getFileStatistics());const u=this._fileInfos.values().next().value;if(!u)return{layerDefinition:{},capabilities:N(null)};const c=await u,{fields:p}=s;if(null==p)throw new o.A("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",p);p.push(new _.A({name:O,type:"oid",alias:O}));for(const e of p){const t=c.file.columnForFieldName(e.name);null!=t&&(this._indexMap[e.name]=t)}const f=new S.A(p.map(e=>e.toJSON()));this._fieldsIndex=f;const y=(0,F.sA)(s.geometryType??"point");if(this._metadata=q.i.createFeature({fieldsIndex:f.toJSON(),geometryType:y,featureIdInfo:{type:"object-id",fieldName:"rowId"},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:s.spatialReference,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:y,featureIdInfo:{type:"object-id",fieldName:"rowId"},hasM:!1,hasZ:!1,spatialReference:s.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},s.spatialReference){const e=await this.getFileInfos();this._fullExtent=function(e,t){const s=(0,h.hZ)((0,h.vt)(),h.qv);for(const t of e){const e=(0,R.hD)(t.file);if(!e)return null;const i=e.columns[e.primary_column];if(!i.bbox)return null;const r=Q(i.bbox);(0,h.RF)(s,r)}return{xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:t}}(e,s.spatialReference.toJSON())}if(null==this._fullExtent&&"location"===s.geometryEncoding?.type){const{xField:e,yField:t}=s.geometryEncoding,r=(0,h.hZ)((0,h.vt)(),h.qv);for(const s of await this.getFileInfos())for(const n of s.file.rowGroups()){const s={stack:[],error:void 0,hasError:!1};try{const o=(0,i.mS)(s,n.columnDescriptorForAttribute(e),!1),a=(0,i.mS)(s,n.columnDescriptorForAttribute(t),!1),l=[o.minValue(),a.minValue(),o.maxValue(),a.maxValue()];(0,h.DC)(r,l),n.free()}catch(e){s.error=e,s.hasError=!0}finally{(0,i.hk)(s)}}this._fullExtent={xmin:r[0],ymin:r[1],xmax:r[3],ymax:r[4],spatialReference:s.spatialReference?.toJSON()}}return{capabilities:this._capabilities,layerDefinition:{fields:s.fields?.map(e=>e.toJSON()),drawingInfo:(0,g.F0)(y),extent:this._fullExtent??void 0,geometryType:y,geometryEncoding:s.geometryEncoding?.toJSON(),displayOptimization:s.displayOptimization}}}destroy(){for(const e of this._fileInfos.values())e.then(e=>e.file.free);this._fileInfos.clear(),this._queue.destroy()}setCustomParameters(e){this._customParameters=e}getIndexMap(){return this._indexMap}async getFileId(e){const t=this._fileInfos.get(e);if(!t)throw new Error(`InternalError: File ${e} does not exist`);return(await t).id}async getFileInfo(e){const t=this._fileInfos.get(e);if(!t)throw new Error(`InternalError: File ${e} does not exist`);return t}async getFileInfos(){return Promise.all(Array.from(this._fileInfos.values()))}async getFileStatistics(){if(!this._fileInfos.size)return null;const e=(await this.getFileInfos()).reduce((e,t)=>e+t.file.byteLength(),0);return{featureCount:await this._getFeatureCount(),byteLength:e}}async updateFiles(e){const t=new Set(e);for(const[e,s]of this._fileInfos.entries())t.has(e)?t.delete(e):(s.then(e=>e.file.free()),this._fileInfos.delete(e));await Promise.all(Array.from(t.values()).map(e=>this._addFile(e)))}async queryFeatures(e,t){return this._validateQuery(e),function(e){return!!(e.objectIds?.length||e.outStatistics||e.orderByFields?.length||e.returnDistinctValues)}(e)||(e.resultRecordCount=e.resultRecordCount?Math.min(e.resultRecordCount,8e3):8e3,e.resultOffset=e.resultOffset??0),(e.outStatistics||e.returnDistinctValues)&&(e.returnGeometry=void 0),(await this._enqueueQuery(e,t)).createQueryResponse()}async queryFeatureCount(e,t){const s=await(0,m.T2)(e,null,this._queryEngineParams.spatialReference);return this._validateQuery(s),G(s)?(s.outFields=void 0,s.returnGeometry=void 0,(await this._enqueueQuery(s,t)).createQueryResponseForCount()):this._getFeatureCount()}async queryObjectIds(e,t){const s=await(0,m.T2)(e,null,this._queryEngineParams.spatialReference);return this._validateQuery(s),G(s)?(s.resultRecordCount=s.resultRecordCount?Math.min(s.resultRecordCount,8e3):8e3,s.resultOffset=s.resultOffset??0,s.returnGeometry=void 0,s.outFields=void 0,(await this._enqueueQuery(s,t)).items.map(e=>e.getObjectId())):Array.from({length:await this._getFeatureCount()},(e,t)=>t)}async queryExtent(e,t){const s=await(0,m.T2)(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(s),this._fullExtent&&!G(s))return{count:await this._getFeatureCount(),extent:this._fullExtent};const i=(0,n.z)(this._metadata.spatialReference);s.returnGeometry=!0,s.outFields=void 0;const r=(0,h.hZ)((0,h.vt)(),h.qv),o=(0,h.vt)(),a=await this._enqueueQuery(s,t);let l=0;for(const e of a.items)e.getBounds(o)&&((0,h.RF)(r,o),l+=1);return{count:l,extent:(0,f.Wc)(r,i,s.outSR?(0,n.z)(s.outSR):i,i,!1)}}async queryStream(e,t,s){if(!s.signal)throw new Error("InternalError: AbortSignal must be passed");const i=await this.getFileInfo(e),r=(await(0,v.N)()).Query.new();"tile"===t.type&&(r.setExtent(t.extent),r.setQuantizationTransform(t.transform),r.setScale(t.scale)),r.setOutFields(t.outFields.filter(e=>null!=this._indexMap[e])),r.setOutSpatialReference(t.outSpatialReference.wkid),r.setReturnGeometry(!0),t.where&&await this._setWhereClause(r,i.file,t.where);const n=await i.file.executeQuery(r,s.signal),o=i.streamIdCounter++,a=(0,u.NY)(s.signal,e=>{const t=i.streams.get(o);null!=t&&(t.handle.remove(),i.streams.delete(o))});return i.streams.set(o,{stream:n,handle:a}),o}async getStreamNext(e,t,s){if(!s.signal)throw new Error("InternalError: AbortSignal must be passed");const i=await this.getFileInfo(e),r=i.streams.get(t);if(!r)return null;const n=await r.stream.next(s.signal);return null==n&&(r.handle.remove(),i.streams.delete(t)),n?.serialize().buffer}async createPatch(e,t,s,i,r){if(!r.signal)throw new Error("InternalError: AbortSignal must be passed");const n=await this.getFileInfo(e);return(await n.file.createChunkPatch(t,s,i,r.signal)).serialize().buffer}async _getFile(e){for(const t of await this.getFileInfos())if(t.id===e)return t.file;throw new Error(`InternalError: File ${e} does not exist`)}_addFile(e){const t=this._fileInfos.size;this._fileInfos.set(e,this._createFileInfo(e,t))}async _createFileInfo(e,t){return{id:t,file:await(0,R.DV)(e,{geometryInfo:this._geometryInfo,getCustomParameters:()=>this._customParameters}),streamIdCounter:0,streams:new Map}}async _getFeatureCount(){return(await this.getFileInfos()).reduce((e,t)=>e+t.file.numRows(),0)}_validateQuery(e){if(!this._capabilities.query.supportsStatistics&&e.outStatistics)throw new o.A("parquet:unsupported","Statistics queries are not supported",{query:e});if(!this._capabilities.query.supportsOrderBy&&e.orderByFields?.length)throw new o.A("parquet:unsupported","Queries using orderBy are not supported",{query:e});if(!this._capabilities.query.supportsDistinct&&e.returnDistinctValues)throw new o.A("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:e})}async _setWhereClause(e,t,s){const i=this._indexMap,r=this._fieldsIndex,n={getAttribute(e,s){const n=t.readAttribute(e.rowGroup,e.row,i[s]);if(null==n)return null;const o=r.get(s);return"esriFieldTypeString"===o.type||"esriFieldTypeDateOnly"===o.type||"esriFieldTypeTimeOnly"===o.type||"esriFieldTypeTimestampOffset"===o.type?T.decode(n):n}},a=await(0,p.GP)(s,this._fieldsIndex);if(!a.isStandardized)throw new o.A("sql-parse-error","expression is not standardized");e.setWhere(s),e.setWhereEvaluator((e,t)=>a.testFeatureCompiled({rowGroup:e,row:t},n,null)),e.setWhereFields(a.fieldNames)}async*_fetchChunks(e,t){const s=await(0,v.N)();for(const i of await this.getFileInfos()){const r=s.Query.new();r.setOutFields(e.fields),r.setReturnGeometry(e.returnGeometry),e.where&&await this._setWhereClause(r,i.file,e.where);const n=await i.file.executeQuery(r),o=[],a=n.next(t);for(let e=0;e<4;e++)o.push(n.next(t));let l=await a;for(;null!=l;){(0,u.Te)(t);const e=new E.s(this._metadata,this._indexMap,l,i.id),s=k([new I.j(e,null,0,!1)],this._queryEngineParams),r=o.shift();o.push(n.next(t)),yield s,l=await r}}}_enqueueQuery(e,t){return this._queue.push(e,t)}async _executeQuery(e,t){const s=await this._getReadParams(e);if(e.where=void 0,e.objectIds?.length){const s=new Map;for(const t of e.objectIds){const e=(0,w.wY)(t),i=(0,w.gE)(t);let r=s.get(e);r||(r=[],s.set(e,r)),r.push(i)}const i=[];for(const[r,n]of s.entries()){const s=await this._executeFileIdQuery(e,r,n,t);for(const e of s)i.push(e)}return new y.G(i,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:M})}let i=e.resultRecordCount??await this._getFeatureCount(),r=e.resultOffset??0;e.resultRecordCount=void 0,e.resultOffset=void 0;const n=[];for await(const o of this._fetchChunks(s,t)){const s=await o.executeQueryForOpaqueFeatures(e,t);if(s.length>r){const t=s.slice(r,Math.min(r+i,s.length));for(const e of t)n.push(e);if(r=0,i-=t.length,0===i)return new y.G(n,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:M})}else r-=s.length}return new y.G(n,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:M})}async _executeFileIdQuery(e,t,s,i){const r=await this._getReadParams(e),n=(await(0,v.N)()).Query.new();n.setOutFields(r.fields),n.setReturnGeometry(r.returnGeometry),n.setIds(new Uint32Array(s));const o=await this._getFile(t),a=await o.executeQuery(n,i);let l=await a.next(i),u=0;const c=[];for(;null!=l;){const e=new E.s(this._metadata,this._indexMap,l,t),s=new I.j(e,null,u++,!1);c.push(s),l=await a.next(i)}return k(c,this._queryEngineParams).executeQueryForOpaqueFeatures(e,i)}async _getReadParams(e){const t=new Set;if(e.outStatistics)for(const s of e.outStatistics)null!=s.onStatisticField&&t.add(s.onStatisticField);if(e.outFields)for(const s of e.outFields)t.add(s);return{fields:(t.has("*")?this._fieldsIndex.fields.map(e=>e.name):Array.from(t)).filter(e=>null!=this._indexMap[e]),returnGeometry:!!e.returnGeometry||!!e.geometry,where:e.where}}}function G(e){for(const t in e){const s=t;switch(s){case"resultOffset":case"resultRecordCount":case"aggregateIds":case"distance":case"gdbVersion":case"geometry":case"having":case"timeExtent":case"objectIds":case"historicMoment":case"where":return null!=e[s]}}return!1}function k(e,t){const s=new A.I;for(const t of e)s.insert(t);return new f.do({...t,featureStore:s})}function Q(e){switch(e.length){case 4:return(0,h.Jt)((0,h.vt)(),e);case 6:return e;default:throw new o.A("parquet:protocol-violation","Invalid Geoparquet file. BoundingBox size must be 4 or 6.",{bbox:e})}}function N(e){const t=e?.featureCount;let s=!1;return null!=t&&t<(0,a.A)("parquetlayer-full-query-feature-count")&&(s=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:8e3,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:void 0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,supportsCacheHint:!1,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:s,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:s,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:s,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},10427(e,t,s){s.d(t,{A:()=>a});var i=s(5482),r=s(69540),n=s(25482),o=s(91429);let a=class extends((0,r.OU)(n.o)){constructor(e){super(e),this.type="location",this.xField=null,this.yField=null}};(0,i.Cg)([(0,o.MZ)({type:["location"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"xField",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"yField",void 0),a=(0,i.Cg)([(0,o.$K)("esri.layers.support.ParquetGeometryEncodingLocation")],a)},16238(e,t,s){s.d(t,{A:()=>a});var i=s(5482),r=s(69540),n=s(25482),o=s(91429);let a=class extends((0,r.OU)(n.o)){constructor(e){super(e),this.type="wkb",this.field=null}};(0,i.Cg)([(0,o.MZ)({type:["wkb"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),(0,i.Cg)([(0,o.MZ)({type:["counter-clockwise"],json:{write:!0}})],a.prototype,"orientation",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"field",void 0),a=(0,i.Cg)([(0,o.$K)("esri.layers.support.ParquetGeometryEncodingWkb")],a)},54625(e,t,s){s.d(t,{i_:()=>r});var i=s(30524);function r(e,t,s){t=(0,i.rS)(t)?.toLowerCase(),s=(0,i.rS)(s)?.toLowerCase();const r=e.map(e=>e.toLowerCase()),a=t?e[r.indexOf(t)]:null,l=s?e[r.indexOf(s)]:null;return{longitudeFieldName:a||e[r.indexOf(o.find(e=>r.includes(e)))],latitudeFieldName:l||e[r.indexOf(n.find(e=>r.includes(e)))]}}const n=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],o=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"]},42760(e,t,s){s.d(t,{hG:()=>y,nc:()=>m,sA:()=>f,ye:()=>d}),s(7762);var i=s(49186),r=s(66552),n=s(16930),o=s(20437),a=s(30524),l=s(54625),u=s(10427),c=s(16238),p=s(63892);const d=new r.J({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"}),h=new Set(["uncompressed","snappy","gzip"]);function f(e){return d.toJSON(e)}function y(e){return d.fromJSON(e)}async function m(e,t={}){if(e.urls.length<1)throw new i.A("parquet:bad-input","At least one url must be specified",e);if(e.geometryType&&e.spatialReference&&e.geometryEncoding&&e.fields)return e;const s=await(0,p.DV)(e.urls.getItemAt(0),{getCustomParameters:()=>t.customParameters});for(const e of s.compressionCodecs())if(!h.has(e))throw new i.A("parquet:unsupported",`Compression codec ${e} is unsupported. Must be of type ${Array.from(h).join(",")}`);const r=(0,p.hD)(s),d={...e,file:s};if(null==d.fields&&(d.fields=s.fields(!1).map(e=>o.A.fromJSON({name:e.name,alias:e.name,type:e.type}))),null!=d.geometryEncoding){const e=d.geometryEncoding;switch(e.type){case"wkb":{const t=d.fields.find(t=>t.name===e.field);if(!t)throw new i.A("parquet:unsupported",`Geometry encoding references field ${e.field} which does not exist`);if("blob"!==t.type)throw new i.A("parquet:unsupported",`Invalid field type for geometry encoding. Found ${t.type} but expected 'blob'`);break}case"location":for(const t of[e.xField,e.yField])if(null!=t){const e=d.fields.find(e=>e.name===t);if(!e)throw new i.A("parquet:unsupported",`Geometry encoding references field ${t} which does not exist`);if(!(0,a.WA)(e))throw new i.A("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${e.type} but expected a numeric`)}}}null==d.geometryEncoding&&(d.geometryEncoding=function(e,t){if(null!=e){const t=e.primary_column,s=e.columns[t];return new c.A({field:t,orientation:"counterclockwise"===s.orientation?"counter-clockwise":null})}const s=t.filter(e=>(0,a.WA)(e)).map(e=>e.name),i=(0,l.i_)(s);return i.latitudeFieldName&&i.longitudeFieldName?new u.A({xField:i.longitudeFieldName,yField:i.latitudeFieldName}):null}(r,d.fields));const f=(0,p.Xj)(s);if(f&&(d.displayOptimization=f),d.geometryEncoding)switch(d.geometryEncoding.type){case"location":null==d.spatialReference&&(d.spatialReference=n.A.WGS84),null==d.geometryType&&(d.geometryType="point");break;case"wkb":{if(!r)return d;const e=r.primary_column,t=r.columns[e];if(d.geometryType||(d.geometryType=function(e){const{geometry_types:t}=e,s=new Set;for(const e of t){const t=g(e);t&&s.add(t)}if(s.size>1)throw new i.A("parquet:unsupported","Parquet mixed geometry types are not supported",{geometryTypes:s});return 1===s.size?s.values().next().value:void 0}(t)),d.spatialReference||(d.spatialReference=function(e){const t=e.crs?.id?.code;return t&&"number"==typeof t?new n.A({wkid:t}):void 0}(t)),d.fields)for(const e of Object.keys(r.columns))d.fields=d.fields.filter(t=>t.name!==e)}}if(d.displayOptimization){const e=d.displayOptimization.index;if(!d.spatialReference&&e.wkid&&(d.spatialReference=new n.A({wkid:e.wkid})),!d.geometryType)switch(e.type){case"z":d.geometryType="point";break;case"xz":d.geometryType=e.geometryType}}return d}function g(e){switch(e){case"Point":return"point";case"Polygon":case"MultiPolygon":return"polygon";case"LineString":return"polyline";case"MultiPoint":return"multipoint";default:return null}}},63892(e,t,s){s.d(t,{DV:()=>y,Xj:()=>g,hD:()=>m});var i=s(11254),r=s(49186),n=s(44208),o=s(563),a=s(84952),l=s(39412);const u="parquet.v1",c=new o.QueueProcessor({concurrency:12,process:async e=>{const{data:t}=await(0,i.A)(e.url,e.options);return t}}),p=e=>async function(t,s,i,r){const o=e?.(),a={url:t,options:{responseType:"array-buffer",query:o??{},cacheMode:"no-store",useQueue:!0,headers:{range:`bytes=${s}-${i}`}}};if(!(0,n.A)("parquetlayer-cache-enabled"))return c.push(a);const l=new URL(t);l.searchParams.append("range",`${s}-${i}`);try{const e=await caches.open(`${u}:${t}`),s=await e.match(l);if(s)return await s.arrayBuffer();const i=await c.push(a);return await e.put(l,new Response(i,{headers:{"Content-Type":"application/octet-stream","Content-Length":i.byteLength.toString()}})),i}catch(e){return c.push(a)}},d=e=>async function(t){if((0,a.w8)(t)){const{data:e}=await(0,i.A)(t,{responseType:"blob"});return e.size}const{data:s}=await(0,i.A)(t,{responseType:"native",method:"head",query:e?.()}),r=s.headers.get("Content-Length");if(null==r)throw new Error("Unable to parse content length");const o=parseInt(r,10);if(!(0,n.A)("parquetlayer-cache-enabled"))return o;try{const e=`${u}:${t}`,i=new URL(t);i.searchParams.append("metadata","true");let r=await caches.open(e);const n=s.headers.get("etag")??s.headers.get("Last-Modified");if(null==n)return await caches.delete(e),o;const a=await r.match(i),l=await(a?.json());l?.tag!==n&&(await caches.delete(e),r=await caches.open(e));const c=JSON.stringify({tag:n});await r.put(i,new Response(c,{headers:{"Content-Type":"application/json","Content-Length":c.length.toString()}}))}catch(e){}return o};function h(e,t){switch(t){case"esriGeometryPoint":return e.GeometryType.Point;case"esriGeometryPolygon":case"polygon":return e.GeometryType.Polygon;case"esriGeometryPolyline":case"polyline":return e.GeometryType.Polyline;case"esriGeometryMultipoint":case"multipoint":return e.GeometryType.Multipoint;default:throw new r.A("parquet",`Found unexpected GeometryType: ${t}`)}}function f(e,t){const s=e.GeometryInfo.new();t.geometry&&s.setGeometry(function(e,t){const s=t.encoding,i=h(e,t.geometryType),r=t.spatialReference.wkid;if(null==r)throw new Error("InternalError: Wkid must be defined.");switch(s.type){case"wkb":return e.GeometryField.fromWkb(s.field,r,i);case"location":{const{yField:t,xField:n}=s;return e.GeometryField.fromLocation(t,n,r,i)}}}(e,t.geometry));const i=t.displayOptimization;if(i){const{index:t,parentColumn:r}=i,n=e=>null!=r?[r,e].join("."):e;if("z"===t.type){const i=e.DisplayOptimizationZBuilder.new();i.setCodeField(n(t.code)),i.setXColumn(n(t.xColumn)),i.setYColumn(n(t.yColumn)),i.setCooordinatePrecision(t.coordinatePrecision),i.setFullExtent(t.fullExtent),i.setSpatialReference(t.wkid,t.wkt),i.setHasZ(!!t.zColumn),i.setHasM(!!t.mColumn),s.setOptmizationZ(i)}if("xz"===t.type){const i=h(e,t.geometryType),r=e.DisplayOptimizationXZBuilder.new();r.setCodeField(n(t.code)),r.setEncoding(t.encoding),r.setFullExtent(t.fullExtent),r.setGeometryType(i),r.setSpatialReference(t.wkid,t.wkt),r.setMaxLevel(t.maxLevel),r.setHasZ(t.hasZ??!1),r.setHasM(t.hasM??!1);for(const s of t.levels??[]){const[t,i]=s.transform.translate,[o,a]=s.transform.scale,l=new Float64Array([t,i]),u=new Float64Array([o,a]),c=n(s.column);r.addLevel(e.MultiscaleGeometryField.new(s.level,s.scale,c,l,u))}s.setOptmizationXZ(r)}}return s}async function y(e,t={}){const s=await(0,l.N)(),i=p(t.getCustomParameters),n=d(t.getCustomParameters),o=t.geometryInfo?f(s,t.geometryInfo):null;try{return await s.ParquetFile.fromUrl(e,i,n,o)}catch(e){throw new r.A("parquet","Failed to parse file",{error:e})}}function m(e){const t=e.keyValueMetadata("geo");return null!=t?JSON.parse(t):null}function g(e){if(e.keyValueMetadata("esri"))throw new r.A("parquet:unsupported","File was created using an unsupported experimental display index. Please regenerate the file.");const t=e.keyValueMetadata("geodisplay");if(null!=t)return JSON.parse(t);const s=e.keyValueMetadata("org.apache.spark.sql.parquet.row.metadata");if(null!=s){const e=JSON.parse(s);for(const t of e.fields)if(null!=t.metadata&&"type"in t.metadata&&("xz"===t.metadata.type||"z"===t.metadata.type)){const e={parentColumn:t.name,index:t.metadata};if("xz"===e.index.type&&(e.index.geometryType=e.index.geometryType.toLowerCase(),"esri-pbf"===e.index.encoding&&(e.index.encoding="esriPBF"),"esriPBF"!==e.index.encoding))throw new r.A("parquet:unsupported",`Encoding for display index must be of type esriPBF, but found ${e.index.encoding}`);return e}}return null}},93470(e,t,s){s.d(t,{Cb:()=>n,HW:()=>c,JR:()=>r,JZ:()=>l,WR:()=>a,b6:()=>p,fT:()=>i,nC:()=>u,yM:()=>o});const i=[252,146,31,255],r=[153,153,153,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},76213(e,t,s){s.d(t,{C2:()=>a,CQ:()=>i,DY:()=>r,GR:()=>m,Gh:()=>u,MZ:()=>h,Rm:()=>o,TB:()=>y,U5:()=>l,_M:()=>c,cp:()=>g,eG:()=>n,fq:()=>f,hM:()=>d,ie:()=>p});const i=512,r=29,n=24,o=3,a=4,l=6,u=1.05,c=3,p=3,d=4,h=1,f=10,y=256,m=32,g=512}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9926],{18047(e,t,n){n.d(t,{Up:()=>u,ZV:()=>s,yx:()=>l});var r=n(73444);const i={ar:"ar-u-nu-latn",bs:"sr-Latn-CS",nn:"no-NN"};let a=new WeakMap,o={};function l(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function u(e){const{minimumFractionDigits:t,maximumFractionDigits:n,useGrouping:r}=e;return{minimumFractionDigits:t,maximumFractionDigits:n,useGrouping:"auto"===r?"auto":"always"===r}}function s(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||o;if(!a.has(t)){const n=(0,r.lR)(),o=n&&i[n]||(0,r.QC)();a.set(t,new Intl.NumberFormat(o,e))}return a.get(t)}(t).format(e)}(0,r.Ml)(()=>{a=new WeakMap,o={}}),new Map},29926(e,t,n){n.r(t),n.d(t,{applyTextFormattingHTML:()=>B,createFieldInfoMap:()=>W,findRelatedLayer:()=>ue,findUtilityNetwork:()=>se,fixTokens:()=>D,formatAttributes:()=>X,formatEditInfo:()=>P,formatValueToFieldInfo:()=>Q,getAllFieldInfos:()=>_,getConfigurableFieldsContainer:()=>Z,getFieldFormat:()=>q,getFieldInfo:()=>J,getFieldInfoLabel:()=>v,getFixedFieldName:()=>A,getFixedFieldNames:()=>R,getSourceLayer:()=>C,graphicCallback:()=>L,htmlEntities:()=>Y,isAssociatedFeatureSupportedLayer:()=>z,isExpressionField:()=>k,isFeatureSupportedLayer:()=>$,isGraphicForRelatableFeatureSupportedLayer:()=>H,isRelatableFeatureSupportedLayer:()=>O,isRelatableLayer:()=>G,isRelatedField:()=>ne,preLayerQueryCallback:()=>oe,preRequestCallback:()=>le,querySourceLayer:()=>ee,queryUpdatedFeature:()=>te,shouldOpenInNewTab:()=>x,substituteAttributes:()=>j,substituteFieldsInLinksAndAttributes:()=>U});var r=n(53966),i=n(799),a=n(97770),o=n(18047),l=n(62044),u=n(30524),s=n(77548),f=n(4560),d=n(43668),c=n(56400);const p=()=>r.A.getLogger("esri.widgets.Feature.support.featureUtils"),y=/href=(""|'')/gi,m=/(\{([^{\r\n]+)\})/g,g=/'/g,b=/^\s*expression\//i,I=/(\n)/gi,F=/[\u00A0-\u9999<>&]/gim,h=/href\s*=\s*(?:"([^"]+)"|'([^']+)')/gi,w=/^(?:mailto:|tel:)/,T="relationships/",N=(0,a.J2)("short-date-short-time");function C(e){if(null!=e)return(e.sourceLayer||e.layer)??void 0}async function L({type:e,value:t,event:n}){try{return"function"==typeof t?t(n):await t}catch(r){return void p().error("error",`An error occurred when calling the "${e}" function`,{error:r,graphic:n.graphic,value:t})}}function x(e=""){if(e)return!w.test(e.trim().toLowerCase())}function k(e){return!!e&&b.test(e)}function Z(e){const{fieldInfo:t,graphic:n,layer:r}=e;return function({fieldInfo:e,graphic:t}){return!(!e?.fieldName||k(e.fieldName)||ne(e.fieldName)||t?.popupTemplate)}({fieldInfo:t,graphic:n})?(0,s.p2)(r,{graphic:n}):null}function v({expressionInfos:e,fieldInfo:t,graphic:n,isContentFieldInfos:r,layer:i}){if(!t?.fieldName)return null;const a=function(e,t){if(!t||!k(t)||!e)return;const n=t.replace(b,"").toLowerCase();return e.find(({name:e})=>e.toLowerCase()===n)}(e,t.fieldName);if(a)return a.title||null;const o=Z({fieldInfo:t,graphic:n,layer:i});if(o){const e=o.getFieldAlias(t.fieldName);return r?t.label||e||t.fieldName:e||t.fieldName}return t.label||t.fieldName}function q(e){const{configurableFieldsContainer:t,fieldInfo:n,isContentFieldInfos:r}=e;if(!n?.fieldName)return null;const i=t.popupTemplate||t.fieldConfigurations?t.getFieldConfiguration(n.fieldName)?.fieldFormat:(0,l.iu)(n,t.getField(n.fieldName));return r&&n.fieldFormat||i}function A(e,t){const n=E(t,e);return n?n.name:e}function R(e,t){return e&&e.map(e=>A(e,t))}function E(e,t){return e&&"function"==typeof e.getField&&t?e.getField(t)??null:null}function M(e){return`${e}`.trim()}function U({attributes:e,globalAttributes:t,layer:n,text:r,expressionAttributes:i,fieldInfoMap:a}){return r?j({formattedAttributes:t,template:S(r,{...t,...i,...e},n),fieldInfoMap:a}):""}function j({formattedAttributes:e,template:t,fieldInfoMap:n}){return M(function(e){return e.replaceAll(y,"")}((0,i.HC)((0,i.HC)(t,e=>function(e,t){const n=t.get(e.toLowerCase());return`{${n?.fieldName||e}}`}(e,n)),e)))}function D(e,t){return e.replaceAll(m,(e,n,r)=>{const i=E(t,r);return i?`{${i.name}}`:n})}function S(e,t,n){const r=D(e,n);return r?r.replaceAll(h,(e,n,r)=>function(e,t,n){const r=(t=M(t))&&!t.startsWith("{");return(0,i.HC)(e,function(e,t=!1){const n={...e};return Object.keys(n).forEach(e=>function(e,t,n=!1){const r=t[e];if("string"==typeof r){const i="%27",a=(n?encodeURIComponent(r):r).replaceAll(g,i);t[e]=a}}(e,n,t)),n}(n,r||!1))}(e,n||r,t)):r}function $(e){return null!=e&&"object"==typeof e&&"fieldsIndex"in e&&"geometryType"in e&&"getField"in e&&"load"in e&&"loaded"in e&&"objectIdField"in e&&"spatialReference"in e&&"type"in e&&("feature"===e.type||"scene"===e.type||"subtype-group"===e.type||"subtype-sublayer"===e.type||"sublayer"===e.type)&&"when"in e}function G(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatureCount"in e&&"queryObjectIds"in e&&"queryRelatedFeatures"in e&&"queryRelatedFeaturesCount"in e&&"relationships"in e}function O(e){return $(e)&&G(e)}function z(e){return!(!(e&&"object"==typeof e&&"createQuery"in e&&"getField"in e&&"queryFeatureCount"in e&&"queryFeatures"in e&&"queryObjectIds"in e&&"capabilities"in e&&"fields"in e&&"fieldsIndex"in e&&"type"in e)||"feature"!==e.type&&"subtype-group"!==e.type&&"subtype-sublayer"!==e.type&&"sublayer"!==e.type||!("when"in e))&&("subtype-sublayer"===e.type&&"parent"in e&&e.parent&&"object"==typeof e.parent?"globalIdField"in e.parent:"globalIdField"in e)}function H(e){return!!e&&"object"==typeof e&&"sourceLayer"in e&&O(e.sourceLayer)}function Q(e,t){const{fieldInfos:n,fieldName:r,graphic:i,isContentFieldInfos:a,layer:l,preventPlacesFormatting:s,timeZone:d}=t,c=J(n,r),p=Z({fieldInfo:c,graphic:i,layer:l}),y=E(p||l,r),m=p?null:c?.format,g=p?q({configurableFieldsContainer:p,fieldInfo:c,isContentFieldInfos:a}):null,b="number"===g?.type;if(c&&!(0,u.JL)(r)){const t=y?.type,n="date-time"===g?.type,r=m?.dateFormat;if("date"===t||"date-only"===t||"time-only"===t||"timestamp-offset"===t||n||r)return(0,f.i0)(e,{format:n?void 0:r,fieldFormat:n?g:void 0,fieldType:t,timeZoneOptions:{layerTimeZone:l&&"preferredTimeZone"in l?l.preferredTimeZone:null,viewTimeZone:d,datesInUnknownTimezone:!(!l||!("datesInUnknownTimezone"in l)||!l.datesInUnknownTimezone)}})}if("string"==typeof e&&(0,u.JL)(r)&&m)return function(e,t){return e=e.trim(),/\d{2}-\d{2}/.test(e)?e:e.includes(",")?V(e,",",", ",t):e.includes(";")?V(e,";","; ",t):e.includes(" ")?V(e," "," ",t):(0,o.ZV)(Number(e),(0,o.yx)(t))}(e,m);if("string"==typeof(e=function(e,t){const n="number"===t?.fieldFormat?.type||t?.format&&null==t.format.dateFormat&&(null!=t.format.places||null!=t.format.digitSeparator);if("string"==typeof e&&n){const t=Number(e);if(!isNaN(t))return t}return e}(e,{format:b?void 0:m,fieldFormat:b?g:void 0}))||null==e||null==m&&null==g)return B(e);const I=b?(0,o.Up)(g):m?(0,o.yx)(m):void 0;return(0,o.ZV)(e,s?{...I,minimumFractionDigits:0,maximumFractionDigits:20}:I)}function V(e,t,n,r){return e.trim().split(t).map(e=>(0,o.ZV)(Number(e),(0,o.yx)(r))).join(n)}function J(e,t){if(e?.length&&t)return e.find(e=>e.fieldName?.toLowerCase()===t.toLowerCase())}function P(e,t,n,r){const{creatorField:i,creationDateField:o,editorField:l,editDateField:u}=e;if(!t)return;const s=(0,c.hv)(r&&"preferredTimeZone"in r?r.preferredTimeZone:null,!(!r||!("datesInUnknownTimezone"in r)||!r.datesInUnknownTimezone),n,N,"date"),f={...N,...s},d=t[u];if("number"==typeof d){const e=t[l];return{type:"edit",date:(0,a.Yq)(d,f),user:e}}const p=t[o];if("number"==typeof p){const e=t[i];return{type:"create",date:(0,a.Yq)(p,f),user:e}}return null}function W(e,t){const n=new Map;if(!e)return n;for(const r of e){if(!r.fieldName)continue;const e=A(r.fieldName,t);r.fieldName=e,n.set(e.toLowerCase(),r)}return n}function _(e){const t=[];if(!e)return t;const{fieldInfos:n,content:r}=e;return n&&t.push(...n),r&&Array.isArray(r)?(r.forEach(e=>{if("fields"===e.type){const n=e?.fieldInfos;n&&t.push(...n)}}),t):t}function Y(e){return e.replaceAll(F,e=>`&#${e.charCodeAt(0)};`)}function B(e){return"string"==typeof e?e.replaceAll(I,'<br class="esri-text-new-line" />'):e}function K(e){const{fieldInfoMap:t,fieldInfos:n,fieldName:r,graphic:i,isContentFieldInfos:a,layer:o,timeZone:l,value:s}=e;if(null==s)return"";const d=function({fieldName:e,value:t,graphic:n,layer:r}){if(ne(e))return null;if(!r||"function"!=typeof r.getFieldDomain)return null;const i=n&&r.getFieldDomain(e,{feature:n});return i&&"coded-value"===i.type?i.getName(t):null}({fieldName:r,value:s,graphic:i,layer:o});if(d)return d;const c=function({fieldName:e,graphic:t,layer:n}){if(ne(e))return null;if(!n||"function"!=typeof n.getFeatureType)return null;const{typeIdField:r}=n;if(!r||e!==r)return null;const i=n.getFeatureType(t);return i?i.name:null}({fieldName:r,graphic:i,layer:o});if(c)return c;if(t.get(r.toLowerCase()))return Q(s,{fieldInfos:n||Array.from(t.values()),fieldName:r,graphic:i,isContentFieldInfos:a,layer:o,timeZone:l});const p=o?.fieldsIndex?.get(r);return p&&((0,f.fs)(p)||(0,u.OH)(p))?(0,f.i0)(s,{fieldType:p.type,timeZoneOptions:{layerTimeZone:o&&"preferredTimeZone"in o?o.preferredTimeZone:null,viewTimeZone:l,datesInUnknownTimezone:!(!o||!("datesInUnknownTimezone"in o)||!o.datesInUnknownTimezone)}}):B(s)}function X({attributes:e,fieldInfoMap:t,fieldInfos:n,graphic:r,isContentFieldInfos:i,layer:a,relatedInfos:o,timeZone:l}){const u={};return o?.forEach(e=>function({attributes:e,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:a}){e&&t&&(t.relatedFeatures?.forEach(o=>re({attributes:e,graphic:o,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:a})),t.relatedStatsFeatures?.forEach(o=>re({attributes:e,graphic:o,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:a})))}({attributes:u,relatedInfo:e,fieldInfoMap:t,fieldInfos:n,layer:a,timeZone:l})),e&&Object.keys(e).forEach(o=>{const s=e[o];u[o]=K({fieldInfoMap:t,fieldInfos:n,fieldName:o,graphic:r,isContentFieldInfos:i,layer:a,timeZone:l,value:s})}),u}async function ee(e,t){const{layer:n,graphic:r,outFields:i,objectIds:a,returnGeometry:o,spatialReference:l}=e,u=a[0];if("number"!=typeof u&&"string"!=typeof u){const e="Could not query required fields for the specified feature. The feature's ID is invalid.",t={layer:n,graphic:r,objectId:u,requiredFields:i};return p().warn(e,t),null}if(!(0,s.BR)(n)?.operations?.supportsQuery){const e="The specified layer cannot be queried. The following fields will not be available.",t={layer:n,graphic:r,requiredFields:i,returnGeometry:o};return p().warn(e,t),null}const f=n.createQuery();return f.objectIds=a,f.outFields=i?.length?i:[n.objectIdField],f.returnGeometry=!!o,f.returnZ=!!o,f.returnM=!!o,f.outSpatialReference=l,(await n.queryFeatures(f,t)).features[0]}async function te({graphic:e,popupTemplate:t,layer:n,spatialReference:r},i){if(!n||!t)return;if("function"==typeof n.load&&await n.load(i),!e.attributes)return;const a=n.objectIdField,o=e.attributes[a];if(null==o)return;const l=[o],s=new Set(await t.getRequiredFields(n.fieldsIndex));null==n.timeInfo?.trackIdField||s.has(n.timeInfo.trackIdField)||await async function(e){if(!e.expressionInfos?.length)return!1;const t=await(0,d.l)(),{arcadeUtils:{requiresTrack:n}}=t;return n(e)}(t)&&s.add(n.timeInfo.trackIdField);const f=(0,u.Kl)(e,s),c=f?[]:s.has(a)?[...s]:[...s,a],p=t.returnGeometry||await async function(e){if(!e.expressionInfos?.length)return!1;const t=await(0,d.l)(),{arcadeUtils:{hasGeometryFunctions:n}}=t;return n(e)}(t);if(f&&!p)return;const y=await ee({layer:n,graphic:e,outFields:c,objectIds:l,returnGeometry:p,spatialReference:r},i);y&&(y.geometry&&(e.geometry=y.geometry),y.attributes&&(e.attributes={...e.attributes,...y.attributes}))}function ne(e=""){return!!e&&e.includes(T)}function re({attributes:e,graphic:t,relatedInfo:n,fieldInfos:r,fieldInfoMap:i,layer:a,timeZone:o}){e&&t&&n&&Object.keys(t.attributes).forEach(l=>{const u=function(e){return e?`${T}${e.layerId}/${e.fieldName}`:""}({layerId:n.relation.id.toString(),fieldName:l}),s=t.attributes[l];e[u]=K({fieldName:u,fieldInfos:r,fieldInfoMap:i,layer:a,value:s,graphic:t,timeZone:o})})}const ie=e=>{if(!e)return!1;const t=e.toUpperCase();return t.includes("CURRENT_TIMESTAMP")||t.includes("CURRENT_DATE")||t.includes("CURRENT_TIME")},ae=({layer:e,method:t,query:n,definitionExpression:r})=>{if(!e.capabilities?.query?.supportsCacheHint||"attachments"===t)return;const i=null!=n.where?n.where:null,a=null!=n.geometry?n.geometry:null;ie(r)||ie(i)||"extent"===a?.type||"tile"===n.resultType||(n.cacheHint=!0)},oe=({query:e,layer:t,method:n})=>{ae({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})},le=({queryPayload:e,layer:t,method:n})=>{ae({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})};function ue(e,t,n){return e&&t&&n?"sublayer"===t.type?de({layers:t.layer?.allSublayers,map:e,relatedLayer:t,relationship:n})||de({layers:t.layer?.subtables,map:e,relatedLayer:t,relationship:n}):de({layers:e.allLayers,map:e,relatedLayer:t,relationship:n})||de({layers:e.allTables,map:e,relatedLayer:t,relationship:n}):null}function se(e,t){return e&&"utilityNetworks"in e&&t?e.utilityNetworks?.find(e=>e.isUtilityLayer(t)):null}function fe(e,t){return e?.allTables.find(e=>"feature"===e.type&&e.layerId===t.id&&e.url===t.layer?.url)}function de({map:e,relationship:t,relationship:{relatedTableId:n},relatedLayer:r,layers:i}){if(!i)return null;for(const a of i){if("map-image"===a.type){const n=de({layers:a.sublayers,map:e,relatedLayer:r,relationship:t})||de({layers:a.subtables,map:e,relatedLayer:r,relationship:t});if(n)return n;continue}if(!O(a))continue;if("sublayer"===r.type){if(a!==r&&a.id===n)return a.isTable?fe(e,a):a;continue}const i="scene"===r.type&&r.associatedLayer?r.associatedLayer.url:r.url;if(!i)return null;if("sublayer"!==a.type){if(a!==r&&a.url===i&&a.layerId===n)return a}else if(a!==r&&a.layer?.url===i&&a.id===n)return a.isTable?fe(e,a):a}return null}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6390],{69052(e,t,i){i.d(t,{hr:()=>r,ie:()=>l,uC:()=>o});var s=i(34727);class r{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return n(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,s.qE)(e-t,this.min,this.max)+t}monotonic(e,t,i){return e<t?t:t+a(this.range,e-t,i)}minimalMonotonic(e,t,i){return n(this.range,e,e+this.range,t,i)}center(e,t,i){return t=this.monotonic(e,t,i),this.normalize((e+t)/2,i)}diff(e,t,i){return this.monotonic(e,t,i)-e}shortestSignedDiff(e,t){e=this.normalize(e);const i=(t=this.normalize(t))-e,s=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(s)?i:s}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function n(e,t,i,s,r=0,n=!1){return(s-=r)<t?s+=a(e,t-s):s>i&&(s-=a(e,s-i)),n&&s===i&&(s=t),s+r}function a(e,t,i=0){return Math.ceil((t-i)/e)*e+i}const o=new r(0,2*Math.PI),l=(new r(-Math.PI,Math.PI),new r(0,360))},44794(e,t,i){i.d(t,{v:()=>o});var s=i(4718),r=i(62788),n=i(95488);class a{constructor(e,t){this._observable=new n.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=s.gh){return new a(e,t)}},44123(e,t,i){i.d(t,{WhereClauseCache:()=>n});var s=i(66344),r=i(89696);class n{constructor(e,t){this._cache=new s.q(e),this._invalidCache=new s.q(t)}get(e,t){const i=`${t?.uid}:${e}`,s=this._cache.get(i);if(s)return s;if(null!=this._invalidCache.get(i))return null;try{const s=r.A.create(e,{fieldsIndex:t});return this._cache.put(i,s),s}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},46329(e,t,i){i.d(t,{y:()=>d});var s=i(49186),r=i(4305),n=i(513),a=i(50954),o=i(52006),l=i(49663),u=i(46068),c=i(59803);function d(e,t,i){if((0,o.Xq)(t))return(0,c.T)(e,t,i);if((0,o.n1)(t)){const n=(0,r.m_)(e,t,i)[0];if(null==n)throw new s.A("closestPointOnCurve:unexpected-error","Failed to find close point on bezier curve");return n}if((0,o.aO)(t)){const s=(0,a.pM)(e,t);return(0,n.fM)(s,i)}if((0,o.DA)(t)){const s=(0,l.io)(e,t);return(0,n.fM)(s,i)}const d=(0,u.SW)(e,t);return(0,u.pb)(d,i)}},17136(e,t,i){i.d(t,{Y_:()=>A,O7:()=>R,el:()=>T});var s=i(92602),r=i(69052),n=i(49186),a=i(53966),o=i(39829),l=i(82799),u=i(16930),c=i(80754),d=i(21325),p=i(28735),h=i(11254),f=i(60408),m=i(65864),y=i(2272),g=i(84952),x=i(92300);const v=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function _(e){return"polygon"===e[0].type}function F(e){return"polyline"===e[0].type}function w(e,t,i){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw v().error(e),new n.A("internal:geometry",e)}const i=(0,c.r8)(e),s=[];for(const e of i){const i=[];s.push(i),i.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const r=e[s][0],n=e[s][1],a=e[s+1][0],o=e[s+1][1],l=Math.sqrt((a-r)*(a-r)+(o-n)*(o-n)),u=(o-n)/l,c=(a-r)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const s=e*t,a=c*s+r,o=u*s+n;i.push([a,o])}const e=(l+Math.floor(d-1)*t)/2,s=c*e+r,a=u*e+n;i.push([s,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:s,spatialReference:e.spatialReference}):new l.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return i&&(e=(0,c.kS)(e,i)),e}function S(e,t,i){if(Array.isArray(e)){const s=e[0];if(s>t){const i=(0,c.kd)(s,t);e[0]=s+i*(-2*t)}else if(s<i){const t=(0,c.kd)(s,i);e[0]=s+t*(-2*i)}}else{const s=e.x;if(s>t){const i=(0,c.kd)(s,t);e=e.clone().offset(i*(-2*t),0)}else if(s<i){const t=(0,c.kd)(s,i);e=e.clone().offset(t*(-2*i),0)}}return e}function I(e,t){let i=-1;for(let s=0;s<t.cutIndexes.length;s++){const r=t.cutIndexes[s],n=t.geometries[s],a=(0,c.r8)(n);for(let e=0;e<a.length;e++){const t=a[e];t.some(i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const s=t[e][0];i=s>i?s:i}i=Number(i.toFixed(9));const s=-360*(0,c.kd)(i,180);for(let i=0;i<t.length;i++){const t=n.getPoint(e,i);n.setPoint(e,i,t.clone().offset(s,0))}return!0}})}if(r===i){if(_(e))for(const t of(0,c.r8)(n))e[r]=e[r].addRing(t);else if(F(e))for(const t of(0,c.r8)(n))e[r]=e[r].addPath(t)}else i=r,e[r]=n}return e}async function T(e,t,i){if(!Array.isArray(e))return T([e],t);t&&"string"!=typeof t&&v().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let n,a,u,_,F,R,b,A,M=0;const C=[],z=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,a=(0,d.Vp)(n),u=n.isWebMercator,R=u?102100:4326,_=c.j7[R].maxX,F=c.j7[R].minX,b=c.j7[R].plus180Line,A=c.j7[R].minus180Line),a)if("mesh"===t.type)z.push(t);else if("point"===t.type)z.push(S(t.clone(),_,F));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>S(e,_,F)),z.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,a);z.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,i=(0,c.kd)(e.xmin,F)*(2*_);let s=0===i?t.clone():(0,c.kS)(t.clone(),i);e.offset(i,0);let{xmin:r,xmax:n}=e;r=Number(r.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(b)&&n!==_?(M=n>M?n:M,s=w(s,u),C.push(s),z.push("cut")):e.intersects(A)&&r!==F?(M=n*(2*_)>M?n*(2*_):M,s=w(s,u,360),C.push(s),z.push("cut")):z.push(s)}else z.push(t.clone());else z.push(t);else z.push(t);let B=(0,c.kd)(M,_),G=-90;const E=B,O=new l.A;for(;B>0;){const e=360*B-180;O.addPath([[e,G],[e,-1*G]]),G*=-1,B--}if(C.length>0&&E>0){const t=I(C,await async function(e,t,i,s){const r=(0,y.Dl)(e),n=t[0].spatialReference,a={...s,responseType:"json",query:{...r.query,f:"json",sr:(0,d.YX)(n),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,h.A)(r.path+"/cut",a),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map(e=>{const t=(0,m.rS)(e);return t.spatialReference=n,t})}}(r,C,O,i)),s=[],n=[];for(let i=0;i<z.length;i++){const r=z[i];if("cut"!==r)n.push(r);else{const r=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(s.push(r),n.push("simplify")):n.push(u?(0,p.Gh)(r):r)}}if(!s.length)return n;const a=await async function(e,t,i){const s="string"==typeof e?(0,g.An)(e):e,r=t[0].spatialReference,n=(0,f.$B)(t[0]),a={...i,query:{...s.query,f:"json",sr:(0,d.YX)(r),geometries:JSON.stringify((0,x.X)(t))}},{data:o}=await(0,h.A)(s.path+"/simplify",a);return(0,x.V)(o.geometries,n,r)}(r,s,i),o=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?o.push(t):o.push(u?(0,p.Gh)(a.shift()):a.shift())}return o}const N=[];for(let e=0;e<z.length;e++){const t=z[e];if("cut"!==t)N.push(t);else{const e=C.shift();N.push(!0===u?(0,p.Gh)(e):e)}}return N}function R(e,t,i){const s=(0,d.Vp)(i);if(null==s)return e;const[r,n]=s.valid,a=2*n;let o=0,l=0;t>n?o=Math.ceil(Math.abs(t-n)/a):t<r&&(o=-Math.ceil(Math.abs(t-r)/a)),e>n?l=Math.ceil(Math.abs(e-n)/a):e<r&&(l=-Math.ceil(Math.abs(e-r)/a));let u=e+(o-l)*a;const c=u-t;return c>n?u-=a:c<r&&(u+=a),u}function b(e){const t=(0,d.Vp)(e);if(null==t)return null;const[i,s]=t.valid;return new r.hr(i,s)}const A=b(u.A.WGS84);b(u.A.WebMercator)},80754(e,t,i){i.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var s=i(82799),r=i(16930),n=i(60408);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},56390(e,t,i){i.d(t,{do:()=>L,Wc:()=>H});var s=i(4576),r=i(21818),n=i(49186),a=(i(44208),i(4718)),o=i(97768),l=i(17676),u=i(86211),c=i(12195),d=i(91218),p=i(70328),h=i(19419),f=i(537),m=i(60408),y=i(65864),g=i(17136),x=i(21325),v=i(90708),_=i(29441),F=i(51441),w=i(31464);class S{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[i,s]of this._storage){if(!(s.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new T(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let I=0;class T{constructor(e){this.items=e,this.time=performance.now(),this.id=I++}}var R=i(99352),b=i(8384),A=i(58727),M=i(62660),C=i(43668);const z="unsupported-query";async function B(e,{fieldsIndex:t,geometryType:i,spatialReference:s,availableFields:r}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new n.A(z,"Unsupported query options",{query:e});return G(t,r,e),function(e,t,i){const{outStatistics:s,groupByFieldsForStatistics:r,having:a}=i,o=r?.length,l=s?.length;if(a){if(!o||!l)throw new n.A(z,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,_.eD)(e,t,a,s,i)}if(l){if(null==(u=s)||!u.every(e=>"exceedslimit"!==e.statisticType))return;const a=s.map(e=>e.onStatisticField).filter(Boolean);(0,_.MG)(e,t,a,{expressionName:"onStatisticFields",query:i}),o&&(0,_.MG)(e,t,r,{expressionName:"groupByFieldsForStatistics",query:i});for(const r of s){const{onStatisticField:s,statisticType:a}=r;if("percentile_disc"!==a&&"percentile_cont"!==a||!("statisticParameters"in r))e.get(s)&&"count"!==a&&"min"!==a&&"max"!==a&&(0,_.MG)(e,t,[s],{expressionName:`outStatistics with '${a}' statistic type`,allowedFieldTypes:E,query:i});else{const{statisticParameters:e}=r;if(!e)throw new n.A(z,"statisticParameters should be set for percentile type",{definition:r,query:i})}}}var u}(t,r,e),Promise.all([(0,M.c0)(e,i,s),(0,w.Nk)(s,e.outSR)]).then(()=>e)}function G(e,t,i){const{returnDistinctValues:s,outStatistics:r}=i,a=r?r.map(e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if("orderByFields"in i&&i.orderByFields&&i.orderByFields.length>0){const s=" asc",r=" desc",n=i.orderByFields.map(e=>{const t=e.toLowerCase();return t.includes(s)?t.split(s)[0]:t.includes(r)?t.split(r)[0]:e}).filter(e=>!a.includes(e));(0,_.MG)(e,t,n,{expressionName:"orderByFields",query:i})}if("outFields"in i)if(i.outFields?.length)(0,_.MG)(e,t,i.outFields,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(s)throw new n.A(z,"outFields should be specified for returnDistinctValues",{query:i});(0,_.SN)(e,t,i.where,i)}const E=new Set([..._.vl,..._.VW]);async function O(e,t,i,s){let r=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,C.l)();r=e.extractFieldNames(i.valueExpression)}if(i.field&&r.push(i.field),i.field2&&r.push(i.field2),i.field3&&r.push(i.field3),i.normalizationField&&r.push(i.normalizationField),!r.length&&!i.valueExpression)throw new n.A(z,"field or valueExpression is required",{params:i});(0,_.MG)(e,t,r,{expressionName:"statistics",query:s})}var N=i(86420),q=i(95466),P=(i(71511),i(53966),i(36708),i(44794),i(78659)),D=i(5482),V=i(69622),Q=i(91429);let j=class extends V.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,D.Cg)([(0,Q.MZ)()],j.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,D.Cg)([(0,Q.MZ)()],j.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),j=(0,D.Cg)([(0,Q.$K)("esri.views.support.debugFlags")],j),new j,Symbol("Yield");new Map([["immediate",0],["schedule",4],["slide",0],["stream loader",0],["elevation query",0],["terrain",1],["surface geometry updates",1],["LoD renderer",2],["Graphics3D",2],["I3S",2],["3DTiles",2],["point cloud",2],["feature fetcher",2],["stream controller",2],["clouds generator",2],["occlusion query",2],["overlay",4],["overlay renderer",4],["stage",4],["graphics deconflictor",4],["graphics filter visibility",4],["graphics scale visibility",4],["graphics frustum visibility",4],["POI frequent",6],["POI infrequent",30],["labeler",8],["feature query",8],["feature tile tree",16],["fast feature tile tree",0],["elevation alignment",12],["elevation alignment scene",14],["text texture atlas",12],["texture unload",12],["line of sight tool",16],["interactive line of sight tool",0],["volume measurement",4],["snapping",0],["shadow accumulator",30],["flow generator",12],["gaussian splat sorting",2],["gaussian splat texture atlas",12],["mapview fetch queue",0],["mapview layerview update",2],["mapview vector tile parsing queue",0]]),(0,P.l5)(6.5),(0,P.l5)(1),(0,P.l5)(30),(0,P.l5)(1e3/30),(0,P.l5)(100);const Z=new class{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}};Z.enabled=!1;const k=new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,l.G4)(t)){const e=(0,l.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,l.z7)(e(Z))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}async scheduleGenerator(e,t,i){if((0,l.G4)(t)){const e=(0,l.NK)();if(i)return i(e);throw e}const s=e(Z);for(;;){const e=s.next(Z),r=(0,l.$X)(e)?await e:e;if((0,l.G4)(t)){const e=(0,l.NK)();if(i){const t=i(e),r=s.return(null);return(0,l.$X)(r)&&await(0,l.QZ)(r),t}const t=s.throw(e);throw(0,l.$X)(t)&&await(0,l.QZ)(t),e}if(r.done)return r.value}}};class L{constructor(e){this._changeHandle=null,this.capabilities={query:R.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new S,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=(0,c.W)(e.fieldsIndex)?e.fieldsIndex:q.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=k}destroy(){this._changeHandle=(0,o.xt)(this._changeHandle),this._frameTask=(0,o.xt)(this._frameTask),this._clearCache(),(0,o.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=(0,l.Mq)(t);if(!this.timeInfo?.trackIdField)throw new n.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=(0,l.Mq)(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);return e=(0,a.o8)(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),s)}async executeQueryForUniqueValues(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),s)}async executeQueryForClassBreaks(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),s)}async executeQueryForHistogram(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),s)}async executeQueryForSnapping(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,N.W)(this.timeInfo,this.featureStore);const[i,s]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:s}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==A.v8)throw t;return await new b.G([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(e){if(e!==A.v8)throw e;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const s=i.size;if(!s)return{count:0,extent:null};const r=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:s,extent:r}}catch(e){if(e===A.v8)return{count:0,extent:null};throw e}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,s=new Set;for(const e of i)s.add(t.featureAdapter.getObjectId(e));return s}catch(e){if(e===A.v8)return new Set;throw e}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==A.v8)throw t;return await new b.G([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await(0,A.iJ)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t){const i=e.bin;if(!i.onField&&!i.onExpression?.value||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new n.A(z,"Unsupported query options",{query:e});return B(e,t)}(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==A.v8)throw i;t=new b.G([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:s,valueExpression:r}=t,n=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:r});return yield,await n.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:s,field3:r,valueExpression:n}=t,a=yield*this._executeQueryForStatistics(e,{field:i,field2:s,field3:r,valueExpression:n});return yield,await a.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:s,valueExpression:r}=t,n=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:r});return yield,await n.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:s,valueExpression:r}=t,n=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:r});return yield,await n.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:s,returnEdge:r,vertexMode:n}=e;if(!r&&"none"===n)return{candidates:[]};let o=(0,a.o8)(e.query);o=await(0,A.T2)(o,this.definitionExpression,this.spatialReference),yield,o=await B(o,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const l=!(0,x.aI)(i.spatialReference,this.spatialReference);l&&(await(0,w.Nk)(i.spatialReference,this.spatialReference),yield);const u="number"==typeof s?s:s.x,c="number"==typeof s?s:s.y,d={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},p=l?(0,w.Cv)(d,this.spatialReference):d;if(!p)return{candidates:[]};const h=(await(0,g.el)((0,y.rS)(i),null,{signal:t}))[0];yield;const f=(await(0,g.el)((0,y.rS)(p),null,{signal:t}))[0];if(yield,null==h||null==f)return{candidates:[]};const m=await this._searchFeatures(U(f.toJSON()));yield;const v=new b.G(m,o,this);this._executeObjectIdsQuery(v),yield,this._executeTimeQuery(v),yield,this._executeAttributesQuery(v),yield,yield*this._executeGeometryQueryForSnapping(v),yield;const _=h.toJSON(),F=l?(0,w.Cv)(_,this.spatialReference):_,S=l?Math.max(p.xmax-p.xmin,p.ymax-p.ymin)/2:s;return v.createSnappingResponse({...e,point:F,distance:S},o.returnZ,i.spatialReference)}async _getBounds(e,t,i){const s=(0,p.hZ)((0,p.vt)(),p.qv);return await this.featureStore.forEachBounds(e,e=>(0,p.RF)(s,e)),H(s,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new b.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>(0,r.z)(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=(0,a.o8)(e),e=await(0,A.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await B(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const s=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(s),yield,this._executeObjectIdsQuery(s),yield,this._executeTimeQuery(s),yield,this._executeAttributesQuery(s),s}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:s}=e,r=this.featureStore.featureSpatialReference,n=e.sceneFilter.geometry,a=null==r||(0,x.aI)(r,n.spatialReference)?n:(0,w.Cv)(n,r);if(!a)return null;const o=i||s,l=(0,x.fn)(t)&&!(0,x.aI)(this.spatialReference,t)&&o?async e=>this._project(e,t):e=>e;yield;const u=this.featureAdapter,c=await this._searchFeatures(U(a));if(yield,"disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(u.getObjectId(e));const i=await this._getAllFeatures();yield;const s=await(0,M.xt)("esriSpatialRelDisjoint",a,this.geometryType);yield;const r=e=>!t.has(u.getObjectId(e))||s(u.getGeometry(e)),n=yield*this._runSpatialFilter(i,r);yield;const o=new b.G(n,e,this);return await l(o)}if(!c.length)return new b.G([],e,this);if(this._canExecuteSinglePass(a,e))return await l(new b.G(c,e,this));const d=await(0,M.xt)("esriSpatialRelContains",a,this.geometryType);yield;const p=yield*this._runSpatialFilter(c,e=>d(u.getGeometry(e)));return yield,await l(new b.G(p,e,this))}async*_executeGeometryQuery(e,t){if(null!=t&&0===t.items.length)return t;const{geometry:i,outSR:r,returnGeometry:n,returnCentroid:a}=e,o=t?null:this._getCacheKey(e),l=o?this._cache.get(o):null;if(l)return new b.G(l,e,this);const u=(0,x.fn)(r)&&!(0,x.aI)(this.spatialReference,r),c=n||a,d=async e=>(u&&c&&await this._project(e,r),o&&this._cache.put(o,e.items),e),p=this.featureStore.featureSpatialReference,h=!i||null==p||(0,x.aI)(p,i.spatialReference)?i:(0,w.Cv)(i,p);if(!h)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));yield;const f=this.featureAdapter;let m=await this._searchFeatures(U(i));yield;const y=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===y){if(!m.length)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of m)i.add(f.getObjectId(e));let s;null!=t?s=t.items:(yield,s=await this._getAllFeatures(),yield);const r=await(0,M.xt)(y,h,this.geometryType);yield;const n=e=>!i.has(f.getObjectId(e))||r(f.getGeometry(e)),a=yield*this._runSpatialFilter(s,n);yield;const o=new b.G(a,e,this);return await d(o)}if(null!=t){const e=new s.vW;m=m.filter(i=>(0,s.qh)(t.items,i,t.items.length,e)>=0)}if(!m.length){const t=new b.G([],e,this);return o&&this._cache.put(o,t.items),t}if(this._canExecuteSinglePass(h,e))return await d(new b.G(m,e,this));const g=await(0,M.xt)(y,h,this.geometryType);yield;const v=yield*this._runSpatialFilter(m,e=>g(f.getGeometry(e)));return yield,await d(new b.G(v,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(e=>t.add(e));const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,N.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,_.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const s=await(0,M.xt)(i,t.geometry,this.geometryType);yield;const r=this.featureAdapter,n=yield*this._runSpatialFilter(e.items,e=>s(r.getGeometry(e)));e.items=n}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const s=new Array;for(const r of e)t(r)&&s.push(r),i.madeProgress(),i.done&&(i=yield);return s}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,r=s||i,n=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),s=a(i,r),o=n.get(e);(!o||s>a(o,r))&&n.set(e,i)}e.items=Array.from(n.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:s,returnCentroid:r,outSR:n,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=s||r;return(0,x.fn)(n)&&!(0,x.aI)(this.spatialReference,n)&&l?JSON.stringify([t,i,n]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,M.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,x.aI)(this.spatialReference,t))return e;const i=this.featureAdapter,s=(0,d.isLoaded)()?await this._getFullExtent():void 0,n=await(0,w.lK)(e.items.map(e=>(0,F.pL)(this.geometryType,i.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:s});return e.items=(0,r.z)(n.map((t,s)=>i.cloneWithGeometry(e.items[s],(0,v.Ux)(t,this.hasZ,this.hasM),this.geometryType))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=(0,a.o8)(e);try{e=await(0,A.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t,{fieldsIndex:i,geometryType:s,spatialReference:r,availableFields:a}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new n.A(z,"Unsupported query options",{query:e});return G(i,a,e),Promise.all([O(i,a,t,e),(0,M.c0)(e,s,r),(0,w.Nk)(r,e.outSR)]).then(()=>e)}(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const s=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(s),yield,this._executeObjectIdsQuery(s),yield,this._executeTimeQuery(s),yield,this._executeAttributesQuery(s),yield,s}catch(t){if(t!==A.v8)throw t;return new b.G([],e,this)}}get test(){}}function U(e){if((0,M.tC)(e)){if((0,m.ZC)(e))return[(0,h.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,m.Bi)(e))return e.rings.map(e=>(0,h.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[(0,f.Rg)((0,h.vt)(),e)]}function H(e,t,i,s,r){const n={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:(0,F.ag)(s)};r&&isFinite(e[2])&&isFinite(e[5])&&(n.zmin=e[2],n.zmax=e[5],n.hasZ=!0);const a=(0,w.Cv)(n,t,i);if(a.spatialReference=(0,F.ag)(i),a.xmax-a.xmin===0){const e=(0,u.GA)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin===0){const e=(0,u.GA)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(r&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin===0){const e=(0,u.GA)(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}},99352(e,t,i){i.d(t,{F:()=>s,P:()=>r});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},r={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}},8384(e,t,i){i.d(t,{G:()=>z});var s=i(4576),r=i(4718),n=i(12359),a=i(90634),o=i(62577),l=i(21325),u=i(46329),c=i(52006),d=i(29441),p=i(51441),h=i(30524),f=i(87445),m=i(1873),y=i(43668);class g{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const s=e.outFields;if(s&&!s.includes("*")){this.outFields=s;let e=0;for(const t of s){const s=(0,d.Wq)(t),r=this.fieldsIndex.get(s),n=r?null:(0,d.j4)(s,i),a=r?r.name:(0,d.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach(e=>this.getAttributes(e)),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){if(i)return this.featureAdapter.getAttribute(e,i.name);const s=t;let r=null;return this._fieldDataCache.has(s)?r=this._fieldDataCache.get(s)?.clause:i||(r=(0,d.j4)(t,this.fieldsIndex),this._fieldDataCache.set(s,{alias:s,clause:r})),r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const s=t.normalizationType,r=t.normalizationTotal,n=this.fieldsIndex.get(t.field),a=(0,h.zD)(n)||(0,h.Ah)(n),o=(0,h.OH)(n);return e.map(e=>{let n=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(n=`${(0,m.gJ)(n)}${t.fieldDelimiter}${(0,m.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(n=`${n}${t.fieldDelimiter}${(0,m.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof n&&i&&(a?n=n?new Date(n).getTime():null:o&&(n=n?(0,f.rb)(n):null)),s&&Number.isFinite(n)){const i="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;n=(0,m.zS)(n,s,i,r)}return n})}async getExpressionValues(e,t,i,s,r){const{arcadeUtils:n}=await(0,y.l)(),a=n.hasGeometryOperations(t);a&&await n.enableGeometryOperations();const o=n.createFunction(t),l=n.getViewInfo(i),u={fields:this.fieldsIndex.fields};return e.map(e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,p.pL)(s.geometryType,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},c=n.createExecContext(t,l,r);return n.executeFunction(o,c)})}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,d.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,d.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const s of t){const{alias:t,clause:r}=this._fieldDataCache.get(s);i[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const s of t){const{alias:t}=this._fieldDataCache.get(s);i.push(e[t])}else for(const t in e)i.push(e[t]);const s=`${(t||["*"]).join(",")}=${i.join(",")}`;let r=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++r),r>1?null:e}}var x=i(31464),v=i(58727);class _{constructor(e,t,i){this.objectId=e,this.target=t,this.distance=i}}class F extends _{constructor(e,t,i){super(e,t,i),this.type="vertex"}}class w extends _{constructor(e,t,i,s,r,n=!1,a=null){super(e,t,i),this.start=s,this.end=r,this.draped=n,this.curve=a,this.type="edge"}}var S=i(5834),I=i(59977),T=i(57231),R=i(11440),b=i(60909),A=i(98623),M=i(92647);const C="bin";class z{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new g(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of s){const{statisticType:s}=r,l="exceedslimit"!==s?r.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,n);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:s,items:r}=u[t],n=s.join(",");i&&!e.validateItems(r,i)||o.add(n)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,l.fn)(this.query.outSR)&&!(0,l.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,p.ag)({spatialReference:this.query.outSR,...(0,x.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,p.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const s=this.featureAdapter,r=G(this.hasZ,this.hasM),{point:n}=e,a="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y;function l(e,t){const i=(e-n.x)/a,s=(t-n.y)/o;return i*i+s*s}const d={candidates:[]},p="esriGeometryPolygon"===this.geometryType,h="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,f=this._getPointCreator(t,this.spatialReference,i),m=new E(null,0),y=new E(null,0),g={x:0,y:0,z:0};for(const e of this.items){const t=s.getObjectId(e),i=s.getGeometryWithCurves?.(e);if(null!=i){v(i,t);continue}const r=s.getGeometry(e);null==r||x(r,t)}return d.candidates.sort((e,t)=>e.distance-t.distance),d;function x(t,i){const{coords:s}=t,a=t.isPoint?O:t.lengths;if(m.coords=s,y.coords=s,e.returnEdge){let e=0;for(let t=0;t<a.length;t++){const s=a[t],o=e;for(let t=0;t<s;t++,e+=r){if(!p&&t===s-1)continue;if(m.coordsIndex=e,y.coordsIndex=t===s-1?o:e+r,!B(g,n,m,y))continue;const a=l(g.x,g.y);a<=1&&d.candidates.push(new w(i,f(g),Math.sqrt(a),f(m),f(y)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<a.length;t++){const s=a[t],n=e,o=y;o.coordsIndex=n;for(let t=0;t<s;t++,e+=r){if(m.coordsIndex=e,p&&t===s-1&&m.x===o.x&&m.y===o.y)continue;const r=l(m.x,m.y);r<=1&&d.candidates.push(new F(i,f(m),Math.sqrt(r)))}}}else if(h&&"ends"===e.vertexMode){let e=0;const t=[];for(let i=0;i<a.length;i++){t.push(e);const s=a[i];e+=s*r,s>1&&t.push(e-r)}for(const e of t){m.coordsIndex=e;const t=l(m.x,m.y);t<=1&&d.candidates.push(new F(i,f(m),Math.sqrt(t)))}}}function v(t,i){const{candidates:s}=d,r={x:0,y:0,z:0};if(e.returnEdge){const e=[n.x,n.y],a=new E(e,0),o=new E(e,0);for(const{segments:n}of t.parts)for(const{start:t,curve:d}of n){const{curvePoint:n}=(0,u.y)(t,d,e),p=l(...n);if(p>1)continue;[r.x,r.y]=n,a.coords=t,o.coords=(0,c.yP)(d);const h=(0,c.Xq)(d)?null:(0,c.tk)(d);s.push(new w(i,f(r),Math.sqrt(p),f(a),f(o),!1,h))}}function a(e){r.x=t.vertexXY[2*e],r.y=t.vertexXY[2*e+1];const n=l(r.x,r.y);n>1||(r.z=t.vertexZ?.[e]??0,s.push(new F(i,f(r),Math.sqrt(n))))}if("all"===e.vertexMode){const{vertexCount:e}=t;for(let t=0;t<e;++t)a(t);return}if("ends"===e.vertexMode)switch(t.type){case"point":a(0);break;case"polyline":for(let e=0;e<t.partCount;++e){const i=t.partOffsets[e],s=t.partOffsets[e+1]-1;a(i),s!==i&&a(s)}}}}_getPointCreator(e,t,i){const s=null==i||(0,l.aI)(t,i)?e=>e:e=>(0,x.Cv)(e,t,i),{hasZ:r}=this;return r&&e?({x:e,y:t,z:i})=>s({x:e,y:t,z:i}):({x:e,y:t})=>s({x:e,y:t,z:0})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,d=this.fieldsIndex.get(t),p=(0,h.vE)(d)||(0,h.zD)(d)||(0,h.Ah)(d),f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:l,timeZone:u},this.items),y=(0,m.Vb)({normalizationType:r,normalizationField:s,minValue:a,maxValue:o}),g={value:.5,fieldType:d?.type},x=(0,h.yM)(d)?(0,m.z9)({values:f,supportsNullCount:y,percentileParams:g,outStatisticTypes:c}):(0,m.G_)({values:f,minValue:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:y,percentileParams:g,outStatisticTypes:c});return(0,m.oZ)(x,c,p)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:r,scale:n,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:n,timeZone:a},this.items,!1),l=(0,m.b3)(o);return(0,m.lv)(l,s,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:d,timeZone:p}=e,h=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:d,timeZone:p},this.items),f=(0,m.Rw)(h,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,m.jM)(f,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:d,timeZone:p}=e,h=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:d,timeZone:p},this.items);return(0,m.$y)(h,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const{compare:t,fieldOrExpression:r,fieldInfo:n}=N(s,this.fieldsIndex);e.sort((e,s)=>t(i(e,r,n),i(s,r,n)))}}_topNFeatures(e,t,i,r){if(e.length>1&&t?.length){const n=t.map(e=>{const{compare:t,fieldOrExpression:i,fieldInfo:s}=N(e,this.fieldsIndex);return(e,n)=>t(r(e,i,s),r(n,i,s))}).reduceRight((e,t)=>(i,s)=>{const r=t(i,s);return 0===r||Number.isNaN(r)?e(i,s):r}),a=[];for(const t of e)(0,s.HX)(a,t,i,n);return a}return e.slice(0,i)}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:l,outSR:u,quantizationParameters:c,resultRecordCount:d,resultOffset:h,returnZ:f,returnM:m}=e,y=null!=d&&t.length>(h||0)+d,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&m,hasZ:r&&f,objectIdFieldName:n,spatialReference:(0,p.ag)(u||a),transform:c&&(0,o.VV)(c)||null}}_createFeatures(e,t){const i=new g(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:l,returnCentroid:u,maxAllowableOffset:c,resultOffset:d,resultRecordCount:h,returnZ:f=!1,returnM:m=!1}=e,y=r&&f,x=s&&m;let v;const _=d||0,F=null!=h?_+h:null;null!=F&&F<=5e3&&F<t.length?v=this._topNFeatures(t,n,F,(e,t,s)=>i.getFieldValue(e,t,s)):(v=[...t],this._sortFeatures(v,n,(e,t,s)=>i.getFieldValue(e,t,s))),(_>0||null!=F)&&(v=v.slice(_,F??void 0));const w=[];let S=0;if(this.geometryType&&(l||u)){const e=(0,o.VV)(a)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const s of v){const r=this.featureAdapter.getGeometry(s),n=this._addFeatureJSONMetadata(s,{attributes:i.getAttributes(s),geometry:(0,p.pL)(this.geometryType,r,c,e,y,x)});t&&r&&!n.geometry&&(n.centroid=(0,p.LQ)(this,this.featureAdapter.getCentroid(s,this),e)),w[S++]=n}else if(!l&&u)for(const t of v)w[S++]=this._addFeatureJSONMetadata(t,{attributes:i.getAttributes(t),centroid:(0,p.LQ)(this,this.featureAdapter.getCentroid(t,this),e)});else for(const t of v)w[S++]=this._addFeatureJSONMetadata(t,{attributes:i.getAttributes(t),centroid:(0,p.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,p.pL)(this.geometryType,this.featureAdapter.getGeometry(t),c,e,y,x)})}else for(const e of v){const t=i.getAttributes(e);t&&(w[S++]=this._addFeatureJSONMetadata(e,{attributes:t}))}return w}_addFeatureJSONMetadata(e,t){const i=this.featureAdapter.getMetadata?.(e);return void 0!==i&&(t.metadata=i),t}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=G(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)},0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],r=new Map,n=new Map,a=new Map,o=new Map,l=new g(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:p,resultRecordCount:f}=e,m=c?.length,y=!!m,x=y?c[0]:null,v=y&&!this.fieldsIndex.get(x);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:p}=e,f=e,g="exceedslimit"!==p?e.onStatisticField:void 0,_="percentile_disc"===p||"percentile_cont"===p,F="EnvelopeAggregate"===p||"CentroidAggregate"===p||"ConvexHullAggregate"===p,w=y&&1===m&&(g===x||v)&&"count"===p;if(y){if(!a.has(g)){const e=[];for(const i of c){const s=this._getAttributeValues(l,i,t,r);e.push(s)}a.set(g,this._calculateUniqueValues(e,t,!F&&l.returnDistinctValues))}const e=a.get(g);if(!e)continue;const i=Object.keys(e);for(const s of i){const{count:i,data:n,items:a,itemPositions:p}=e[s],h=n.join(",");if(!d||l.validateItems(a,d)){const e=o.get(h)||{attributes:{}};if(F){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(f,a);e.aggregateGeometries[i]=t}else{let s=null;if(w)s=i;else{const e=this._getAttributeValues(l,g,t,r),i=p.map(t=>e[t]);s=_&&"statisticParameters"in f?this._getPercentileValue(f,i):this._getStatisticValue(f,i,null,l.returnDistinctValues)}e.attributes[u]=s}let s=0;c.forEach((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++s]=n[i]),o.set(h,e)}}}else if(F){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(f,t);i.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(l,g,t,r);i.attributes[u]=_&&"statisticParameters"in f?this._getPercentileValue(f,e):this._getStatisticValue(f,e,n,l.returnDistinctValues)}const S="min"!==p&&"max"!==p||!(0,h.yM)(this.fieldsIndex.get(g))&&!this._isAnyDateField(g)?null:this.fieldsIndex.get(g)?.type;s.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const _=y?Array.from(o.values()):[i];return this._sortFeatures(_,p,(e,t)=>e.attributes[t]),f&&(_.length=Math.min(f,_.length)),{fields:s,features:_}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,h.vE)(t)||(0,h.zD)(t)||(0,h.Ah)(t)||(0,h.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:s,union:r}=await i.e(1023).then(i.bind(i,81023)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:u,spatialReference:c,geometryType:d}=this,h=t.map(e=>(0,p.pL)(d,u.getGeometry(e))),f=s(c,h,!0)[0],m={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=f?(0,a.v)(f):(0,a.HA)(r(c,h));m.aggregateGeometries={...e,spatialReference:c},m.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=f?(0,n.l8)(f):(0,n.Z4)((0,a.HA)(r(c,h)));m.aggregateGeometries={x:e[0],y:e[1],spatialReference:c},m.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(m.aggregateGeometries=f,m.outStatisticFieldName=l||"convexHull");return m}_getStatisticValue(e,t,i,s){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=i?.has(r)?i.get(r):(0,h.yM)(this.fieldsIndex.get(r))||this._isAnyDateField(r)?(0,m.z9)({values:t,returnDistinct:s}):(0,m.G_)({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:r}=e,{value:n,orderBy:a}=s,o=this.fieldsIndex.get(i);return(0,m.qg)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const r=this.fieldsIndex.get(t),n=i.map(i=>e.getFieldValue(i,t,r));return s.set(t,n),n}_calculateUniqueValues(e,t,i){const s={},r=t.length;for(let n=0;n<r;n++){const r=t[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(i||s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t,i=!0){const s=new g(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:a,timeZone:o}=e;return n?s.getExpressionValues(t,n,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):s.getDataValues(t,(0,r.o8)(e),i)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,r=t.min??0,n=t.max??0,a=s.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=r&&o<=n){const e=(0,m.Ak)(s,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:r}=t,n=[],a=[{name:s??i,alias:s??i,type:r??"esriFieldTypeString"},{name:C,alias:C,type:"esriFieldTypeInteger"}],o=new g(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const c=this._getAttributeValues(o,i,u,l),d=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in d){const{items:r}=d[t],o=await this._createBinsResponse(e,r);if(n.push(...o.features.map(e=>({...e,attributes:{...e.attributes,[s??i]:t}}))),o.fields)for(const e of o.fields)a.some(t=>t.name===e.name)||a.push(e)}return{fields:a,features:n}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(S.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(I.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(R.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(b.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:r,numBins:n,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),d=(0,m.sU)(c,{field:s,normalizationField:r,normalizationType:a,normalizationTotal:o,numBins:n,minValue:(0,v.dO)(a?e.normalizationMinValue:l,!1),maxValue:(0,v.dO)(a?e.normalizationMaxValue:u,!1)}),p=this._calculateHistogramBins(c,d,i);return this._createFeaturesFromHistogramBins(p,t)}async _createDateBinsResponse(e,t,i){const{field:s,interval:r,start:n,end:a,snapToData:o,returnFullIntervalBin:l,offset:u,firstDayOfWeek:c}=e,d=r.unit,p=await this._getDataValues({field:s||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),f=(0,h.OH)(this.fieldsIndex.get(s)),m=T.g.toJSON(d),y=p.filter(Boolean).sort((e,t)=>e-t),g=null!=n?(0,v.dO)(n,f):y[0],x=null!=a?(0,v.dO)(a,f):y[y.length-1],_=[];if(null!=g&&null!=x){const e={zone:t.outTimeReference?.ianaTimeZone??A.n$},i=u?.unit?T.g.toJSON(u.unit):"milliseconds",s={[i]:u?.value||0},n=M.c9.fromMillis(g,e).minus(s),a=M.c9.fromMillis(x,e).minus(s),d="number"==typeof c&&c>=1&&c<=7?c:7,p=(e,t)=>{const i=(e.weekday-t+7)%7;return e.minus({days:i}).startOf("day")};if("last"===o){let e="week"===m?((e,t)=>p(e,t).plus({days:7}))(a,d):a;for(;e>n;){const t=e.minus({[m]:r.value});if(t<n){_.unshift([l?t.plus(s).toMillis():n.plus(s).toMillis(),e.plus(s).toMillis()]);break}_.unshift([t.plus(s).toMillis(),e.plus(s).toMillis()]),e=t}}else{let e="first"===o?n:"week"===m?p(n,d):n.startOf(m);for(;e<=a;){const t=e.plus({[m]:r.value});if(t>a){_.push([e.plus(s).toMillis(),l?t.plus(s).toMillis():a.plus(s).toMillis()]);break}_.push([e.plus(s).toMillis(),t.plus(s).toMillis()]),e=t}}}const F=this._calculateHistogramBins(p,{intervals:_,min:g,max:x},i);return this._createFeaturesFromHistogramBins(F,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,r=await this._getDataValues({field:s||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),n=(0,h.OH)(this.fieldsIndex.get(s)),a=e.boundaries.map(e=>(0,v.dO)(e,n)).sort((e,t)=>e-t),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=this._calculateHistogramBins(r,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:r,normalizationType:n,start:a,end:o}=e,l=await this._getDataValues({field:s||e.expression,normalizationField:e.normalizationField,normalizationType:n,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),u=(0,h.OH)(this.fieldsIndex.get(s)),c=(0,m.sU)(l,{field:s,classificationMethod:"defined-interval",definedInterval:r,minValue:(0,v.dO)(n?e.normalizationMinValue:a,u),maxValue:(0,v.dO)(n?e.normalizationMaxValue:o,u)},!0),d=this._calculateHistogramBins(l,c,i);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,r=s||"lowerBoundary",n=i||"upperBoundary",a=[],o=[{name:r,alias:r,type:"esriFieldTypeDouble"},{name:n,alias:n,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:C,alias:C,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const d="dateBin"===t.bin.type,p=t.outTimeReference?.ianaTimeZone;for(const i of e){const{minValue:e,maxValue:s,items:h}=i,f={attributes:{}};let m;if(f.attributes[r]=d&&p&&null!=e?M.c9.fromMillis(e,{zone:p}).toISO():e,t.bin.hideUpperBound||(f.attributes[n]=d&&p&&null!=s?M.c9.fromMillis(s,{zone:p}).toISO():s),l?(m=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},h),f.attributes[C]=++c,"flat"===t.bin.jsonStyle?a.push(...m.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...f.attributes}:{...t,...f.attributes}}))):(f.stackedAttributes=m.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),a.push(f))):(t.bin?.splitBy&&(f.attributes[C]=++c),m=await this._createStatisticsQueryResponse(t,h,f),a.push(f)),m.fields)for(const e of m.fields)o.some(t=>t.name===e.name)||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function B(e,t,i,s){const r=s.x-i.x,n=s.y-i.y,a=t.x-i.x,o=t.y-i.y,l=r*r+n*n;if(0===l)return!1;const u=a*r+o*n,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+r*c,e.y=i.y+n*c,!0}function G(e,t){return e?t?4:3:t?3:2}class E{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const O=[1];function N(e,t){const i=e.split(" "),s=i[0],r=t.get(s),n=!!i[1]&&"desc"===i[1].toLowerCase();return{compare:(0,m.FM)(r?.type,n,"case-insensitive"),fieldOrExpression:s,fieldInfo:r}}},29441(e,t,i){i.d(t,{MG:()=>x,SN:()=>h,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>f,j4:()=>m,vl:()=>u});var s=i(49186),r=i(44123),n=i(98453);const a=new r.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),d=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function p(e,t,i={}){const r=m(t,e);if(!r){const i=a.getError(t,e);throw new s.A(o,"invalid SQL expression",{expression:t,error:i})}const n=i.expressionName||"expression";if(i.validateStandardized&&!r.isStandardized)throw new s.A(o,`${n} is not standard`,{expression:t});if(i.validateAggregate&&!r.isAggregate)throw new s.A(o,`${n} does not contain a valid aggregate function`,{expression:t});return r.fieldNames}function h(e,t,i,s){if(!i)return!0;const r="where clause";return x(e,t,p(e,i,{validateStandardized:!0,expressionName:r}),{expressionName:r,query:s}),!0}function f(e,t,i,r,n){if(!i)return!0;const a="having clause",l=p(e,i,{validateAggregate:!0,expressionName:a});x(e,t,l,{expressionName:a,query:n});const u=m(i,e),c=u?.getExpressions().every(t=>{const{aggregateType:i,field:s}=t,n=e.get(s)?.name;return r.some(t=>{const{onStatisticField:s,statisticType:r}=t,a=e.get(s)?.name;return a===n&&r.toLowerCase().trim()===i})});if(!c)throw new s.A(o,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function m(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function x(e,t,i,r={}){const n=new Map;if(function(e,t,i,s,r){const n=r.includes("*")?[...i,...r.filter(e=>"*"!==e)]:r;for(const r of n)if(t.get(r))v(e,t,i,s,r);else try{const n=p(t,y(r),{validateStandardized:!0});for(const r of n)v(e,t,i,s,r)}catch(t){e.set(r,{type:"expression-error",expression:r,error:t})}}(n,e,t,r.allowedFieldTypes??d,i),n.size){const e=r.expressionName??"expression";throw new s.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(n.values()),query:r.query})}}function v(e,t,i,s,r){const a=t.get(r);a?i.has(a.name)?"all"!==s&&!1===s?.has(a.type)&&e.set(r,{type:"invalid-type",fieldName:a.name,fieldType:n.m.fromJSON(a.type),allowedFieldTypes:Array.from(s,e=>n.m.fromJSON(e))}):e.set(r,{type:"missing-field",fieldName:a.name}):e.set(r,{type:"invalid-field",fieldName:r})}},51441(e,t,i){i.d(t,{LQ:()=>r,ag:()=>a,pL:()=>n});var s=i(90708);function r(e,t,i,r=e.hasZ,n=e.hasM){if(null==t)return null;const a=e.hasZ&&r,o=e.hasM&&n;if(i){const e=(0,s.Nl)(t,"esriGeometryPoint",i,r,n);return(0,s.DF)(e,a,o)}return(0,s.DF)(t,a,o)}function n(e,t,i,r,n,a){if(null==t)return null;const o="coords"in t?t:t.geometry;if(null==o)return null;const{hasZ:l,hasM:u}=o,c=l&&(n??=l),d=u&&(a??=u);if(i){let t=(0,s.kz)(o,e,i,n,a);return r&&(t=(0,s.Nl)(t,e,r)),(0,s.zv)(t,e,c,d)}if(r){const t=(0,s.Nl)(o,e,r,n,a);return(0,s.zv)(t,e,c,d)}return(0,s.zv)(o,e,c,d)}function a(e){return e&&o in e?JSON.parse(JSON.stringify(e,l)):e}const o="_geVersion",l=(e,t)=>e===o?void 0:t},31464(e,t,i){i.d(t,{Cv:()=>f,Nk:()=>d,lK:()=>y});var s=i(4576),r=i(91218),n=i(21325),a=i(28735);const o=[0,0];function l(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,o),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,o),[i.xmax,i.ymax]=e(t.xmax,t.ymax,o),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}return"rings"in t?{rings:u(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:u(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:c(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function u(e,t){const i=[];for(const s of e)i.push(c(s,t));return i}function c(e,t){const i=[];for(const s of e){const e=t(s[0],s[1],[0,0]);i.push(e),s.length>2&&e.push(s[2]),s.length>3&&e.push(s[3])}return i}async function d(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map(e=>null!=e.geometry?e.geometry.spatialReference:null).filter(s.Ru):[e];await(0,r.initializeProjection)(i.map(e=>({source:e,dest:t})))}const p=l.bind(null,a.je),h=l.bind(null,a.tD);function f(e,t,i,s){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,n.fn)(t)||!(0,n.fn)(i)||(0,n.aI)(t,i))return e;if((0,a.y7)(t,i)){const t=(0,n.K8)(i)?p(e):h(e);return t.spatialReference=i,t}return(0,r.projectMany)([e],t,i,s)[0]}const m=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,s){if(!e?.length||!t||!i||(0,n.aI)(t,i))return e;const r={geometries:e,inSpatialReference:t,outSpatialReference:i,options:s,resolve:Promise.withResolvers()};return this._jobs.push(r),this._timer??=setTimeout(this._process,10),r.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:s,resolve:o,options:l}=e,u=t.filter(e=>null!=e);let c;c=(0,a.y7)(i,s)&&null==l?.extendedParams?(0,n.K8)(s)?u.map(p):u.map(h):(0,r.projectMany)(u,i,s,l);let d=0;const f=t.map(e=>null==e?null:c[d++]);o.resolve(f),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function y(e,t,i,s){return m.push(e,t,i,s)}},58727(e,t,i){i.d(t,{GC:()=>y,T2:()=>g,VY:()=>h,dO:()=>v,iJ:()=>m,v8:()=>f});var s=i(49186),r=i(66552),n=i(86211),a=i(91218),o=i(90634),l=i(60408),u=i(65864),c=i(17136),d=i(21325),p=i(31464);const h=new r.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),f=Object.freeze({});async function m(e,t,i){const s=e.bin;return s.onField&&(s.onField=s.onField.trim()),s.onExpression?.value&&(s.onExpression.value=s.onExpression.value.trim()),s.splitBy&&(s.splitBy.value&&(s.splitBy.value=s.splitBy.value.trim()),s.splitBy.outAlias&&(s.splitBy.outAlias=s.splitBy.outAlias.trim())),s.stackBy&&(s.stackBy.value&&(s.stackBy.value=s.stackBy.value.trim()),s.stackBy.outAlias&&(s.stackBy.outAlias=s.stackBy.outAlias.trim())),"normalizationField"in s.parameters&&s.parameters.normalizationField&&(s.parameters.normalizationField=s.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:"frequency"}]),y(e,t,i)}async function y(e,t,i){const{outFields:s,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),g(e,t,i)}async function g(e,t,r){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:r}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=r?h.fromJSON(r):(0,n.Ij)(o),c=o&&((0,d.EA)(o)||(0,d.K8)(o))?a:await(0,p.Nk)(o,d.KK).then(()=>(0,p.Cv)(a,d.KK)),f=await i.e(9159).then(i.bind(i,49159));await f.load();const m=f.execute(c,t||1,{unit:u})??void 0;if(!m||!(0,l.Bi)(m)||0===m.rings.length)throw new s.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return m}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,o.HA)(m),m.spatialReference=t}if(m){await(0,p.Nk)(m.spatialReference,r),m=function(e,t){const i=e.spatialReference;return x(e,t)&&(0,l.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,r);const t=(await(0,c.el)((0,u.rS)(m)))[0];if(null==t)throw f;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,s=i&&x(m,r)?{extendedParams:{densificationStep:8*i}}:void 0,n=t.toJSON(),a=(0,p.Cv)(n,n.spatialReference,r,s);if(!a)throw f;a.spatialReference=r,e.geometry=a}return e}function x(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,d.aI)(i,t)&&!(0,a.canProjectWithoutEngine)(i,t)}function v(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},62660(e,t,i){i.d(t,{tC:()=>w,c0:()=>F,xt:()=>_});var s=i(49186),r=i(94078),n=i(12176),a=i(60408),o=i(21325);function l(e,t){return c(e,t.coords[0],t.coords[1])}function u(e,t){const{coords:i,lengths:s,stride:r}=t;if(!s)return!1;for(let t=0,n=0;t<s.length;t++,n+=r)if(!c(e,i[n],i[n+1]))return!1;return!0}function c(e,t,i){if(!e)return!1;const{coords:s,lengths:r,stride:n}=e;let a=!1,o=0;for(const e of r)a=d(a,s,n,o,e,t,i),o+=e*n;return a}function d(e,t,i,s,r,n,a){let o=e,l=s;for(let e=s,u=s+r*i;e<u;e+=i){l=e+i,l===u&&(l=s);const r=t[e],c=t[e+1],d=t[l],p=t[l+1];(c<a&&p>=a||p<a&&c>=a)&&r+(a-c)/(p-c)*(d-r)<n&&(o=!o)}return o}var p=i(90708),h=i(51441),f=i(31464);const m="unsupported-query",y={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},g={esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},x={esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1},v={esriSpatialRelIntersects:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(8414)]).then(i.bind(i,55284)),esriSpatialRelContains:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(609)]).then(i.bind(i,51508)),esriSpatialRelCrosses:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(7316)]).then(i.bind(i,85672)),esriSpatialRelDisjoint:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(6960)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(3304)]).then(i.bind(i,46178)),esriSpatialRelTouches:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(7987)]).then(i.bind(i,83547)),esriSpatialRelWithin:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1787)]).then(i.bind(i,85445)),esriSpatialRelRelation:null};async function _(e,t,i){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,p.Ye)(t,!1,!1);return t=>l(e,t)}if("esriGeometryMultipoint"===i){const i=(0,p.Ye)(t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,e)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,r.qz)(t,(0,h.pL)(i,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,r.rL)(t,(0,h.pL)(i,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(s=i)?n.xB:(0,n.xK)(s);return s=>e(t,(0,h.pL)(i,s))}}var s;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const o=await function(e){const t=v[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>o.execute(t,(0,h.pL)(i,e))}async function F(e,t,i){const{spatialRel:r,geometry:n}=e;if(n){if(null==(l=r)||!0!==y[l])throw new s.A(m,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(n.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===g[(0,a.$B)(e)]}(n))throw new s.A(m,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===x[e]}(t))throw new s.A(m,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,f.Nk)(e.geometry?.spatialReference,e.outSR)}}var l}function w(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},86420(e,t,i){i.d(t,{I:()=>n,W:()=>r});var s=i(21818);async function r(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:r,endTimeField:n}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(r&&n)await t.forEach(e=>{const t=i.getAttribute((0,s.z)(e),r),l=i.getAttribute((0,s.z)(e),n);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))});else{const e=r||n;await t.forEach(t=>{const r=i.getAttribute((0,s.z)(t),e);null==r||isNaN(r)||(a=Math.min(a,r),o=Math.max(o,r))})}return{start:a,end:o}}function n(e,t,i){if(!t||!e)return null;const{startTimeField:s,endTimeField:r}=e;if(!s&&!r)return null;const{start:n,end:a}=t;if(null===n&&null===a)return null;if(void 0===n&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return s&&r?function(e,t,i,s,r){return null!=s&&null!=r?n=>{const a=e(n,t),o=e(n,i);return(null==a||a<=r)&&(null==o||o>=s)}:null!=s?t=>{const r=e(t,i);return null==r||r>=s}:null!=r?i=>{const s=e(i,t);return null==s||s<=r}:void 0}(o,s,r,n,a):function(e,t,i,s){return null!=i&&null!=s&&i===s?s=>e(s,t)===i:null!=i&&null!=s?r=>{const n=e(r,t);return null!=n&&n>=i&&n<=s}:null!=i?s=>{const r=e(s,t);return null!=r&&r>=i}:null!=s?i=>{const r=e(i,t);return null!=r&&r<=s}:void 0}(o,s||r,n,a)}},92300(e,t,i){i.d(t,{V:()=>a,X:()=>n});var s=i(60408),r=i(65864);function n(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function a(e,t,i){const s=(0,r.xD)(t);return e.map(e=>{const t=s.fromJSON(e);return t.spatialReference=i,t})}},5834(e,t,i){i.d(t,{A:()=>d});var s=i(5482),r=i(93637),n=i(91429),a=i(56507),o=i(41266),l=i(41366),u=i(93223);function c(e,t,i){(0,r.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(o.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,s.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:c}}})],d.prototype,"end",void 0),(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:c}}})],d.prototype,"start",void 0),(0,s.Cg)([(0,u.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s.Cg)([(0,n.$K)("esri.rest.support.AutoIntervalBinParameters")],d),d.from=(0,a.dp)(d)},41266(e,t,i){i.d(t,{A:()=>m});var s=i(5482),r=i(69540),n=i(66552),a=i(25482),o=i(91429),l=i(56507),u=i(93223);const c=new n.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends((0,r.OU)(a.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,s.Cg)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,s.Cg)([(0,u.e)(c)],d.prototype,"valueType",void 0),d=(0,s.Cg)([(0,o.$K)("esri.rest.support.AttributeBinsGrouping")],d);const p=d;d.from=(0,l.dp)(d);const h=new n.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),f=new n.J({naturalLog:"natural-log",squareRoot:"square-root"});let m=class extends((0,r.OU)(a.o)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],m.prototype,"expression",void 0),(0,s.Cg)([(0,u.e)(h,{name:"onExpression.valueType"})],m.prototype,"expressionValueType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],m.prototype,"field",void 0),(0,s.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],m.prototype,"firstDayOfWeek",void 0),(0,s.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"hideUpperBound",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],m.prototype,"splitBy",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],m.prototype,"stackBy",void 0),(0,s.Cg)([(0,u.e)(f)],m.prototype,"transformation",void 0),m=(0,s.Cg)([(0,o.$K)("esri.rest.support.BinParametersBase")],m)},59977(e,t,i){i.d(t,{A:()=>y});var s=i(5482),r=i(93637),n=i(91429),a=i(56507),o=i(41266),l=i(69540),u=i(25482),c=i(57231),d=i(93223);let p=class extends((0,l.OU)(u.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,s.Cg)([(0,n.MZ)({type:Number,json:{name:"number",write:!0}})],p.prototype,"value",void 0),(0,s.Cg)([(0,d.e)(c.g)],p.prototype,"unit",void 0),p=(0,s.Cg)([(0,n.$K)("esri.rest.support.DateBinTimeInterval")],p);const h=p;function f(e,t,i){(0,r.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function m(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}p.from=(0,a.dp)(p);let y=class extends o.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=!1,this.start=null,this.snapToData=null,this.type="date"}};(0,s.Cg)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>m(t,"end")},write:{writer:f}}})],y.prototype,"end",void 0),(0,s.Cg)([(0,n.MZ)({type:h,json:{name:"parameters",write:!0}})],y.prototype,"interval",void 0),(0,s.Cg)([(0,n.MZ)({type:h,json:{name:"parameters.offset",write:!0}})],y.prototype,"offset",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],y.prototype,"returnFullIntervalBin",void 0),(0,s.Cg)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>m(t,"start")},write:{writer:f}}})],y.prototype,"start",void 0),(0,s.Cg)([(0,n.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],y.prototype,"snapToData",void 0),(0,s.Cg)([(0,d.e)({dateBin:"date"},{readOnly:!0})],y.prototype,"type",void 0),y=(0,s.Cg)([(0,n.$K)("esri.rest.support.DateBinParameters")],y),y.from=(0,a.dp)(y)},57231(e,t,i){i.d(t,{g:()=>s});const s=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"})},11440(e,t,i){i.d(t,{A:()=>u});var s=i(5482),r=i(93637),n=i(91429),a=i(56507),o=i(41266),l=i(93223);let u=class extends o.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,r.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],u.prototype,"boundaries",void 0),(0,s.Cg)([(0,l.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],u.prototype,"type",void 0),u=(0,s.Cg)([(0,n.$K)("esri.rest.support.FixedBoundariesBinParameters")],u),u.from=(0,a.dp)(u)},60909(e,t,i){i.d(t,{A:()=>d});var s=i(5482),r=i(93637),n=i(91429),a=i(56507),o=i(41266),l=i(41366),u=i(93223);function c(e,t,i){(0,r.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(o.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:c}}})],d.prototype,"end",void 0),(0,s.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:c}}})],d.prototype,"start",void 0),(0,s.Cg)([(0,u.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s.Cg)([(0,n.$K)("esri.rest.support.FixedIntervalBinParameters")],d),d.from=(0,a.dp)(d)},41366(e,t,i){i.d(t,{K:()=>d,Q:()=>l});var s=i(5482),r=i(66552),n=i(53966),a=i(91429),o=i(93223);const l=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",d=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&c||i&&u||null,t&&i&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,s.Cg)([(0,o.e)(l,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,s.Cg)([(0,a.$K)("esri.rest.support.NormalizationBinParametersMixin")],i),i}}}]);
|