@arcgis/core 4.33.0-next.20250404 → 4.33.0-next.20250406

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{361a3253877acd3b4f07.js → 1014513c0ec85f9414a4.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{18f8b41bd761e9ab60d0.js → 114599ed0752d9a70eef.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{baab3f0bdf78b6165fd6.js → 27b7ef3442700f6d6123.js} +3 -3
  5. package/assets/esri/core/workers/chunks/{2a654d8de99be40dd0e6.js → 3f6dc811b5d515c2725c.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{8d421e0a01e2c3f6980c.js → 4275dcec730a11173661.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{0669220e7acacd9c652a.js → 43b19c58b2d16ae8e7cc.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{ddfb5a2055a36576ba0d.js → 4523ba4a3c8987abca56.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{0b6ceb0194a07bbc3433.js → 4baef5262ce401bf81bb.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{5660f479c005149bce8d.js → 4de3d692557120a4bbf7.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{5e79642851e888eddfe4.js → 4e3b60156bee3b8b3367.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{4dc135e0133d58a06d67.js → 519028f42b817d3e9933.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{1377ddd582518e5fa051.js → 60472225a228e499b1a2.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{3db517369c5dd891a75f.js → 72f4cea853ce9fcf2cb6.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{c20ec58c7bc7d5893049.js → 7ccc02a4ec6d3552ecca.js} +1 -1
  16. package/assets/esri/core/workers/chunks/8fecd1337d84c26c692b.js +1 -0
  17. package/assets/esri/core/workers/chunks/{6280e1fe944ea4a71b91.js → 9643a9516783e8c32180.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{6ab96eaaad0aaad46db9.js → cc307d34a68e44e3cbc5.js} +1 -1
  19. package/assets/esri/core/workers/chunks/d46c82a55219b27c301b.js +1 -0
  20. package/assets/esri/core/workers/chunks/{1df34b7fd68f5ab55bd3.js → d89f105b8a0b13dd8e5f.js} +1 -1
  21. package/assets/esri/core/workers/chunks/f41a9ceb8e49baafe9fa.js +1 -0
  22. package/assets/esri/core/workers/chunks/{e3b0bb6850d5252d5f24.js → f7d33d18bf1bd4db9df8.js} +1 -1
  23. package/assets/esri/themes/base/_core.scss +2 -0
  24. package/assets/esri/themes/base/widgets/_SelectionList.scss +61 -0
  25. package/assets/esri/themes/dark/main.css +1 -1
  26. package/assets/esri/themes/light/main.css +1 -1
  27. package/assets/esri/themes/light/view.css +1 -1
  28. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList.json +1 -0
  29. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_en.json +1 -0
  30. package/core/MultiOriginJSONSupport.js +1 -1
  31. package/core/accessorSupport/DefaultsStore.js +1 -1
  32. package/core/accessorSupport/MultiOriginStore.js +1 -1
  33. package/core/accessorSupport/Properties.js +1 -1
  34. package/core/accessorSupport/Store.js +1 -1
  35. package/core/unitUtils.js +1 -1
  36. package/geometry/support/HalfFloatArray.js +1 -1
  37. package/geometry/support/float16.js +1 -1
  38. package/interfaces.d.ts +62 -21
  39. package/layers/WMSLayer.js +1 -1
  40. package/layers/support/VideoElement.js +1 -1
  41. package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
  42. package/package.json +1 -1
  43. package/smartMapping/statistics/types.d.ts +4 -0
  44. package/smartMapping/statistics/types.js +5 -0
  45. package/support/revision.js +1 -1
  46. package/versionManagement/VersioningState.js +1 -1
  47. package/views/2d/engine/webgl/Mesh2D.js +1 -1
  48. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  49. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  50. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  51. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  52. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  53. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  54. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  55. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  56. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  57. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  58. package/views/3d/webgl-engine/lib/textureUtils.js +1 -1
  59. package/views/FocusAreas.js +1 -1
  60. package/views/SceneView.js +1 -1
  61. package/views/View.js +1 -1
  62. package/views/ViewAnimation.js +1 -1
  63. package/views/webgl/ShaderBuilder.js +1 -1
  64. package/views/webgl/Texture.js +1 -1
  65. package/views/webgl/textureUtils.js +1 -1
  66. package/widgets/Feature/support/relatedFeatureUtils.js +1 -1
  67. package/widgets/FeatureTable/support/tableUtils.js +1 -1
  68. package/widgets/FeatureTable.js +1 -1
  69. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  70. package/widgets/support/SelectionList/SelectionListFeatureItem.js +5 -0
  71. package/widgets/support/SelectionList/SelectionListGroupLayerItem.js +5 -0
  72. package/widgets/support/SelectionList/SelectionListItemBase.js +5 -0
  73. package/widgets/support/SelectionList/SelectionListLayerItem.js +5 -0
  74. package/widgets/support/SelectionList/SelectionListViewModel.js +5 -0
  75. package/widgets/support/SelectionList/VisibleElements.js +5 -0
  76. package/widgets/support/SelectionList/selectionListUtils.js +5 -0
  77. package/widgets/support/SelectionList.js +5 -0
  78. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  79. package/widgets/support/iconUtils.js +1 -1
  80. package/assets/esri/core/workers/chunks/0cd5f15b8558b23e5fcd.js +0 -1
  81. package/assets/esri/core/workers/chunks/222446da9cb58c3c3b7e.js +0 -1
  82. package/assets/esri/core/workers/chunks/7b8f0b63b968ff40d00d.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1904],{8303:(e,t,r)=>{r.d(t,{A:()=>x});var n=r(90237),i=r(92602),s=r(70333),l=r(78888),a=r(60999),o=r(49186),u=r(53966),p=r(97768),d=r(74887),c=r(84952),m=r(10107),y=(r(44208),r(87811),r(36005)),h=r(40608),f=r(43937),g=r(83531),v=r(20655),w=r(80812),b=r(41318),_=r(10407);const x=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:n}=await r.e(1204).then(r.bind(r,41204));return(0,d.Te)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=!s.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,n);let l,a;if(i)l=r.portal.url;else try{l=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!l||!(0,c.b8)(l,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const o=!0,u=!1,p=!1;if(!a)return{features:{edit:o,fullEdit:u},content:{updateItem:p}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:l}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,d.QP)(e)}return{features:{edit:o,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,_.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,i=v.A.getDefault();if(i&&i.loaded&&(0,c.S8)(i.restUrl)===(0,c.S8)(n))return i.user;const o=`${n}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,l.A)(o,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?b.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,n=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&n&&!(0,c.ut)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new o.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,n._)([(0,m.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,n._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,n._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,n._)([(0,m.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,n._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,n._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,n._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,n._)([(0,h.$)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},10184:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(90237),i=r(69540),s=r(25482),l=r(88930),a=r(10107),o=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let d=class extends(i.A.ClonableMixin(s.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,l.t)(this.value,this.unit,"milliseconds")}};(0,n._)([(0,o.e)(p.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,n._)([(0,u.$)("esri.time.TimeInterval")],d);const c=d},33446:(e,t,r)=>{r.d(t,{C:()=>l,m:()=>s});var n=r(49186),i=r(74887);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new n.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,i.Te)(r),s}async function l(e,t,r,s,l){let a;try{a=await createImageBitmap(e)}catch(e){throw new n.A("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,i.Te)(l),a}},38458:(e,t,r)=>{r.d(t,{m:()=>i});const n=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function i(e){return null!=e&&n.some((([t,r])=>e>=t&&e<=r))}},38961:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(90237),i=r(5503),s=r(36708),l=r(10107),a=r(40608),o=r(80559);let u=class extends i.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,o.fm)((()=>this._refresh()),s.OH))}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 i.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const n of t)if(n){if(r(n)){const t=this.indexOf(n,e);t>=0?t!==e&&this.reorder(n,e):this.add(n,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(n);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,n._)([(0,l.MZ)()],u.prototype,"getCollections",void 0),(0,n._)([(0,l.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,n._)([(0,l.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,n._)([(0,a.$)("esri.core.CollectionFlattener")],u);const p=u},51904:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ee});var n=r(90237),i=r(92602),s=r(52106),l=r(13874),a=r(78888),o=r(5503),u=r(38961),p=r(49186),d=r(66552),c=r(4718),m=r(92071),y=r(74887),h=r(36708),f=r(84952),g=r(10107),v=r(56507),w=r(36005),b=r(40608),_=r(43937),x=r(49422),I=r(5443),M=r(16930),E=r(83960),S=r(21325),A=r(4146),T=r(63074),F=r(16131),N=r(8303),O=r(54310),P=r(25036),U=r(82935),Z=r(38458),R=r(60694),L=r(10873),C=r(69622);r(44208),r(53966),r(87811);const j={visible:"visibleSublayers"};let $=class extends C.A{constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(j[e.propertyName])))],"layer"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=e?.sublayers,n=[],i=e=>{const{minScale:r,maxScale:s,sublayers:l,visible:a}=e;a&&(0===t||(0===r||t<=r)&&(0===s||t>=s))&&(l?l.forEach(i):n.push(e))};return r?.forEach(i),n}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:n,version:i}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:n?"TRUE":"FALSE",version:i,layers:t}}};(0,n._)([(0,g.MZ)()],$.prototype,"layer",null),(0,n._)([(0,g.MZ)({readOnly:!0})],$.prototype,"layers",null),(0,n._)([(0,g.MZ)({type:Number})],$.prototype,"scale",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],$.prototype,"version",null),(0,n._)([(0,g.MZ)({readOnly:!0})],$.prototype,"visibleSublayers",null),$=(0,n._)([(0,b.$)("esri.layers.support.ExportWMSImageParameters")],$);var H,q=r(33446),B=r(4902),D=r(79901);let k=0,V=H=class extends(B.A.IdentifiableMixin(m.L)){constructor(e){super(e),this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.name=null,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.title=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),h.OH),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.OH),(0,h.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),h.OH),(0,h.wB)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),h.OH)])}get id(){return this._get("id")??k++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t.legendUrl??t.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}castSublayers(e){return(0,v.dp)(o.A.ofType(H),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new H;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents?.map((e=>e.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers?.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences?.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,n._)([(0,g.MZ)()],V.prototype,"description",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],V.prototype,"dimensions",void 0),(0,n._)([(0,g.MZ)({type:I.A,json:{name:"extent"}})],V.prototype,"fullExtent",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"fullExtents",void 0),(0,n._)([(0,g.MZ)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],V.prototype,"id",null),(0,n._)([(0,g.MZ)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],V.prototype,"legendUrl",void 0),(0,n._)([(0,w.w)("legendUrl",["legendUrl","legendURL"])],V.prototype,"readLegendUrl",null),(0,n._)([(0,g.MZ)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],V.prototype,"legendEnabled",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"layer",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"maxScale",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"minScale",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],V.prototype,"effectiveScaleRange",null),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],V.prototype,"name",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"parent",void 0),(0,n._)([(0,g.MZ)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],V.prototype,"popupEnabled",void 0),(0,n._)([(0,g.MZ)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],V.prototype,"queryable",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"sublayers",void 0),(0,n._)([(0,D.w)("sublayers")],V.prototype,"castSublayers",null),(0,n._)([(0,g.MZ)({type:[Number],json:{read:{source:"spatialReferences"}}})],V.prototype,"spatialReferences",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],V.prototype,"title",void 0),(0,n._)([(0,g.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],V.prototype,"visible",null),V=H=(0,n._)([(0,b.$)("esri.layers.support.WMSSublayer")],V);const W=V;var G=r(4576),X=r(96285);const J={84:4326,83:4269,27:4267};function K(e){if(!e)return null;const t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));const r=e.documentElement;if("ServiceExceptionReport"===r.nodeName){const e=Array.prototype.slice.call(r.childNodes).map((e=>e.textContent)).join("\r\n");throw new p.A("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const n=ee("Capability",r),i=ee("Service",r),s=n&&ee("Request",n);if(!n||!i||!s)return null;const l=ee("Layer",n);if(!l)return null;const a="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",o=re("Title",i,"")||re("Name",i,""),u=re("AccessConstraints",i,""),d=/^none$/i.test(u)?"":u,c=re("Abstract",i,""),m=parseInt(re("MaxWidth",i,"5000"),10),y=parseInt(re("MaxHeight",i,"5000"),10),h=se(s,"GetMap"),f=ie(s,"GetMap"),g=ae(l,a,t);if(!g)return null;let v,w=0;const b=Array.prototype.slice.call(n.childNodes),_=g.sublayers??[],x=e=>{null!=e&&_.push(e)};b.forEach((e=>{"Layer"===e.nodeName&&(0===w?v=e:1===w?(g.name&&(g.name="",x(ae(v,a,t))),x(ae(e,a,t))):x(ae(e,a,t)),w++)}));const I=g.sublayers??[],M=g.fullExtents??[];0===I.length&&I.push(g),g.extent??=I[0].extent;const E=g.spatialReferences.length>0?g.spatialReferences:Q(g),S=ie(s,"GetFeatureInfo"),A=S?se(s,"GetFeatureInfo"):null,T=z(I),F=g.minScale||0,N=g.maxScale||0,O=g.dimensions??[],P=T.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),U=O.concat(P).filter(ue);let Z=null;if(U.length){const e=U.map((e=>{const{extent:t}=e;return function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(t)?t.map((e=>e.getTime())):t?.map((e=>[e.min.getTime(),e.max.getTime()]))})).flat(2).filter(G.Ru);Z={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:d,description:c,dimensions:O,extent:g.extent,fullExtents:M,featureInfoFormats:A,featureInfoUrl:S,mapUrl:f,maxWidth:m,maxHeight:y,maxScale:N,minScale:F,layers:T,spatialReferences:E,supportedImageFormatTypes:h,timeInfo:Z,title:o,version:a}}function Q(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=Q(t);if(e.length>0)return e}return[]}function z(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(z(r.sublayers)),delete r.sublayers);return t}function Y(e,t,r){return t.getAttribute(e)??r}function ee(e,t){for(let r=0;r<t.childNodes.length;r++){const n=t.childNodes[r];if(oe(n)&&n.nodeName===e)return n}return null}function te(e,t){if(null==t)return[];const r=[];for(let n=0;n<t.childNodes.length;n++){const i=t.childNodes[n];oe(i)&&i.nodeName===e&&r.push(i)}return r}function re(e,t,r){return ee(e,t)?.textContent??r}function ne(e,t,r){if(!e)return null;const n=parseFloat(e.getAttribute("minx")),i=parseFloat(e.getAttribute("miny")),s=parseFloat(e.getAttribute("maxx")),l=parseFloat(e.getAttribute("maxy"));let a,o,u,p;return r?(a=isNaN(i)?-Number.MAX_VALUE:i,o=isNaN(n)?-Number.MAX_VALUE:n,u=isNaN(l)?Number.MAX_VALUE:l,p=isNaN(s)?Number.MAX_VALUE:s):(a=isNaN(n)?-Number.MAX_VALUE:n,o=isNaN(i)?-Number.MAX_VALUE:i,u=isNaN(s)?Number.MAX_VALUE:s,p=isNaN(l)?Number.MAX_VALUE:l),{xmin:a,ymin:o,xmax:u,ymax:p,spatialReference:{wkid:t}}}function ie(e,t){const r=ee(t,e);if(r){const e=ee("DCPType",r);if(e){const t=ee("HTTP",e);if(t){const e=ee("Get",t);if(e){let t=function(e,t,r){const n=ee("OnlineResource",r);return n?Y("xlink:href",n,null):null}(0,0,e);if(t){const e=t.indexOf("&");return-1!==e&&e===t.length-1&&(t=t.slice(0,-1)),function(e,t){const r=[],n=(0,f.An)(e);for(const e in n.query)n.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+n.query[e]));return n.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}}return null}function se(e,t){const r=te("Operation",e);if(!r.length)return te("Format",ee(t,e)).map((({textContent:e})=>e)).filter(G.Ru);const n=[];for(const e of r)if(e.getAttribute("name")===t){const t=te("Format",e);for(const{textContent:e}of t)null!=e&&n.push(e)}return n}function le(e,t,r){const n=ee(t,e);if(!n)return r;const{textContent:i}=n;if(null==i||""===i)return r;const s=Number(i);return isNaN(s)?r:s}function ae(e,t,r){if(!e)return null;const n=e.getAttribute("queryable")?.toLowerCase(),i="1"===n||"true"===n,s={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:i,spatialReferences:[],sublayers:null},l=ee("LatLonBoundingBox",e),a=ee("EX_GeographicBoundingBox",e);let o=null;l&&(o=ne(l,4326)),a&&(o=new I.A(0,0,0,0,new M.A({wkid:4326})),o.xmin=parseFloat(re("westBoundLongitude",a,"0")),o.ymin=parseFloat(re("southBoundLatitude",a,"0")),o.xmax=parseFloat(re("eastBoundLongitude",a,"0")),o.ymax=parseFloat(re("northBoundLatitude",a,"0"))),l||a||(o=new I.A(-180,-90,180,90,new M.A({wkid:4326}))),s.minScale=le(e,"MaxScaleDenominator",0),s.maxScale=le(e,"MinScaleDenominator",0);const u=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((e=>{if("Name"===e.nodeName)s.name=e.textContent||"";else if("Title"===e.nodeName)s.title=e.textContent||"";else if("Abstract"===e.nodeName)s.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(u);if(r&&0===r.indexOf("EPSG:")){const n=parseInt(r.slice(5),10);0===n||isNaN(n)||o||(o="1.3.0"===t?ne(e,n,(0,Z.m)(n)):ne(e,n))}const n=r?.indexOf(":");if(n&&n>-1){let i=parseInt(r.slice(n+1),10);0===i||isNaN(i)||(i=J[i]??i);const l="1.3.0"===t?ne(e,i,(0,Z.m)(i)):ne(e,i);l&&s.fullExtents&&s.fullExtents.push(l)}}else if(e.nodeName===u)(e.textContent?.split(" ")??[]).forEach((e=>{let t=NaN;if(e.includes(":")){const[r,n]=e.toUpperCase().split(":");"CRS"!==r&&"EPSG"!==r||(t=parseInt(n,10))}else t=parseInt(e,10);if(0!==t&&!isNaN(t)){const e=J[t]??t;s.spatialReferences.includes(e)||s.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||s.legendUrl){if("Layer"===e.nodeName){const n=ae(e,t,r);n&&(n.parentLayerId=s.id,s.sublayers||(s.sublayers=[]),s.sublayers.push(n))}}else{const t=ee("LegendURL",e);if(t){const e=ee("OnlineResource",t);e&&(s.legendUrl=e.getAttribute("xlink:href"))}}})),s.extent=o,s.dimensions=te("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),n=e.textContent,i=e.getAttribute("unitSymbol")??void 0,s=e.getAttribute("default")??void 0,l="0"!==Y("default",e,"0"),a="0"!==Y("nearestValue",e,"0"),o="0"!==Y("current",e,"0");return ue({name:t,units:r})?{name:"time",units:"ISO8601",extent:ce(n),default:ce(s),multipleValues:l,nearestValue:a,current:o}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:pe(n),unitSymbol:i,default:pe(s),multipleValues:l,nearestValue:a}:{name:t,units:r,extent:de(n),unitSymbol:i,default:de(s),multipleValues:l,nearestValue:a}})),s}function oe(e){return e.nodeType===Node.ELEMENT_NODE}function ue(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function pe(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter(G.Ru):r.map((e=>parseFloat(e)))}function de(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(G.Ru):r}function ce(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:me(t[0]),max:me(t[1]),resolution:t.length>=3&&"0"!==t[2]?ye(t[2]):void 0}})).filter(G.Ru):r.map((e=>me(e)))}function me(e){return X.c9.fromISO(e,{zone:X.mQ.utcInstance}).toJSDate()}function ye(e){const t=e.match(/(?:p(\d+y|\d+(?:\.|,)\d+y)?(\d+m|\d+(?:\.|,)\d+m)?(\d+d|\d+(?:\.|,)\d+d)?)?(?:t(\d+h|\d+(?:\.|,)\d+h)?(\d+m|\d+(?:\.|,)\d+m)?(\d+s|\d+(?:\.|,)\d+s)?)?/i);return t?{years:he(t[1]),months:he(t[2]),days:he(t[3]),hours:he(t[4]),minutes:he(t[5]),seconds:he(t[6])}:null}function he(e){if(!e)return 0;const t=e.match(/(?:\d+(?:\.|,)\d+|\d+)/);if(!t)return 0;const r=t[0].replace(",",".");return Number(r)}function fe(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}function ge(e){if(!e||e.isAllTime||e.isEmpty)return;const{start:t,end:r}=e;return t&&r&&t.getTime()===r.getTime()?`${fe(t)}`:`${t?fe(t):"0000-01-01T00:00:00Z"}/${r?fe(r):"9999-12-31T23:59:59Z"}`}const ve=new Set([102100,3857,102113,900913]),we=new Set([3395,54004]),be=new d.J({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function _e(e){return"text/html"===e}function xe(e){return"text/plain"===e}let Ie=class extends((0,T.dM)((0,U.e)((0,O.J)((0,P.j)((0,F.q)((0,N.A)((0,m.P)(A.A)))))))){constructor(...e){super(...e),this.allSublayers=new u.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),h.OH),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.OH),(0,h.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=t.layer=this}),h.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(y.QP).then((()=>this._fetchService(t))).then((()=>this._checkLayerValidity()))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new I.A({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(_e)??this.featureInfoFormats.find(xe)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(_e(e)||xe(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new M.A(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return Me(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return Me(t.layers,r)}writeSublayers(e,t,r,n){t.layers=[];const i=new Map,s=e.flatten((({sublayers:e})=>e??[]));for(const e of s)if("number"==typeof e.parent?.id){const t=i.get(e.parent.id);null!=t?t.push(e.id):i.set(e.parent.id,[e.id])}for(const e of s){const r={sublayer:e,...n},s=e.write({parentLayerId:"number"==typeof e.parent?.id?e.parent.id:-1},r);if(i.has(e.id)&&(s.sublayerIds=i.get(e.id)),!e.sublayers&&e.name){const n=e.write({},r);delete n.id,t.layers.push(n)}}t.visibleLayers=s.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=(0,f.An)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const n=(0,f.a6)(t,r??{});this._set("url",n)}createExportImageParameters(e,t,r,n){const i=n?.pixelRatio??1,s=(0,E.X_)({extent:e,width:t})*i,l=new $({layer:this,scale:s}),{xmin:a,ymin:o,xmax:u,ymax:p,spatialReference:d}=e,c=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&ve.has(r)?t.find((e=>ve.has(e)))||t.find((e=>we.has(e)))||102100:r)}(d,this.spatialReferences),m="1.3.0"===this.version&&(0,Z.m)(c)?`${o},${a},${p},${u}`:`${a},${o},${u},${p}`,y=l.toJSON(),h="1.3.0"===this.version?"crs":"srs";return{bbox:m,[h]:null==c||isNaN(c)?void 0:"EPSG:"+c,...y}}async fetchImage(e,t,r,n){const i=this.mapUrl,s=this.createExportImageParameters(e,t,r,n);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=ge(n?.timeExtent),o={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...s,time:l,...this.refreshParameters}),signal:n?.signal};return(0,a.A)(i??"",o).then((e=>e.data))}async fetchImageBitmap(e,t,r,n){const i=this.mapUrl??"",s=this.createExportImageParameters(e,t,r,n);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=ge(n?.timeExtent),o={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...s,time:l,...this.refreshParameters}),signal:n?.signal},{data:u}=await(0,a.A)(i,o);return(0,q.m)(u,i,n?.signal)}fetchFeatureInfo(e,t,r,n,i){const s=(0,E.X_)({extent:e,width:t}),l=function(e){const t=e.filter((e=>e.popupEnabled&&e.name&&e.queryable));return t.length?t.map((({name:e})=>e)).join():null}(new $({layer:this,scale:s}).visibleSublayers);if(null==this.featureInfoUrl||null==l)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const a="1.3.0"===this.version?{I:n,J:i}:{x:n,y:i},o={query_layers:l,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...a},u={...this.createExportImageParameters(e,t,r),...o},p=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(p):this._defaultFetchFeatureInfoFunction((0,f.a6)(this.featureInfoUrl,p))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,R.bd)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?M.A.WebMercator:new M.A({wkid:t});return(0,S.aI)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=(0,f.yM)(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new l.A({title:this.title,content:t}),n=new s.A({sourceLayer:this,popupTemplate:r});return Promise.resolve([n])}async _fetchService(e){if(!this.resourceInfo&&this.parsedUrl?.path){const{path:t,query:r}=this.parsedUrl,{data:n}=await(0,a.A)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=K(n)}if(this.parsedUrl){const e=new f.s0(this.parsedUrl.path),{httpsDomains:t}=i.A.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||t.includes(e.host)||t.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_checkLayerValidity(){if(!this.allSublayers.length)throw new p.A("wmslayer:empty-layer","The layer doesn't have any sublayer")}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function Me(e,t,r){e=e??[];const n=new Map;e.every((e=>null==e.id))&&(e=(0,c.o8)(e)).forEach(((e,t)=>e.id=t));for(const i of e){const e=new W;e.read(i,t),r&&!r.includes(e.name)&&(e.visible=!1),n.set(e.id,e)}const i=[];for(const t of e){const e=null!=t.id?n.get(t.id):null;if(e)if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=n.get(t.parentLayerId);if(!r)continue;r.sublayers||(r.sublayers=new o.A),r.sublayers.push(e)}else i.push(e)}return i}(0,n._)([(0,g.MZ)({readOnly:!0})],Ie.prototype,"allSublayers",void 0),(0,n._)([(0,g.MZ)({json:{type:Object,write:!0}})],Ie.prototype,"customParameters",void 0),(0,n._)([(0,g.MZ)({json:{type:Object,write:!0}})],Ie.prototype,"customLayerParameters",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:!0}})],Ie.prototype,"copyright",void 0),(0,n._)([(0,g.MZ)()],Ie.prototype,"description",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],Ie.prototype,"dimensions",void 0),(0,n._)([(0,g.MZ)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],Ie.prototype,"fullExtent",void 0),(0,n._)([(0,w.w)(["web-document","portal-item"],"fullExtent",["extent"])],Ie.prototype,"readFullExtentFromItemOrMap",null),(0,n._)([(0,_.K)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],Ie.prototype,"writeFullExtent",null),(0,n._)([(0,g.MZ)({type:[I.A]})],Ie.prototype,"fullExtents",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Ie.prototype,"featureInfoFormat",null),(0,n._)([(0,g.MZ)({type:[String],readOnly:!0})],Ie.prototype,"featureInfoFormats",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Ie.prototype,"featureInfoUrl",void 0),(0,n._)([(0,g.MZ)()],Ie.prototype,"fetchFeatureInfoFunction",void 0),(0,n._)([(0,g.MZ)({type:String,json:{origins:{"web-document":{default:"image/png",type:be.jsonValues,read:{reader:be.read,source:"format"},write:{writer:be.write,target:"format"}}}}})],Ie.prototype,"imageFormat",void 0),(0,n._)([(0,w.w)("imageFormat",["supportedImageFormatTypes"])],Ie.prototype,"readImageFormat",null),(0,n._)([(0,g.MZ)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],Ie.prototype,"imageMaxHeight",void 0),(0,n._)([(0,g.MZ)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],Ie.prototype,"imageMaxWidth",void 0),(0,n._)([(0,g.MZ)()],Ie.prototype,"imageTransparency",void 0),(0,n._)([(0,g.MZ)(L.fV)],Ie.prototype,"legendEnabled",void 0),(0,n._)([(0,g.MZ)({type:["show","hide","hide-children"]})],Ie.prototype,"listMode",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Ie.prototype,"mapUrl",void 0),(0,n._)([(0,g.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Ie.prototype,"isReference",void 0),(0,n._)([(0,g.MZ)({type:["WMS"]})],Ie.prototype,"operationalLayerType",void 0),(0,n._)([(0,g.MZ)()],Ie.prototype,"resourceInfo",void 0),(0,n._)([(0,g.MZ)({type:M.A,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],Ie.prototype,"spatialReference",void 0),(0,n._)([(0,w.w)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],Ie.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,n._)([(0,g.MZ)({type:[v.jz],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],Ie.prototype,"spatialReferences",void 0),(0,n._)([(0,_.K)(["web-document","portal-item"],"spatialReferences")],Ie.prototype,"writeSpatialReferences",null),(0,n._)([(0,g.MZ)({type:o.A.ofType(W),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,x.R)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],Ie.prototype,"sublayers",void 0),(0,n._)([(0,w.w)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],Ie.prototype,"readSublayersFromItemOrMap",null),(0,n._)([(0,w.w)("service","sublayers",["layers"])],Ie.prototype,"readSublayers",null),(0,n._)([(0,_.K)("sublayers",{layers:{type:[W]},visibleLayers:{type:[String]}})],Ie.prototype,"writeSublayers",null),(0,n._)([(0,g.MZ)({json:{read:!1},readOnly:!0,value:"wms"})],Ie.prototype,"type",void 0),(0,n._)([(0,g.MZ)(L.OZ)],Ie.prototype,"url",null),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Ie.prototype,"version",void 0),Ie=(0,n._)([(0,b.$)("esri.layers.WMSLayer")],Ie);const Ee=Ie},73133:(e,t,r)=>{r.d(t,{j:()=>n});const n=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},79677:(e,t,r)=>{r.d(t,{A:()=>m});var n,i=r(90237),s=r(25482),l=r(88930),a=r(10107),o=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),p=r(43937),d=r(98623);let c=class extends s.A{static{n=this}static get allTime(){return y}static get empty(){return h}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===n&&r===i}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,l.lL)(r,e,t));let i=this.end;if(i){const r=(0,l.lL)(i,e,t);i=i.getTime()===r.getTime()?r:(0,l.S1)(r,1,e,t)}return new n({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let l,a;return i>=t&&i<=r?l=i:t>=i&&t<=s&&(l=t),r>=i&&r<=s?a=r:s>=t&&s<=r&&(a=s),null==l||null==a||isNaN(l)||isNaN(a)?n.empty:new n({start:l===-1/0?null:new Date(l),end:a===1/0?null:new Date(a)})}offset(e,t,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new n,{start:s,end:a}=this;return null!=s&&(i.start=(0,l.S1)(s,e,t,r)),null!=a&&(i.end=(0,l.S1)(a,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return y.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i._)([(0,o.w)("end")],c.prototype,"readEnd",null),(0,i._)([(0,p.K)("end")],c.prototype,"writeEnd",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i._)([(0,o.w)("start")],c.prototype,"readStart",null),(0,i._)([(0,p.K)("start")],c.prototype,"writeStart",null),c=n=(0,i._)([(0,u.$)("esri.time.TimeExtent")],c);const m=c,y=new c,h=new c({start:void 0,end:void 0})},82935:(e,t,r)=>{r.d(t,{B:()=>m,e:()=>y});var n=r(90237),i=r(10107),s=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),a=r(89317),o=r(30524),u=r(96184),p=r(73133),d=r(79677),c=r(10184);const m={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:a.K}}},y=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const n=r.timeOffset,i=p.j.fromJSON(r.timeOffsetUnits);return n&&i?new c.A({value:n,unit:i}):null}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n._)([(0,i.MZ)({type:d.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,n._)([(0,i.MZ)({type:c.A})],t.prototype,"timeOffset",void 0),(0,n._)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,n._)([(0,i.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,n._)([(0,i.MZ)(m)],t.prototype,"useViewTime",void 0),t=(0,n._)([(0,l.$)("esri.layers.mixins.TemporalLayer")],t),t}},83960:(e,t,r)=>{r.d(t,{X_:()=>l,oW:()=>o,zx:()=>a});var n=r(34727),i=r(83047);const s=96;function l(e,t){const r=t||e.extent,n=e.width,l=(0,i.GA)(r?.spatialReference);return r&&n?r.width/n*l*i.dy*s:0}function a(e,t,r){return function(e,t){return 0===t||(0,n.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,n.Sp)(e,t)||e>t}(e,r)}function o(e,t){return(0,n.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},96184:(e,t,r)=>{r.d(t,{A:()=>h});var n=r(90237),i=r(69540),s=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),u=r(43937),p=r(79677),d=r(10184),c=r(56400);function m(e,t){return d.A.fromJSON({value:e,unit:t})}let y=class extends(i.A.ClonableMixin(s.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?p.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?m(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?m(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,n._)([(0,l.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,n._)([(0,l.MZ)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,n._)([(0,a.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,n._)([(0,u.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,n._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,n._)([(0,l.MZ)({type:d.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,n._)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,n._)([(0,u.K)("interval")],y.prototype,"writeInterval",null),(0,n._)([(0,l.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,n._)([(0,l.MZ)((0,c.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,n._)([(0,l.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,n._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,n._)([(0,l.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,n._)([(0,o.$)("esri.layers.support.TimeInfo")],y);const h=y}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1904],{8303:(e,t,r)=>{r.d(t,{A:()=>x});var n=r(90237),i=r(92602),s=r(70333),l=r(78888),a=r(60999),o=r(49186),u=r(53966),p=r(97768),d=r(74887),c=r(84952),m=r(10107),y=(r(44208),r(87811),r(36005)),h=r(40608),f=r(43937),g=r(83531),v=r(20655),w=r(80812),b=r(41318),_=r(10407);const x=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:n}=await r.e(1204).then(r.bind(r,41204));return(0,d.Te)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=!s.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,n);let l,a;if(i)l=r.portal.url;else try{l=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!l||!(0,c.b8)(l,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const o=!0,u=!1,p=!1;if(!a)return{features:{edit:o,fullEdit:u},content:{updateItem:p}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:l}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,d.QP)(e)}return{features:{edit:o,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,_.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,i=v.A.getDefault();if(i&&i.loaded&&(0,c.S8)(i.restUrl)===(0,c.S8)(n))return i.user;const o=`${n}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,l.A)(o,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?b.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,n=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&n&&!(0,c.ut)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new o.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,n._)([(0,m.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,n._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,n._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,n._)([(0,m.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,n._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,n._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,n._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,n._)([(0,h.$)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},10184:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(90237),i=r(69540),s=r(25482),l=r(88930),a=r(10107),o=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let d=class extends(i.A.ClonableMixin(s.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,l.t)(this.value,this.unit,"milliseconds")}};(0,n._)([(0,o.e)(p.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,n._)([(0,u.$)("esri.time.TimeInterval")],d);const c=d},33446:(e,t,r)=>{r.d(t,{C:()=>l,m:()=>s});var n=r(49186),i=r(74887);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new n.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,i.Te)(r),s}async function l(e,t,r,s,l){let a;try{a=await createImageBitmap(e)}catch(e){throw new n.A("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,i.Te)(l),a}},38458:(e,t,r)=>{r.d(t,{m:()=>i});const n=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function i(e){return null!=e&&n.some((([t,r])=>e>=t&&e<=r))}},38961:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(90237),i=r(5503),s=r(36708),l=r(10107),a=r(40608),o=r(80559);let u=class extends i.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,o.fm)((()=>this._refresh()),s.OH))}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 i.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const n of t)if(n){if(r(n)){const t=this.indexOf(n,e);t>=0?t!==e&&this.reorder(n,e):this.add(n,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(n);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,n._)([(0,l.MZ)()],u.prototype,"getCollections",void 0),(0,n._)([(0,l.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,n._)([(0,l.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,n._)([(0,a.$)("esri.core.CollectionFlattener")],u);const p=u},51904:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ee});var n=r(90237),i=r(92602),s=r(52106),l=r(13874),a=r(78888),o=r(5503),u=r(38961),p=r(49186),d=r(66552),c=r(4718),m=r(92071),y=r(74887),h=r(36708),f=r(84952),g=r(10107),v=r(56507),w=r(36005),b=r(40608),_=r(43937),x=r(49422),I=r(5443),M=r(16930),E=r(83960),S=r(21325),A=r(4146),T=r(63074),F=r(16131),N=r(8303),O=r(54310),P=r(25036),U=r(82935),Z=r(38458),R=r(60694),L=r(10873),C=r(69622);r(44208),r(53966),r(87811);const j={visible:"visibleSublayers"};let $=class extends C.A{constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(j[e.propertyName])))],"layer"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=e?.sublayers,n=[],i=e=>{const{minScale:r,maxScale:s,sublayers:l,visible:a}=e;a&&(0===t||(0===r||t<=r)&&(0===s||t>=s))&&(l?l.forEach(i):n.push(e))};return r?.forEach(i),n}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:n,version:i}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:n?"TRUE":"FALSE",version:i,layers:t}}};(0,n._)([(0,g.MZ)()],$.prototype,"layer",null),(0,n._)([(0,g.MZ)({readOnly:!0})],$.prototype,"layers",null),(0,n._)([(0,g.MZ)({type:Number})],$.prototype,"scale",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],$.prototype,"version",null),(0,n._)([(0,g.MZ)({readOnly:!0})],$.prototype,"visibleSublayers",null),$=(0,n._)([(0,b.$)("esri.layers.support.ExportWMSImageParameters")],$);var H,q=r(33446),B=r(4902),D=r(79901);let k=0,V=H=class extends(B.A.IdentifiableMixin(m.L)){constructor(e){super(e),this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.name=null,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.title=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),h.OH),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.OH),(0,h.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),h.OH),(0,h.wB)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),h.OH)])}get id(){return this._get("id")??k++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t.legendUrl??t.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}castSublayers(e){return(0,v.dp)(o.A.ofType(H),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new H;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents?.map((e=>e.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers?.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences?.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,n._)([(0,g.MZ)()],V.prototype,"description",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],V.prototype,"dimensions",void 0),(0,n._)([(0,g.MZ)({type:I.A,json:{name:"extent"}})],V.prototype,"fullExtent",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"fullExtents",void 0),(0,n._)([(0,g.MZ)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],V.prototype,"id",null),(0,n._)([(0,g.MZ)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],V.prototype,"legendUrl",void 0),(0,n._)([(0,w.w)("legendUrl",["legendUrl","legendURL"])],V.prototype,"readLegendUrl",null),(0,n._)([(0,g.MZ)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],V.prototype,"legendEnabled",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"layer",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"maxScale",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"minScale",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],V.prototype,"effectiveScaleRange",null),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],V.prototype,"name",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"parent",void 0),(0,n._)([(0,g.MZ)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],V.prototype,"popupEnabled",void 0),(0,n._)([(0,g.MZ)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],V.prototype,"queryable",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"sublayers",void 0),(0,n._)([(0,D.w)("sublayers")],V.prototype,"castSublayers",null),(0,n._)([(0,g.MZ)({type:[Number],json:{read:{source:"spatialReferences"}}})],V.prototype,"spatialReferences",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],V.prototype,"title",void 0),(0,n._)([(0,g.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],V.prototype,"visible",null),V=H=(0,n._)([(0,b.$)("esri.layers.support.WMSSublayer")],V);const W=V;var G=r(4576),X=r(96285);const J={84:4326,83:4269,27:4267};function K(e){if(!e)return null;const t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));const r=e.documentElement;if("ServiceExceptionReport"===r.nodeName){const e=Array.prototype.slice.call(r.childNodes).map((e=>e.textContent)).join("\r\n");throw new p.A("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const n=ee("Capability",r),i=ee("Service",r),s=n&&ee("Request",n);if(!n||!i||!s)return null;const l=ee("Layer",n);if(!l)return null;const a="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",o=re("Title",i,"")||re("Name",i,""),u=re("AccessConstraints",i,""),d=/^none$/i.test(u)?"":u,c=re("Abstract",i,""),m=parseInt(re("MaxWidth",i,"5000"),10),y=parseInt(re("MaxHeight",i,"5000"),10),h=se(s,"GetMap"),f=ie(s,"GetMap"),g=ae(l,a,t);if(!g)return null;let v,w=0;const b=Array.prototype.slice.call(n.childNodes),_=g.sublayers??[],x=e=>{null!=e&&_.push(e)};b.forEach((e=>{"Layer"===e.nodeName&&(0===w?v=e:1===w?(g.name&&(g.name="",x(ae(v,a,t))),x(ae(e,a,t))):x(ae(e,a,t)),w++)}));const I=g.sublayers??[],M=g.fullExtents??[];0===I.length&&I.push(g),g.extent??=I[0].extent;const E=g.spatialReferences.length>0?g.spatialReferences:Q(g),S=ie(s,"GetFeatureInfo"),A=S?se(s,"GetFeatureInfo"):null,T=z(I),F=g.minScale||0,N=g.maxScale||0,O=g.dimensions??[],P=T.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),U=O.concat(P).filter(ue);let Z=null;if(U.length){const e=U.map((e=>{const{extent:t}=e;return function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(t)?t.map((e=>e.getTime())):t?.map((e=>[e.min.getTime(),e.max.getTime()]))})).flat(2).filter(G.Ru);Z={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:d,description:c,dimensions:O,extent:g.extent,fullExtents:M,featureInfoFormats:A,featureInfoUrl:S,mapUrl:f,maxWidth:m,maxHeight:y,maxScale:N,minScale:F,layers:T,spatialReferences:E,supportedImageFormatTypes:h,timeInfo:Z,title:o,version:a}}function Q(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=Q(t);if(e.length>0)return e}return[]}function z(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(z(r.sublayers)),delete r.sublayers);return t}function Y(e,t,r){return t.getAttribute(e)??r}function ee(e,t){for(let r=0;r<t.childNodes.length;r++){const n=t.childNodes[r];if(oe(n)&&n.nodeName===e)return n}return null}function te(e,t){if(null==t)return[];const r=[];for(let n=0;n<t.childNodes.length;n++){const i=t.childNodes[n];oe(i)&&i.nodeName===e&&r.push(i)}return r}function re(e,t,r){return ee(e,t)?.textContent??r}function ne(e,t,r){if(!e)return null;const n=parseFloat(e.getAttribute("minx")),i=parseFloat(e.getAttribute("miny")),s=parseFloat(e.getAttribute("maxx")),l=parseFloat(e.getAttribute("maxy"));let a,o,u,p;return r?(a=isNaN(i)?-Number.MAX_VALUE:i,o=isNaN(n)?-Number.MAX_VALUE:n,u=isNaN(l)?Number.MAX_VALUE:l,p=isNaN(s)?Number.MAX_VALUE:s):(a=isNaN(n)?-Number.MAX_VALUE:n,o=isNaN(i)?-Number.MAX_VALUE:i,u=isNaN(s)?Number.MAX_VALUE:s,p=isNaN(l)?Number.MAX_VALUE:l),{xmin:a,ymin:o,xmax:u,ymax:p,spatialReference:{wkid:t}}}function ie(e,t){const r=ee(t,e);if(r){const e=ee("DCPType",r);if(e){const t=ee("HTTP",e);if(t){const e=ee("Get",t);if(e){let t=function(e,t,r){const n=ee("OnlineResource",r);return n?Y("xlink:href",n,null):null}(0,0,e);if(t){const e=t.indexOf("&");return-1!==e&&e===t.length-1&&(t=t.slice(0,-1)),function(e,t){const r=[],n=(0,f.An)(e);for(const e in n.query)n.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+n.query[e]));return n.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}}return null}function se(e,t){const r=te("Operation",e);if(!r.length)return te("Format",ee(t,e)).map((({textContent:e})=>e)).filter(G.Ru);const n=[];for(const e of r)if(e.getAttribute("name")===t){const t=te("Format",e);for(const{textContent:e}of t)null!=e&&n.push(e)}return n}function le(e,t,r){const n=ee(t,e);if(!n)return r;const{textContent:i}=n;if(null==i||""===i)return r;const s=Number(i);return isNaN(s)?r:s}function ae(e,t,r){if(!e)return null;const n=e.getAttribute("queryable")?.toLowerCase(),i="1"===n||"true"===n,s={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:i,spatialReferences:[],sublayers:null},l=ee("LatLonBoundingBox",e),a=ee("EX_GeographicBoundingBox",e);let o=null;l&&(o=ne(l,4326)),a&&(o=new I.A(0,0,0,0,new M.A({wkid:4326})),o.xmin=parseFloat(re("westBoundLongitude",a,"0")),o.ymin=parseFloat(re("southBoundLatitude",a,"0")),o.xmax=parseFloat(re("eastBoundLongitude",a,"0")),o.ymax=parseFloat(re("northBoundLatitude",a,"0"))),l||a||(o=new I.A(-180,-90,180,90,new M.A({wkid:4326}))),s.minScale=le(e,"MaxScaleDenominator",0),s.maxScale=le(e,"MinScaleDenominator",0);const u=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((e=>{if("Name"===e.nodeName)s.name=e.textContent||"";else if("Title"===e.nodeName)s.title=e.textContent||"";else if("Abstract"===e.nodeName)s.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(u);if(r&&0===r.indexOf("EPSG:")){const n=parseInt(r.slice(5),10);0===n||isNaN(n)||o||(o="1.3.0"===t?ne(e,n,(0,Z.m)(n)):ne(e,n))}const n=r?.indexOf(":");if(n&&n>-1){let i=parseInt(r.slice(n+1),10);0===i||isNaN(i)||(i=J[i]??i);const l="1.3.0"===t?ne(e,i,(0,Z.m)(i)):ne(e,i);l&&s.fullExtents&&s.fullExtents.push(l)}}else if(e.nodeName===u)(e.textContent?.split(" ")??[]).forEach((e=>{let t=NaN;if(e.includes(":")){const[r,n]=e.toUpperCase().split(":");"CRS"!==r&&"EPSG"!==r||(t=parseInt(n,10))}else t=parseInt(e,10);if(0!==t&&!isNaN(t)){const e=J[t]??t;s.spatialReferences.includes(e)||s.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||s.legendUrl){if("Layer"===e.nodeName){const n=ae(e,t,r);n&&(n.parentLayerId=s.id,s.sublayers||(s.sublayers=[]),s.sublayers.push(n))}}else{const t=ee("LegendURL",e);if(t){const e=ee("OnlineResource",t);e&&(s.legendUrl=e.getAttribute("xlink:href"))}}})),s.extent=o,s.dimensions=te("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),n=e.textContent,i=e.getAttribute("unitSymbol")??void 0,s=e.getAttribute("default")??void 0,l="0"!==Y("default",e,"0"),a="0"!==Y("nearestValue",e,"0"),o="0"!==Y("current",e,"0");return ue({name:t,units:r})?{name:"time",units:"ISO8601",extent:ce(n),default:ce(s),multipleValues:l,nearestValue:a,current:o}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:pe(n),unitSymbol:i,default:pe(s),multipleValues:l,nearestValue:a}:{name:t,units:r,extent:de(n),unitSymbol:i,default:de(s),multipleValues:l,nearestValue:a}})),s}function oe(e){return e.nodeType===Node.ELEMENT_NODE}function ue(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function pe(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter(G.Ru):r.map((e=>parseFloat(e)))}function de(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(G.Ru):r}function ce(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:me(t[0]),max:me(t[1]),resolution:t.length>=3&&"0"!==t[2]?ye(t[2]):void 0}})).filter(G.Ru):r.map((e=>me(e)))}function me(e){return X.c9.fromISO(e,{zone:X.mQ.utcInstance}).toJSDate()}function ye(e){const t=e.match(/(?:p(\d+y|\d+(?:\.|,)\d+y)?(\d+m|\d+(?:\.|,)\d+m)?(\d+d|\d+(?:\.|,)\d+d)?)?(?:t(\d+h|\d+(?:\.|,)\d+h)?(\d+m|\d+(?:\.|,)\d+m)?(\d+s|\d+(?:\.|,)\d+s)?)?/i);return t?{years:he(t[1]),months:he(t[2]),days:he(t[3]),hours:he(t[4]),minutes:he(t[5]),seconds:he(t[6])}:null}function he(e){if(!e)return 0;const t=e.match(/(?:\d+(?:\.|,)\d+|\d+)/);if(!t)return 0;const r=t[0].replace(",",".");return Number(r)}function fe(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}function ge(e){if(!e||e.isAllTime||e.isEmpty)return;const{start:t,end:r}=e;return t&&r&&t.getTime()===r.getTime()?`${fe(t)}`:`${t?fe(t):"0000-01-01T00:00:00Z"}/${r?fe(r):"9999-12-31T23:59:59Z"}`}const ve=new Set([102100,3857,102113,900913]),we=new Set([3395,54004]),be=new d.J({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function _e(e){return"text/html"===e}function xe(e){return"text/plain"===e}let Ie=class extends((0,T.dM)((0,U.e)((0,O.J)((0,P.j)((0,F.q)((0,N.A)((0,m.P)(A.A)))))))){constructor(...e){super(...e),this.allSublayers=new u.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),h.OH),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.OH),(0,h.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=t.layer=this}),h.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(y.QP).then((()=>this._fetchService(t))).then((()=>this._checkLayerValidity()))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new I.A({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(_e)??this.featureInfoFormats.find(xe)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(_e(e)||xe(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new M.A(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return Me(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return Me(t.layers,r)}writeSublayers(e,t,r,n){t.layers=[];const i=new Map,s=e.flatten((({sublayers:e})=>e??[]));for(const e of s)if("number"==typeof e.parent?.id){const t=i.get(e.parent.id);null!=t?t.push(e.id):i.set(e.parent.id,[e.id])}for(const e of s){const r={sublayer:e,...n},s=e.write({parentLayerId:"number"==typeof e.parent?.id?e.parent.id:-1},r);if(i.has(e.id)&&(s.sublayerIds=i.get(e.id)),!e.sublayers&&e.name){const n=e.write({},r);delete n.id,t.layers.push(n)}}t.visibleLayers=s.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=(0,f.An)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const n=(0,f.a6)(t,r??{});this._set("url",n)}createExportImageParameters(e,t,r,n){const i=n?.pixelRatio??1,s=(0,E.X_)({extent:e,width:t})*i,l=new $({layer:this,scale:s}),{xmin:a,ymin:o,xmax:u,ymax:p,spatialReference:d}=e,c=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&ve.has(r)?t.find((e=>ve.has(e)))||t.find((e=>we.has(e)))||102100:r)}(d,this.spatialReferences),m="1.3.0"===this.version&&(0,Z.m)(c)?`${o},${a},${p},${u}`:`${a},${o},${u},${p}`,y=l.toJSON(),h="1.3.0"===this.version?"crs":"srs";return{bbox:m,[h]:null==c||isNaN(c)?void 0:"EPSG:"+c,...y}}async fetchImage(e,t,r,n){const i=this.mapUrl,s=this.createExportImageParameters(e,t,r,n);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=ge(n?.timeExtent),o={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...s,time:l,...this.refreshParameters}),signal:n?.signal};return(0,a.A)(i??"",o).then((e=>e.data))}async fetchImageBitmap(e,t,r,n){const i=this.mapUrl??"",s=this.createExportImageParameters(e,t,r,n);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=ge(n?.timeExtent),o={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...s,time:l,...this.refreshParameters}),signal:n?.signal},{data:u}=await(0,a.A)(i,o);return(0,q.m)(u,i,n?.signal)}fetchFeatureInfo(e,t,r,n,i){const s=(0,E.X_)({extent:e,width:t}),l=function(e){const t=e.filter((e=>e.popupEnabled&&e.name&&e.queryable));return t.length?t.map((({name:e})=>e)).join():null}(new $({layer:this,scale:s}).visibleSublayers);if(null==this.featureInfoUrl||null==l)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const a="1.3.0"===this.version?{I:n,J:i}:{x:n,y:i},o={query_layers:l,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...a},u={...this.createExportImageParameters(e,t,r),...o},p=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(p):this._defaultFetchFeatureInfoFunction((0,f.a6)(this.featureInfoUrl,p))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,R.bd)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?M.A.WebMercator:new M.A({wkid:t});return(0,S.aI)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=encodeURI((0,f.yM)(e)),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new l.A({title:this.title,content:t}),n=new s.A({sourceLayer:this,popupTemplate:r});return Promise.resolve([n])}async _fetchService(e){if(!this.resourceInfo&&this.parsedUrl?.path){const{path:t,query:r}=this.parsedUrl,{data:n}=await(0,a.A)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=K(n)}if(this.parsedUrl){const e=new f.s0(this.parsedUrl.path),{httpsDomains:t}=i.A.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||t.includes(e.host)||t.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_checkLayerValidity(){if(!this.allSublayers.length)throw new p.A("wmslayer:empty-layer","The layer doesn't have any sublayer")}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function Me(e,t,r){e=e??[];const n=new Map;e.every((e=>null==e.id))&&(e=(0,c.o8)(e)).forEach(((e,t)=>e.id=t));for(const i of e){const e=new W;e.read(i,t),r&&!r.includes(e.name)&&(e.visible=!1),n.set(e.id,e)}const i=[];for(const t of e){const e=null!=t.id?n.get(t.id):null;if(e)if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=n.get(t.parentLayerId);if(!r)continue;r.sublayers||(r.sublayers=new o.A),r.sublayers.push(e)}else i.push(e)}return i}(0,n._)([(0,g.MZ)({readOnly:!0})],Ie.prototype,"allSublayers",void 0),(0,n._)([(0,g.MZ)({json:{type:Object,write:!0}})],Ie.prototype,"customParameters",void 0),(0,n._)([(0,g.MZ)({json:{type:Object,write:!0}})],Ie.prototype,"customLayerParameters",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:!0}})],Ie.prototype,"copyright",void 0),(0,n._)([(0,g.MZ)()],Ie.prototype,"description",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],Ie.prototype,"dimensions",void 0),(0,n._)([(0,g.MZ)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],Ie.prototype,"fullExtent",void 0),(0,n._)([(0,w.w)(["web-document","portal-item"],"fullExtent",["extent"])],Ie.prototype,"readFullExtentFromItemOrMap",null),(0,n._)([(0,_.K)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],Ie.prototype,"writeFullExtent",null),(0,n._)([(0,g.MZ)({type:[I.A]})],Ie.prototype,"fullExtents",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Ie.prototype,"featureInfoFormat",null),(0,n._)([(0,g.MZ)({type:[String],readOnly:!0})],Ie.prototype,"featureInfoFormats",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Ie.prototype,"featureInfoUrl",void 0),(0,n._)([(0,g.MZ)()],Ie.prototype,"fetchFeatureInfoFunction",void 0),(0,n._)([(0,g.MZ)({type:String,json:{origins:{"web-document":{default:"image/png",type:be.jsonValues,read:{reader:be.read,source:"format"},write:{writer:be.write,target:"format"}}}}})],Ie.prototype,"imageFormat",void 0),(0,n._)([(0,w.w)("imageFormat",["supportedImageFormatTypes"])],Ie.prototype,"readImageFormat",null),(0,n._)([(0,g.MZ)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],Ie.prototype,"imageMaxHeight",void 0),(0,n._)([(0,g.MZ)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],Ie.prototype,"imageMaxWidth",void 0),(0,n._)([(0,g.MZ)()],Ie.prototype,"imageTransparency",void 0),(0,n._)([(0,g.MZ)(L.fV)],Ie.prototype,"legendEnabled",void 0),(0,n._)([(0,g.MZ)({type:["show","hide","hide-children"]})],Ie.prototype,"listMode",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Ie.prototype,"mapUrl",void 0),(0,n._)([(0,g.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Ie.prototype,"isReference",void 0),(0,n._)([(0,g.MZ)({type:["WMS"]})],Ie.prototype,"operationalLayerType",void 0),(0,n._)([(0,g.MZ)()],Ie.prototype,"resourceInfo",void 0),(0,n._)([(0,g.MZ)({type:M.A,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],Ie.prototype,"spatialReference",void 0),(0,n._)([(0,w.w)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],Ie.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,n._)([(0,g.MZ)({type:[v.jz],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],Ie.prototype,"spatialReferences",void 0),(0,n._)([(0,_.K)(["web-document","portal-item"],"spatialReferences")],Ie.prototype,"writeSpatialReferences",null),(0,n._)([(0,g.MZ)({type:o.A.ofType(W),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,x.R)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],Ie.prototype,"sublayers",void 0),(0,n._)([(0,w.w)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],Ie.prototype,"readSublayersFromItemOrMap",null),(0,n._)([(0,w.w)("service","sublayers",["layers"])],Ie.prototype,"readSublayers",null),(0,n._)([(0,_.K)("sublayers",{layers:{type:[W]},visibleLayers:{type:[String]}})],Ie.prototype,"writeSublayers",null),(0,n._)([(0,g.MZ)({json:{read:!1},readOnly:!0,value:"wms"})],Ie.prototype,"type",void 0),(0,n._)([(0,g.MZ)(L.OZ)],Ie.prototype,"url",null),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Ie.prototype,"version",void 0),Ie=(0,n._)([(0,b.$)("esri.layers.WMSLayer")],Ie);const Ee=Ie},73133:(e,t,r)=>{r.d(t,{j:()=>n});const n=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},79677:(e,t,r)=>{r.d(t,{A:()=>m});var n,i=r(90237),s=r(25482),l=r(88930),a=r(10107),o=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),p=r(43937),d=r(98623);let c=class extends s.A{static{n=this}static get allTime(){return y}static get empty(){return h}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===n&&r===i}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,l.lL)(r,e,t));let i=this.end;if(i){const r=(0,l.lL)(i,e,t);i=i.getTime()===r.getTime()?r:(0,l.S1)(r,1,e,t)}return new n({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let l,a;return i>=t&&i<=r?l=i:t>=i&&t<=s&&(l=t),r>=i&&r<=s?a=r:s>=t&&s<=r&&(a=s),null==l||null==a||isNaN(l)||isNaN(a)?n.empty:new n({start:l===-1/0?null:new Date(l),end:a===1/0?null:new Date(a)})}offset(e,t,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new n,{start:s,end:a}=this;return null!=s&&(i.start=(0,l.S1)(s,e,t,r)),null!=a&&(i.end=(0,l.S1)(a,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return y.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i._)([(0,o.w)("end")],c.prototype,"readEnd",null),(0,i._)([(0,p.K)("end")],c.prototype,"writeEnd",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i._)([(0,o.w)("start")],c.prototype,"readStart",null),(0,i._)([(0,p.K)("start")],c.prototype,"writeStart",null),c=n=(0,i._)([(0,u.$)("esri.time.TimeExtent")],c);const m=c,y=new c,h=new c({start:void 0,end:void 0})},82935:(e,t,r)=>{r.d(t,{B:()=>m,e:()=>y});var n=r(90237),i=r(10107),s=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),a=r(89317),o=r(30524),u=r(96184),p=r(73133),d=r(79677),c=r(10184);const m={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:a.K}}},y=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const n=r.timeOffset,i=p.j.fromJSON(r.timeOffsetUnits);return n&&i?new c.A({value:n,unit:i}):null}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n._)([(0,i.MZ)({type:d.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,n._)([(0,i.MZ)({type:c.A})],t.prototype,"timeOffset",void 0),(0,n._)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,n._)([(0,i.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,n._)([(0,i.MZ)(m)],t.prototype,"useViewTime",void 0),t=(0,n._)([(0,l.$)("esri.layers.mixins.TemporalLayer")],t),t}},83960:(e,t,r)=>{r.d(t,{X_:()=>l,oW:()=>o,zx:()=>a});var n=r(34727),i=r(83047);const s=96;function l(e,t){const r=t||e.extent,n=e.width,l=(0,i.GA)(r?.spatialReference);return r&&n?r.width/n*l*i.dy*s:0}function a(e,t,r){return function(e,t){return 0===t||(0,n.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,n.Sp)(e,t)||e>t}(e,r)}function o(e,t){return(0,n.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},96184:(e,t,r)=>{r.d(t,{A:()=>h});var n=r(90237),i=r(69540),s=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),u=r(43937),p=r(79677),d=r(10184),c=r(56400);function m(e,t){return d.A.fromJSON({value:e,unit:t})}let y=class extends(i.A.ClonableMixin(s.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?p.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?m(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?m(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,n._)([(0,l.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,n._)([(0,l.MZ)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,n._)([(0,a.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,n._)([(0,u.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,n._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,n._)([(0,l.MZ)({type:d.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,n._)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,n._)([(0,u.K)("interval")],y.prototype,"writeInterval",null),(0,n._)([(0,l.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,n._)([(0,l.MZ)((0,c.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,n._)([(0,l.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,n._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,n._)([(0,l.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,n._)([(0,o.$)("esri.layers.support.TimeInfo")],y);const h=y}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8219],{4146:(e,t,r)=>{r.d(t,{A:()=>w});var n=r(90237),i=r(78888),a=r(49186),o=r(65529),s=r(4902),l=r(92474),u=r(53966),c=r(74887),f=r(84952),p=r(10107),h=(r(44208),r(87811),r(40608)),d=r(5443),g=r(16930),m=r(92602),y=r(79677);let v=0,b=class extends(o.A.EventedMixin(s.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new d.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:n}=await r.e(5613).then(r.bind(r,45613));try{return await n(t)}catch(e){const r=t?.portalItem,n=r?.id||"unset",i=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+n+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,f.An)(this.url)}createLayerView(e,t){return Promise.reject(new a.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new a.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,n._)([(0,p.MZ)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,n._)([(0,p.MZ)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,n._)([(0,p.MZ)({type:d.A})],b.prototype,"fullExtent",void 0),(0,n._)([(0,p.MZ)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,n._)([(0,p.MZ)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,n._)([(0,p.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,n._)([(0,p.MZ)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,n._)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,n._)([(0,p.MZ)({clonable:!1})],b.prototype,"parent",void 0),(0,n._)([(0,p.MZ)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,n._)([(0,p.MZ)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,n._)([(0,p.MZ)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,n._)([(0,p.MZ)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,n._)([(0,p.MZ)({type:g.A})],b.prototype,"spatialReference",void 0),(0,n._)([(0,p.MZ)({type:String})],b.prototype,"title",void 0),(0,n._)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,n._)([(0,p.MZ)()],b.prototype,"url",void 0),(0,n._)([(0,p.MZ)({type:y.A})],b.prototype,"visibilityTimeExtent",void 0),(0,n._)([(0,p.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,n._)([(0,h.$)("esri.layers.Layer")],b);const w=b},25036:(e,t,r)=>{r.d(t,{j:()=>o});var n=r(90237),i=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,n._)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,n._)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,n._)([(0,i.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,n._)([(0,a.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},54310:(e,t,r)=>{r.d(t,{J:()=>b});var n=r(90237),i=(r(44208),r(53966)),a=r(74887),o=r(10107),s=r(79901),l=(r(87811),r(40608)),u=r(89317),c=r(5503),f=r(36708),p=r(80559);const h=new c.A,d=new WeakMap;function g(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:g(t,e%t):0}let m=0,y=0;function v(){const e=Date.now();let t=!1;for(const r of h){const n=r.deref();n?n.refreshInterval&&e-(d.get(n)??0)+5>=6e4*n.refreshInterval&&(d.set(n,e),n.refresh(e)):t=!0}if(t)for(let e=h.length-1;e>=0;e--)h.at(e).deref()||h.removeAt(e)}(0,p.fm)((()=>{const e=Date.now();let t=0;for(const r of h){const n=r.deref();n&&(t=g(Math.round(6e4*n.refreshInterval),t),n.refreshInterval?d.get(n)||d.set(n,e):d.delete(n))}if(t!==y){if(y=t,clearInterval(m),0===y)return void(m=0);m=setInterval(v,y)}}),f.OH);const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,a.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&h.push(new WeakRef(e))}(this)}),(()=>{}))}destroy(){!function(e){const t=h.find((t=>t.deref()===e));t&&h.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,a.QZ)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){}};return(0,n._)([(0,o.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.K}}}}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,s.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,n._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,n._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}},63074:(e,t,r)=>{r.d(t,{LF:()=>c,dM:()=>f,sU:()=>l});var n=r(90237),i=r(10107),a=(r(44208),r(53966),r(87811),r(40608)),o=r(89317),s=r(76369);const l={type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:o.K}},"portal-item":{read:!0,write:{layerContainerTypes:o.K}}}}},u={read:{reader:s.LF},write:{allowNull:!0,writer:s.M9,layerContainerTypes:o.K}},c={json:{read:!1,write:!1,origins:{"web-map":u,"portal-item":u}}},f=e=>{let t=class extends e{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,n._)([(0,i.MZ)(l)],t.prototype,"blendMode",void 0),(0,n._)([(0,i.MZ)(c)],t.prototype,"effect",void 0),t=(0,n._)([(0,a.$)("esri.layers.mixins.BlendLayer")],t),t}},76369:(e,t,r)=>{r.d(t,{LF:()=>x,M9:()=>_});var n=r(49186),i=r(93637),a=r(40876),o=r(59247),s=r(27865);function l(e,t,r,n){var i=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(i,l.prototype),i.expected=t,i.found=r,i.location=n,i.name="SyntaxError",i}function u(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}function c(e){if(!e||0===e.length)return null;if("string"==typeof e){const t=f(e);return t&&0!==t.length?t:null}const t=e.map((e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new n.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:f(e.value)}}));t.sort(((e,t)=>t.effects.length-e.effects.length));for(let e=0;e<t.length-1;e++){if(!(0,s.mj)(t[e].effects,t[e+1].effects))throw new n.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[e].effects,b:t[e+1].effects});(0,s.O9)(t[e].effects,t[e+1].effects)}return t.sort(((e,t)=>t.scale-e.scale)),t}function f(e){let t;if(!e)return[];try{t=function(e,t){var r,n={},i=(t=void 0!==t?t:{}).grammarSource,a={start:Ve},o=Ve,s="none",u=")",c=",",f="(",p="%",h="px",d="cm",g="mm",m="in",y="pt",v="pc",b="deg",w="rad",A="grad",S="turn",x="#",_=".",M="e",O=/^[ \t\n\r]/,$=/^[a-z\-]/,E=/^[0-9a-fA-F]/,C=/^[+\-]/,F=/^[0-9]/,I=Be("none"),Z=Ue("none",!1),N=Ue(")",!1),L=Ue(",",!1),R=Be("whitespace"),k=Te([" ","\t","\n","\r"],!1,!1),j=Be("function"),D=Ue("(",!1),U=Be("identifier"),T=Te([["a","z"],"-"],!1,!1),B=Be("percentage"),J=Ue("%",!1),P=Be("length"),G=Ue("px",!1),V=Ue("cm",!1),q=Ue("mm",!1),z=Ue("in",!1),W=Ue("pt",!1),Y=Ue("pc",!1),K=Be("angle"),H=Ue("deg",!1),Q=Ue("rad",!1),X=Ue("grad",!1),ee=Ue("turn",!1),te=Be("number"),re=Be("color"),ne=Ue("#",!1),ie=Te([["0","9"],["a","f"],["A","F"]],!1,!1),ae=Te(["+","-"],!1,!1),oe=Te([["0","9"]],!1,!1),se=Ue(".",!1),le=Ue("e",!1),ue=function(){return[]},ce=function(e,t){return{type:"function",name:e,parameters:t||[]}},fe=function(e,t){return t.length>0?function(e,t){return[e].concat(function(e){return e.map((function(e){return e[3]}))}(t))}(e,t):[e]},pe=function(e){return{type:"quantity",value:e.value,unit:e.unit}},he=function(e){return{type:"color",colorType:e.type,value:e.value}},de=function(e){return e},ge=function(){return De()},me=function(e){return{value:e,unit:"%"}},ye=function(e){return{value:e,unit:"px"}},ve=function(e){return{value:e,unit:"cm"}},be=function(e){return{value:e,unit:"mm"}},we=function(e){return{value:e,unit:"in"}},Ae=function(e){return{value:e,unit:"pt"}},Se=function(e){return{value:e,unit:"pc"}},xe=function(e){return{value:e,unit:"deg"}},_e=function(e){return{value:e,unit:"rad"}},Me=function(e){return{value:e,unit:"grad"}},Oe=function(e){return{value:e,unit:"turn"}},$e=function(e){return{value:e,unit:null}},Ee=function(){return{type:"hex",value:De()}},Ce=function(e){return{type:"function",value:e}},Fe=function(){return{type:"named",value:De()}},Ie=function(){return parseFloat(De())},Ze=0|t.peg$currPos,Ne=Ze,Le=[{line:1,column:1}],Re=Ze,ke=t.peg$maxFailExpected||[],je=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in a))throw new Error("Can't start parsing from rule \""+t.startRule+'".');o=a[t.startRule]}function De(){return e.substring(Ne,Ze)}function Ue(e,t){return{type:"literal",text:e,ignoreCase:t}}function Te(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Be(e){return{type:"other",description:e}}function Je(t){var r,n=Le[t];if(n)return n;if(t>=Le.length)r=Le.length-1;else for(r=t;!Le[--r];);for(n={line:(n=Le[r]).line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return Le[t]=n,n}function Pe(e,t,r){var n=Je(e),a=Je(t);return{source:i,start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:a.line,column:a.column}}}function Ge(e){Ze<Re||(Ze>Re&&(Re=Ze,ke=[]),ke.push(e))}function Ve(){var e;return(e=qe())===n&&(e=function(){var e,t;if(e=[],(t=ze())!==n)for(;t!==n;)e.push(t),t=ze();else e=n;return e}()),e}function qe(){var t,r;return je++,t=Ze,Ye(),e.substr(Ze,4)===s?(r=s,Ze+=4):(r=n,0===je&&Ge(Z)),r!==n?(Ye(),Ne=t,t=ue()):(Ze=t,t=n),je--,t===n&&0===je&&Ge(I),t}function ze(){var t,r,i,a;return t=Ze,Ye(),(r=function(){var t,r,i;return je++,t=Ze,(r=Ke())!==n?(40===e.charCodeAt(Ze)?(i=f,Ze++):(i=n,0===je&&Ge(D)),i!==n?(Ne=t,t=de(r)):(Ze=t,t=n)):(Ze=t,t=n),je--,t===n&&(r=n,0===je&&Ge(j)),t}())!==n?(Ye(),(i=function(){var t,r,i,a,o,s,l,u;if(t=Ze,(r=We())!==n){for(i=[],a=Ze,o=Ye(),44===e.charCodeAt(Ze)?(s=c,Ze++):(s=n,0===je&&Ge(L)),s===n&&(s=null),l=Ye(),(u=We())!==n?a=o=[o,s,l,u]:(Ze=a,a=n);a!==n;)i.push(a),a=Ze,o=Ye(),44===e.charCodeAt(Ze)?(s=c,Ze++):(s=n,0===je&&Ge(L)),s===n&&(s=null),l=Ye(),(u=We())!==n?a=o=[o,s,l,u]:(Ze=a,a=n);Ne=t,t=fe(r,i)}else Ze=t,t=n;return t}())===n&&(i=null),Ye(),41===e.charCodeAt(Ze)?(a=u,Ze++):(a=n,0===je&&Ge(N)),a!==n?(Ye(),Ne=t,t=ce(r,i)):(Ze=t,t=n)):(Ze=t,t=n),t}function We(){var e,t;return e=Ze,(t=He())===n&&(t=Qe())===n&&(t=Xe())===n&&(t=function(){var e,t;return je++,e=Ze,Ye(),(t=tt())!==n?(Ne=e,e=$e(t)):(Ze=e,e=n),je--,e===n&&0===je&&Ge(te),e}()),t!==n&&(Ne=e,t=pe(t)),(e=t)===n&&(e=Ze,(t=et())!==n&&(Ne=e,t=he(t)),e=t),e}function Ye(){var t,r;for(je++,t=[],r=e.charAt(Ze),O.test(r)?Ze++:(r=n,0===je&&Ge(k));r!==n;)t.push(r),r=e.charAt(Ze),O.test(r)?Ze++:(r=n,0===je&&Ge(k));return je--,r=n,0===je&&Ge(R),t}function Ke(){var t,r,i;if(je++,t=Ze,r=[],i=e.charAt(Ze),$.test(i)?Ze++:(i=n,0===je&&Ge(T)),i!==n)for(;i!==n;)r.push(i),i=e.charAt(Ze),$.test(i)?Ze++:(i=n,0===je&&Ge(T));else r=n;return r!==n&&(Ne=t,r=ge()),je--,(t=r)===n&&(r=n,0===je&&Ge(U)),t}function He(){var t,r,i;return je++,t=Ze,Ye(),(r=tt())!==n?(37===e.charCodeAt(Ze)?(i=p,Ze++):(i=n,0===je&&Ge(J)),i!==n?(Ne=t,t=me(r)):(Ze=t,t=n)):(Ze=t,t=n),je--,t===n&&0===je&&Ge(B),t}function Qe(){var t,r,i;return je++,t=Ze,Ye(),(r=tt())!==n?(e.substr(Ze,2)===h?(i=h,Ze+=2):(i=n,0===je&&Ge(G)),i!==n?(Ne=t,t=ye(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,Ye(),(r=tt())!==n?(e.substr(Ze,2)===d?(i=d,Ze+=2):(i=n,0===je&&Ge(V)),i!==n?(Ne=t,t=ve(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,Ye(),(r=tt())!==n?(e.substr(Ze,2)===g?(i=g,Ze+=2):(i=n,0===je&&Ge(q)),i!==n?(Ne=t,t=be(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,Ye(),(r=tt())!==n?(e.substr(Ze,2)===m?(i=m,Ze+=2):(i=n,0===je&&Ge(z)),i!==n?(Ne=t,t=we(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,Ye(),(r=tt())!==n?(e.substr(Ze,2)===y?(i=y,Ze+=2):(i=n,0===je&&Ge(W)),i!==n?(Ne=t,t=Ae(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,Ye(),(r=tt())!==n?(e.substr(Ze,2)===v?(i=v,Ze+=2):(i=n,0===je&&Ge(Y)),i!==n?(Ne=t,t=Se(r)):(Ze=t,t=n)):(Ze=t,t=n)))))),je--,t===n&&0===je&&Ge(P),t}function Xe(){var t,r,i;return je++,t=Ze,(r=tt())!==n?(e.substr(Ze,3)===b?(i=b,Ze+=3):(i=n,0===je&&Ge(H)),i!==n?(Ne=t,t=xe(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,(r=tt())!==n?(e.substr(Ze,3)===w?(i=w,Ze+=3):(i=n,0===je&&Ge(Q)),i!==n?(Ne=t,t=_e(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,(r=tt())!==n?(e.substr(Ze,4)===A?(i=A,Ze+=4):(i=n,0===je&&Ge(X)),i!==n?(Ne=t,t=Me(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,(r=tt())!==n?(e.substr(Ze,4)===S?(i=S,Ze+=4):(i=n,0===je&&Ge(ee)),i!==n?(Ne=t,t=Oe(r)):(Ze=t,t=n)):(Ze=t,t=n)))),je--,t===n&&(r=n,0===je&&Ge(K)),t}function et(){var t,r,i,a;if(je++,t=Ze,35===e.charCodeAt(Ze)?(r=x,Ze++):(r=n,0===je&&Ge(ne)),r!==n){if(i=[],a=e.charAt(Ze),E.test(a)?Ze++:(a=n,0===je&&Ge(ie)),a!==n)for(;a!==n;)i.push(a),a=e.charAt(Ze),E.test(a)?Ze++:(a=n,0===je&&Ge(ie));else i=n;i!==n?(Ne=t,t=Ee()):(Ze=t,t=n)}else Ze=t,t=n;return t===n&&(t=Ze,(r=ze())!==n&&(Ne=t,r=Ce(r)),(t=r)===n&&(t=Ze,(r=Ke())!==n&&(Ne=t,r=Fe()),t=r)),je--,t===n&&(r=n,0===je&&Ge(re)),t}function tt(){var t,r,i,a,o,s,l,u;for(t=Ze,r=e.charAt(Ze),C.test(r)?Ze++:(r=n,0===je&&Ge(ae)),r===n&&(r=null),i=Ze,a=[],o=e.charAt(Ze),F.test(o)?Ze++:(o=n,0===je&&Ge(oe));o!==n;)a.push(o),o=e.charAt(Ze),F.test(o)?Ze++:(o=n,0===je&&Ge(oe));if(46===e.charCodeAt(Ze)?(o=_,Ze++):(o=n,0===je&&Ge(se)),o!==n){if(s=[],l=e.charAt(Ze),F.test(l)?Ze++:(l=n,0===je&&Ge(oe)),l!==n)for(;l!==n;)s.push(l),l=e.charAt(Ze),F.test(l)?Ze++:(l=n,0===je&&Ge(oe));else s=n;s!==n?i=a=[a,o,s]:(Ze=i,i=n)}else Ze=i,i=n;if(i===n)if(i=[],a=e.charAt(Ze),F.test(a)?Ze++:(a=n,0===je&&Ge(oe)),a!==n)for(;a!==n;)i.push(a),a=e.charAt(Ze),F.test(a)?Ze++:(a=n,0===je&&Ge(oe));else i=n;if(i!==n){if(a=Ze,101===e.charCodeAt(Ze)?(o=M,Ze++):(o=n,0===je&&Ge(le)),o!==n){if(s=e.charAt(Ze),C.test(s)?Ze++:(s=n,0===je&&Ge(ae)),s===n&&(s=null),l=[],u=e.charAt(Ze),F.test(u)?Ze++:(u=n,0===je&&Ge(oe)),u!==n)for(;u!==n;)l.push(u),u=e.charAt(Ze),F.test(u)?Ze++:(u=n,0===je&&Ge(oe));else l=n;l!==n?a=o=[o,s,l]:(Ze=a,a=n)}else Ze=a,a=n;a===n&&(a=null),Ne=t,t=Ie()}else Ze=t,t=n;return t}if(r=o(),t.peg$library)return{peg$result:r,peg$currPos:Ze,peg$FAILED:n,peg$maxFailExpected:ke,peg$maxFailPos:Re};if(r!==n&&Ze===e.length)return r;throw r!==n&&Ze<e.length&&Ge({type:"end"}),function(e,t,r){return new l(l.buildMessage(e,t),e,t,r)}(ke,Re<e.length?e.charAt(Re):null,Re<e.length?Pe(Re,Re+1):Pe(Re,Re))}(e)}catch(t){throw new n.A("effect:invalid-syntax","Invalid effect syntax",{value:e,error:t})}return t.map((e=>function(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(e){let t=1;return p(e.parameters,1),1===e.parameters.length&&(t=y(e.parameters[0])),new o.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return p(e.parameters,1),1===e.parameters.length&&(t=y(e.parameters[0])),new o.jm(t)}(e);case"hue-rotate":return function(e){let t=0;return p(e.parameters,1),1===e.parameters.length&&(t=function(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=g[e.unit]))throw new n.A("effect:type-error",`Expected <angle>, Actual: ${h(e)}`,{term:e})}(e),e.value*g[e.unit]||0}(e.parameters[0])),new o.Nd(t)}(e);case"blur":return function(e){let t=0;return p(e.parameters,1),1===e.parameters.length&&(t=v(e.parameters[0]),d(t,e.parameters[0])),new o.Fk(t)}(e);case"drop-shadow":return function(e){const t=[];let r=null;for(const i of e.parameters)if("color"===i.type){if(t.length&&Object.freeze(t),r)throw new n.A("effect:type-error","Accepts only one color",{});r=b(i)}else{const e=v(i);if(Object.isFrozen(t))throw new n.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&d(e,i)}if(t.length<2||t.length>3)throw new n.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new o.$b(t[0],t[1],t[2]||0,r||w("black"))}(e);case"bloom":return function(e){let t=1,r=0,n=0;return p(e.parameters,3),e.parameters[0]&&(t=y(e.parameters[0])),e.parameters[1]&&(r=v(e.parameters[1]),d(r,e.parameters[1])),e.parameters[2]&&(n=y(e.parameters[2])),new o.bv(t,r,n)}(e)}}catch(t){throw t.details.filter=e,t}throw new n.A("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}(e)))}function p(e,t){if(e.length>t)throw new n.A("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function h(e){if("color"===e.type)return"<color>";if(e.unit){if(e.unit in m)return"<length>";if(e.unit in g)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function d(e,t){if(e<0)throw new n.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}(function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r})(l,Error),l.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,n=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){n=e[r].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,a=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,o=this.location.source+":"+a.line+":"+a.column;if(n){var s=this.location.end,l=u("",a.line.toString().length," "),c=n[i.line-1],f=(i.line===s.line?s.column:c.length+1)-i.column||1;t+="\n --\x3e "+o+"\n"+l+" |\n"+a.line+" | "+c+"\n"+l+" | "+u("",i.column-1," ")+u("",f,"^")}else t+="\n at "+o}return t},l.buildMessage=function(e,t){var r={literal:function(e){return'"'+i(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?a(e[0])+"-"+a(e[1]):a(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function i(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function a(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function o(e){return r[e.type](e)}return"Expected "+function(e){var t,r,n=e.map(o);if(n.sort(),n.length>0){for(t=1,r=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+function(e){return e?'"'+i(e)+'"':"end of input"}(t)+" found."};const g={deg:1,grad:.9,rad:180/Math.PI,turn:360},m={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function y(e){!function(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new n.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${h(e)}`,{term:e})}(e);const t=e.value;return d(t,e),"%"===e.unit?.01*t:t}function v(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=m[e.unit]))throw new n.A("effect:type-error",`Expected <length>, Actual: ${h(e)}`,{term:e})}(e),e.value*m[e.unit]||0}function b(e){switch(e.colorType){case"hex":return(0,a.qh)(e.value);case"named":return w(e.value);case"function":return function(e){if(p(e.parameters,4),A.test(e.name))return[y(e.parameters[0]),y(e.parameters[1]),y(e.parameters[2]),e.parameters[3]?y(e.parameters[3]):1];if(S.test(e.name))return(0,a.z$)(function(e){return function(e){if("quantity"!==e.type||null!==e.unit)throw new n.A("effect:type-error",`Expected <double>, Actual: ${h(e)}`,{term:e})}(e),d(e.value,e),e.value}(e.parameters[0]),y(e.parameters[1]),y(e.parameters[2]),e.parameters[3]?y(e.parameters[3]):1);throw new n.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function w(e){if(!(0,a.V6)(e))throw new n.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,a.c4)(e)}const A=/^rgba?/i,S=/^hsla?/i;function x(e,t,r){try{return function(e){if(!e||0===e.length)return null;if(function(e){const t=e[0];return!!t&&"scale"in t}(e)){const t=[];for(const r of e)t.push({scale:r.scale,value:M(r.value)});return t}return M(e)}(e)}catch(e){r?.messages?.push(e)}return null}function _(e,t,r,n){try{const n=function(e){const t=c(e);return t?(0,s.dw)(t)?t.map((e=>e.toJSON())):t.map((({scale:e,effects:t})=>({scale:e,value:t.map((e=>e.toJSON()))}))):null}(e);(0,i.sM)(r,n,t)}catch(e){n.messages&&n.messages.push(e)}}function M(e){if(!e?.length)return"";const t=[];for(const r of e){let e=[];switch(r.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[O(r,"amount")];break;case"blur":e=[O(r,"radius","pt")];break;case"hue-rotate":e=[O(r,"angle","deg")];break;case"drop-shadow":e=[O(r,"xoffset","pt"),O(r,"yoffset","pt"),O(r,"blurRadius","pt"),$(r,"color")];break;case"bloom":e=[O(r,"strength"),O(r,"radius","pt"),O(r,"threshold")]}const n=`${r.type}(${e.filter(Boolean).join(" ")})`;c(n),t.push(n)}return t.join(" ")}function O(e,t,r){if(null==e[t])throw new n.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return r?e[t]+r:""+e[t]}function $(e,t){if(null==e[t])throw new n.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const r=e[t];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||0})`}},92071:(e,t,r)=>{r.d(t,{P:()=>b,L:()=>w});var n=r(90237),i=r(69622),a=r(76953),o=r(4718),s=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(s.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[s.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,o.o8)(e),s.Gr.DEFAULTS)}));for(let r=s.Gr.SERVICE;r<s.AU;r++){const n=this._originStores[r];n&&n.forEach(((n,i)=>{e&&e.has(i)||t.set(i,(0,o.o8)(n),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=s.Gr.USER){let n=this._originStores[r];if(n||(n=new Map,this._originStores[r]=n),n.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const n=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),n!==t}return!1}delete(e,t=s.Gr.USER){const r=this._originStores[t];if(!r)return;const n=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return n}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],n=r?.get(e),i=this._values.get(e);return this._values.set(e,n),this._propertyOriginMap.set(e,t),i!==n}originOf(e){return this._propertyOriginMap.get(e)||s.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var u=r(45917),c=r(88620),f=r(40608);const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,c.oY)(this),r=t.store,n=new l;t.store=n,(0,a.k)(t,r,n)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const r=h(this),n=(0,s.aB)(t);if("string"==typeof e)return r.get(e,n);const i={};return e.forEach((e=>{i[e]=r.get(e,n)})),i}originOf(e){return(0,s.OL)(this.originIdOf(e))}originIdOf(e){return h(this).originOf(e)}revert(e,t){const r=h(this),n=(0,s.aB)(t),i=(0,c.oY)(this);let a;a="string"==typeof e?"*"===e?r.keys(n):[e]:e,a.forEach((e=>{i.invalidate(e),r.revert(e,n),i.commit(e)}))}};return t=(0,n._)([(0,f.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function h(e){return(0,c.oY)(e).store}let d=class extends(p(i.A)){};d=(0,n._)([(0,f.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],d);var g=r(16649),m=r(49422);const y=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,s.aB)(t))}write(e,t){return(0,m.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,c.oY)(this).setAtOrigin(e,t,(0,s.aB)(r))}removeOrigin(e){const t=v(this),r=(0,s.aB)(e),n=t.keys(r);for(const e of n)t.originOf(e)===r&&t.set(e,t.get(e,r),s.Gr.USER)}updateOrigin(e,t){const r=v(this),n=(0,s.aB)(t),i=(0,g.Jt)(this,e);for(let t=n+1;t<s.AU;++t)r.delete(e,t);r.set(e,i,n)}toJSON(e){return this.write({},e)}};return t=(0,n._)([(0,f.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,c.oY)(e).store}const b=e=>{let t=class extends(y(p(e))){constructor(...e){super(...e)}};return t=(0,n._)([(0,f.$)("esri.core.MultiOriginJSONSupport")],t),t};let w=class extends(b(i.A)){};w=(0,n._)([(0,f.$)("esri.core.MultiOriginJSONSupport")],w)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8219],{4146:(e,t,r)=>{r.d(t,{A:()=>w});var n=r(90237),i=r(78888),a=r(49186),o=r(65529),s=r(4902),l=r(92474),u=r(53966),c=r(74887),f=r(84952),p=r(10107),h=(r(44208),r(87811),r(40608)),g=r(5443),d=r(16930),m=r(92602),y=r(79677);let v=0,b=class extends(o.A.EventedMixin(s.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new g.A(-180,-90,180,90,d.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=d.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:n}=await r.e(5613).then(r.bind(r,45613));try{return await n(t)}catch(e){const r=t?.portalItem,n=r?.id||"unset",i=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+n+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,f.An)(this.url)}createLayerView(e,t){return Promise.reject(new a.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new a.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,n._)([(0,p.MZ)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,n._)([(0,p.MZ)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,n._)([(0,p.MZ)({type:g.A})],b.prototype,"fullExtent",void 0),(0,n._)([(0,p.MZ)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,n._)([(0,p.MZ)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,n._)([(0,p.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,n._)([(0,p.MZ)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,n._)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,n._)([(0,p.MZ)({clonable:!1})],b.prototype,"parent",void 0),(0,n._)([(0,p.MZ)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,n._)([(0,p.MZ)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,n._)([(0,p.MZ)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,n._)([(0,p.MZ)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,n._)([(0,p.MZ)({type:d.A})],b.prototype,"spatialReference",void 0),(0,n._)([(0,p.MZ)({type:String})],b.prototype,"title",void 0),(0,n._)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,n._)([(0,p.MZ)()],b.prototype,"url",void 0),(0,n._)([(0,p.MZ)({type:y.A})],b.prototype,"visibilityTimeExtent",void 0),(0,n._)([(0,p.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,n._)([(0,h.$)("esri.layers.Layer")],b);const w=b},25036:(e,t,r)=>{r.d(t,{j:()=>o});var n=r(90237),i=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,n._)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,n._)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,n._)([(0,i.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,n._)([(0,a.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},54310:(e,t,r)=>{r.d(t,{J:()=>b});var n=r(90237),i=(r(44208),r(53966)),a=r(74887),o=r(10107),s=r(79901),l=(r(87811),r(40608)),u=r(89317),c=r(5503),f=r(36708),p=r(80559);const h=new c.A,g=new WeakMap;function d(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:d(t,e%t):0}let m=0,y=0;function v(){const e=Date.now();let t=!1;for(const r of h){const n=r.deref();n?n.refreshInterval&&e-(g.get(n)??0)+5>=6e4*n.refreshInterval&&(g.set(n,e),n.refresh(e)):t=!0}if(t)for(let e=h.length-1;e>=0;e--)h.at(e).deref()||h.removeAt(e)}(0,p.fm)((()=>{const e=Date.now();let t=0;for(const r of h){const n=r.deref();n&&(t=d(Math.round(6e4*n.refreshInterval),t),n.refreshInterval?g.get(n)||g.set(n,e):g.delete(n))}if(t!==y){if(y=t,clearInterval(m),0===y)return void(m=0);m=setInterval(v,y)}}),f.OH);const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,a.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&h.push(new WeakRef(e))}(this)}),(()=>{}))}destroy(){!function(e){const t=h.find((t=>t.deref()===e));t&&h.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,a.QZ)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){}};return(0,n._)([(0,o.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.K}}}}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,s.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,n._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,n._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}},63074:(e,t,r)=>{r.d(t,{LF:()=>c,dM:()=>f,sU:()=>l});var n=r(90237),i=r(10107),a=(r(44208),r(53966),r(87811),r(40608)),o=r(89317),s=r(76369);const l={type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:o.K}},"portal-item":{read:!0,write:{layerContainerTypes:o.K}}}}},u={read:{reader:s.LF},write:{allowNull:!0,writer:s.M9,layerContainerTypes:o.K}},c={json:{read:!1,write:!1,origins:{"web-map":u,"portal-item":u}}},f=e=>{let t=class extends e{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,n._)([(0,i.MZ)(l)],t.prototype,"blendMode",void 0),(0,n._)([(0,i.MZ)(c)],t.prototype,"effect",void 0),t=(0,n._)([(0,a.$)("esri.layers.mixins.BlendLayer")],t),t}},76369:(e,t,r)=>{r.d(t,{LF:()=>x,M9:()=>_});var n=r(49186),i=r(93637),a=r(40876),o=r(59247),s=r(27865);function l(e,t,r,n){var i=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(i,l.prototype),i.expected=t,i.found=r,i.location=n,i.name="SyntaxError",i}function u(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}function c(e){if(!e||0===e.length)return null;if("string"==typeof e){const t=f(e);return t&&0!==t.length?t:null}const t=e.map((e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new n.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:f(e.value)}}));t.sort(((e,t)=>t.effects.length-e.effects.length));for(let e=0;e<t.length-1;e++){if(!(0,s.mj)(t[e].effects,t[e+1].effects))throw new n.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[e].effects,b:t[e+1].effects});(0,s.O9)(t[e].effects,t[e+1].effects)}return t.sort(((e,t)=>t.scale-e.scale)),t}function f(e){let t;if(!e)return[];try{t=function(e,t){var r,n={},i=(t=void 0!==t?t:{}).grammarSource,a={start:Ve},o=Ve,s="none",u=")",c=",",f="(",p="%",h="px",g="cm",d="mm",m="in",y="pt",v="pc",b="deg",w="rad",A="grad",S="turn",x="#",_=".",M="e",O=/^[ \t\n\r]/,$=/^[a-z\-]/,E=/^[0-9a-fA-F]/,C=/^[+\-]/,F=/^[0-9]/,I=Be("none"),Z=Ue("none",!1),N=Ue(")",!1),L=Ue(",",!1),R=Be("whitespace"),k=Te([" ","\t","\n","\r"],!1,!1),j=Be("function"),D=Ue("(",!1),U=Be("identifier"),T=Te([["a","z"],"-"],!1,!1),B=Be("percentage"),J=Ue("%",!1),P=Be("length"),G=Ue("px",!1),V=Ue("cm",!1),q=Ue("mm",!1),z=Ue("in",!1),Y=Ue("pt",!1),W=Ue("pc",!1),K=Be("angle"),H=Ue("deg",!1),Q=Ue("rad",!1),X=Ue("grad",!1),ee=Ue("turn",!1),te=Be("number"),re=Be("color"),ne=Ue("#",!1),ie=Te([["0","9"],["a","f"],["A","F"]],!1,!1),ae=Te(["+","-"],!1,!1),oe=Te([["0","9"]],!1,!1),se=Ue(".",!1),le=Ue("e",!1),ue=function(){return[]},ce=function(e,t){return{type:"function",name:e,parameters:t||[]}},fe=function(e,t){return t.length>0?function(e,t){return[e].concat(function(e){return e.map((function(e){return e[3]}))}(t))}(e,t):[e]},pe=function(e){return{type:"quantity",value:e.value,unit:e.unit}},he=function(e){return{type:"color",colorType:e.type,value:e.value}},ge=function(e){return e},de=function(){return De()},me=function(e){return{value:e,unit:"%"}},ye=function(e){return{value:e,unit:"px"}},ve=function(e){return{value:e,unit:"cm"}},be=function(e){return{value:e,unit:"mm"}},we=function(e){return{value:e,unit:"in"}},Ae=function(e){return{value:e,unit:"pt"}},Se=function(e){return{value:e,unit:"pc"}},xe=function(e){return{value:e,unit:"deg"}},_e=function(e){return{value:e,unit:"rad"}},Me=function(e){return{value:e,unit:"grad"}},Oe=function(e){return{value:e,unit:"turn"}},$e=function(e){return{value:e,unit:null}},Ee=function(){return{type:"hex",value:De()}},Ce=function(e){return{type:"function",value:e}},Fe=function(){return{type:"named",value:De()}},Ie=function(){return parseFloat(De())},Ze=0|t.peg$currPos,Ne=Ze,Le=[{line:1,column:1}],Re=Ze,ke=t.peg$maxFailExpected||[],je=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in a))throw new Error("Can't start parsing from rule \""+t.startRule+'".');o=a[t.startRule]}function De(){return e.substring(Ne,Ze)}function Ue(e,t){return{type:"literal",text:e,ignoreCase:t}}function Te(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Be(e){return{type:"other",description:e}}function Je(t){var r,n=Le[t];if(n)return n;if(t>=Le.length)r=Le.length-1;else for(r=t;!Le[--r];);for(n={line:(n=Le[r]).line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return Le[t]=n,n}function Pe(e,t,r){var n=Je(e),a=Je(t);return{source:i,start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:a.line,column:a.column}}}function Ge(e){Ze<Re||(Ze>Re&&(Re=Ze,ke=[]),ke.push(e))}function Ve(){var e;return(e=qe())===n&&(e=function(){var e,t;if(e=[],(t=ze())!==n)for(;t!==n;)e.push(t),t=ze();else e=n;return e}()),e}function qe(){var t,r;return je++,t=Ze,We(),e.substr(Ze,4)===s?(r=s,Ze+=4):(r=n,0===je&&Ge(Z)),r!==n?(We(),Ne=t,t=ue()):(Ze=t,t=n),je--,t===n&&0===je&&Ge(I),t}function ze(){var t,r,i,a;return t=Ze,We(),(r=function(){var t,r,i;return je++,t=Ze,(r=Ke())!==n?(40===e.charCodeAt(Ze)?(i=f,Ze++):(i=n,0===je&&Ge(D)),i!==n?(Ne=t,t=ge(r)):(Ze=t,t=n)):(Ze=t,t=n),je--,t===n&&(r=n,0===je&&Ge(j)),t}())!==n?(We(),(i=function(){var t,r,i,a,o,s,l,u;if(t=Ze,(r=Ye())!==n){for(i=[],a=Ze,o=We(),44===e.charCodeAt(Ze)?(s=c,Ze++):(s=n,0===je&&Ge(L)),s===n&&(s=null),l=We(),(u=Ye())!==n?a=o=[o,s,l,u]:(Ze=a,a=n);a!==n;)i.push(a),a=Ze,o=We(),44===e.charCodeAt(Ze)?(s=c,Ze++):(s=n,0===je&&Ge(L)),s===n&&(s=null),l=We(),(u=Ye())!==n?a=o=[o,s,l,u]:(Ze=a,a=n);Ne=t,t=fe(r,i)}else Ze=t,t=n;return t}())===n&&(i=null),We(),41===e.charCodeAt(Ze)?(a=u,Ze++):(a=n,0===je&&Ge(N)),a!==n?(We(),Ne=t,t=ce(r,i)):(Ze=t,t=n)):(Ze=t,t=n),t}function Ye(){var e,t;return e=Ze,(t=He())===n&&(t=Qe())===n&&(t=Xe())===n&&(t=function(){var e,t;return je++,e=Ze,We(),(t=tt())!==n?(Ne=e,e=$e(t)):(Ze=e,e=n),je--,e===n&&0===je&&Ge(te),e}()),t!==n&&(Ne=e,t=pe(t)),(e=t)===n&&(e=Ze,(t=et())!==n&&(Ne=e,t=he(t)),e=t),e}function We(){var t,r;for(je++,t=[],r=e.charAt(Ze),O.test(r)?Ze++:(r=n,0===je&&Ge(k));r!==n;)t.push(r),r=e.charAt(Ze),O.test(r)?Ze++:(r=n,0===je&&Ge(k));return je--,r=n,0===je&&Ge(R),t}function Ke(){var t,r,i;if(je++,t=Ze,r=[],i=e.charAt(Ze),$.test(i)?Ze++:(i=n,0===je&&Ge(T)),i!==n)for(;i!==n;)r.push(i),i=e.charAt(Ze),$.test(i)?Ze++:(i=n,0===je&&Ge(T));else r=n;return r!==n&&(Ne=t,r=de()),je--,(t=r)===n&&(r=n,0===je&&Ge(U)),t}function He(){var t,r,i;return je++,t=Ze,We(),(r=tt())!==n?(37===e.charCodeAt(Ze)?(i=p,Ze++):(i=n,0===je&&Ge(J)),i!==n?(Ne=t,t=me(r)):(Ze=t,t=n)):(Ze=t,t=n),je--,t===n&&0===je&&Ge(B),t}function Qe(){var t,r,i;return je++,t=Ze,We(),(r=tt())!==n?(e.substr(Ze,2)===h?(i=h,Ze+=2):(i=n,0===je&&Ge(G)),i!==n?(Ne=t,t=ye(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,We(),(r=tt())!==n?(e.substr(Ze,2)===g?(i=g,Ze+=2):(i=n,0===je&&Ge(V)),i!==n?(Ne=t,t=ve(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,We(),(r=tt())!==n?(e.substr(Ze,2)===d?(i=d,Ze+=2):(i=n,0===je&&Ge(q)),i!==n?(Ne=t,t=be(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,We(),(r=tt())!==n?(e.substr(Ze,2)===m?(i=m,Ze+=2):(i=n,0===je&&Ge(z)),i!==n?(Ne=t,t=we(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,We(),(r=tt())!==n?(e.substr(Ze,2)===y?(i=y,Ze+=2):(i=n,0===je&&Ge(Y)),i!==n?(Ne=t,t=Ae(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,We(),(r=tt())!==n?(e.substr(Ze,2)===v?(i=v,Ze+=2):(i=n,0===je&&Ge(W)),i!==n?(Ne=t,t=Se(r)):(Ze=t,t=n)):(Ze=t,t=n)))))),je--,t===n&&0===je&&Ge(P),t}function Xe(){var t,r,i;return je++,t=Ze,(r=tt())!==n?(e.substr(Ze,3)===b?(i=b,Ze+=3):(i=n,0===je&&Ge(H)),i!==n?(Ne=t,t=xe(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,(r=tt())!==n?(e.substr(Ze,3)===w?(i=w,Ze+=3):(i=n,0===je&&Ge(Q)),i!==n?(Ne=t,t=_e(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,(r=tt())!==n?(e.substr(Ze,4)===A?(i=A,Ze+=4):(i=n,0===je&&Ge(X)),i!==n?(Ne=t,t=Me(r)):(Ze=t,t=n)):(Ze=t,t=n),t===n&&(t=Ze,(r=tt())!==n?(e.substr(Ze,4)===S?(i=S,Ze+=4):(i=n,0===je&&Ge(ee)),i!==n?(Ne=t,t=Oe(r)):(Ze=t,t=n)):(Ze=t,t=n)))),je--,t===n&&(r=n,0===je&&Ge(K)),t}function et(){var t,r,i,a;if(je++,t=Ze,35===e.charCodeAt(Ze)?(r=x,Ze++):(r=n,0===je&&Ge(ne)),r!==n){if(i=[],a=e.charAt(Ze),E.test(a)?Ze++:(a=n,0===je&&Ge(ie)),a!==n)for(;a!==n;)i.push(a),a=e.charAt(Ze),E.test(a)?Ze++:(a=n,0===je&&Ge(ie));else i=n;i!==n?(Ne=t,t=Ee()):(Ze=t,t=n)}else Ze=t,t=n;return t===n&&(t=Ze,(r=ze())!==n&&(Ne=t,r=Ce(r)),(t=r)===n&&(t=Ze,(r=Ke())!==n&&(Ne=t,r=Fe()),t=r)),je--,t===n&&(r=n,0===je&&Ge(re)),t}function tt(){var t,r,i,a,o,s,l,u;for(t=Ze,r=e.charAt(Ze),C.test(r)?Ze++:(r=n,0===je&&Ge(ae)),r===n&&(r=null),i=Ze,a=[],o=e.charAt(Ze),F.test(o)?Ze++:(o=n,0===je&&Ge(oe));o!==n;)a.push(o),o=e.charAt(Ze),F.test(o)?Ze++:(o=n,0===je&&Ge(oe));if(46===e.charCodeAt(Ze)?(o=_,Ze++):(o=n,0===je&&Ge(se)),o!==n){if(s=[],l=e.charAt(Ze),F.test(l)?Ze++:(l=n,0===je&&Ge(oe)),l!==n)for(;l!==n;)s.push(l),l=e.charAt(Ze),F.test(l)?Ze++:(l=n,0===je&&Ge(oe));else s=n;s!==n?i=a=[a,o,s]:(Ze=i,i=n)}else Ze=i,i=n;if(i===n)if(i=[],a=e.charAt(Ze),F.test(a)?Ze++:(a=n,0===je&&Ge(oe)),a!==n)for(;a!==n;)i.push(a),a=e.charAt(Ze),F.test(a)?Ze++:(a=n,0===je&&Ge(oe));else i=n;if(i!==n){if(a=Ze,101===e.charCodeAt(Ze)?(o=M,Ze++):(o=n,0===je&&Ge(le)),o!==n){if(s=e.charAt(Ze),C.test(s)?Ze++:(s=n,0===je&&Ge(ae)),s===n&&(s=null),l=[],u=e.charAt(Ze),F.test(u)?Ze++:(u=n,0===je&&Ge(oe)),u!==n)for(;u!==n;)l.push(u),u=e.charAt(Ze),F.test(u)?Ze++:(u=n,0===je&&Ge(oe));else l=n;l!==n?a=o=[o,s,l]:(Ze=a,a=n)}else Ze=a,a=n;a===n&&(a=null),Ne=t,t=Ie()}else Ze=t,t=n;return t}if(r=o(),t.peg$library)return{peg$result:r,peg$currPos:Ze,peg$FAILED:n,peg$maxFailExpected:ke,peg$maxFailPos:Re};if(r!==n&&Ze===e.length)return r;throw r!==n&&Ze<e.length&&Ge({type:"end"}),function(e,t,r){return new l(l.buildMessage(e,t),e,t,r)}(ke,Re<e.length?e.charAt(Re):null,Re<e.length?Pe(Re,Re+1):Pe(Re,Re))}(e)}catch(t){throw new n.A("effect:invalid-syntax","Invalid effect syntax",{value:e,error:t})}return t.map((e=>function(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(e){let t=1;return p(e.parameters,1),1===e.parameters.length&&(t=y(e.parameters[0])),new o.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return p(e.parameters,1),1===e.parameters.length&&(t=y(e.parameters[0])),new o.jm(t)}(e);case"hue-rotate":return function(e){let t=0;return p(e.parameters,1),1===e.parameters.length&&(t=function(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=d[e.unit]))throw new n.A("effect:type-error",`Expected <angle>, Actual: ${h(e)}`,{term:e})}(e),e.value*d[e.unit]||0}(e.parameters[0])),new o.Nd(t)}(e);case"blur":return function(e){let t=0;return p(e.parameters,1),1===e.parameters.length&&(t=v(e.parameters[0]),g(t,e.parameters[0])),new o.Fk(t)}(e);case"drop-shadow":return function(e){const t=[];let r=null;for(const i of e.parameters)if("color"===i.type){if(t.length&&Object.freeze(t),r)throw new n.A("effect:type-error","Accepts only one color",{});r=b(i)}else{const e=v(i);if(Object.isFrozen(t))throw new n.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&g(e,i)}if(t.length<2||t.length>3)throw new n.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new o.$b(t[0],t[1],t[2]||0,r||w("black"))}(e);case"bloom":return function(e){let t=1,r=0,n=0;return p(e.parameters,3),e.parameters[0]&&(t=y(e.parameters[0])),e.parameters[1]&&(r=v(e.parameters[1]),g(r,e.parameters[1])),e.parameters[2]&&(n=y(e.parameters[2])),new o.bv(t,r,n)}(e)}}catch(t){throw t.details.filter=e,t}throw new n.A("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}(e)))}function p(e,t){if(e.length>t)throw new n.A("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function h(e){if("color"===e.type)return"<color>";if(e.unit){if(e.unit in m)return"<length>";if(e.unit in d)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function g(e,t){if(e<0)throw new n.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}(function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r})(l,Error),l.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,n=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){n=e[r].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,a=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,o=this.location.source+":"+a.line+":"+a.column;if(n){var s=this.location.end,l=u("",a.line.toString().length," "),c=n[i.line-1],f=(i.line===s.line?s.column:c.length+1)-i.column||1;t+="\n --\x3e "+o+"\n"+l+" |\n"+a.line+" | "+c+"\n"+l+" | "+u("",i.column-1," ")+u("",f,"^")}else t+="\n at "+o}return t},l.buildMessage=function(e,t){var r={literal:function(e){return'"'+i(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?a(e[0])+"-"+a(e[1]):a(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function i(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function a(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function o(e){return r[e.type](e)}return"Expected "+function(e){var t,r,n=e.map(o);if(n.sort(),n.length>0){for(t=1,r=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+function(e){return e?'"'+i(e)+'"':"end of input"}(t)+" found."};const d={deg:1,grad:.9,rad:180/Math.PI,turn:360},m={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function y(e){!function(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new n.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${h(e)}`,{term:e})}(e);const t=e.value;return g(t,e),"%"===e.unit?.01*t:t}function v(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=m[e.unit]))throw new n.A("effect:type-error",`Expected <length>, Actual: ${h(e)}`,{term:e})}(e),e.value*m[e.unit]||0}function b(e){switch(e.colorType){case"hex":return(0,a.qh)(e.value);case"named":return w(e.value);case"function":return function(e){if(p(e.parameters,4),A.test(e.name))return[y(e.parameters[0]),y(e.parameters[1]),y(e.parameters[2]),e.parameters[3]?y(e.parameters[3]):1];if(S.test(e.name))return(0,a.z$)(function(e){return function(e){if("quantity"!==e.type||null!==e.unit)throw new n.A("effect:type-error",`Expected <double>, Actual: ${h(e)}`,{term:e})}(e),g(e.value,e),e.value}(e.parameters[0]),y(e.parameters[1]),y(e.parameters[2]),e.parameters[3]?y(e.parameters[3]):1);throw new n.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function w(e){if(!(0,a.V6)(e))throw new n.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,a.c4)(e)}const A=/^rgba?/i,S=/^hsla?/i;function x(e,t,r){try{return function(e){if(!e||0===e.length)return null;if(function(e){const t=e[0];return!!t&&"scale"in t}(e)){const t=[];for(const r of e)t.push({scale:r.scale,value:M(r.value)});return t}return M(e)}(e)}catch(e){r?.messages?.push(e)}return null}function _(e,t,r,n){try{const n=function(e){const t=c(e);return t?(0,s.dw)(t)?t.map((e=>e.toJSON())):t.map((({scale:e,effects:t})=>({scale:e,value:t.map((e=>e.toJSON()))}))):null}(e);(0,i.sM)(r,n,t)}catch(e){n.messages&&n.messages.push(e)}}function M(e){if(!e?.length)return"";const t=[];for(const r of e){let e=[];switch(r.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[O(r,"amount")];break;case"blur":e=[O(r,"radius","pt")];break;case"hue-rotate":e=[O(r,"angle","deg")];break;case"drop-shadow":e=[O(r,"xoffset","pt"),O(r,"yoffset","pt"),O(r,"blurRadius","pt"),$(r,"color")];break;case"bloom":e=[O(r,"strength"),O(r,"radius","pt"),O(r,"threshold")]}const n=`${r.type}(${e.filter(Boolean).join(" ")})`;c(n),t.push(n)}return t.join(" ")}function O(e,t,r){if(null==e[t])throw new n.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return r?e[t]+r:""+e[t]}function $(e,t){if(null==e[t])throw new n.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const r=e[t];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||0})`}},92071:(e,t,r)=>{r.d(t,{P:()=>b,L:()=>w});var n=r(90237),i=r(69622),a=r(76953),o=r(4718),s=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(s.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[s.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,o.o8)(e),s.Gr.DEFAULTS)}));for(let r=s.Gr.SERVICE;r<s.AU;r++){const n=this._originStores[r];n&&n.forEach(((n,i)=>{e&&e.has(i)||t.set(i,(0,o.o8)(n),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=s.Gr.USER){let n=this._originStores[r];if(n||(n=new Map,this._originStores[r]=n),n.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const n=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),n!==t}return!1}delete(e,t=s.Gr.USER){const r=this._originStores[t];if(!r)return;const n=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return n}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],n=r?.get(e),i=this._values.get(e);return this._values.set(e,n),this._propertyOriginMap.set(e,t),i!==n}originOf(e){return this._propertyOriginMap.get(e)||s.Gr.DEFAULTS}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var u=r(45917),c=r(88620),f=r(40608);const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,c.oY)(this),r=t.store,n=new l;t.store=n,(0,a.k)(t,r,n)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const r=h(this),n=(0,s.aB)(t);if("string"==typeof e)return r.get(e,n);const i={};return e.forEach((e=>{i[e]=r.get(e,n)})),i}originOf(e){return(0,s.OL)(this.originIdOf(e))}originIdOf(e){return h(this).originOf(e)}revert(e,t){const r=h(this),n=(0,s.aB)(t),i=(0,c.oY)(this);let a;a="string"==typeof e?"*"===e?r.keys(n):[e]:e,a.forEach((e=>{i.invalidate(e),r.revert(e,n),i.commit(e)}))}};return t=(0,n._)([(0,f.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function h(e){return(0,c.oY)(e).store}let g=class extends(p(i.A)){};g=(0,n._)([(0,f.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],g);var d=r(16649),m=r(49422);const y=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){(0,c.oY)(this).clearOrigin(e,(0,s.aB)(t))}write(e,t){return(0,m.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,c.oY)(this).setAtOrigin(e,t,(0,s.aB)(r))}removeOrigin(e){const t=v(this),r=(0,s.aB)(e),n=t.keys(r);for(const e of n)t.originOf(e)===r&&t.set(e,t.get(e,r),s.Gr.USER)}updateOrigin(e,t){const r=v(this),n=(0,s.aB)(t),i=(0,d.Jt)(this,e);for(let t=n+1;t<s.AU;++t)r.delete(e,t);r.set(e,i,n)}toJSON(e){return this.write({},e)}};return t=(0,n._)([(0,f.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,c.oY)(e).store}const b=e=>{let t=class extends(y(p(e))){constructor(...e){super(...e)}};return t=(0,n._)([(0,f.$)("esri.core.MultiOriginJSONSupport")],t),t};let w=class extends(b(i.A)){};w=(0,n._)([(0,f.$)("esri.core.MultiOriginJSONSupport")],w)}}]);