@arcgis/core 4.27.0-rc.2 → 4.27.0-rc.4
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/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{a8565d1c676f3bfbcebb.js → 002fe1ec63ea33e6972d.js} +1 -1
- package/assets/esri/core/workers/chunks/09e677ca7532a281d262.js +1 -0
- package/assets/esri/core/workers/chunks/0f7ddb063ee0664f2fca.js +1 -0
- package/assets/esri/core/workers/chunks/17ab08f60764244b2cf8.js +1 -0
- package/assets/esri/core/workers/chunks/1aa8dd317ecd3c41e0ea.js +1 -0
- package/assets/esri/core/workers/chunks/28c67c98039503b62e6e.js +1 -0
- package/assets/esri/core/workers/chunks/{2446e336b1f7256d4fde.js → 2c587ed66e2586cccb8d.js} +1 -1
- package/assets/esri/core/workers/chunks/3767b9e7660873b018c2.js +1 -0
- package/assets/esri/core/workers/chunks/{00c7b9fb375c9a934158.js → 38c6452dc9cf18e8bca8.js} +1 -1
- package/assets/esri/core/workers/chunks/39ae4b9b766f674bc6f2.js +1 -0
- package/assets/esri/core/workers/chunks/45629ff775e77234b227.js +1 -0
- package/assets/esri/core/workers/chunks/{16db0bc87d87a7313dc4.js → 4806df402845c717c842.js} +1 -1
- package/assets/esri/core/workers/chunks/4884432d80e9af947449.js +1 -0
- package/assets/esri/core/workers/chunks/4a4f14a3d8da270059c4.js +1 -0
- package/assets/esri/core/workers/chunks/588cd91d08cec5207be1.js +1 -0
- package/assets/esri/core/workers/chunks/{83e3d104886b48f00397.js → 633c00c02a81397fc8df.js} +1 -1
- package/assets/esri/core/workers/chunks/{efb96aefe979a0f5c632.js → 640e8ac3498be30c6614.js} +1 -1
- package/assets/esri/core/workers/chunks/642c5a93c0a454bdd115.js +1 -0
- package/assets/esri/core/workers/chunks/{14145959a3dab1437818.js → 6627f1bc9ee6b620e3aa.js} +1 -1
- package/assets/esri/core/workers/chunks/{33901eb1574e46abd9af.js → 6c213768715c52625855.js} +1 -1
- package/assets/esri/core/workers/chunks/{5e6471dd2a08e66b47d0.js → 6e4940fe3bba014c921b.js} +57 -58
- package/assets/esri/core/workers/chunks/{170bdbdb4e21bf91a17f.js → 6eaa7a51efde2dd4a5a4.js} +1 -1
- package/assets/esri/core/workers/chunks/{0407bf97ad621c89a734.js → 6f724f75f85dc3989d60.js} +1 -1
- package/assets/esri/core/workers/chunks/{2bdc63395c7466ce1641.js → 7053c2f5a958d4c8629b.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c35c663528f710e8c78.js → 79cb672c85ea29e8484a.js} +1 -1
- package/assets/esri/core/workers/chunks/82939ead43848a13f765.js +1 -0
- package/assets/esri/core/workers/chunks/8b05fb365336cc42fecc.js +1 -0
- package/assets/esri/core/workers/chunks/8b6b963230df56850580.js +1 -0
- package/assets/esri/core/workers/chunks/8eec6da5e862cc33ea2b.js +1 -0
- package/assets/esri/core/workers/chunks/90d8f297d9cb359e071d.js +1 -0
- package/assets/esri/core/workers/chunks/91785144901dfe56c5e2.js +1 -0
- package/assets/esri/core/workers/chunks/{471f6eba213412b82840.js → 927417abea79c955b216.js} +1 -1
- package/assets/esri/core/workers/chunks/9472184ef1432fc55d6b.js +1 -0
- package/assets/esri/core/workers/chunks/{adaa9d4239f4e905d011.js → 9d4bd73dd50400e9d328.js} +1 -1
- package/assets/esri/core/workers/chunks/a324cc07d486061d0d8e.js +1 -0
- package/assets/esri/core/workers/chunks/a40130579791293cefa2.js +1 -0
- package/assets/esri/core/workers/chunks/{3e239bfad611985e50fb.js → a49718c74053314ed741.js} +1 -1
- package/assets/esri/core/workers/chunks/a80a6267d88246ede5d3.js +1 -0
- package/assets/esri/core/workers/chunks/ad2891985e0fe45aa8d2.js +1 -0
- package/assets/esri/core/workers/chunks/afcba35eea836aea98ca.js +1 -0
- package/assets/esri/core/workers/chunks/b3d2e397ea74ebef4423.js +1 -0
- package/assets/esri/core/workers/chunks/b5fb9da45cc9dee286f8.js +1 -0
- package/assets/esri/core/workers/chunks/{f505ebd4bd3bfb6c790d.js → b6a55fdfe16795ebf02c.js} +1 -1
- package/assets/esri/core/workers/chunks/b846d4215210aac9f6ef.js +1 -0
- package/assets/esri/core/workers/chunks/c7dc821db8c14fec24a7.js +1 -0
- package/assets/esri/core/workers/chunks/c9df9a0a4a45f9a53ce9.js +1 -0
- package/assets/esri/core/workers/chunks/{45a4041881e6235d73a2.js → d0a9711f48dfa5fee68a.js} +1 -1
- package/assets/esri/core/workers/chunks/{1f69fb9687de9ebfcf90.js → d4ba894a2583f3930a4f.js} +1 -1
- package/assets/esri/core/workers/chunks/d5dfd3d693d5e393a542.js +1 -0
- package/assets/esri/core/workers/chunks/{74fd2059ddda9083cbcc.js → dc6c97a43d642eeaf477.js} +1 -1
- package/assets/esri/core/workers/chunks/e23ec4f867c4735eec20.js +1 -0
- package/assets/esri/core/workers/chunks/ea16230a0edfc9f756bd.js +1 -0
- package/assets/esri/core/workers/chunks/{2154d395f405be3cd3ba.js → eca0c3d57b3a1e3a14ee.js} +1 -1
- package/assets/esri/core/workers/chunks/ef900614353505afb210.js +1 -0
- package/assets/esri/core/workers/chunks/f36697f6aac782007d1a.js +1 -0
- package/assets/esri/core/workers/chunks/f52054f27619a98b7bb7.js +1 -0
- package/assets/esri/core/workers/chunks/fb7fe307a583b6a22218.js +1 -0
- package/assets/esri/core/workers/chunks/fbd3c78ee8e2219a6c7a.js +1 -0
- package/assets/esri/images/portal/livestreamvideolayer16.png +0 -0
- package/assets/esri/images/portal/{mediaservice16.png → videolayer16.png} +0 -0
- package/assets/esri/themes/base/_View.scss +2 -5
- package/assets/esri/themes/base/widgets/_Feature.scss +12 -4
- package/assets/esri/themes/base/widgets/_FeatureForm.scss +19 -2
- 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/DefaultMaterial.glsl.js +42 -42
- package/chunks/Terrain.glsl.js +7 -7
- package/copyright.txt +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/geometry/support/meshUtils/bounds.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/interfaces.d.ts +87 -3
- package/kernel.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
- package/layers/graphics/sources/support/uploadAssets.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/bestImageUtils.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
- package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/editableLayers.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/video/VideoCameraSensorModel.js +5 -0
- package/layers/video/VideoController.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/package.json +1 -1
- package/portal/PortalItem.js +1 -1
- package/renderers/support/colorRampUtils.js +1 -1
- package/request.js +1 -1
- package/rest/support/meshFeatureSet.js +1 -1
- package/smartMapping/labels/bins.js +5 -0
- package/smartMapping/labels/clusters.js +1 -1
- package/smartMapping/labels/support/utils.js +5 -0
- package/smartMapping/support/binningUtils.js +1 -1
- package/support/requestUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/features/schemaUtils.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
- package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/i3s/I3SClientMaterialUtil.js +5 -0
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +19 -20
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +9 -9
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/DOMContainer.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/ui/DefaultUI.js +1 -1
- package/views/ui/UI.js +1 -1
- package/webmap/initialViewPropertiesUtils.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
- package/widgets/FeatureForm/RelationshipInput.js +1 -1
- package/widgets/FeatureForm/css.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +4 -0
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.d.ts +4 -0
- package/widgets/support/geolocationUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0610691a0c0d9fbbd6d2.js +0 -1
- package/assets/esri/core/workers/chunks/0618fb0058f39ecd363f.js +0 -1
- package/assets/esri/core/workers/chunks/0fcb8d408696075338e2.js +0 -1
- package/assets/esri/core/workers/chunks/16e459b16bdd6e1a821b.js +0 -1
- package/assets/esri/core/workers/chunks/1b8074269800b384ecf6.js +0 -1
- package/assets/esri/core/workers/chunks/2b55295590b4a0503749.js +0 -1
- package/assets/esri/core/workers/chunks/3ba2fcb9110230f8790c.js +0 -1
- package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +0 -1
- package/assets/esri/core/workers/chunks/5706edf45402dff279a6.js +0 -1
- package/assets/esri/core/workers/chunks/624521961fe1f2c4f2c5.js +0 -1
- package/assets/esri/core/workers/chunks/659b7bad7281c0e2aed3.js +0 -1
- package/assets/esri/core/workers/chunks/6cd248d065f6d1616294.js +0 -1
- package/assets/esri/core/workers/chunks/6f510f28526c73ab453c.js +0 -1
- package/assets/esri/core/workers/chunks/7479dc0c790337af7597.js +0 -1
- package/assets/esri/core/workers/chunks/9326120c750799eb2d28.js +0 -1
- package/assets/esri/core/workers/chunks/99e0cec47e3ef72c1de4.js +0 -1
- package/assets/esri/core/workers/chunks/9c0e1e87790424f42d7e.js +0 -1
- package/assets/esri/core/workers/chunks/9e66af3b1c70cf25fb32.js +0 -1
- package/assets/esri/core/workers/chunks/a1c31bb8c12831539328.js +0 -1
- package/assets/esri/core/workers/chunks/a7fd2a95fde197c06828.js +0 -1
- package/assets/esri/core/workers/chunks/b0cda39b53ecd6c44cd0.js +0 -1
- package/assets/esri/core/workers/chunks/b8e6c64792a512df4c4d.js +0 -1
- package/assets/esri/core/workers/chunks/c08e03165043df67c11b.js +0 -1
- package/assets/esri/core/workers/chunks/c26148d4bfab3b3dfab2.js +0 -1
- package/assets/esri/core/workers/chunks/c96db6b7ce47bd343fdb.js +0 -1
- package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +0 -1
- package/assets/esri/core/workers/chunks/d95ca50ca7af4c222036.js +0 -1
- package/assets/esri/core/workers/chunks/da57eba2fe25495ea217.js +0 -1
- package/assets/esri/core/workers/chunks/ee5ee03dd2c7dc940272.js +0 -1
- package/assets/esri/core/workers/chunks/eeaf8010e38b65a101ac.js +0 -1
- package/assets/esri/core/workers/chunks/f235392c56063fbf89c6.js +0 -1
- package/assets/esri/core/workers/chunks/f720967ba8c5486a26a2.js +0 -1
- package/assets/esri/core/workers/chunks/fdd0d3616c97e408b104.js +0 -1
- package/layers/orientedImagery/core/Affixes.js +0 -5
- package/layers/orientedImagery/core/CameraProperties.js +0 -5
- package/layers/orientedImagery/core/ImageProperties.js +0 -5
- package/layers/orientedImagery/core/ImageryTypes.js +0 -5
- package/layers/orientedImagery/core/imageryUtils.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4828,5732],{92835:(t,e,n)=>{n.d(e,{Z:()=>p});var s,i=n(43697),r=n(96674),o=n(70586),a=n(35463),l=n(5600),h=(n(75215),n(67676),n(80442),n(71715)),c=n(52011),u=n(30556);let d=s=class extends r.wq{static get allTime(){return m}static get empty(){return f}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?t.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?t.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=null!=this.start?this.start.getTime():this.start,n=null!=this.end?this.end.getTime():this.end,s=null!=t.start?t.start.getTime():t.start,i=null!=t.end?t.end.getTime():t.end;return e===s&&n===i}expandTo(t){if(this.isEmpty||this.isAllTime)return this.clone();const e=(0,o.yw)(this.start,(e=>(0,a.JE)(e,t))),n=(0,o.yw)(this.end,(e=>{const n=(0,a.JE)(e,t);return e.getTime()===n.getTime()?n:(0,a.Nm)(n,1,t)}));return new s({start:e,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return s.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,i=t.start?.getTime()??-1/0,r=t.end?.getTime()??1/0;let o,a;if(i>=e&&i<=n?o=i:e>=i&&e<=r&&(o=e),n>=i&&n<=r?a=n:r>=e&&r<=n&&(a=r),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const t=new s;return t.start=o===-1/0?null:new Date(o),t.end=a===1/0?null:new Date(a),t}return s.empty}offset(t,e){if(this.isEmpty||this.isAllTime)return this.clone();const n=new s,{start:i,end:r}=this;return null!=i&&(n.start=(0,a.Nm)(i,t,e)),null!=r&&(n.end=(0,a.Nm)(r,t,e)),n}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return m.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,n=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new s({start:e,end:n})}};(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,i._)([(0,h.r)("end")],d.prototype,"readEnd",null),(0,i._)([(0,u.c)("end")],d.prototype,"writeEnd",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,i._)([(0,h.r)("start")],d.prototype,"readStart",null),(0,i._)([(0,u.c)("start")],d.prototype,"writeStart",null),d=s=(0,i._)([(0,c.j)("esri.TimeExtent")],d);const m=new d,f=new d({start:void 0,end:void 0}),p=d},5732:(t,e,n)=>{n.d(e,{c:()=>s,g:()=>i});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},21787:(t,e,n)=>{n.d(e,{a:()=>l,b:()=>c,e:()=>a,f:()=>i,i:()=>d,m:()=>h,s:()=>r,t:()=>o});var s=n(46851);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function r(t,e,n,s,i,r,o,a,l,h){return t[0]=e,t[1]=n,t[2]=s,t[3]=i,t[4]=r,t[5]=o,t[6]=a,t[7]=l,t[8]=h,t}function o(t,e){if(t===e){const n=e[1],s=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=s,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=c*o-a*h,d=-c*r+a*l,m=h*r-o*l;let f=n*u+s*d+i*m;return f?(f=1/f,t[0]=u*f,t[1]=(-c*s+i*h)*f,t[2]=(a*s-i*o)*f,t[3]=d*f,t[4]=(c*n-i*l)*f,t[5]=(-a*n+i*r)*f,t[6]=m*f,t[7]=(-h*n+s*l)*f,t[8]=(o*n-s*r)*f,t):null}function l(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8];return t[0]=o*c-a*h,t[1]=i*h-s*c,t[2]=s*a-i*o,t[3]=a*l-r*c,t[4]=n*c-i*l,t[5]=i*r-n*a,t[6]=r*h-o*l,t[7]=s*l-n*h,t[8]=n*o-s*r,t}function h(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=n[0],m=n[1],f=n[2],p=n[3],_=n[4],g=n[5],y=n[6],x=n[7],v=n[8];return t[0]=d*s+m*o+f*h,t[1]=d*i+m*a+f*c,t[2]=d*r+m*l+f*u,t[3]=p*s+_*o+g*h,t[4]=p*i+_*a+g*c,t[5]=p*r+_*l+g*u,t[6]=y*s+x*o+v*h,t[7]=y*i+x*a+v*c,t[8]=y*r+x*l+v*u,t}function c(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],m=e[11],f=e[12],p=e[13],_=e[14],g=e[15],y=n*a-s*o,x=n*l-i*o,v=n*h-r*o,b=s*l-i*a,M=s*h-r*a,w=i*h-r*l,P=c*p-u*f,C=c*_-d*f,R=c*g-m*f,E=u*_-d*p,I=u*g-m*p,O=d*g-m*_;let B=y*O-x*I+v*E+b*R-M*C+w*P;return B?(B=1/B,t[0]=(a*O-l*I+h*E)*B,t[1]=(l*R-o*O-h*C)*B,t[2]=(o*I-a*R+h*P)*B,t[3]=(i*I-s*O-r*E)*B,t[4]=(n*O-i*R+r*C)*B,t[5]=(s*R-n*I-r*P)*B,t[6]=(p*w-_*M+g*b)*B,t[7]=(_*v-f*w-g*x)*B,t[8]=(f*M-p*v+g*y)*B,t):null}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function d(t){const e=(0,s.g)(),n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8];return Math.abs(1-(n*n+o*o+h*h))<=e&&Math.abs(1-(i*i+a*a+c*c))<=e&&Math.abs(1-(r*r+l*l+u*u))<=e}const m=h,f=u;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:l,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],n=t[1],s=t[2],i=t[3],r=t[4],o=t[5],a=t[6],l=t[7],h=t[8];return e*(h*r-o*l)+n*(-h*i+o*a)+s*(l*i-r*a)},equals:function(t,e){const n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8],d=e[0],m=e[1],f=e[2],p=e[3],_=e[4],g=e[5],y=e[6],x=e[7],v=e[8],b=(0,s.g)();return Math.abs(n-d)<=b*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-m)<=b*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(r-f)<=b*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-p)<=b*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-_)<=b*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(l-g)<=b*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(h-y)<=b*Math.max(1,Math.abs(h),Math.abs(y))&&Math.abs(c-x)<=b*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(u-v)<=b*Math.max(1,Math.abs(u),Math.abs(v))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:i,fromQuat:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=n+n,a=s+s,l=i+i,h=n*o,c=s*o,u=s*a,d=i*o,m=i*a,f=i*l,p=r*o,_=r*a,g=r*l;return t[0]=1-u-f,t[3]=c-g,t[6]=d+_,t[1]=c+g,t[4]=1-h-f,t[7]=m-p,t[2]=d-_,t[5]=m+p,t[8]=1-h-u,t},fromRotation:function(t,e){const n=Math.sin(e),s=Math.cos(e);return t[0]=s,t[1]=n,t[2]=0,t[3]=-n,t[4]=s,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:d,mul:m,multiply:h,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,s){return t[0]=e[0]+n[0]*s,t[1]=e[1]+n[1]*s,t[2]=e[2]+n[2]*s,t[3]=e[3]+n[3]*s,t[4]=e[4]+n[4]*s,t[5]=e[5]+n[5]*s,t[6]=e[6]+n[6]*s,t[7]=e[7]+n[7]*s,t[8]=e[8]+n[8]*s,t},normalFromMat4:c,normalFromMat4Legacy:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[4],o=e[5],a=e[6],l=e[8],h=e[9],c=e[10],u=c*o-a*h,d=-c*r+a*l,m=h*r-o*l,f=n*u+s*d+i*m;if(!f)return null;const p=1/f;return t[0]=u*p,t[1]=(-c*s+i*h)*p,t[2]=(a*s-i*o)*p,t[3]=d*p,t[4]=(c*n-i*l)*p,t[5]=(-a*n+i*r)*p,t[6]=m*p,t[7]=(-h*n+s*l)*p,t[8]=(o*n-s*r)*p,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=Math.sin(n),m=Math.cos(n);return t[0]=m*s+d*o,t[1]=m*i+d*a,t[2]=m*r+d*l,t[3]=m*o-d*s,t[4]=m*a-d*i,t[5]=m*l-d*r,t[6]=h,t[7]=c,t[8]=u,t},scale:function(t,e,n){const s=n[0],i=n[1],r=n[2];return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=r*e[6],t[7]=r*e[7],t[8]=r*e[8],t},scaleByVec2:function(t,e,n){const s=n[0],i=n[1];return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t},set:r,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:f,subtract:u,translate:function(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=n[0],m=n[1];return t[0]=s,t[1]=i,t[2]=r,t[3]=o,t[4]=a,t[5]=l,t[6]=d*s+m*o+h,t[7]=d*i+m*a+c,t[8]=d*r+m*l+u,t},transpose:o},Symbol.toStringTag,{value:"Module"}))},46521:(t,e,n)=>{function s(){return[1,0,0,0,1,0,0,0,1]}function i(t,e,n,s,i,r,o,a,l){return[t,e,n,s,i,r,o,a,l]}function r(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>r,c:()=>s,f:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:s,createView:r,fromValues:i},Symbol.toStringTag,{value:"Module"}))},88764:(t,e,n)=>{n.d(e,{q:()=>l});var s,i,r,o=n(5732),a={exports:{}};s=a,i=function(){function t(n,s,i,r,o){for(;r>i;){if(r-i>600){var a=r-i+1,l=s-i+1,h=Math.log(a),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);t(n,s,Math.max(i,Math.floor(s-l*c/a+u)),Math.min(r,Math.floor(s+(a-l)*c/a+u)),o)}var d=n[s],m=i,f=r;for(e(n,i,s),o(n[r],d)>0&&e(n,i,r);m<f;){for(e(n,m,f),m++,f--;o(n[m],d)<0;)m++;for(;o(n[f],d)>0;)f--}0===o(n[i],d)?e(n,i,f):e(n,++f,r),f<=s&&(i=f+1),s<=f&&(r=f-1)}}function e(t,e,n){var s=t[e];t[e]=t[n],t[n]=s}function n(t,e){return t<e?-1:t>e?1:0}return function(e,s,i,r,o){t(e,s,i||0,r||e.length-1,o||n)}},void 0!==(r=i())&&(s.exports=r);const l=(0,o.g)(a.exports)},4307:(t,e,n)=>{n.d(e,{d:()=>l,l:()=>d,r:()=>f,s:()=>i,t:()=>m});var s=n(46851);function i(t,e,n){return t[0]=e,t[1]=n,t}function r(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function o(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function a(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function l(t,e){const n=e[0]-t[0],s=e[1]-t[1];return Math.sqrt(n*n+s*s)}function h(t,e){const n=e[0]-t[0],s=e[1]-t[1];return n*n+s*s}function c(t){const e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function u(t){const e=t[0],n=t[1];return e*e+n*n}function d(t,e,n,s){const i=e[0],r=e[1];return t[0]=i+s*(n[0]-i),t[1]=r+s*(n[1]-r),t}function m(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[2]*i+n[4],t[1]=n[1]*s+n[3]*i+n[5],t}function f(t,e,n,s){const i=e[0]-n[0],r=e[1]-n[1],o=Math.sin(s),a=Math.cos(s);return t[0]=i*a-r*o+n[0],t[1]=i*o+r*a+n[1],t}const p=c,_=r,g=o,y=a,x=l,v=h,b=u;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},angle:function(t,e){const n=t[0],s=t[1],i=e[0],r=e[1];let o=n*n+s*s;o>0&&(o=1/Math.sqrt(o));let a=i*i+r*r;a>0&&(a=1/Math.sqrt(a));const l=(n*i+s*r)*o*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},cross:function(t,e,n){const s=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=s,t},dist:x,distance:l,div:y,divide:a,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:function(t,e){const n=t[0],i=t[1],r=e[0],o=e[1],a=(0,s.g)();return Math.abs(n-r)<=a*Math.max(1,Math.abs(n),Math.abs(r))&&Math.abs(i-o)<=a*Math.max(1,Math.abs(i),Math.abs(o))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:p,length:c,lerp:d,max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},mul:g,multiply:o,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:function(t,e){const n=e[0],s=e[1];let i=n*n+s*s;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},projectAndScale:function(t,e,n,s,i){let r=e[0]-n[0],o=e[1]-n[1];const a=(s[0]*r+s[1]*o)*(i-1);return r=s[0]*a,o=s[1]*a,t[0]=e[0]+r,t[1]=e[1]+o,t},random:function(t,e){e=e||1;const n=2*(0,s.R)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},rotate:f,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},scaleAndAdd:function(t,e,n,s){return t[0]=e[0]+n[0]*s,t[1]=e[1]+n[1]*s,t},set:i,sqrDist:v,sqrLen:b,squaredDistance:h,squaredLength:u,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:_,subtract:r,transformMat2:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[2]*i,t[1]=n[1]*s+n[3]*i,t},transformMat2d:m,transformMat3:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[3]*i+n[6],t[1]=n[1]*s+n[4]*i+n[7],t},transformMat4:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[4]*i+n[12],t[1]=n[1]*s+n[5]*i+n[13],t}},Symbol.toStringTag,{value:"Module"}))},97323:(t,e,n)=>{function s(){return[0,0]}function i(t,e){return[t,e]}function r(t,e){return new Float64Array(t,e,2)}function o(){return i(1,1)}function a(){return i(1,0)}function l(){return i(0,1)}n.d(e,{a:()=>s,c:()=>r,f:()=>i});const h=o(),c=a(),u=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:c,UNIT_Y:u,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:s,createView:r,fromArray:function(t){const e=[0,0],n=Math.min(2,t.length);for(let s=0;s<n;++s)e[s]=t[s];return e},fromValues:i,ones:o,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},46791:(t,e,n)=>{n.d(e,{Z:()=>B});var s,i=n(43697),r=n(3894),o=n(32448),a=n(22974),l=n(70586),h=n(71143);!function(t){t[t.ADD=1]="ADD",t[t.REMOVE=2]="REMOVE",t[t.MOVE=4]="MOVE"}(s||(s={}));var c,u=n(1654),d=n(75215),m=n(58971),f=n(5600),p=n(52421),_=n(52011),g=n(10661);const y=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(t){this.defaultPrevented=!1,this.item=t}},void 0,(t=>{t.item=null,t.target=null,t.defaultPrevented=!1,t.cancellable=!1})),x=()=>{};function v(t){return t?t instanceof O?t.toArray():t.length?Array.prototype.slice.apply(t):[]:[]}function b(t){if(t&&t.length)return t[0]}function M(t,e,n,s){const i=Math.min(t.length-n,e.length-s);let r=0;for(;r<i&&t[n+r]===e[s+r];)r++;return r}function w(t,e,n,s){e&&e.forEach(((e,i,r)=>{t.push(e),w(t,n.call(s,e,i,r),n,s)}))}const P=new Set,C=new Set,R=new Set,E=new Map;let I=0,O=c=class extends o.Z.EventedAccessor{static isCollection(t){return null!=t&&t instanceof c}constructor(t){super(t),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new g.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:I++})}normalizeCtorArgs(t){return t?Array.isArray(t)||t instanceof c?{items:t}:t:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,m.it)(this._observable),this._items}set items(t){this._emitBeforeChanges(s.ADD)||(this._splice(0,this.length,v(t)),this._emitAfterChanges(s.ADD))}hasEventListener(t){return"change"===t?this._chgListeners.length>0:this._emitter.hasEventListener(t)}on(t,e){if("change"===t){const t=this._chgListeners,n={removed:!1,callback:e};return t.push(n),this._notifications&&this._notifications.push({listeners:t.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=x,n.removed=!0,t.splice(t.indexOf(n),1)}}}return this._emitter.on(t,e)}once(t,e){const n=this.on(t,e);return{remove(){n.remove()}}}add(t,e){if((0,m.it)(this._observable),this._emitBeforeChanges(s.ADD))return this;const n=this.getNextIndex(e??null);return this._splice(n,0,[t]),this._emitAfterChanges(s.ADD),this}addMany(t,e=this._items.length){if((0,m.it)(this._observable),!t||!t.length)return this;if(this._emitBeforeChanges(s.ADD))return this;const n=this.getNextIndex(e);return this._splice(n,0,v(t)),this._emitAfterChanges(s.ADD),this}at(t){if((0,m.it)(this._observable),(t=Math.trunc(t)||0)<0&&(t+=this.length),!(t<0||t>=this.length))return this._items[t]}removeAll(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return[];const t=this._removeAllRaw();return this._emitAfterChanges(s.REMOVE),t}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.map(a.d9)})}concat(...t){(0,m.it)(this._observable);const e=t.map(v);return this._createNewInstance({items:this._items.concat(...e)})}drain(t,e){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const n=(0,l.j0)(this._splice(0,this.length)),i=n.length;for(let s=0;s<i;s++)t.call(e,n[s],s,n);this._emitAfterChanges(s.REMOVE)}every(t,e){return(0,m.it)(this._observable),this._items.every(t,e)}filter(t,e){let n;return(0,m.it)(this._observable),n=2===arguments.length?this._items.filter(t,e):this._items.filter(t),this._createNewInstance({items:n})}find(t,e){return(0,m.it)(this._observable),this._items.find(t,e)}findIndex(t,e){return(0,m.it)(this._observable),this._items.findIndex(t,e)}flatten(t,e){(0,m.it)(this._observable);const n=[];return w(n,this,t,e),new c(n)}forEach(t,e){return(0,m.it)(this._observable),this._items.forEach(t,e)}getItemAt(t){return(0,m.it)(this._observable),this._items[t]}getNextIndex(t){(0,m.it)(this._observable);const e=this.length;return(t=t??e)<0?t=0:t>e&&(t=e),t}includes(t,e=0){return(0,m.it)(this._observable),this._items.includes(t,e)}indexOf(t,e=0){return(0,m.it)(this._observable),this._items.indexOf(t,e)}join(t=","){return(0,m.it)(this._observable),this._items.join(t)}lastIndexOf(t,e=this.length-1){return(0,m.it)(this._observable),this._items.lastIndexOf(t,e)}map(t,e){(0,m.it)(this._observable);const n=this._items.map(t,e);return new c({items:n})}reorder(t,e=this.length-1){(0,m.it)(this._observable);const n=this.indexOf(t);if(-1!==n){if(e<0?e=0:e>=this.length&&(e=this.length-1),n!==e){if(this._emitBeforeChanges(s.MOVE))return t;this._splice(n,1),this._splice(e,0,[t]),this._emitAfterChanges(s.MOVE)}return t}}pop(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const t=b(this._splice(this.length-1,1));return this._emitAfterChanges(s.REMOVE),t}push(...t){return(0,m.it)(this._observable),this._emitBeforeChanges(s.ADD)||(this._splice(this.length,0,t),this._emitAfterChanges(s.ADD)),this.length}reduce(t,e){(0,m.it)(this._observable);const n=this._items;return 2===arguments.length?n.reduce(t,e):n.reduce(t)}reduceRight(t,e){(0,m.it)(this._observable);const n=this._items;return 2===arguments.length?n.reduceRight(t,e):n.reduceRight(t)}remove(t){return(0,m.it)(this._observable),this.removeAt(this.indexOf(t))}removeAt(t){if((0,m.it)(this._observable),t<0||t>=this.length||this._emitBeforeChanges(s.REMOVE))return;const e=b(this._splice(t,1));return this._emitAfterChanges(s.REMOVE),e}removeMany(t){if((0,m.it)(this._observable),!t||!t.length||this._emitBeforeChanges(s.REMOVE))return[];const e=t instanceof c?t.toArray():t,n=this._items,i=[],r=e.length;for(let t=0;t<r;t++){const s=e[t],r=n.indexOf(s);if(r>-1){const s=1+M(e,n,t+1,r+1),o=this._splice(r,s);o&&o.length>0&&i.push.apply(i,o),t+=s-1}}return this._emitAfterChanges(s.REMOVE),i}reverse(){if((0,m.it)(this._observable),this._emitBeforeChanges(s.MOVE))return this;const t=this._splice(0,this.length);return t&&(t.reverse(),this._splice(0,0,t)),this._emitAfterChanges(s.MOVE),this}shift(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const t=b(this._splice(0,1));return this._emitAfterChanges(s.REMOVE),t}slice(t=0,e=this.length){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.slice(t,e)})}some(t,e){return(0,m.it)(this._observable),this._items.some(t,e)}sort(t){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.MOVE))return this;const e=(0,l.j0)(this._splice(0,this.length));return arguments.length?e.sort(t):e.sort(),this._splice(0,0,e),this._emitAfterChanges(s.MOVE),this}splice(t,e,...n){(0,m.it)(this._observable);const i=(e?s.REMOVE:0)|(n.length?s.ADD:0);if(this._emitBeforeChanges(i))return[];const r=this._splice(t,e,n)||[];return this._emitAfterChanges(i),r}toArray(){return(0,m.it)(this._observable),this._items.slice()}toJSON(){return(0,m.it)(this._observable),this.toArray()}toLocaleString(){return(0,m.it)(this._observable),this._items.toLocaleString()}toString(){return(0,m.it)(this._observable),this._items.toString()}unshift(...t){return(0,m.it)(this._observable),!t.length||this._emitBeforeChanges(s.ADD)||(this._splice(0,0,t),this._emitAfterChanges(s.ADD)),this.length}_createNewInstance(t){return new this.constructor(t)}_splice(t,e,n){const s=this._items,i=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,u.Os)((()=>this._dispatchChange()))),e){if(o=s.splice(t,e),this.hasEventListener("before-remove")){const e=y.acquire();e.target=this,e.cancellable=!0;for(let n=0,i=o.length;n<i;n++)r=o[n],e.reset(r),this.emit("before-remove",e),e.defaultPrevented&&(o.splice(n,1),s.splice(t,0,r),t+=1,n-=1,i-=1);y.release(e)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const t=y.acquire();t.target=this,t.cancellable=!1;const e=o.length;for(let n=0;n<e;n++)t.reset(o[n]),this.emit("after-remove",t);y.release(t)}}if(n&&n.length){if(i){const t=[];for(const e of n){const n=i.ensureType(e);null==n&&null!=e||t.push(n)}n=t}const e=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=t===this.length;if(e||r){const i=y.acquire();i.target=this,i.cancellable=!0;const a=y.acquire();a.target=this,a.cancellable=!1;for(const l of n)e?(i.reset(l),this.emit("before-add",i),i.defaultPrevented||(o?s.push(l):s.splice(t++,0,l),this._set("length",s.length),r&&(a.reset(l),this.emit("after-add",a)))):(o?s.push(l):s.splice(t++,0,l),this._set("length",s.length),a.reset(l),this.emit("after-add",a));y.release(a),y.release(i)}else{if(o)for(const t of n)s.push(t);else s.splice(t,0,...n);this._set("length",s.length)}}return(n&&n.length||o&&o.length)&&this._notifyChangeEvent(n,o),o}_emitBeforeChanges(t){let e=!1;if(this.hasEventListener("before-changes")){const n=y.acquire();n.target=this,n.cancellable=!0,n.type=t,this.emit("before-changes",n),e=n.defaultPrevented,y.release(n)}return e}_emitAfterChanges(t){if(this.hasEventListener("after-changes")){const e=y.acquire();e.target=this,e.cancellable=!1,e.type=t,this.emit("after-changes",e),y.release(e)}this._observable.notify()}_notifyChangeEvent(t,e){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:t,removed:e})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const t=this._notifications;this._notifications=null;for(const e of t){const t=e.changes;P.clear(),C.clear(),R.clear();for(const{added:e,removed:n}of t){if(e)if(0===R.size&&0===C.size)for(const t of e)P.add(t);else for(const t of e)C.has(t)?(R.add(t),C.delete(t)):R.has(t)||P.add(t);if(n)if(0===R.size&&0===P.size)for(const t of n)C.add(t);else for(const t of n)P.has(t)?P.delete(t):(R.delete(t),C.add(t))}const n=r.Z.acquire();P.forEach((t=>{n.push(t)}));const s=r.Z.acquire();C.forEach((t=>{s.push(t)}));const i=this._items,o=e.items,a=r.Z.acquire();if(R.forEach((t=>{o.indexOf(t)!==i.indexOf(t)&&a.push(t)})),e.listeners&&(n.length||s.length||a.length)){const t={target:this,added:n,removed:s,moved:a},i=e.listeners.length;for(let n=0;n<i;n++){const s=e.listeners[n];s.removed||s.callback.call(this,t)}}r.Z.release(n),r.Z.release(s),r.Z.release(a)}P.clear(),C.clear(),R.clear()}};O.ofType=t=>{if(!t)return c;if(E.has(t))return E.get(t);let e=null;if("function"==typeof t)e=t.prototype.declaredClass;else if(t.base)e=t.base.prototype.declaredClass;else for(const n in t.typeMap){const s=t.typeMap[n].prototype.declaredClass;e?e+=` | ${s}`:e=s}let n=class extends c{};return(0,i._)([(0,p.c)({Type:t,ensureType:"function"==typeof t?(0,d.se)(t):(0,d.N7)(t)})],n.prototype,"itemType",void 0),n=(0,i._)([(0,_.j)(`esri.core.Collection<${e}>`)],n),E.set(t,n),n},(0,i._)([(0,f.Cb)()],O.prototype,"length",void 0),(0,i._)([(0,f.Cb)()],O.prototype,"items",null),O=c=(0,i._)([(0,_.j)("esri.core.Collection")],O);const B=O},3920:(t,e,n)=>{n.d(e,{p:()=>h,r:()=>c});var s=n(43697),i=n(92036),r=n(61247),o=n(5600),a=n(52011),l=n(72762);const h=t=>{let e=class extends t{constructor(){super(...arguments),this._handles=new r.Z,this._updatingHandles=new l.t}destroy(){this.destroyed||(this._handles.destroy(),this._updatingHandles.destroy())}get handles(){return this._handles}get updatingHandles(){return this._updatingHandles}};return(0,s._)([(0,o.Cb)({readOnly:!0})],e.prototype,"handles",null),(0,s._)([(0,o.Cb)({readOnly:!0})],e.prototype,"updatingHandles",null),e=(0,s._)([(0,a.j)("esri.core.HandleOwner")],e),e};let c=class extends(h(i.Z)){};c=(0,s._)([(0,a.j)("esri.core.HandleOwner")],c)},52421:(t,e,n)=>{function s(t){return(e,n)=>{e[n]=t}}n.d(e,{c:()=>s})},70921:(t,e,n)=>{n.d(e,{R:()=>r,Z:()=>i});var s=n(46791);function i(t,e,n=s.Z){return e||(e=new n),e===t||(e.removeAll(),(i=t)&&(Array.isArray(i)||"items"in i&&Array.isArray(i.items))?e.addMany(t):t&&e.add(t)),e;var i}function r(t){return t}},24133:(t,e,n)=>{n.d(e,{Q:()=>a});var s=n(67676),i=n(70586),r=n(44553),o=n(88764);class a{constructor(t=9,e){this._compareMinX=u,this._compareMinY=d,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),v.prune(),b.prune(),M.prune(),w.prune()}all(t){this._all(this._data,t)}search(t,e){let n=this._data;const s=this._toBBox;if(y(t,n))for(v.clear();n;){for(let i=0,r=n.children.length;i<r;i++){const r=n.children[i],o=n.leaf?s(r):r;y(t,o)&&(n.leaf?e(r):g(t,o)?this._all(r,e):v.push(r))}n=v.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!y(t,e))return!1;for(v.clear();e;){for(let s=0,i=e.children.length;s<i;s++){const i=e.children[s],r=e.leaf?n(i):i;if(y(t,r)){if(e.leaf||g(t,r))return!0;v.push(i)}}e=v.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new R([]),this}remove(t){if(!t)return this;let e,n=this._data,r=null,o=0,a=!1;const l=this._toBBox(t);for(M.clear(),w.clear();n||M.length>0;){if(n||(n=(0,i.j0)(M.pop()),r=M.data[M.length-1],o=w.pop()??0,a=!0),n.leaf&&(e=(0,s.cq)(n.children,t,n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),M.push(n),this._condense(M),this;a||n.leaf||!g(n,l)?r?(o++,n=r.children[o],a=!1):n=null:(M.push(n),w.push(o),o=0,r=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let n=t;for(b.clear();n;){if(!0===n.leaf)for(const t of n.children)e(t);else b.pushArray(n.children);n=b.pop()??null}}_build(t,e,n,s){const i=n-e+1;let r=this._maxEntries;if(i<=r){const s=new R(t.slice(e,n+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(i)/Math.log(r)),r=Math.ceil(i/r**(s-1)));const o=new E([]);o.height=s;const a=Math.ceil(i/r),h=a*Math.ceil(Math.sqrt(r));x(t,e,n,h,this._compareMinX);for(let i=e;i<=n;i+=h){const e=Math.min(i+h-1,n);x(t,i,e,a,this._compareMinY);for(let n=i;n<=e;n+=a){const i=Math.min(n+a-1,e);o.children.push(this._build(t,n,i,s-1))}}return l(o,this._toBBox),o}_chooseSubtree(t,e,n,s){for(;s.push(e),!0!==e.leaf&&s.length-1!==n;){let n,s=1/0,i=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=m(o),l=p(t,o)-a;l<i?(i=l,s=a<s?a:s,n=o):l===i&&a<s&&(s=a,n=o)}e=n||e.children[0]}return e}_insert(t,e,n){const s=this._toBBox,i=n?t:s(t);M.clear();const r=this._chooseSubtree(i,this._data,e,M);for(r.children.push(t),c(r,i);e>=0&&M.data[e].children.length>this._maxEntries;)this._split(M,e),e--;this._adjustParentBBoxes(i,M,e)}_split(t,e){const n=t.data[e],s=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,s);const r=this._chooseSplitIndex(n,i,s);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=n.children.splice(r,n.children.length-r),a=n.leaf?new R(o):new E(o);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),e?t.data[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this._data=new E([t,e]),this._data.height=t.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let s,i,r;s=i=1/0;for(let o=e;o<=n-e;o++){const e=h(t,0,o,this._toBBox),a=h(t,o,n,this._toBBox),l=_(e,a),c=m(e)+m(a);l<s?(s=l,r=o,i=c<i?c:i):l===s&&c<i&&(i=c,r=o)}return r}_chooseSplitAxis(t,e,n){const s=t.leaf?this._compareMinX:u,i=t.leaf?this._compareMinY:d;this._allDistMargin(t,e,n,s)<this._allDistMargin(t,e,n,i)&&t.children.sort(s)}_allDistMargin(t,e,n,s){t.children.sort(s);const i=this._toBBox,r=h(t,0,e,i),o=h(t,n-e,n,i);let a=f(r)+f(o);for(let s=e;s<n-e;s++){const e=t.children[s];c(r,t.leaf?i(e):e),a+=f(r)}for(let s=n-e-1;s>=e;s--){const e=t.children[s];c(o,t.leaf?i(e):e),a+=f(o)}return a}_adjustParentBBoxes(t,e,n){for(let s=n;s>=0;s--)c(e.data[s],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const n=t.data[e];if(0===n.children.length)if(e>0){const i=t.data[e-1],r=i.children;r.splice((0,s.cq)(r,n,r.length,i.indexHint),1)}else this.clear();else l(n,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function l(t,e){h(t,0,t.children.length,e,t)}function h(t,e,n,s,i){i||(i=new R([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let r,o=e;o<n;o++)r=t.children[o],c(i,t.leaf?s(r):r);return i}function c(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function u(t,e){return t.minX-e.minX}function d(t,e){return t.minY-e.minY}function m(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function _(t,e){const n=Math.max(t.minX,e.minX),s=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,r-s)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function y(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function x(t,e,n,s,r){const a=[e,n];for(;a.length;){const e=(0,i.j0)(a.pop()),n=(0,i.j0)(a.pop());if(e-n<=s)continue;const l=n+Math.ceil((e-n)/s/2)*s;(0,o.q)(t,l,n,e,r),a.push(n,l,l,e)}}const v=new r.Z,b=new r.Z,M=new r.Z,w=new r.Z({deallocator:void 0});class P{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class C extends P{constructor(){super(...arguments),this.height=1,this.indexHint=new s.SO}}class R extends C{constructor(t){super(),this.children=t,this.leaf=!0}}class E extends C{constructor(t){super(),this.children=t,this.leaf=!1}}},17445:(t,e,n)=>{n.d(e,{N1:()=>d,YP:()=>l,Z_:()=>p,gx:()=>h,nn:()=>_,on:()=>u,tX:()=>g});var s=n(91460),i=n(50758),r=n(70586),o=n(95330),a=n(26258);function l(t,e,n={}){return c(t,e,n,m)}function h(t,e,n={}){return c(t,e,n,f)}function c(t,e,n={},s){let i=null;const o=n.once?(t,n)=>{s(t)&&((0,r.hw)(i),e(t,n))}:(t,n)=>{s(t)&&e(t,n)};if(i=(0,a.aQ)(t,o,n.sync,n.equals),n.initial){const e=t();o(e,e)}return i}function u(t,e,n,o={}){let a=null,h=null,c=null;function u(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(t){o.once&&o.once&&(0,r.hw)(c),n(t)}const m=l(t,((t,n)=>{u(),(0,s.vT)(t)&&(a=t,h=(0,s.on)(t,e,d),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return c=(0,i.kB)((()=>{m.remove(),u()})),c}function d(t,e){return function(t,e,n){if((0,o.Hc)(n))return Promise.reject((0,o.zE)());const s=t();if(e?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((s,r)=>{a=(0,i.AL)([(0,o.fu)(n,(()=>{l(),r((0,o.zE)())})),c(t,(t=>{l(),s(t)}),{sync:!1,once:!0},e??m)])}))}(t,f,e)}function m(t){return!0}function f(t){return!!t}n(87538);const p={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},72762:(t,e,n)=>{n.d(e,{t:()=>u});var s=n(43697),i=n(92036),r=n(61247),o=n(50758),a=n(17445),l=n(1654),h=n(5600),c=n(52011);let u=class extends i.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new r.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(t,e,n={}){return this._installWatch(t,e,n,a.YP)}addWhen(t,e,n={}){return this._installWatch(t,e,n,a.gx)}addOnCollectionChange(t,e,{initial:n=!1,final:s=!1}={}){const i=++this._handleId;return this._handles.add([(0,a.on)(t,"after-changes",this._createSyncUpdatingCallback(),a.Z_),(0,a.on)(t,"change",e,{onListenerAdd:n?t=>e({added:t.toArray(),removed:[]}):void 0,onListenerRemove:s?t=>e({added:[],removed:t.toArray()}):void 0})],i),(0,o.kB)((()=>this._handles.remove(i)))}addPromise(t){if(null==t)return t;const e=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(t)&&(0!==this._pendingPromises.size||this._handles.has(d)||this._set("updating",!1))}},e),this._pendingPromises.add(t),this._set("updating",!0);const n=()=>this._handles.remove(e);return t.then(n,n),t}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(t,e,n={},s){const i=++this._handleId;n.sync||this._installSyncUpdatingWatch(t,i);const r=s(t,e,n);return this._handles.add(r,i),(0,o.kB)((()=>this._handles.remove(i)))}_installSyncUpdatingWatch(t,e){const n=this._createSyncUpdatingCallback(),s=(0,a.YP)(t,n,{sync:!0,equals:()=>!1});return this._handles.add(s,e),s}_createSyncUpdatingCallback(){return()=>{this._handles.remove(d),++this._scheduleHandleId;const t=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,l.Os)((()=>{t===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(d))})),d)}}};(0,s._)([(0,h.Cb)({readOnly:!0})],u.prototype,"updating",void 0),u=(0,s._)([(0,c.j)("esri.core.support.WatchUpdatingTracking")],u);const d=-42},35463:(t,e,n)=>{n.d(e,{JE:()=>o,Nm:()=>r,rJ:()=>a}),n(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},i={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function r(t,e,n){const s=new Date(t.getTime());if(e&&n){const t=i[n],{getter:r,setter:o,multiplier:a}=t;if("months"===n){const t=function(t,e){const n=new Date(t,e+1,1);return n.setDate(0),n.getDate()}(s.getFullYear(),s.getMonth()+e);s.getDate()>t&&s.setDate(t)}s[o](s[r]()+e*a)}return s}function o(t,e){switch(e){case"milliseconds":return new Date(t.getTime());case"seconds":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds());case"minutes":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes());case"hours":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours());case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate());case"weeks":return new Date(t.getFullYear(),t.getMonth(),t.getDate()-t.getDay());case"months":return new Date(t.getFullYear(),t.getMonth(),1);case"years":return new Date(t.getFullYear(),0,1);case"decades":return new Date(t.getFullYear()-t.getFullYear()%10,0,1);case"centuries":return new Date(t.getFullYear()-t.getFullYear()%100,0,1);default:return new Date}}function a(t,e,n){return 0===t?0:t*s[e]/s[n]}},41123:(t,e,n)=>{n.d(e,{D:()=>i,z:()=>r});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=e=>t[e].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}function r(){return`{${i()}}`}},73913:(t,e,n)=>{n.d(e,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>h});var s=n(58901),i=n(82971),r=n(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new s.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new s.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const n=h(t);for(const t of n)for(const n of t)n[0]+=e;return t}function h(t){return(0,r.oU)(t)?t.rings:t.paths}},57765:(t,e,n)=>{n.r(e),n.d(e,{default:()=>ie});var s=n(43697),i=n(46791),r=n(20102),o=n(92604),a=n(16453),l=n(5600),h=n(90578),c=(n(67676),n(80442),n(71715)),u=n(52011),d=n(30556),m=n(87085),f=n(71612),p=n(38009),_=n(72965),g=n(3172),y=n(81271),x=n(41123),v=(n(75215),n(10699)),b=n(96674),M=n(83379),w=n(92036),P=n(21787),C=n(46521),R=n(4307),E=n(17896);const I=(0,n(65617).c)(),O=(0,C.c)(),B=(0,C.c)(),S=(0,C.c)();function A(t,e,n){return(0,E.s)(I,e[0],e[1],1),(0,E.t)(I,I,(0,P.t)(O,n)),0===I[2]?(0,R.s)(t,I[0],I[1]):(0,R.s)(t,I[0]/I[2],I[1]/I[2])}function Z(t,e,n){return T(B,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]),T(S,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,P.m)(t,(0,P.a)(B,B),S),0!==t[8]&&(t[0]/=t[8],t[1]/=t[8],t[2]/=t[8],t[3]/=t[8],t[4]/=t[8],t[5]/=t[8],t[6]/=t[8],t[7]/=t[8],t[8]/=t[8]),t}function T(t,e,n,s,i,r,o,a,l){(0,P.s)(t,e,s,r,n,i,o,1,1,1),(0,E.s)(I,a,l,1),(0,P.a)(O,t);const[h,c,u]=(0,E.t)(I,I,(0,P.t)(O,O));return(0,P.s)(O,h,0,0,0,c,0,0,0,u),(0,P.m)(t,O,t)}var j=n(62357),D=n(97323),L=n(94139),Y=n(38913),X=n(44547),V=n(82971),N=n(2368);let q=class extends N.j{projectOrWarn(t,e){if(null==t)return t;const{geometry:n,pending:s}=(0,X.dz)(t,e);return s?null:s||n?n:(o.Z.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:t,sourceSpatialReference:t.spatialReference,targetSpatialReference:e}),null)}};q=(0,s._)([(0,u.j)("esri.layers.support.GeoreferenceBase")],q);const z=q,H=(0,C.c)(),F=(0,D.a)();let W=class extends w.Z{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,s._)([(0,l.Cb)()],W.prototype,"sourcePoint",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],W.prototype,"mapPoint",void 0),W=(0,s._)([(0,u.j)("esri.layers.support.ControlPoint")],W);let U=class extends((0,b.eC)(z)){constructor(t){super(t),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(t,e){const n=V.Z.fromJSON(e.spatialReference),s=(0,C.f)(...e.coefficients,1);return t.map((t=>((0,R.s)(F,t.x,t.y),A(F,F,s),{sourcePoint:t,mapPoint:new L.Z({x:F[0],y:F[1],spatialReference:n})})))}writeControlPoints(t,e,n,s){if(null!=this.transform)null!=t&&k(t[0])&&(e.controlPoints=t.map((t=>{const e=t.sourcePoint;return{x:e.x,y:e.y}})),e.spatialReference=t[0].mapPoint.spatialReference.toJSON(),e.coefficients=this.transform.slice(0,8));else{const t=new r.Z("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration.",{layer:s?.layer,georeference:this});s?.messages?s.messages.push(t):o.Z.getLogger(this).error(t.name,t.message)}}get coords(){if(null==this.controlPoints)return null;const t=this._updateTransform(H);if(null==t||!k(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return function(t,e,n,s){const i=(0,D.f)(0,n),r=(0,D.f)(0,0),o=(0,D.f)(e,0),a=(0,D.f)(e,n);return A(i,i,t),A(r,r,t),A(o,o,t),A(a,a,t),new Y.Z({rings:[[i,r,o,a,i]],spatialReference:s})}(t,this.width,this.height,e)}set coords(t){if(null==this.controlPoints||!k(this.controlPoints[0]))return;const e=this.controlPoints[0].mapPoint.spatialReference;if(null==(t=this.projectOrWarn(t,e)))return;const{width:n,height:s}=this,{rings:[[i,r,o,a]]}=t,l={sourcePoint:(0,j.vW)(0,s),mapPoint:new L.Z({x:i[0],y:i[1],spatialReference:e})},h={sourcePoint:(0,j.vW)(0,0),mapPoint:new L.Z({x:r[0],y:r[1],spatialReference:e})},c={sourcePoint:(0,j.vW)(n,0),mapPoint:new L.Z({x:o[0],y:o[1],spatialReference:e})},u={sourcePoint:(0,j.vW)(n,s),mapPoint:new L.Z({x:a[0],y:a[1],spatialReference:e})};k(l)&&k(h)&&k(c)&&k(u)&&(rt(H,l,h,c,u),this.controlPoints=this.controlPoints.map((({sourcePoint:t})=>((0,R.s)(F,t.x,t.y),A(F,F,H),{sourcePoint:t,mapPoint:new L.Z({x:F[0],y:F[1],spatialReference:e})}))))}get inverseTransform(){return null==this.transform?null:(0,P.e)((0,C.c)(),this.transform)}get transform(){return this._updateTransform()}toMap(t){if(null==t||null==this.transform||null==this.controlPoints||!k(this.controlPoints[0]))return null;(0,R.s)(F,t.x,t.y);const e=this.controlPoints[0].mapPoint.spatialReference;return A(F,F,this.transform),new L.Z({x:F[0],y:F[1],spatialReference:e})}toSource(t){if(null==t||null==this.inverseTransform||null==this.controlPoints||!k(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return t=t.normalize(),null==(t=(0,X.dz)(t,e).geometry)?null:((0,R.s)(F,t.x,t.y),A(F,F,this.inverseTransform),(0,j.vW)(F[0],F[1]))}_updateTransform(t){const{controlPoints:e,width:n,height:s}=this;if(!(null!=e&&n>0&&s>0))return null;const[i,r,o,a]=e;if(!k(i))return null;const l=i.mapPoint.spatialReference,h=this._projectControlPoint(r,l),c=this._projectControlPoint(o,l),u=this._projectControlPoint(a,l);if(!h.valid||!c.valid||!u.valid)return null;if(!k(h.controlPoint))return null;null==t&&(t=(0,C.c)());let d=null;return d=k(c.controlPoint)&&k(u.controlPoint)?rt(t,i,h.controlPoint,c.controlPoint,u.controlPoint):k(c.controlPoint)?function(t,e,n,s){return it(J,K,e),it(G,tt,n),it($,et,s),(0,R.l)(Q,J,G,.5),(0,R.r)(Q,$,Q,Math.PI),(0,R.l)(nt,K,tt,.5),(0,R.r)(nt,et,nt,Math.PI),ht(t,J,G,$,Q,K,tt,et,nt)}(t,i,h.controlPoint,c.controlPoint):function(t,e,n){return it(J,K,e),it(G,tt,n),(0,R.r)($,G,J,st),(0,R.r)(Q,J,G,st),(0,R.r)(et,tt,K,-st),(0,R.r)(nt,K,tt,-st),ht(t,J,G,$,Q,K,tt,et,nt)}(t,i,h.controlPoint),d.every((t=>0===t))?null:d}_projectControlPoint(t,e){if(!k(t))return{valid:!0,controlPoint:t};const{sourcePoint:n,mapPoint:s}=t,{geometry:i,pending:r}=(0,X.dz)(s,e);return r?{valid:!1,controlPoint:null}:r||i?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:i}}:(o.Z.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:t,sourceSpatialReference:s.spatialReference,targetSpatialReference:e}),{valid:!1,controlPoint:null})}};function k(t){return null!=t&&null!=t.sourcePoint&&null!=t.mapPoint}(0,s._)([(0,l.Cb)({type:[W],json:{write:{allowNull:!1,isRequired:!0}}})],U.prototype,"controlPoints",void 0),(0,s._)([(0,c.r)("controlPoints")],U.prototype,"readControlPoints",null),(0,s._)([(0,d.c)("controlPoints")],U.prototype,"writeControlPoints",null),(0,s._)([(0,l.Cb)()],U.prototype,"coords",null),(0,s._)([(0,l.Cb)({json:{write:!0}})],U.prototype,"height",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],U.prototype,"inverseTransform",null),(0,s._)([(0,l.Cb)({readOnly:!0})],U.prototype,"transform",null),(0,s._)([(0,l.Cb)({json:{write:!0}})],U.prototype,"width",void 0),U=(0,s._)([(0,u.j)("esri.layers.support.ControlPointsGeoreference")],U);const J=(0,D.a)(),G=(0,D.a)(),$=(0,D.a)(),Q=(0,D.a)(),K=(0,D.a)(),tt=(0,D.a)(),et=(0,D.a)(),nt=(0,D.a)(),st=Math.PI/2;function it(t,e,n){(0,R.s)(t,n.sourcePoint.x,n.sourcePoint.y),(0,R.s)(e,n.mapPoint.x,n.mapPoint.y)}function rt(t,e,n,s,i){return it(J,K,e),it(G,tt,n),it($,et,s),it(Q,nt,i),ht(t,J,G,$,Q,K,tt,et,nt)}const ot=new Array(8).fill(0),at=new Array(8).fill(0);function lt(t,e,n,s,i){return t[0]=e[0],t[1]=e[1],t[2]=n[0],t[3]=n[1],t[4]=s[0],t[5]=s[1],t[6]=i[0],t[7]=i[1],t}function ht(t,e,n,s,i,r,o,a,l){return Z(t,lt(ot,e,n,s,i),lt(at,r,o,a,l))}const ct=U;let ut=class extends z{constructor(t){super(t),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:t,topRight:e,bottomLeft:n,bottomRight:s}=this;if(null==t||null==e||null==n||null==s)return null;const i=t.spatialReference;return e=this.projectOrWarn(e,i),n=this.projectOrWarn(n,i),s=this.projectOrWarn(s,i),null==e||null==n||null==s?null:new Y.Z({rings:[[[n.x,n.y],[t.x,t.y],[e.x,e.y],[s.x,s.y],[n.x,n.y]]],spatialReference:i})}set coords(t){const{topLeft:e}=this;if(null==e)return;const n=e.spatialReference;if(null==(t=this.projectOrWarn(t,n)))return;const{rings:[[s,i,r,o]]}=t;this.bottomLeft=new L.Z({x:s[0],y:s[1],spatialReference:n}),this.topLeft=new L.Z({x:i[0],y:i[1],spatialReference:n}),this.topRight=new L.Z({x:r[0],y:r[1],spatialReference:n}),this.bottomRight=new L.Z({x:o[0],y:o[1],spatialReference:n})}};(0,s._)([(0,l.Cb)()],ut.prototype,"coords",null),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"bottomLeft",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"bottomRight",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"topLeft",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"topRight",void 0),ut=(0,s._)([(0,u.j)("esri.layers.support.CornersGeoreference")],ut);const dt=ut;var mt=n(22021),ft=n(46851),pt=n(6570);let _t=class extends z{constructor(t){super(t),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:t,ymin:e,xmax:n,ymax:s,spatialReference:i}=this.extent;let r;if(this.rotation){const{x:i,y:o}=this.extent.center,a=gt(i,o,this.rotation);r=[a(t,e),a(t,s),a(n,s),a(n,e)],r.push(r[0])}else r=[[t,e],[t,s],[n,s],[n,e],[t,e]];return new Y.Z({rings:[r],spatialReference:i})}set coords(t){if(null==t||null==this.extent)return;const e=this.extent.spatialReference;if(null==(t=this.projectOrWarn(t,e))||null==t.extent)return;const{rings:[[n,s,i]],extent:{center:{x:r,y:o}}}=t,a=(0,mt.BV)(Math.PI/2-Math.atan2(s[1]-n[1],s[0]-n[0])),l=gt(r,o,-a),[h,c]=l(n[0],n[1]),[u,d]=l(i[0],i[1]);this.extent=new pt.Z({xmin:h,ymin:c,xmax:u,ymax:d,spatialReference:e}),this.rotation=a}};function gt(t,e,n){const s=(0,ft.t)(n),i=Math.cos(s),r=Math.sin(s);return(n,s)=>[i*(n-t)+r*(s-e)+t,i*(s-e)-r*(n-t)+e]}(0,s._)([(0,l.Cb)()],_t.prototype,"coords",null),(0,s._)([(0,l.Cb)({type:pt.Z})],_t.prototype,"extent",void 0),(0,s._)([(0,l.Cb)({type:Number})],_t.prototype,"rotation",void 0),_t=(0,s._)([(0,u.j)("esri.layers.support.ExtentAndRotationGeoreference")],_t);const yt={key:"type",base:z,typeMap:{"control-points":ct,corners:dt,"extent-and-rotation":_t}};let xt=class extends((0,v.iv)((0,b.eC)(M.Z))){constructor(t){super(t),this.georeference=null,this.opacity=1}readGeoreference(t){return ct.fromJSON(t)}};(0,s._)([(0,l.Cb)({types:yt,json:{write:!0}})],xt.prototype,"georeference",void 0),(0,s._)([(0,c.r)("georeference")],xt.prototype,"readGeoreference",null),(0,s._)([(0,l.Cb)()],xt.prototype,"opacity",void 0),xt=(0,s._)([(0,u.j)("esri.layers.support.MediaElementBase")],xt);const vt=xt;var bt=n(66094),Mt=n(25929);let wt=class extends vt{constructor(t){super(t),this.content=null,this.image=null,this.type="image",this.image=null}load(){const t=this.image;if("string"==typeof t){const e=(0,g.default)(t,{responseType:"image"}).then((({data:t})=>{this._set("content",t)}));this.addResolvingPromise(e)}else if(t instanceof HTMLImageElement){const e=t.decode().then((()=>{this._set("content",t)}));this.addResolvingPromise(e)}else t?this._set("content",t):this.addResolvingPromise(Promise.reject(new r.Z("image-element:invalid-image-type","Invalid image type",{image:t})));return Promise.resolve(this)}readImage(t,e,n){return(0,Mt.f)(e.url,n)}writeImage(t,e,n,s){if(null==t)return;const i=s?.portalItem,r=s?.resources;if(!i||!r)return void("string"==typeof t&&(e[n]=(0,Mt.t)(t,s)));const o="string"!=typeof t||(0,y.HK)(t)||(0,y.jc)(t)?null:t;if(o){if(null==(0,Mt.i)(o))return void(e[n]=o);const t=(0,Mt.t)(o,{...s,verifyItemRelativeUrls:s&&s.verifyItemRelativeUrls?{writtenUrls:s.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},Mt.M.NO);if(i&&t&&!(0,y.YP)(t))return r.toKeep.push({resource:i.resourceFromPath(t),compress:!1}),void(e[n]=t)}e[n]="<pending>",r.pendingOperations.push(Ct(t).then((t=>{const s=function(t,e){const n=(0,x.D)(),s=`${(0,y.v_)("media",n)}.${(0,bt.B)(t)}`;return e.resourceFromPath(s)}(t,i);e[n]=s.itemRelativeUrl,r.toAdd.push({resource:s,content:t,compress:!1,finish:t=>{this.image=t.url}})})))}};(0,s._)([(0,l.Cb)({readOnly:!0})],wt.prototype,"content",void 0),(0,s._)([(0,l.Cb)({json:{name:"url",type:String}})],wt.prototype,"image",void 0),(0,s._)([(0,c.r)("image",["url"])],wt.prototype,"readImage",null),(0,s._)([(0,d.c)("image")],wt.prototype,"writeImage",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{name:"mediaType"}})],wt.prototype,"type",void 0),wt=(0,s._)([(0,u.j)("esri.layers.support.ImageElement")],wt);const Pt=wt;async function Ct(t){if("string"==typeof t){if((0,y.jc)(t)){const{data:e}=await(0,g.default)(t,{responseType:"blob"});return e}return(0,y.HK)(t)?(0,y.fw)(t):Ct((await(0,g.default)(t,{responseType:"image"})).data)}return new Promise((e=>function(t){if(t instanceof HTMLCanvasElement)return t;const e=t instanceof HTMLImageElement?t.naturalWidth:t.width,n=t instanceof HTMLImageElement?t.naturalHeight:t.height,s=document.createElement("canvas"),i=s.getContext("2d");return s.width=e,s.height=n,t instanceof HTMLImageElement?i.drawImage(t,0,0,t.width,t.height):t instanceof ImageData&&i.putImageData(t,0,0),s}(t).toBlob(e)))}n(66577);var Rt=n(70921),Et=n(32448),It=n(3920),Ot=n(609),Bt=n(95330),St=n(17445),At=n(24470),Zt=n(87416),Tt=n(8744),jt=n(37549),Dt=n(20322),Lt=n(86662),Yt=n(33955),Xt=n(73913);function Vt(t,e){if(!e)return t;const n=function(t,e){const n=[],{ymin:s,ymax:i,xmin:r,xmax:o}=t,a=t.xmax-t.xmin,[l,h]=e.valid,{x:c,frameId:u}=qt(t.xmin,e),{x:d,frameId:m}=qt(t.xmax,e),f=c===d&&a>0;if(a>2*h){const t={xmin:r<o?c:d,ymin:s,xmax:h,ymax:i},e={xmin:l,ymin:s,xmax:r<o?d:c,ymax:i},a={xmin:0,ymin:s,xmax:h,ymax:i},f={xmin:l,ymin:s,xmax:0,ymax:i},p=[],_=[];zt(t,a)&&p.push(u),zt(t,f)&&_.push(u),zt(e,a)&&p.push(m),zt(e,f)&&_.push(m);for(let t=u+1;t<m;t++)p.push(t),_.push(t);n.push(new Wt(t,[u]),new Wt(e,[m]),new Wt(a,p),new Wt(f,_))}else c>d||f?n.push(new Wt({xmin:c,ymin:s,xmax:h,ymax:i},[u]),new Wt({xmin:l,ymin:s,xmax:d,ymax:i},[m])):n.push(new Wt({xmin:c,ymin:s,xmax:d,ymax:i},[u]));return n}(t,e).map((t=>t.extent));return n.length<2?n[0]||t:n.length>2?(t.xmin=e.valid[0],t.xmax=e.valid[1],t):{rings:n.map((t=>[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]))}}function Nt(t,e,n){if(Array.isArray(t)){const s=t[0];if(s>e){const n=(0,Xt.XZ)(s,e);t[0]=s+n*(-2*e)}else if(s<n){const e=(0,Xt.XZ)(s,n);t[0]=s+e*(-2*n)}}else{const s=t.x;if(s>e){const n=(0,Xt.XZ)(s,e);t.x+=n*(-2*e)}else if(s<n){const e=(0,Xt.XZ)(s,n);t.x+=e*(-2*n)}}return t}function qt(t,e){const[n,s]=e.valid,i=2*s;let r,o=0;return t>s?(r=Math.ceil(Math.abs(t-s)/i),t-=r*i,o=r):t<n&&(r=Math.ceil(Math.abs(t-n)/i),t+=r*i,o=-r),{x:t,frameId:o}}function zt(t,e){const{xmin:n,ymin:s,xmax:i,ymax:r}=e;return Ht(t,n,s)&&Ht(t,n,r)&&Ht(t,i,r)&&Ht(t,i,s)}function Ht(t,e,n){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax}function Ft(t,e,n=!0){const s=!(0,Yt.l9)(t);if(s&&(0,Lt.Zy)(t),n)return(new kt).cut(t,e);const i=s?t.rings:t.paths,r=s?4:2,o=i.length,a=-2*e;for(let t=0;t<o;t++){const e=i[t];if(e&&e.length>=r){const t=[];for(const n of e)t.push([n[0]+a,n[1]]);i.push(t)}}return s?t.rings=i:t.paths=i,t}class Wt{constructor(t,e){this.extent=t,this.frameIds=e}}const Ut=(0,At.Ue)();class kt{constructor(){this._linesIn=[],this._linesOut=[]}cut(t,e){let n;if(this._xCut=e,t.rings)this._closed=!0,n=t.rings,this._minPts=4;else{if(!t.paths)return null;this._closed=!1,n=t.paths,this._minPts=2}for(const t of n){if(!t||t.length<this._minPts)continue;let e=!0;for(const n of t)e?(this.moveTo(n),e=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const t of this._linesIn)t&&t.length>=this._minPts&&n.push(t);const s=-2*this._xCut;for(const t of this._linesOut)if(t&&t.length>=this._minPts){for(const e of t)e[0]+=s;n.push(t)}return this._closed?t.rings=n:t.paths=n,t}moveTo(t){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(t[0]),this._moveTo(t[0],t[1],this._prevSide),this._prevPt=t,this._firstPt=t}lineTo(t){const e=this._side(t[0]);if(e*this._prevSide==-1){const n=this._intersect(this._prevPt,t);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(t[0],t[1],e)}else this._lineTo(t[0],t[1],e);this._prevSide=e,this._prevPt=t}close(){const t=this._firstPt,e=this._prevPt;t[0]===e[0]&&t[1]===e[1]||this.lineTo(t),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(t,e,n){this._closed?(this._lineIn.push([n<=0?t:this._xCut,e]),this._lineOut.push([n>=0?t:this._xCut,e])):(n<=0&&this._lineIn.push([t,e]),n>=0&&this._lineOut.push([t,e]))}_lineTo(t,e,n){this._closed?(this._addPolyVertex(this._lineIn,n<=0?t:this._xCut,e),this._addPolyVertex(this._lineOut,n>=0?t:this._xCut,e)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([t,e])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([t,e])):this._prevSide<0?(this._lineIn.push([t,e]),this._lineOut.push([t,e])):this._prevSide>0&&(this._lineOut.push([t,e]),this._lineIn.push([t,e]))}_addPolyVertex(t,e,n){const s=t.length;s>1&&t[s-1][0]===e&&t[s-2][0]===e?t[s-1][1]=n:t.push([e,n])}_checkClosingPt(t){const e=t.length;e>3&&t[0][0]===this._xCut&&t[e-2][0]===this._xCut&&t[1][0]===this._xCut&&(t[0][1]=t[e-2][1],t.pop())}_side(t){return t<this._xCut?-1:t>this._xCut?1:0}_intersect(t,e){const n=(this._xCut-t[0])/(e[0]-t[0]);return t[1]+n*(e[1]-t[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}let Jt=class extends w.Z{constructor(t){super(t)}get bounds(){const t=this.coords;return null==t||null==t.extent?null:(0,At.oJ)(t.extent)}get coords(){const t=this.element.georeference?.coords;return(0,X.dz)(t,this.spatialReference).geometry}get normalizedCoords(){return Y.Z.fromJSON(function(t,e){if(null==t)return null;const n=t.spatialReference,s=(0,Tt.C5)(n),i="toJSON"in t?t.toJSON():t;if(!s)return i;const r=(0,Tt.sS)(n)?102100:4326,o=Xt.UZ[r].maxX,a=Xt.UZ[r].minX;if((0,Yt.wp)(i))return Nt(i,o,a);if((0,Yt.aW)(i))return i.points=i.points.map((t=>Nt(t,o,a))),i;if((0,Yt.YX)(i))return Vt(i,s);if((0,Yt.oU)(i)||(0,Yt.l9)(i)){const t=(0,Dt.$P)(Ut,i),n={xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]},s=(0,Xt.XZ)(n.xmin,a)*(2*o),r=0===s?i:(0,Xt.Sy)(i,s);return n.xmin+=s,n.xmax+=s,n.xmax>o?Ft(r,o,e):n.xmin<a?Ft(r,a,e):r}return i}(this.coords,!0))}get normalizedBounds(){const t=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=t?(0,At.oJ)(t):null}};(0,s._)([(0,l.Cb)()],Jt.prototype,"spatialReference",void 0),(0,s._)([(0,l.Cb)()],Jt.prototype,"element",void 0),(0,s._)([(0,l.Cb)()],Jt.prototype,"bounds",null),(0,s._)([(0,l.Cb)()],Jt.prototype,"coords",null),(0,s._)([(0,l.Cb)()],Jt.prototype,"normalizedCoords",null),(0,s._)([(0,l.Cb)()],Jt.prototype,"normalizedBounds",null),Jt=(0,s._)([(0,u.j)("esri.layers.support.MediaElementView")],Jt);let Gt=class extends vt{constructor(t){super(t),this.content=null,this.type="video"}load(){const t=this.video;if("string"==typeof t){const e=document.createElement("video");e.src=t,e.crossOrigin="anonymous",e.autoplay=!0,e.muted=!0,e.loop=!0,this.addResolvingPromise(this._loadVideo(e).then((()=>{this._set("content",e)})))}else t instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(t).then((()=>{this._set("content",t)}))):this.addResolvingPromise(Promise.reject(new r.Z("video-element:invalid-video-type","Invalid video type",{video:t})));return Promise.resolve(this)}set video(t){"not-loaded"===this.loadStatus?this._set("video",t):o.Z.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}_loadVideo(t){return new Promise(((e,n)=>{t.oncanplay=()=>{t.oncanplay=null,t.play().then(e,n)},"anonymous"!==t.crossOrigin&&(t.crossOrigin="anonymous",t.src=t.src)}))}};(0,s._)([(0,l.Cb)({readOnly:!0})],Gt.prototype,"content",void 0),(0,s._)([(0,l.Cb)()],Gt.prototype,"video",null),Gt=(0,s._)([(0,u.j)("esri.layers.support.VideoElement")],Gt);const $t=Gt,Qt={key:"type",defaultKeyValue:"image",base:vt,typeMap:{image:Pt,video:$t}},Kt=i.Z.ofType(Qt);let te=class extends(M.Z.LoadableMixin((0,Ot.v)((0,It.p)(Et.Z.EventedAccessor)))){constructor(t){super(t),this._index=new jt.H,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=t=>{for(const e of t.removed){const t=this._elementViewsMap.get(e);this._elementViewsMap.delete(e),this._index.delete(t),this.handles.remove(t),t.destroy(),this.notifyChange("fullExtent")}const{spatialReference:e}=this;for(const n of t.added){if(this._elementViewsMap.get(n))continue;const t=new Jt({spatialReference:e,element:n});this._elementViewsMap.set(n,t);const s=(0,St.YP)((()=>t.coords),(()=>this._updateIndexForElement(t,!1)));this._updateIndexForElement(t,!0),this.handles.add(s,t)}this._elementsIndexes.clear(),this.elements.forEach(((t,e)=>this._elementsIndexes.set(t,e))),this.emit("refresh")},this.elements=new Kt}async load(t){if((0,Bt.k_)(t),!this.spatialReference){const t=this.elements.find((t=>null!=t.georeference&&null!=t.georeference.coords));this._set("spatialReference",t?t.georeference.coords.spatialReference:V.Z.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.handles.add(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(t){this._set("elements",(0,Rt.Z)(t,this._get("elements"),Kt))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const t=this._index.fullBounds;return null==t?null:new pt.Z({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:this.spatialReference})}set spatialReference(t){"not-loaded"===this.loadStatus?this._set("spatialReference",t):o.Z.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(t,e){await this.load(),await(0,X.iQ)(t.spatialReference,this.spatialReference,null,e);const n=(0,Tt.fS)(t.spatialReference,this.spatialReference)?t:(0,X.iV)(t,this.spatialReference);if(!n)return[];const s=n.normalize(),i=[];for(const t of s)this._index.forEachInBounds((0,At.oJ)(t),(({normalizedCoords:e,element:n})=>{null!=e&&(0,Zt.Nl)(t,e)&&i.push(n)}));return i.sort(((t,e)=>this._elementsIndexes.get(t)-this._elementsIndexes.get(e))),i}_updateIndexForElement(t,e){const n=t.normalizedBounds,s=this._index.has(t),i=null!=n;this._index.delete(t),i&&this._index.set(t,n),this.notifyChange("fullExtent"),e||(s!==i?this.emit("refresh"):this.emit("change",{element:t.element}))}};(0,s._)([(0,l.Cb)()],te.prototype,"elements",null),(0,s._)([(0,l.Cb)({readOnly:!0})],te.prototype,"fullExtent",null),(0,s._)([(0,l.Cb)()],te.prototype,"spatialReference",null),te=(0,s._)([(0,u.j)("esri.layers.support.LocalMediaElementSource")],te);const ee=te;function ne(t){return"object"==typeof t&&null!=t&&"type"in t}let se=class extends((0,f.h)((0,_.M)((0,p.q)((0,a.R)(m.Z))))){constructor(t){super(t),this.effectiveSource=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this.source=new ee}load(t){const e=this.source;if(!e)return this.addResolvingPromise(Promise.reject(new r.Z("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer."))),Promise.resolve(this);const n=ne(e)?new ee({elements:new i.Z([e])}):e;this._set("effectiveSource",n),this.spatialReference&&(n.spatialReference=this.spatialReference);const s=n.load(t).then((()=>{this.spatialReference=n.spatialReference}));return this.addResolvingPromise(s),Promise.resolve(this)}destroy(){this.effectiveSource?.destroy(),this.source?.destroy()}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}set source(t){"not-loaded"===this.loadStatus?this._set("source",t):o.Z.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(t){return t?Array.isArray(t)?new ee({elements:new i.Z(t)}):t instanceof i.Z?new ee({elements:t}):t:null}readSource(t,e,n){const s="image"===e.mediaType?new Pt:"video"===e.mediaType?new $t:null;return s?.read(e,n),s}writeSource(t,e,n,s){t&&ne(t)&&"image"===t.type?t.write(e,s):s?.messages&&s?.messages?.push(new r.Z("media-layer:unsupported-source","source must be an 'ImageElement'"))}};(0,s._)([(0,l.Cb)({readOnly:!0})],se.prototype,"effectiveSource",void 0),(0,s._)([(0,l.Cb)({type:String})],se.prototype,"copyright",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],se.prototype,"fullExtent",null),(0,s._)([(0,l.Cb)({type:["MediaLayer"]})],se.prototype,"operationalLayerType",void 0),(0,s._)([(0,l.Cb)({type:["show","hide"]})],se.prototype,"listMode",void 0),(0,s._)([(0,l.Cb)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1}}})],se.prototype,"source",null),(0,s._)([(0,h.p)("source")],se.prototype,"castSource",null),(0,s._)([(0,c.r)("source",["url"])],se.prototype,"readSource",null),(0,s._)([(0,d.c)("source")],se.prototype,"writeSource",null),(0,s._)([(0,l.Cb)()],se.prototype,"spatialReference",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],se.prototype,"type",void 0),se=(0,s._)([(0,u.j)("esri.layers.MediaLayer")],se);const ie=se},37549:(t,e,n)=>{n.d(e,{H:()=>a});var s=n(80442),i=n(24133),r=n(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.Q(9,(0,s.Z)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((n,s)=>{t[e++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.cS)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,n){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,n)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},66094:(t,e,n)=>{n.d(e,{B:()=>i});var s=n(81271);function i(t){return r[function(t){return t instanceof Blob?t.type:function(t){const e=(0,s.Ml)(t);return l[e]||o}(t.url)}(t)]||a}const r={},o="text/plain",a=r[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const t in l)r[l[t]]=t}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4828,5732],{92835:(t,e,n)=>{n.d(e,{Z:()=>p});var s,i=n(43697),r=n(96674),o=n(70586),a=n(35463),l=n(5600),h=(n(75215),n(67676),n(80442),n(71715)),c=n(52011),u=n(30556);let d=s=class extends r.wq{static get allTime(){return m}static get empty(){return f}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?t.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?t.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=null!=this.start?this.start.getTime():this.start,n=null!=this.end?this.end.getTime():this.end,s=null!=t.start?t.start.getTime():t.start,i=null!=t.end?t.end.getTime():t.end;return e===s&&n===i}expandTo(t){if(this.isEmpty||this.isAllTime)return this.clone();const e=(0,o.yw)(this.start,(e=>(0,a.JE)(e,t))),n=(0,o.yw)(this.end,(e=>{const n=(0,a.JE)(e,t);return e.getTime()===n.getTime()?n:(0,a.Nm)(n,1,t)}));return new s({start:e,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return s.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,i=t.start?.getTime()??-1/0,r=t.end?.getTime()??1/0;let o,a;if(i>=e&&i<=n?o=i:e>=i&&e<=r&&(o=e),n>=i&&n<=r?a=n:r>=e&&r<=n&&(a=r),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const t=new s;return t.start=o===-1/0?null:new Date(o),t.end=a===1/0?null:new Date(a),t}return s.empty}offset(t,e){if(this.isEmpty||this.isAllTime)return this.clone();const n=new s,{start:i,end:r}=this;return null!=i&&(n.start=(0,a.Nm)(i,t,e)),null!=r&&(n.end=(0,a.Nm)(r,t,e)),n}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return m.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,n=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new s({start:e,end:n})}};(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,i._)([(0,h.r)("end")],d.prototype,"readEnd",null),(0,i._)([(0,u.c)("end")],d.prototype,"writeEnd",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,i._)([(0,h.r)("start")],d.prototype,"readStart",null),(0,i._)([(0,u.c)("start")],d.prototype,"writeStart",null),d=s=(0,i._)([(0,c.j)("esri.TimeExtent")],d);const m=new d,f=new d({start:void 0,end:void 0}),p=d},5732:(t,e,n)=>{n.d(e,{c:()=>s,g:()=>i});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},21787:(t,e,n)=>{n.d(e,{a:()=>l,b:()=>c,e:()=>a,f:()=>i,i:()=>d,m:()=>h,s:()=>r,t:()=>o});var s=n(46851);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function r(t,e,n,s,i,r,o,a,l,h){return t[0]=e,t[1]=n,t[2]=s,t[3]=i,t[4]=r,t[5]=o,t[6]=a,t[7]=l,t[8]=h,t}function o(t,e){if(t===e){const n=e[1],s=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=s,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=c*o-a*h,d=-c*r+a*l,m=h*r-o*l;let f=n*u+s*d+i*m;return f?(f=1/f,t[0]=u*f,t[1]=(-c*s+i*h)*f,t[2]=(a*s-i*o)*f,t[3]=d*f,t[4]=(c*n-i*l)*f,t[5]=(-a*n+i*r)*f,t[6]=m*f,t[7]=(-h*n+s*l)*f,t[8]=(o*n-s*r)*f,t):null}function l(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8];return t[0]=o*c-a*h,t[1]=i*h-s*c,t[2]=s*a-i*o,t[3]=a*l-r*c,t[4]=n*c-i*l,t[5]=i*r-n*a,t[6]=r*h-o*l,t[7]=s*l-n*h,t[8]=n*o-s*r,t}function h(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=n[0],m=n[1],f=n[2],p=n[3],_=n[4],g=n[5],y=n[6],x=n[7],v=n[8];return t[0]=d*s+m*o+f*h,t[1]=d*i+m*a+f*c,t[2]=d*r+m*l+f*u,t[3]=p*s+_*o+g*h,t[4]=p*i+_*a+g*c,t[5]=p*r+_*l+g*u,t[6]=y*s+x*o+v*h,t[7]=y*i+x*a+v*c,t[8]=y*r+x*l+v*u,t}function c(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],m=e[11],f=e[12],p=e[13],_=e[14],g=e[15],y=n*a-s*o,x=n*l-i*o,v=n*h-r*o,b=s*l-i*a,M=s*h-r*a,w=i*h-r*l,P=c*p-u*f,C=c*_-d*f,R=c*g-m*f,E=u*_-d*p,I=u*g-m*p,O=d*g-m*_;let B=y*O-x*I+v*E+b*R-M*C+w*P;return B?(B=1/B,t[0]=(a*O-l*I+h*E)*B,t[1]=(l*R-o*O-h*C)*B,t[2]=(o*I-a*R+h*P)*B,t[3]=(i*I-s*O-r*E)*B,t[4]=(n*O-i*R+r*C)*B,t[5]=(s*R-n*I-r*P)*B,t[6]=(p*w-_*M+g*b)*B,t[7]=(_*v-f*w-g*x)*B,t[8]=(f*M-p*v+g*y)*B,t):null}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function d(t){const e=(0,s.g)(),n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8];return Math.abs(1-(n*n+o*o+h*h))<=e&&Math.abs(1-(i*i+a*a+c*c))<=e&&Math.abs(1-(r*r+l*l+u*u))<=e}const m=h,f=u;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:l,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],n=t[1],s=t[2],i=t[3],r=t[4],o=t[5],a=t[6],l=t[7],h=t[8];return e*(h*r-o*l)+n*(-h*i+o*a)+s*(l*i-r*a)},equals:function(t,e){const n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8],d=e[0],m=e[1],f=e[2],p=e[3],_=e[4],g=e[5],y=e[6],x=e[7],v=e[8],b=(0,s.g)();return Math.abs(n-d)<=b*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-m)<=b*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(r-f)<=b*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-p)<=b*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-_)<=b*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(l-g)<=b*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(h-y)<=b*Math.max(1,Math.abs(h),Math.abs(y))&&Math.abs(c-x)<=b*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(u-v)<=b*Math.max(1,Math.abs(u),Math.abs(v))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:i,fromQuat:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=n+n,a=s+s,l=i+i,h=n*o,c=s*o,u=s*a,d=i*o,m=i*a,f=i*l,p=r*o,_=r*a,g=r*l;return t[0]=1-u-f,t[3]=c-g,t[6]=d+_,t[1]=c+g,t[4]=1-h-f,t[7]=m-p,t[2]=d-_,t[5]=m+p,t[8]=1-h-u,t},fromRotation:function(t,e){const n=Math.sin(e),s=Math.cos(e);return t[0]=s,t[1]=n,t[2]=0,t[3]=-n,t[4]=s,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:d,mul:m,multiply:h,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,s){return t[0]=e[0]+n[0]*s,t[1]=e[1]+n[1]*s,t[2]=e[2]+n[2]*s,t[3]=e[3]+n[3]*s,t[4]=e[4]+n[4]*s,t[5]=e[5]+n[5]*s,t[6]=e[6]+n[6]*s,t[7]=e[7]+n[7]*s,t[8]=e[8]+n[8]*s,t},normalFromMat4:c,normalFromMat4Legacy:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[4],o=e[5],a=e[6],l=e[8],h=e[9],c=e[10],u=c*o-a*h,d=-c*r+a*l,m=h*r-o*l,f=n*u+s*d+i*m;if(!f)return null;const p=1/f;return t[0]=u*p,t[1]=(-c*s+i*h)*p,t[2]=(a*s-i*o)*p,t[3]=d*p,t[4]=(c*n-i*l)*p,t[5]=(-a*n+i*r)*p,t[6]=m*p,t[7]=(-h*n+s*l)*p,t[8]=(o*n-s*r)*p,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=Math.sin(n),m=Math.cos(n);return t[0]=m*s+d*o,t[1]=m*i+d*a,t[2]=m*r+d*l,t[3]=m*o-d*s,t[4]=m*a-d*i,t[5]=m*l-d*r,t[6]=h,t[7]=c,t[8]=u,t},scale:function(t,e,n){const s=n[0],i=n[1],r=n[2];return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=r*e[6],t[7]=r*e[7],t[8]=r*e[8],t},scaleByVec2:function(t,e,n){const s=n[0],i=n[1];return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t},set:r,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:f,subtract:u,translate:function(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=n[0],m=n[1];return t[0]=s,t[1]=i,t[2]=r,t[3]=o,t[4]=a,t[5]=l,t[6]=d*s+m*o+h,t[7]=d*i+m*a+c,t[8]=d*r+m*l+u,t},transpose:o},Symbol.toStringTag,{value:"Module"}))},46521:(t,e,n)=>{function s(){return[1,0,0,0,1,0,0,0,1]}function i(t,e,n,s,i,r,o,a,l){return[t,e,n,s,i,r,o,a,l]}function r(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>r,c:()=>s,f:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:s,createView:r,fromValues:i},Symbol.toStringTag,{value:"Module"}))},88764:(t,e,n)=>{n.d(e,{q:()=>l});var s,i,r,o=n(5732),a={exports:{}};s=a,i=function(){function t(n,s,i,r,o){for(;r>i;){if(r-i>600){var a=r-i+1,l=s-i+1,h=Math.log(a),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);t(n,s,Math.max(i,Math.floor(s-l*c/a+u)),Math.min(r,Math.floor(s+(a-l)*c/a+u)),o)}var d=n[s],m=i,f=r;for(e(n,i,s),o(n[r],d)>0&&e(n,i,r);m<f;){for(e(n,m,f),m++,f--;o(n[m],d)<0;)m++;for(;o(n[f],d)>0;)f--}0===o(n[i],d)?e(n,i,f):e(n,++f,r),f<=s&&(i=f+1),s<=f&&(r=f-1)}}function e(t,e,n){var s=t[e];t[e]=t[n],t[n]=s}function n(t,e){return t<e?-1:t>e?1:0}return function(e,s,i,r,o){t(e,s,i||0,r||e.length-1,o||n)}},void 0!==(r=i())&&(s.exports=r);const l=(0,o.g)(a.exports)},4307:(t,e,n)=>{n.d(e,{d:()=>l,l:()=>d,r:()=>f,s:()=>i,t:()=>m});var s=n(46851);function i(t,e,n){return t[0]=e,t[1]=n,t}function r(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function o(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function a(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function l(t,e){const n=e[0]-t[0],s=e[1]-t[1];return Math.sqrt(n*n+s*s)}function h(t,e){const n=e[0]-t[0],s=e[1]-t[1];return n*n+s*s}function c(t){const e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function u(t){const e=t[0],n=t[1];return e*e+n*n}function d(t,e,n,s){const i=e[0],r=e[1];return t[0]=i+s*(n[0]-i),t[1]=r+s*(n[1]-r),t}function m(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[2]*i+n[4],t[1]=n[1]*s+n[3]*i+n[5],t}function f(t,e,n,s){const i=e[0]-n[0],r=e[1]-n[1],o=Math.sin(s),a=Math.cos(s);return t[0]=i*a-r*o+n[0],t[1]=i*o+r*a+n[1],t}const p=c,_=r,g=o,y=a,x=l,v=h,b=u;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},angle:function(t,e){const n=t[0],s=t[1],i=e[0],r=e[1];let o=n*n+s*s;o>0&&(o=1/Math.sqrt(o));let a=i*i+r*r;a>0&&(a=1/Math.sqrt(a));const l=(n*i+s*r)*o*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},cross:function(t,e,n){const s=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=s,t},dist:x,distance:l,div:y,divide:a,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:function(t,e){const n=t[0],i=t[1],r=e[0],o=e[1],a=(0,s.g)();return Math.abs(n-r)<=a*Math.max(1,Math.abs(n),Math.abs(r))&&Math.abs(i-o)<=a*Math.max(1,Math.abs(i),Math.abs(o))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:p,length:c,lerp:d,max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},mul:g,multiply:o,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:function(t,e){const n=e[0],s=e[1];let i=n*n+s*s;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},projectAndScale:function(t,e,n,s,i){let r=e[0]-n[0],o=e[1]-n[1];const a=(s[0]*r+s[1]*o)*(i-1);return r=s[0]*a,o=s[1]*a,t[0]=e[0]+r,t[1]=e[1]+o,t},random:function(t,e){e=e||1;const n=2*(0,s.R)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},rotate:f,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},scaleAndAdd:function(t,e,n,s){return t[0]=e[0]+n[0]*s,t[1]=e[1]+n[1]*s,t},set:i,sqrDist:v,sqrLen:b,squaredDistance:h,squaredLength:u,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:_,subtract:r,transformMat2:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[2]*i,t[1]=n[1]*s+n[3]*i,t},transformMat2d:m,transformMat3:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[3]*i+n[6],t[1]=n[1]*s+n[4]*i+n[7],t},transformMat4:function(t,e,n){const s=e[0],i=e[1];return t[0]=n[0]*s+n[4]*i+n[12],t[1]=n[1]*s+n[5]*i+n[13],t}},Symbol.toStringTag,{value:"Module"}))},97323:(t,e,n)=>{function s(){return[0,0]}function i(t,e){return[t,e]}function r(t,e){return new Float64Array(t,e,2)}function o(){return i(1,1)}function a(){return i(1,0)}function l(){return i(0,1)}n.d(e,{a:()=>s,c:()=>r,f:()=>i});const h=o(),c=a(),u=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:c,UNIT_Y:u,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:s,createView:r,fromArray:function(t){const e=[0,0],n=Math.min(2,t.length);for(let s=0;s<n;++s)e[s]=t[s];return e},fromValues:i,ones:o,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},46791:(t,e,n)=>{n.d(e,{Z:()=>B});var s,i=n(43697),r=n(3894),o=n(32448),a=n(22974),l=n(70586),h=n(71143);!function(t){t[t.ADD=1]="ADD",t[t.REMOVE=2]="REMOVE",t[t.MOVE=4]="MOVE"}(s||(s={}));var c,u=n(1654),d=n(75215),m=n(58971),f=n(5600),p=n(52421),_=n(52011),g=n(10661);const y=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(t){this.defaultPrevented=!1,this.item=t}},void 0,(t=>{t.item=null,t.target=null,t.defaultPrevented=!1,t.cancellable=!1})),x=()=>{};function v(t){return t?t instanceof O?t.toArray():t.length?Array.prototype.slice.apply(t):[]:[]}function b(t){if(t&&t.length)return t[0]}function M(t,e,n,s){const i=Math.min(t.length-n,e.length-s);let r=0;for(;r<i&&t[n+r]===e[s+r];)r++;return r}function w(t,e,n,s){e&&e.forEach(((e,i,r)=>{t.push(e),w(t,n.call(s,e,i,r),n,s)}))}const P=new Set,C=new Set,R=new Set,E=new Map;let I=0,O=c=class extends o.Z.EventedAccessor{static isCollection(t){return null!=t&&t instanceof c}constructor(t){super(t),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new g.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:I++})}normalizeCtorArgs(t){return t?Array.isArray(t)||t instanceof c?{items:t}:t:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,m.it)(this._observable),this._items}set items(t){this._emitBeforeChanges(s.ADD)||(this._splice(0,this.length,v(t)),this._emitAfterChanges(s.ADD))}hasEventListener(t){return"change"===t?this._chgListeners.length>0:this._emitter.hasEventListener(t)}on(t,e){if("change"===t){const t=this._chgListeners,n={removed:!1,callback:e};return t.push(n),this._notifications&&this._notifications.push({listeners:t.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=x,n.removed=!0,t.splice(t.indexOf(n),1)}}}return this._emitter.on(t,e)}once(t,e){const n=this.on(t,e);return{remove(){n.remove()}}}add(t,e){if((0,m.it)(this._observable),this._emitBeforeChanges(s.ADD))return this;const n=this.getNextIndex(e??null);return this._splice(n,0,[t]),this._emitAfterChanges(s.ADD),this}addMany(t,e=this._items.length){if((0,m.it)(this._observable),!t||!t.length)return this;if(this._emitBeforeChanges(s.ADD))return this;const n=this.getNextIndex(e);return this._splice(n,0,v(t)),this._emitAfterChanges(s.ADD),this}at(t){if((0,m.it)(this._observable),(t=Math.trunc(t)||0)<0&&(t+=this.length),!(t<0||t>=this.length))return this._items[t]}removeAll(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return[];const t=this._removeAllRaw();return this._emitAfterChanges(s.REMOVE),t}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.map(a.d9)})}concat(...t){(0,m.it)(this._observable);const e=t.map(v);return this._createNewInstance({items:this._items.concat(...e)})}drain(t,e){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const n=(0,l.j0)(this._splice(0,this.length)),i=n.length;for(let s=0;s<i;s++)t.call(e,n[s],s,n);this._emitAfterChanges(s.REMOVE)}every(t,e){return(0,m.it)(this._observable),this._items.every(t,e)}filter(t,e){let n;return(0,m.it)(this._observable),n=2===arguments.length?this._items.filter(t,e):this._items.filter(t),this._createNewInstance({items:n})}find(t,e){return(0,m.it)(this._observable),this._items.find(t,e)}findIndex(t,e){return(0,m.it)(this._observable),this._items.findIndex(t,e)}flatten(t,e){(0,m.it)(this._observable);const n=[];return w(n,this,t,e),new c(n)}forEach(t,e){return(0,m.it)(this._observable),this._items.forEach(t,e)}getItemAt(t){return(0,m.it)(this._observable),this._items[t]}getNextIndex(t){(0,m.it)(this._observable);const e=this.length;return(t=t??e)<0?t=0:t>e&&(t=e),t}includes(t,e=0){return(0,m.it)(this._observable),this._items.includes(t,e)}indexOf(t,e=0){return(0,m.it)(this._observable),this._items.indexOf(t,e)}join(t=","){return(0,m.it)(this._observable),this._items.join(t)}lastIndexOf(t,e=this.length-1){return(0,m.it)(this._observable),this._items.lastIndexOf(t,e)}map(t,e){(0,m.it)(this._observable);const n=this._items.map(t,e);return new c({items:n})}reorder(t,e=this.length-1){(0,m.it)(this._observable);const n=this.indexOf(t);if(-1!==n){if(e<0?e=0:e>=this.length&&(e=this.length-1),n!==e){if(this._emitBeforeChanges(s.MOVE))return t;this._splice(n,1),this._splice(e,0,[t]),this._emitAfterChanges(s.MOVE)}return t}}pop(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const t=b(this._splice(this.length-1,1));return this._emitAfterChanges(s.REMOVE),t}push(...t){return(0,m.it)(this._observable),this._emitBeforeChanges(s.ADD)||(this._splice(this.length,0,t),this._emitAfterChanges(s.ADD)),this.length}reduce(t,e){(0,m.it)(this._observable);const n=this._items;return 2===arguments.length?n.reduce(t,e):n.reduce(t)}reduceRight(t,e){(0,m.it)(this._observable);const n=this._items;return 2===arguments.length?n.reduceRight(t,e):n.reduceRight(t)}remove(t){return(0,m.it)(this._observable),this.removeAt(this.indexOf(t))}removeAt(t){if((0,m.it)(this._observable),t<0||t>=this.length||this._emitBeforeChanges(s.REMOVE))return;const e=b(this._splice(t,1));return this._emitAfterChanges(s.REMOVE),e}removeMany(t){if((0,m.it)(this._observable),!t||!t.length||this._emitBeforeChanges(s.REMOVE))return[];const e=t instanceof c?t.toArray():t,n=this._items,i=[],r=e.length;for(let t=0;t<r;t++){const s=e[t],r=n.indexOf(s);if(r>-1){const s=1+M(e,n,t+1,r+1),o=this._splice(r,s);o&&o.length>0&&i.push.apply(i,o),t+=s-1}}return this._emitAfterChanges(s.REMOVE),i}reverse(){if((0,m.it)(this._observable),this._emitBeforeChanges(s.MOVE))return this;const t=this._splice(0,this.length);return t&&(t.reverse(),this._splice(0,0,t)),this._emitAfterChanges(s.MOVE),this}shift(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const t=b(this._splice(0,1));return this._emitAfterChanges(s.REMOVE),t}slice(t=0,e=this.length){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.slice(t,e)})}some(t,e){return(0,m.it)(this._observable),this._items.some(t,e)}sort(t){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(s.MOVE))return this;const e=(0,l.j0)(this._splice(0,this.length));return arguments.length?e.sort(t):e.sort(),this._splice(0,0,e),this._emitAfterChanges(s.MOVE),this}splice(t,e,...n){(0,m.it)(this._observable);const i=(e?s.REMOVE:0)|(n.length?s.ADD:0);if(this._emitBeforeChanges(i))return[];const r=this._splice(t,e,n)||[];return this._emitAfterChanges(i),r}toArray(){return(0,m.it)(this._observable),this._items.slice()}toJSON(){return(0,m.it)(this._observable),this.toArray()}toLocaleString(){return(0,m.it)(this._observable),this._items.toLocaleString()}toString(){return(0,m.it)(this._observable),this._items.toString()}unshift(...t){return(0,m.it)(this._observable),!t.length||this._emitBeforeChanges(s.ADD)||(this._splice(0,0,t),this._emitAfterChanges(s.ADD)),this.length}_createNewInstance(t){return new this.constructor(t)}_splice(t,e,n){const s=this._items,i=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,u.Os)((()=>this._dispatchChange()))),e){if(o=s.splice(t,e),this.hasEventListener("before-remove")){const e=y.acquire();e.target=this,e.cancellable=!0;for(let n=0,i=o.length;n<i;n++)r=o[n],e.reset(r),this.emit("before-remove",e),e.defaultPrevented&&(o.splice(n,1),s.splice(t,0,r),t+=1,n-=1,i-=1);y.release(e)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const t=y.acquire();t.target=this,t.cancellable=!1;const e=o.length;for(let n=0;n<e;n++)t.reset(o[n]),this.emit("after-remove",t);y.release(t)}}if(n&&n.length){if(i){const t=[];for(const e of n){const n=i.ensureType(e);null==n&&null!=e||t.push(n)}n=t}const e=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=t===this.length;if(e||r){const i=y.acquire();i.target=this,i.cancellable=!0;const a=y.acquire();a.target=this,a.cancellable=!1;for(const l of n)e?(i.reset(l),this.emit("before-add",i),i.defaultPrevented||(o?s.push(l):s.splice(t++,0,l),this._set("length",s.length),r&&(a.reset(l),this.emit("after-add",a)))):(o?s.push(l):s.splice(t++,0,l),this._set("length",s.length),a.reset(l),this.emit("after-add",a));y.release(a),y.release(i)}else{if(o)for(const t of n)s.push(t);else s.splice(t,0,...n);this._set("length",s.length)}}return(n&&n.length||o&&o.length)&&this._notifyChangeEvent(n,o),o}_emitBeforeChanges(t){let e=!1;if(this.hasEventListener("before-changes")){const n=y.acquire();n.target=this,n.cancellable=!0,n.type=t,this.emit("before-changes",n),e=n.defaultPrevented,y.release(n)}return e}_emitAfterChanges(t){if(this.hasEventListener("after-changes")){const e=y.acquire();e.target=this,e.cancellable=!1,e.type=t,this.emit("after-changes",e),y.release(e)}this._observable.notify()}_notifyChangeEvent(t,e){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:t,removed:e})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const t=this._notifications;this._notifications=null;for(const e of t){const t=e.changes;P.clear(),C.clear(),R.clear();for(const{added:e,removed:n}of t){if(e)if(0===R.size&&0===C.size)for(const t of e)P.add(t);else for(const t of e)C.has(t)?(R.add(t),C.delete(t)):R.has(t)||P.add(t);if(n)if(0===R.size&&0===P.size)for(const t of n)C.add(t);else for(const t of n)P.has(t)?P.delete(t):(R.delete(t),C.add(t))}const n=r.Z.acquire();P.forEach((t=>{n.push(t)}));const s=r.Z.acquire();C.forEach((t=>{s.push(t)}));const i=this._items,o=e.items,a=r.Z.acquire();if(R.forEach((t=>{o.indexOf(t)!==i.indexOf(t)&&a.push(t)})),e.listeners&&(n.length||s.length||a.length)){const t={target:this,added:n,removed:s,moved:a},i=e.listeners.length;for(let n=0;n<i;n++){const s=e.listeners[n];s.removed||s.callback.call(this,t)}}r.Z.release(n),r.Z.release(s),r.Z.release(a)}P.clear(),C.clear(),R.clear()}};O.ofType=t=>{if(!t)return c;if(E.has(t))return E.get(t);let e=null;if("function"==typeof t)e=t.prototype.declaredClass;else if(t.base)e=t.base.prototype.declaredClass;else for(const n in t.typeMap){const s=t.typeMap[n].prototype.declaredClass;e?e+=` | ${s}`:e=s}let n=class extends c{};return(0,i._)([(0,p.c)({Type:t,ensureType:"function"==typeof t?(0,d.se)(t):(0,d.N7)(t)})],n.prototype,"itemType",void 0),n=(0,i._)([(0,_.j)(`esri.core.Collection<${e}>`)],n),E.set(t,n),n},(0,i._)([(0,f.Cb)()],O.prototype,"length",void 0),(0,i._)([(0,f.Cb)()],O.prototype,"items",null),O=c=(0,i._)([(0,_.j)("esri.core.Collection")],O);const B=O},3920:(t,e,n)=>{n.d(e,{p:()=>h,r:()=>c});var s=n(43697),i=n(92036),r=n(61247),o=n(5600),a=n(52011),l=n(72762);const h=t=>{let e=class extends t{constructor(){super(...arguments),this._handles=new r.Z,this._updatingHandles=new l.t}destroy(){this.destroyed||(this._handles.destroy(),this._updatingHandles.destroy())}get handles(){return this._handles}get updatingHandles(){return this._updatingHandles}};return(0,s._)([(0,o.Cb)({readOnly:!0})],e.prototype,"handles",null),(0,s._)([(0,o.Cb)({readOnly:!0})],e.prototype,"updatingHandles",null),e=(0,s._)([(0,a.j)("esri.core.HandleOwner")],e),e};let c=class extends(h(i.Z)){};c=(0,s._)([(0,a.j)("esri.core.HandleOwner")],c)},52421:(t,e,n)=>{function s(t){return(e,n)=>{e[n]=t}}n.d(e,{c:()=>s})},70921:(t,e,n)=>{n.d(e,{R:()=>r,Z:()=>i});var s=n(46791);function i(t,e,n=s.Z){return e||(e=new n),e===t||(e.removeAll(),(i=t)&&(Array.isArray(i)||"items"in i&&Array.isArray(i.items))?e.addMany(t):t&&e.add(t)),e;var i}function r(t){return t}},24133:(t,e,n)=>{n.d(e,{Q:()=>a});var s=n(67676),i=n(70586),r=n(44553),o=n(88764);class a{constructor(t=9,e){this._compareMinX=u,this._compareMinY=d,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),v.prune(),b.prune(),M.prune(),w.prune()}all(t){this._all(this._data,t)}search(t,e){let n=this._data;const s=this._toBBox;if(y(t,n))for(v.clear();n;){for(let i=0,r=n.children.length;i<r;i++){const r=n.children[i],o=n.leaf?s(r):r;y(t,o)&&(n.leaf?e(r):g(t,o)?this._all(r,e):v.push(r))}n=v.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!y(t,e))return!1;for(v.clear();e;){for(let s=0,i=e.children.length;s<i;s++){const i=e.children[s],r=e.leaf?n(i):i;if(y(t,r)){if(e.leaf||g(t,r))return!0;v.push(i)}}e=v.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new R([]),this}remove(t){if(!t)return this;let e,n=this._data,r=null,o=0,a=!1;const l=this._toBBox(t);for(M.clear(),w.clear();n||M.length>0;){if(n||(n=(0,i.j0)(M.pop()),r=M.data[M.length-1],o=w.pop()??0,a=!0),n.leaf&&(e=(0,s.cq)(n.children,t,n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),M.push(n),this._condense(M),this;a||n.leaf||!g(n,l)?r?(o++,n=r.children[o],a=!1):n=null:(M.push(n),w.push(o),o=0,r=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let n=t;for(b.clear();n;){if(!0===n.leaf)for(const t of n.children)e(t);else b.pushArray(n.children);n=b.pop()??null}}_build(t,e,n,s){const i=n-e+1;let r=this._maxEntries;if(i<=r){const s=new R(t.slice(e,n+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(i)/Math.log(r)),r=Math.ceil(i/r**(s-1)));const o=new E([]);o.height=s;const a=Math.ceil(i/r),h=a*Math.ceil(Math.sqrt(r));x(t,e,n,h,this._compareMinX);for(let i=e;i<=n;i+=h){const e=Math.min(i+h-1,n);x(t,i,e,a,this._compareMinY);for(let n=i;n<=e;n+=a){const i=Math.min(n+a-1,e);o.children.push(this._build(t,n,i,s-1))}}return l(o,this._toBBox),o}_chooseSubtree(t,e,n,s){for(;s.push(e),!0!==e.leaf&&s.length-1!==n;){let n,s=1/0,i=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=m(o),l=p(t,o)-a;l<i?(i=l,s=a<s?a:s,n=o):l===i&&a<s&&(s=a,n=o)}e=n||e.children[0]}return e}_insert(t,e,n){const s=this._toBBox,i=n?t:s(t);M.clear();const r=this._chooseSubtree(i,this._data,e,M);for(r.children.push(t),c(r,i);e>=0&&M.data[e].children.length>this._maxEntries;)this._split(M,e),e--;this._adjustParentBBoxes(i,M,e)}_split(t,e){const n=t.data[e],s=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,s);const r=this._chooseSplitIndex(n,i,s);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=n.children.splice(r,n.children.length-r),a=n.leaf?new R(o):new E(o);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),e?t.data[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this._data=new E([t,e]),this._data.height=t.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let s,i,r;s=i=1/0;for(let o=e;o<=n-e;o++){const e=h(t,0,o,this._toBBox),a=h(t,o,n,this._toBBox),l=_(e,a),c=m(e)+m(a);l<s?(s=l,r=o,i=c<i?c:i):l===s&&c<i&&(i=c,r=o)}return r}_chooseSplitAxis(t,e,n){const s=t.leaf?this._compareMinX:u,i=t.leaf?this._compareMinY:d;this._allDistMargin(t,e,n,s)<this._allDistMargin(t,e,n,i)&&t.children.sort(s)}_allDistMargin(t,e,n,s){t.children.sort(s);const i=this._toBBox,r=h(t,0,e,i),o=h(t,n-e,n,i);let a=f(r)+f(o);for(let s=e;s<n-e;s++){const e=t.children[s];c(r,t.leaf?i(e):e),a+=f(r)}for(let s=n-e-1;s>=e;s--){const e=t.children[s];c(o,t.leaf?i(e):e),a+=f(o)}return a}_adjustParentBBoxes(t,e,n){for(let s=n;s>=0;s--)c(e.data[s],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const n=t.data[e];if(0===n.children.length)if(e>0){const i=t.data[e-1],r=i.children;r.splice((0,s.cq)(r,n,r.length,i.indexHint),1)}else this.clear();else l(n,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function l(t,e){h(t,0,t.children.length,e,t)}function h(t,e,n,s,i){i||(i=new R([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let r,o=e;o<n;o++)r=t.children[o],c(i,t.leaf?s(r):r);return i}function c(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function u(t,e){return t.minX-e.minX}function d(t,e){return t.minY-e.minY}function m(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function _(t,e){const n=Math.max(t.minX,e.minX),s=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,r-s)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function y(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function x(t,e,n,s,r){const a=[e,n];for(;a.length;){const e=(0,i.j0)(a.pop()),n=(0,i.j0)(a.pop());if(e-n<=s)continue;const l=n+Math.ceil((e-n)/s/2)*s;(0,o.q)(t,l,n,e,r),a.push(n,l,l,e)}}const v=new r.Z,b=new r.Z,M=new r.Z,w=new r.Z({deallocator:void 0});class P{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class C extends P{constructor(){super(...arguments),this.height=1,this.indexHint=new s.SO}}class R extends C{constructor(t){super(),this.children=t,this.leaf=!0}}class E extends C{constructor(t){super(),this.children=t,this.leaf=!1}}},17445:(t,e,n)=>{n.d(e,{N1:()=>d,YP:()=>l,Z_:()=>p,gx:()=>h,nn:()=>_,on:()=>u,tX:()=>g});var s=n(91460),i=n(50758),r=n(70586),o=n(95330),a=n(26258);function l(t,e,n={}){return c(t,e,n,m)}function h(t,e,n={}){return c(t,e,n,f)}function c(t,e,n={},s){let i=null;const o=n.once?(t,n)=>{s(t)&&((0,r.hw)(i),e(t,n))}:(t,n)=>{s(t)&&e(t,n)};if(i=(0,a.aQ)(t,o,n.sync,n.equals),n.initial){const e=t();o(e,e)}return i}function u(t,e,n,o={}){let a=null,h=null,c=null;function u(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(t){o.once&&o.once&&(0,r.hw)(c),n(t)}const m=l(t,((t,n)=>{u(),(0,s.vT)(t)&&(a=t,h=(0,s.on)(t,e,d),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return c=(0,i.kB)((()=>{m.remove(),u()})),c}function d(t,e){return function(t,e,n){if((0,o.Hc)(n))return Promise.reject((0,o.zE)());const s=t();if(e?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((s,r)=>{a=(0,i.AL)([(0,o.fu)(n,(()=>{l(),r((0,o.zE)())})),c(t,(t=>{l(),s(t)}),{sync:!1,once:!0},e??m)])}))}(t,f,e)}function m(t){return!0}function f(t){return!!t}n(87538);const p={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},72762:(t,e,n)=>{n.d(e,{t:()=>u});var s=n(43697),i=n(92036),r=n(61247),o=n(50758),a=n(17445),l=n(1654),h=n(5600),c=n(52011);let u=class extends i.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new r.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(t,e,n={}){return this._installWatch(t,e,n,a.YP)}addWhen(t,e,n={}){return this._installWatch(t,e,n,a.gx)}addOnCollectionChange(t,e,{initial:n=!1,final:s=!1}={}){const i=++this._handleId;return this._handles.add([(0,a.on)(t,"after-changes",this._createSyncUpdatingCallback(),a.Z_),(0,a.on)(t,"change",e,{onListenerAdd:n?t=>e({added:t.toArray(),removed:[]}):void 0,onListenerRemove:s?t=>e({added:[],removed:t.toArray()}):void 0})],i),(0,o.kB)((()=>this._handles.remove(i)))}addPromise(t){if(null==t)return t;const e=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(t)&&(0!==this._pendingPromises.size||this._handles.has(d)||this._set("updating",!1))}},e),this._pendingPromises.add(t),this._set("updating",!0);const n=()=>this._handles.remove(e);return t.then(n,n),t}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(t,e,n={},s){const i=++this._handleId;n.sync||this._installSyncUpdatingWatch(t,i);const r=s(t,e,n);return this._handles.add(r,i),(0,o.kB)((()=>this._handles.remove(i)))}_installSyncUpdatingWatch(t,e){const n=this._createSyncUpdatingCallback(),s=(0,a.YP)(t,n,{sync:!0,equals:()=>!1});return this._handles.add(s,e),s}_createSyncUpdatingCallback(){return()=>{this._handles.remove(d),++this._scheduleHandleId;const t=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,l.Os)((()=>{t===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(d))})),d)}}};(0,s._)([(0,h.Cb)({readOnly:!0})],u.prototype,"updating",void 0),u=(0,s._)([(0,c.j)("esri.core.support.WatchUpdatingTracking")],u);const d=-42},35463:(t,e,n)=>{n.d(e,{JE:()=>o,Nm:()=>r,rJ:()=>a}),n(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},i={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function r(t,e,n){const s=new Date(t.getTime());if(e&&n){const t=i[n],{getter:r,setter:o,multiplier:a}=t;if("months"===n){const t=function(t,e){const n=new Date(t,e+1,1);return n.setDate(0),n.getDate()}(s.getFullYear(),s.getMonth()+e);s.getDate()>t&&s.setDate(t)}s[o](s[r]()+e*a)}return s}function o(t,e){switch(e){case"milliseconds":return new Date(t.getTime());case"seconds":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds());case"minutes":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes());case"hours":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours());case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate());case"weeks":return new Date(t.getFullYear(),t.getMonth(),t.getDate()-t.getDay());case"months":return new Date(t.getFullYear(),t.getMonth(),1);case"years":return new Date(t.getFullYear(),0,1);case"decades":return new Date(t.getFullYear()-t.getFullYear()%10,0,1);case"centuries":return new Date(t.getFullYear()-t.getFullYear()%100,0,1);default:return new Date}}function a(t,e,n){return 0===t?0:t*s[e]/s[n]}},41123:(t,e,n)=>{n.d(e,{D:()=>i,z:()=>r});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=e=>t[e].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}function r(){return`{${i()}}`}},73913:(t,e,n)=>{n.d(e,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>h});var s=n(58901),i=n(82971),r=n(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new s.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new s.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const n=h(t);for(const t of n)for(const n of t)n[0]+=e;return t}function h(t){return(0,r.oU)(t)?t.rings:t.paths}},57765:(t,e,n)=>{n.r(e),n.d(e,{default:()=>ie});var s=n(43697),i=n(46791),r=n(20102),o=n(92604),a=n(16453),l=n(5600),h=n(90578),c=(n(67676),n(80442),n(71715)),u=n(52011),d=n(30556),m=n(87085),f=n(71612),p=n(38009),_=n(72965),g=n(3172),y=n(81271),x=n(41123),v=(n(75215),n(10699)),b=n(96674),M=n(83379),w=n(92036),P=n(21787),C=n(46521),R=n(4307),E=n(17896);const I=(0,n(65617).c)(),O=(0,C.c)(),B=(0,C.c)(),S=(0,C.c)();function A(t,e,n){return(0,E.s)(I,e[0],e[1],1),(0,E.t)(I,I,(0,P.t)(O,n)),0===I[2]?(0,R.s)(t,I[0],I[1]):(0,R.s)(t,I[0]/I[2],I[1]/I[2])}function Z(t,e,n){return T(B,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]),T(S,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,P.m)(t,(0,P.a)(B,B),S),0!==t[8]&&(t[0]/=t[8],t[1]/=t[8],t[2]/=t[8],t[3]/=t[8],t[4]/=t[8],t[5]/=t[8],t[6]/=t[8],t[7]/=t[8],t[8]/=t[8]),t}function T(t,e,n,s,i,r,o,a,l){(0,P.s)(t,e,s,r,n,i,o,1,1,1),(0,E.s)(I,a,l,1),(0,P.a)(O,t);const[h,c,u]=(0,E.t)(I,I,(0,P.t)(O,O));return(0,P.s)(O,h,0,0,0,c,0,0,0,u),(0,P.m)(t,O,t)}var j=n(62357),D=n(97323),L=n(94139),Y=n(38913),X=n(44547),V=n(82971),N=n(2368);let q=class extends N.j{projectOrWarn(t,e){if(null==t)return t;const{geometry:n,pending:s}=(0,X.dz)(t,e);return s?null:s||n?n:(o.Z.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:t,sourceSpatialReference:t.spatialReference,targetSpatialReference:e}),null)}};q=(0,s._)([(0,u.j)("esri.layers.support.GeoreferenceBase")],q);const z=q,H=(0,C.c)(),F=(0,D.a)();let W=class extends w.Z{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,s._)([(0,l.Cb)()],W.prototype,"sourcePoint",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],W.prototype,"mapPoint",void 0),W=(0,s._)([(0,u.j)("esri.layers.support.ControlPoint")],W);let U=class extends((0,b.eC)(z)){constructor(t){super(t),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(t,e){const n=V.Z.fromJSON(e.spatialReference),s=(0,C.f)(...e.coefficients,1);return t.map((t=>((0,R.s)(F,t.x,t.y),A(F,F,s),{sourcePoint:t,mapPoint:new L.Z({x:F[0],y:F[1],spatialReference:n})})))}writeControlPoints(t,e,n,s){if(null!=this.transform)null!=t&&k(t[0])&&(e.controlPoints=t.map((t=>{const e=t.sourcePoint;return{x:e.x,y:e.y}})),e.spatialReference=t[0].mapPoint.spatialReference.toJSON(),e.coefficients=this.transform.slice(0,8));else{const t=new r.Z("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration.",{layer:s?.layer,georeference:this});s?.messages?s.messages.push(t):o.Z.getLogger(this).error(t.name,t.message)}}get coords(){if(null==this.controlPoints)return null;const t=this._updateTransform(H);if(null==t||!k(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return function(t,e,n,s){const i=(0,D.f)(0,n),r=(0,D.f)(0,0),o=(0,D.f)(e,0),a=(0,D.f)(e,n);return A(i,i,t),A(r,r,t),A(o,o,t),A(a,a,t),new Y.Z({rings:[[i,r,o,a,i]],spatialReference:s})}(t,this.width,this.height,e)}set coords(t){if(null==this.controlPoints||!k(this.controlPoints[0]))return;const e=this.controlPoints[0].mapPoint.spatialReference;if(null==(t=this.projectOrWarn(t,e)))return;const{width:n,height:s}=this,{rings:[[i,r,o,a]]}=t,l={sourcePoint:(0,j.vW)(0,s),mapPoint:new L.Z({x:i[0],y:i[1],spatialReference:e})},h={sourcePoint:(0,j.vW)(0,0),mapPoint:new L.Z({x:r[0],y:r[1],spatialReference:e})},c={sourcePoint:(0,j.vW)(n,0),mapPoint:new L.Z({x:o[0],y:o[1],spatialReference:e})},u={sourcePoint:(0,j.vW)(n,s),mapPoint:new L.Z({x:a[0],y:a[1],spatialReference:e})};k(l)&&k(h)&&k(c)&&k(u)&&(rt(H,l,h,c,u),this.controlPoints=this.controlPoints.map((({sourcePoint:t})=>((0,R.s)(F,t.x,t.y),A(F,F,H),{sourcePoint:t,mapPoint:new L.Z({x:F[0],y:F[1],spatialReference:e})}))))}get inverseTransform(){return null==this.transform?null:(0,P.e)((0,C.c)(),this.transform)}get transform(){return this._updateTransform()}toMap(t){if(null==t||null==this.transform||null==this.controlPoints||!k(this.controlPoints[0]))return null;(0,R.s)(F,t.x,t.y);const e=this.controlPoints[0].mapPoint.spatialReference;return A(F,F,this.transform),new L.Z({x:F[0],y:F[1],spatialReference:e})}toSource(t){if(null==t||null==this.inverseTransform||null==this.controlPoints||!k(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return t=t.normalize(),null==(t=(0,X.dz)(t,e).geometry)?null:((0,R.s)(F,t.x,t.y),A(F,F,this.inverseTransform),(0,j.vW)(F[0],F[1]))}_updateTransform(t){const{controlPoints:e,width:n,height:s}=this;if(!(null!=e&&n>0&&s>0))return null;const[i,r,o,a]=e;if(!k(i))return null;const l=i.mapPoint.spatialReference,h=this._projectControlPoint(r,l),c=this._projectControlPoint(o,l),u=this._projectControlPoint(a,l);if(!h.valid||!c.valid||!u.valid)return null;if(!k(h.controlPoint))return null;null==t&&(t=(0,C.c)());let d=null;return d=k(c.controlPoint)&&k(u.controlPoint)?rt(t,i,h.controlPoint,c.controlPoint,u.controlPoint):k(c.controlPoint)?function(t,e,n,s){return it(J,Q,e),it(G,tt,n),it($,et,s),(0,R.l)(K,J,G,.5),(0,R.r)(K,$,K,Math.PI),(0,R.l)(nt,Q,tt,.5),(0,R.r)(nt,et,nt,Math.PI),ht(t,J,G,$,K,Q,tt,et,nt)}(t,i,h.controlPoint,c.controlPoint):function(t,e,n){return it(J,Q,e),it(G,tt,n),(0,R.r)($,G,J,st),(0,R.r)(K,J,G,st),(0,R.r)(et,tt,Q,-st),(0,R.r)(nt,Q,tt,-st),ht(t,J,G,$,K,Q,tt,et,nt)}(t,i,h.controlPoint),d.every((t=>0===t))?null:d}_projectControlPoint(t,e){if(!k(t))return{valid:!0,controlPoint:t};const{sourcePoint:n,mapPoint:s}=t,{geometry:i,pending:r}=(0,X.dz)(s,e);return r?{valid:!1,controlPoint:null}:r||i?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:i}}:(o.Z.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:t,sourceSpatialReference:s.spatialReference,targetSpatialReference:e}),{valid:!1,controlPoint:null})}};function k(t){return null!=t&&null!=t.sourcePoint&&null!=t.mapPoint}(0,s._)([(0,l.Cb)({type:[W],json:{write:{allowNull:!1,isRequired:!0}}})],U.prototype,"controlPoints",void 0),(0,s._)([(0,c.r)("controlPoints")],U.prototype,"readControlPoints",null),(0,s._)([(0,d.c)("controlPoints")],U.prototype,"writeControlPoints",null),(0,s._)([(0,l.Cb)()],U.prototype,"coords",null),(0,s._)([(0,l.Cb)({json:{write:!0}})],U.prototype,"height",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],U.prototype,"inverseTransform",null),(0,s._)([(0,l.Cb)({readOnly:!0})],U.prototype,"transform",null),(0,s._)([(0,l.Cb)({json:{write:!0}})],U.prototype,"width",void 0),U=(0,s._)([(0,u.j)("esri.layers.support.ControlPointsGeoreference")],U);const J=(0,D.a)(),G=(0,D.a)(),$=(0,D.a)(),K=(0,D.a)(),Q=(0,D.a)(),tt=(0,D.a)(),et=(0,D.a)(),nt=(0,D.a)(),st=Math.PI/2;function it(t,e,n){(0,R.s)(t,n.sourcePoint.x,n.sourcePoint.y),(0,R.s)(e,n.mapPoint.x,n.mapPoint.y)}function rt(t,e,n,s,i){return it(J,Q,e),it(G,tt,n),it($,et,s),it(K,nt,i),ht(t,J,G,$,K,Q,tt,et,nt)}const ot=new Array(8).fill(0),at=new Array(8).fill(0);function lt(t,e,n,s,i){return t[0]=e[0],t[1]=e[1],t[2]=n[0],t[3]=n[1],t[4]=s[0],t[5]=s[1],t[6]=i[0],t[7]=i[1],t}function ht(t,e,n,s,i,r,o,a,l){return Z(t,lt(ot,e,n,s,i),lt(at,r,o,a,l))}const ct=U;let ut=class extends z{constructor(t){super(t),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:t,topRight:e,bottomLeft:n,bottomRight:s}=this;if(null==t||null==e||null==n||null==s)return null;const i=t.spatialReference;return e=this.projectOrWarn(e,i),n=this.projectOrWarn(n,i),s=this.projectOrWarn(s,i),null==e||null==n||null==s?null:new Y.Z({rings:[[[n.x,n.y],[t.x,t.y],[e.x,e.y],[s.x,s.y],[n.x,n.y]]],spatialReference:i})}set coords(t){const{topLeft:e}=this;if(null==e)return;const n=e.spatialReference;if(null==(t=this.projectOrWarn(t,n)))return;const{rings:[[s,i,r,o]]}=t;this.bottomLeft=new L.Z({x:s[0],y:s[1],spatialReference:n}),this.topLeft=new L.Z({x:i[0],y:i[1],spatialReference:n}),this.topRight=new L.Z({x:r[0],y:r[1],spatialReference:n}),this.bottomRight=new L.Z({x:o[0],y:o[1],spatialReference:n})}};(0,s._)([(0,l.Cb)()],ut.prototype,"coords",null),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"bottomLeft",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"bottomRight",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"topLeft",void 0),(0,s._)([(0,l.Cb)({type:L.Z})],ut.prototype,"topRight",void 0),ut=(0,s._)([(0,u.j)("esri.layers.support.CornersGeoreference")],ut);const dt=ut;var mt=n(22021),ft=n(46851),pt=n(6570);let _t=class extends z{constructor(t){super(t),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:t,ymin:e,xmax:n,ymax:s,spatialReference:i}=this.extent;let r;if(this.rotation){const{x:i,y:o}=this.extent.center,a=gt(i,o,this.rotation);r=[a(t,e),a(t,s),a(n,s),a(n,e)],r.push(r[0])}else r=[[t,e],[t,s],[n,s],[n,e],[t,e]];return new Y.Z({rings:[r],spatialReference:i})}set coords(t){if(null==t||null==this.extent)return;const e=this.extent.spatialReference;if(null==(t=this.projectOrWarn(t,e))||null==t.extent)return;const{rings:[[n,s,i]],extent:{center:{x:r,y:o}}}=t,a=(0,mt.BV)(Math.PI/2-Math.atan2(s[1]-n[1],s[0]-n[0])),l=gt(r,o,-a),[h,c]=l(n[0],n[1]),[u,d]=l(i[0],i[1]);this.extent=new pt.Z({xmin:h,ymin:c,xmax:u,ymax:d,spatialReference:e}),this.rotation=a}};function gt(t,e,n){const s=(0,ft.t)(n),i=Math.cos(s),r=Math.sin(s);return(n,s)=>[i*(n-t)+r*(s-e)+t,i*(s-e)-r*(n-t)+e]}(0,s._)([(0,l.Cb)()],_t.prototype,"coords",null),(0,s._)([(0,l.Cb)({type:pt.Z})],_t.prototype,"extent",void 0),(0,s._)([(0,l.Cb)({type:Number})],_t.prototype,"rotation",void 0),_t=(0,s._)([(0,u.j)("esri.layers.support.ExtentAndRotationGeoreference")],_t);const yt={key:"type",base:z,typeMap:{"control-points":ct,corners:dt,"extent-and-rotation":_t}};let xt=class extends((0,v.iv)((0,b.eC)(M.Z))){constructor(t){super(t),this.georeference=null,this.opacity=1}readGeoreference(t){return ct.fromJSON(t)}};(0,s._)([(0,l.Cb)({types:yt,json:{write:!0}})],xt.prototype,"georeference",void 0),(0,s._)([(0,c.r)("georeference")],xt.prototype,"readGeoreference",null),(0,s._)([(0,l.Cb)()],xt.prototype,"opacity",void 0),xt=(0,s._)([(0,u.j)("esri.layers.support.MediaElementBase")],xt);const vt=xt;var bt=n(66094),Mt=n(25929);let wt=class extends vt{constructor(t){super(t),this.content=null,this.image=null,this.type="image",this.image=null}load(){const t=this.image;if("string"==typeof t){const e=(0,g.default)(t,{responseType:"image"}).then((({data:t})=>{this._set("content",t)}));this.addResolvingPromise(e)}else if(t instanceof HTMLImageElement){const e=t.decode().then((()=>{this._set("content",t)}));this.addResolvingPromise(e)}else t?this._set("content",t):this.addResolvingPromise(Promise.reject(new r.Z("image-element:invalid-image-type","Invalid image type",{image:t})));return Promise.resolve(this)}readImage(t,e,n){return(0,Mt.f)(e.url,n)}writeImage(t,e,n,s){if(null==t)return;const i=s?.portalItem,r=s?.resources;if(!i||!r)return void("string"==typeof t&&(e[n]=(0,Mt.t)(t,s)));const o="string"!=typeof t||(0,y.HK)(t)||(0,y.jc)(t)?null:t;if(o){if(null==(0,Mt.i)(o))return void(e[n]=o);const t=(0,Mt.t)(o,{...s,verifyItemRelativeUrls:s&&s.verifyItemRelativeUrls?{writtenUrls:s.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},Mt.M.NO);if(i&&t&&!(0,y.YP)(t))return r.toKeep.push({resource:i.resourceFromPath(t),compress:!1}),void(e[n]=t)}e[n]="<pending>",r.pendingOperations.push(Ct(t).then((t=>{const s=function(t,e){const n=(0,x.D)(),s=`${(0,y.v_)("media",n)}.${(0,bt.B)(t)}`;return e.resourceFromPath(s)}(t,i);e[n]=s.itemRelativeUrl,r.toAdd.push({resource:s,content:t,compress:!1,finish:t=>{this.image=t.url}})})))}};(0,s._)([(0,l.Cb)({readOnly:!0})],wt.prototype,"content",void 0),(0,s._)([(0,l.Cb)({json:{name:"url",type:String}})],wt.prototype,"image",void 0),(0,s._)([(0,c.r)("image",["url"])],wt.prototype,"readImage",null),(0,s._)([(0,d.c)("image")],wt.prototype,"writeImage",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{name:"mediaType"}})],wt.prototype,"type",void 0),wt=(0,s._)([(0,u.j)("esri.layers.support.ImageElement")],wt);const Pt=wt;async function Ct(t){if("string"==typeof t){if((0,y.jc)(t)){const{data:e}=await(0,g.default)(t,{responseType:"blob"});return e}return(0,y.HK)(t)?(0,y.fw)(t):Ct((await(0,g.default)(t,{responseType:"image"})).data)}return new Promise((e=>function(t){if(t instanceof HTMLCanvasElement)return t;const e=t instanceof HTMLImageElement?t.naturalWidth:t.width,n=t instanceof HTMLImageElement?t.naturalHeight:t.height,s=document.createElement("canvas"),i=s.getContext("2d");return s.width=e,s.height=n,t instanceof HTMLImageElement?i.drawImage(t,0,0,t.width,t.height):t instanceof ImageData&&i.putImageData(t,0,0),s}(t).toBlob(e)))}n(66577);var Rt=n(70921),Et=n(32448),It=n(3920),Ot=n(609),Bt=n(95330),St=n(17445),At=n(24470),Zt=n(87416),Tt=n(8744),jt=n(37549),Dt=n(20322),Lt=n(86662),Yt=n(33955),Xt=n(73913);function Vt(t,e){if(!e)return t;const n=function(t,e){const n=[],{ymin:s,ymax:i,xmin:r,xmax:o}=t,a=t.xmax-t.xmin,[l,h]=e.valid,{x:c,frameId:u}=qt(t.xmin,e),{x:d,frameId:m}=qt(t.xmax,e),f=c===d&&a>0;if(a>2*h){const t={xmin:r<o?c:d,ymin:s,xmax:h,ymax:i},e={xmin:l,ymin:s,xmax:r<o?d:c,ymax:i},a={xmin:0,ymin:s,xmax:h,ymax:i},f={xmin:l,ymin:s,xmax:0,ymax:i},p=[],_=[];zt(t,a)&&p.push(u),zt(t,f)&&_.push(u),zt(e,a)&&p.push(m),zt(e,f)&&_.push(m);for(let t=u+1;t<m;t++)p.push(t),_.push(t);n.push(new Wt(t,[u]),new Wt(e,[m]),new Wt(a,p),new Wt(f,_))}else c>d||f?n.push(new Wt({xmin:c,ymin:s,xmax:h,ymax:i},[u]),new Wt({xmin:l,ymin:s,xmax:d,ymax:i},[m])):n.push(new Wt({xmin:c,ymin:s,xmax:d,ymax:i},[u]));return n}(t,e).map((t=>t.extent));return n.length<2?n[0]||t:n.length>2?(t.xmin=e.valid[0],t.xmax=e.valid[1],t):{rings:n.map((t=>[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]))}}function Nt(t,e,n){if(Array.isArray(t)){const s=t[0];if(s>e){const n=(0,Xt.XZ)(s,e);t[0]=s+n*(-2*e)}else if(s<n){const e=(0,Xt.XZ)(s,n);t[0]=s+e*(-2*n)}}else{const s=t.x;if(s>e){const n=(0,Xt.XZ)(s,e);t.x+=n*(-2*e)}else if(s<n){const e=(0,Xt.XZ)(s,n);t.x+=e*(-2*n)}}return t}function qt(t,e){const[n,s]=e.valid,i=2*s;let r,o=0;return t>s?(r=Math.ceil(Math.abs(t-s)/i),t-=r*i,o=r):t<n&&(r=Math.ceil(Math.abs(t-n)/i),t+=r*i,o=-r),{x:t,frameId:o}}function zt(t,e){const{xmin:n,ymin:s,xmax:i,ymax:r}=e;return Ht(t,n,s)&&Ht(t,n,r)&&Ht(t,i,r)&&Ht(t,i,s)}function Ht(t,e,n){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax}function Ft(t,e,n=!0){const s=!(0,Yt.l9)(t);if(s&&(0,Lt.Zy)(t),n)return(new kt).cut(t,e);const i=s?t.rings:t.paths,r=s?4:2,o=i.length,a=-2*e;for(let t=0;t<o;t++){const e=i[t];if(e&&e.length>=r){const t=[];for(const n of e)t.push([n[0]+a,n[1]]);i.push(t)}}return s?t.rings=i:t.paths=i,t}class Wt{constructor(t,e){this.extent=t,this.frameIds=e}}const Ut=(0,At.Ue)();class kt{constructor(){this._linesIn=[],this._linesOut=[]}cut(t,e){let n;if(this._xCut=e,t.rings)this._closed=!0,n=t.rings,this._minPts=4;else{if(!t.paths)return null;this._closed=!1,n=t.paths,this._minPts=2}for(const t of n){if(!t||t.length<this._minPts)continue;let e=!0;for(const n of t)e?(this.moveTo(n),e=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const t of this._linesIn)t&&t.length>=this._minPts&&n.push(t);const s=-2*this._xCut;for(const t of this._linesOut)if(t&&t.length>=this._minPts){for(const e of t)e[0]+=s;n.push(t)}return this._closed?t.rings=n:t.paths=n,t}moveTo(t){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(t[0]),this._moveTo(t[0],t[1],this._prevSide),this._prevPt=t,this._firstPt=t}lineTo(t){const e=this._side(t[0]);if(e*this._prevSide==-1){const n=this._intersect(this._prevPt,t);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(t[0],t[1],e)}else this._lineTo(t[0],t[1],e);this._prevSide=e,this._prevPt=t}close(){const t=this._firstPt,e=this._prevPt;t[0]===e[0]&&t[1]===e[1]||this.lineTo(t),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(t,e,n){this._closed?(this._lineIn.push([n<=0?t:this._xCut,e]),this._lineOut.push([n>=0?t:this._xCut,e])):(n<=0&&this._lineIn.push([t,e]),n>=0&&this._lineOut.push([t,e]))}_lineTo(t,e,n){this._closed?(this._addPolyVertex(this._lineIn,n<=0?t:this._xCut,e),this._addPolyVertex(this._lineOut,n>=0?t:this._xCut,e)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([t,e])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([t,e])):this._prevSide<0?(this._lineIn.push([t,e]),this._lineOut.push([t,e])):this._prevSide>0&&(this._lineOut.push([t,e]),this._lineIn.push([t,e]))}_addPolyVertex(t,e,n){const s=t.length;s>1&&t[s-1][0]===e&&t[s-2][0]===e?t[s-1][1]=n:t.push([e,n])}_checkClosingPt(t){const e=t.length;e>3&&t[0][0]===this._xCut&&t[e-2][0]===this._xCut&&t[1][0]===this._xCut&&(t[0][1]=t[e-2][1],t.pop())}_side(t){return t<this._xCut?-1:t>this._xCut?1:0}_intersect(t,e){const n=(this._xCut-t[0])/(e[0]-t[0]);return t[1]+n*(e[1]-t[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}let Jt=class extends w.Z{constructor(t){super(t)}get bounds(){const t=this.coords;return null==t||null==t.extent?null:(0,At.oJ)(t.extent)}get coords(){const t=this.element.georeference?.coords;return(0,X.dz)(t,this.spatialReference).geometry}get normalizedCoords(){return Y.Z.fromJSON(function(t,e){if(null==t)return null;const n=t.spatialReference,s=(0,Tt.C5)(n),i="toJSON"in t?t.toJSON():t;if(!s)return i;const r=(0,Tt.sS)(n)?102100:4326,o=Xt.UZ[r].maxX,a=Xt.UZ[r].minX;if((0,Yt.wp)(i))return Nt(i,o,a);if((0,Yt.aW)(i))return i.points=i.points.map((t=>Nt(t,o,a))),i;if((0,Yt.YX)(i))return Vt(i,s);if((0,Yt.oU)(i)||(0,Yt.l9)(i)){const t=(0,Dt.$P)(Ut,i),n={xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]},s=(0,Xt.XZ)(n.xmin,a)*(2*o),r=0===s?i:(0,Xt.Sy)(i,s);return n.xmin+=s,n.xmax+=s,n.xmax>o?Ft(r,o,e):n.xmin<a?Ft(r,a,e):r}return i}(this.coords,!0))}get normalizedBounds(){const t=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=t?(0,At.oJ)(t):null}};(0,s._)([(0,l.Cb)()],Jt.prototype,"spatialReference",void 0),(0,s._)([(0,l.Cb)()],Jt.prototype,"element",void 0),(0,s._)([(0,l.Cb)()],Jt.prototype,"bounds",null),(0,s._)([(0,l.Cb)()],Jt.prototype,"coords",null),(0,s._)([(0,l.Cb)()],Jt.prototype,"normalizedCoords",null),(0,s._)([(0,l.Cb)()],Jt.prototype,"normalizedBounds",null),Jt=(0,s._)([(0,u.j)("esri.layers.support.MediaElementView")],Jt);let Gt=class extends vt{constructor(t){super(t),this.content=null,this.type="video"}load(){const t=this.video;if("string"==typeof t){const e=document.createElement("video");e.src=t,e.crossOrigin="anonymous",e.autoplay=!0,e.muted=!0,e.loop=!0,this.addResolvingPromise(this._loadVideo(e).then((()=>{this._set("content",e)})))}else t instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(t).then((()=>{this._set("content",t)}))):this.addResolvingPromise(Promise.reject(new r.Z("video-element:invalid-video-type","Invalid video type",{video:t})));return Promise.resolve(this)}set video(t){"not-loaded"===this.loadStatus?this._set("video",t):o.Z.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}_loadVideo(t){return new Promise(((e,n)=>{t.oncanplay=()=>{t.oncanplay=null,t.play().then(e,n)},"anonymous"!==t.crossOrigin&&(t.crossOrigin="anonymous",t.src=t.src)}))}};(0,s._)([(0,l.Cb)({readOnly:!0})],Gt.prototype,"content",void 0),(0,s._)([(0,l.Cb)()],Gt.prototype,"video",null),Gt=(0,s._)([(0,u.j)("esri.layers.support.VideoElement")],Gt);const $t=Gt,Kt={key:"type",defaultKeyValue:"image",base:vt,typeMap:{image:Pt,video:$t}},Qt=i.Z.ofType(Kt);let te=class extends(M.Z.LoadableMixin((0,Ot.v)((0,It.p)(Et.Z.EventedAccessor)))){constructor(t){super(t),this._index=new jt.H,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=t=>{for(const e of t.removed){const t=this._elementViewsMap.get(e);this._elementViewsMap.delete(e),this._index.delete(t),this.handles.remove(t),t.destroy(),this.notifyChange("fullExtent")}const{spatialReference:e}=this;for(const n of t.added){if(this._elementViewsMap.get(n))continue;const t=new Jt({spatialReference:e,element:n});this._elementViewsMap.set(n,t);const s=(0,St.YP)((()=>t.coords),(()=>this._updateIndexForElement(t,!1)));this._updateIndexForElement(t,!0),this.handles.add(s,t)}this._elementsIndexes.clear(),this.elements.forEach(((t,e)=>this._elementsIndexes.set(t,e))),this.emit("refresh")},this.elements=new Qt}async load(t){if((0,Bt.k_)(t),!this.spatialReference){const t=this.elements.find((t=>null!=t.georeference&&null!=t.georeference.coords));this._set("spatialReference",t?t.georeference.coords.spatialReference:V.Z.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.handles.add(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(t){this._set("elements",(0,Rt.Z)(t,this._get("elements"),Qt))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const t=this._index.fullBounds;return null==t?null:new pt.Z({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:this.spatialReference})}set spatialReference(t){"not-loaded"===this.loadStatus?this._set("spatialReference",t):o.Z.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(t,e){await this.load(),await(0,X.initializeProjection)(t.spatialReference,this.spatialReference,null,e);const n=(0,Tt.fS)(t.spatialReference,this.spatialReference)?t:(0,X.iV)(t,this.spatialReference);if(!n)return[];const s=n.normalize(),i=[];for(const t of s)this._index.forEachInBounds((0,At.oJ)(t),(({normalizedCoords:e,element:n})=>{null!=e&&(0,Zt.Nl)(t,e)&&i.push(n)}));return i.sort(((t,e)=>this._elementsIndexes.get(t)-this._elementsIndexes.get(e))),i}_updateIndexForElement(t,e){const n=t.normalizedBounds,s=this._index.has(t),i=null!=n;this._index.delete(t),i&&this._index.set(t,n),this.notifyChange("fullExtent"),e||(s!==i?this.emit("refresh"):this.emit("change",{element:t.element}))}};(0,s._)([(0,l.Cb)()],te.prototype,"elements",null),(0,s._)([(0,l.Cb)({readOnly:!0})],te.prototype,"fullExtent",null),(0,s._)([(0,l.Cb)()],te.prototype,"spatialReference",null),te=(0,s._)([(0,u.j)("esri.layers.support.LocalMediaElementSource")],te);const ee=te;function ne(t){return"object"==typeof t&&null!=t&&"type"in t}let se=class extends((0,f.h)((0,_.M)((0,p.q)((0,a.R)(m.Z))))){constructor(t){super(t),this.effectiveSource=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this.source=new ee}load(t){const e=this.source;if(!e)return this.addResolvingPromise(Promise.reject(new r.Z("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer."))),Promise.resolve(this);const n=ne(e)?new ee({elements:new i.Z([e])}):e;this._set("effectiveSource",n),this.spatialReference&&(n.spatialReference=this.spatialReference);const s=n.load(t).then((()=>{this.spatialReference=n.spatialReference}));return this.addResolvingPromise(s),Promise.resolve(this)}destroy(){this.effectiveSource?.destroy(),this.source?.destroy()}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}set source(t){"not-loaded"===this.loadStatus?this._set("source",t):o.Z.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(t){return t?Array.isArray(t)?new ee({elements:new i.Z(t)}):t instanceof i.Z?new ee({elements:t}):t:null}readSource(t,e,n){const s="image"===e.mediaType?new Pt:"video"===e.mediaType?new $t:null;return s?.read(e,n),s}writeSource(t,e,n,s){t&&ne(t)&&"image"===t.type?t.write(e,s):s?.messages&&s?.messages?.push(new r.Z("media-layer:unsupported-source","source must be an 'ImageElement'"))}};(0,s._)([(0,l.Cb)({readOnly:!0})],se.prototype,"effectiveSource",void 0),(0,s._)([(0,l.Cb)({type:String})],se.prototype,"copyright",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],se.prototype,"fullExtent",null),(0,s._)([(0,l.Cb)({type:["MediaLayer"]})],se.prototype,"operationalLayerType",void 0),(0,s._)([(0,l.Cb)({type:["show","hide"]})],se.prototype,"listMode",void 0),(0,s._)([(0,l.Cb)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1}}})],se.prototype,"source",null),(0,s._)([(0,h.p)("source")],se.prototype,"castSource",null),(0,s._)([(0,c.r)("source",["url"])],se.prototype,"readSource",null),(0,s._)([(0,d.c)("source")],se.prototype,"writeSource",null),(0,s._)([(0,l.Cb)()],se.prototype,"spatialReference",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],se.prototype,"type",void 0),se=(0,s._)([(0,u.j)("esri.layers.MediaLayer")],se);const ie=se},37549:(t,e,n)=>{n.d(e,{H:()=>a});var s=n(80442),i=n(24133),r=n(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.Q(9,(0,s.Z)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((n,s)=>{t[e++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.cS)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,n){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,n)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},66094:(t,e,n)=>{n.d(e,{B:()=>i});var s=n(81271);function i(t){return r[function(t){return t instanceof Blob?t.type:function(t){const e=(0,s.Ml)(t);return l[e]||o}(t.url)}(t)]||a}const r={},o="text/plain",a=r[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const t in l)r[l[t]]=t}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6256,2442],{57435:(e,t,r)=>{r.d(t,{Z:()=>u});var i=r(43697),s=r(46791),o=(r(20102),r(92604),r(26258),r(87538)),n=r(5600),a=r(52011);let l=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.own((0,o.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,n.Cb)()],l.prototype,"getCollections",void 0),(0,i._)([(0,n.Cb)()],l.prototype,"getChildrenFunction",void 0),(0,i._)([(0,n.Cb)()],l.prototype,"itemFilterFunction",void 0),l=(0,i._)([(0,a.j)("esri.core.CollectionFlattener")],l);const u=l},68668:(e,t,r)=>{r.d(t,{G:()=>n,w:()=>a});var i=r(66643),s=r(46791),o=r(83379);async function n(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):s.Z.isCollection(t)?t.forEach((e=>n(e))):o.Z.isLoadable(t)&&r.push(t))};t(n);let a=null;if(await(0,i.UI)(r,(async e=>{const t=await(0,i.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},49735:(e,t,r)=>{r.d(t,{Z:()=>I});var i=r(43697),s=r(92036),o=r(20102),n=r(80442),a=r(95330),l=r(81271),u=r(5600),c=(r(75215),r(67676),r(52011)),p=r(2981),y=r(10158),d=r(11282),h=r(41818),f=(r(66577),r(34599)),m=r(14165),b=r(6570),g=r(5396),S=r(4967),_=r(53261),v=r(74889);let w=class extends s.Z{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return(0,l.mN)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),i=null!=e.outStatistics?.[0],s=(0,n.Z)("featurelayer-pbf-statistics"),o=!i||s;let a;if(this.pbfSupported&&o)try{a=await(0,_.t)(this.url,r,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&o||(a=await(0,S.F)(this.url,r,t)),this._normalizeFields(a.fields),a}async featureSetFromJSON(e,t,i){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return v.Z.fromJSON(t);const{meshFeatureSetFromJSON:s}=await(0,a.Hl)(Promise.all([r.e(6481),r.e(6459),r.e(1681)]).then(r.bind(r,91681)),i);return s(e,this.infoFor3D,t)}executeForCount(e,t){return(0,h.P)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,r){const i=(0,d.en)(e);return(0,f.Vr)(i,m.Z.from(t),{...r}).then((e=>({count:e.data.count,extent:b.Z.fromJSON(e.data.extent)})))}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,g.G)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:i},{executeRelationshipQuery:s}]=await(0,a.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:i},{executeRelationshipQueryForCount:s}]=await(0,a.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:i,fetchAttachments:s,processAttachmentQueryResult:o}=await(0,a.Hl)(r.e(540).then(r.bind(r,30540)),t),n=(0,d.en)(this.url);return o(n,await(this.queryAttachmentsSupported?i(n,e,t):s(n,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:i}=await(0,a.Hl)(r.e(1158).then(r.bind(r,71158)),t);return i(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:i}=await(0,a.Hl)(r.e(3992).then(r.bind(r,33992)),t);return i(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:i}=await(0,a.Hl)(r.e(1790).then(r.bind(r,21790)),t);return i(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:i}=await(0,a.Hl)(r.e(4371).then(r.bind(r,14371)),t);return i(this.parsedUrl,e,t)}_normalizeQuery(e){let t=m.Z.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?y.n.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;const{supportedFormats:i,queryFormats:s}=r,n=(0,p.S0)("model/gltf-binary",i)??(0,p.Ow)("glb",i),a=(0,p.S0)("model/gltf+json",i)??(0,p.Ow)("gtlf",i);for(const e of s){if(e===n){t.formatOf3DObjects=e;break}e!==a||t.formatOf3DObjects||(t.formatOf3DObjects=e)}if(!t.formatOf3DObjects)throw new o.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:i,originY:s,originZ:o,translationX:n,translationY:a,translationZ:l,scaleX:u,scaleY:c,scaleZ:p,rotationX:y,rotationY:d,rotationZ:h,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(i,s,o,n,a,l,u,c,p,y,d,h,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,i._)([(0,u.Cb)({type:y.n})],w.prototype,"dynamicDataSource",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"fieldsIndex",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"gdbVersion",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"infoFor3D",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)()],w.prototype,"pbfSupported",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"queryAttachmentsSupported",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,u.Cb)({type:String})],w.prototype,"url",void 0),w=(0,i._)([(0,c.j)("esri.tasks.QueryTask")],w);const I=w},7944:(e,t,r)=>{r.d(t,{O:()=>g});var i=r(43697),s=r(3172),o=r(30175),n=r(95330),a=r(81271),l=r(23670),u=r(5600),c=(r(75215),r(67676),r(80442),r(71715)),p=r(52011),y=r(31263),d=r(6570),h=r(82971),f=r(66677),m=r(21506),b=r(14661);const g=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,s="tile"!==i&&!!t.supportsDynamicLayers,o=r.includes("query"),n=r.includes("map"),a=!!t.exportTilesAllowed,u=r.includes("tilemap"),c=r.includes("data"),p="tile"!==i&&(!t.tileInfo||s),y="tile"!==i&&(!t.tileInfo||s),d="tile"!==i,h=t.cimVersion&&l.G.parse(t.cimVersion),f=h?.since(1,4)??!1,m=h?.since(2,0)??!1;return{operations:{supportsExportMap:n,supportsExportTiles:a,supportsIdentify:o,supportsQuery:c,supportsTileMap:u},exportMap:n?{supportsArcadeExpressionForLabeling:f,supportsSublayersChanges:d,supportsDynamicLayers:s,supportsSublayerVisibility:p,supportsSublayerDefinitionExpression:y,supportsCIMSymbols:m}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchRelatedService(e){const t=this.portalItem;if(!t||!(0,b.Fj)(t))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then((e=>e.find((e=>"Feature Service"===e.type))??null),(()=>null)));const r=await this._relatedFeatureServicePromise;return(0,n.k_)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){const{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,b.Fj)(this.portalItem)&&e.originIdOf("url")<y.s3.SERVICE){const i=await this.fetchRelatedService(t);i&&(e.url=(0,a.v_)(i.url,r.mapLayerId.toString()),e.layerItemId=i.itemId)}const{url:i}=e;let o;if("data-layer"===r.type)o=(await(0,s.default)(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else if(i&&e.originIdOf("url")>y.s3.SERVICE)try{o=(await this._fetchAllLayersAndTablesFromService(i)).get(r.mapLayerId)}catch{}else{let i=e.id;"map-layer"===r?.type&&(i=r.mapLayerId);try{o=(await this.fetchAllLayersAndTables(t)).get(i)}catch{}}return o}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;const r=(0,f.Qc)(e),i=(0,o.s1)(this._allLayersAndTablesMap,r?.url.path,(()=>(0,s.default)((0,a.v_)(r?.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then((e=>{const t=new Map;for(const r of e.data.layers)t.set(r.id,r);return{result:t}}),(e=>({error:e}))))),l=await i;if((0,n.k_)(t),"result"in l)return l.result;throw l.error}};return(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"capabilities",void 0),(0,i._)([(0,c.r)("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),(0,i._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({type:d.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.Cb)(m.id)],t.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),(0,i._)([(0,u.Cb)(m.C_)],t.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)({type:h.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,c.r)("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=(0,i._)([(0,p.j)("esri.layers.mixins.ArcGISMapService")],t),t}},10343:(e,t,r)=>{r.d(t,{x:()=>g});var i=r(43697),s=r(46791),o=r(57435),n=r(20102),a=r(92604),l=r(17445),u=r(5600),c=(r(75215),r(67676),r(80442),r(1153)),p=r(52011),y=r(31263),d=r(49867),h=r(32073);const f=a.Z.getLogger("esri.layers.TileLayer"),m=s.Z.ofType(d.Z);function b(e,t){e&&e.forEach((e=>{t(e),e.sublayers&&e.sublayers.length&&b(e.sublayers,t)}))}const g=e=>{let t=class extends e{constructor(...e){super(...e),this.allSublayers=new o.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={[y.s3.SERVICE]:{},[y.s3.PORTAL_ITEM]:{},[y.s3.WEB_SCENE]:{},[y.s3.WEB_MAP]:{}},this.addHandles((0,l.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),l.Z_))}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,y.M9)(t.origin);if(i<y.s3.SERVICE)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>y.s3.SERVICE)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:s,origin:o}=this.createSublayersForOrigin("web-document"),n=(0,c.vw)(this);n.setDefaultOrigin(o),this._set("sublayers",new m(s)),n.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){const t=(0,y.M9)("web-document"===e?"web-map":e);let r=y.s3.SERVICE,i=this.sublayersSourceJSON[y.s3.SERVICE].layers,s=this.sublayersSourceJSON[y.s3.SERVICE].context,o=null;const n=[y.s3.PORTAL_ITEM,y.s3.WEB_SCENE,y.s3.WEB_MAP].filter((e=>e<=t));for(const e of n){const t=this.sublayersSourceJSON[e];(0,h.ac)(t.layers)&&(r=e,i=t.layers,s=t.context,t.visibleLayers&&(o={visibleLayers:t.visibleLayers,context:t.context}))}const a=[y.s3.PORTAL_ITEM,y.s3.WEB_SCENE,y.s3.WEB_MAP].filter((e=>e>r&&e<=t));let l=null;for(const e of a){const{layers:t,visibleLayers:r,context:i}=this.sublayersSourceJSON[e];t&&(l={layers:t,context:i}),r&&(o={visibleLayers:r,context:i})}const u=function(e,t){const r=[],i={};return e?(e.forEach((e=>{const s=new d.Z;if(s.read(e,t),i[s.id]=s,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(s)}else r.unshift(s)})),r):r}(i,s),c=new Map,p=new Set;if(l)for(const e of l.layers)c.set(e.id,e);if(o?.visibleLayers)for(const e of o.visibleLayers)p.add(e);return b(u,(e=>{l&&e.read(c.get(e.id),l.context),o&&e.read({defaultVisibility:p.has(e.id)},o.context)})),{origin:(0,y.x3)(r),sublayers:new m({items:u})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this,e.layer=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",(e=>{f.error(new n.Z("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()})),"sublayers-owner"))}};return(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"allSublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:s.Z.ofType(d.Z)})],t.prototype,"serviceSublayers",void 0),(0,i._)([(0,u.Cb)({value:null,type:m,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),t=(0,i._)([(0,p.j)("esri.layers.mixins.SublayersOwner")],t),t}},16451:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),s=r(2368),o=r(96674),n=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),u=r(30556),c=r(72729),p=r(70082);let y=class extends((0,s.J)(o.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"id",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"domains",void 0),(0,i._)([(0,a.r)("domains")],y.prototype,"readDomains",null),(0,i._)([(0,u.c)("domains")],y.prototype,"writeDomains",null),(0,i._)([(0,n.Cb)({type:[p.Z],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,i._)([(0,l.j)("esri.layers.support.FeatureType")],y);const d=y},49867:(e,t,r)=>{r.d(t,{Z:()=>X});var i,s=r(43697),o=(r(66577),r(51773)),n=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),a=r(3172),l=r(9790),u=r(46791),c=r(20102),p=r(3920),y=r(80442),d=r(10699),h=r(22974),f=r(83379),m=r(92604),b=r(16453),g=r(42033),S=r(81271),_=r(5600),v=r(90578),w=r(71715),I=r(52011),C=r(30556),x=r(75215),F=r(31263),O=r(1153),E=r(49735),L=r(16451),P=r(1231),D=r(99514),T=r(54306),A=r(30707),R=r(56765),Z=r(72064),j=r(10158),M=r(42843),V=r(56545),N=r(14165),q=r(32163),G=r(6570),k=r(86973);function J(e){return null!=e&&"esriSMS"===e.type}function z(e,t,r){const i=this.originIdOf(t)>=(0,F.M9)(r.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function Q(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(r.origin&&this.originIdOf(t)>=(0,F.M9)(r.origin)||this._isOverridden(t))}}function B(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function U(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=(0,F.M9)(r.origin))}}let H=0;const $=new Set;$.add("layer"),$.add("parent"),$.add("loaded"),$.add("loadStatus"),$.add("loadError"),$.add("loadWarnings");let W=i=class extends((0,p.p)((0,b.R)((0,d.IG)(f.Z)))){constructor(e){super(e),this.capabilities=void 0,this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.sourceJSON=null,this.title=null,this.typeIdField=null,this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise((async()=>{const{layer:t,url:r}=this;if(!t&&!r)throw new c.Z("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=t?await t.fetchSublayerInfo(this,e):(await(0,a.default)(r,{responseType:"json",query:{f:"json"},...e})).data;i&&(this.sourceJSON=i,this.read({layerDefinition:i},{origin:"service"}))})()),this}readCapabilities(e,t){t=t.layerDefinition||t;const{operations:{supportsQuery:r,supportsQueryAttachments:i},query:{supportsFormatPBF:s},data:{supportsAttachment:o}}=(0,Z.h)(t,this.url);return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:r,supportsQueryAttachments:i},data:{supportsAttachment:o},query:{supportsFormatPBF:s}}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get fieldsIndex(){return new D.Z(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get id(){return this._get("id")??H++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},i)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition&&t.layerDefinition.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition&&t.layerDefinition.maxScale||0}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeOID"===e.type)return e.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const r=t.layerDefinition;return 1-.01*((null!=r?.transparency?r.transparency:r?.drawingInfo?.transparency)??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,x.vU)(this.parent.id):t.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{spatialReference:e}=this.layer,t="gdbVersion"in this.layer?this.layer.gdbVersion:void 0,{capabilities:r,fieldsIndex:i}=this,s=(0,y.Z)("featurelayer-pbf")&&r?.query.supportsFormatPBF,o=r?.operations?.supportsQueryAttachments??!1;return new E.Z({url:this.url,pbfSupported:s,fieldsIndex:i,gdbVersion:t,sourceSpatialReference:e,queryAttachmentsSupported:o})}set renderer(e){if(e)for(const t of e.getSymbols())if((0,l.dU)(t)){m.Z.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new M.R({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,x.se)(u.Z.ofType(i),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,S.B7)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,O.vw)(this),t=new i;return(0,O.vw)(t).store=e.clone($),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,q.eZ)(this,e)}createQuery(){return new N.Z({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const{layer:e}=this,t=e?.parsedUrl,i=new(0,(await Promise.all([r.e(8346),r.e(7215),r.e(773),r.e(9238)]).then(r.bind(r,19238))).default)({url:t?.path});return t&&this.source&&("map-layer"===this.source.type?i.layerId=this.source.mapLayerId:i.dynamicDataSource=this.source),null!=e?.refreshInterval&&(i.refreshInterval=e.refreshInterval),this.definitionExpression&&(i.definitionExpression=this.definitionExpression),this.floorInfo&&(i.floorInfo=(0,h.d9)(this.floorInfo)),this.originIdOf("labelingInfo")>F.s3.SERVICE&&(i.labelingInfo=(0,h.d9)(this.labelingInfo)),this.originIdOf("labelsVisible")>F.s3.DEFAULTS&&(i.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>F.s3.DEFAULTS&&(i.legendEnabled=this.legendEnabled),this.originIdOf("visible")>F.s3.DEFAULTS&&(i.visible=this.visible),this.originIdOf("minScale")>F.s3.DEFAULTS&&(i.minScale=this.minScale),this.originIdOf("maxScale")>F.s3.DEFAULTS&&(i.maxScale=this.maxScale),this.originIdOf("opacity")>F.s3.DEFAULTS&&(i.opacity=this.opacity),this.originIdOf("popupTemplate")>F.s3.DEFAULTS&&(i.popupTemplate=(0,h.d9)(this.popupTemplate)),this.originIdOf("renderer")>F.s3.SERVICE&&(i.renderer=(0,h.d9)(this.renderer)),"data-layer"===this.source?.type&&(i.dynamicDataSource=this.source.clone()),this.originIdOf("title")>F.s3.DEFAULTS&&(i.title=this.title),"map-image"===e?.type&&e.originIdOf("customParameters")>F.s3.DEFAULTS&&(i.customParameters=e.customParameters),"tile"===e?.type&&e.originIdOf("customParameters")>F.s3.DEFAULTS&&(i.customParameters=e.customParameters),i}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r?.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t&&t.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){await this.load(),e=V.Z.from(e);const r=this.capabilities;if(!r?.data?.supportsAttachment)throw new c.Z("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:s,globalIds:o,num:n,size:a,start:l,where:u}=e;if(!r?.operations?.supportsQueryAttachments&&(i?.length>0||o?.length>0||a?.length>0||n||l||u))throw new c.Z("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(s?.length||o?.length||u))throw new c.Z("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return this.queryTask.executeAttachmentQuery(e,t)}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new c.Z("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new c.Z("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features)for(const e of r.features)e.sourceLayer=this;return r}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,g._)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,t)=>(e[t]=this.originIdOf(t),e)),{}),s=Object.keys(i).some((e=>i[e]>F.s3.SERVICE));if(s){const e=t.drawingInfo={};if(i.renderer>F.s3.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>F.s3.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>F.s3.SERVICE){!this.loaded&&this.labelingInfo.some((e=>!e.labelPlacement))&&m.Z.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,A.a)(this.labelingInfo,k.M.toJSON(this.geometryType))),e.labelingInfo=t.filter((e=>e.labelPlacement)).map((e=>e.toJSON({origin:"service",layer:this.layer}))),e.showLabels=!0}i.opacity>F.s3.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline&&e.outline.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of r)J(e.symbol)&&t(e.symbol);"symbol"in e&&J(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&J(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let s,o;switch(e){case"definitionExpression":case"floorInfo":s="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":s="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":s="supportsDynamicLayers",o="supportsModification"}const n=(0,O.vw)(this).getDefaultOrigin();if("service"!==n){if(s&&!1===this.layer?.capabilities?.exportMap?.[s])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${s}'`);if(o&&!1===this.capabilities?.exportMap[o])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${o}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==n&&i!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.handles.removeAll()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{const t=this.layer?.capabilities?.exportMap?.supportsSublayersChanges;null==t||t||(m.Z.getLogger(this).error(new c.Z("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,t){const{layer:r,declaredClass:i}=this;m.Z.getLogger(i).error(new c.Z("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};W.test={isMapImageLayerOverridePolicy:e=>e===B||e===z,isTileImageLayerOverridePolicy:e=>e===Q},(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"capabilities",void 0),(0,s._)([(0,w.r)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],W.prototype,"readCapabilities",null),(0,s._)([(0,_.Cb)()],W.prototype,"defaultPopupTemplate",null),(0,s._)([(0,_.Cb)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:z}}})],W.prototype,"definitionExpression",null),(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"effectiveScaleRange",null),(0,s._)([(0,_.Cb)({type:[P.Z],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],W.prototype,"fields",void 0),(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"fieldsIndex",null),(0,s._)([(0,_.Cb)({type:R.Z,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:z},origins:{"web-scene":{read:!1,write:!1}}}})],W.prototype,"floorInfo",null),(0,s._)([(0,_.Cb)({type:G.Z,json:{read:{source:"layerDefinition.extent"}}})],W.prototype,"fullExtent",void 0),(0,s._)([(0,_.Cb)({type:k.M.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:k.M.read}}}}})],W.prototype,"geometryType",void 0),(0,s._)([(0,_.Cb)({type:String})],W.prototype,"globalIdField",void 0),(0,s._)([(0,w.r)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],W.prototype,"readGlobalIdFieldFromService",null),(0,s._)([(0,_.Cb)({type:x.z8,json:{write:{ignoreOrigin:!0}}})],W.prototype,"id",null),(0,s._)([(0,_.Cb)({value:null,type:[T.Z],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:B}}})],W.prototype,"labelingInfo",null),(0,s._)([(0,C.c)("labelingInfo")],W.prototype,"writeLabelingInfo",null),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:B}}})],W.prototype,"labelsVisible",null),(0,s._)([(0,_.Cb)({value:null})],W.prototype,"layer",null),(0,s._)([(0,_.Cb)({type:String,json:{write:{overridePolicy:Q}}})],W.prototype,"layerItemId",void 0),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:U}}})],W.prototype,"legendEnabled",void 0),(0,s._)([(0,_.Cb)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],W.prototype,"listMode",null),(0,s._)([(0,_.Cb)({type:Number,value:0,json:{write:{overridePolicy:B}}})],W.prototype,"minScale",null),(0,s._)([(0,w.r)("minScale",["minScale","layerDefinition.minScale"])],W.prototype,"readMinScale",null),(0,s._)([(0,_.Cb)({type:Number,value:0,json:{write:{overridePolicy:B}}})],W.prototype,"maxScale",null),(0,s._)([(0,w.r)("maxScale",["maxScale","layerDefinition.maxScale"])],W.prototype,"readMaxScale",null),(0,s._)([(0,_.Cb)({type:String})],W.prototype,"objectIdField",void 0),(0,s._)([(0,w.r)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],W.prototype,"readObjectIdFieldFromService",null),(0,s._)([(0,_.Cb)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:B}}})],W.prototype,"opacity",null),(0,s._)([(0,w.r)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],W.prototype,"readOpacity",null),(0,s._)([(0,C.c)("opacity")],W.prototype,"writeOpacity",null),(0,s._)([(0,_.Cb)({json:{type:x.z8,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:B}}})],W.prototype,"parent",void 0),(0,s._)([(0,C.c)("parent")],W.prototype,"writeParent",null),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:U,writer(e,t,r){t[r]=!e}}}})],W.prototype,"popupEnabled",void 0),(0,s._)([(0,_.Cb)({type:o.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:U}}})],W.prototype,"popupTemplate",void 0),(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"queryTask",null),(0,s._)([(0,_.Cb)({types:n.A,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:B},origins:{"web-scene":{types:n.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:B}}}}})],W.prototype,"renderer",null),(0,s._)([(0,_.Cb)({types:{key:"type",base:null,typeMap:{"data-layer":j.n,"map-layer":M.R}},cast(e){if(e){if("mapLayerId"in e)return(0,x.TJ)(M.R,e);if("dataSource"in e)return(0,x.TJ)(j.n,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:B}}})],W.prototype,"source",null),(0,s._)([(0,_.Cb)()],W.prototype,"sourceJSON",void 0),(0,s._)([(0,_.Cb)({value:null,json:{type:[x.z8],write:{target:"subLayerIds",allowNull:!0,overridePolicy:B}}})],W.prototype,"sublayers",null),(0,s._)([(0,v.p)("sublayers")],W.prototype,"castSublayers",null),(0,s._)([(0,C.c)("sublayers")],W.prototype,"writeSublayers",null),(0,s._)([(0,_.Cb)({type:String,json:{name:"name",write:{overridePolicy:U}}})],W.prototype,"title",void 0),(0,s._)([(0,_.Cb)({type:String})],W.prototype,"typeIdField",void 0),(0,s._)([(0,w.r)("typeIdField",["layerDefinition.typeIdField"])],W.prototype,"readTypeIdField",null),(0,s._)([(0,_.Cb)({type:[L.Z],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],W.prototype,"types",void 0),(0,s._)([(0,_.Cb)({type:String,json:{name:"layerUrl",write:{overridePolicy:Q}}})],W.prototype,"url",null),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:B}}})],W.prototype,"visible",null),(0,s._)([(0,C.c)("visible")],W.prototype,"writeVisible",null),W=i=(0,s._)([(0,I.j)("esri.layers.support.Sublayer")],W);const X=W},90082:(e,t,r)=>{r.d(t,{V:()=>n,g:()=>o});var i=r(20102),s=r(95330);async function o(e,t,r){let o;try{o=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.k_)(r),o}async function n(e,t,r,o,n){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load tile ${t}/${r}/${o}`,{error:e,level:t,row:r,col:o})}return(0,s.k_)(n),a}},2981:(e,t,r)=>{r.d(t,{$6:()=>c,Ow:()=>o,S0:()=>s,d1:()=>n});const i=[["binary","application/octet-stream","bin",""]];function s(e,t){return l(function(e,t){return a(t).find((t=>u(t)===e))}(e,t))}function o(e,t){return l(function(e,t){const r=e.toLowerCase();return a(t).find((e=>function(e){return e?.[2].split(",")??[]}(e).some((e=>r.endsWith(e)))))}(e,t))}function n(e,t){return u(function(e,t){return a(t).find((t=>l(t)===e))}(e,t))}function a(e){return[...i,...e]}function l(e){return e?.[0]}function u(e){return e?.[1]}function c(e){return e.tables?.find((e=>"assetMaps"===e.role))}},32073:(e,t,r)=>{r.d(t,{FN:()=>o,QV:()=>s,ac:()=>a});var i=r(31263);function s(e,t,r){const i=t.flatten((({sublayers:e})=>e)).length;return i!==e.length||!!e.some((e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r))||!n(e,t)}function o(e,t,r){return!!e.some((e=>{const t=e.source;return!(!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r))||e.originIdOf("renderer")>i.s3.SERVICE||e.originIdOf("labelingInfo")>i.s3.SERVICE||e.originIdOf("opacity")>i.s3.SERVICE||e.originIdOf("labelsVisible")>i.s3.SERVICE}))||!n(e,t)}function n(e,t){if(!e||!e.length||null==t)return!0;const r=t.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).map((e=>e.id)).toArray();if(e.length>r.length)return!1;let i=0;const s=r.length;for(const{id:t}of e){for(;i<s&&r[i]!==t;)i++;if(i>=s)return!1}return!0}function a(e){return!!e&&e.some((e=>null!=e.minScale||e.layerDefinition&&null!=e.layerDefinition.minScale))}},41818:(e,t,r)=>{r.d(t,{P:()=>n});var i=r(11282),s=r(34599),o=r(14165);async function n(e,t,r){const n=(0,i.en)(e);return(0,s.hH)(n,o.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>n});var i=r(11282),s=r(34599),o=r(14165);async function n(e,t,r){const n=(0,i.en)(e);return(0,s.Ev)(n,o.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>l,e:()=>a});var i=r(11282),s=r(34599),o=r(74889),n=r(14165);async function a(e,t,r){const i=await l(e,t,r);return o.Z.fromJSON(i)}async function l(e,t,r){const o=(0,i.en)(e),a={...r},l=n.Z.from(t),{data:u}=await(0,s.JT)(o,l,l.sourceSpatialReference,a);return u}},53261:(e,t,r)=>{r.d(t,{t:()=>m});var i=r(11282),s=r(70586),o=r(69285),n=r(98732);function a(e,t){return t}function l(e,t,r,i){switch(r){case 0:return y(e,t+i,0);case 1:return"lowerLeft"===e.originPosition?y(e,t+i,1):function({translate:e,scale:t},r,i){return e[i]-r*t[i]}(e,t+i,1)}}function u(e,t,r,i){return 2===r?y(e,t,2):l(e,t,r,i)}function c(e,t,r,i){return 2===r?y(e,t,3):l(e,t,r,i)}function p(e,t,r,i){return 3===r?y(e,t,3):u(e,t,r,i)}function y({translate:e,scale:t},r,i){return e[i]+r*t[i]}class d{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=a,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,o.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,s.O3)(r),r.push(t);const i=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of i)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:i}=t,s=(0,n.$g)(r.clone(),r,!1,!1,this._transform),o=(0,n.di)(s,i,!1,!1);e.queryGeometryType=i,e.queryGeometry={...o}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const i=(0,s.s3)(this._transform,"transform");switch(t=this._applyTransform(i,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const i=(0,s.s3)(this._transform,"transform");return this._applyTransform(i,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const i=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(i)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const i=this._transformPathLikeValue(t,r),s=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),s.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=i}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?p:t?u:r?c:l}}var h=r(34599),f=(r(74889),r(14165));async function m(e,t,r){const s=(0,i.en)(e),o={...r},n=f.Z.from(t),a=!n.quantizationParameters,{data:l}=await(0,h.qp)(s,n,new d({sourceSpatialReference:n.sourceSpatialReference,applyTransform:a}),o);return l}},28694:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(69285);function s(e,t,r){if(!r||!r.features||!r.hasZ)return;const s=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>S});var i,s=r(43697),o=r(66577),n=r(38171),a=r(35454),l=r(96674),u=r(22974),c=r(5600),p=(r(75215),r(71715)),y=r(52011),d=r(30556),h=r(82971),f=r(33955),m=r(1231);const b=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=i=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],o=n.Z.fromJSON(s),a=s.geometry&&s.geometry.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=r);const l=s.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void b.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(e&&null!=e.geometry)return void b.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.Z.fromJSON(t.spatialReference)),i}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 i(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-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:[i,s],scale:[o,n]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>s-e*n),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const o=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=r(a[1]);e===i&&n===s||(o.push([e-i,n-s]),i=e,s=n)}else i=t(a[0]),s=r(a[1]),o.push([i,s])}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 i=(0,f.oU)(e)?e.rings:e.paths,s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],n=this._quantizePoints(o,t,r);n&&s.push(n)}return s.length>0?((0,f.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.oU)(e)?e.rings:e.paths;let n,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],a+=s[1]):(n=s[0],a=s[1]),s[0]=t(n),s[1]=r(a)}}if(i&&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]=i(r[2]),r[3]=s(r[3])}}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])}}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])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(n+=i[0],a+=i[1]):(n=i[0],a=i[1]),i[0]=t(n),i[1]=r(a)}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,c.Cb)({type:[n.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,s._)([(0,p.r)("features")],g.prototype,"readFeatures",null),(0,s._)([(0,c.Cb)({type:[m.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,s._)([(0,c.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],g.prototype,"geometryType",void 0),(0,s._)([(0,d.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,s._)([(0,c.Cb)({types:o.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,s._)([(0,p.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,s._)([(0,c.Cb)({type:h.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,s._)([(0,d.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,s._)([(0,c.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=i=(0,s._)([(0,y.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const S=g},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>s,eG:()=>l,lF:()=>n,lj:()=>c,qP:()=>a,wW:()=>u});const i=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},n={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6256,2442],{57435:(e,t,r)=>{r.d(t,{Z:()=>u});var i=r(43697),s=r(46791),o=(r(20102),r(92604),r(26258),r(87538)),n=r(5600),a=r(52011);let l=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.own((0,o.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,n.Cb)()],l.prototype,"getCollections",void 0),(0,i._)([(0,n.Cb)()],l.prototype,"getChildrenFunction",void 0),(0,i._)([(0,n.Cb)()],l.prototype,"itemFilterFunction",void 0),l=(0,i._)([(0,a.j)("esri.core.CollectionFlattener")],l);const u=l},68668:(e,t,r)=>{r.d(t,{G:()=>n,w:()=>a});var i=r(66643),s=r(46791),o=r(83379);async function n(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):s.Z.isCollection(t)?t.forEach((e=>n(e))):o.Z.isLoadable(t)&&r.push(t))};t(n);let a=null;if(await(0,i.UI)(r,(async e=>{const t=await(0,i.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},49735:(e,t,r)=>{r.d(t,{Z:()=>I});var i=r(43697),s=r(92036),o=r(20102),n=r(80442),a=r(95330),l=r(81271),u=r(5600),c=(r(75215),r(67676),r(52011)),p=r(2981),y=r(10158),d=r(11282),h=r(41818),f=(r(66577),r(34599)),m=r(14165),b=r(6570),g=r(5396),S=r(4967),_=r(53261),v=r(74889);let w=class extends s.Z{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return(0,l.mN)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),i=null!=e.outStatistics?.[0],s=(0,n.Z)("featurelayer-pbf-statistics"),o=!i||s;let a;if(this.pbfSupported&&o)try{a=await(0,_.t)(this.url,r,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&o||(a=await(0,S.F)(this.url,r,t)),this._normalizeFields(a.fields),a}async featureSetFromJSON(e,t,i){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return v.Z.fromJSON(t);const{meshFeatureSetFromJSON:s}=await(0,a.Hl)(Promise.all([r.e(6481),r.e(6459),r.e(2097)]).then(r.bind(r,91681)),i);return s(e,this.infoFor3D,t)}executeForCount(e,t){return(0,h.P)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,r){const i=(0,d.en)(e);return(0,f.Vr)(i,m.Z.from(t),{...r}).then((e=>({count:e.data.count,extent:b.Z.fromJSON(e.data.extent)})))}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,g.G)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:i},{executeRelationshipQuery:s}]=await(0,a.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:i},{executeRelationshipQueryForCount:s}]=await(0,a.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:i,fetchAttachments:s,processAttachmentQueryResult:o}=await(0,a.Hl)(r.e(540).then(r.bind(r,30540)),t),n=(0,d.en)(this.url);return o(n,await(this.queryAttachmentsSupported?i(n,e,t):s(n,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:i}=await(0,a.Hl)(r.e(1158).then(r.bind(r,71158)),t);return i(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:i}=await(0,a.Hl)(r.e(3992).then(r.bind(r,33992)),t);return i(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:i}=await(0,a.Hl)(r.e(1790).then(r.bind(r,21790)),t);return i(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:i}=await(0,a.Hl)(r.e(4371).then(r.bind(r,14371)),t);return i(this.parsedUrl,e,t)}_normalizeQuery(e){let t=m.Z.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?y.n.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;const{supportedFormats:i,queryFormats:s}=r,n=(0,p.S0)("model/gltf-binary",i)??(0,p.Ow)("glb",i),a=(0,p.S0)("model/gltf+json",i)??(0,p.Ow)("gtlf",i);for(const e of s){if(e===n){t.formatOf3DObjects=e;break}e!==a||t.formatOf3DObjects||(t.formatOf3DObjects=e)}if(!t.formatOf3DObjects)throw new o.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:i,originY:s,originZ:o,translationX:n,translationY:a,translationZ:l,scaleX:u,scaleY:c,scaleZ:p,rotationX:y,rotationY:d,rotationZ:h,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(i,s,o,n,a,l,u,c,p,y,d,h,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,i._)([(0,u.Cb)({type:y.n})],w.prototype,"dynamicDataSource",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"fieldsIndex",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"gdbVersion",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"infoFor3D",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)()],w.prototype,"pbfSupported",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"queryAttachmentsSupported",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,u.Cb)({type:String})],w.prototype,"url",void 0),w=(0,i._)([(0,c.j)("esri.tasks.QueryTask")],w);const I=w},7944:(e,t,r)=>{r.d(t,{O:()=>g});var i=r(43697),s=r(3172),o=r(30175),n=r(95330),a=r(81271),l=r(23670),u=r(5600),c=(r(75215),r(67676),r(80442),r(71715)),p=r(52011),y=r(31263),d=r(6570),h=r(82971),f=r(66677),m=r(21506),b=r(14661);const g=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,s="tile"!==i&&!!t.supportsDynamicLayers,o=r.includes("query"),n=r.includes("map"),a=!!t.exportTilesAllowed,u=r.includes("tilemap"),c=r.includes("data"),p="tile"!==i&&(!t.tileInfo||s),y="tile"!==i&&(!t.tileInfo||s),d="tile"!==i,h=t.cimVersion&&l.G.parse(t.cimVersion),f=h?.since(1,4)??!1,m=h?.since(2,0)??!1;return{operations:{supportsExportMap:n,supportsExportTiles:a,supportsIdentify:o,supportsQuery:c,supportsTileMap:u},exportMap:n?{supportsArcadeExpressionForLabeling:f,supportsSublayersChanges:d,supportsDynamicLayers:s,supportsSublayerVisibility:p,supportsSublayerDefinitionExpression:y,supportsCIMSymbols:m}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchRelatedService(e){const t=this.portalItem;if(!t||!(0,b.Fj)(t))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then((e=>e.find((e=>"Feature Service"===e.type))??null),(()=>null)));const r=await this._relatedFeatureServicePromise;return(0,n.k_)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){const{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,b.Fj)(this.portalItem)&&e.originIdOf("url")<y.s3.SERVICE){const i=await this.fetchRelatedService(t);i&&(e.url=(0,a.v_)(i.url,r.mapLayerId.toString()),e.layerItemId=i.itemId)}const{url:i}=e;let o;if("data-layer"===r.type)o=(await(0,s.default)(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else if(i&&e.originIdOf("url")>y.s3.SERVICE)try{o=(await this._fetchAllLayersAndTablesFromService(i)).get(r.mapLayerId)}catch{}else{let i=e.id;"map-layer"===r?.type&&(i=r.mapLayerId);try{o=(await this.fetchAllLayersAndTables(t)).get(i)}catch{}}return o}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;const r=(0,f.Qc)(e),i=(0,o.s1)(this._allLayersAndTablesMap,r?.url.path,(()=>(0,s.default)((0,a.v_)(r?.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then((e=>{const t=new Map;for(const r of e.data.layers)t.set(r.id,r);return{result:t}}),(e=>({error:e}))))),l=await i;if((0,n.k_)(t),"result"in l)return l.result;throw l.error}};return(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"capabilities",void 0),(0,i._)([(0,c.r)("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),(0,i._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({type:d.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.Cb)(m.id)],t.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),(0,i._)([(0,u.Cb)(m.C_)],t.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)({type:h.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,c.r)("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=(0,i._)([(0,p.j)("esri.layers.mixins.ArcGISMapService")],t),t}},10343:(e,t,r)=>{r.d(t,{x:()=>g});var i=r(43697),s=r(46791),o=r(57435),n=r(20102),a=r(92604),l=r(17445),u=r(5600),c=(r(75215),r(67676),r(80442),r(1153)),p=r(52011),y=r(31263),d=r(49867),h=r(32073);const f=a.Z.getLogger("esri.layers.TileLayer"),m=s.Z.ofType(d.Z);function b(e,t){e&&e.forEach((e=>{t(e),e.sublayers&&e.sublayers.length&&b(e.sublayers,t)}))}const g=e=>{let t=class extends e{constructor(...e){super(...e),this.allSublayers=new o.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={[y.s3.SERVICE]:{},[y.s3.PORTAL_ITEM]:{},[y.s3.WEB_SCENE]:{},[y.s3.WEB_MAP]:{}},this.addHandles((0,l.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),l.Z_))}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,y.M9)(t.origin);if(i<y.s3.SERVICE)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>y.s3.SERVICE)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:s,origin:o}=this.createSublayersForOrigin("web-document"),n=(0,c.vw)(this);n.setDefaultOrigin(o),this._set("sublayers",new m(s)),n.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){const t=(0,y.M9)("web-document"===e?"web-map":e);let r=y.s3.SERVICE,i=this.sublayersSourceJSON[y.s3.SERVICE].layers,s=this.sublayersSourceJSON[y.s3.SERVICE].context,o=null;const n=[y.s3.PORTAL_ITEM,y.s3.WEB_SCENE,y.s3.WEB_MAP].filter((e=>e<=t));for(const e of n){const t=this.sublayersSourceJSON[e];(0,h.ac)(t.layers)&&(r=e,i=t.layers,s=t.context,t.visibleLayers&&(o={visibleLayers:t.visibleLayers,context:t.context}))}const a=[y.s3.PORTAL_ITEM,y.s3.WEB_SCENE,y.s3.WEB_MAP].filter((e=>e>r&&e<=t));let l=null;for(const e of a){const{layers:t,visibleLayers:r,context:i}=this.sublayersSourceJSON[e];t&&(l={layers:t,context:i}),r&&(o={visibleLayers:r,context:i})}const u=function(e,t){const r=[],i={};return e?(e.forEach((e=>{const s=new d.Z;if(s.read(e,t),i[s.id]=s,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(s)}else r.unshift(s)})),r):r}(i,s),c=new Map,p=new Set;if(l)for(const e of l.layers)c.set(e.id,e);if(o?.visibleLayers)for(const e of o.visibleLayers)p.add(e);return b(u,(e=>{l&&e.read(c.get(e.id),l.context),o&&e.read({defaultVisibility:p.has(e.id)},o.context)})),{origin:(0,y.x3)(r),sublayers:new m({items:u})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this,e.layer=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",(e=>{f.error(new n.Z("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()})),"sublayers-owner"))}};return(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"allSublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:s.Z.ofType(d.Z)})],t.prototype,"serviceSublayers",void 0),(0,i._)([(0,u.Cb)({value:null,type:m,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),t=(0,i._)([(0,p.j)("esri.layers.mixins.SublayersOwner")],t),t}},16451:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),s=r(2368),o=r(96674),n=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),u=r(30556),c=r(72729),p=r(70082);let y=class extends((0,s.J)(o.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"id",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"domains",void 0),(0,i._)([(0,a.r)("domains")],y.prototype,"readDomains",null),(0,i._)([(0,u.c)("domains")],y.prototype,"writeDomains",null),(0,i._)([(0,n.Cb)({type:[p.Z],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,i._)([(0,l.j)("esri.layers.support.FeatureType")],y);const d=y},49867:(e,t,r)=>{r.d(t,{Z:()=>X});var i,s=r(43697),o=(r(66577),r(51773)),n=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),a=r(3172),l=r(9790),u=r(46791),c=r(20102),p=r(3920),y=r(80442),d=r(10699),h=r(22974),f=r(83379),m=r(92604),b=r(16453),g=r(42033),S=r(81271),_=r(5600),v=r(90578),w=r(71715),I=r(52011),C=r(30556),x=r(75215),F=r(31263),O=r(1153),E=r(49735),L=r(16451),P=r(1231),D=r(99514),T=r(54306),A=r(30707),R=r(56765),Z=r(72064),j=r(10158),M=r(42843),V=r(56545),N=r(14165),q=r(32163),G=r(6570),k=r(86973);function J(e){return null!=e&&"esriSMS"===e.type}function z(e,t,r){const i=this.originIdOf(t)>=(0,F.M9)(r.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function Q(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(r.origin&&this.originIdOf(t)>=(0,F.M9)(r.origin)||this._isOverridden(t))}}function B(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function U(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=(0,F.M9)(r.origin))}}let H=0;const $=new Set;$.add("layer"),$.add("parent"),$.add("loaded"),$.add("loadStatus"),$.add("loadError"),$.add("loadWarnings");let W=i=class extends((0,p.p)((0,b.R)((0,d.IG)(f.Z)))){constructor(e){super(e),this.capabilities=void 0,this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.sourceJSON=null,this.title=null,this.typeIdField=null,this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise((async()=>{const{layer:t,url:r}=this;if(!t&&!r)throw new c.Z("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=t?await t.fetchSublayerInfo(this,e):(await(0,a.default)(r,{responseType:"json",query:{f:"json"},...e})).data;i&&(this.sourceJSON=i,this.read({layerDefinition:i},{origin:"service"}))})()),this}readCapabilities(e,t){t=t.layerDefinition||t;const{operations:{supportsQuery:r,supportsQueryAttachments:i},query:{supportsFormatPBF:s},data:{supportsAttachment:o}}=(0,Z.h)(t,this.url);return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:r,supportsQueryAttachments:i},data:{supportsAttachment:o},query:{supportsFormatPBF:s}}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get fieldsIndex(){return new D.Z(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get id(){return this._get("id")??H++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},i)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition&&t.layerDefinition.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition&&t.layerDefinition.maxScale||0}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeOID"===e.type)return e.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const r=t.layerDefinition;return 1-.01*((null!=r?.transparency?r.transparency:r?.drawingInfo?.transparency)??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,x.vU)(this.parent.id):t.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{spatialReference:e}=this.layer,t="gdbVersion"in this.layer?this.layer.gdbVersion:void 0,{capabilities:r,fieldsIndex:i}=this,s=(0,y.Z)("featurelayer-pbf")&&r?.query.supportsFormatPBF,o=r?.operations?.supportsQueryAttachments??!1;return new E.Z({url:this.url,pbfSupported:s,fieldsIndex:i,gdbVersion:t,sourceSpatialReference:e,queryAttachmentsSupported:o})}set renderer(e){if(e)for(const t of e.getSymbols())if((0,l.dU)(t)){m.Z.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new M.R({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,x.se)(u.Z.ofType(i),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,S.B7)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,O.vw)(this),t=new i;return(0,O.vw)(t).store=e.clone($),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,q.eZ)(this,e)}createQuery(){return new N.Z({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const{layer:e}=this,t=e?.parsedUrl,i=new(0,(await Promise.all([r.e(8346),r.e(7215),r.e(773),r.e(9238)]).then(r.bind(r,19238))).default)({url:t?.path});return t&&this.source&&("map-layer"===this.source.type?i.layerId=this.source.mapLayerId:i.dynamicDataSource=this.source),null!=e?.refreshInterval&&(i.refreshInterval=e.refreshInterval),this.definitionExpression&&(i.definitionExpression=this.definitionExpression),this.floorInfo&&(i.floorInfo=(0,h.d9)(this.floorInfo)),this.originIdOf("labelingInfo")>F.s3.SERVICE&&(i.labelingInfo=(0,h.d9)(this.labelingInfo)),this.originIdOf("labelsVisible")>F.s3.DEFAULTS&&(i.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>F.s3.DEFAULTS&&(i.legendEnabled=this.legendEnabled),this.originIdOf("visible")>F.s3.DEFAULTS&&(i.visible=this.visible),this.originIdOf("minScale")>F.s3.DEFAULTS&&(i.minScale=this.minScale),this.originIdOf("maxScale")>F.s3.DEFAULTS&&(i.maxScale=this.maxScale),this.originIdOf("opacity")>F.s3.DEFAULTS&&(i.opacity=this.opacity),this.originIdOf("popupTemplate")>F.s3.DEFAULTS&&(i.popupTemplate=(0,h.d9)(this.popupTemplate)),this.originIdOf("renderer")>F.s3.SERVICE&&(i.renderer=(0,h.d9)(this.renderer)),"data-layer"===this.source?.type&&(i.dynamicDataSource=this.source.clone()),this.originIdOf("title")>F.s3.DEFAULTS&&(i.title=this.title),"map-image"===e?.type&&e.originIdOf("customParameters")>F.s3.DEFAULTS&&(i.customParameters=e.customParameters),"tile"===e?.type&&e.originIdOf("customParameters")>F.s3.DEFAULTS&&(i.customParameters=e.customParameters),i}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r?.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t&&t.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){await this.load(),e=V.Z.from(e);const r=this.capabilities;if(!r?.data?.supportsAttachment)throw new c.Z("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:s,globalIds:o,num:n,size:a,start:l,where:u}=e;if(!r?.operations?.supportsQueryAttachments&&(i?.length>0||o?.length>0||a?.length>0||n||l||u))throw new c.Z("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(s?.length||o?.length||u))throw new c.Z("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return this.queryTask.executeAttachmentQuery(e,t)}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new c.Z("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new c.Z("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features)for(const e of r.features)e.sourceLayer=this;return r}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,g._)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,t)=>(e[t]=this.originIdOf(t),e)),{}),s=Object.keys(i).some((e=>i[e]>F.s3.SERVICE));if(s){const e=t.drawingInfo={};if(i.renderer>F.s3.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>F.s3.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>F.s3.SERVICE){!this.loaded&&this.labelingInfo.some((e=>!e.labelPlacement))&&m.Z.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,A.a)(this.labelingInfo,k.M.toJSON(this.geometryType))),e.labelingInfo=t.filter((e=>e.labelPlacement)).map((e=>e.toJSON({origin:"service",layer:this.layer}))),e.showLabels=!0}i.opacity>F.s3.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline&&e.outline.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of r)J(e.symbol)&&t(e.symbol);"symbol"in e&&J(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&J(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let s,o;switch(e){case"definitionExpression":case"floorInfo":s="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":s="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":s="supportsDynamicLayers",o="supportsModification"}const n=(0,O.vw)(this).getDefaultOrigin();if("service"!==n){if(s&&!1===this.layer?.capabilities?.exportMap?.[s])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${s}'`);if(o&&!1===this.capabilities?.exportMap[o])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${o}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==n&&i!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.handles.removeAll()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{const t=this.layer?.capabilities?.exportMap?.supportsSublayersChanges;null==t||t||(m.Z.getLogger(this).error(new c.Z("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,t){const{layer:r,declaredClass:i}=this;m.Z.getLogger(i).error(new c.Z("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};W.test={isMapImageLayerOverridePolicy:e=>e===B||e===z,isTileImageLayerOverridePolicy:e=>e===Q},(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"capabilities",void 0),(0,s._)([(0,w.r)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],W.prototype,"readCapabilities",null),(0,s._)([(0,_.Cb)()],W.prototype,"defaultPopupTemplate",null),(0,s._)([(0,_.Cb)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:z}}})],W.prototype,"definitionExpression",null),(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"effectiveScaleRange",null),(0,s._)([(0,_.Cb)({type:[P.Z],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],W.prototype,"fields",void 0),(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"fieldsIndex",null),(0,s._)([(0,_.Cb)({type:R.Z,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:z},origins:{"web-scene":{read:!1,write:!1}}}})],W.prototype,"floorInfo",null),(0,s._)([(0,_.Cb)({type:G.Z,json:{read:{source:"layerDefinition.extent"}}})],W.prototype,"fullExtent",void 0),(0,s._)([(0,_.Cb)({type:k.M.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:k.M.read}}}}})],W.prototype,"geometryType",void 0),(0,s._)([(0,_.Cb)({type:String})],W.prototype,"globalIdField",void 0),(0,s._)([(0,w.r)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],W.prototype,"readGlobalIdFieldFromService",null),(0,s._)([(0,_.Cb)({type:x.z8,json:{write:{ignoreOrigin:!0}}})],W.prototype,"id",null),(0,s._)([(0,_.Cb)({value:null,type:[T.Z],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:B}}})],W.prototype,"labelingInfo",null),(0,s._)([(0,C.c)("labelingInfo")],W.prototype,"writeLabelingInfo",null),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:B}}})],W.prototype,"labelsVisible",null),(0,s._)([(0,_.Cb)({value:null})],W.prototype,"layer",null),(0,s._)([(0,_.Cb)({type:String,json:{write:{overridePolicy:Q}}})],W.prototype,"layerItemId",void 0),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:U}}})],W.prototype,"legendEnabled",void 0),(0,s._)([(0,_.Cb)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],W.prototype,"listMode",null),(0,s._)([(0,_.Cb)({type:Number,value:0,json:{write:{overridePolicy:B}}})],W.prototype,"minScale",null),(0,s._)([(0,w.r)("minScale",["minScale","layerDefinition.minScale"])],W.prototype,"readMinScale",null),(0,s._)([(0,_.Cb)({type:Number,value:0,json:{write:{overridePolicy:B}}})],W.prototype,"maxScale",null),(0,s._)([(0,w.r)("maxScale",["maxScale","layerDefinition.maxScale"])],W.prototype,"readMaxScale",null),(0,s._)([(0,_.Cb)({type:String})],W.prototype,"objectIdField",void 0),(0,s._)([(0,w.r)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],W.prototype,"readObjectIdFieldFromService",null),(0,s._)([(0,_.Cb)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:B}}})],W.prototype,"opacity",null),(0,s._)([(0,w.r)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],W.prototype,"readOpacity",null),(0,s._)([(0,C.c)("opacity")],W.prototype,"writeOpacity",null),(0,s._)([(0,_.Cb)({json:{type:x.z8,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:B}}})],W.prototype,"parent",void 0),(0,s._)([(0,C.c)("parent")],W.prototype,"writeParent",null),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:U,writer(e,t,r){t[r]=!e}}}})],W.prototype,"popupEnabled",void 0),(0,s._)([(0,_.Cb)({type:o.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:U}}})],W.prototype,"popupTemplate",void 0),(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"queryTask",null),(0,s._)([(0,_.Cb)({types:n.A,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:B},origins:{"web-scene":{types:n.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:B}}}}})],W.prototype,"renderer",null),(0,s._)([(0,_.Cb)({types:{key:"type",base:null,typeMap:{"data-layer":j.n,"map-layer":M.R}},cast(e){if(e){if("mapLayerId"in e)return(0,x.TJ)(M.R,e);if("dataSource"in e)return(0,x.TJ)(j.n,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:B}}})],W.prototype,"source",null),(0,s._)([(0,_.Cb)()],W.prototype,"sourceJSON",void 0),(0,s._)([(0,_.Cb)({value:null,json:{type:[x.z8],write:{target:"subLayerIds",allowNull:!0,overridePolicy:B}}})],W.prototype,"sublayers",null),(0,s._)([(0,v.p)("sublayers")],W.prototype,"castSublayers",null),(0,s._)([(0,C.c)("sublayers")],W.prototype,"writeSublayers",null),(0,s._)([(0,_.Cb)({type:String,json:{name:"name",write:{overridePolicy:U}}})],W.prototype,"title",void 0),(0,s._)([(0,_.Cb)({type:String})],W.prototype,"typeIdField",void 0),(0,s._)([(0,w.r)("typeIdField",["layerDefinition.typeIdField"])],W.prototype,"readTypeIdField",null),(0,s._)([(0,_.Cb)({type:[L.Z],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],W.prototype,"types",void 0),(0,s._)([(0,_.Cb)({type:String,json:{name:"layerUrl",write:{overridePolicy:Q}}})],W.prototype,"url",null),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:B}}})],W.prototype,"visible",null),(0,s._)([(0,C.c)("visible")],W.prototype,"writeVisible",null),W=i=(0,s._)([(0,I.j)("esri.layers.support.Sublayer")],W);const X=W},90082:(e,t,r)=>{r.d(t,{V:()=>n,g:()=>o});var i=r(20102),s=r(95330);async function o(e,t,r){let o;try{o=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.k_)(r),o}async function n(e,t,r,o,n){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load tile ${t}/${r}/${o}`,{error:e,level:t,row:r,col:o})}return(0,s.k_)(n),a}},2981:(e,t,r)=>{r.d(t,{$6:()=>c,Ow:()=>o,S0:()=>s,d1:()=>n});const i=[["binary","application/octet-stream","bin",""]];function s(e,t){return l(function(e,t){return a(t).find((t=>u(t)===e))}(e,t))}function o(e,t){return l(function(e,t){const r=e.toLowerCase();return a(t).find((e=>function(e){return e?.[2].split(",")??[]}(e).some((e=>r.endsWith(e)))))}(e,t))}function n(e,t){return u(function(e,t){return a(t).find((t=>l(t)===e))}(e,t))}function a(e){return[...i,...e]}function l(e){return e?.[0]}function u(e){return e?.[1]}function c(e){return e.tables?.find((e=>"assetMaps"===e.role))}},32073:(e,t,r)=>{r.d(t,{FN:()=>o,QV:()=>s,ac:()=>a});var i=r(31263);function s(e,t,r){const i=t.flatten((({sublayers:e})=>e)).length;return i!==e.length||!!e.some((e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r))||!n(e,t)}function o(e,t,r){return!!e.some((e=>{const t=e.source;return!(!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r))||e.originIdOf("renderer")>i.s3.SERVICE||e.originIdOf("labelingInfo")>i.s3.SERVICE||e.originIdOf("opacity")>i.s3.SERVICE||e.originIdOf("labelsVisible")>i.s3.SERVICE}))||!n(e,t)}function n(e,t){if(!e||!e.length||null==t)return!0;const r=t.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).map((e=>e.id)).toArray();if(e.length>r.length)return!1;let i=0;const s=r.length;for(const{id:t}of e){for(;i<s&&r[i]!==t;)i++;if(i>=s)return!1}return!0}function a(e){return!!e&&e.some((e=>null!=e.minScale||e.layerDefinition&&null!=e.layerDefinition.minScale))}},41818:(e,t,r)=>{r.d(t,{P:()=>n});var i=r(11282),s=r(34599),o=r(14165);async function n(e,t,r){const n=(0,i.en)(e);return(0,s.hH)(n,o.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>n});var i=r(11282),s=r(34599),o=r(14165);async function n(e,t,r){const n=(0,i.en)(e);return(0,s.Ev)(n,o.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>l,e:()=>a});var i=r(11282),s=r(34599),o=r(74889),n=r(14165);async function a(e,t,r){const i=await l(e,t,r);return o.Z.fromJSON(i)}async function l(e,t,r){const o=(0,i.en)(e),a={...r},l=n.Z.from(t),{data:u}=await(0,s.JT)(o,l,l.sourceSpatialReference,a);return u}},53261:(e,t,r)=>{r.d(t,{t:()=>m});var i=r(11282),s=r(70586),o=r(69285),n=r(98732);function a(e,t){return t}function l(e,t,r,i){switch(r){case 0:return y(e,t+i,0);case 1:return"lowerLeft"===e.originPosition?y(e,t+i,1):function({translate:e,scale:t},r,i){return e[i]-r*t[i]}(e,t+i,1)}}function u(e,t,r,i){return 2===r?y(e,t,2):l(e,t,r,i)}function c(e,t,r,i){return 2===r?y(e,t,3):l(e,t,r,i)}function p(e,t,r,i){return 3===r?y(e,t,3):u(e,t,r,i)}function y({translate:e,scale:t},r,i){return e[i]+r*t[i]}class d{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=a,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,o.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,s.O3)(r),r.push(t);const i=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of i)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:i}=t,s=(0,n.$g)(r.clone(),r,!1,!1,this._transform),o=(0,n.di)(s,i,!1,!1);e.queryGeometryType=i,e.queryGeometry={...o}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const i=(0,s.s3)(this._transform,"transform");switch(t=this._applyTransform(i,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const i=(0,s.s3)(this._transform,"transform");return this._applyTransform(i,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const i=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(i)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const i=this._transformPathLikeValue(t,r),s=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),s.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=i}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?p:t?u:r?c:l}}var h=r(34599),f=(r(74889),r(14165));async function m(e,t,r){const s=(0,i.en)(e),o={...r},n=f.Z.from(t),a=!n.quantizationParameters,{data:l}=await(0,h.qp)(s,n,new d({sourceSpatialReference:n.sourceSpatialReference,applyTransform:a}),o);return l}},28694:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(69285);function s(e,t,r){if(!r||!r.features||!r.hasZ)return;const s=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>S});var i,s=r(43697),o=r(66577),n=r(38171),a=r(35454),l=r(96674),u=r(22974),c=r(5600),p=(r(75215),r(71715)),y=r(52011),d=r(30556),h=r(82971),f=r(33955),m=r(1231);const b=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=i=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],o=n.Z.fromJSON(s),a=s.geometry&&s.geometry.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=r);const l=s.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void b.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(e&&null!=e.geometry)return void b.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.Z.fromJSON(t.spatialReference)),i}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 i(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-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:[i,s],scale:[o,n]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>s-e*n),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const o=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=r(a[1]);e===i&&n===s||(o.push([e-i,n-s]),i=e,s=n)}else i=t(a[0]),s=r(a[1]),o.push([i,s])}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 i=(0,f.oU)(e)?e.rings:e.paths,s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],n=this._quantizePoints(o,t,r);n&&s.push(n)}return s.length>0?((0,f.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.oU)(e)?e.rings:e.paths;let n,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],a+=s[1]):(n=s[0],a=s[1]),s[0]=t(n),s[1]=r(a)}}if(i&&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]=i(r[2]),r[3]=s(r[3])}}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])}}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])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(n+=i[0],a+=i[1]):(n=i[0],a=i[1]),i[0]=t(n),i[1]=r(a)}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,c.Cb)({type:[n.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,s._)([(0,p.r)("features")],g.prototype,"readFeatures",null),(0,s._)([(0,c.Cb)({type:[m.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,s._)([(0,c.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],g.prototype,"geometryType",void 0),(0,s._)([(0,d.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,s._)([(0,c.Cb)({types:o.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,s._)([(0,p.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,s._)([(0,c.Cb)({type:h.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,s._)([(0,d.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,s._)([(0,c.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=i=(0,s._)([(0,y.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const S=g},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>s,eG:()=>l,lF:()=>n,lj:()=>c,qP:()=>a,wW:()=>u});const i=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},n={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|