@arcgis/core 4.33.0-next.20250204 → 4.33.0-next.20250206
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/assets/components/assets/icon/dualImageArea16.json +1 -0
- package/assets/components/assets/icon/dualImageArea24.json +1 -0
- package/assets/components/assets/icon/dualImageArea32.json +1 -0
- package/assets/components/assets/icon/dualImageDistance16.json +1 -0
- package/assets/components/assets/icon/dualImageDistance24.json +1 -0
- package/assets/components/assets/icon/dualImageDistance32.json +1 -0
- package/assets/components/assets/icon/dualImageLocation16.json +1 -0
- package/assets/components/assets/icon/dualImageLocation24.json +1 -0
- package/assets/components/assets/icon/dualImageLocation32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/06f693780f70e5a627c4.js +1 -0
- package/assets/esri/core/workers/chunks/{24a86c52c8bdd0b5eb4d.js → 09a99c556089c166d1f8.js} +1 -1
- package/assets/esri/core/workers/chunks/15f850c9a1154fc57e5a.js +1 -0
- package/assets/esri/core/workers/chunks/{9b4f471fcd8a3b5e089f.js → 192569dfa7c0ea8dd864.js} +1 -1
- package/assets/esri/core/workers/chunks/1a2e1a414e651e988435.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/24e47f748f0e4f815c6e.js +1 -0
- package/assets/esri/core/workers/chunks/28374a64790342e1b5ae.js +1 -0
- package/assets/esri/core/workers/chunks/{c3f03ccabca691186aad.js → 287362f9af132fafe4de.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad215219e5eef8598745.js → 28dbbfc44cc2bdcd221d.js} +1 -1
- package/assets/esri/core/workers/chunks/2adc533dadcb018a9755.js +1 -0
- package/assets/esri/core/workers/chunks/308ec51ff4a66f7fcb0d.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/333091ab2e267652ed56.js +1 -0
- package/assets/esri/core/workers/chunks/354531dc2f0dea2ad96f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/38cd7745b8ef1b8b6196.js +1 -0
- package/assets/esri/core/workers/chunks/{8a1e4f65fc81aba7a704.js → 4122d10bc910e888eee1.js} +1 -1
- package/assets/esri/core/workers/chunks/41cd1a5c99ab3bbd1fb4.js +1 -0
- package/assets/esri/core/workers/chunks/433576983754f690bcc7.js +1 -0
- package/assets/esri/core/workers/chunks/{b1269b51cef3e11c85e3.js → 48ecc5a74fecbb2b9c6f.js} +1 -1
- package/assets/esri/core/workers/chunks/{b8a519d5d24b2e728ff8.js → 5a25cef6355fd20e44e7.js} +2 -2
- package/assets/esri/core/workers/chunks/{b8a519d5d24b2e728ff8.js.LICENSE.txt → 5a25cef6355fd20e44e7.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{8edae4ca2b18a219a43e.js → 5e7f16b312077ca8c18d.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a0415db78c68d31733f.js → 6039da57a2adedd3b83f.js} +1 -1
- package/assets/esri/core/workers/chunks/72cf9192292e5c85c6df.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/73d03c208242778e67bf.js +1 -0
- package/assets/esri/core/workers/chunks/{e4f82b5b50996b1ae48e.js → 746c964cf07e4306f21f.js} +1 -1
- package/assets/esri/core/workers/chunks/77764ca90bdd13ee2167.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{723a9fba144e2fa6d017.js → 7cb09e58bcc537ec1f7a.js} +1 -1
- package/assets/esri/core/workers/chunks/{07360fde6ea65664e6ca.js → 82d26884127ed772cc4b.js} +1 -1
- package/assets/esri/core/workers/chunks/842db06ce62758fab1e7.js +1 -0
- package/assets/esri/core/workers/chunks/{60cd8f4bba3e682ba57e.js → 91d2bdfa6e34c10b7f50.js} +1 -1
- package/assets/esri/core/workers/chunks/{12dd892cf61a76fb40ad.js → 991e0f619f1f81f94d56.js} +1 -1
- package/assets/esri/core/workers/chunks/9a27824d94df702e6e28.js +1 -0
- package/assets/esri/core/workers/chunks/{610b33b7291cffcc4e5d.js → a42ae5d5e5f66d120b4d.js} +1 -1
- package/assets/esri/core/workers/chunks/a5e9ea13e844a62b2a7f.js +1 -0
- package/assets/esri/core/workers/chunks/b21b152fa15896577242.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/b43d88b6e7dc4ab13599.js +1 -0
- package/assets/esri/core/workers/chunks/{da77eefaad83c0644380.js → b8fae500c69ca2cff62a.js} +1 -1
- package/assets/esri/core/workers/chunks/b9d9a1dc3c5d799e2685.js +1 -0
- package/assets/esri/core/workers/chunks/{9c5c6ecaf5be24279fa5.js → ddc30044f61a2c2df3fe.js} +1 -1
- package/assets/esri/core/workers/chunks/e26dc0c1654316bb1558.js +1 -0
- package/assets/esri/core/workers/chunks/ef6279f5c63ab1e88c71.js +1 -0
- package/assets/esri/core/workers/chunks/{0711d3ad4d403bcfdcad.js → f117a89d1f4001a1f9f0.js} +1 -1
- package/assets/esri/core/workers/chunks/f4e48bbdbc9da10ec71a.js +1 -0
- package/assets/esri/core/workers/chunks/f9e48205178a5a804d38.js +1 -0
- package/assets/esri/themes/base/widgets/_Directions.scss +74 -17
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/ColorMaterial.glsl.js +4 -5
- package/chunks/Pattern.glsl.js +1 -1
- package/chunks/WaterSurface.glsl.js +2 -2
- package/geometry/operators/projectOperator.js +1 -1
- package/geometry/operators/shapePreservingProjectOperator.js +1 -1
- package/geometry/support/meshUtils/elevation.js +1 -1
- package/interfaces.d.ts +76 -28
- package/layers/Layer.js +1 -1
- package/layers/graphics/data/FeatureStore.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/ogc/wcsUtils.js +1 -1
- package/layers/support/RasterFunctionTemplate.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterDatasets/multipartParser.js +1 -1
- package/layers/support/rasterDatasets/wcsCapabilitiesParser.js +1 -1
- package/layers/support/rasterFunctionUtils.d.ts +2 -1
- package/layers/support/rasterFunctionUtils.js +1 -1
- package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/package.json +2 -2
- package/rest/query/operations/queryAttachments.js +1 -1
- package/rest/support/AttachmentQuery.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/support/util.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/LayerViewManager.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileCache.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
- package/widgets/Attachments/AttachmentsViewModel.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/support/EditorItem.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
- package/widgets/support/geolocationUtils.js +1 -1
- package/assets/esri/core/workers/chunks/04306c2760c1f5b19966.js +0 -1
- package/assets/esri/core/workers/chunks/1e3ab66d0e8a7f160f33.js +0 -1
- package/assets/esri/core/workers/chunks/380d37ceb8cf52bad190.js +0 -1
- package/assets/esri/core/workers/chunks/39e38aab86dcee3f79be.js +0 -1
- package/assets/esri/core/workers/chunks/3ce826ebf0692363309d.js +0 -1
- package/assets/esri/core/workers/chunks/402de76b5de05615e111.js +0 -1
- package/assets/esri/core/workers/chunks/69d307758262e5d7a32e.js +0 -1
- package/assets/esri/core/workers/chunks/6dee40b94f94ee7bc4e4.js +0 -1
- package/assets/esri/core/workers/chunks/7a3e4cb5f64dac2cfe0e.js +0 -1
- package/assets/esri/core/workers/chunks/7e4d72279cc599b7029c.js +0 -1
- package/assets/esri/core/workers/chunks/8438fba57e82e4cc7c11.js +0 -1
- package/assets/esri/core/workers/chunks/92155d112ebb6a4c6c6e.js +0 -1
- package/assets/esri/core/workers/chunks/ba37ab9e560644dc1f18.js +0 -1
- package/assets/esri/core/workers/chunks/bbbe5d6cb8b737811c84.js +0 -1
- package/assets/esri/core/workers/chunks/bf26f58210755875748c.js +0 -1
- package/assets/esri/core/workers/chunks/c7a94e569c905f97244a.js +0 -1
- package/assets/esri/core/workers/chunks/d8c762ca94e3a11b125d.js +0 -1
- package/assets/esri/core/workers/chunks/dbc447413ab40a79ba87.js +0 -1
- package/assets/esri/core/workers/chunks/f48ef415b90edc7ccadd.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5804,6742],{92071:(e,t,r)=>{r.d(t,{P:()=>w,L:()=>S});var i=r(90237),s=r(69622),o=r(76953),n=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,n.o8)(e),a.Gr.DEFAULTS)}));for(let r=a.Gr.SERVICE;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,s)=>{e&&e.has(s)||t.set(s,(0,n.o8)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=a.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var u=r(45917),d=r(88620),p=r(40608);const c=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,d.oY)(this),r=t.store,i=new l;t.store=i,(0,o.k)(t,r,i)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const r=h(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach((e=>{s[e]=r.get(e,i)})),s}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return h(this).originOf(e)}revert(e,t){const r=h(this),i=(0,a.aB)(t),s=(0,d.oY)(this);let o;o="string"==typeof e?"*"===e?r.keys(i):[e]:e,o.forEach((e=>{s.invalidate(e),r.revert(e,i),s.commit(e)}))}};return t=(0,i._)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function h(e){return(0,d.oY)(e).store}let y=class extends(c(s.A)){};y=(0,i._)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var f=r(16649),g=r(49422);const m=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,g.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,d.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=v(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),a.Gr.USER)}updateOrigin(e,t){const r=v(this),i=(0,a.aB)(t),s=(0,f.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,d.oY)(e).store}const w=e=>{let t=class extends(m(c(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport")],t),t};let S=class extends(w(s.A)){};S=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport")],S)},46130:(e,t,r)=>{r.d(t,{v:()=>s});var i=r(76553);function s(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},76553:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>s,vD:()=>n,yS:()=>o});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${s().toUpperCase()}}`}function n(){return`{${s()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},54239:(e,t,r)=>{r.d(t,{A:()=>w});var i,s=r(90237),o=r(4576),n=r(66552),a=r(25482),l=r(83047),u=r(67076),d=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),h=r(43937);const y=(0,n.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=y.jsonValues.slice();(0,o.Xy)(f,"orthometric");const g=(0,n.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=i=class extends a.A{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.k1)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,d.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),(0,s._)([(0,h.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s._)([(0,p.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s._)([(0,d.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:{writer:g.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s._)([(0,p.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s._)([(0,p.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s._)([(0,d.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s._)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=i=(0,s._)([(0,c.$)("esri.geometry.HeightModelInfo")],m);const w=m},4146:(e,t,r)=>{r.d(t,{A:()=>S});var i=r(90237),s=r(78888),o=r(49186),n=r(65529),a=r(4902),l=r(92474),u=r(53966),d=r(74887),p=r(84952),c=r(10107),h=(r(44208),r(87811),r(40608)),y=r(5443),f=r(16930),g=r(92602),m=r(79677);let v=0,w=class extends(n.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.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 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:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=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: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,d.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 e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,p.An)(this.url)}createLayerView(e,t){return Promise.reject(new o.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,c.MZ)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],w.prototype,"effectiveVisible",null),(0,i._)([(0,c.MZ)({type:y.A})],w.prototype,"fullExtent",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,i._)([(0,c.MZ)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,i._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,i._)([(0,c.MZ)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,i._)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,i._)([(0,c.MZ)({clonable:!1})],w.prototype,"parent",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i._)([(0,c.MZ)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,i._)([(0,c.MZ)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,i._)([(0,c.MZ)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,i._)([(0,c.MZ)({type:f.A})],w.prototype,"spatialReference",void 0),(0,i._)([(0,c.MZ)({type:String})],w.prototype,"title",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,i._)([(0,c.MZ)()],w.prototype,"url",void 0),(0,i._)([(0,c.MZ)({type:m.A})],w.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,i._)([(0,h.$)("esri.layers.Layer")],w);const S=w},76742:(e,t,r)=>{r.r(t),r.d(t,{default:()=>te});var i=r(90237),s=r(13874),o=r(78888),n=r(49186),a=r(4718),l=r(53966),u=r(92071),d=r(93637),p=r(74887),c=r(84952),h=r(10107),y=(r(44208),r(36005)),f=r(40608),g=r(43937),m=r(4146),v=r(52136),w=r(18768),S=r(69208),_=r(16131),b=r(8303),I=r(25036),A=r(58947),x=r(56507),M=r(93223),P=r(25482);r(87811);let R=class extends P.A{constructor(e){super(e),this.field=null,this.type=null}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}};(0,i._)([(0,h.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],R.prototype,"field",void 0),(0,i._)([(0,h.MZ)({readOnly:!0,nonNullable:!0,json:{read:!1,write:{isRequired:!0}}})],R.prototype,"type",void 0),R=(0,i._)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudFilter")],R);const O=R;var U;let E=U=class extends O{constructor(e){super(e),this.requiredClearBits=null,this.requiredSetBits=null,this.type="bitfield"}clone(){return new U({field:this.field,requiredClearBits:(0,a.o8)(this.requiredClearBits),requiredSetBits:(0,a.o8)(this.requiredSetBits)})}};(0,i._)([(0,h.MZ)({type:[x.jz],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredSetBits}}}}})],E.prototype,"requiredClearBits",void 0),(0,i._)([(0,h.MZ)({type:[x.jz],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredClearBits}}}}})],E.prototype,"requiredSetBits",void 0),(0,i._)([(0,M.e)({pointCloudBitfieldFilter:"bitfield"})],E.prototype,"type",void 0),E=U=(0,i._)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudBitfieldFilter")],E);const F=E;var Z;let L=Z=class extends O{constructor(e){super(e),this.includedReturns=[],this.type="return"}clone(){return new Z({field:this.field,includedReturns:(0,a.o8)(this.includedReturns)})}};(0,i._)([(0,h.MZ)({type:[["firstOfMany","last","lastOfMany","single"]],json:{write:{enabled:!0,isRequired:!0}}})],L.prototype,"includedReturns",void 0),(0,i._)([(0,M.e)({pointCloudReturnFilter:"return"})],L.prototype,"type",void 0),L=Z=(0,i._)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudReturnFilter")],L);const j=L;var N;let T=N=class extends O{constructor(e){super(e),this.mode="exclude",this.type="value",this.values=[]}clone(){return new N({field:this.field,mode:this.mode,values:(0,a.o8)(this.values)})}};(0,i._)([(0,h.MZ)({type:["exclude","include"],json:{write:{enabled:!0,isRequired:!0}}})],T.prototype,"mode",void 0),(0,i._)([(0,M.e)({pointCloudValueFilter:"value"})],T.prototype,"type",void 0),(0,i._)([(0,h.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],T.prototype,"values",void 0),T=N=(0,i._)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudValueFilter")],T);const C={key:"type",base:O,typeMap:{value:T,bitfield:F,return:j}};var $,k=r(10873),q=r(20437),B=r(17036),V=r(93705),K=r(63531),D=r(51857);let H=$=class extends D.A{constructor(e){super(e),this.type="point-cloud-rgb",this.field=null}clone(){return new $({...this.cloneProperties(),field:(0,a.o8)(this.field)})}};(0,i._)([(0,M.e)({pointCloudRGBRenderer:"point-cloud-rgb"})],H.prototype,"type",void 0),(0,i._)([(0,h.MZ)({type:String,json:{write:{isRequired:!0}}})],H.prototype,"field",void 0),H=$=(0,i._)([(0,f.$)("esri.renderers.PointCloudRGBRenderer")],H);const G=H;var J=r(69846),z=r(48425);const X={key:"type",base:D.A,typeMap:{"point-cloud-class-breaks":K.A,"point-cloud-rgb":G,"point-cloud-stretch":J.A,"point-cloud-unique-value":z.A},errorContext:"renderer"};var Q=r(24212),Y=r(30291);const W=(0,B.p)();let ee=class extends((0,A.w6)((0,w.b)((0,_.q)((0,b.A)((0,I.j)((0,u.P)((0,S.d)((0,v.p)(m.A))))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){const t=this.fieldsIndex.get(e);return t?.domain?t.domain:null}readServiceFields(e,t,r){return Array.isArray(e)?e.map((e=>{const t=new q.A;return"FieldTypeInteger"===e.type&&((e=(0,a.o8)(e)).type="esriFieldTypeInteger"),t.read(e,r),t})):Array.isArray(t.attributeStorageInfo)?t.attributeStorageInfo.map((e=>new q.A({name:e.name,type:"ELEVATION"===e.name?"double":"integer"}))):null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}writeRenderer(e,t,r,i){(0,d.sM)("layerDefinition.drawingInfo.renderer",e.write({},i),t)}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(p.QP).then((()=>this._fetchService(t)));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){const t=(0,Y.tn)(this,e);return t&&(this._formatPopupTemplateReturnsField(t),this._formatPopupTemplateRGBField(t)),t}_formatPopupTemplateReturnsField(e){const t=this.fieldsIndex.get("RETURNS");if(!t)return;const r=e.fieldInfos?.find((e=>e.fieldName===t.name));if(!r)return;const i=new V.A({name:"pcl-returns-decoded",title:t.alias||t.name,expression:`\n var returnValue = $feature.${t.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){const t=this.fieldsIndex.get("RGB");if(!t)return;const r=e.fieldInfos?.find((e=>e.fieldName===t.name));if(!r)return;const i=new V.A({name:"pcl-rgb-decoded",title:t.alias||t.name,expression:`\n var rgb = $feature.${t.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,t){if(await this.load(t),!this.attributeStorageInfo)throw new n.A("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new n.A("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.attributeStorageInfo)if(e.name===r.name){const r=(0,c.fj)(this.parsedUrl?.path??"",`./statistics/${e.key}`);return(0,o.A)(r,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new n.A("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(A.Xh.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"};return this._debouncedSaveOperations(A.Xh.SAVE,e)}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new n.A("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new n.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new n.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some((t=>t.name===e))}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(){const e=this.elevationInfo;(0,Q.XF)(l.A.getLogger(this),(0,Q.B)("Point cloud layers","absolute-height",e)),(0,Q.XF)(l.A.getLogger(this),(0,Q.tW)("Point cloud layers",e))}};(0,i._)([(0,h.MZ)({type:["PointCloudLayer"]})],ee.prototype,"operationalLayerType",void 0),(0,i._)([(0,h.MZ)(k.M6)],ee.prototype,"popupEnabled",void 0),(0,i._)([(0,h.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],ee.prototype,"popupTemplate",void 0),(0,i._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ee.prototype,"defaultPopupTemplate",null),(0,i._)([(0,h.MZ)({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],ee.prototype,"opacity",void 0),(0,i._)([(0,h.MZ)({type:["show","hide"]})],ee.prototype,"listMode",void 0),(0,i._)([(0,h.MZ)({types:[C],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],ee.prototype,"filters",void 0),(0,i._)([(0,h.MZ)({type:[q.A]})],ee.prototype,"fields",void 0),(0,i._)([(0,h.MZ)(W.fieldsIndex)],ee.prototype,"fieldsIndex",void 0),(0,i._)([(0,y.w)("service","fields",["fields","attributeStorageInfo"])],ee.prototype,"readServiceFields",null),(0,i._)([(0,h.MZ)(W.outFields)],ee.prototype,"outFields",void 0),(0,i._)([(0,h.MZ)({readOnly:!0})],ee.prototype,"attributeStorageInfo",void 0),(0,i._)([(0,h.MZ)(k.Yj)],ee.prototype,"elevationInfo",null),(0,i._)([(0,h.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],ee.prototype,"path",void 0),(0,i._)([(0,h.MZ)(k.fV)],ee.prototype,"legendEnabled",void 0),(0,i._)([(0,h.MZ)({types:X,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:X},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],ee.prototype,"renderer",void 0),(0,i._)([(0,g.K)("renderer")],ee.prototype,"writeRenderer",null),(0,i._)([(0,h.MZ)({json:{read:!1},readOnly:!0})],ee.prototype,"type",void 0),ee=(0,i._)([(0,f.$)("esri.layers.PointCloudLayer")],ee);const te=ee},52136:(e,t,r)=>{r.d(t,{p:()=>n});var i=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const n=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],t),t}},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(90237),s=r(53966),o=r(10107),n=(r(44208),r(87811),r(40608)),a=r(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,i._)([(0,o.MZ)()],t.prototype,"title",null),(0,i._)([(0,o.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,n.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>n});var i=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(90237),s=r(92602),o=r(70333),n=r(78888),a=r(60999),l=r(49186),u=r(53966),d=r(97768),p=r(74887),c=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),g=r(43937),m=r(83531),v=r(20655),w=r(80812),S=r(41318),_=r(10407);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,d.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,p.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!o.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let n,a;if(s)n=r.portal.url;else try{n=await(0,m.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!n||!(0,c.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,u=!1,d=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:d}};try{if(s?await r.reload():(r=new w.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:d}}}_getUserPrivileges(e,t){const r=(0,_.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(i))return s.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,d=await(0,a.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return d.ok?S.A.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,c.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,h.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},25036:(e,t,r)=>{r.d(t,{j:()=>n});var i=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,s.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},58947:(e,t,r)=>{r.d(t,{Xh:()=>Z,w6:()=>x});var i=r(90237),s=r(78888),o=r(49186),n=r(53966),a=r(74887),l=r(84952),u=r(10107),d=(r(44208),r(87811),r(36005)),p=r(40608),c=r(43937),h=r(46130),y=r(5443),f=r(54239),g=r(16930),m=r(60694),v=r(10873),w=r(83898);var S=r(20655),_=r(80812),b=r(88788),I=r(91682),A=r(26121);const x=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.sg)((async(e,t,r)=>{switch(e){case Z.SAVE:return this._save(t);case Z.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return P(t)}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:P(t)}:e;return y.A.fromJSON(i,r)}const i=t.store,s=P(t);return null==s||null==i?.extent||!Array.isArray(i.extent)||i.extent.some((e=>e<M))?null:new y.A({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:s})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,m.yG)(this.url,t.name):t.name;let i=t.name;if(!i&&this.url){const e=(0,m.qg)(this.url);null!=e&&(i=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(i=r+" - "+i),(0,m.cr)(i)}set url(e){if(null==e)return void this._set("url",e);const t=(0,m.HZ)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:n.A.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){(0,m.LS)(this,e,"layers",t,i)}get parsedUrl(){const e=this._get("url"),t=(0,l.An)(e);return t&&null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,w.F)(this.parsedUrl?.path??"",this.rootNode,e,this.customParameters,this.apiKey,n.A.getLogger(this),t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r?.obb?.center||null==r.obb.halfSize)throw new o.A("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<M||null==this.fullExtent||this.fullExtent.hasZ)return;const i=r.obb.halfSize,s=r.obb.center[2],n=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);this.fullExtent.zmin=s-n,this.fullExtent.zmax=s+n}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<M)return;const r=t[2],i=t[3],{fullExtent:s}=this;s&&(s.zmin=r-i,s.zmax=r+i)}}async _fetchService(e){if(null==this.url)throw new o.A("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,s.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,s.A)(this.parsedUrl?.path??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});t.ssl&&this.url&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const i=t.data;this.read(i,this._getServiceContext()),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){const t=(await(0,s.A)(this.parsedUrl?.path+"/layer",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}async _saveAs(e,t){const r={...F,...t};let i=_.default.from(e);if(!i)throw new o.A("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");i.id&&(i=i.clone(),i.id=null);const s=i.portal||S.A.getDefault();await this._ensureLoadBeforeSave(),i.type=E,i.portal=s;const n=(0,b.m)(i,"portal-item",!0),a={layers:[this.write({},n)]};return await Promise.all(n.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,n,r),this.url&&(i.url=this.url),i.title||(i.title=this.title),R(i,r,O.newItem),await s.signIn(),await s.user.addItem({item:i,folder:r?.folder,data:a}),await(0,I.r)(this.resourceReferences,n),this.portalItem=i,(0,h.v)(n),n.portalItem=i,i}async _save(e){const t={...F,...e};if(!this.portalItem)throw new o.A("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==E)throw new o.A("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${E}"`);await this._ensureLoadBeforeSave();const r=(0,b.m)(this.portalItem,"portal-item",!0),i={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(i,r,t),this.url&&(this.portalItem.url=this.url),this.portalItem.title||(this.portalItem.title=this.title),R(this.portalItem,t,O.existingItem),await(0,I.S)(this.portalItem,i,this.resourceReferences,r),(0,h.v)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){const i=r?.validationOptions;(0,A.c)(t,{errorName:"sceneservice:save"},{ignoreUnsupported:i?.ignoreUnsupported,supplementalUnsupportedErrors:["scenemodification:unsupported"]});const s=i?.enabled,a=null;if(s&&a){const t=(await a()).validate(e,r.portalItemLayerType);if(!t.length)return;const s=`Layer item did not validate:\n${t.join("\n")}`;if(n.A.getLogger(this).error(`_validateAgainstJSONSchema(): ${s}`),"throw"===i.failPolicy){const e=t.map((e=>new o.A("sceneservice:schema-validation",e)));throw new o.A("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{validationErrors:e})}}}};return(0,i._)([(0,u.MZ)(v.id)],t.prototype,"id",void 0),(0,i._)([(0,u.MZ)({type:g.A})],t.prototype,"spatialReference",void 0),(0,i._)([(0,d.w)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,u.MZ)({type:y.A})],t.prototype,"fullExtent",void 0),(0,i._)([(0,d.w)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,i._)([(0,u.MZ)({readOnly:!0,type:f.A})],t.prototype,"heightModelInfo",void 0),(0,i._)([(0,u.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,i._)([(0,u.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,d.w)("version",["store.version"])],t.prototype,"readVersion",null),(0,i._)([(0,u.MZ)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.MZ)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,u.MZ)({type:String})],t.prototype,"title",void 0),(0,i._)([(0,d.w)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,i._)([(0,d.w)("service","title",["name"])],t.prototype,"readTitleService",null),(0,i._)([(0,u.MZ)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,i._)([(0,u.MZ)(v.OZ)],t.prototype,"url",null),(0,i._)([(0,c.K)("url")],t.prototype,"writeUrl",null),(0,i._)([(0,u.MZ)()],t.prototype,"parsedUrl",null),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"store",void 0),(0,i._)([(0,u.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,i._)([(0,p.$)("esri.layers.mixins.SceneService")],t),t},M=-1e38;function P(e){if(null!=e.spatialReference)return g.A.fromJSON(e.spatialReference);const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.slice(r.lastIndexOf("/")+1),10);return null!=i?new g.A(i):null}function R(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===O.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}var O,U;(U=O||(O={}))[U.existingItem=0]="existingItem",U[U.newItem=1]="newItem";const E="Scene Service",F={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var Z;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(Z||(Z={}))},83898:(e,t,r)=>{r.d(t,{F:()=>o});var i=r(78888),s=r(49186);async function o(e,t,r,o,n,a,l){let u=null;if(null!=r){const t=`${e}/nodepages/`,s=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.A)(s,{query:{f:"json",...o,token:n},responseType:"json",signal:l})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=a&&a.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",s,e),u=e}}if(!t)return null;const d=t?.split("/").pop(),p=`${e}/nodes/`,c=p+d;try{return{type:"node",rootNode:(await(0,i.A)(c,{query:{f:"json",...o,token:n},responseType:"json",signal:l})).data,urlPrefix:p}}catch(e){throw new s.A("sceneservice:root-node-missing","Root node missing.",{pageError:u,nodeError:e,url:c})}}},17036:(e,t,r)=>{r.d(t,{p:()=>l});var i=r(44208),s=r(53966),o=r(20437),n=r(95466),a=r(30524);function l(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return n.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},88788:(e,t,r)=>{r.d(t,{m:()=>n,v:()=>o});var i=r(84952),s=r(20655);function o(e,t){return{...a(e,t),readResourcePaths:[]}}function n(e,t,r){const s=(0,i.An)(e.itemUrl);return{...a(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:s?{rootPath:s.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function a(e,t){return{origin:t,url:(0,i.An)(e.itemUrl),portal:e.portal||s.A.getDefault(),portalItem:e}}},15804:(e,t,r)=>{r.d(t,{addOrUpdateResources:()=>a,bg:()=>c,cL:()=>p,fetchResources:()=>n,removeAllResources:()=>u,removeResource:()=>l});var i=r(78888),s=r(49186),o=r(84952);async function n(e,t={},r){await e.load(r);const i=(0,o.fj)(e.itemUrl,"resources"),{start:s=1,num:n=10,sortOrder:a="asc",sortField:l="resource"}=t,u={query:{start:s,num:n,sortOrder:a,sortField:l,token:e.apiKey},signal:r?.signal},d=await e.portal.request(i,u);return{total:d.total,nextStart:d.nextStart,resources:d.resources.map((({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)})))}}async function a(e,t,r,i){const n=new Map;for(const{resource:e,content:i,compress:o,access:a}of t){if(!e.hasPath())throw new s.A(`portal-item-resource-${r}:invalid-path`,"Resource does not have a valid path");const[t,l]=d(e.path),u=`${t}/${o??""}/${a??""}`;n.has(u)||n.set(u,{prefix:t,compress:o,access:a,files:[]}),n.get(u).files.push({fileName:l,content:i})}await e.load(i);const a=(0,o.fj)(e.userItemUrl,"add"===r?"addResources":"updateResources");for(const{prefix:t,compress:r,access:s,files:o}of n.values()){const n=25;for(let l=0;l<o.length;l+=n){const u=o.slice(l,l+n),d=new FormData;t&&"."!==t&&d.append("resourcesPrefix",t),r&&d.append("compress","true"),s&&d.append("access",s);let p=0;for(const{fileName:e,content:t}of u)d.append("file"+ ++p,t,e);d.append("f","json"),await e.portal.request(a,{method:"post",body:d,signal:i?.signal})}}}async function l(e,t,r){if(!t.hasPath())throw new s.A("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,o.fj)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function u(e,t){await e.load(t);const r=(0,o.fj)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function d(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function p(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,i.A)(e.url,{responseType:"blob"})).data}function c(e,t){if(!e.hasPath())return null;const[r,,i]=function(e){const[t,r]=function(e){const t=(0,o.Zo)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,s]=d(t);return[i,s,r]}(e.path);return e.portalItem.resourceFromPath((0,o.fj)(r,t+i))}},24212:(e,t,r)=>{function i(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?l:u}(e).mode}(null==e||(e.hasZ??!1),t)}function s(e,t,r){return r&&r.mode!==t?`${e} only support ${t} elevation mode`:null}function o(e,t,r){return r?.mode===t?`${e} do not support ${t} elevation mode`:null}function n(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function a(e,t){t&&e.warn(".elevationInfo=",t)}r.d(t,{$7:()=>o,B:()=>s,XF:()=>a,tW:()=>n,w7:()=>i}),r(83047),r(16271);const l={mode:"absolute-height",offset:0},u={mode:"on-the-ground",offset:null}},30291:(e,t,r)=>{r.d(t,{tn:()=>u});var i=r(13874),s=r(30524),o=r(89893),n=(r(84424),r(80737),r(96808),r(66159)),a=(r(67336),r(92094),r(23721),r(47582),r(41227)),l=r(68780);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},h){if(!r)return null;const f=function(e,t){const r=t?.visibleFieldNames;return function({fields:e,ignoreFieldTypes:t,sortDisabled:r}){const i=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===i&&(e=e.slice()),!0!==r&&e.sort(p),e}({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||y,sortDisabled:t?.sortDisabled}).map((t=>new a.A({fieldName:t.name,isEditable:(0,s.R$)(t,e),label:t.alias,format:c(t),visible:d(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:l},h);if(!f.length)return null;const g=function(e){const t=(0,s.mB)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),m=[new n.A,new o.A];return new i.A({title:g,content:m,fieldInfos:f})}const d=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,s.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function c(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.A({digitSeparator:!0,places:0});case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,s.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):void 0;default:return}}function h(e){if("name"===(e.name&&e.name.toLowerCase()))return!0;const t=e.alias?.toLowerCase();return"name"===t}const y=["geometry","blob","raster","guid","xml"]},91682:(e,t,r)=>{r.d(t,{S:()=>l,r:()=>a});var i=r(49186),s=r(74887),o=r(13069),n=r(15804);async function a(e,t,r){const i=await u(e,t,r);await d(i,t,r)}async function l(e,t,r,i,s){const o=await u(r,i,s);await e.update({data:t}),await d(o,i,s)}async function u(e,t,a){if(!t?.resources)return;const l=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const u=new Set(t.resources.toKeep.map((e=>e.resource.path))),d=new Set,p=[];u.forEach((t=>{l.delete(t),e.paths.push(t)}));const c=[],h=[],y=[];for(const r of t.resources.toUpdate)if(l.delete(r.resource.path),u.has(r.resource.path)||d.has(r.resource.path)){const{resource:t,content:i,finish:s}=r,a=(0,n.bg)(t,(0,o.lk)());e.paths.push(a.path),c.push({resource:a,content:await(0,n.cL)(i),compress:r.compress}),s&&y.push((()=>s(a)))}else{e.paths.push(r.resource.path),h.push({resource:r.resource,content:await(0,n.cL)(r.content),compress:r.compress});const t=r.finish;t&&y.push((()=>t(r.resource))),d.add(r.resource.path)}for(const r of t.resources.toAdd)if(e.paths.push(r.resource.path),l.has(r.resource.path))l.delete(r.resource.path);else{c.push({resource:r.resource,content:await(0,n.cL)(r.content),compress:r.compress});const e=r.finish;e&&y.push((()=>e(r.resource)))}if(c.length||h.length){const{addOrUpdateResources:e}=await Promise.resolve().then(r.bind(r,15804));await e(t.portalItem,c,"add",a),await e(t.portalItem,h,"update",a)}if(y.forEach((e=>e())),0===p.length)return l;const f=await(0,s.Ol)(p);if((0,s.Te)(a),f.length>0)throw new i.A("save:resources","Failed to save one or more resources",{errors:f});return l}async function d(e,t,r){if(!e||!t.portalItem)return;const i=[];for(const s of e){const e=t.portalItem.resourceFromPath(s);i.push(e.portalItem.removeResource(e,r))}await(0,s.Lx)(i)}},26121:(e,t,r)=>{r.d(t,{c:()=>n,d:()=>s});var i=r(49186);async function s(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}const o=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function n(e,t,r){let s=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new i.A(e,t,r)));if(e.blockedRelativeUrls&&(s=s.concat(e.blockedRelativeUrls.map((e=>new i.A("url:unsupported",`Relative url '${e}' is not supported`))))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=r;e&&(s=s.filter((({name:e})=>!(o.has(e)||t.includes(e))))),i&&(s=s.filter((e=>"web-document-write:property-required"!==e.name)))}if(s.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8445],{39516:(e,t,r)=>{let s;async function i(){return null==s&&(s=r.e(4123).then(r.bind(r,44123)).then((e=>new e.WhereClauseCache(500,500)))),s}async function o(e,t){const r=await i(),s=r.get(e,t);if(null==s)throw r.getError(e,t);return s}function n(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function l(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}r.d(t,{GP:()=>o,IW:()=>l,mA:()=>n})},13069:(e,t,r)=>{r.d(t,{AG:()=>l,lk:()=>i,vD:()=>n,yS:()=>o});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function n(){return`{${i()}}`}function l(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},83960:(e,t,r)=>{r.d(t,{X_:()=>n,oW:()=>a,zx:()=>l});var s=r(34727),i=r(83047);const o=96;function n(e,t){const r=t||e.extent,s=e.width,n=(0,i.GA)(r?.spatialReference);return r&&s?r.width/s*n*i.dy*o:0}function l(e,t,r){return function(e,t){return 0===t||(0,s.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,s.Sp)(e,t)||e>t}(e,r)}function a(e,t){return(0,s.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},17625:(e,t,r)=>{r.r(t),r.d(t,{default:()=>H});var s=r(90237),i=r(13874),o=r(92071),n=r(74887),l=r(84952),a=r(10107),u=r(44208),p=r(53966),d=(r(87811),r(40608)),c=r(5443),y=r(16930),h=r(50498),m=r(4146),f=r(49186),g=r(92474),v=r(29953),_=r(39829),w=r(64714),x=r(22671);let I=class extends g.A{constructor(){super(...arguments),this.type="geojson",this.refresh=(0,n.sg)((async e=>{await this.load();const{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}queryFeatures(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t))).then((e=>x.A.fromJSON(e)))}queryFeaturesJSON(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t)))}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:c.A.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke("queryAttributeBins",e?.toJSON(),t)}_applyEdits(e){if(!this._connection)throw new f.A("geojson-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=[],s=[],i=[];if(e.addFeatures)for(const t of e.addFeatures)r.push(this._serializeFeature(t));if(e.deleteFeatures)for(const r of e.deleteFeatures)"objectId"in r&&null!=r.objectId?s.push(r.objectId):"attributes"in r&&null!=r.attributes[t]&&s.push(r.attributes[t]);if(e.updateFeatures)for(const t of e.updateFeatures)i.push(this._serializeFeature(t));return this._connection.invoke("applyEdits",{adds:r,updates:i,deletes:s}).then((({extent:e,timeExtent:t,featureEditResults:r})=>(this.sourceJSON.extent=e,t&&(this.sourceJSON.timeInfo.timeExtent=[t.start,t.end]),this._createEditsResult(r))))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new f.A("geojson-layer-source:edit-failure",t.description,{code:t.code}):null}}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e);return r?{geometry:r.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:"mesh"===t.type||"extent"===t.type?_.A.fromExtent(t.extent):t}async _startWorker(e){this._connection=await(0,v.ho)("GeoJSONSourceWorker",{strategy:(0,u.A)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:r,hasZ:s,geometryType:i,objectIdField:o,url:n,timeInfo:l,customParameters:a}=this.layer,d="defaults"===this.layer.originOf("spatialReference"),c={url:n,customParameters:a,fields:t&&t.map((e=>e.toJSON())),geometryType:h.gy.toJSON(i),hasZ:s,objectIdField:o,timeInfo:l?l.toJSON():null,spatialReference:d?null:r&&r.toJSON()},y=await this._connection.invoke("load",c,{signal:e});for(const e of y.warnings)p.A.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});y.featureErrors.length&&p.A.getLogger(this.layer).warn("#load()",`Encountered ${y.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:y.featureErrors}),this.sourceJSON=y.layerDefinition,this.capabilities=(0,w.f)(this.sourceJSON.hasZ,!0)}};(0,s._)([(0,a.MZ)()],I.prototype,"capabilities",void 0),(0,s._)([(0,a.MZ)()],I.prototype,"type",void 0),(0,s._)([(0,a.MZ)({constructOnly:!0})],I.prototype,"layer",void 0),(0,s._)([(0,a.MZ)()],I.prototype,"sourceJSON",void 0),I=(0,s._)([(0,d.$)("esri.layers.graphics.sources.GeoJSONSource")],I);var F=r(63074),M=r(69208),S=r(6455),T=r(87718),A=r(76294),b=r(16131),E=r(32756),Z=r(8303),O=r(54310),P=r(25036),R=r(82935),N=r(10873),j=r(29005),C=r(20437),U=r(17036),$=r(30524),z=r(46499),D=r(39383),J=r(13112),B=r(61956),q=r(30291),G=r(56400);const Q=(0,U.p)();let k=class extends((0,E.fY)((0,S.FJ)((0,M.d)((0,A.J)((0,T.F)((0,F.dM)((0,R.e)((0,P.j)((0,O.J)((0,b.q)((0,Z.A)((0,o.P)(m.A))))))))))))){constructor(e){super(e),this.attributeTableTemplate=null,this.copyright=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new I({layer:this}),this.spatialReference=y.A.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson"}destroy(){this.source?.destroy()}load(e){const t=this.loadFromPortal({supportedTypes:["GeoJson"],supportsData:!1},e).catch(n.QP).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo"],"service"),(0,$.yp)(this.renderer,this.fieldsIndex),(0,$.sv)(this.timeInfo,this.fieldsIndex)}));return this.addResolvingPromise(t),Promise.resolve(this)}get capabilities(){return this.source?this.source.capabilities:null}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&null==this.geometryType}get parsedUrl(){return this.url?(0,l.An)(this.url):null}set renderer(e){(0,$.yp)(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);const t=(0,l.An)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){const{applyEdits:s}=await Promise.all([r.e(8628),r.e(3513)]).then(r.bind(r,78628));await this.load();const i=await s(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),i}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,q.tn)(this,e)}createQuery(){const e=new B.A,t=this.capabilities?.data;e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:r,timeExtent:s}=this;return e.timeExtent=null!=r&&null!=s?s.offset(-r.value,r.unit):s||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(B.A.from(e)||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(B.A.from(e)||this.createQuery(),t)))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(B.A.from(e)||this.createQuery(),t)))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(B.A.from(e)||this.createQuery(),t)))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,s._)([(0,a.MZ)(N.zQ)],k.prototype,"attributeTableTemplate",void 0),(0,s._)([(0,a.MZ)({readOnly:!0,json:{read:!1,write:!1}})],k.prototype,"capabilities",null),(0,s._)([(0,a.MZ)({type:String})],k.prototype,"copyright",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],k.prototype,"createQueryVersion",null),(0,s._)([(0,a.MZ)((0,G.P6)("dateFieldsTimeReference"))],k.prototype,"dateFieldsTimeZone",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],k.prototype,"defaultPopupTemplate",null),(0,s._)([(0,a.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],k.prototype,"definitionExpression",void 0),(0,s._)([(0,a.MZ)({type:String})],k.prototype,"displayField",void 0),(0,s._)([(0,a.MZ)({type:Boolean})],k.prototype,"editingEnabled",void 0),(0,s._)([(0,a.MZ)(N.Yj)],k.prototype,"elevationInfo",void 0),(0,s._)([(0,a.MZ)({type:[C.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],k.prototype,"fields",void 0),(0,s._)([(0,a.MZ)(Q.fieldsIndex)],k.prototype,"fieldsIndex",void 0),(0,s._)([(0,a.MZ)({type:c.A,json:{name:"extent"}})],k.prototype,"fullExtent",void 0),(0,s._)([(0,a.MZ)({type:["point","polygon","polyline","multipoint"],json:{read:{reader:h.gy.read}}})],k.prototype,"geometryType",void 0),(0,s._)([(0,a.MZ)({type:Boolean})],k.prototype,"hasZ",void 0),(0,s._)([(0,a.MZ)(N.id)],k.prototype,"id",void 0),(0,s._)([(0,a.MZ)({type:Boolean,readOnly:!0})],k.prototype,"isTable",null),(0,s._)([(0,a.MZ)(N.kF)],k.prototype,"labelsVisible",void 0),(0,s._)([(0,a.MZ)({type:[z.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:D.w},write:!0}})],k.prototype,"labelingInfo",void 0),(0,s._)([(0,a.MZ)(N.fV)],k.prototype,"legendEnabled",void 0),(0,s._)([(0,a.MZ)({type:["show","hide"]})],k.prototype,"listMode",void 0),(0,s._)([(0,a.MZ)({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],k.prototype,"objectIdField",void 0),(0,s._)([(0,a.MZ)(N.ke)],k.prototype,"opacity",void 0),(0,s._)([(0,a.MZ)({type:["GeoJSON"]})],k.prototype,"operationalLayerType",void 0),(0,s._)([(0,a.MZ)(Q.outFields)],k.prototype,"outFields",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],k.prototype,"parsedUrl",null),(0,s._)([(0,a.MZ)(N.M6)],k.prototype,"popupEnabled",void 0),(0,s._)([(0,a.MZ)({type:i.A,json:{name:"popupInfo",write:!0}})],k.prototype,"popupTemplate",void 0),(0,s._)([(0,a.MZ)({types:J.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:J.XJ}}}})],k.prototype,"renderer",null),(0,s._)([(0,a.MZ)(N.PY)],k.prototype,"screenSizePerspectiveEnabled",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],k.prototype,"source",void 0),(0,s._)([(0,a.MZ)({type:y.A})],k.prototype,"spatialReference",void 0),(0,s._)([(0,a.MZ)({type:[j.A]})],k.prototype,"templates",void 0),(0,s._)([(0,a.MZ)()],k.prototype,"title",void 0),(0,s._)([(0,a.MZ)({json:{read:!1},readOnly:!0})],k.prototype,"type",void 0),(0,s._)([(0,a.MZ)(N.OZ)],k.prototype,"url",null),k=(0,s._)([(0,d.$)("esri.layers.GeoJSONLayer")],k);const H=k},99352:(e,t,r)=>{r.d(t,{F:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,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,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1}},64714:(e,t,r)=>{r.d(t,{F0:()=>a,Vx:()=>d,e2:()=>y,f:()=>h});var s=r(44208),i=r(4718),o=r(99352),n=r(4071),l=r(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?l.Cb:"esriGeometryPolyline"===e?l.yM:l.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function d(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${c(t)} = null;`;for(const t in e)r+=`this${c(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function c(e){return u.test(e)?`.${e}`:`["${e}"]`}function y(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.o8)(e)}}]}function h(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:n.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},69208:(e,t,r)=>{r.d(t,{d:()=>n});var s=r(90237),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,s._)([(0,o.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},6455:(e,t,r)=>{r.d(t,{FJ:()=>w,Dp:()=>x,KV:()=>I});var s=r(90237),i=r(93637),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608)),l=r(89317),a=r(69540),u=r(5503),p=r(25482),d=r(43937),c=r(83960),y=r(13069);const h={write:{overridePolicy:(e,t,r)=>({enabled:!r||"scale"===r.filterMode})}};let m=class extends(a.A.ClonableMixin(p.A)){constructor(e){super(e),this.id=(0,y.lk)(),this.maxScale=0,this.minScale=0,this.title="",this.where=null}};(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"id",void 0),(0,s._)([(0,o.MZ)({type:Number,json:h})],m.prototype,"maxScale",void 0),(0,s._)([(0,o.MZ)({type:Number,json:h})],m.prototype,"minScale",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"title",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"where",void 0),m=(0,s._)([(0,n.$)("esri.layers.support.DisplayFilter")],m);const f=m;var g=r(41560);let v=class extends(a.A.ClonableMixin(p.A)){constructor(e){super(e),this.activeFilterId=null,this.filters=new(u.A.ofType(f)),this.mode="manual"}writeFilters(e,t,r,s){const i=e.toArray();"scale"===this.mode&&i.sort(((e,t)=>{const r=(0,c.oW)(t.minScale,e.minScale),s=e.maxScale-t.maxScale;return 0===r?s:r})),t[r]=i.map((e=>e.toJSON(s)))}write(e,t){return super.write(e,(0,g.mW)(this,t))}};(0,s._)([(0,o.MZ)({type:String,json:{write:{overridePolicy:(e,t,r)=>({enabled:"manual"===r.filterMode,isRequired:!0})}}})],v.prototype,"activeFilterId",void 0),(0,s._)([(0,o.MZ)({type:u.A.ofType(f),nonNullable:!0,json:{write:!0}})],v.prototype,"filters",void 0),(0,s._)([(0,d.K)("filters")],v.prototype,"writeFilters",null),(0,s._)([(0,o.MZ)({type:["manual","scale"],nonNullable:!0,json:{name:"filterMode",write:!0}})],v.prototype,"mode",void 0),v=(0,s._)([(0,n.$)("esri.layers.support.DisplayFilterInfo")],v);const _=v,w=e=>{let t=class extends e{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return(0,s._)([(0,o.MZ)(x)],t.prototype,"displayFilterEnabled",void 0),(0,s._)([(0,o.MZ)(I)],t.prototype,"displayFilterInfo",void 0),t=(0,s._)([(0,n.$)("esri.layers.mixins.DisplayFilteredLayer")],t),t},x={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:e=>!e},write:{layerContainerTypes:l.K,writer(e,t,r){(0,i.sM)(r,!e,t)}},origins:{"web-scene":{write:!1,read:!1}}}},I={type:_,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:l.K},origins:{"web-scene":{write:!1,read:!1}}}}},32756:(e,t,r)=>{r.d(t,{Rr:()=>a,fY:()=>p,ne:()=>u});var s=r(90237),i=r(93637),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);function a(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const i=new l.A;return i.read(s,r),[i]}const u={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,s){const o=e.find((e=>!!e.field));o&&(0,i.sM)(r,[o.toJSON()],t)}}}},p=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,o.MZ)(u)],t.prototype,"orderBy",void 0),t=(0,s._)([(0,n.$)("esri.layers.mixins.OrderedLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>I});var s=r(90237),i=r(92602),o=r(70333),n=r(78888),l=r(60999),a=r(49186),u=r(53966),p=r(97768),d=r(74887),c=r(84952),y=r(10107),h=(r(44208),r(87811),r(36005)),m=r(40608),f=r(43937),g=r(83531),v=r(20655),_=r(80812),w=r(41318),x=r(10407);const I=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new _.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:s}=await r.e(1204).then(r.bind(r,41204));return(0,d.Te)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=!o.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,s);let n,l;if(i)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!n||!(0,c.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,u=!1,p=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:p}};try{if(i?await r.reload():(r=new _.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,s)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,x.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=F.credential===t?F.user:await this._fetchEditingUser(e);return F.credential=t,F.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=v.A.getDefault();if(i&&i.loaded&&(0,c.S8)(i.restUrl)===(0,c.S8)(s))return i.user;const a=`${s}/community/self`,u=null!=e?e.signal:null,p=await(0,l.Ke)((0,n.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?w.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,s=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&s&&!(0,c.ut)(s.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,y.MZ)({type:_.default})],t.prototype,"portalItem",null),(0,s._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,m.$)("esri.layers.mixins.PortalLayer")],t),t},F={credential:null,user:null}},82935:(e,t,r)=>{r.d(t,{B:()=>y,e:()=>h});var s=r(90237),i=r(10107),o=(r(44208),r(53966),r(87811),r(36005)),n=r(40608),l=r(89317),a=r(30524),u=r(96184),p=r(73133),d=r(79677),c=r(10184);const y={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:l.K}}},h=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const s=r.timeOffset,i=p.j.fromJSON(r.timeOffsetUnits);return s&&i?new c.A({value:s,unit:i}):null}set timeInfo(e){(0,a.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,s._)([(0,i.MZ)({type:d.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,s._)([(0,i.MZ)({type:c.A})],t.prototype,"timeOffset",void 0),(0,s._)([(0,o.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,s._)([(0,i.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,s._)([(0,i.MZ)(y)],t.prototype,"useViewTime",void 0),t=(0,s._)([(0,n.$)("esri.layers.mixins.TemporalLayer")],t),t}},29005:(e,t,r)=>{r.d(t,{A:()=>d});var s=r(90237),i=r(69540),o=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends(i.A.ClonableMixin(n.A)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,s._)([(0,l.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,s._)([(0,l.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,s._)([(0,l.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,s._)([(0,l.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,s._)([(0,l.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,s._)([(0,a.$)("esri.layers.support.FeatureTemplate")],p);const d=p},91880:(e,t,r)=>{r.d(t,{A:()=>d});var s,i=r(90237),o=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new o.J({asc:"ascending",desc:"descending"});let p=s=class extends n.A{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,i._)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=s=(0,i._)([(0,a.$)("esri.layers.support.OrderByInfo")],p);const d=p},96184:(e,t,r)=>{r.d(t,{A:()=>m});var s=r(90237),i=r(69540),o=r(25482),n=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),u=r(43937),p=r(79677),d=r(10184),c=r(56400);function y(e,t){return d.A.fromJSON({value:e,unit:t})}let h=class extends(i.A.ClonableMixin(o.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?p.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,s._)([(0,n.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,s._)([(0,n.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,s._)([(0,n.MZ)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,s._)([(0,l.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,s._)([(0,u.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,s._)([(0,n.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,s._)([(0,n.MZ)({type:d.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,s._)([(0,l.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,s._)([(0,u.K)("interval")],h.prototype,"writeInterval",null),(0,s._)([(0,n.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,s._)([(0,n.MZ)((0,c.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,s._)([(0,n.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,s._)([(0,n.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,s._)([(0,n.MZ)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,s._)([(0,a.$)("esri.layers.support.TimeInfo")],h);const m=h},4071:(e,t,r)=>{r.d(t,{$:()=>s,P:()=>i});const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},i={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},41560:(e,t,r)=>{r.d(t,{Ch:()=>n,mW:()=>o});var s=r(34727),i=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function n(e,t,r){const o=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:s}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],d(s));return t}(e);if(o&&((0,s.gg)(t,o[0])||(0,s.ZH)(r,o[1])))return"";const n=Array.from(l(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;const i=p(e.at(0)?.minScale),o=d(e.at(-1)?.maxScale);if((0,s.ZH)(i,t)||(0,s.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,s.ZH)(p(i.minScale),d(r.maxScale)))return!0}return!1}(n,t,r)?"1=1":n.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,i.IW)(e,t)),"");return a&&"1=1"!==a?a:""}function*l(e,t,r){if("manual"===u(e)){const t=e.filters.find((t=>t.id===e.activeFilterId));t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const s of e.filters)a(s.minScale,s.maxScale,t,r)&&(yield s)}}function a(e,t,r,i){return e=p(e),r=p(r),t=d(t),!(!(0,s.Sp)(r,e)&&(i??r)>e||(0,s.Hx)(t,r)||void 0!==i&&(0,s.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function p(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},17036:(e,t,r)=>{r.d(t,{p:()=>a});var s=r(44208),i=r(53966),o=r(20437),n=r(95466),l=r(30524);function a(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,s.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");i.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return n.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||i.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,l.DB)(this.fieldsIndex,e)}}}}},32730:(e,t,r)=>{r.d(t,{BI:()=>f,D3:()=>h,XJ:()=>m,lc:()=>y,mX:()=>v,rU:()=>g,tH:()=>F});var s=r(799);const i="__begin__",o="__end__",n=new RegExp(i,"ig"),l=new RegExp(o,"ig"),a=new RegExp("^"+i,"i"),u=new RegExp(o+"$","i"),p='"',d=p+" + ",c=" + "+p;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function f(e){const t=m(e);switch(t.type){case"conventional":return v(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);switch(t.type){case"conventional":return function(e){const t=e?.match(_);return t?.[1].trim()||null}(t.expression);case"arcade":return F(t.expression)}return null}function v(e){let t;return e?(t=(0,s.HC)(e,(e=>i+'$feature["'+e+'"]'+o)),t=a.test(t)?t.replace(a,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(n,d).replaceAll(l,c)):t='""',t}const _=/^\s*\{([^}]+)\}\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,x=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,I=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function F(e){if(!e)return null;let t=w.exec(e)||x.exec(e);return t?t[1]||t[3]:(t=I.exec(e),t?t[2]:null)}},73133:(e,t,r)=>{r.d(t,{j:()=>s});const s=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},22671:(e,t,r)=>{r.d(t,{A:()=>_});var s,i=r(90237),o=r(52106),n=r(66552),l=r(25482),a=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),d=r(40608),c=r(43937),y=r(16930),h=r(65864),m=r(50498),f=r(20437);const g=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=s=class extends l.A{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,o.A)}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,h.rS)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=y.A.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,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 s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[o,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*o+s),(e=>i-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 s=y.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],n=r.fromJSON(o),l=o.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=s);const a=o.aggregateGeometries,u=n.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],i=r?.spatialReference;null==t||i||(t.spatialReference=s)}i.push(n)}return i}_quantizePoints(e,t,r){let s,i;const o=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===s&&n===i||(o.push([e-s,n-i]),s=e,i=n)}else s=t(l[0]),i=r(l[1]),o.push([s,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,h.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=s.length;e<o;e++){const o=s[e],n=this._quantizePoints(o,t,r);n&&i.push(n)}return i.length>0?((0,h.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,h.Bi)(e)?e.rings:e.paths;let n,l;for(let e=0,s=o.length;e<s;e++){const s=o[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(n+=i[0],l+=i[1]):(n=i[0],l=i[1]),i[0]=t(n),i[1]=r(l)}}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,l;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(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,u.MZ)({type:[o.A],json:{write:!0}})],v.prototype,"features",void 0),(0,i._)([(0,p.w)("features")],v.prototype,"readFeatures",null),(0,i._)([(0,u.MZ)({type:[f.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,i._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,i._)([(0,c.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,i._)([(0,u.MZ)({types:m.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,i._)([(0,p.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,i._)([(0,u.MZ)({type:y.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,i._)([(0,c.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=s=(0,i._)([(0,d.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const _=v},41366:(e,t,r)=>{r.d(t,{K:()=>c,Q:()=>u});var s=r(90237),i=r(66552),o=r(53966),n=r(10107),l=(r(44208),r(87811),r(93223)),a=r(40608);const u=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),p="percent-of-total",d="field",c=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&d||r&&p||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==p||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s._)([(0,n.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,s._)([(0,l.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,s._)([(0,a.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},10184:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(90237),i=r(69540),o=r(25482),n=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let d=class extends(i.A.ClonableMixin(o.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,n.t)(this.value,this.unit,"milliseconds")}};(0,s._)([(0,a.e)(p.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,s._)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,s._)([(0,u.$)("esri.time.TimeInterval")],d);const c=d}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8445],{39516:(e,t,r)=>{let s;async function i(){return null==s&&(s=r.e(4123).then(r.bind(r,44123)).then((e=>new e.WhereClauseCache(500,500)))),s}async function o(e,t){const r=await i(),s=r.get(e,t);if(null==s)throw r.getError(e,t);return s}function n(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function l(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}r.d(t,{GP:()=>o,IW:()=>l,mA:()=>n})},13069:(e,t,r)=>{r.d(t,{AG:()=>l,lk:()=>i,vD:()=>n,yS:()=>o});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function n(){return`{${i()}}`}function l(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},83960:(e,t,r)=>{r.d(t,{X_:()=>n,oW:()=>a,zx:()=>l});var s=r(34727),i=r(83047);const o=96;function n(e,t){const r=t||e.extent,s=e.width,n=(0,i.GA)(r?.spatialReference);return r&&s?r.width/s*n*i.dy*o:0}function l(e,t,r){return function(e,t){return 0===t||(0,s.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,s.Sp)(e,t)||e>t}(e,r)}function a(e,t){return(0,s.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},17625:(e,t,r)=>{r.r(t),r.d(t,{default:()=>H});var s=r(90237),i=r(13874),o=r(92071),n=r(74887),l=r(84952),a=r(10107),u=r(44208),p=r(53966),d=(r(87811),r(40608)),c=r(5443),y=r(16930),h=r(50498),m=r(4146),f=r(49186),g=r(92474),v=r(29953),_=r(39829),w=r(64714),x=r(22671);let I=class extends g.A{constructor(){super(...arguments),this.type="geojson",this.refresh=(0,n.sg)((async e=>{await this.load();const{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}queryFeatures(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t))).then((e=>x.A.fromJSON(e)))}queryFeaturesJSON(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t)))}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:c.A.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke("queryAttributeBins",e?.toJSON(),t)}_applyEdits(e){if(!this._connection)throw new f.A("geojson-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=[],s=[],i=[];if(e.addFeatures)for(const t of e.addFeatures)r.push(this._serializeFeature(t));if(e.deleteFeatures)for(const r of e.deleteFeatures)"objectId"in r&&null!=r.objectId?s.push(r.objectId):"attributes"in r&&null!=r.attributes[t]&&s.push(r.attributes[t]);if(e.updateFeatures)for(const t of e.updateFeatures)i.push(this._serializeFeature(t));return this._connection.invoke("applyEdits",{adds:r,updates:i,deletes:s}).then((({extent:e,timeExtent:t,featureEditResults:r})=>(this.sourceJSON.extent=e,t&&(this.sourceJSON.timeInfo.timeExtent=[t.start,t.end]),this._createEditsResult(r))))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new f.A("geojson-layer-source:edit-failure",t.description,{code:t.code}):null}}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e);return r?{geometry:r.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:"mesh"===t.type||"extent"===t.type?_.A.fromExtent(t.extent):t}async _startWorker(e){this._connection=await(0,v.ho)("GeoJSONSourceWorker",{strategy:(0,u.A)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:r,hasZ:s,geometryType:i,objectIdField:o,url:n,timeInfo:l,customParameters:a}=this.layer,d="defaults"===this.layer.originOf("spatialReference"),c={url:n,customParameters:a,fields:t&&t.map((e=>e.toJSON())),geometryType:h.gy.toJSON(i),hasZ:s,objectIdField:o,timeInfo:l?l.toJSON():null,spatialReference:d?null:r&&r.toJSON()},y=await this._connection.invoke("load",c,{signal:e});for(const e of y.warnings)p.A.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});y.featureErrors.length&&p.A.getLogger(this.layer).warn("#load()",`Encountered ${y.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:y.featureErrors}),this.sourceJSON=y.layerDefinition,this.capabilities=(0,w.f)(this.sourceJSON.hasZ,!0)}};(0,s._)([(0,a.MZ)()],I.prototype,"capabilities",void 0),(0,s._)([(0,a.MZ)()],I.prototype,"type",void 0),(0,s._)([(0,a.MZ)({constructOnly:!0})],I.prototype,"layer",void 0),(0,s._)([(0,a.MZ)()],I.prototype,"sourceJSON",void 0),I=(0,s._)([(0,d.$)("esri.layers.graphics.sources.GeoJSONSource")],I);var F=r(63074),M=r(69208),S=r(6455),T=r(87718),A=r(76294),b=r(16131),E=r(32756),Z=r(8303),O=r(54310),P=r(25036),R=r(82935),N=r(10873),j=r(29005),C=r(20437),U=r(17036),$=r(30524),z=r(46499),D=r(39383),J=r(13112),B=r(61956),q=r(30291),G=r(56400);const Q=(0,U.p)();let k=class extends((0,E.fY)((0,S.FJ)((0,M.d)((0,A.J)((0,T.F)((0,F.dM)((0,R.e)((0,P.j)((0,O.J)((0,b.q)((0,Z.A)((0,o.P)(m.A))))))))))))){constructor(e){super(e),this.attributeTableTemplate=null,this.copyright=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new I({layer:this}),this.spatialReference=y.A.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson"}destroy(){this.source?.destroy()}load(e){const t=this.loadFromPortal({supportedTypes:["GeoJson"],supportsData:!1},e).catch(n.QP).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo"],"service"),(0,$.yp)(this.renderer,this.fieldsIndex),(0,$.sv)(this.timeInfo,this.fieldsIndex)}));return this.addResolvingPromise(t),Promise.resolve(this)}get capabilities(){return this.source?this.source.capabilities:null}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&null==this.geometryType}get parsedUrl(){return this.url?(0,l.An)(this.url):null}set renderer(e){(0,$.yp)(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);const t=(0,l.An)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){const{applyEdits:s}=await Promise.all([r.e(8628),r.e(3513)]).then(r.bind(r,78628));await this.load();const i=await s(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),i}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,q.tn)(this,e)}createQuery(){const e=new B.A,t=this.capabilities?.data;e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:r,timeExtent:s}=this;return e.timeExtent=null!=r&&null!=s?s.offset(-r.value,r.unit):s||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(B.A.from(e)||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(B.A.from(e)||this.createQuery(),t)))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(B.A.from(e)||this.createQuery(),t)))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(B.A.from(e)||this.createQuery(),t)))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,s._)([(0,a.MZ)(N.zQ)],k.prototype,"attributeTableTemplate",void 0),(0,s._)([(0,a.MZ)({readOnly:!0,json:{read:!1,write:!1}})],k.prototype,"capabilities",null),(0,s._)([(0,a.MZ)({type:String})],k.prototype,"copyright",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],k.prototype,"createQueryVersion",null),(0,s._)([(0,a.MZ)((0,G.P6)("dateFieldsTimeReference"))],k.prototype,"dateFieldsTimeZone",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],k.prototype,"defaultPopupTemplate",null),(0,s._)([(0,a.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],k.prototype,"definitionExpression",void 0),(0,s._)([(0,a.MZ)({type:String})],k.prototype,"displayField",void 0),(0,s._)([(0,a.MZ)({type:Boolean})],k.prototype,"editingEnabled",void 0),(0,s._)([(0,a.MZ)(N.Yj)],k.prototype,"elevationInfo",void 0),(0,s._)([(0,a.MZ)({type:[C.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],k.prototype,"fields",void 0),(0,s._)([(0,a.MZ)(Q.fieldsIndex)],k.prototype,"fieldsIndex",void 0),(0,s._)([(0,a.MZ)({type:c.A,json:{name:"extent"}})],k.prototype,"fullExtent",void 0),(0,s._)([(0,a.MZ)({type:["point","polygon","polyline","multipoint"],json:{read:{reader:h.gy.read}}})],k.prototype,"geometryType",void 0),(0,s._)([(0,a.MZ)({type:Boolean})],k.prototype,"hasZ",void 0),(0,s._)([(0,a.MZ)(N.id)],k.prototype,"id",void 0),(0,s._)([(0,a.MZ)({type:Boolean,readOnly:!0})],k.prototype,"isTable",null),(0,s._)([(0,a.MZ)(N.kF)],k.prototype,"labelsVisible",void 0),(0,s._)([(0,a.MZ)({type:[z.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:D.w},write:!0}})],k.prototype,"labelingInfo",void 0),(0,s._)([(0,a.MZ)(N.fV)],k.prototype,"legendEnabled",void 0),(0,s._)([(0,a.MZ)({type:["show","hide"]})],k.prototype,"listMode",void 0),(0,s._)([(0,a.MZ)({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],k.prototype,"objectIdField",void 0),(0,s._)([(0,a.MZ)(N.ke)],k.prototype,"opacity",void 0),(0,s._)([(0,a.MZ)({type:["GeoJSON"]})],k.prototype,"operationalLayerType",void 0),(0,s._)([(0,a.MZ)(Q.outFields)],k.prototype,"outFields",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],k.prototype,"parsedUrl",null),(0,s._)([(0,a.MZ)(N.M6)],k.prototype,"popupEnabled",void 0),(0,s._)([(0,a.MZ)({type:i.A,json:{name:"popupInfo",write:!0}})],k.prototype,"popupTemplate",void 0),(0,s._)([(0,a.MZ)({types:J.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:J.XJ}}}})],k.prototype,"renderer",null),(0,s._)([(0,a.MZ)(N.PY)],k.prototype,"screenSizePerspectiveEnabled",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],k.prototype,"source",void 0),(0,s._)([(0,a.MZ)({type:y.A})],k.prototype,"spatialReference",void 0),(0,s._)([(0,a.MZ)({type:[j.A]})],k.prototype,"templates",void 0),(0,s._)([(0,a.MZ)()],k.prototype,"title",void 0),(0,s._)([(0,a.MZ)({json:{read:!1},readOnly:!0})],k.prototype,"type",void 0),(0,s._)([(0,a.MZ)(N.OZ)],k.prototype,"url",null),k=(0,s._)([(0,d.$)("esri.layers.GeoJSONLayer")],k);const H=k},99352:(e,t,r)=>{r.d(t,{F:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,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,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1}},64714:(e,t,r)=>{r.d(t,{F0:()=>a,Vx:()=>d,e2:()=>y,f:()=>h});var s=r(44208),i=r(4718),o=r(99352),n=r(4071),l=r(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?l.Cb:"esriGeometryPolyline"===e?l.yM:l.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function d(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${c(t)} = null;`;for(const t in e)r+=`this${c(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function c(e){return u.test(e)?`.${e}`:`["${e}"]`}function y(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.o8)(e)}}]}function h(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:n.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},69208:(e,t,r)=>{r.d(t,{d:()=>n});var s=r(90237),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,s._)([(0,o.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},6455:(e,t,r)=>{r.d(t,{FJ:()=>w,Dp:()=>x,KV:()=>I});var s=r(90237),i=r(93637),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608)),l=r(89317),a=r(69540),u=r(5503),p=r(25482),d=r(43937),c=r(83960),y=r(13069);const h={write:{overridePolicy:(e,t,r)=>({enabled:!r||"scale"===r.filterMode})}};let m=class extends(a.A.ClonableMixin(p.A)){constructor(e){super(e),this.id=(0,y.lk)(),this.maxScale=0,this.minScale=0,this.title="",this.where=null}};(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"id",void 0),(0,s._)([(0,o.MZ)({type:Number,json:h})],m.prototype,"maxScale",void 0),(0,s._)([(0,o.MZ)({type:Number,json:h})],m.prototype,"minScale",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"title",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"where",void 0),m=(0,s._)([(0,n.$)("esri.layers.support.DisplayFilter")],m);const f=m;var g=r(41560);let v=class extends(a.A.ClonableMixin(p.A)){constructor(e){super(e),this.activeFilterId=null,this.filters=new(u.A.ofType(f)),this.mode="manual"}writeFilters(e,t,r,s){const i=e.toArray();"scale"===this.mode&&i.sort(((e,t)=>{const r=(0,c.oW)(t.minScale,e.minScale),s=e.maxScale-t.maxScale;return 0===r?s:r})),t[r]=i.map((e=>e.toJSON(s)))}write(e,t){return super.write(e,(0,g.mW)(this,t))}};(0,s._)([(0,o.MZ)({type:String,json:{write:{overridePolicy:(e,t,r)=>({enabled:"manual"===r.filterMode,isRequired:!0})}}})],v.prototype,"activeFilterId",void 0),(0,s._)([(0,o.MZ)({type:u.A.ofType(f),nonNullable:!0,json:{write:!0}})],v.prototype,"filters",void 0),(0,s._)([(0,d.K)("filters")],v.prototype,"writeFilters",null),(0,s._)([(0,o.MZ)({type:["manual","scale"],nonNullable:!0,json:{name:"filterMode",write:!0}})],v.prototype,"mode",void 0),v=(0,s._)([(0,n.$)("esri.layers.support.DisplayFilterInfo")],v);const _=v,w=e=>{let t=class extends e{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return(0,s._)([(0,o.MZ)(x)],t.prototype,"displayFilterEnabled",void 0),(0,s._)([(0,o.MZ)(I)],t.prototype,"displayFilterInfo",void 0),t=(0,s._)([(0,n.$)("esri.layers.mixins.DisplayFilteredLayer")],t),t},x={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:e=>!e},write:{layerContainerTypes:l.K,writer(e,t,r){(0,i.sM)(r,!e,t)}},origins:{"web-scene":{write:!1,read:!1}}}},I={type:_,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:l.K},origins:{"web-scene":{write:!1,read:!1}}}}},32756:(e,t,r)=>{r.d(t,{Rr:()=>a,fY:()=>p,ne:()=>u});var s=r(90237),i=r(93637),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);function a(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const i=new l.A;return i.read(s,r),[i]}const u={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,s){const o=e.find((e=>!!e.field));o&&(0,i.sM)(r,[o.toJSON()],t)}}}},p=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,o.MZ)(u)],t.prototype,"orderBy",void 0),t=(0,s._)([(0,n.$)("esri.layers.mixins.OrderedLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>I});var s=r(90237),i=r(92602),o=r(70333),n=r(78888),l=r(60999),a=r(49186),u=r(53966),p=r(97768),d=r(74887),c=r(84952),y=r(10107),h=(r(44208),r(87811),r(36005)),m=r(40608),f=r(43937),g=r(83531),v=r(20655),_=r(80812),w=r(41318),x=r(10407);const I=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new _.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:s}=await r.e(1204).then(r.bind(r,41204));return(0,d.Te)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=!o.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,s);let n,l;if(i)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!n||!(0,c.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,u=!1,p=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:p}};try{if(i?await r.reload():(r=new _.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,s)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,x.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=F.credential===t?F.user:await this._fetchEditingUser(e);return F.credential=t,F.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=v.A.getDefault();if(i&&i.loaded&&(0,c.S8)(i.restUrl)===(0,c.S8)(s))return i.user;const a=`${s}/community/self`,u=null!=e?e.signal:null,p=await(0,l.Ke)((0,n.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?w.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,s=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&s&&!(0,c.ut)(s.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,y.MZ)({type:_.default})],t.prototype,"portalItem",null),(0,s._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,m.$)("esri.layers.mixins.PortalLayer")],t),t},F={credential:null,user:null}},82935:(e,t,r)=>{r.d(t,{B:()=>y,e:()=>h});var s=r(90237),i=r(10107),o=(r(44208),r(53966),r(87811),r(36005)),n=r(40608),l=r(89317),a=r(30524),u=r(96184),p=r(73133),d=r(79677),c=r(10184);const y={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:l.K}}},h=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const s=r.timeOffset,i=p.j.fromJSON(r.timeOffsetUnits);return s&&i?new c.A({value:s,unit:i}):null}set timeInfo(e){(0,a.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,s._)([(0,i.MZ)({type:d.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,s._)([(0,i.MZ)({type:c.A})],t.prototype,"timeOffset",void 0),(0,s._)([(0,o.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,s._)([(0,i.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,s._)([(0,i.MZ)(y)],t.prototype,"useViewTime",void 0),t=(0,s._)([(0,n.$)("esri.layers.mixins.TemporalLayer")],t),t}},29005:(e,t,r)=>{r.d(t,{A:()=>d});var s=r(90237),i=r(69540),o=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends(i.A.ClonableMixin(n.A)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,s._)([(0,l.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,s._)([(0,l.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,s._)([(0,l.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,s._)([(0,l.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,s._)([(0,l.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,s._)([(0,a.$)("esri.layers.support.FeatureTemplate")],p);const d=p},91880:(e,t,r)=>{r.d(t,{A:()=>d});var s,i=r(90237),o=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new o.J({asc:"ascending",desc:"descending"});let p=s=class extends n.A{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,i._)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=s=(0,i._)([(0,a.$)("esri.layers.support.OrderByInfo")],p);const d=p},96184:(e,t,r)=>{r.d(t,{A:()=>m});var s=r(90237),i=r(69540),o=r(25482),n=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),u=r(43937),p=r(79677),d=r(10184),c=r(56400);function y(e,t){return d.A.fromJSON({value:e,unit:t})}let h=class extends(i.A.ClonableMixin(o.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?p.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,s._)([(0,n.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,s._)([(0,n.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,s._)([(0,n.MZ)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,s._)([(0,l.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,s._)([(0,u.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,s._)([(0,n.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,s._)([(0,n.MZ)({type:d.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,s._)([(0,l.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,s._)([(0,u.K)("interval")],h.prototype,"writeInterval",null),(0,s._)([(0,n.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,s._)([(0,n.MZ)((0,c.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,s._)([(0,n.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,s._)([(0,n.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,s._)([(0,n.MZ)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,s._)([(0,a.$)("esri.layers.support.TimeInfo")],h);const m=h},4071:(e,t,r)=>{r.d(t,{$:()=>s,P:()=>i});const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},i={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsOrderByFields:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},41560:(e,t,r)=>{r.d(t,{Ch:()=>n,mW:()=>o});var s=r(34727),i=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function n(e,t,r){const o=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:s}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],d(s));return t}(e);if(o&&((0,s.gg)(t,o[0])||(0,s.ZH)(r,o[1])))return"";const n=Array.from(l(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;const i=p(e.at(0)?.minScale),o=d(e.at(-1)?.maxScale);if((0,s.ZH)(i,t)||(0,s.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,s.ZH)(p(i.minScale),d(r.maxScale)))return!0}return!1}(n,t,r)?"1=1":n.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,i.IW)(e,t)),"");return a&&"1=1"!==a?a:""}function*l(e,t,r){if("manual"===u(e)){const t=e.filters.find((t=>t.id===e.activeFilterId));t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const s of e.filters)a(s.minScale,s.maxScale,t,r)&&(yield s)}}function a(e,t,r,i){return e=p(e),r=p(r),t=d(t),!(!(0,s.Sp)(r,e)&&(i??r)>e||(0,s.Hx)(t,r)||void 0!==i&&(0,s.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function p(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},17036:(e,t,r)=>{r.d(t,{p:()=>a});var s=r(44208),i=r(53966),o=r(20437),n=r(95466),l=r(30524);function a(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,s.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");i.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return n.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||i.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,l.DB)(this.fieldsIndex,e)}}}}},32730:(e,t,r)=>{r.d(t,{BI:()=>f,D3:()=>h,XJ:()=>m,lc:()=>y,mX:()=>v,rU:()=>g,tH:()=>F});var s=r(799);const i="__begin__",o="__end__",n=new RegExp(i,"ig"),l=new RegExp(o,"ig"),a=new RegExp("^"+i,"i"),u=new RegExp(o+"$","i"),p='"',d=p+" + ",c=" + "+p;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function f(e){const t=m(e);switch(t.type){case"conventional":return v(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);switch(t.type){case"conventional":return function(e){const t=e?.match(_);return t?.[1].trim()||null}(t.expression);case"arcade":return F(t.expression)}return null}function v(e){let t;return e?(t=(0,s.HC)(e,(e=>i+'$feature["'+e+'"]'+o)),t=a.test(t)?t.replace(a,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(n,d).replaceAll(l,c)):t='""',t}const _=/^\s*\{([^}]+)\}\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,x=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,I=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function F(e){if(!e)return null;let t=w.exec(e)||x.exec(e);return t?t[1]||t[3]:(t=I.exec(e),t?t[2]:null)}},73133:(e,t,r)=>{r.d(t,{j:()=>s});const s=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},22671:(e,t,r)=>{r.d(t,{A:()=>_});var s,i=r(90237),o=r(52106),n=r(66552),l=r(25482),a=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),d=r(40608),c=r(43937),y=r(16930),h=r(65864),m=r(50498),f=r(20437);const g=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=s=class extends l.A{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,o.A)}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,h.rS)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=y.A.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,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 s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[o,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*o+s),(e=>i-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 s=y.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],n=r.fromJSON(o),l=o.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=s);const a=o.aggregateGeometries,u=n.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],i=r?.spatialReference;null==t||i||(t.spatialReference=s)}i.push(n)}return i}_quantizePoints(e,t,r){let s,i;const o=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===s&&n===i||(o.push([e-s,n-i]),s=e,i=n)}else s=t(l[0]),i=r(l[1]),o.push([s,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,h.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=s.length;e<o;e++){const o=s[e],n=this._quantizePoints(o,t,r);n&&i.push(n)}return i.length>0?((0,h.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,h.Bi)(e)?e.rings:e.paths;let n,l;for(let e=0,s=o.length;e<s;e++){const s=o[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(n+=i[0],l+=i[1]):(n=i[0],l=i[1]),i[0]=t(n),i[1]=r(l)}}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,l;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(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,u.MZ)({type:[o.A],json:{write:!0}})],v.prototype,"features",void 0),(0,i._)([(0,p.w)("features")],v.prototype,"readFeatures",null),(0,i._)([(0,u.MZ)({type:[f.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,i._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,i._)([(0,c.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,i._)([(0,u.MZ)({types:m.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,i._)([(0,p.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,i._)([(0,u.MZ)({type:y.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,i._)([(0,c.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=s=(0,i._)([(0,d.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const _=v},41366:(e,t,r)=>{r.d(t,{K:()=>c,Q:()=>u});var s=r(90237),i=r(66552),o=r(53966),n=r(10107),l=(r(44208),r(87811),r(93223)),a=r(40608);const u=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),p="percent-of-total",d="field",c=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&d||r&&p||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==p||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s._)([(0,n.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,s._)([(0,l.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,s._)([(0,a.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},10184:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(90237),i=r(69540),o=r(25482),n=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let d=class extends(i.A.ClonableMixin(o.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,n.t)(this.value,this.unit,"milliseconds")}};(0,s._)([(0,a.e)(p.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,s._)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,s._)([(0,u.$)("esri.time.TimeInterval")],d);const c=d}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[752],{67482:(e,t,s)=>{function n(e){return null!=a(e)||null!=o(e)}function r(e){return l.test(e)}function i(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let s=!0;if(p&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,n=0;for(;!t&&n<=e.length;)t=!u.test(e[n]),n++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const s=t.groups,n=+s.year,r=+s.month-1,i=+s.day,o=+(s.hours??"0"),a=+(s.minutes??"0"),u=+(s.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const p=s.ms??"0",c=p?+p.padEnd(3,"0").slice(0,3):0;let d;if(s.isUTC||!s.offsetSign)d=Date.UTC(n,r,i,o,a,u,c);else{const e=+s.offsetHours,t=+s.offsetMinutes;d=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,r,i,o,a,u,c)}return Number.isNaN(d)?null:d}s.d(t,{Br:()=>r,Cq:()=>n,_U:()=>i});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,p=!Number.isNaN(new Date("technology 10").getTime())},14607:(e,t,s)=>{s.d(t,{B:()=>u,GP:()=>a,qg:()=>p});var n=s(799),r=s(73444);const i={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],no:[","," "],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,r.JK)()){let t=(e=e.toLowerCase())in i;if(!t){const s=e.split("-");s.length>1&&s[0]in i&&(e=s[0],t=!0),t||(e="en")}const[s,n,o="#,##0.###"]=i[e];return{decimal:s,group:n,pattern:o}}function a(e,t){const s=o((t={...t}).locale);t.customs=s;const n=t.pattern||s.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,s){const n=(s=s||{}).customs.group,r=s.customs.decimal,i=t.split(";"),o=i[0];if((t=i[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,u=o.match(a);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===s.fractional&&(s.places=0),t.replace(a,function(e,t,s){!0===(s=s||{}).places&&(s.places=0),s.places===1/0&&(s.places=6);const n=t.split("."),r="string"==typeof s.places&&s.places.indexOf(",");let i=s.places;r?i=s.places.slice(r+1):+i>=0||(i=(n[1]||[]).length),s.round<0||(e=Number(e.toFixed(Number(i))));const o=String(Math.abs(e)).split("."),a=o[1]||"";if(n[1]||s.places){r&&(s.places=s.places.slice(0,Math.max(0,r)));const e=void 0!==s.places?s.places:n[1]&&n[1].lastIndexOf("0")+1;+e>a.length&&(o[1]=a.padEnd(Number(e),"0")),+i<a.length&&(o[1]=a.slice(0,Math.max(0,Number(i))))}else o[1]&&o.pop();const l=n[0].replace(",","");let u=l.indexOf("0");-1!==u&&(u=l.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),l.includes("#")||(o[0]=o[0].slice(-u)));let p,c,d=n[0].lastIndexOf(",");if(-1!==d){p=n[0].length-d-1;const e=n[0].slice(0,d);d=e.lastIndexOf(","),-1!==d&&(c=e.length-d-1)}const f=[];for(let e=o[0];e;){const t=e.length-p;f.push(t>0?e.slice(Math.max(0,t)):e),e=t>0?e.slice(0,t):"",c&&(p=c,c=void 0)}return o[0]=f.reverse().join(s.group||","),o.join(s.decimal||".")}(e,u[0],{decimal:r,group:n,places:s.places,round:s.round}))}(e,n,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),s=e.pattern||t.pattern,r=t.group,i=t.decimal;let a=1;if(s.includes("%"))a/=100;else if(s.includes("‰"))a/=1e3;else if(s.includes("¤"))throw new Error("currency notation not supported");const u=s.split(";");1===u.length&&u.push("-"+u[0]);const p=d(u,(t=>(t="(?:"+(0,n.Cj)(t,".")+")").replace(l,(t=>{const s={signed:!1,separator:e.strict?r:[r,""],fractional:e.fractional,decimal:i,exponent:!1},n=t.split(".");let o=e.places;1===n.length&&1!==a&&(n[1]="###"),1===n.length||0===o?s.fractional=!1:(void 0===o&&(o=e.pattern?n[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(s.fractional=!0),!e.places&&+o<n[1].length&&(o+=","+n[1].length),s.places=o);const l=n[0].split(",");return l.length>1&&(s.groupSize=l.pop().length,l.length>1&&(s.groupSize2=l.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=c(e),s=d(e.fractional,(t=>{let s="";return t&&0!==e.places&&(s="\\"+e.decimal,e.places===1/0?s="(?:"+s+"\\d+)?":s+="\\d{"+e.places+"}"),s}),!0);let n=t+s;return s&&(n="(?:(?:"+n+")|(?:"+s+"))"),n+d(e.exponent,(t=>t?"([eE]"+c({signed:e.eSigned})+")":""))}(s)+")"}))),!0);return{regexp:p.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:r,decimal:i,factor:a}}function p(e,t){const s=u(t),n=new RegExp("^"+s.regexp+"$").exec(e);if(!n)return NaN;let r=n[1];if(!n[1]){if(!n[2])return NaN;r=n[2],s.factor*=-1}return r=r.replaceAll(new RegExp("["+s.group+"\\s\\xa0]","g"),"").replace(s.decimal,"."),Number(r)*s.factor}function c(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,(e=>e?"[-+]":""),!0)+d(e.separator,(t=>{if(!t)return"(?:\\d+)";" "===(t=(0,n.Cj)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const s=e.groupSize,r=e.groupSize2;if(r){const e="(?:0|[1-9]\\d{0,"+(r-1)+"}(?:["+t+"]\\d{"+r+"})*["+t+"]\\d{"+s+"})";return s-r>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(s-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+t+"]\\d{"+s+"})*)"}),!0)}const d=(e,t,s)=>{if(!Array.isArray(e))return t(e);const n=[];for(let s=0;s<e.length;s++)n.push(t(e[s]));return f(n.join("|"),Boolean(s))},f=(e,t)=>"("+(t?"?:":"")+e+")"},40752:(e,t,s)=>{s.r(t),s.d(t,{default:()=>W});var n=s(78888),r=s(60999),i=s(67482),o=s(49186),a=s(53966),l=s(74887),u=s(84952),p=s(57251),c=s(16930),d=s(7320),f=s(21325),y=s(28735),m=s(43334),h=s(92722),g=s(58376),S=s(83221),x=s(31464),F=s(19730),N=s(14607),w=s(30524);function I(e,t,s){t=(0,w.rS)(t)?.toLowerCase(),s=(0,w.rS)(s)?.toLowerCase();const n=e.map((e=>e.toLowerCase())),r=t?e[n.indexOf(t)]:null,i=s?e[n.indexOf(s)]:null;return{longitudeFieldName:r||e[n.indexOf(C.find((e=>n.includes(e))))],latitudeFieldName:i||e[n.indexOf(b.find((e=>n.includes(e))))]}}const b=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],C=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"],T=/^\s*"([\S\s]*)"\s*$/,_=/""/g,A=[","," ",";","|","\t"];function*E(e,t,s){let n=0;for(;n<=e.length;){const r=e.indexOf(t,n),i=e.slice(n,r>-1?r:void 0);n+=i.length+t.length,s&&!i.trim()||(yield i)}}function v(e){const t=e.includes("\r\n")?"\r\n":"\n";return E(e,t,!0)}function O(e,t){return E(e,t,!1)}function R(e,t,s){e=e.trim(),t=t?.trim();const n=[],r=Array.from(new Set([s?.delimiter,...A])).filter((e=>null!=e));for(const s of r){const r=k(e,s).length,i=k(t,s).length??r;r>1&&n.push({weight:Math.min(r,i),delimiter:s})}const i=n.sort((({weight:e},{weight:t})=>t-e)).map((({delimiter:e})=>e));for(const t of i){const n=I(D(e,t).names,s?.longitudeField,s?.latitudeField);if(n.longitudeFieldName&&n.latitudeFieldName)return{delimiter:t,locationInfo:n}}return{delimiter:i[0],locationInfo:null}}function*q(e,t,s,n=()=>Object.create(null)){const r=v(e);r.next();let i="",o="",a=0,l=n(),u=0;e:for(const e of r){const r=O(e,s);for(const e of r)if(i+=o+e,o="",a+=B(e),a%2==0){if(a>0){const e=T.exec(i);if(!e){l=n(),u=0,i="",a=0;continue e}l[t[u]]=e[1].replaceAll(_,'"'),u++}else l[t[u]]=i,u++;i="",a=0}else o=s;0===a?(yield l,l=n(),u=0):o="\n"}}function D(e,t){const s=k(e,t).filter((e=>null!=e)),n=s.map((e=>(0,w.rS)(e)));for(let e=n.length-1;e>=0;e--)n[e]||(n.splice(e,1),s.splice(e,1));return{names:n,aliases:s}}function k(e,t){if(!e?.length)return[];const s=[];let n="",r="",i=0;const o=O(e,t);for(const e of o)if(n+=r+e,r="",i+=B(e),i%2==0){if(i>0){const e=T.exec(n);e&&s.push(e[1].replaceAll(_,'"'))}else s.push(n);n="",i=0}else r=t;return s}function B(e){let t=0,s=0;for(s=e.indexOf('"',s);s>=0;)t++,s=e.indexOf('"',s+1);return t}function M(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map((e=>{if(""!==e){if(!t.test(e)){let t=z(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,i.Cq)(e)?"date":"string"}})).reduce(((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0))}const z=function(){const e=(0,N.B)(),t=new RegExp("^"+e.regexp+"$"),s=new RegExp("["+e.group+"\\s\\xa0]","g"),n=e.factor;return r=>{const i=t.exec(r);if(e.factor=n,!i)return NaN;let o=i[1];if(!i[1]){if(!i[2])return NaN;o=i[2],e.factor*=-1}return o=o.replace(s,"").replace(e.decimal,"."),+o*e.factor}}();function j(e){return JSON.parse(JSON.stringify(e))}var P=s(64714),Q=s(95466),L=s(54218),U=s(56400);const $=(0,P.F0)("esriGeometryPoint"),V=["csv"],G=[0,0];class H{constructor(e,t){this.x=e,this.y=t}}class W{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[s]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),n=function(e,t){const s=t.parsingOptions||{},n={delimiter:s.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:s.latitudeField,longitudeFieldName:s.longitudeField}},r=n.layerDefinition={name:(0,u.e7)(t.url,V)||"csv",dateFieldsTimeReference:{timeZoneIANA:U.n$},drawingInfo:$,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:s.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:s.spatialReference||{wkid:4326}}},i=v(e),a=i.next().value?.trim(),l=i.next().value?.trim();if(!a)throw new o.A("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:p,locationInfo:c}=R(a,l,s);if(!p)throw new o.A("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:l,parsingOptions:s});if(!c)throw new o.A("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:l,parsingOptions:s});n.locationInfo=c,n.delimiter=p;const{names:d,aliases:f}=D(a,p),y=function(e,t,s,n,r){const i=[],o=q(e,s,t),a=[];for(const e of o){if(10===a.length)break;a.push(e)}for(let e=0;e<s.length;e++){const t=s[e],o=n[e];if(t===r.longitudeFieldName||t===r.latitudeFieldName)i.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e;switch(M(a.map((e=>e[t])))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate";break;default:e="esriFieldTypeString"}i.push({name:t,type:e,alias:o,length:(0,w._b)(e)})}}return i}(e,n.delimiter,d,f,n.locationInfo);if(s.fields?.length){const e=new Q.A(s.fields);for(const t of y){const s=e.get(t.name);s&&Object.assign(t,s)}}if(!y.some((e=>"esriFieldTypeOID"===e.type&&(r.objectIdField=e.name,!0)))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};r.objectIdField=e.name,y.unshift(e)}r.fields=y;const m=new Q.A(r.fields);if(n.locationInfo&&(n.locationInfo.latitudeFieldName=m.get(n.locationInfo.latitudeFieldName).name,n.locationInfo.longitudeFieldName=m.get(n.locationInfo.longitudeFieldName).name),r.timeInfo){const e=r.timeInfo;if(e.startTimeField){const t=m.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=m.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=m.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(r.timeInfo=null)}return n}(s,e);this._locationInfo=n.locationInfo,this._delimiter=n.delimiter,this._queryEngine=this._createQueryEngine(n);const r=await this._createFeatures(s);this._queryEngine.featureStore.addMany(r);const{fullExtent:i,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(n.layerDefinition.extent=i,a){const{start:e,end:t}=a;n.layerDefinition.timeInfo.timeExtent=[e,t]}return n}async applyEdits(){throw new o.A("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),(await this._queryEngine.executeQueryForIds(e,t.signal)).filter(L.Et)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),(0,g.J)(this._queryEngine,e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,r.UT)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)}),(e=>{this._queryEngine.featureStore.clear(),(0,l.zf)(e)||a.A.getLogger("esri.layers.CSVLayer").error(new o.A("csv-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:s}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:s}=this._loadOptions;if(!t)throw new o.A("csv-layer:invalid-source","url not defined");const r=(0,u.An)(t);return(await(0,n.A)(r.path,{query:{...r.query,...s},responseType:"text",signal:e})).data}_createQueryEngine(e){const{objectIdField:t,fields:s,extent:n,timeInfo:r}=e.layerDefinition,i=new S.A({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new F.do({fieldsIndex:Q.A.fromLayerJSON({fields:s,dateFieldsTimeReference:{timeZoneIANA:U.n$}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:r,objectIdField:t,spatialReference:n.spatialReference||{wkid:4326},featureStore:i})}async _createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:s}=this._locationInfo,{objectIdField:n,fieldsIndex:r,spatialReference:o}=this._queryEngine;let a=[];const l=[],u=r.fields.filter((e=>e.name!==n)).map((e=>e.name));let g=0;const S={};for(const e of r.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,w.lD)(e);void 0!==t&&(S[e.name]=t)}const x=q(e,u,this._delimiter,(0,P.Vx)(S,n));for(const e of x){const o=this._parseCoordinateValue(e[t]),u=this._parseCoordinateValue(e[s]);if(null!=u&&null!=o&&!isNaN(o)&&!isNaN(u)){e[t]=o,e[s]=u;for(const n in e)if(n!==t&&n!==s)if(r.isDateField(n))e[n]=(0,i._U)(e[n]);else if(r.isNumericField(n)){const t=z(e[n]);isNaN(t)?e[n]=null:e[n]=t}else null!=e[n]&&(e[n]=j(e[n]));e[n]=g,g++,a.push(new H(u,o)),l.push(e)}}if(!(0,f.aI)({wkid:4326},o))if((0,f.K8)(o))for(const e of a)[e.x,e.y]=(0,y.je)(e.x,e.y,G);else a=(0,p.projectMany)(d.g,a,c.A.WGS84,o,null,null);const F=[];for(let e=0;e<a.length;e++){const{x:t,y:s}=a[e],r=l[e];r[n]=e+1,F.push(new m.Om(new h.A([],[t,s]),r,null,r[n]))}return F}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=z(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,x.Nk)(f.KK,e)}catch{throw new o.A("csv-layer:projection-not-supported","Projection not supported")}}}},64714:(e,t,s)=>{s.d(t,{F0:()=>l,Vx:()=>c,e2:()=>f,f:()=>y});var n=s(44208),r=s(4718),i=s(99352),o=s(4071),a=s(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function c(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this${d(t)} = null;`;for(const t in e)s+=`this${d(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new n}catch(s){return()=>({[t]:null,...e})}}function d(e){return u.test(e)?`.${e}`:`["${e}"]`}function f(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},4071:(e,t,s)=>{s.d(t,{$:()=>n,P:()=>r});const n={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},r={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:n,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},93470:(e,t,s)=>{s.d(t,{Cb:()=>i,HW:()=>p,JR:()=>r,JZ:()=>l,WR:()=>a,b6:()=>c,fT:()=>n,nC:()=>u,yM:()=>o});const n=[252,146,31,255],r=[153,153,153,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},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},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[752],{67482:(e,t,s)=>{function n(e){return null!=a(e)||null!=o(e)}function r(e){return l.test(e)}function i(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let s=!0;if(p&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,n=0;for(;!t&&n<=e.length;)t=!u.test(e[n]),n++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const s=t.groups,n=+s.year,r=+s.month-1,i=+s.day,o=+(s.hours??"0"),a=+(s.minutes??"0"),u=+(s.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const p=s.ms??"0",c=p?+p.padEnd(3,"0").slice(0,3):0;let d;if(s.isUTC||!s.offsetSign)d=Date.UTC(n,r,i,o,a,u,c);else{const e=+s.offsetHours,t=+s.offsetMinutes;d=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,r,i,o,a,u,c)}return Number.isNaN(d)?null:d}s.d(t,{Br:()=>r,Cq:()=>n,_U:()=>i});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,p=!Number.isNaN(new Date("technology 10").getTime())},14607:(e,t,s)=>{s.d(t,{B:()=>u,GP:()=>a,qg:()=>p});var n=s(799),r=s(73444);const i={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],no:[","," "],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,r.JK)()){let t=(e=e.toLowerCase())in i;if(!t){const s=e.split("-");s.length>1&&s[0]in i&&(e=s[0],t=!0),t||(e="en")}const[s,n,o="#,##0.###"]=i[e];return{decimal:s,group:n,pattern:o}}function a(e,t){const s=o((t={...t}).locale);t.customs=s;const n=t.pattern||s.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,s){const n=(s=s||{}).customs.group,r=s.customs.decimal,i=t.split(";"),o=i[0];if((t=i[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,u=o.match(a);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===s.fractional&&(s.places=0),t.replace(a,function(e,t,s){!0===(s=s||{}).places&&(s.places=0),s.places===1/0&&(s.places=6);const n=t.split("."),r="string"==typeof s.places&&s.places.indexOf(",");let i=s.places;r?i=s.places.slice(r+1):+i>=0||(i=(n[1]||[]).length),s.round<0||(e=Number(e.toFixed(Number(i))));const o=String(Math.abs(e)).split("."),a=o[1]||"";if(n[1]||s.places){r&&(s.places=s.places.slice(0,Math.max(0,r)));const e=void 0!==s.places?s.places:n[1]&&n[1].lastIndexOf("0")+1;+e>a.length&&(o[1]=a.padEnd(Number(e),"0")),+i<a.length&&(o[1]=a.slice(0,Math.max(0,Number(i))))}else o[1]&&o.pop();const l=n[0].replace(",","");let u=l.indexOf("0");-1!==u&&(u=l.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),l.includes("#")||(o[0]=o[0].slice(-u)));let p,c,d=n[0].lastIndexOf(",");if(-1!==d){p=n[0].length-d-1;const e=n[0].slice(0,d);d=e.lastIndexOf(","),-1!==d&&(c=e.length-d-1)}const f=[];for(let e=o[0];e;){const t=e.length-p;f.push(t>0?e.slice(Math.max(0,t)):e),e=t>0?e.slice(0,t):"",c&&(p=c,c=void 0)}return o[0]=f.reverse().join(s.group||","),o.join(s.decimal||".")}(e,u[0],{decimal:r,group:n,places:s.places,round:s.round}))}(e,n,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),s=e.pattern||t.pattern,r=t.group,i=t.decimal;let a=1;if(s.includes("%"))a/=100;else if(s.includes("‰"))a/=1e3;else if(s.includes("¤"))throw new Error("currency notation not supported");const u=s.split(";");1===u.length&&u.push("-"+u[0]);const p=d(u,(t=>(t="(?:"+(0,n.Cj)(t,".")+")").replace(l,(t=>{const s={signed:!1,separator:e.strict?r:[r,""],fractional:e.fractional,decimal:i,exponent:!1},n=t.split(".");let o=e.places;1===n.length&&1!==a&&(n[1]="###"),1===n.length||0===o?s.fractional=!1:(void 0===o&&(o=e.pattern?n[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(s.fractional=!0),!e.places&&+o<n[1].length&&(o+=","+n[1].length),s.places=o);const l=n[0].split(",");return l.length>1&&(s.groupSize=l.pop().length,l.length>1&&(s.groupSize2=l.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=c(e),s=d(e.fractional,(t=>{let s="";return t&&0!==e.places&&(s="\\"+e.decimal,e.places===1/0?s="(?:"+s+"\\d+)?":s+="\\d{"+e.places+"}"),s}),!0);let n=t+s;return s&&(n="(?:(?:"+n+")|(?:"+s+"))"),n+d(e.exponent,(t=>t?"([eE]"+c({signed:e.eSigned})+")":""))}(s)+")"}))),!0);return{regexp:p.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:r,decimal:i,factor:a}}function p(e,t){const s=u(t),n=new RegExp("^"+s.regexp+"$").exec(e);if(!n)return NaN;let r=n[1];if(!n[1]){if(!n[2])return NaN;r=n[2],s.factor*=-1}return r=r.replaceAll(new RegExp("["+s.group+"\\s\\xa0]","g"),"").replace(s.decimal,"."),Number(r)*s.factor}function c(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,(e=>e?"[-+]":""),!0)+d(e.separator,(t=>{if(!t)return"(?:\\d+)";" "===(t=(0,n.Cj)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const s=e.groupSize,r=e.groupSize2;if(r){const e="(?:0|[1-9]\\d{0,"+(r-1)+"}(?:["+t+"]\\d{"+r+"})*["+t+"]\\d{"+s+"})";return s-r>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(s-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+t+"]\\d{"+s+"})*)"}),!0)}const d=(e,t,s)=>{if(!Array.isArray(e))return t(e);const n=[];for(let s=0;s<e.length;s++)n.push(t(e[s]));return f(n.join("|"),Boolean(s))},f=(e,t)=>"("+(t?"?:":"")+e+")"},40752:(e,t,s)=>{s.r(t),s.d(t,{default:()=>W});var n=s(78888),r=s(60999),i=s(67482),o=s(49186),a=s(53966),l=s(74887),u=s(84952),p=s(57251),c=s(16930),d=s(7320),f=s(21325),y=s(28735),m=s(43334),h=s(92722),g=s(58376),S=s(83221),F=s(31464),x=s(19730),N=s(14607),w=s(30524);function I(e,t,s){t=(0,w.rS)(t)?.toLowerCase(),s=(0,w.rS)(s)?.toLowerCase();const n=e.map((e=>e.toLowerCase())),r=t?e[n.indexOf(t)]:null,i=s?e[n.indexOf(s)]:null;return{longitudeFieldName:r||e[n.indexOf(C.find((e=>n.includes(e))))],latitudeFieldName:i||e[n.indexOf(b.find((e=>n.includes(e))))]}}const b=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],C=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"],T=/^\s*"([\S\s]*)"\s*$/,_=/""/g,A=[","," ",";","|","\t"];function*E(e,t,s){let n=0;for(;n<=e.length;){const r=e.indexOf(t,n),i=e.slice(n,r>-1?r:void 0);n+=i.length+t.length,s&&!i.trim()||(yield i)}}function v(e){const t=e.includes("\r\n")?"\r\n":"\n";return E(e,t,!0)}function O(e,t){return E(e,t,!1)}function R(e,t,s){e=e.trim(),t=t?.trim();const n=[],r=Array.from(new Set([s?.delimiter,...A])).filter((e=>null!=e));for(const s of r){const r=k(e,s).length,i=k(t,s).length??r;r>1&&n.push({weight:Math.min(r,i),delimiter:s})}const i=n.sort((({weight:e},{weight:t})=>t-e)).map((({delimiter:e})=>e));for(const t of i){const n=I(D(e,t).names,s?.longitudeField,s?.latitudeField);if(n.longitudeFieldName&&n.latitudeFieldName)return{delimiter:t,locationInfo:n}}return{delimiter:i[0],locationInfo:null}}function*q(e,t,s,n=()=>Object.create(null)){const r=v(e);r.next();let i="",o="",a=0,l=n(),u=0;e:for(const e of r){const r=O(e,s);for(const e of r)if(i+=o+e,o="",a+=B(e),a%2==0){if(a>0){const e=T.exec(i);if(!e){l=n(),u=0,i="",a=0;continue e}l[t[u]]=e[1].replaceAll(_,'"'),u++}else l[t[u]]=i,u++;i="",a=0}else o=s;0===a?(yield l,l=n(),u=0):o="\n"}}function D(e,t){const s=k(e,t).filter((e=>null!=e)),n=s.map((e=>(0,w.rS)(e)));for(let e=n.length-1;e>=0;e--)n[e]||(n.splice(e,1),s.splice(e,1));return{names:n,aliases:s}}function k(e,t){if(!e?.length)return[];const s=[];let n="",r="",i=0;const o=O(e,t);for(const e of o)if(n+=r+e,r="",i+=B(e),i%2==0){if(i>0){const e=T.exec(n);e&&s.push(e[1].replaceAll(_,'"'))}else s.push(n);n="",i=0}else r=t;return s}function B(e){let t=0,s=0;for(s=e.indexOf('"',s);s>=0;)t++,s=e.indexOf('"',s+1);return t}function M(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map((e=>{if(""!==e){if(!t.test(e)){let t=z(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,i.Cq)(e)?"date":"string"}})).reduce(((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0))}const z=function(){const e=(0,N.B)(),t=new RegExp("^"+e.regexp+"$"),s=new RegExp("["+e.group+"\\s\\xa0]","g"),n=e.factor;return r=>{const i=t.exec(r);if(e.factor=n,!i)return NaN;let o=i[1];if(!i[1]){if(!i[2])return NaN;o=i[2],e.factor*=-1}return o=o.replace(s,"").replace(e.decimal,"."),+o*e.factor}}();function j(e){return JSON.parse(JSON.stringify(e))}var P=s(64714),Q=s(95466),L=s(54218),U=s(56400);const $=(0,P.F0)("esriGeometryPoint"),V=["csv"],G=[0,0];class H{constructor(e,t){this.x=e,this.y=t}}class W{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[s]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),n=function(e,t){const s=t.parsingOptions||{},n={delimiter:s.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:s.latitudeField,longitudeFieldName:s.longitudeField}},r=n.layerDefinition={name:(0,u.e7)(t.url,V)||"csv",dateFieldsTimeReference:{timeZoneIANA:U.n$},drawingInfo:$,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:s.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:s.spatialReference||{wkid:4326}}},i=v(e),a=i.next().value?.trim(),l=i.next().value?.trim();if(!a)throw new o.A("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:p,locationInfo:c}=R(a,l,s);if(!p)throw new o.A("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:l,parsingOptions:s});if(!c)throw new o.A("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:l,parsingOptions:s});n.locationInfo=c,n.delimiter=p;const{names:d,aliases:f}=D(a,p),y=function(e,t,s,n,r){const i=[],o=q(e,s,t),a=[];for(const e of o){if(10===a.length)break;a.push(e)}for(let e=0;e<s.length;e++){const t=s[e],o=n[e];if(t===r.longitudeFieldName||t===r.latitudeFieldName)i.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e;switch(M(a.map((e=>e[t])))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate";break;default:e="esriFieldTypeString"}i.push({name:t,type:e,alias:o,length:(0,w._b)(e)})}}return i}(e,n.delimiter,d,f,n.locationInfo);if(s.fields?.length){const e=new Q.A(s.fields);for(const t of y){const s=e.get(t.name);s&&Object.assign(t,s)}}if(!y.some((e=>"esriFieldTypeOID"===e.type&&(r.objectIdField=e.name,!0)))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};r.objectIdField=e.name,y.unshift(e)}r.fields=y;const m=new Q.A(r.fields);if(n.locationInfo&&(n.locationInfo.latitudeFieldName=m.get(n.locationInfo.latitudeFieldName).name,n.locationInfo.longitudeFieldName=m.get(n.locationInfo.longitudeFieldName).name),r.timeInfo){const e=r.timeInfo;if(e.startTimeField){const t=m.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=m.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=m.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(r.timeInfo=null)}return n}(s,e);this._locationInfo=n.locationInfo,this._delimiter=n.delimiter,this._queryEngine=this._createQueryEngine(n);const r=await this._createFeatures(s);this._queryEngine.featureStore.addMany(r);const{fullExtent:i,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(n.layerDefinition.extent=i,a){const{start:e,end:t}=a;n.layerDefinition.timeInfo.timeExtent=[e,t]}return n}async applyEdits(){throw new o.A("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),(await this._queryEngine.executeQueryForIds(e,t.signal)).filter(L.Et)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),(0,g.J)(this._queryEngine,e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,r.UT)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)}),(e=>{this._queryEngine.featureStore.clear(),(0,l.zf)(e)||a.A.getLogger("esri.layers.CSVLayer").error(new o.A("csv-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:s}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:s}=this._loadOptions;if(!t)throw new o.A("csv-layer:invalid-source","url not defined");const r=(0,u.An)(t);return(await(0,n.A)(r.path,{query:{...r.query,...s},responseType:"text",signal:e})).data}_createQueryEngine(e){const{objectIdField:t,fields:s,extent:n,timeInfo:r}=e.layerDefinition,i=new S.A({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new x.do({fieldsIndex:Q.A.fromLayerJSON({fields:s,dateFieldsTimeReference:{timeZoneIANA:U.n$}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:r,objectIdField:t,spatialReference:n.spatialReference||{wkid:4326},featureStore:i})}async _createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:s}=this._locationInfo,{objectIdField:n,fieldsIndex:r,spatialReference:o}=this._queryEngine;let a=[];const l=[],u=r.fields.filter((e=>e.name!==n)).map((e=>e.name));let g=0;const S={};for(const e of r.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,w.lD)(e);void 0!==t&&(S[e.name]=t)}const F=q(e,u,this._delimiter,(0,P.Vx)(S,n));for(const e of F){const o=this._parseCoordinateValue(e[t]),u=this._parseCoordinateValue(e[s]);if(null!=u&&null!=o&&!isNaN(o)&&!isNaN(u)){e[t]=o,e[s]=u;for(const n in e)if(n!==t&&n!==s)if(r.isDateField(n))e[n]=(0,i._U)(e[n]);else if(r.isNumericField(n)){const t=z(e[n]);isNaN(t)?e[n]=null:e[n]=t}else null!=e[n]&&(e[n]=j(e[n]));e[n]=g,g++,a.push(new H(u,o)),l.push(e)}}if(!(0,f.aI)({wkid:4326},o))if((0,f.K8)(o))for(const e of a)[e.x,e.y]=(0,y.je)(e.x,e.y,G);else a=(0,p.projectMany)(d.g,a,c.A.WGS84,o,null,null);const x=[];for(let e=0;e<a.length;e++){const{x:t,y:s}=a[e],r=l[e];r[n]=e+1,x.push(new m.Om(new h.A([],[t,s]),r,null,r[n]))}return x}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=z(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,F.Nk)(f.KK,e)}catch{throw new o.A("csv-layer:projection-not-supported","Projection not supported")}}}},64714:(e,t,s)=>{s.d(t,{F0:()=>l,Vx:()=>c,e2:()=>f,f:()=>y});var n=s(44208),r=s(4718),i=s(99352),o=s(4071),a=s(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function c(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this${d(t)} = null;`;for(const t in e)s+=`this${d(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new n}catch(s){return()=>({[t]:null,...e})}}function d(e){return u.test(e)?`.${e}`:`["${e}"]`}function f(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},4071:(e,t,s)=>{s.d(t,{$:()=>n,P:()=>r});const n={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},r={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsOrderByFields:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:n,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},93470:(e,t,s)=>{s.d(t,{Cb:()=>i,HW:()=>p,JR:()=>r,JZ:()=>l,WR:()=>a,b6:()=>c,fT:()=>n,nC:()=>u,yM:()=>o});const n=[252,146,31,255],r=[153,153,153,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},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},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1202],{67482:(e,t,s)=>{function n(e){return null!=u(e)||null!=o(e)}function r(e){return a.test(e)}function i(e){return u(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let s=!0;if(l&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,n=0;for(;!t&&n<=e.length;)t=!p.test(e[n]),n++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function u(e){const t=a.exec(e);if(!t?.groups)return null;const s=t.groups,n=+s.year,r=+s.month-1,i=+s.day,o=+(s.hours??"0"),u=+(s.minutes??"0"),p=+(s.seconds??"0");if(o>23)return null;if(u>59)return null;if(p>59)return null;const l=s.ms??"0",c=l?+l.padEnd(3,"0").slice(0,3):0;let d;if(s.isUTC||!s.offsetSign)d=Date.UTC(n,r,i,o,u,p,c);else{const e=+s.offsetHours,t=+s.offsetMinutes;d=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,r,i,o,u,p,c)}return Number.isNaN(d)?null:d}s.d(t,{Br:()=>r,Cq:()=>n,_U:()=>i});const a=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,p=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,l=!Number.isNaN(new Date("technology 10").getTime())},71202:(e,t,s)=>{s.r(t),s.d(t,{default:()=>I});var n=s(78888),r=s(60999),i=s(49186),o=s(53966),u=s(74887),a=s(65864),p=s(21325),l=s(90708),c=s(58376),d=s(83221),y=s(31464),f=s(19730),h=s(85113),m=s(64714),g=s(82832),S=s(95466),b=s(98453),F=s(30524),_=s(56400);const w={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryAttachmentOrderByFields:!1,supportsQueryWithCacheHint:!0,supportsQueryWithDistance:!0,supportsQueryWithResultType:!0,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};class I{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e,t={}){this._loadOptions={url:e.url,customParameters:e.customParameters};const s=[],[n]=await Promise.all([e.url?this._fetch(t?.signal):null,this._checkProjection(e.spatialReference)]),r=(0,h.BM)(n,{geometryType:e.geometryType}),o=e.fields||r.fields||[],u=null!=e.hasZ?e.hasZ:r.hasZ,a=r.geometryType;let l=e.objectIdField||r.objectIdFieldName||"__OBJECTID";const c=e.spatialReference||p.KK;let y=e.timeInfo;o===r.fields&&r.unknownFields.length>0&&s.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:r.unknownFields}});const g=new S.A(o);let I=g.get(l);I?("esriFieldTypeString"!==I.type&&(I.type="esriFieldTypeOID"),I.editable=!1,I.nullable=!1,l=I.name):(I={alias:l,name:l,type:"string"===r.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(I));const T={};for(const e of o){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new i.A("geojson-layer:invalid-field-name","field name is missing",{field:e});if(!b.m.jsonValues.includes(e.type))throw new i.A("geojson-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});if(e.name!==I.name){const t=(0,F.lD)(e);void 0!==t&&(T[e.name]=t)}null==e.length&&(e.length=(0,F._b)(e))}if(y){if(y.startTimeField){const e=g.get(y.startTimeField);e?(y.startTimeField=e.name,e.type="esriFieldTypeDate"):y.startTimeField=null}if(y.endTimeField){const e=g.get(y.endTimeField);e?(y.endTimeField=e.name,e.type="esriFieldTypeDate"):y.endTimeField=null}if(y.trackIdField){const e=g.get(y.trackIdField);e?y.trackIdField=e.name:(y.trackIdField=null,s.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:y}}))}y.startTimeField||y.endTimeField||(s.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:y}}),y=null)}const E=a?(0,m.F0)(a):void 0,C=g.dateFields.length?{timeZoneIANA:_.n$}:null,A={warnings:s,featureErrors:[],layerDefinition:{...w,drawingInfo:E??void 0,templates:(0,m.e2)(T),extent:void 0,geometryType:a,objectIdField:l,fields:o,hasZ:!!u,timeInfo:y,dateFieldsTimeReference:C}};this._queryEngine=new f.do({fieldsIndex:S.A.fromLayerJSON({fields:o,timeInfo:y,dateFieldsTimeReference:C}),geometryType:a,hasM:!1,hasZ:u,objectIdField:l,spatialReference:c,timeInfo:y,featureStore:new d.A({geometryType:a,hasM:!1,hasZ:u})});const x=this._queryEngine.fieldsIndex.requiredFields.indexOf(I);x>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(x,1),this._createDefaultAttributes=(0,m.Vx)(T,l);const R=await this._createFeatures(n);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,R);const q=this._normalizeFeatures(R,A.featureErrors);this._queryEngine.featureStore.addMany(q);const{fullExtent:j,timeExtent:P}=await this._queryEngine.fetchRecomputedExtents();if(A.layerDefinition.extent=j,P){const{start:e,end:t}=P;A.layerDefinition.timeInfo.timeExtent=[e,t]}return A}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([(0,g.$1)(t,s),(0,y.Nk)(e.adds,t),(0,y.Nk)(e.updates,t)]),await this._waitSnapshotComplete(),this._applyEdits(e)}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),(0,c.J)(this._queryEngine,e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,r.UT)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,e);const t=this._normalizeFeatures(e);t&&this._queryEngine.featureStore.addMany(t)}),(e=>{this._queryEngine.featureStore.clear(),(0,u.zf)(e)||o.A.getLogger("esri.layers.GeoJSONLayer").error(new i.A("geojson-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:s}}async _createFeatures(e){if(null==e)return[];const{geometryType:t,hasZ:s,objectIdField:n}=this._queryEngine,r=(0,h.bd)(e,{geometryType:t,hasZ:s,objectIdField:n});if(!(0,p.aI)(this._queryEngine.spatialReference,p.KK))for(const e of r)null!=e.geometry&&(e.geometry=(0,l.Ux)((0,y.Cv)((0,l.zv)(e.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),p.KK,this._queryEngine.spatialReference)));return r}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:s}=this._loadOptions,r=(await(0,n.A)(t??"",{responseType:"json",query:{...s},signal:e})).data;return(0,h.sO)(r),r}_normalizeFeatures(e,t){const{objectIdField:s,fieldsIndex:n}=this._queryEngine,r=[];for(const i of e){const e=this._createDefaultAttributes(),o=(0,g.MB)(n,e,i.attributes,!0);o?t?.push(o):(this._assignObjectId(e,i.attributes,!0),i.attributes=e,i.objectId=e[s],r.push(i))}return r}async _applyEdits(e){const{adds:t,updates:s,deletes:n}=e,r={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(r,t),s?.length&&this._applyUpdateEdits(r,s),n?.length){for(const e of n)r.deleteResults.push((0,g.bP)(e));this._queryEngine.featureStore.removeManyById(n)}const{fullExtent:i,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:i,timeExtent:o,featureEditResults:r}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:n,hasM:r,hasZ:i,objectIdField:o,spatialReference:u,featureStore:p,fieldsIndex:c}=this._queryEngine,d=[];for(const r of t){if(r.geometry&&n!==(0,a.$B)(r.geometry)){s.push((0,g.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),i=(0,g.MB)(c,t,r.attributes);if(i)s.push(i);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,null!=r.uid){const t=r.attributes[o];e.uidToObjectId[r.uid]=t}if(null!=r.geometry){const e=r.geometry.spatialReference??u;r.geometry=(0,y.Cv)((0,g.CR)(r.geometry,e),e,u)}d.push(r),s.push((0,g.bP)(r.attributes[o]))}}p.addMany((0,l.Di)([],d,n,i,r,o))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:n,hasZ:r,objectIdField:i,spatialReference:o,featureStore:u,fieldsIndex:p}=this._queryEngine;for(const c of t){const{attributes:t,geometry:d}=c,f=t?.[i];if(null==f){e.push((0,g.Yx)(`Identifier field ${i} missing`));continue}if(!u.has(f)){e.push((0,g.Yx)(`Feature with object id ${f} missing`));continue}const h=(0,l.oN)(u.getFeature(f),s,r,n);if(null!=d){if(s!==(0,a.$B)(d)){e.push((0,g.Yx)("Incorrect geometry type."));continue}const t=d.spatialReference??o;h.geometry=(0,y.Cv)((0,g.CR)(d,t),t,o)}if(t){const s=(0,g.MB)(p,h.attributes,t);if(s){e.push(s);continue}}u.add((0,l.E2)(h,s,r,n,i)),e.push((0,g.bP)(f))}}_createObjectIdGenerator(e,t){const s=e.fieldsIndex.get(e.objectIdField);if("esriFieldTypeString"===s.type)return()=>s.name+"-"+Date.now().toString(16);let n=Number.NEGATIVE_INFINITY;for(const e of t)e.objectId&&(n=Math.max(n,e.objectId));return n=Math.max(0,n)+1,()=>n++}_assignObjectId(e,t,s=!1){const n=this._queryEngine.objectIdField;e[n]=s&&n in t?t[n]:this._objectIdGenerator()}async _checkProjection(e){try{await(0,y.Nk)(p.KK,e)}catch{throw new i.A("geojson-layer","Projection not supported")}}}},85113:(e,t,s)=>{s.d(t,{BM:()=>T,bd:()=>E,sO:()=>I,xD:()=>l});var n=s(67482),r=s(49186),i=s(21325),o=s(43334),u=s(92722),a=s(30524);const p={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function l(e){return p[e]}function*c(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*d(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function y(e){for(const t of e)if(t.length>2)return!0;return!1}function f(e){let t=0;for(let s=0;s<e.length;s++){const n=e[s],r=e[(s+1)%e.length];t+=n[0]*r[1]-r[0]*n[1]}return t<=0}function h(e){const t=e[0],s=e[e.length-1];return t[0]===s[0]&&t[1]===s[1]&&t[2]===s[2]||e.push(t),e}function m(e,t,s){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,s){return b(e,t.coordinates,s),e}(e,t,s);case"MultiLineString":return function(e,t,s){for(const n of t.coordinates)b(e,n,s);return e}(e,t,s);case"MultiPolygon":return function(e,t,s){for(const n of t.coordinates){g(e,n[0],s);for(let t=1;t<n.length;t++)S(e,n[t],s)}return e}(e,t,s);case"Point":return function(e,t,s){return _(e,t.coordinates,s),e}(e,t,s);case"Polygon":return function(e,t,s){const n=t.coordinates;g(e,n[0],s);for(let t=1;t<n.length;t++)S(e,n[t],s);return e}(e,t,s)}}function g(e,t,s){const n=h(t);!function(e){return!f(e)}(n)?b(e,n,s):F(e,n,s)}function S(e,t,s){const n=h(t);!function(e){return f(e)}(n)?b(e,n,s):F(e,n,s)}function b(e,t,s){for(const n of t)_(e,n,s);e.lengths.push(t.length)}function F(e,t,s){for(let n=t.length-1;n>=0;n--)_(e,t[n],s);e.lengths.push(t.length)}function _(e,t,s){const[n,r,i]=t;e.coords.push(n,r),s.hasZ&&e.coords.push(i||0)}function w(e){switch(typeof e){case"string":return(0,n.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function I(e,t=4326){if(!e)throw new r.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new r.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:s}=e;if(!s)return;const n="string"==typeof s?s:"name"===s.type?s.properties.name:"EPSG"===s.type?s.properties.code:null,o=(0,i.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!n||!o.test(n))throw new r.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:s})}function T(e,t={}){const s=[],n=new Set,r=new Set;let i,o=!1,u=null,p=!1,{geometryType:f=null}=t;for(const t of c(e)){const{geometry:e,properties:c,id:h}=t;if((!e||(f||(f=l(e.type)),l(e.type)===f))&&(o||(o=y(d(e))),p||(p=null!=h,p&&(i=typeof h,c&&(u=Object.keys(c).filter((e=>c[e]===h))))),c&&u&&p&&null!=h&&(u.length>1?u=u.filter((e=>c[e]===h)):1===u.length&&(u=c[u[0]]===h?u:[])),c))for(const e in c){if(n.has(e))continue;const t=w(c[e]);if("unknown"===t){r.add(e);continue}r.delete(e),n.add(e);const i=(0,a.rS)(e);i&&s.push({name:i,alias:e,type:t})}}const h=(0,a.rS)(1===u?.length&&u[0]||null)??void 0;if(h)for(const e of s)if(e.name===h&&(0,a.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:s,geometryType:f,hasZ:o,objectIdFieldName:h,objectIdFieldType:i,unknownFields:Array.from(r)}}function E(e,t){return Array.from(function*(e,t={}){const{geometryType:s,objectIdField:n}=t;for(const r of e){const{geometry:e,properties:i,id:a}=r;if(e&&l(e.type)!==s)continue;const p=i||{};let c;n&&(c=p[n],null==a||c||(p[n]=c=a));const d=new o.Om(e?m(new u.A,e,t):null,p,null,c);yield d}}(c(e),t))}},64714:(e,t,s)=>{s.d(t,{F0:()=>a,Vx:()=>c,e2:()=>y,f:()=>f});var n=s(44208),r=s(4718),i=s(99352),o=s(4071),u=s(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?u.Cb:"esriGeometryPolyline"===e?u.yM:u.WR}}}const p=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function c(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this${d(t)} = null;`;for(const t in e)s+=`this${d(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new n}catch(s){return()=>({[t]:null,...e})}}function d(e){return p.test(e)?`.${e}`:`["${e}"]`}function y(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832:(e,t,s)=>{s.d(t,{$1:()=>m,CR:()=>h,MB:()=>d,Yx:()=>a,bP:()=>l});var n=s(67482),r=s(21325),i=s(30524);class o{constructor(){this.code=null,this.description=null}}class u{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function a(e){return new u(e)}class p{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function l(e){return new p(e)}const c=new Set;function d(e,t,s,n=!1){c.clear();for(const r in s){const o=e.get(r);if(!o)continue;const u=y(o,s[r]);if(c.add(o.name),o&&(n||o.editable)){const e=(0,i.CJ)(o,u);if(e)return a((0,i.uo)(e,o,u));t[o.name]=u}}for(const t of e.requiredFields??[])if(!c.has(t.name))return a(`missing required field "${t.name}"`);return null}function y(e,t){let s=t;return(0,i.WA)(e)&&"string"==typeof t?s=parseFloat(t):(0,i.yM)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,i.vE)(e)&&"string"==typeof t&&(s=(0,n._U)(t)),(0,i.WX)(s)}let f;function h(e,t){if(!e||!(0,r.fn)(t))return e;if("rings"in e||"paths"in e){if(null==f)throw new TypeError("geometry engine not loaded");return f.simplify(t,e)}return e}async function m(e,t){!(0,r.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==f&&(f=await Promise.all([s.e(9930),s.e(1275)]).then(s.bind(s,47559))),f}()}},4071:(e,t,s)=>{s.d(t,{$:()=>n,P:()=>r});const n={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},r={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsOrderByFields:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:n,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},93470:(e,t,s)=>{s.d(t,{Cb:()=>i,HW:()=>l,JR:()=>r,JZ:()=>a,WR:()=>u,b6:()=>c,fT:()=>n,nC:()=>p,yM:()=>o});const n=[252,146,31,255],r=[153,153,153,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},u={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},p={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},l={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|