@arcgis/core 4.28.2 → 4.28.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02e86a792dbe2fdec974.js +1 -0
- package/assets/esri/core/workers/chunks/{5386b166f2e5dc0d9143.js → 12797aa1d6a2b49abb3f.js} +1 -1
- package/assets/esri/core/workers/chunks/15852a47129b9e0d04c6.js +1 -0
- package/assets/esri/core/workers/chunks/1687431f7b233d950195.js +1 -0
- package/assets/esri/core/workers/chunks/{a1e16c33f1843dbdce26.js → 175bbe8a048f17dd482b.js} +1 -1
- package/assets/esri/core/workers/chunks/{d0119dff8771e749436a.js → 30d3b31df52d40e5b2e6.js} +1 -1
- package/assets/esri/core/workers/chunks/{768271a12dc7e1781447.js → 32fbd4355a4a649623a7.js} +1 -1
- package/assets/esri/core/workers/chunks/3dbc399eedd347b0fbbb.js +1 -0
- package/assets/esri/core/workers/chunks/{6bc1f6f8a2408fa4bb6a.js → 423672fe765083e1a0ec.js} +1 -1
- package/assets/esri/core/workers/chunks/{18e0c5bfeb1aa7213dfa.js → 4363f2cc3909c9258064.js} +1 -1
- package/assets/esri/core/workers/chunks/{d5fec54e98c8622349a4.js → 46ddc52fe9cdd573a614.js} +1 -1
- package/assets/esri/core/workers/chunks/4747741429e8ff7112bb.js +1 -0
- package/assets/esri/core/workers/chunks/49d958631bcd93f6333a.js +1 -0
- package/assets/esri/core/workers/chunks/4ae8308e5b9c7772a11f.js +1 -0
- package/assets/esri/core/workers/chunks/{da124ccd18d2745195fe.js → 4bd342f13002888b6467.js} +1 -1
- package/assets/esri/core/workers/chunks/{7756ed853b4ba54cd081.js → 5247c00088303da7ef3b.js} +1 -1
- package/assets/esri/core/workers/chunks/534726130ef1698ec89e.js +1 -0
- package/assets/esri/core/workers/chunks/551bc697e3e17983c2bc.js +1 -0
- package/assets/esri/core/workers/chunks/{65d8135c89ffdd17a3c1.js → 59d3f4c0d1a43180aff3.js} +1 -1
- package/assets/esri/core/workers/chunks/{2d92df1e3ba4f05e0510.js → 633b34a5817f1f719e22.js} +1 -1
- package/assets/esri/core/workers/chunks/{c7bd63103f101c09b1ea.js → 6996537249869c41e736.js} +1 -1
- package/assets/esri/core/workers/chunks/{41778f8c49febe1f9404.js → 6fa0cccd4f3e1fa71421.js} +1 -1
- package/assets/esri/core/workers/chunks/{78e49a70193e5adea17c.js → 77f557359a5033d7e429.js} +1 -1
- package/assets/esri/core/workers/chunks/{6334a8a7b671d4042108.js → 7beae29abdfae23b15cc.js} +1 -1
- package/assets/esri/core/workers/chunks/7cc56b132c46c5922dac.js +1 -0
- package/assets/esri/core/workers/chunks/80831e90fe1a52f8f982.js +1 -0
- package/assets/esri/core/workers/chunks/{ea9ae9d2aef01af90896.js → 80d9bb9f247ecdfa266f.js} +1 -1
- package/assets/esri/core/workers/chunks/846e5e51dc278bc3f80f.js +1 -0
- package/assets/esri/core/workers/chunks/{f73563b23fd8dc6cf2fe.js → 86df7357a2bac73c0ef4.js} +1 -1
- package/assets/esri/core/workers/chunks/8b541cbf82a5ba0317ee.js +1 -0
- package/assets/esri/core/workers/chunks/{08a98e85e86ce560d005.js → 8bd621693692050d76aa.js} +1 -1
- package/assets/esri/core/workers/chunks/{630b31a205d9db7147d0.js → 8cdece03397d01767593.js} +1 -1
- package/assets/esri/core/workers/chunks/{b9a726f3bbad6fd4d65a.js → 8e91be2e38010391e351.js} +1 -1
- package/assets/esri/core/workers/chunks/{cbddfcf57f72428a6992.js → 90f96a2ddfb25d851d4d.js} +1 -1
- package/assets/esri/core/workers/chunks/91a3181071874525ed44.js +1 -0
- package/assets/esri/core/workers/chunks/{2304b7456ced997904f6.js → 97fd7b82eec26449977e.js} +1 -1
- package/assets/esri/core/workers/chunks/{b7c81a5bbcdd94b8a7f6.js → 9979ff59a144fe1df80b.js} +1 -1
- package/assets/esri/core/workers/chunks/{0422c5160491fbcf01dc.js → 9d97a20f69047d0c47cc.js} +1 -1
- package/assets/esri/core/workers/chunks/9f0e8dd5c9bacfc0f03c.js +1 -0
- package/assets/esri/core/workers/chunks/{a8e4726c1db23324eb54.js → 9fc1206ad378f0829e0a.js} +1 -1
- package/assets/esri/core/workers/chunks/{09e8babe75407c2e64c4.js → a351ab5082772b267895.js} +1 -1
- package/assets/esri/core/workers/chunks/{43575b9acf9819f195f9.js → a3bbf5da4f7830d2a2a1.js} +1 -1
- package/assets/esri/core/workers/chunks/{b03eaba5fa75d6ef834a.js → a47f74fc959b11f029a5.js} +1 -1
- package/assets/esri/core/workers/chunks/{cb4b17f5cf96a9e36781.js → a8cf23c3a55c1834178c.js} +1 -1
- package/assets/esri/core/workers/chunks/{dd55151bfac60b0deaac.js → ac4636e82a103e2c27ca.js} +1 -1
- package/assets/esri/core/workers/chunks/ae7ba94af6d4fd97dd8b.js +1 -0
- package/assets/esri/core/workers/chunks/{4adf3a8c6b49c381a633.js → b0653f63745e756f55fe.js} +1 -1
- package/assets/esri/core/workers/chunks/{e06cd10b6f8f363b5131.js → bdc751a752a7ff1387de.js} +1 -1
- package/assets/esri/core/workers/chunks/{70aa04b09143b7dd2ecb.js → c2199fb8f7a54a0ef18a.js} +1 -1
- package/assets/esri/core/workers/chunks/c3f462d11ed570482e7a.js +1 -0
- package/assets/esri/core/workers/chunks/{830d99e6c58a52a58973.js → c8cb5fe1d23145c4842b.js} +1 -1
- package/assets/esri/core/workers/chunks/{1f87f22e00e3218661c6.js → ce53413dd3e2062e8378.js} +1 -1
- package/assets/esri/core/workers/chunks/de30ff1fcb6079178958.js +1 -0
- package/assets/esri/core/workers/chunks/e12090768e945091cc5d.js +1 -0
- package/assets/esri/core/workers/chunks/e3950975030412ff6e20.js +1 -0
- package/assets/esri/core/workers/chunks/e8b7d1c586aff229484c.js +1 -0
- package/assets/esri/core/workers/chunks/{710a6268de62003af825.js → e8d1f91dc97b42d0c4f6.js} +1 -1
- package/assets/esri/core/workers/chunks/{6747503826bfc94bc6c0.js → eb5213ffb83d83a4dd05.js} +1 -1
- package/assets/esri/core/workers/chunks/{020825b9c12f2b6386a7.js → f037e4f9877ea08ced9d.js} +1 -1
- package/assets/esri/core/workers/chunks/{abcfe3bda6f40318b092.js → f7ccc6c681fc9218555c.js} +1 -1
- package/assets/esri/core/workers/chunks/{eea0fb90cd5cc80de388.js → fa750885bb27bbb03e7d.js} +1 -1
- package/assets/esri/core/workers/chunks/{e67c4b7ad06d8404895a.js → fab4ee57b7c5376c9ccd.js} +1 -1
- package/interfaces.d.ts +4 -4
- package/kernel.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/support/RangeDomain.js +1 -1
- package/layers/support/domainUtils.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/labelFormatUtils.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/support/dataUtils.js +5 -0
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/02d235849ba93541d7ad.js +0 -1
- package/assets/esri/core/workers/chunks/0a3da4b73beeaacd4667.js +0 -1
- package/assets/esri/core/workers/chunks/10dc578a90e1194c8720.js +0 -1
- package/assets/esri/core/workers/chunks/1eb5468c7cf653338d53.js +0 -1
- package/assets/esri/core/workers/chunks/1f30ea1a598ddd2e5df3.js +0 -1
- package/assets/esri/core/workers/chunks/366cf9bba6989342e447.js +0 -1
- package/assets/esri/core/workers/chunks/43f7d9366d06d69e7c50.js +0 -1
- package/assets/esri/core/workers/chunks/4672504d6fe649da19f2.js +0 -1
- package/assets/esri/core/workers/chunks/56a61a8bff08ae273de4.js +0 -1
- package/assets/esri/core/workers/chunks/580e7d3cbf6797a50ded.js +0 -1
- package/assets/esri/core/workers/chunks/6046be598e8c673eeb1f.js +0 -1
- package/assets/esri/core/workers/chunks/69c1c850af7ee33258e0.js +0 -1
- package/assets/esri/core/workers/chunks/8f7997e8e6ee9e56239f.js +0 -1
- package/assets/esri/core/workers/chunks/a160576f21ada91995ac.js +0 -1
- package/assets/esri/core/workers/chunks/a50ec5b647a160199cb2.js +0 -1
- package/assets/esri/core/workers/chunks/b138196d304883efd5f6.js +0 -1
- package/assets/esri/core/workers/chunks/b3f5e97b47e896c6008a.js +0 -1
- package/assets/esri/core/workers/chunks/c447f4bf0e5f012f8f9b.js +0 -1
- package/assets/esri/core/workers/chunks/c87e9280681c20d042b5.js +0 -1
- package/assets/esri/core/workers/chunks/cc86c8c88124d916e1b3.js +0 -1
- package/assets/esri/core/workers/chunks/d878bb6409df183ea0ce.js +0 -1
- package/assets/esri/core/workers/chunks/ef757269fb3fe0e74ef8.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5463],{95463:(e,n,t)=>{t.r(n),t.d(n,{registerFunctions:()=>E});var r=t(40330),s=t(28228),i=t(33586),a=t(27535),o=t(77286),l=t(61363),c=t(26520),u=t(71201),f=t(67900),d=t(6570),h=t(9361),g=t(8667),m=t(65091),w=t(94139),p=t(38913),y=t(58901),v=t(33955),b=t(48522),k=t(3172);async function P(e,n,t){const s=r.id?.findCredential(e.restUrl);if(!s)return null;if("loaded"===e.loadStatus&&""===n&&e.user?.sourceJSON&&!1===t)return e.user.sourceJSON;const i={responseType:"json",query:{f:"json"}};if(t&&(i.query.returnUserLicenseTypeExtensions=!0),""===n){const n=await(0,k.Z)(e.restUrl+"/community/self",i);if(n.data){const e=n.data;if(e?.username)return e}return null}const a=await(0,k.Z)(e.restUrl+"/community/users/"+n,i);if(a.data){const e=a.data;return e.error?null:e}return null}function Z(e){return 0===r.i8.indexOf("4.")?p.Z.fromExtent(e):new p.Z({spatialReference:e.spatialReference,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]})}function _(e,n,t){if((0,l.E)(e,2,2,n,t),e[0]instanceof h.Z&&e[1]instanceof h.Z);else if(e[0]instanceof h.Z&&null===e[1]);else if(e[1]instanceof h.Z&&null===e[0]);else if(null!==e[0]||null!==e[1])throw new a.aV(n,a.rH.InvalidParameter,t)}async function H(e,n){if("polygon"!==e.type&&"polyline"!==e.type&&"extent"!==e.type)return 0;let t=1;(e.spatialReference.vcsWkid||e.spatialReference.latestVcsWkid)&&(t=(0,u._R)(e.spatialReference)/(0,f.c9)(e.spatialReference));let r=0;if("polyline"===e.type)for(const n of e.paths)for(let e=1;e<n.length;e++)r+=(0,u.AW)(n[e],n[e-1],t);else if("polygon"===e.type)for(const n of e.rings){for(let e=1;e<n.length;e++)r+=(0,u.AW)(n[e],n[e-1],t);(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||void 0!==n[0][2]&&n[0][2]!==n[n.length-1][2])&&(r+=(0,u.AW)(n[0],n[n.length-1],t))}else"extent"===e.type&&(r+=2*(0,u.AW)([e.xmin,e.ymin,0],[e.xmax,e.ymin,0],t),r+=2*(0,u.AW)([e.xmin,e.ymin,0],[e.xmin,e.ymax,0],t),r*=2,r+=4*Math.abs((0,l.H)(e.zmax,0)*t-(0,l.H)(e.zmin,0)*t));const s=new y.Z({hasZ:!1,hasM:!1,spatialReference:e.spatialReference,paths:[[0,0],[0,r]]});return(0,g.sz)(s,n)}function E(e){"async"===e.mode&&(e.functions.disjoint=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>(_(s=(0,l.F)(s),n,t),null===s[0]||null===s[1]||(0,g.ED)(s[0],s[1]))))},e.functions.intersects=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>(_(s=(0,l.F)(s),n,t),null!==s[0]&&null!==s[1]&&(0,g.kK)(s[0],s[1]))))},e.functions.touches=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>(_(s=(0,l.F)(s),n,t),null!==s[0]&&null!==s[1]&&(0,g.W4)(s[0],s[1]))))},e.functions.crosses=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>(_(s=(0,l.F)(s),n,t),null!==s[0]&&null!==s[1]&&(0,g.jU)(s[0],s[1]))))},e.functions.within=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>(_(s=(0,l.F)(s),n,t),null!==s[0]&&null!==s[1]&&(0,g.uh)(s[0],s[1]))))},e.functions.contains=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>(_(s=(0,l.F)(s),n,t),null!==s[0]&&null!==s[1]&&(0,g.r3)(s[0],s[1]))))},e.functions.overlaps=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>(_(s=(0,l.F)(s),n,t),null!==s[0]&&null!==s[1]&&(0,g.Nm)(s[0],s[1]))))},e.functions.equals=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>((0,l.E)(s,2,2,n,t),s[0]===s[1]||(s[0]instanceof h.Z&&s[1]instanceof h.Z?(0,g.fS)(s[0],s[1]):((0,l.k)(s[0])&&(0,l.k)(s[1])||!!((0,l.n)(s[0])&&(0,l.n)(s[1])||(0,l.m)(s[0])&&(0,l.m)(s[1])))&&s[0].equals(s[1])))))},e.functions.relate=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{if(s=(0,l.F)(s),(0,l.E)(s,3,3,n,t),s[0]instanceof h.Z&&s[1]instanceof h.Z)return(0,g.LV)(s[0],s[1],(0,l.j)(s[2]));if(s[0]instanceof h.Z&&null===s[1])return!1;if(s[1]instanceof h.Z&&null===s[0])return!1;if(null===s[0]&&null===s[1])return!1;throw new a.aV(n,a.rH.InvalidParameter,t)}))},e.functions.intersection=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>(_(s=(0,l.F)(s),n,t),null===s[0]||null===s[1]?null:(0,g.wf)(s[0],s[1]))))},e.functions.union=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{const i=[];if(0===(s=(0,l.F)(s)).length)throw new a.aV(n,a.rH.WrongNumberOfParameters,t);if(1===s.length)if((0,l.o)(s[0])){const e=(0,l.F)(s[0]);for(let r=0;r<e.length;r++)if(null!==e[r]){if(!(e[r]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);i.push(e[r])}}else{if(!(0,l.q)(s[0])){if(s[0]instanceof h.Z)return(0,l.A)((0,o.r1)(s[0]),n.spatialReference);if(null===s[0])return null;throw new a.aV(n,a.rH.InvalidParameter,t)}{const e=(0,l.F)(s[0].toArray());for(let r=0;r<e.length;r++)if(null!==e[r]){if(!(e[r]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);i.push(e[r])}}}else for(let e=0;e<s.length;e++)if(null!==s[e]){if(!(s[e]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);i.push(s[e])}return 0===i.length?null:(0,g.G0)(i)}))},e.functions.difference=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>(_(s=(0,l.F)(s),n,t),null!==s[0]&&null===s[1]?(0,o.r1)(s[0]):null===s[0]?null:(0,g.e5)(s[0],s[1]))))},e.functions.symmetricdifference=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>(_(s=(0,l.F)(s),n,t),null===s[0]&&null===s[1]?null:null===s[0]?(0,o.r1)(s[1]):null===s[1]?(0,o.r1)(s[0]):(0,g.Sp)(s[0],s[1]))))},e.functions.clip=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{if(s=(0,l.F)(s),(0,l.E)(s,2,2,n,t),!(s[1]instanceof d.Z)&&null!==s[1])throw new a.aV(n,a.rH.InvalidParameter,t);if(null===s[0])return null;if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);return null===s[1]?null:(0,g.oq)(s[0],s[1])}))},e.functions.cut=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{if(s=(0,l.F)(s),(0,l.E)(s,2,2,n,t),!(s[1]instanceof y.Z)&&null!==s[1])throw new a.aV(n,a.rH.InvalidParameter,t);if(null===s[0])return[];if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);return null===s[1]?[(0,o.r1)(s[0])]:(0,g.z7)(s[0],s[1])}))},e.functions.area=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,s)=>{if((0,l.E)(s,1,2,n,t),null===(s=(0,l.F)(s))[0])return 0;if((0,l.u)(s[0])){const e=await s[0].sumArea((0,o.EI)((0,l.H)(s[1],-1)),!1,n.abortSignal);if(n.abortSignal.aborted)throw new a.aV(n,a.rH.Cancelled,t);return e}if((0,l.o)(s[0])||(0,l.q)(s[0])){const e=(0,l.G)(s[0],n.spatialReference);return null===e?0:(0,g.CJ)(e,(0,o.EI)((0,l.H)(s[1],-1)))}if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);return(0,g.CJ)(s[0],(0,o.EI)((0,l.H)(s[1],-1)))}))},e.functions.areageodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,s)=>{if((0,l.E)(s,1,2,n,t),null===(s=(0,l.F)(s))[0])return 0;if((0,l.u)(s[0])){const e=await s[0].sumArea((0,o.EI)((0,l.H)(s[1],-1)),!0,n.abortSignal);if(n.abortSignal.aborted)throw new a.aV(n,a.rH.Cancelled,t);return e}if((0,l.o)(s[0])||(0,l.q)(s[0])){const e=(0,l.G)(s[0],n.spatialReference);return null===e?0:(0,g.Y4)(e,(0,o.EI)((0,l.H)(s[1],-1)))}if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);return(0,g.Y4)(s[0],(0,o.EI)((0,l.H)(s[1],-1)))}))},e.functions.length=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,s)=>{if((0,l.E)(s,1,2,n,t),null===(s=(0,l.F)(s))[0])return 0;if((0,l.u)(s[0])){const e=await s[0].sumLength((0,o.Lz)((0,l.H)(s[1],-1)),!1,n.abortSignal);if(n.abortSignal.aborted)throw new a.aV(n,a.rH.Cancelled,t);return e}if((0,l.o)(s[0])||(0,l.q)(s[0])){const e=(0,l.J)(s[0],n.spatialReference);return null===e?0:(0,g.sz)(e,(0,o.Lz)((0,l.H)(s[1],-1)))}if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);return(0,g.sz)(s[0],(0,o.Lz)((0,l.H)(s[1],-1)))}))},e.functions.length3d=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{if((0,l.E)(s,1,2,n,t),null===(s=(0,l.F)(s))[0])return 0;if((0,l.o)(s[0])||(0,l.q)(s[0])){const e=(0,l.J)(s[0],n.spatialReference);return null===e?0:!0===e.hasZ?H(e,(0,o.Lz)((0,l.H)(s[1],-1))):(0,g.sz)(e,(0,o.Lz)((0,l.H)(s[1],-1)))}if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);return!0===s[0].hasZ?H(s[0],(0,o.Lz)((0,l.H)(s[1],-1))):(0,g.sz)(s[0],(0,o.Lz)((0,l.H)(s[1],-1)))}))},e.functions.lengthgeodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,s)=>{if((0,l.E)(s,1,2,n,t),null===(s=(0,l.F)(s))[0])return 0;if((0,l.u)(s[0])){const e=await s[0].sumLength((0,o.Lz)((0,l.H)(s[1],-1)),!0,n.abortSignal);if(n.abortSignal.aborted)throw new a.aV(n,a.rH.Cancelled,t);return e}if((0,l.o)(s[0])||(0,l.q)(s[0])){const e=(0,l.J)(s[0],n.spatialReference);return null===e?0:(0,g.kQ)(e,(0,o.Lz)((0,l.H)(s[1],-1)))}if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);return(0,g.kQ)(s[0],(0,o.Lz)((0,l.H)(s[1],-1)))}))},e.functions.distance=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{s=(0,l.F)(s),(0,l.E)(s,2,3,n,t);let i=s[0];((0,l.o)(s[0])||(0,l.q)(s[0]))&&(i=(0,l.K)(s[0],n.spatialReference));let c=s[1];if(((0,l.o)(s[1])||(0,l.q)(s[1]))&&(c=(0,l.K)(s[1],n.spatialReference)),!(i instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);if(!(c instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);return(0,g.TE)(i,c,(0,o.Lz)((0,l.H)(s[2],-1)))}))},e.functions.distancegeodetic=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{s=(0,l.F)(s),(0,l.E)(s,2,3,n,t);const i=s[0],c=s[1];if(!(i instanceof w.Z))throw new a.aV(n,a.rH.InvalidParameter,t);if(!(c instanceof w.Z))throw new a.aV(n,a.rH.InvalidParameter,t);const u=new y.Z({paths:[],spatialReference:i.spatialReference});return u.addPath([i,c]),(0,g.kQ)(u,(0,o.Lz)((0,l.H)(s[2],-1)))}))},e.functions.densify=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{if(s=(0,l.F)(s),(0,l.E)(s,2,3,n,t),null===s[0])return null;if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);const i=(0,l.g)(s[1]);if(isNaN(i))throw new a.aV(n,a.rH.InvalidParameter,t);if(i<=0)throw new a.aV(n,a.rH.InvalidParameter,t);return s[0]instanceof p.Z||s[0]instanceof y.Z?(0,g.Cz)(s[0],i,(0,o.Lz)((0,l.H)(s[2],-1))):s[0]instanceof d.Z?(0,g.Cz)(Z(s[0]),i,(0,o.Lz)((0,l.H)(s[2],-1))):s[0]}))},e.functions.densifygeodetic=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{if(s=(0,l.F)(s),(0,l.E)(s,2,3,n,t),null===s[0])return null;if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);const i=(0,l.g)(s[1]);if(isNaN(i))throw new a.aV(n,a.rH.InvalidParameter,t);if(i<=0)throw new a.aV(n,a.rH.InvalidParameter,t);return s[0]instanceof p.Z||s[0]instanceof y.Z?(0,g.j2)(s[0],i,(0,o.Lz)((0,l.H)(s[2],-1))):s[0]instanceof d.Z?(0,g.j2)(Z(s[0]),i,(0,o.Lz)((0,l.H)(s[2],-1))):s[0]}))},e.functions.generalize=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{if(s=(0,l.F)(s),(0,l.E)(s,2,4,n,t),null===s[0])return null;if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);const i=(0,l.g)(s[1]);if(isNaN(i))throw new a.aV(n,a.rH.InvalidParameter,t);return(0,g.D$)(s[0],i,(0,l.h)((0,l.H)(s[2],!0)),(0,o.Lz)((0,l.H)(s[3],-1)))}))},e.functions.buffer=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{if(s=(0,l.F)(s),(0,l.E)(s,2,3,n,t),null===s[0])return null;if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);const i=(0,l.g)(s[1]);if(isNaN(i))throw new a.aV(n,a.rH.InvalidParameter,t);return 0===i?(0,o.r1)(s[0]):(0,g.f3)(s[0],i,(0,o.Lz)((0,l.H)(s[2],-1)))}))},e.functions.buffergeodetic=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{if(s=(0,l.F)(s),(0,l.E)(s,2,3,n,t),null===s[0])return null;if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);const i=(0,l.g)(s[1]);if(isNaN(i))throw new a.aV(n,a.rH.InvalidParameter,t);return 0===i?(0,o.r1)(s[0]):(0,g.rd)(s[0],i,(0,o.Lz)((0,l.H)(s[2],-1)))}))},e.functions.offset=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{if(s=(0,l.F)(s),(0,l.E)(s,2,6,n,t),null===s[0])return null;if(!(s[0]instanceof p.Z||s[0]instanceof y.Z))throw new a.aV(n,a.rH.InvalidParameter,t);const i=(0,l.g)(s[1]);if(isNaN(i))throw new a.aV(n,a.rH.InvalidParameter,t);const c=(0,l.g)((0,l.H)(s[4],10));if(isNaN(c))throw new a.aV(n,a.rH.InvalidParameter,t);const u=(0,l.g)((0,l.H)(s[5],0));if(isNaN(u))throw new a.aV(n,a.rH.InvalidParameter,t);return(0,g.cv)(s[0],i,(0,o.Lz)((0,l.H)(s[2],-1)),(0,l.j)((0,l.H)(s[3],"round")).toLowerCase(),c,u)}))},e.functions.rotate=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{s=(0,l.F)(s),(0,l.E)(s,2,3,n,t);let i=s[0];if(null===i)return null;if(!(i instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);i instanceof d.Z&&(i=p.Z.fromExtent(i));const o=(0,l.g)(s[1]);if(isNaN(o))throw new a.aV(n,a.rH.InvalidParameter,t);const c=(0,l.H)(s[2],null);if(null===c)return(0,g.U1)(i,o);if(c instanceof w.Z)return(0,g.U1)(i,o,c);throw new a.aV(n,a.rH.InvalidParameter,t)}))},e.functions.centroid=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{if(s=(0,l.F)(s),(0,l.E)(s,1,1,n,t),null===s[0])return null;let i=s[0];if(((0,l.o)(s[0])||(0,l.q)(s[0]))&&(i=(0,l.K)(s[0],n.spatialReference)),null===i)return null;if(!(i instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);return i instanceof w.Z?(0,l.A)((0,o.r1)(s[0]),n.spatialReference):i instanceof p.Z?i.centroid:i instanceof y.Z?(0,u.s9)(i):i instanceof m.Z?(0,u.Ay)(i):i instanceof d.Z?i.center:null}))},e.functions.multiparttosinglepart=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,s)=>{s=(0,l.F)(s),(0,l.E)(s,1,1,n,t);const i=[];if(null===s[0])return null;if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);if(s[0]instanceof w.Z)return[(0,l.A)((0,o.r1)(s[0]),n.spatialReference)];if(s[0]instanceof d.Z)return[(0,l.A)((0,o.r1)(s[0]),n.spatialReference)];const c=await(0,g.og)(s[0]);if(c instanceof p.Z){const e=[],n=[];for(let t=0;t<c.rings.length;t++)if(c.isClockwise(c.rings[t])){const n=(0,v.im)({rings:[c.rings[t]],hasZ:!0===c.hasZ,hazM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});e.push(n)}else n.push({ring:c.rings[t],pt:c.getPoint(t,0)});for(let t=0;t<n.length;t++)for(let r=0;r<e.length;r++)if(e[r].contains(n[t].pt)){e[r].addRing(n[t].ring);break}return e}if(c instanceof y.Z){const e=[];for(let n=0;n<c.paths.length;n++){const t=(0,v.im)({paths:[c.paths[n]],hasZ:!0===c.hasZ,hazM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});e.push(t)}return e}if(s[0]instanceof m.Z){const e=(0,l.A)((0,o.r1)(s[0]),n.spatialReference);for(let n=0;n<e.points.length;n++)i.push(e.getPoint(n));return i}return null}))},e.functions.issimple=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{if(s=(0,l.F)(s),(0,l.E)(s,1,1,n,t),null===s[0])return!0;if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);return(0,g.Gg)(s[0])}))},e.functions.simplify=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{if(s=(0,l.F)(s),(0,l.E)(s,1,1,n,t),null===s[0])return null;if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);return(0,g.og)(s[0])}))},e.functions.convexhull=function(n,t){return e.standardFunctionAsync(n,t,((e,r,s)=>{if(s=(0,l.F)(s),(0,l.E)(s,1,1,n,t),null===s[0])return null;if(!(s[0]instanceof h.Z))throw new a.aV(n,a.rH.InvalidParameter,t);return(0,g.JI)(s[0])}))},e.functions.getuser=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,o)=>{(0,l.E)(o,0,2,n,t);let u=(0,l.H)(o[1],""),f=!0===u;if(u=!0===u||!1===u?"":(0,l.j)(u),0===o.length||o[0]instanceof s.Z){let e=null;e=n.services?.portal?n.services.portal:b.Z.getDefault(),o.length>0&&(e=(0,c._)(o[0],e));const t=await P(e,u,f);if(t){const e=JSON.parse(JSON.stringify(t));for(const n of["lastLogin","created","modified"])void 0!==e[n]&&null!==e[n]&&(e[n]=new Date(e[n]));return i.Z.convertObjectToArcadeDictionary(e,(0,l.L)(n))}return null}let d=null;if((0,l.u)(o[0])&&(d=o[0]),d){if(f=!1,u)return null;await d.load();const e=await d.getOwningSystemUrl();if(!e){if(!u){const e=await d.getIdentityUser();return e?i.Z.convertObjectToArcadeDictionary({username:e},(0,l.L)(n)):null}return null}let t=null;t=n.services?.portal?n.services.portal:b.Z.getDefault(),t=(0,c._)(new s.Z(e),t);const r=await P(t,u,f);if(r){const e=JSON.parse(JSON.stringify(r));for(const n of["lastLogin","created","modified"])void 0!==e[n]&&null!==e[n]&&(e[n]=new Date(e[n]));return i.Z.convertObjectToArcadeDictionary(e,(0,l.L)(n))}return null}throw new a.aV(n,a.rH.InvalidParameter,t)}))}),e.functions.nearestcoordinate=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,s)=>{if(s=(0,l.F)(s),(0,l.E)(s,2,2,n,t),!(s[0]instanceof h.Z||null===s[0]))throw new a.aV(n,a.rH.InvalidParameter,t);if(!(s[1]instanceof w.Z||null===s[1]))throw new a.aV(n,a.rH.InvalidParameter,t);if(null===s[0]||null===s[1])return null;const o=await(0,g.FH)(s[0],s[1]);return null===o?null:i.Z.convertObjectToArcadeDictionary({coordinate:o.coordinate,distance:o.distance},(0,l.L)(n),!1,!0)}))},e.functions.nearestvertex=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,s)=>{if(s=(0,l.F)(s),(0,l.E)(s,2,2,n,t),!(s[0]instanceof h.Z||null===s[0]))throw new a.aV(n,a.rH.InvalidParameter,t);if(!(s[1]instanceof w.Z||null===s[1]))throw new a.aV(n,a.rH.InvalidParameter,t);if(null===s[0]||null===s[1])return null;const o=await(0,g._L)(s[0],s[1]);return null===o?null:i.Z.convertObjectToArcadeDictionary({coordinate:o.coordinate,distance:o.distance},(0,l.L)(n),!1,!0)}))}}},26520:(e,n,t)=>{t.d(n,{_:()=>s});var r=t(48522);function s(e,n){return null===e?n:new r.Z({url:e.field("url")})}},64830:(e,n,t)=>{t.d(n,{Z:()=>i});var r=t(58971),s=t(10661);class i{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new s.s,this._items=new Set}get length(){return(0,r.it)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,r.it)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const n=this.length;return this._items.forEach((n=>{e(n)||this._items.delete(n)})),n!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,r.it)(this._observable),yield*this._items}}},80903:(e,n,t)=>{t.d(n,{Z:()=>c});var r=t(50758),s=t(92604),i=t(95330),a=t(64830),o=t(18948),l=t(728);class c{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new a.Z}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,n){return new Promise(((t,r)=>{let s=!0;const a=e=>{(0,i.k_)(n.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let s=0;s<e.length;++s){const o=e[s];(0,i.y8)(o)?this._clientPromises[s]=o.then((e=>(this._clients[s]=new l.default(e,n,this._ongoingJobsQueue),a(t),this._clients[s])),(()=>(a(r),null))):(this._clients[s]=new l.default(o,n,this._ongoingJobsQueue),this._clientPromises[s]=Promise.resolve(this._clients[s]),a(t))}}))}broadcast(e,n,t){const r=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const i=this._clientPromises[s];r[s]=i.then((r=>r?.invoke(e,n,t)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.E)(this)}invoke(e,n,t){let r;Array.isArray(t)?(s.Z.getLogger("esri.core.workers.Connection").warn("invoke()","The transferList parameter is deprecated, use the options object instead"),r={transferList:t}):r=t;const a=(0,i.hh)();this._ongoingJobsQueue.push({methodName:e,data:n,invokeOptions:r,resolver:a});for(let e=0;e<this._clientPromises.length;e++){const n=this._clients[e];n?n.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return a.promise}on(e,n){return Promise.all(this._clientPromises).then((()=>(0,r.AL)(this._clients.map((t=>t.on(e,n))))))}openPorts(){return new Promise((e=>{const n=new Array(this._clientPromises.length);let t=n.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((s=>{s&&(n[r]=s.openPort()),0==--t&&e(n)}))}))}get test(){return{numClients:this._clients.length}}}},18948:(e,n,t)=>{t.d(n,{E:()=>i,z:()=>s});const r=new FinalizationRegistry((e=>{e.close()}));function s(e,n){r.register(e,n,n)}function i(e){r.unregister(e)}},56569:(e,n,t)=>{t.d(n,{bA:()=>D});var r=t(20102),s=t(80442),i=t(95330),a=t(80903),o=t(18948),l=t(728),c=t(92604),u=t(70586),f=t(3172),d=t(17452);const h={async request(e,n){const t=e.options,r=t.responseType;t.signal=n?.signal,t.responseType="native"===r||"native-request-init"===r?"native-request-init":r&&["blob","json","text"].includes(r)&&(0,d.oh)(e.url)?.after?r:"array-buffer";const s=await(0,f.Z)(e.url,t),i={data:s.data,httpStatus:s.httpStatus,ssl:s.ssl};switch(s.requestOptions?.responseType){case"native-request-init":return delete i.data.signal,i;case"blob":i.data=await i.data.arrayBuffer();break;case"json":i.data=(new TextEncoder).encode(JSON.stringify(i.data)).buffer;break;case"text":i.data=(new TextEncoder).encode(i.data).buffer}return{result:i,transferList:[i.data]}}};var g=t(94362),m=t(99880),w=t(68773),p=(t(2587),t(40330));const y={};var v=t(41213);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((n=>{this[n]=(...t)=>e[n](...t)}))}}class k{constructor(){this._dispatcher=new b,this._workerPostMessage({type:g.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,v.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,n,t){this._dispatcher.addEventListener(e,n,t)}removeEventListener(e,n,t){this._dispatcher.removeEventListener(e,n,t)}_workerPostMessage(e){(0,v.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const n=(0,g.QM)(e);if(n&&n.type===g.MessageType.OPEN){const{modulePath:e,jobId:t}=n;let r=await l.default.loadWorker(e);r||(r=await import(e));const s=l.default.connect(r);this._workerPostMessage({type:g.MessageType.OPENED,jobId:t,data:s})}}}var P=t(70171),Z=t(17202);const _=c.Z.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:H}=g.MessageType;let E,A;const F="Failed to create Worker. Fallback to execute module in main thread";async function I(e){return new Promise((n=>{function t(s){const i=(0,g.QM)(s);i&&i.type===H&&(e.removeEventListener("message",t),e.removeEventListener("error",r),n(e))}function r(n){n.preventDefault(),e.removeEventListener("message",t),e.removeEventListener("error",r),_.warn("Failed to create Worker. Fallback to execute module in main thread",n),(e=new k).addEventListener("message",t),e.addEventListener("error",r)}e.addEventListener("message",t),e.addEventListener("error",r)}))}let N=0;const{ABORT:L,INVOKE:V,OPEN:S,OPENED:O,RESPONSE:R}=g.MessageType;class j{static async create(e){const n=await async function(){if(!(0,s.Z)("esri-workers"))return I(new k);if(!E&&!A)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=w.default.default){const n={...w.default};delete n.default,e=JSON.parse(JSON.stringify(n))}else e=JSON.parse(JSON.stringify(w.default));e.assetsPath=(0,d.hF)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,d.hF)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,P.Kd)(),e.has={"esri-csp-restrictions":(0,s.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,s.Z)("esri-2d-update-debug"),"esri-2d-log-updating":(0,s.Z)("esri-2d-log-updating"),"featurelayer-pbf":(0,s.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,s.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,s.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,s.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,s.Z)("esri-atomics"),"esri-shared-array-buffer":(0,s.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,s.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,s.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,s.Z)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,d.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,d.hF)(e.workers.workerPath):e.workers.workerPath=(0,d.hF)((0,m.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const n=w.default.workers.loaderConfig,t=function(e){const n={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(n.async=!0),e.hasOwnProperty("isDebug")||(n.isDebug=!1),e.baseUrl||(n.baseUrl=y.baseUrl),n}({baseUrl:n?.baseUrl,locale:(0,P.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...n?.has},map:{...n?.map},paths:{...n?.paths},packages:n?.packages||[]}),r={buildDate:Z.r,fullVersion:p.bR,revision:Z.$};return JSON.stringify({esriConfig:e,loaderConfig:t,kernelInfo:r})}()}'`);E=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){A=e||{}}let e;if(E)try{e=new Worker(E,{name:"esri-worker-"+N++})}catch(n){_.warn(F,A),e=new k}else _.warn(F,A),e=new k;return I(e)}();return new j(n,e)}constructor(e,n){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=n,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),c.Z.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,n={}){const{signal:t}=n,r=(0,g.jt)();return new Promise(((n,s)=>{const a={resolve:n,reject:s,abortHandle:(0,i.$F)(t,(()=>{this._outJobs.delete(r),this._post({type:L,jobId:r})}))};this._outJobs.set(r,a),this._post({type:S,jobId:r,modulePath:e})}))}_onMessage(e){const n=(0,g.QM)(e);if(n)switch(n.type){case O:this._onOpenedMessage(n);break;case R:this._onResponseMessage(n);break;case L:this._onAbortMessage(n);break;case V:this._onInvokeMessage(n)}}_onAbortMessage(e){const n=this._inJobs,t=e.jobId,r=n.get(t);r&&(r.controller&&r.controller.abort(),n.delete(t))}_onInvokeMessage(e){const{methodName:n,jobId:t,data:r,abortable:s}=e,a=s?new AbortController:null,o=this._inJobs,l=h[n];let c;try{if("function"!=typeof l)throw new TypeError(`${n} is not a function`);c=l.call(null,r,{signal:a?a.signal:null})}catch(e){return void this._post({type:R,jobId:t,error:(0,g.AB)(e)})}(0,i.y8)(c)?(o.set(t,{controller:a,promise:c}),c.then((e=>{o.has(t)&&(o.delete(t),this._post({type:R,jobId:t},e))}),(e=>{o.has(t)&&(o.delete(t),e||(e={message:"Error encountered at method"+n}),(0,i.D_)(e)||this._post({type:R,jobId:t,error:(0,g.AB)(e||{message:`Error encountered at method ${n}`})}))}))):this._post({type:R,jobId:t},c)}_onOpenedMessage(e){const{jobId:n,data:t}=e,r=this._outJobs.get(n);r&&(this._outJobs.delete(n),(0,u.hw)(r.abortHandle),r.resolve(t))}_onResponseMessage(e){const{jobId:n,error:t,data:s}=e,i=this._outJobs.get(n);i&&(this._outJobs.delete(n),(0,u.hw)(i.abortHandle),t?i.reject(r.Z.fromJSON(JSON.parse(t))):i.resolve(s))}_post(e,n,t){return(0,g.oi)(this.worker,e,n,t)}}const C=(0,s.Z)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,s.Z)("workers-pool-size")):0;let z=(0,s.Z)("esri-mobile")?Math.min(C,3):C;z||(z=(0,s.Z)("safari")&&(0,s.Z)("mac")?7:2);let J=0;const M=[];async function x(e,n){const t=new a.Z,{registryTarget:r,...s}=n;return await t.open(e,s),r&&(0,o.z)(r,t),t}async function D(e,n={}){if("string"!=typeof e)throw new r.Z("workers:undefined-module","modulePath is missing");let t=n.strategy||"distributed";if((0,s.Z)("host-webworker")&&!(0,s.Z)("esri-workers")&&(t="local"),"local"===t){let t=await l.default.loadWorker(e);t||(t=await import(e)),(0,i.k_)(n.signal);const r=n.client||t;return x([l.default.connect(t)],{...n,client:r})}if(await async function(){if(W)return W;U=new AbortController;const e=[];for(let n=0;n<z;n++){const t=j.create(n).then((e=>(M[n]=e,e)));e.push(t)}return W=Promise.all(e),W}(),(0,i.k_)(n.signal),"dedicated"===t){const t=J++%z;return x([await M[t].open(e,n)],n)}if(n.maxNumWorkers&&n.maxNumWorkers>0){const t=Math.min(n.maxNumWorkers,z);if(t<z){const r=new Array(t);for(let s=0;s<t;++s){const t=J++%z;r[s]=M[t].open(e,n)}return x(r,n)}}return x(M.map((t=>t.open(e,n))),n)}let U,W=null},8667:(e,n,t)=>{t.d(n,{CJ:()=>J,Cz:()=>C,D$:()=>j,ED:()=>b,FH:()=>S,G0:()=>I,Gg:()=>Z,JI:()=>H,LV:()=>P,Nm:()=>k,Sp:()=>A,TE:()=>m,U1:()=>R,W4:()=>y,Y4:()=>x,_L:()=>O,cv:()=>N,e5:()=>E,f3:()=>L,fS:()=>w,j2:()=>z,jU:()=>g,kK:()=>p,kQ:()=>D,og:()=>_,oq:()=>f,r3:()=>h,rd:()=>V,sz:()=>M,uh:()=>v,wf:()=>F,z7:()=>d}),t(66577);var r=t(56569),s=t(94139),i=t(33955);function a(e){return Array.isArray(e)?e[0]?.spatialReference:e?.spatialReference}function o(e){return e?Array.isArray(e)?e.map(o):e.toJSON?e.toJSON():e:e}function l(e){return Array.isArray(e)?e.map((e=>(0,i.im)(e))):(0,i.im)(e)}let c;async function u(e,n){return(await async function(){return c||(c=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),c}()).invoke("executeGEOperation",{operation:e,parameters:o(n)})}async function f(e,n){return l(await u("clip",[a(e),e,n]))}async function d(e,n){return l(await u("cut",[a(e),e,n]))}function h(e,n){return u("contains",[a(e),e,n])}function g(e,n){return u("crosses",[a(e),e,n])}function m(e,n,t){return u("distance",[a(e),e,n,t])}function w(e,n){return u("equals",[a(e),e,n])}function p(e,n){return u("intersects",[a(e),e,n])}function y(e,n){return u("touches",[a(e),e,n])}function v(e,n){return u("within",[a(e),e,n])}function b(e,n){return u("disjoint",[a(e),e,n])}function k(e,n){return u("overlaps",[a(e),e,n])}function P(e,n,t){return u("relate",[a(e),e,n,t])}function Z(e){return u("isSimple",[a(e),e])}async function _(e){return l(await u("simplify",[a(e),e]))}async function H(e,n=!1){return l(await u("convexHull",[a(e),e,n]))}async function E(e,n){return l(await u("difference",[a(e),e,n]))}async function A(e,n){return l(await u("symmetricDifference",[a(e),e,n]))}async function F(e,n){return l(await u("intersect",[a(e),e,n]))}async function I(e,n=null){const t=function(e,n){let t;return Array.isArray(e)?t=e:(t=[],t.push(e),null!=n&&t.push(n)),t}(e,n);return l(await u("union",[a(t),t]))}async function N(e,n,t,r,s,i){return l(await u("offset",[a(e),e,n,t,r,s,i]))}async function L(e,n,t,r=!1){const s=[a(e),e,n,t,r];return l(await u("buffer",s))}async function V(e,n,t,r,s,i){const o=[a(e),e,n,t,r,s,i];return l(await u("geodesicBuffer",o))}async function S(e,n,t=!0){const r=await u("nearestCoordinate",[a(e),e,n,t]);return{...r,coordinate:s.Z.fromJSON(r.coordinate)}}async function O(e,n){const t=await u("nearestVertex",[a(e),e,n]);return{...t,coordinate:s.Z.fromJSON(t.coordinate)}}async function R(e,n,t){if(null==e)throw new U;const r=e.spatialReference;if(null==(t=t??function(e){return"xmin"in e?e.center:"x"in e?e:e.extent?.center}(e)))throw new U;const s=e.constructor.fromJSON(await u("rotate",[r,e,n,t]));return s.spatialReference=r,s}async function j(e,n,t,r){return l(await u("generalize",[a(e),e,n,t,r]))}async function C(e,n,t){return l(await u("densify",[a(e),e,n,t]))}async function z(e,n,t,r=0){return l(await u("geodesicDensify",[a(e),e,n,t,r]))}function J(e,n){return u("planarArea",[a(e),e,n])}function M(e,n){return u("planarLength",[a(e),e,n])}function x(e,n,t){return u("geodesicArea",[a(e),e,n,t])}function D(e,n,t){return u("geodesicLength",[a(e),e,n,t])}class U extends Error{constructor(){super("Illegal Argument Exception")}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7915,5732],{38171:(e,t,r)=>{r.d(t,{Z:()=>f});var n,i=r(43697),s=r(66577),l=r(51773),o=r(9790),a=r(2368),u=r(96674),p=r(99001),c=r(5600),d=(r(75215),r(67676),r(80442),r(52011)),m=r(33955);function h(e){if(null==e)return null;const t={};for(const r in e){const n=e[r];n&&(t[r]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let y=n=class extends((0,a.J)(u.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,p.D)(),configurable:!0})}normalizeCtorArgs(e,t,r,n){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:r,popupTemplate:n}}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new n({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:h(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,u.AK)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,n){if(!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=n),"attributes"===e&&(i.attributeName=n),this.layer.graphicChanged(i)}};(0,i._)([(0,c.Cb)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,m.im)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],y.prototype,"aggregateGeometries",null),(0,i._)([(0,c.Cb)({value:null})],y.prototype,"attributes",null),(0,i._)([(0,c.Cb)({value:null,types:s.qM,json:{read:m.im}})],y.prototype,"geometry",null),(0,i._)([(0,c.Cb)({type:Boolean})],y.prototype,"isAggregate",void 0),(0,i._)([(0,c.Cb)({clonable:"reference"})],y.prototype,"layer",void 0),(0,i._)([(0,c.Cb)({type:l.Z})],y.prototype,"popupTemplate",void 0),(0,i._)([(0,c.Cb)({clonable:"reference"})],y.prototype,"sourceLayer",void 0),(0,i._)([(0,c.Cb)({value:null,types:o.LB})],y.prototype,"symbol",null),(0,i._)([(0,c.Cb)({type:Boolean,value:!0})],y.prototype,"visible",null),y=n=(0,i._)([(0,d.j)("esri.Graphic")],y),(y||(y={})).generateUID=p.D;const f=y},92835:(e,t,r)=>{r.d(t,{Z:()=>y});var n,i=r(43697),s=r(96674),l=r(35463),o=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),p=r(30556),c=r(25031);let d=n=class extends s.wq{static get allTime(){return m}static get empty(){return h}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=c.By){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,l.JE)(r,e,t));let i=this.end;if(i){const r=(0,l.JE)(i,e,t);i=i.getTime()===r.getTime()?r:(0,l.Nm)(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,o;if(i>=t&&i<=r?l=i:t>=i&&t<=s&&(l=t),r>=i&&r<=s?o=r:s>=t&&s<=r&&(o=s),null!=l&&null!=o&&!isNaN(l)&&!isNaN(o)){const e=new n;return e.start=l===-1/0?null:new Date(l),e.end=o===1/0?null:new Date(o),e}return n.empty}offset(e,t,r=c.By){if(this.isEmpty||this.isAllTime)return this.clone();const i=new n,{start:s,end:o}=this;return null!=s&&(i.start=(0,l.Nm)(s,e,t,r)),null!=o&&(i.end=(0,l.Nm)(o,e,t,r)),i}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return m.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,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,i._)([(0,a.r)("end")],d.prototype,"readEnd",null),(0,i._)([(0,p.c)("end")],d.prototype,"writeEnd",null),(0,i._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,i._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,i._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,i._)([(0,a.r)("start")],d.prototype,"readStart",null),(0,i._)([(0,p.c)("start")],d.prototype,"writeStart",null),d=n=(0,i._)([(0,u.j)("esri.TimeExtent")],d);const m=new d,h=new d({start:void 0,end:void 0}),y=d},84552:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(43697),i=r(2368),s=r(96674),l=r(35463),o=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),p=r(78981);let c=class extends((0,i.J)(s.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,l.rJ)(this.value,this.unit,"milliseconds")}};(0,n._)([(0,a.J)(p.v,{nonNullable:!0})],c.prototype,"unit",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,n._)([(0,u.j)("esri.TimeInterval")],c);const d=c},5732:(e,t,r)=>{r.d(t,{c:()=>n,g:()=>i});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},2368:(e,t,r)=>{r.d(t,{J:()=>p,j:()=>c});var n=r(43697),i=r(92036),s=(r(80442),r(22974)),l=(r(92604),r(70586)),o=r(31263),a=r(1153),u=r(52011);const p=e=>{let t=class extends e{clone(){const e=(0,a.vw)(this);(0,l.O3)(e,"unable to clone instance of non-accessor class");const t=e.metadatas,r=e.store,n={},i=new Map;for(const e in t){const l=t[e],a=r?.originOf(e),u=l.clonable;if(l.readOnly||!1===u||a!==o.s3.USER&&a!==o.s3.DEFAULTS&&a!==o.s3.WEB_MAP&&a!==o.s3.WEB_SCENE)continue;const p=this[e];let c=null;c="function"==typeof u?u(p):"reference"===u?p:(0,s.Vo)(p),null!=p&&null==c||(a===o.s3.DEFAULTS?i.set(e,c):n[e]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(n);if(i.size){const e=(0,a.vw)(u)?.store;if(e)for(const[t,r]of i)e.set(t,r,o.s3.DEFAULTS)}return u}};return t=(0,n._)([(0,u.j)("esri.core.Clonable")],t),t};let c=class extends(p(i.Z)){};c=(0,n._)([(0,u.j)("esri.core.Clonable")],c)},57435:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(43697),i=r(46791),s=(r(66643),r(20102),r(92604),r(26258),r(87538)),l=r(5600),o=r(52011);let a=class extends i.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,s.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new i.Z(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.Cb)()],a.prototype,"getCollections",void 0),(0,n._)([(0,l.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,n._)([(0,l.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,n._)([(0,o.j)("esri.core.CollectionFlattener")],a);const u=a},17445:(e,t,r)=>{r.d(t,{N1:()=>d,YP:()=>a,Z_:()=>y,gx:()=>u,nn:()=>f,on:()=>c,tX:()=>g}),r(66643),r(46791);var n=r(91460),i=r(50758),s=r(70586),l=r(95330),o=r(26258);function a(e,t,r={}){return p(e,t,r,m)}function u(e,t,r={}){return p(e,t,r,h)}function p(e,t,r={},n){let i=null;const l=r.once?(e,r)=>{n(e)&&((0,s.hw)(i),t(e,r))}:(e,r)=>{n(e)&&t(e,r)};if(i=(0,o.aQ)(e,l,r.sync,r.equals),r.initial){const t=e();l(t,t)}return i}function c(e,t,r,l={}){let o=null,u=null,p=null;function c(){o&&u&&(u.remove(),l.onListenerRemove?.(o),o=null,u=null)}function d(e){l.once&&l.once&&(0,s.hw)(p),r(e)}const m=a(e,((e,r)=>{c(),(0,n.vT)(e)&&(o=e,u=(0,n.on)(e,t,d),l.onListenerAdd?.(e))}),{sync:l.sync,initial:!0});return p=(0,i.kB)((()=>{m.remove(),c()})),p}function d(e,t){return function(e,t,r){if((0,l.Hc)(r))return Promise.reject((0,l.zE)());const n=e();if(t?.(n))return Promise.resolve(n);let o=null;function a(){o=(0,s.hw)(o)}return new Promise(((n,s)=>{o=(0,i.AL)([(0,l.fu)(r,(()=>{a(),s((0,l.zE)())})),p(e,(e=>{a(),n(e)}),{sync:!1,once:!0},t??m)])}))}(e,h,t)}function m(e){return!0}function h(e){return!!e}r(87538);const y={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},60437:(e,t,r)=>{r.d(t,{G_:()=>b,HH:()=>l,JR:()=>h,TC:()=>o,Tn:()=>c,Ue:()=>i,al:()=>s,bZ:()=>y,cS:()=>m,dp:()=>u,fS:()=>g,is:()=>f,op:()=>p,pp:()=>a,t8:()=>d});var n=r(6570);function i(e=v){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,n,s,l,o=i()){return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o[4]=s,o[5]=l,o}function l(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function o(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function p(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function c(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?d(e,b):i(b)}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function y(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function f(e){return 6===e.length}function g(e,t,r){if(null==e||null==t)return e===t;if(!f(e)||!f(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const b=[1/0,1/0,1/0,-1/0,-1/0,-1/0],v=[0,0,0,0,0,0];i()},91040:(e,t,r)=>{r.d(t,{o2:()=>o,yZ:()=>l});var n=r(22021),i=r(67900);const s=96;function l(e,t){const r=t||e.extent,n=e.width,l=(0,i.c9)(r?.spatialReference);return r&&n?r.width/n*l*i.hd*s:0}function o(e,t,r){return function(e,t){return 0===t||(0,n.W8)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,n.W8)(e,t)||e>t}(e,r)}},25906:(e,t,r)=>{r.r(t),r.d(t,{default:()=>xe});var n=r(43697),i=r(68773),s=r(38171),l=r(51773),o=r(3172),a=r(46791),u=r(57435),p=r(35454),c=r(22974),d=r(16453),m=r(95330),h=r(17445),y=r(17452),f=r(5600),g=r(75215),b=r(71715),v=r(52011),w=r(30556),_=r(76169),x=r(6570),I=r(82971),C=r(91040),E=r(8744),T=r(87085),S=r(71612),N=r(38009),F=r(16859),O=r(34760),P=r(72965),U=r(28294),j=r(52162),A=r(66677),L=r(21506),R=r(92036),M=r(67676);r(80442);const Z={visible:"visibleSublayers"};let D=class extends R.Z{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(Z[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:o}=e;o&&(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,f.Cb)()],D.prototype,"layer",null),(0,n._)([(0,f.Cb)({readOnly:!0})],D.prototype,"layers",null),(0,n._)([(0,f.Cb)({type:Number})],D.prototype,"scale",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],D.prototype,"version",null),(0,n._)([(0,f.Cb)({readOnly:!0})],D.prototype,"visibleSublayers",null),D=(0,n._)([(0,v.j)("esri.layers.support.ExportWMSImageParameters")],D);var q,$=r(90082),B=r(10699),k=r(90578);let H=0,J=q=class extends((0,B.IG)(d.w)){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.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.Z_),(0,h.YP)((()=>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.Z_),(0,h.YP)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),h.Z_)])}get id(){return this._get("id")??H++}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,g.se)(a.Z.ofType(q),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new q;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,f.Cb)()],J.prototype,"description",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],J.prototype,"dimensions",void 0),(0,n._)([(0,f.Cb)({type:x.Z,json:{name:"extent"}})],J.prototype,"fullExtent",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"fullExtents",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],J.prototype,"id",null),(0,n._)([(0,f.Cb)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],J.prototype,"legendUrl",void 0),(0,n._)([(0,b.r)("legendUrl",["legendUrl","legendURL"])],J.prototype,"readLegendUrl",null),(0,n._)([(0,f.Cb)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],J.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"layer",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"maxScale",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"minScale",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],J.prototype,"effectiveScaleRange",null),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"name",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"parent",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],J.prototype,"popupEnabled",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],J.prototype,"queryable",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"sublayers",void 0),(0,n._)([(0,k.p)("sublayers")],J.prototype,"castSublayers",null),(0,n._)([(0,f.Cb)({type:[Number],json:{read:{source:"spatialReferences"}}})],J.prototype,"spatialReferences",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"title",void 0),(0,n._)([(0,f.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],J.prototype,"visible",null),J=q=(0,n._)([(0,v.j)("esri.layers.support.WMSSublayer")],J);const V=J;var W=r(20102);const G={84:4326,83:4269,27:4267};function z(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 W.Z("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const n=K("Capability",r),i=K("Service",r),s=n&&K("Request",n);if(!n||!i||!s)return null;const l=K("Layer",n);if(!l)return null;const o="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",a=te("Title",i,"")||te("Name",i,""),u=te("AccessConstraints",i,""),p=/^none$/i.test(u)?"":u,c=te("Abstract",i,""),d=parseInt(te("MaxWidth",i,"5000"),10),m=parseInt(te("MaxHeight",i,"5000"),10),h=ie(s,"GetMap"),y=ne(s,"GetMap"),f=le(l,o,t);if(!f)return null;let g,b=0;const v=Array.prototype.slice.call(n.childNodes),w=f.sublayers??[],_=e=>{null!=e&&w.push(e)};v.forEach((e=>{"Layer"===e.nodeName&&(0===b?g=e:1===b?(f.name&&(f.name="",_(le(g,o,t))),_(le(e,o,t))):_(le(e,o,t)),b++)}));let I=f.sublayers,C=f.extent;const E=f.fullExtents??[];if(I||(I=[]),0===I.length&&I.push(f),!C){const e=new x.Z(I[0].extent);f.extent=e.toJSON(),C=f.extent}const T=f.spatialReferences.length>0?f.spatialReferences:X(f),S=ne(s,"GetFeatureInfo"),N=S?ie(s,"GetFeatureInfo"):null,F=Y(I),O=f.minScale||0,P=f.maxScale||0,U=f.dimensions??[],j=F.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),A=U.concat(j).filter(ae);let L=null;if(A.length){const e=A.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(M.pC);L={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:p,description:c,dimensions:U,extent:C,fullExtents:E,featureInfoFormats:N,featureInfoUrl:S,mapUrl:y,maxWidth:d,maxHeight:m,maxScale:P,minScale:O,layers:F,spatialReferences:T,supportedImageFormatTypes:h,timeInfo:L,title:a,version:o}}function X(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=X(t);if(e.length>0)return e}return[]}function Y(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(Y(r.sublayers)),delete r.sublayers);return t}function Q(e,t,r){return t.getAttribute(e)??r}function K(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 ee(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 te(e,t,r){return K(e,t)?.textContent??r}function re(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 o,a,u,p;r?(o=isNaN(i)?-Number.MAX_VALUE:i,a=isNaN(n)?-Number.MAX_VALUE:n,u=isNaN(l)?Number.MAX_VALUE:l,p=isNaN(s)?Number.MAX_VALUE:s):(o=isNaN(n)?-Number.MAX_VALUE:n,a=isNaN(i)?-Number.MAX_VALUE:i,u=isNaN(s)?Number.MAX_VALUE:s,p=isNaN(l)?Number.MAX_VALUE:l);const c=new I.Z({wkid:t});return new x.Z({xmin:o,ymin:a,xmax:u,ymax:p,spatialReference:c})}function ne(e,t){const r=K(t,e);if(r){const e=K("DCPType",r);if(e){const t=K("HTTP",e);if(t){const e=K("Get",t);if(e){let t=function(e,t,r,n){const i=K("OnlineResource",r);return i?Q("xlink:href",i,null):null}(0,0,e);if(t)return t.indexOf("&")===t.length-1&&(t=t.substring(0,t.length-1)),function(e,t){const r=[],n=(0,y.mN)(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 ie(e,t){const r=ee("Operation",e);if(!r.length)return ee("Format",K(t,e)).map((({textContent:e})=>e)).filter(M.pC);const n=[];for(const e of r)if(e.getAttribute("name")===t){const t=ee("Format",e);for(const{textContent:e}of t)null!=e&&n.push(e)}return n}function se(e,t,r){const n=K(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 le(e,t,r){if(!e)return null;const n={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:"1"===e.getAttribute("queryable"),spatialReferences:[],sublayers:null},i=K("LatLonBoundingBox",e),s=K("EX_GeographicBoundingBox",e);let l=null;i&&(l=re(i,4326)),s&&(l=new x.Z(0,0,0,0,new I.Z({wkid:4326})),l.xmin=parseFloat(te("westBoundLongitude",s,"0")),l.ymin=parseFloat(te("southBoundLatitude",s,"0")),l.xmax=parseFloat(te("eastBoundLongitude",s,"0")),l.ymax=parseFloat(te("northBoundLatitude",s,"0"))),i||s||(l=new x.Z(-180,-90,180,90,new I.Z({wkid:4326}))),n.minScale=se(e,"MaxScaleDenominator",0),n.maxScale=se(e,"MinScaleDenominator",0);const o=["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)n.name=e.textContent||"";else if("Title"===e.nodeName)n.title=e.textContent||"";else if("Abstract"===e.nodeName)n.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(o);if(r&&0===r.indexOf("EPSG:")){const n=parseInt(r.substring(5),10);0===n||isNaN(n)||l||(l="1.3.0"===t?re(e,n,(0,j.A)(n)):re(e,n))}const i=r&&r.indexOf(":");if(i&&i>-1){let s=parseInt(r.substring(i+1,r.length),10);0===s||isNaN(s)||(s=G[s]??s);const l="1.3.0"===t?re(e,s,(0,j.A)(s)):re(e,s);l&&n.fullExtents&&n.fullExtents.push(l)}}else if(e.nodeName===o)(e.textContent?.split(" ")??[]).forEach((e=>{const t=e.includes(":")?parseInt(e.split(":")[1],10):parseInt(e,10);if(0!==t&&!isNaN(t)){const e=G[t]??t;n.spatialReferences.includes(e)||n.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||n.legendUrl){if("Layer"===e.nodeName){const i=le(e,t,r);i&&(i.parentLayerId=n.id,n.sublayers||(n.sublayers=[]),n.sublayers.push(i))}}else{const t=K("LegendURL",e);if(t){const e=K("OnlineResource",t);e&&(n.legendUrl=e.getAttribute("xlink:href"))}}})),n.extent=l?.toJSON(),n.dimensions=ee("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"!==Q("default",e,"0"),o="0"!==Q("nearestValue",e,"0"),a="0"!==Q("current",e,"0");return ae({name:t,units:r})?{name:"time",units:"ISO8601",extent:ce(n),default:ce(s),multipleValues:l,nearestValue:o,current:a}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:ue(n),unitSymbol:i,default:ue(s),multipleValues:l,nearestValue:o}:{name:t,units:r,extent:pe(n),unitSymbol:i,default:pe(s),multipleValues:l,nearestValue:o}})),n}function oe(e){return e.nodeType===Node.ELEMENT_NODE}function ae(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function ue(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(M.pC):r.map((e=>parseFloat(e)))}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:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(M.pC):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:new Date(t[0]),max:new Date(t[1]),resolution:t.length>=3&&"0"!==t[2]?de(t[2]):void 0}})).filter(M.pC):r.map((e=>new Date(e)))}function de(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:me(t[1]),months:me(t[2]),days:me(t[3]),hours:me(t[4]),minutes:me(t[5]),seconds:me(t[6])}:null}function me(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 he(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}const ye=new Set([102100,3857,102113,900913]),fe=new Set([3395,54004]),ge=new p.X({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function be(e){return"text/html"===e}function ve(e){return"text/plain"===e}let we=class extends((0,S.h)((0,U.n)((0,O.Q)((0,P.M)((0,N.q)((0,F.I)((0,d.R)(T.Z)))))))){constructor(...e){super(...e),this.allSublayers=new u.Z({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.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.Z_),(0,h.YP)((()=>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.Z_)])}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(m.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new x.Z({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(be)??this.featureInfoFormats.find(ve)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(be(e)||ve(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 I.Z(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 _e(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return _e(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,y.mN)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const n=(0,y.fl)(t,r??{});this._set("url",n)}createExportImageParameters(e,t,r,n){const i=n?.pixelRatio??1,s=(0,C.yZ)({extent:e,width:t})*i,l=new D({layer:this,scale:s}),{xmin:o,ymin:a,xmax:u,ymax:p,spatialReference:c}=e,d=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&ye.has(r)?t.find((e=>ye.has(e)))||t.find((e=>fe.has(e)))||102100:r)}(c,this.spatialReferences),m="1.3.0"===this.version&&(0,j.A)(d)?`${a},${o},${p},${u}`:`${o},${a},${u},${p}`,h=l.toJSON();return{bbox:m,["1.3.0"===this.version?"crs":"srs"]:null==d||isNaN(d)?void 0:"EPSG:"+d,...h}}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=n?.timeExtent?.start,a=n?.timeExtent?.end,u=null!=l&&null!=a?l.getTime()===a.getTime()?he(l):`${he(l)}/${he(a)}`:void 0,p={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...s,time:u,...this.refreshParameters}),signal:n?.signal};return(0,o.Z)(i??"",p).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=n?.timeExtent?.start,a=n?.timeExtent?.end,u=null!=l&&null!=a?l.getTime()===a.getTime()?he(l):`${he(l)}/${he(a)}`:void 0,p={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...s,time:u,...this.refreshParameters}),signal:n?.signal},{data:c}=await(0,o.Z)(i,p);return(0,$.g)(c,i,n?.signal)}fetchFeatureInfo(e,t,r,n,i){const s=(0,C.yZ)({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 D({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 o="1.3.0"===this.version?{I:n,J:i}:{x:n,y:i},a={query_layers:l,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...o},u={...this.createExportImageParameters(e,t,r),...a},p=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(p):this._defaultFetchFeatureInfoFunction((0,y.fl)(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,A.G)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?I.Z.WebMercator:new I.Z({wkid:t});return(0,E.fS)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=(0,y.qg)(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new l.Z({title:this.title,content:t}),n=new s.Z({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,o.Z)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=z(n)}if(this.parsedUrl){const e=new y.R9(this.parsedUrl.path),{httpsDomains:t}=i.default.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"})}_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 _e(e,t,r){e=e??[];const n=new Map;e.every((e=>null==e.id))&&(e=(0,c.d9)(e)).forEach(((e,t)=>e.id=t));for(const i of e){const e=new V;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 a.Z),r.sublayers.push(e)}else i.push(e)}return i}(0,n._)([(0,f.Cb)({readOnly:!0})],we.prototype,"allSublayers",void 0),(0,n._)([(0,f.Cb)({json:{type:Object,write:!0}})],we.prototype,"customParameters",void 0),(0,n._)([(0,f.Cb)({json:{type:Object,write:!0}})],we.prototype,"customLayerParameters",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:!0}})],we.prototype,"copyright",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"description",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],we.prototype,"dimensions",void 0),(0,n._)([(0,f.Cb)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],we.prototype,"fullExtent",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"fullExtent",["extent"])],we.prototype,"readFullExtentFromItemOrMap",null),(0,n._)([(0,w.c)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],we.prototype,"writeFullExtent",null),(0,n._)([(0,f.Cb)()],we.prototype,"fullExtents",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoFormat",null),(0,n._)([(0,f.Cb)({type:[String],readOnly:!0})],we.prototype,"featureInfoFormats",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoUrl",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"fetchFeatureInfoFunction",void 0),(0,n._)([(0,f.Cb)({type:String,json:{origins:{"web-document":{default:"image/png",type:ge.jsonValues,read:{reader:ge.read,source:"format"},write:{writer:ge.write,target:"format"}}}}})],we.prototype,"imageFormat",void 0),(0,n._)([(0,b.r)("imageFormat",["supportedImageFormatTypes"])],we.prototype,"readImageFormat",null),(0,n._)([(0,f.Cb)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],we.prototype,"imageMaxHeight",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],we.prototype,"imageMaxWidth",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"imageTransparency",void 0),(0,n._)([(0,f.Cb)(L.rn)],we.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)({type:["show","hide","hide-children"]})],we.prototype,"listMode",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"mapUrl",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],we.prototype,"isReference",void 0),(0,n._)([(0,f.Cb)({type:["WMS"]})],we.prototype,"operationalLayerType",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"resourceInfo",void 0),(0,n._)([(0,f.Cb)({type:I.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],we.prototype,"spatialReference",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],we.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,n._)([(0,f.Cb)({type:[g.z8],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],we.prototype,"spatialReferences",void 0),(0,n._)([(0,w.c)(["web-document","portal-item"],"spatialReferences")],we.prototype,"writeSpatialReferences",null),(0,n._)([(0,f.Cb)({type:a.Z.ofType(V),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,_.d)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],we.prototype,"sublayers",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],we.prototype,"readSublayersFromItemOrMap",null),(0,n._)([(0,b.r)("service","sublayers",["layers"])],we.prototype,"readSublayers",null),(0,n._)([(0,w.c)("sublayers",{layers:{type:[V]},visibleLayers:{type:[String]}})],we.prototype,"writeSublayers",null),(0,n._)([(0,f.Cb)({json:{read:!1},readOnly:!0,value:"wms"})],we.prototype,"type",void 0),(0,n._)([(0,f.Cb)(L.HQ)],we.prototype,"url",null),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"version",void 0),we=(0,n._)([(0,v.j)("esri.layers.WMSLayer")],we);const xe=we},16859:(e,t,r)=>{r.d(t,{I:()=>x});var n=r(43697),i=r(68773),s=r(40330),l=r(3172),o=r(66643),a=r(20102),u=r(92604),p=r(70586),c=r(95330),d=r(17452),m=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),y=r(52011),f=r(30556),g=r(84230),b=r(48522),v=r(15235),w=r(86082),_=r(14661);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.SC)(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 v.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(8062).then(r.bind(r,18062));return(0,c.k_)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||u.Z.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,c.r9)(e),!0))))}async setUserPrivileges(e,t){if(!i.default.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,c.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=e===r.id;if(n&&r.portal.user)return(0,_.Ss)(r);let i,l;if(n)i=r.portal.url;else try{i=await(0,g.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!i||!(0,d.Zo)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(s.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!l)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(n?await r.reload():(r=new v.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return(0,_.Ss)(r)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(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=b.Z.getDefault();if(i&&i.loaded&&(0,d.Fv)(i.restUrl)===(0,d.Fv)(n))return i.user;const a=`${n}/community/self`,u=null!=e?e.signal:null,p=await(0,o.q6)((0,l.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?w.Z.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||b.Z.getDefault());return r&&n&&!(0,d.tm)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("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.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,n._)([(0,h.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,n._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,n._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,n._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,n._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,n._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,n._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>v});var n=r(43697),i=r(92604),s=r(95330),l=r(5600),o=r(90578),a=(r(67676),r(80442),r(52011)),u=r(82960),p=r(46791),c=(r(66643),r(20102),r(26258),r(87538));const d=new p.Z,m=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&d.push(new WeakRef(e))}function y(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:y(t,e%t):0}let f=0,g=0;function b(){const e=Date.now();let t=!1;for(const r of d){const n=r.deref();n?n.refreshInterval&&e-(m.get(n)??0)+5>=6e4*n.refreshInterval&&(m.set(n,e),n.refresh(e)):t=!0}if(t)for(let e=d.length-1;e>=0;e--)d.at(e).deref()||d.removeAt(e)}(0,c.EH)((()=>{const e=Date.now();let t=0;for(const r of d){const n=r.deref();n&&(t=y(Math.round(6e4*n.refreshInterval),t),n.refreshInterval?m.get(n)||m.set(n,e):m.delete(n))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(b,g)}}));const v=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=d.find((t=>t.deref()===e));t&&d.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,s.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,n._)([(0,l.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,o.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,n._)([(0,l.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,l.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,n._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>d});var n=r(43697),i=r(92835),s=r(84552),l=r(5600),o=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(35671),p=r(76259),c=r(78981);const d=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=c.v.fromJSON(r.timeOffsetUnits);return n&&i?new s.Z({value:n,unit:i}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n._)([(0,l.Cb)({type:i.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,n._)([(0,l.Cb)({type:s.Z})],t.prototype,"timeOffset",void 0),(0,n._)([(0,o.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,n._)([(0,l.Cb)({value:null,type:p.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,n._)([(0,l.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,n._)([(0,a.j)("esri.layers.mixins.TemporalLayer")],t),t}},52162:(e,t,r)=>{r.d(t,{A:()=>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))}},76259:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(43697),i=r(92835),s=r(84552),l=r(2368),o=r(96674),a=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),p=r(52011),c=r(30556),d=r(25031);function m(e,t){return s.Z.fromJSON({value:e,unit:t})}let h=class extends((0,l.J)(o.wq)){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}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),n=new Date(t.timeExtent[1]);return new i.Z({start:r,end:n})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]: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,a.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,n._)([(0,a.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,n._)([(0,a.Cb)({type:i.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,n._)([(0,u.r)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,n._)([(0,c.c)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,n._)([(0,a.Cb)({type:s.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,n._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,n._)([(0,c.c)("interval")],h.prototype,"writeInterval",null),(0,n._)([(0,a.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,n._)([(0,a.Cb)((0,d.mi)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,n._)([(0,p.j)("esri.layers.support.TimeInfo")],h);const y=h},90082:(e,t,r)=>{r.d(t,{V:()=>l,g:()=>s});var n=r(20102),i=r(95330);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new n.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,i.k_)(r),s}async function l(e,t,r,s,l){let o;try{o=await createImageBitmap(e)}catch(e){throw new n.Z("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,i.k_)(l),o}},78981:(e,t,r)=>{r.d(t,{v:()=>n});const n=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},31134:(e,t,r)=>{r.d(t,{Z:()=>d});var n,i=r(43697),s=r(96674),l=r(62357),o=r(5600),a=r(90578),u=(r(67676),r(80442),r(52011)),p=r(61565);let c=n=class extends s.wq{constructor(e){super(e),this.decoration="none",this.family="sans-serif",this.size=9,this.style="normal",this.weight="normal"}castSize(e){return(0,l.t_)(e)}clone(){return new n({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}hash(){return`${this.decoration}.${this.family}.${this.size}.${this.style}.${this.weight}`}};(0,i._)([(0,o.Cb)({type:p.JT,json:{default:"none",write:!0}})],c.prototype,"decoration",void 0),(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"family",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy:(e,t,r)=>({enabled:!r||!r.textSymbol3D})}}})],c.prototype,"size",void 0),(0,i._)([(0,a.p)("size")],c.prototype,"castSize",null),(0,i._)([(0,o.Cb)({type:p.g6,json:{default:"normal",write:!0}})],c.prototype,"style",void 0),(0,i._)([(0,o.Cb)({type:p.vC,json:{default:"normal",write:!0}})],c.prototype,"weight",void 0),c=n=(0,i._)([(0,u.j)("esri.symbols.Font")],c);const d=c},61565:(e,t,r)=>{r.d(t,{Ck:()=>a,JT:()=>s,Nj:()=>p,c9:()=>c,g6:()=>l,vC:()=>o,x0:()=>u});var n=r(22021),i=r(75215);const s=["none","underline","line-through"],l=["normal","italic","oblique"],o=["normal","lighter","bold","bolder"],a={type:Number,cast:e=>{const t=(0,i.q9)(e);return 0===t?1:(0,n.uZ)(t,.1,4)},nonNullable:!0},u={type:["left","right","center"],nonNullable:!0},p={type:["baseline","top","middle","bottom"],nonNullable:!0},c=8}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7915,5732],{38171:(e,t,r)=>{r.d(t,{Z:()=>f});var n,i=r(43697),s=r(66577),l=r(51773),o=r(9790),a=r(2368),u=r(96674),p=r(99001),c=r(5600),d=(r(75215),r(67676),r(80442),r(52011)),m=r(33955);function h(e){if(null==e)return null;const t={};for(const r in e){const n=e[r];n&&(t[r]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let y=n=class extends((0,a.J)(u.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,p.D)(),configurable:!0})}normalizeCtorArgs(e,t,r,n){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:r,popupTemplate:n}}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new n({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:h(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,u.AK)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,n){if(!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=n),"attributes"===e&&(i.attributeName=n),this.layer.graphicChanged(i)}};(0,i._)([(0,c.Cb)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,m.im)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],y.prototype,"aggregateGeometries",null),(0,i._)([(0,c.Cb)({value:null})],y.prototype,"attributes",null),(0,i._)([(0,c.Cb)({value:null,types:s.qM,json:{read:m.im}})],y.prototype,"geometry",null),(0,i._)([(0,c.Cb)({type:Boolean})],y.prototype,"isAggregate",void 0),(0,i._)([(0,c.Cb)({clonable:"reference"})],y.prototype,"layer",void 0),(0,i._)([(0,c.Cb)({type:l.Z})],y.prototype,"popupTemplate",void 0),(0,i._)([(0,c.Cb)({clonable:"reference"})],y.prototype,"sourceLayer",void 0),(0,i._)([(0,c.Cb)({value:null,types:o.LB})],y.prototype,"symbol",null),(0,i._)([(0,c.Cb)({type:Boolean,value:!0})],y.prototype,"visible",null),y=n=(0,i._)([(0,d.j)("esri.Graphic")],y),(y||(y={})).generateUID=p.D;const f=y},92835:(e,t,r)=>{r.d(t,{Z:()=>y});var n,i=r(43697),s=r(96674),l=r(35463),o=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),p=r(30556),c=r(25031);let d=n=class extends s.wq{static get allTime(){return m}static get empty(){return h}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=c.By){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,l.JE)(r,e,t));let i=this.end;if(i){const r=(0,l.JE)(i,e,t);i=i.getTime()===r.getTime()?r:(0,l.Nm)(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,o;if(i>=t&&i<=r?l=i:t>=i&&t<=s&&(l=t),r>=i&&r<=s?o=r:s>=t&&s<=r&&(o=s),null!=l&&null!=o&&!isNaN(l)&&!isNaN(o)){const e=new n;return e.start=l===-1/0?null:new Date(l),e.end=o===1/0?null:new Date(o),e}return n.empty}offset(e,t,r=c.By){if(this.isEmpty||this.isAllTime)return this.clone();const i=new n,{start:s,end:o}=this;return null!=s&&(i.start=(0,l.Nm)(s,e,t,r)),null!=o&&(i.end=(0,l.Nm)(o,e,t,r)),i}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return m.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,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,i._)([(0,a.r)("end")],d.prototype,"readEnd",null),(0,i._)([(0,p.c)("end")],d.prototype,"writeEnd",null),(0,i._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,i._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,i._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,i._)([(0,a.r)("start")],d.prototype,"readStart",null),(0,i._)([(0,p.c)("start")],d.prototype,"writeStart",null),d=n=(0,i._)([(0,u.j)("esri.TimeExtent")],d);const m=new d,h=new d({start:void 0,end:void 0}),y=d},84552:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(43697),i=r(2368),s=r(96674),l=r(35463),o=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),p=r(78981);let c=class extends((0,i.J)(s.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,l.rJ)(this.value,this.unit,"milliseconds")}};(0,n._)([(0,a.J)(p.v,{nonNullable:!0})],c.prototype,"unit",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,n._)([(0,u.j)("esri.TimeInterval")],c);const d=c},5732:(e,t,r)=>{r.d(t,{c:()=>n,g:()=>i});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},2368:(e,t,r)=>{r.d(t,{J:()=>p,j:()=>c});var n=r(43697),i=r(92036),s=(r(80442),r(22974)),l=(r(92604),r(70586)),o=r(31263),a=r(1153),u=r(52011);const p=e=>{let t=class extends e{clone(){const e=(0,a.vw)(this);(0,l.O3)(e,"unable to clone instance of non-accessor class");const t=e.metadatas,r=e.store,n={},i=new Map;for(const e in t){const l=t[e],a=r?.originOf(e),u=l.clonable;if(l.readOnly||!1===u||a!==o.s3.USER&&a!==o.s3.DEFAULTS&&a!==o.s3.WEB_MAP&&a!==o.s3.WEB_SCENE)continue;const p=this[e];let c=null;c="function"==typeof u?u(p):"reference"===u?p:(0,s.Vo)(p),null!=p&&null==c||(a===o.s3.DEFAULTS?i.set(e,c):n[e]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(n);if(i.size){const e=(0,a.vw)(u)?.store;if(e)for(const[t,r]of i)e.set(t,r,o.s3.DEFAULTS)}return u}};return t=(0,n._)([(0,u.j)("esri.core.Clonable")],t),t};let c=class extends(p(i.Z)){};c=(0,n._)([(0,u.j)("esri.core.Clonable")],c)},57435:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(43697),i=r(46791),s=(r(66643),r(20102),r(92604),r(26258),r(87538)),l=r(5600),o=r(52011);let a=class extends i.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,s.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new i.Z(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.Cb)()],a.prototype,"getCollections",void 0),(0,n._)([(0,l.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,n._)([(0,l.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,n._)([(0,o.j)("esri.core.CollectionFlattener")],a);const u=a},17445:(e,t,r)=>{r.d(t,{N1:()=>d,YP:()=>a,Z_:()=>y,gx:()=>u,nn:()=>f,on:()=>c,tX:()=>g}),r(66643),r(46791);var n=r(91460),i=r(50758),s=r(70586),l=r(95330),o=r(26258);function a(e,t,r={}){return p(e,t,r,m)}function u(e,t,r={}){return p(e,t,r,h)}function p(e,t,r={},n){let i=null;const l=r.once?(e,r)=>{n(e)&&((0,s.hw)(i),t(e,r))}:(e,r)=>{n(e)&&t(e,r)};if(i=(0,o.aQ)(e,l,r.sync,r.equals),r.initial){const t=e();l(t,t)}return i}function c(e,t,r,l={}){let o=null,u=null,p=null;function c(){o&&u&&(u.remove(),l.onListenerRemove?.(o),o=null,u=null)}function d(e){l.once&&l.once&&(0,s.hw)(p),r(e)}const m=a(e,((e,r)=>{c(),(0,n.vT)(e)&&(o=e,u=(0,n.on)(e,t,d),l.onListenerAdd?.(e))}),{sync:l.sync,initial:!0});return p=(0,i.kB)((()=>{m.remove(),c()})),p}function d(e,t){return function(e,t,r){if((0,l.Hc)(r))return Promise.reject((0,l.zE)());const n=e();if(t?.(n))return Promise.resolve(n);let o=null;function a(){o=(0,s.hw)(o)}return new Promise(((n,s)=>{o=(0,i.AL)([(0,l.fu)(r,(()=>{a(),s((0,l.zE)())})),p(e,(e=>{a(),n(e)}),{sync:!1,once:!0},t??m)])}))}(e,h,t)}function m(e){return!0}function h(e){return!!e}r(87538);const y={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},60437:(e,t,r)=>{r.d(t,{G_:()=>b,HH:()=>l,JR:()=>h,TC:()=>o,Tn:()=>c,Ue:()=>i,al:()=>s,bZ:()=>y,cS:()=>m,dp:()=>u,fS:()=>g,is:()=>f,op:()=>p,pp:()=>a,t8:()=>d});var n=r(6570);function i(e=v){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,n,s,l,o=i()){return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o[4]=s,o[5]=l,o}function l(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function o(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function p(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function c(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?d(e,b):i(b)}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function y(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function f(e){return 6===e.length}function g(e,t,r){if(null==e||null==t)return e===t;if(!f(e)||!f(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const b=[1/0,1/0,1/0,-1/0,-1/0,-1/0],v=[0,0,0,0,0,0];i()},91040:(e,t,r)=>{r.d(t,{o2:()=>o,yZ:()=>l});var n=r(22021),i=r(67900);const s=96;function l(e,t){const r=t||e.extent,n=e.width,l=(0,i.c9)(r?.spatialReference);return r&&n?r.width/n*l*i.hd*s:0}function o(e,t,r){return function(e,t){return 0===t||(0,n.W8)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,n.W8)(e,t)||e>t}(e,r)}},25906:(e,t,r)=>{r.r(t),r.d(t,{default:()=>xe});var n=r(43697),i=r(68773),s=r(38171),l=r(51773),o=r(3172),a=r(46791),u=r(57435),p=r(35454),c=r(22974),d=r(16453),m=r(95330),h=r(17445),y=r(17452),f=r(5600),g=r(75215),b=r(71715),v=r(52011),w=r(30556),_=r(76169),x=r(6570),I=r(82971),C=r(91040),E=r(8744),T=r(87085),S=r(71612),N=r(38009),F=r(16859),O=r(34760),P=r(72965),U=r(28294),j=r(52162),A=r(66677),L=r(21506),R=r(92036),M=r(67676);r(80442);const Z={visible:"visibleSublayers"};let D=class extends R.Z{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(Z[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:o}=e;o&&(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,f.Cb)()],D.prototype,"layer",null),(0,n._)([(0,f.Cb)({readOnly:!0})],D.prototype,"layers",null),(0,n._)([(0,f.Cb)({type:Number})],D.prototype,"scale",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],D.prototype,"version",null),(0,n._)([(0,f.Cb)({readOnly:!0})],D.prototype,"visibleSublayers",null),D=(0,n._)([(0,v.j)("esri.layers.support.ExportWMSImageParameters")],D);var q,$=r(90082),B=r(10699),k=r(90578);let H=0,J=q=class extends((0,B.IG)(d.w)){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.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.Z_),(0,h.YP)((()=>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.Z_),(0,h.YP)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),h.Z_)])}get id(){return this._get("id")??H++}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,g.se)(a.Z.ofType(q),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new q;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,f.Cb)()],J.prototype,"description",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],J.prototype,"dimensions",void 0),(0,n._)([(0,f.Cb)({type:x.Z,json:{name:"extent"}})],J.prototype,"fullExtent",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"fullExtents",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],J.prototype,"id",null),(0,n._)([(0,f.Cb)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],J.prototype,"legendUrl",void 0),(0,n._)([(0,b.r)("legendUrl",["legendUrl","legendURL"])],J.prototype,"readLegendUrl",null),(0,n._)([(0,f.Cb)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],J.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"layer",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"maxScale",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"minScale",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],J.prototype,"effectiveScaleRange",null),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"name",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"parent",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],J.prototype,"popupEnabled",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],J.prototype,"queryable",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"sublayers",void 0),(0,n._)([(0,k.p)("sublayers")],J.prototype,"castSublayers",null),(0,n._)([(0,f.Cb)({type:[Number],json:{read:{source:"spatialReferences"}}})],J.prototype,"spatialReferences",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"title",void 0),(0,n._)([(0,f.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],J.prototype,"visible",null),J=q=(0,n._)([(0,v.j)("esri.layers.support.WMSSublayer")],J);const V=J;var W=r(20102);const G={84:4326,83:4269,27:4267};function z(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 W.Z("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const n=K("Capability",r),i=K("Service",r),s=n&&K("Request",n);if(!n||!i||!s)return null;const l=K("Layer",n);if(!l)return null;const o="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",a=te("Title",i,"")||te("Name",i,""),u=te("AccessConstraints",i,""),p=/^none$/i.test(u)?"":u,c=te("Abstract",i,""),d=parseInt(te("MaxWidth",i,"5000"),10),m=parseInt(te("MaxHeight",i,"5000"),10),h=ie(s,"GetMap"),y=ne(s,"GetMap"),f=le(l,o,t);if(!f)return null;let g,b=0;const v=Array.prototype.slice.call(n.childNodes),w=f.sublayers??[],_=e=>{null!=e&&w.push(e)};v.forEach((e=>{"Layer"===e.nodeName&&(0===b?g=e:1===b?(f.name&&(f.name="",_(le(g,o,t))),_(le(e,o,t))):_(le(e,o,t)),b++)}));let I=f.sublayers,C=f.extent;const E=f.fullExtents??[];if(I||(I=[]),0===I.length&&I.push(f),!C){const e=new x.Z(I[0].extent);f.extent=e.toJSON(),C=f.extent}const T=f.spatialReferences.length>0?f.spatialReferences:X(f),S=ne(s,"GetFeatureInfo"),N=S?ie(s,"GetFeatureInfo"):null,F=Y(I),O=f.minScale||0,P=f.maxScale||0,U=f.dimensions??[],j=F.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),A=U.concat(j).filter(ae);let L=null;if(A.length){const e=A.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(M.pC);L={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:p,description:c,dimensions:U,extent:C,fullExtents:E,featureInfoFormats:N,featureInfoUrl:S,mapUrl:y,maxWidth:d,maxHeight:m,maxScale:P,minScale:O,layers:F,spatialReferences:T,supportedImageFormatTypes:h,timeInfo:L,title:a,version:o}}function X(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=X(t);if(e.length>0)return e}return[]}function Y(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(Y(r.sublayers)),delete r.sublayers);return t}function Q(e,t,r){return t.getAttribute(e)??r}function K(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 ee(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 te(e,t,r){return K(e,t)?.textContent??r}function re(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 o,a,u,p;r?(o=isNaN(i)?-Number.MAX_VALUE:i,a=isNaN(n)?-Number.MAX_VALUE:n,u=isNaN(l)?Number.MAX_VALUE:l,p=isNaN(s)?Number.MAX_VALUE:s):(o=isNaN(n)?-Number.MAX_VALUE:n,a=isNaN(i)?-Number.MAX_VALUE:i,u=isNaN(s)?Number.MAX_VALUE:s,p=isNaN(l)?Number.MAX_VALUE:l);const c=new I.Z({wkid:t});return new x.Z({xmin:o,ymin:a,xmax:u,ymax:p,spatialReference:c})}function ne(e,t){const r=K(t,e);if(r){const e=K("DCPType",r);if(e){const t=K("HTTP",e);if(t){const e=K("Get",t);if(e){let t=function(e,t,r,n){const i=K("OnlineResource",r);return i?Q("xlink:href",i,null):null}(0,0,e);if(t)return t.indexOf("&")===t.length-1&&(t=t.substring(0,t.length-1)),function(e,t){const r=[],n=(0,y.mN)(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 ie(e,t){const r=ee("Operation",e);if(!r.length)return ee("Format",K(t,e)).map((({textContent:e})=>e)).filter(M.pC);const n=[];for(const e of r)if(e.getAttribute("name")===t){const t=ee("Format",e);for(const{textContent:e}of t)null!=e&&n.push(e)}return n}function se(e,t,r){const n=K(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 le(e,t,r){if(!e)return null;const n={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:"1"===e.getAttribute("queryable"),spatialReferences:[],sublayers:null},i=K("LatLonBoundingBox",e),s=K("EX_GeographicBoundingBox",e);let l=null;i&&(l=re(i,4326)),s&&(l=new x.Z(0,0,0,0,new I.Z({wkid:4326})),l.xmin=parseFloat(te("westBoundLongitude",s,"0")),l.ymin=parseFloat(te("southBoundLatitude",s,"0")),l.xmax=parseFloat(te("eastBoundLongitude",s,"0")),l.ymax=parseFloat(te("northBoundLatitude",s,"0"))),i||s||(l=new x.Z(-180,-90,180,90,new I.Z({wkid:4326}))),n.minScale=se(e,"MaxScaleDenominator",0),n.maxScale=se(e,"MinScaleDenominator",0);const o=["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)n.name=e.textContent||"";else if("Title"===e.nodeName)n.title=e.textContent||"";else if("Abstract"===e.nodeName)n.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(o);if(r&&0===r.indexOf("EPSG:")){const n=parseInt(r.substring(5),10);0===n||isNaN(n)||l||(l="1.3.0"===t?re(e,n,(0,j.A)(n)):re(e,n))}const i=r&&r.indexOf(":");if(i&&i>-1){let s=parseInt(r.substring(i+1,r.length),10);0===s||isNaN(s)||(s=G[s]??s);const l="1.3.0"===t?re(e,s,(0,j.A)(s)):re(e,s);l&&n.fullExtents&&n.fullExtents.push(l)}}else if(e.nodeName===o)(e.textContent?.split(" ")??[]).forEach((e=>{const t=e.includes(":")?parseInt(e.split(":")[1],10):parseInt(e,10);if(0!==t&&!isNaN(t)){const e=G[t]??t;n.spatialReferences.includes(e)||n.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||n.legendUrl){if("Layer"===e.nodeName){const i=le(e,t,r);i&&(i.parentLayerId=n.id,n.sublayers||(n.sublayers=[]),n.sublayers.push(i))}}else{const t=K("LegendURL",e);if(t){const e=K("OnlineResource",t);e&&(n.legendUrl=e.getAttribute("xlink:href"))}}})),n.extent=l?.toJSON(),n.dimensions=ee("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"!==Q("default",e,"0"),o="0"!==Q("nearestValue",e,"0"),a="0"!==Q("current",e,"0");return ae({name:t,units:r})?{name:"time",units:"ISO8601",extent:ce(n),default:ce(s),multipleValues:l,nearestValue:o,current:a}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:ue(n),unitSymbol:i,default:ue(s),multipleValues:l,nearestValue:o}:{name:t,units:r,extent:pe(n),unitSymbol:i,default:pe(s),multipleValues:l,nearestValue:o}})),n}function oe(e){return e.nodeType===Node.ELEMENT_NODE}function ae(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function ue(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(M.pC):r.map((e=>parseFloat(e)))}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:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(M.pC):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:new Date(t[0]),max:new Date(t[1]),resolution:t.length>=3&&"0"!==t[2]?de(t[2]):void 0}})).filter(M.pC):r.map((e=>new Date(e)))}function de(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:me(t[1]),months:me(t[2]),days:me(t[3]),hours:me(t[4]),minutes:me(t[5]),seconds:me(t[6])}:null}function me(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 he(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}const ye=new Set([102100,3857,102113,900913]),fe=new Set([3395,54004]),ge=new p.X({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function be(e){return"text/html"===e}function ve(e){return"text/plain"===e}let we=class extends((0,S.h)((0,U.n)((0,O.Q)((0,P.M)((0,N.q)((0,F.I)((0,d.R)(T.Z)))))))){constructor(...e){super(...e),this.allSublayers=new u.Z({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.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.Z_),(0,h.YP)((()=>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.Z_)])}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(m.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new x.Z({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(be)??this.featureInfoFormats.find(ve)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(be(e)||ve(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 I.Z(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 _e(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return _e(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,y.mN)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const n=(0,y.fl)(t,r??{});this._set("url",n)}createExportImageParameters(e,t,r,n){const i=n?.pixelRatio??1,s=(0,C.yZ)({extent:e,width:t})*i,l=new D({layer:this,scale:s}),{xmin:o,ymin:a,xmax:u,ymax:p,spatialReference:c}=e,d=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&ye.has(r)?t.find((e=>ye.has(e)))||t.find((e=>fe.has(e)))||102100:r)}(c,this.spatialReferences),m="1.3.0"===this.version&&(0,j.A)(d)?`${a},${o},${p},${u}`:`${o},${a},${u},${p}`,h=l.toJSON();return{bbox:m,["1.3.0"===this.version?"crs":"srs"]:null==d||isNaN(d)?void 0:"EPSG:"+d,...h}}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=n?.timeExtent?.start,a=n?.timeExtent?.end,u=null!=l&&null!=a?l.getTime()===a.getTime()?he(l):`${he(l)}/${he(a)}`:void 0,p={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...s,time:u,...this.refreshParameters}),signal:n?.signal};return(0,o.Z)(i??"",p).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=n?.timeExtent?.start,a=n?.timeExtent?.end,u=null!=l&&null!=a?l.getTime()===a.getTime()?he(l):`${he(l)}/${he(a)}`:void 0,p={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...s,time:u,...this.refreshParameters}),signal:n?.signal},{data:c}=await(0,o.Z)(i,p);return(0,$.g)(c,i,n?.signal)}fetchFeatureInfo(e,t,r,n,i){const s=(0,C.yZ)({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 D({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 o="1.3.0"===this.version?{I:n,J:i}:{x:n,y:i},a={query_layers:l,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...o},u={...this.createExportImageParameters(e,t,r),...a},p=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(p):this._defaultFetchFeatureInfoFunction((0,y.fl)(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,A.G)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?I.Z.WebMercator:new I.Z({wkid:t});return(0,E.fS)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=(0,y.qg)(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new l.Z({title:this.title,content:t}),n=new s.Z({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,o.Z)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=z(n)}if(this.parsedUrl){const e=new y.R9(this.parsedUrl.path),{httpsDomains:t}=i.default.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"})}_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 _e(e,t,r){e=e??[];const n=new Map;e.every((e=>null==e.id))&&(e=(0,c.d9)(e)).forEach(((e,t)=>e.id=t));for(const i of e){const e=new V;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 a.Z),r.sublayers.push(e)}else i.push(e)}return i}(0,n._)([(0,f.Cb)({readOnly:!0})],we.prototype,"allSublayers",void 0),(0,n._)([(0,f.Cb)({json:{type:Object,write:!0}})],we.prototype,"customParameters",void 0),(0,n._)([(0,f.Cb)({json:{type:Object,write:!0}})],we.prototype,"customLayerParameters",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:!0}})],we.prototype,"copyright",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"description",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],we.prototype,"dimensions",void 0),(0,n._)([(0,f.Cb)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],we.prototype,"fullExtent",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"fullExtent",["extent"])],we.prototype,"readFullExtentFromItemOrMap",null),(0,n._)([(0,w.c)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],we.prototype,"writeFullExtent",null),(0,n._)([(0,f.Cb)()],we.prototype,"fullExtents",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoFormat",null),(0,n._)([(0,f.Cb)({type:[String],readOnly:!0})],we.prototype,"featureInfoFormats",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoUrl",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"fetchFeatureInfoFunction",void 0),(0,n._)([(0,f.Cb)({type:String,json:{origins:{"web-document":{default:"image/png",type:ge.jsonValues,read:{reader:ge.read,source:"format"},write:{writer:ge.write,target:"format"}}}}})],we.prototype,"imageFormat",void 0),(0,n._)([(0,b.r)("imageFormat",["supportedImageFormatTypes"])],we.prototype,"readImageFormat",null),(0,n._)([(0,f.Cb)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],we.prototype,"imageMaxHeight",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],we.prototype,"imageMaxWidth",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"imageTransparency",void 0),(0,n._)([(0,f.Cb)(L.rn)],we.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)({type:["show","hide","hide-children"]})],we.prototype,"listMode",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"mapUrl",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],we.prototype,"isReference",void 0),(0,n._)([(0,f.Cb)({type:["WMS"]})],we.prototype,"operationalLayerType",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"resourceInfo",void 0),(0,n._)([(0,f.Cb)({type:I.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],we.prototype,"spatialReference",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],we.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,n._)([(0,f.Cb)({type:[g.z8],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],we.prototype,"spatialReferences",void 0),(0,n._)([(0,w.c)(["web-document","portal-item"],"spatialReferences")],we.prototype,"writeSpatialReferences",null),(0,n._)([(0,f.Cb)({type:a.Z.ofType(V),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,_.d)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],we.prototype,"sublayers",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],we.prototype,"readSublayersFromItemOrMap",null),(0,n._)([(0,b.r)("service","sublayers",["layers"])],we.prototype,"readSublayers",null),(0,n._)([(0,w.c)("sublayers",{layers:{type:[V]},visibleLayers:{type:[String]}})],we.prototype,"writeSublayers",null),(0,n._)([(0,f.Cb)({json:{read:!1},readOnly:!0,value:"wms"})],we.prototype,"type",void 0),(0,n._)([(0,f.Cb)(L.HQ)],we.prototype,"url",null),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"version",void 0),we=(0,n._)([(0,v.j)("esri.layers.WMSLayer")],we);const xe=we},16859:(e,t,r)=>{r.d(t,{I:()=>x});var n=r(43697),i=r(68773),s=r(40330),l=r(3172),o=r(66643),a=r(20102),u=r(92604),p=r(70586),c=r(95330),d=r(17452),m=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),y=r(52011),f=r(30556),g=r(84230),b=r(48522),v=r(15235),w=r(86082),_=r(14661);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.SC)(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 v.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(8062).then(r.bind(r,18062));return(0,c.k_)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||u.Z.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,c.r9)(e),!0))))}async setUserPrivileges(e,t){if(!i.default.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,c.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=e===r.id;if(n&&r.portal.user)return(0,_.Ss)(r);let i,l;if(n)i=r.portal.url;else try{i=await(0,g.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!i||!(0,d.Zo)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(s.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!l)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(n?await r.reload():(r=new v.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return(0,_.Ss)(r)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(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=b.Z.getDefault();if(i&&i.loaded&&(0,d.Fv)(i.restUrl)===(0,d.Fv)(n))return i.user;const a=`${n}/community/self`,u=null!=e?e.signal:null,p=await(0,o.q6)((0,l.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?w.Z.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||b.Z.getDefault());return r&&n&&!(0,d.tm)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("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.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,n._)([(0,h.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,n._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,n._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,n._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,n._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,n._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,n._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>v});var n=r(43697),i=r(92604),s=r(95330),l=r(5600),o=r(90578),a=(r(67676),r(80442),r(52011)),u=r(82960),p=r(46791),c=(r(66643),r(20102),r(26258),r(87538));const d=new p.Z,m=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&d.push(new WeakRef(e))}function y(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:y(t,e%t):0}let f=0,g=0;function b(){const e=Date.now();let t=!1;for(const r of d){const n=r.deref();n?n.refreshInterval&&e-(m.get(n)??0)+5>=6e4*n.refreshInterval&&(m.set(n,e),n.refresh(e)):t=!0}if(t)for(let e=d.length-1;e>=0;e--)d.at(e).deref()||d.removeAt(e)}(0,c.EH)((()=>{const e=Date.now();let t=0;for(const r of d){const n=r.deref();n&&(t=y(Math.round(6e4*n.refreshInterval),t),n.refreshInterval?m.get(n)||m.set(n,e):m.delete(n))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(b,g)}}));const v=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=d.find((t=>t.deref()===e));t&&d.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,s.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,n._)([(0,l.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,o.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,n._)([(0,l.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,l.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,n._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>d});var n=r(43697),i=r(92835),s=r(84552),l=r(5600),o=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(69165),p=r(76259),c=r(78981);const d=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=c.v.fromJSON(r.timeOffsetUnits);return n&&i?new s.Z({value:n,unit:i}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n._)([(0,l.Cb)({type:i.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,n._)([(0,l.Cb)({type:s.Z})],t.prototype,"timeOffset",void 0),(0,n._)([(0,o.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,n._)([(0,l.Cb)({value:null,type:p.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,n._)([(0,l.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,n._)([(0,a.j)("esri.layers.mixins.TemporalLayer")],t),t}},52162:(e,t,r)=>{r.d(t,{A:()=>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))}},76259:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(43697),i=r(92835),s=r(84552),l=r(2368),o=r(96674),a=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),p=r(52011),c=r(30556),d=r(25031);function m(e,t){return s.Z.fromJSON({value:e,unit:t})}let h=class extends((0,l.J)(o.wq)){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}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),n=new Date(t.timeExtent[1]);return new i.Z({start:r,end:n})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]: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,a.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,n._)([(0,a.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,n._)([(0,a.Cb)({type:i.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,n._)([(0,u.r)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,n._)([(0,c.c)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,n._)([(0,a.Cb)({type:s.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,n._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,n._)([(0,c.c)("interval")],h.prototype,"writeInterval",null),(0,n._)([(0,a.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,n._)([(0,a.Cb)((0,d.mi)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,n._)([(0,p.j)("esri.layers.support.TimeInfo")],h);const y=h},90082:(e,t,r)=>{r.d(t,{V:()=>l,g:()=>s});var n=r(20102),i=r(95330);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new n.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,i.k_)(r),s}async function l(e,t,r,s,l){let o;try{o=await createImageBitmap(e)}catch(e){throw new n.Z("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,i.k_)(l),o}},78981:(e,t,r)=>{r.d(t,{v:()=>n});const n=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},31134:(e,t,r)=>{r.d(t,{Z:()=>d});var n,i=r(43697),s=r(96674),l=r(62357),o=r(5600),a=r(90578),u=(r(67676),r(80442),r(52011)),p=r(61565);let c=n=class extends s.wq{constructor(e){super(e),this.decoration="none",this.family="sans-serif",this.size=9,this.style="normal",this.weight="normal"}castSize(e){return(0,l.t_)(e)}clone(){return new n({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}hash(){return`${this.decoration}.${this.family}.${this.size}.${this.style}.${this.weight}`}};(0,i._)([(0,o.Cb)({type:p.JT,json:{default:"none",write:!0}})],c.prototype,"decoration",void 0),(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"family",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy:(e,t,r)=>({enabled:!r||!r.textSymbol3D})}}})],c.prototype,"size",void 0),(0,i._)([(0,a.p)("size")],c.prototype,"castSize",null),(0,i._)([(0,o.Cb)({type:p.g6,json:{default:"normal",write:!0}})],c.prototype,"style",void 0),(0,i._)([(0,o.Cb)({type:p.vC,json:{default:"normal",write:!0}})],c.prototype,"weight",void 0),c=n=(0,i._)([(0,u.j)("esri.symbols.Font")],c);const d=c},61565:(e,t,r)=>{r.d(t,{Ck:()=>a,JT:()=>s,Nj:()=>p,c9:()=>c,g6:()=>l,vC:()=>o,x0:()=>u});var n=r(22021),i=r(75215);const s=["none","underline","line-through"],l=["normal","italic","oblique"],o=["normal","lighter","bold","bolder"],a={type:Number,cast:e=>{const t=(0,i.q9)(e);return 0===t?1:(0,n.uZ)(t,.1,4)},nonNullable:!0},u={type:["left","right","center"],nonNullable:!0},p={type:["baseline","top","middle","bottom"],nonNullable:!0},c=8}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[664],{25929:(e,t,s)=>{s.d(t,{M:()=>f,a:()=>g,e:()=>c,f:()=>n,i:()=>h,p:()=>d,r:()=>o,t:()=>r,w:()=>a});var i=s(17452);function n(e,t){const s=t?.url?.path;if(e&&s&&(e=(0,i.hF)(e,s,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const s=(0,i.PF)(e,t.portalItem.itemUrl);null!=s&&u.test(s)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(s).path)}return p(e,t?.portal)}function r(e,t,s=f.YES){if(null==e)return e;!(0,i.YP)(e)&&t?.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let n=(0,i.hF)(e);if(t){const s=t.verifyItemRelativeUrls?.rootPath||t.url?.path;if(s){const r=p(s,t.portal),o=p(n,t.portal);n=(0,i.PF)(o,r,r),null!=n&&n!==o&&n!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(n)}}return n=c(n,t?.portal),(0,i.YP)(n)&&(n=(0,i.Fv)(n)),t?.resources&&t?.portalItem&&!(0,i.YP)(n)&&!(0,i.HK)(n)&&s===f.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(n),compress:!1}),n}function o(e,t,s){return n(e,s)}function a(e,t,s,i){const n=r(e,i);void 0!==n&&(t[s]=n)}const l=/\/items\/([^\/]+)\/resources\/(.*)/,u=/^\.\/resources\//;function h(e){const t=e?.match(l)??null;return t?.[1]??null}function d(e){const t=e?.match(l)??null;if(null==t)return null;const s=t[2],n=s.lastIndexOf("/");if(-1===n){const{path:e,extension:t}=(0,i.fZ)(s);return{prefix:null,filename:e,extension:t}}const{path:r,extension:o}=(0,i.fZ)(s.slice(n+1));return{prefix:s.slice(0,n),filename:r,extension:o}}function c(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,i.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function p(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const s=`${t.urlKey}.${t.customBaseUrl}`,n=(0,i.TI)();return(0,i.D6)(n,`${n.scheme}://${s}`)?(0,i.Ie)(e,t.portalHostname,s):(0,i.Ie)(e,s,t.portalHostname)}var f,_;(_=f||(f={}))[_.YES=0]="YES",_[_.NO=1]="NO";const g=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return f},ensureMainOnlineDomain:c,fromJSON:n,itemIdFromResourceUrl:h,prefixAndFilenameFromResourceUrl:d,read:o,toJSON:r,write:a},Symbol.toStringTag,{value:"Module"}))},91303:(e,t,s)=>{var i;s.d(t,{Y:()=>i}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(i||(i={}))},24133:(e,t,s)=>{s.d(t,{Q:()=>o});var i=s(67676),n=s(44553),r=s(88764);class o{constructor(e=9,t){this._compareMinX=h,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),v.prune(),b.prune(),I.prune(),C.prune()}all(e){this._all(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(m(e,s))for(v.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;m(e,o)&&(s.leaf?t(r):g(e,o)?this._all(r,t):v.push(r))}s=v.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!m(e,t))return!1;for(v.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(m(e,r)){if(t.leaf||g(e,r))return!0;v.push(n)}}t=v.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new w([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(I.clear(),C.clear();s||I.length>0;){if(s||(s=I.pop(),n=I.data[I.length-1],r=C.pop()??0,o=!0),s.leaf&&(t=(0,i.cq)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),I.push(s),this._condense(I),this;o||s.leaf||!g(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(I.push(s),C.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let s=e;for(b.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else b.pushArray(s.children);s=b.pop()??null}}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new w(e.slice(t,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new F([]);o.height=i;const l=Math.ceil(n/r),u=l*Math.ceil(Math.sqrt(r));y(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);y(e,n,t,l,this._compareMinY);for(let s=n;s<=t;s+=l){const n=Math.min(s+l-1,t);o.children.push(this._build(e,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=c(o),l=f(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);I.clear();const r=this._chooseSubtree(n,this._data,t,I);for(r.children.push(e),u(r,n);t>=0&&I.data[t].children.length>this._maxEntries;)this._split(I,t),t--;this._adjustParentBBoxes(n,I,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),l=s.leaf?new w(o):new F(o);l.height=s.height,a(s,this._toBBox),a(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(s,l)}_splitRoot(e,t){this._data=new F([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=l(e,0,o,this._toBBox),a=l(e,o,s,this._toBBox),u=_(t,a),h=c(t)+c(a);u<i?(i=u,r=o,n=h<n?h:n):u===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:h,n=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=l(e,0,t,n),o=l(e,s-t,s,n);let a=p(r)+p(o);for(let i=t;i<s-t;i++){const t=e.children[i];u(r,e.leaf?n(t):t),a+=p(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?n(t):t),a+=p(o)}return a}_adjustParentBBoxes(e,t,s){for(let i=s;i>=0;i--)u(t.data[i],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.cq)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){l(e,0,e.children.length,t,e)}function l(e,t,s,i,n){n||(n=new w([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],u(n,e.leaf?i(r):r);return n}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function _(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function m(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function y(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const v=new n.Z,b=new n.Z,I=new n.Z,C=new n.Z({deallocator:void 0});class E{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class x extends E{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class w extends x{constructor(e){super(),this.children=e,this.leaf=!0}}class F extends x{constructor(e){super(),this.children=e,this.leaf=!1}}},19402:(e,t,s)=>{s.d(t,{R:()=>h});var i=s(43697),n=s(92036),r=s(50758),o=s(17445),a=s(1654),l=s(5600),u=s(52011);let h=class extends n.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll()}add(e,t,s={}){return this._installWatch(e,t,s,o.YP)}addWhen(e,t,s={}){return this._installWatch(e,t,s,o.gx)}addOnCollectionChange(e,t,{initial:s=!1,final:i=!1}={}){const n=++this._handleId;return this.addHandles([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.Z_),(0,o.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],n),(0,r.kB)((()=>this.removeHandles(n)))}addPromise(e){if(null==e)return e;const t=++this._handleId;this.addHandles((0,r.kB)((()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this.hasHandles(d)||this._set("updating",!1))})),t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this.removeHandles(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this.removeAllHandles(),this._set("updating",!1)}_installWatch(e,t,s={},i){const n=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,n);const o=i(e,t,s);return this.addHandles(o,n),(0,r.kB)((()=>this.removeHandles(n)))}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),i=(0,o.YP)(e,s,{sync:!0,equals:()=>!1});return this.addHandles(i,t),i}_createSyncUpdatingCallback(){return()=>{this.removeHandles(d),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this.addHandles((0,a.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this.removeHandles(d))})),d)}}};(0,i._)([(0,l.Cb)({readOnly:!0})],h.prototype,"updating",void 0),h=(0,i._)([(0,u.j)("esri.core.support.UpdatingHandles")],h);const d=-42},37549:(e,t,s)=>{s.d(t,{H:()=>a});var i=s(80442),n=s(24133),r=s(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,i.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.cS)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},28972:(e,t,s)=>{s.d(t,{Z:()=>x});var i=s(67676),n=s(20102),r=s(32448),o=s(92604),a=s(60437),l=s(24470),u=s(98732),h=s(37549),d=s(42712);function c(e,t){return e?t?4:3:t?3:2}function p(e,t,s,i,n){if(!t?.lengths.length)return null;const r="upperLeft"===n?.originPosition?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const o=e.coords,a=[],l=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:u,coords:h}=t,d=c(s,i);let p=0;for(const e of u){const t=f(l,h,p,e,s,i,r);t&&a.push(t),p+=e*d}if(a.sort(((e,t)=>{let i=r*e[2]-r*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),a.length){let e=6*a[0][2];o[0]=a[0][0]/e,o[1]=a[0][1]/e,s&&(e=6*a[0][4],o[2]=0!==e?a[0][3]/e:0),(o[0]<l[0]||o[0]>l[1]||o[1]<l[2]||o[1]>l[3]||s&&(o[2]<l[4]||o[2]>l[5]))&&(o.length=0)}if(!o.length){const e=t.lengths[0]?_(h,0,u[0],s,i):null;if(!e)return null;o[0]=e[0],o[1]=e[1],s&&e.length>2&&(o[2]=e[2])}return e}function f(e,t,s,i,n,r,o=1){const a=c(n,r);let l=s,u=s+a,h=0,d=0,p=0,f=0,_=0;for(let s=0,r=i-1;s<r;s++,l+=a,u+=a){const s=t[l],i=t[l+1],r=t[l+2],o=t[u],a=t[u+1],c=t[u+2];let g=s*a-o*i;f+=g,h+=(s+o)*g,d+=(i+a)*g,n&&(g=s*c-o*r,p+=(r+c)*g,_+=g),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(f*o>0&&(f*=-1),_*o>0&&(_*=-1),!f)return null;const g=[h,d,.5*f];return n&&(g[3]=p,g[4]=.5*_),g}function _(e,t,s,i,n){const r=c(i,n);let o=t,a=t+r,l=0,u=0,h=0,d=0;for(let t=0,n=s-1;t<n;t++,o+=r,a+=r){const t=e[o],s=e[o+1],n=e[o+2],r=e[a],c=e[a+1],p=e[a+2],f=i?m(t,s,n,r,c,p):g(t,s,r,c);if(f)if(l+=f,i){const e=v(t,s,n,r,c,p);u+=f*e[0],h+=f*e[1],d+=f*e[2]}else{const e=y(t,s,r,c);u+=f*e[0],h+=f*e[1]}}return l>0?i?[u/l,h/l,d/l]:[u/l,h/l]:s>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function g(e,t,s,i){const n=s-e,r=i-t;return Math.sqrt(n*n+r*r)}function m(e,t,s,i,n,r){const o=i-e,a=n-t,l=r-s;return Math.sqrt(o*o+a*a+l*l)}function y(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function v(e,t,s,i,n,r){return[e+.5*(i-e),t+.5*(n-t),s+.5*(r-s)]}var b=s(70272),I=s(5428);const C={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new b.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=p(new I.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)},E=(0,a.Ue)();class x{constructor(e){this.geometryInfo=e,this._boundsStore=new h.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.Z,this.featureAdapter=C}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,d.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.pC)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.JR)(E,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(this._markedIds.add(t),s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.$)(null!=i?i:(0,l.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.Z("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,u.$)((0,l.Ue)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},1231:(e,t,s)=>{s.d(t,{Z:()=>g});var i,n=s(43697),r=s(35454),o=s(96674),a=s(5600),l=s(75215),u=(s(67676),s(80442),s(36030)),h=s(71715),d=s(52011),c=s(72729),p=s(86719);const f=new r.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let _=i=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?.value??null}readValueType(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?f.fromJSON(s.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],_.prototype,"alias",void 0),(0,n._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],_.prototype,"defaultValue",void 0),(0,n._)([(0,a.Cb)()],_.prototype,"description",void 0),(0,n._)([(0,h.r)("description")],_.prototype,"readDescription",null),(0,n._)([(0,a.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],_.prototype,"domain",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],_.prototype,"editable",void 0),(0,n._)([(0,a.Cb)({type:l.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],_.prototype,"length",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],_.prototype,"name",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],_.prototype,"nullable",void 0),(0,n._)([(0,u.J)(p.v)],_.prototype,"type",void 0),(0,n._)([(0,a.Cb)()],_.prototype,"valueType",void 0),(0,n._)([(0,h.r)("valueType",["description"])],_.prototype,"readValueType",null),(0,n._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],_.prototype,"visible",void 0),_=i=(0,n._)([(0,d.j)("esri.layers.support.Field")],_);const g=_},39450:(e,t,s)=>{s.d(t,{Z:()=>h});var i,n=s(43697),r=s(96674),o=s(5600),a=s(75215),l=(s(67676),s(80442),s(52011));let u=i=class extends r.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,n._)([(0,o.Cb)({type:a.z8,json:{write:!0}})],u.prototype,"level",void 0),(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=i=(0,n._)([(0,l.j)("esri.layers.support.LOD")],u);const h=u},11145:(e,t,s)=>{s.d(t,{Z:()=>x});var i,n=s(43697),r=s(35454),o=s(96674),a=s(67900),l=s(5600),u=s(75215),h=(s(67676),s(80442),s(71715)),d=s(52011),c=s(30556),p=s(94139),f=s(82971),_=s(24470),g=s(8744),m=s(40488),y=s(39450),v=s(43077);const b=new r.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let I=i=class extends o.wq{static create(e={}){const{resolutionFactor:t=1,scales:s,size:n=256,spatialReference:r=f.Z.WebMercator,numLODs:o=24}=e;if(!(0,g.JY)(r)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new y.Z({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=o-1;s>=0;s--)e.unshift(new y.Z({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new p.Z(0,0,r),size:[n,n],spatialReference:r})}const l=(0,g.C5)(r),u=e.origin?new p.Z({x:e.origin.x,y:e.origin.y,spatialReference:r}):new p.Z(l?{x:l.origin[0],y:l.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),h=1/(39.37*(0,a.c9)(r)*96),d=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*h;d.push(new y.Z({level:e,scale:t,resolution:i}))}else{let e=(0,g.sT)(r)?512/n*591657527.5917094:256/n*591657527.591555;const s=Math.ceil(o/t);d.push(new y.Z({level:0,scale:e,resolution:e*h}));for(let i=1;i<s;i++){const s=e/2**t,n=s*h;d.push(new y.Z({level:i,scale:s,resolution:n})),e=s}}return new i({dpi:96,lods:d,origin:u,size:[n,n],spatialReference:r})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,g.C5)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return p.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],n=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach((e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,n[e.level]=e}))),this._set("scales",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],n=t[i+1];if(s<=e)return i;if(n===e)return i+1;if(s>e&&n<e)return i+Math.log(s/e)/Math.log(s/n)}return i}snapScale(e,t=.95){const s=this.scaleToZoom(e);return s%Math.floor(s)>=t?this.zoomToScale(Math.ceil(s)):this.zoomToScale(Math.floor(s))}tileAt(e,t,s,i){const n=this.lodAt(e);if(!n)return null;let r,o;if("number"==typeof t)r=t,o=s;else if((0,g.fS)(t.spatialReference,this.spatialReference))r=t.x,o=t.y,i=s;else{const e=(0,m.iV)(t,this.spatialReference);if(null==e)return null;r=e.x,o=e.y,i=s}const a=n.resolution*this.size[0],l=n.resolution*this.size[1];return i||(i=new v.f(null,0,0,0,(0,_.Ue)())),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((r-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=i.ExtrapolateOptions.NONE){let s=this.lodAt(e.level);if(!s&&t===i.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return;const n=e.level-s.level,r=s.resolution*this.size[0]/2**n,o=s.resolution*this.size[1]/2**n;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,_.Ue)()),e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,n=i*this.size[0],r=i*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+n,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const s=[],n=this.lods.length;for(let e=0;e<n;e++){const i=this.lods[e],n=i.resolution*t;s.push(new y.Z({level:i.level,scale:i.scale,resolution:n}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};var C,E;(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],I.prototype,"compressionQuality",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],I.prototype,"dpi",void 0),(0,n._)([(0,l.Cb)({type:String,json:{read:b.read,write:b.write,origins:{"web-scene":{read:!1,write:!1}}}})],I.prototype,"format",void 0),(0,n._)([(0,l.Cb)({readOnly:!0})],I.prototype,"isWrappable",null),(0,n._)([(0,l.Cb)({type:p.Z,json:{write:!0}})],I.prototype,"origin",void 0),(0,n._)([(0,h.r)("origin")],I.prototype,"readOrigin",null),(0,n._)([(0,l.Cb)({type:[y.Z],value:null,json:{write:!0}})],I.prototype,"lods",null),(0,n._)([(0,l.Cb)({readOnly:!0})],I.prototype,"scales",void 0),(0,n._)([(0,l.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],I.prototype,"size",void 0),(0,n._)([(0,h.r)("size",["rows","cols"])],I.prototype,"readSize",null),(0,n._)([(0,c.c)("size",{cols:{type:u.z8},rows:{type:u.z8}})],I.prototype,"writeSize",null),(0,n._)([(0,l.Cb)({type:f.Z,json:{write:!0}})],I.prototype,"spatialReference",void 0),I=i=(0,n._)([(0,d.j)("esri.layers.support.TileInfo")],I),C=I||(I={}),(E=C.ExtrapolateOptions||(C.ExtrapolateOptions={}))[E.NONE=0]="NONE",E[E.POWER_OF_TWO=1]="POWER_OF_TWO";const x=I},43077:(e,t,s)=>{s.d(t,{f:()=>i});class i{constructor(e,t,s,i,n=void 0){this.id=e,this.level=t,this.row=s,this.col=i,this.extent=n}}},66677:(e,t,s)=>{s.d(t,{B5:()=>h,DR:()=>c,G:()=>v,M8:()=>_,Nm:()=>g,Qc:()=>d,XG:()=>m,a7:()=>f,ld:()=>p,wH:()=>y});var i=s(17452),n=s(25929);const r={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(r),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function h(e){return!!a.test(e)}function d(e){if(null==e)return null;const t=(0,i.mN)(e),s=t?.path.match(a)||t?.path.match(l);if(!s)return null;const[,n,o,u,h]=s,d=o.indexOf("/");return{title:p(-1!==d?o.slice(d+1):o),serverType:r[u.toLowerCase()],sublayer:null!=h&&""!==h?parseInt(h,10):null,url:{path:n}}}function c(e){const t=(0,i.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function p(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function f(e,t){const s=[];if(e){const t=d(e);null!=t&&t.title&&s.push(t.title)}if(t){const e=p(t);s.push(e)}if(2===s.length){if(s[0].toLowerCase().includes(s[1].toLowerCase()))return s[0];if(s[1].toLowerCase().includes(s[0].toLowerCase()))return s[1]}return s.join(" - ")}function _(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),s=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&s}function g(e,t){return e?(0,i.Qj)((0,i.Hu)(e,t)):e}function m(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.Hu)(t,e.logger);const s=(0,i.mN)(t),n=d(s.path);let r;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(r=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=c(s.path);null!=e&&(t=e.serviceUrl,r=e.sublayerId)}return{url:(0,i.Qj)(t),layerId:r}}function y(e,t,s,r,o){(0,n.w)(t,r,"url",o),r.url&&null!=e.layerId&&(r.url=(0,i.v_)(r.url,s,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),s=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),r=t.includes("/wmsserver");return s&&(i||n||r)}},72729:(e,t,s)=>{s.d(t,{im:()=>x,V5:()=>E}),s(80442);var i,n=s(43697),r=s(22974),o=s(5600),a=(s(75215),s(36030)),l=s(52011),u=s(96674);s(67676);let h=i=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,n._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],h.prototype,"code",void 0),h=i=(0,n._)([(0,l.j)("esri.layers.support.CodedValue")],h);const d=new(s(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,a.J)(d)],c.prototype,"type",void 0),c=(0,n._)([(0,l.j)("esri.layers.support.Domain")],c);const p=c;var f;let _=f=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some((e=>(String(e.code)===s&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,r.d9)(this.codedValues),name:this.name})}};(0,n._)([(0,o.Cb)({type:[h],json:{write:!0}})],_.prototype,"codedValues",void 0),(0,n._)([(0,a.J)({codedValue:"coded-value"})],_.prototype,"type",void 0),_=f=(0,n._)([(0,l.j)("esri.layers.support.CodedValueDomain")],_);const g=_;var m;s(92604),s(20102);let y=m=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new m}};(0,n._)([(0,a.J)({inherited:"inherited"})],y.prototype,"type",void 0),y=m=(0,n._)([(0,l.j)("esri.layers.support.InheritedDomain")],y);const v=y;var b;let I=b=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new b({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]}}}})],I.prototype,"maxValue",void 0),(0,n._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]}}}})],I.prototype,"minValue",void 0),(0,n._)([(0,a.J)({range:"range"})],I.prototype,"type",void 0),I=b=(0,n._)([(0,l.j)("esri.layers.support.RangeDomain")],I);const C=I,E={key:"type",base:p,typeMap:{range:I,"coded-value":g,inherited:v}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return C.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},99282:(e,t,s)=>{s.d(t,{a:()=>r});var i=s(67900),n=s(68441);const r={unknown:1,inches:(0,i.En)(1,"meters","inches"),feet:(0,i.En)(1,"meters","feet"),"us-feet":(0,i.En)(1,"meters","us-feet"),yards:(0,i.En)(1,"meters","yards"),miles:(0,i.En)(1,"meters","miles"),"nautical-miles":(0,i.En)(1,"meters","nautical-miles"),millimeters:(0,i.En)(1,"meters","millimeters"),centimeters:(0,i.En)(1,"meters","centimeters"),decimeters:(0,i.En)(1,"meters","decimeters"),meters:(0,i.En)(1,"meters","meters"),kilometers:(0,i.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.ty)(1,"meters",n.sv.radius)}},28694:(e,t,s)=>{s.d(t,{p:()=>n});var i=s(69285);function n(e,t,s){if(!s?.features||!s.hasZ)return;const n=(0,i.k)(s.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of s.features)n(e.geometry)}},86787:(e,t,s)=>{s.d(t,{Z:()=>b});var i,n=s(43697),r=s(35454),o=s(96674),a=s(70586),l=s(5600),u=(s(75215),s(67676),s(80442),s(71715)),h=s(52011),d=s(30556),c=s(69165);let p=i=class extends o.wq{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,c.io)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"expression",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=(0,n._)([(0,h.j)("esri.layers.support.FeatureExpressionInfo")],p);const f=p;var _,g=s(12541);const m=(0,r.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new r.X({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let v=_=class extends o.wq{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new _({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a._W)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,n._)([(0,l.Cb)({type:f,json:{write:!0}})],v.prototype,"featureExpressionInfo",void 0),(0,n._)([(0,u.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],v.prototype,"readFeatureExpressionInfo",null),(0,n._)([(0,d.c)("featureExpressionInfo",{featureExpressionInfo:{type:f},"featureExpression.value":{type:[0]}})],v.prototype,"writeFeatureExpressionInfo",null),(0,n._)([(0,l.Cb)({type:m.apiValues,nonNullable:!0,json:{type:m.jsonValues,read:m.read,write:{writer:m.write,isRequired:!0}}})],v.prototype,"mode",null),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],v.prototype,"offset",void 0),(0,n._)([(0,l.Cb)({type:g.f9,json:{type:String,read:y.read,write:y.write}})],v.prototype,"unit",null),v=_=(0,n._)([(0,h.j)("esri.layers.support.ElevationInfo")],v);const b=v},12541:(e,t,s)=>{s.d(t,{Z7:()=>n,f9:()=>r});var i=s(99282);function n(e){return 1/(i.a[e]||1)}const r=function(){const e=Object.keys(i.a);return e.sort(),e}()},65967:(e,t,s)=>{s.r(t),s.d(t,{default:()=>Ie});var i=s(43697),n=(s(66577),s(32448)),r=s(95330),o=s(17445),a=s(5600),l=(s(75215),s(67676)),u=(s(80442),s(52011)),h=s(19402),d=s(82971),c=s(28972),p=s(3489),f=s(11145),_=s(14165),g=s(86787),m=s(13867),y=s(30175),v=s(67900),b=s(12541);function I(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new E(e,s)}return new C}class C{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}class E{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new m.z(1024),this._cacheVersion=0}async alignCandidates(e,t,s){const i=this._elevationInfo;return null==i||"absolute-height"!==i.mode||i.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(this._alignAbsoluteElevationCandidates(e,t,i),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}_alignAbsoluteElevationCandidates(e,t,s){const{offset:i,unit:n}=s;if(null==i)return;const r=(0,v._R)(t),o=i*((0,b.Z7)(n??"meters")/r);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o;continue;case"vertex":t.target.z+=o;continue}}async _alignComputedElevationCandidates(e,t,s){const i=new Map;for(const t of e)(0,y.s1)(i,t.objectId,F).push(t);const[n,o,a]=this._prepareQuery(i,t),l=await this._alignPointsInFeatures(n,s);if((0,r.k_)(s),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,s);this._applyCacheAndResponse(n,l,o);const{drapedObjectIds:u,failedObjectIds:h}=l,d=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||d.push(t)}return d}_prepareQuery(e,t){const s=[],i=[];for(const[t,n]of e){const e=[];for(const s of n)this._addToQueriesOrCachedResult(t,s.target,e,i),"edge"===s.type&&(this._addToQueriesOrCachedResult(t,s.start,e,i),this._addToQueriesOrCachedResult(t,s.end,e,i));0!==e.length&&s.push({objectId:t,points:e})}return[{spatialReference:t,pointsInFeatures:s},i,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const n=w(e,t),r=this._alignmentsCache.get(n);null==r?s.push(t):i.push(new x(t,r))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},n){for(const e of n)e.apply();let r=0;const o=this._alignmentsCache;for(const{objectId:n,points:a}of e.pointsInFeatures){if(i.has(n)){r+=a.length;continue}const e=!s.has(n);for(const s of a){const i=w(n,s),a=t[r++];s.z=a,e&&o.put(i,a,1)}}}}class x{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function w(e,{x:t,y:s,z:i,spatialReference:n}){return`${e}-${t}-${s}-${i??0}}-wkid:${n?.wkid}`}function F(){return[]}class S{filter(e,t){return t}notifyElevationSourceChange(){}}class T{filter(e,t){const{point:s,distance:i}=e,{z:n}=s;if(null==n)return t;if(0===t.length)return t;const r=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,r).filter(O);return o.sort(N),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":R(i,t,s);continue;case"vertex":M(i,t,s);continue}return e}}function O(e){return e.distance<=1}function B(e=!1){return e?new T:new S}function R(e,t,{x:s,y:i,z:n}){const{start:r,end:o,target:a}=e;e.draped||function(e,t,s,i){const n=i.x-s.x,r=i.y-s.y,o=i.z-s.z,a=n*n+r*r+o*o,l=(t.x-s.x)*n+(t.y-s.y)*r+o*(t.z-s.z),u=Math.min(1,Math.max(0,l/a)),h=s.x+n*u,d=s.y+r*u,c=s.z+o*u;e.x=h,e.y=d,e.z=c}(a,t,r,o);const l=(t.x-a.x)/s,u=(t.y-a.y)/i,h=(t.z-a.z)/n;e.distance=Math.sqrt(l*l+u*u+h*h)}function M(e,t,{x:s,y:i,z:n}){const{target:r}=e,o=(t.x-r.x)/s,a=(t.y-r.y)/i,l=(t.z-r.z)/n,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function N(e,t){return e.distance-t.distance}var A=s(22974),P=s(19153);function j(e=!1,t){return e?new z(t):new H}class H{async fetch(){return[]}notifySymbologyChange(){}}class z{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new m.z(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],n=this._candidatesCache;for(const t of e){const e=k(t),r=n.get(e);if(r)for(const e of r)i.push((0,A.d9)(e));else s.push(t),n.put(e,[],1)}if(0===s.length)return i;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,r.k_)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],i=k(s[l[e]]),r=n.get(i);r.push(t),n.put(i,r,r.length),u.push((0,A.d9)(t))}return i.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function k(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,P.hP)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,n=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,P.hP)(n).toString()}default:return""}}var D=s(92036);let V=class extends D.Z{constructor(){super(...arguments),this.updating=!1,this._pending=[]}push(e,t){this._pending.push({promise:e,callback:t}),1===this._pending.length&&this._process()}_process(){if(!this._pending.length)return void(this.updating=!1);this.updating=!0;const e=this._pending[0];e.promise.then((t=>e.callback(t))).catch((()=>{})).then((()=>{this._pending.shift(),this._process()}))}};(0,i._)([(0,a.Cb)()],V.prototype,"updating",void 0),V=(0,i._)([(0,u.j)("esri.core.AsyncSequence")],V);var U,Z=s(66643),Y=s(50758),q=s(92604),X=s(75517),L=s(6570),G=s(24470),J=s(98732),$=s(66677),W=s(78760),Q=s(34599);class K{constructor(e,t){this.data=e,this.resolution=t,this.state={type:U.CREATED},this.alive=!0}process(e){switch(this.state.type){case U.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case U.FETCH_COUNT:break;case U.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case U.FETCH_FEATURES:break;case U.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case U.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case U.CREATED:case U.FETCH_COUNT:return 0;case U.FETCHED_COUNT:return this.state.featureCount;case U.FETCH_FEATURES:return this.state.previous.featureCount;case U.FETCHED_FEATURES:return this.state.features.length;case U.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case U.CREATED:return"created";case U.FETCH_COUNT:return"fetch-count";case U.FETCHED_COUNT:return"fetched-count";case U.FETCH_FEATURES:return"fetch-features";case U.FETCHED_FEATURES:return"fetched-features";case U.DONE:return"done"}}_gotoFetchCount(e,t){return{type:U.FETCH_COUNT,previous:e,task:(0,Z.vr)((async e=>{const s=await(0,Z.mt)(t.fetchCount(this,e));this.state.type===U.FETCH_COUNT&&(this.state=this._gotoFetchedCount(this.state,s.ok?s.value:1/0))}))}}_gotoFetchedCount(e,t){return{type:U.FETCHED_COUNT,featureCount:t,previous:e}}_gotoFetchFeatures(e,t){return{type:U.FETCH_FEATURES,previous:e,task:(0,Z.vr)((async s=>{const i=await(0,Z.mt)(t.fetchFeatures(this,e.featureCount,s));this.state.type===U.FETCH_FEATURES&&(this.state=this._gotoFetchedFeatures(this.state,i.ok?i.value:[]))}))}}_gotoFetchedFeatures(e,t){return{type:U.FETCHED_FEATURES,previous:e,features:t}}_goToDone(e,t){return t.finish(this,e.features),{type:U.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:U.CREATED},e.type){case U.CREATED:case U.FETCHED_COUNT:case U.FETCHED_FEATURES:case U.DONE:break;case U.FETCH_COUNT:case U.FETCH_FEATURES:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,G.oJ)(e,ee),(0,G.kK)(this.data.extent,ee))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(U||(U={}));const ee=(0,G.Ue)();let te=class extends D.Z{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),s=(0,X.G0)(e,this._mandatoryOutFields);(0,X.fS)(s,t)||(this._set("outFields",s),(0,X.ik)(s,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingExcludingEdits||this._pendingEdits.updating}get updatingExcludingEdits(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new h.R,this._pendingEdits=new V,this._pendingEditsAbortController=new AbortController}initialize(){this._initializeFetchExtent(),this._updatingHandles.add((()=>this._configuration),(()=>this.refresh())),this._updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,l.fS)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),o.Z_),this.addHandles((0,o.gx)((()=>!this.suspended),(()=>this._process())))}destroy(){this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._pendingEditsAbortController.abort(),this._pendingEditsAbortController=null,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}applyEdits(e){this._pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,e]of this._pendingTiles)e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))};await this._updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),this._pendingEditsAbortController.signal)),this._processPendingTiles()}))}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,$.M8)(this.url))return;const e=(0,Z.vr)((async e=>{try{const t=await(0,Q.Vr)(this.url,new _.Z({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=L.Z.fromJSON(t.data?.extent)}catch(e){(0,r.r9)(e),q.Z.getLogger(this).warn("Failed to fetch data extent",e)}}));this._updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.addHandles((0,Y.kB)((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const[,e]of this._pendingTiles)e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const s=this.tilesOfInterest[t],i=this.store.process(s,((e,t)=>this._verifyTileComplexity(e,t)),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const[,e]of this._pendingTiles)e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const[,t]of this._pendingTiles)this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<ne}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(re/(s*s))<oe}_ensureFetchAllCounts(e){let t=!0;for(const[,s]of this._pendingTiles)s.state.type<U.FETCHED_COUNT&&this._updatingHandles.addPromise(s.process(e)),s.state.type<=U.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new K(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:ie,signal:t})}async _fetchFeatures(e,t,s){let i=0;const n=[];let r=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,s);l&&(i+=a.num),r+=u.length;for(const e of u)n.push(e);if(o=t-r,!l||!h||o<=0)return n}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;if(this.store.featureStore.forEach((n=>{e===n.attributes[t]&&(i=n.objectId??n.attributes[s])})),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,Q.qp)(this.url,e,new W.J({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,J.lM)(i)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,Q.JT)(this.url,e,s,{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,J.h_)(i,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),s=null!=e?.data?this.store.getAttributesForTile(e?.data?.id):null,i=(0,X.G0)((0,X.e5)(this.outFields,s??new Set),this._mandatoryOutFields);return t.outFields=Array.from(i),t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new _.Z({returnZ:this.hasZ,returnM:!1,geometry:null!=this.tileInfo&&null!=e?(0,G.HH)(e.data.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:n,tileMaxRecordCount:r,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?_.Z.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||n)&&r?r:o||se);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/u)),e.num=Math.min(s,e.maxRecordCountFactor*u)):e.num=Math.min(s,u),!0}};(0,i._)([(0,a.Cb)({constructOnly:!0})],te.prototype,"url",void 0),(0,i._)([(0,a.Cb)({constructOnly:!0})],te.prototype,"objectIdField",void 0),(0,i._)([(0,a.Cb)({constructOnly:!0})],te.prototype,"globalIdField",void 0),(0,i._)([(0,a.Cb)({constructOnly:!0})],te.prototype,"capabilities",void 0),(0,i._)([(0,a.Cb)({constructOnly:!0})],te.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,a.Cb)({constructOnly:!0})],te.prototype,"spatialReference",void 0),(0,i._)([(0,a.Cb)({constructOnly:!0})],te.prototype,"store",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],te.prototype,"_minimumVerticesPerFeature",null),(0,i._)([(0,a.Cb)()],te.prototype,"_mandatoryOutFields",null),(0,i._)([(0,a.Cb)()],te.prototype,"outFields",null),(0,i._)([(0,a.Cb)()],te.prototype,"suspended",void 0),(0,i._)([(0,a.Cb)()],te.prototype,"filter",null),(0,i._)([(0,a.Cb)()],te.prototype,"customParameters",null),(0,i._)([(0,a.Cb)({readOnly:!0})],te.prototype,"_configuration",null),(0,i._)([(0,a.Cb)()],te.prototype,"tileInfo",null),(0,i._)([(0,a.Cb)()],te.prototype,"tileSize",null),(0,i._)([(0,a.Cb)()],te.prototype,"tilesOfInterest",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],te.prototype,"updating",null),(0,i._)([(0,a.Cb)({readOnly:!0})],te.prototype,"updatingExcludingEdits",null),(0,i._)([(0,a.Cb)({readOnly:!0})],te.prototype,"availability",void 0),(0,i._)([(0,a.Cb)()],te.prototype,"hasZ",null),te=(0,i._)([(0,u.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],te);const se=2e3,ie=6e5,ne=1e6,re=25,oe=1;var ae=s(43090),le=s(91303),ue=s(37549),he=s(43077);class de{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(null!=t&&(this._byteSize-=t.byteSize),!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[s,i]of this._store){if(this._byteSize<=e)break;this.delete(s),t(i)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let ce=class extends D.Z{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*le.Y.MEGABYTES,this._tileBounds=new ue.H,this._tiles=new de,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,G.Ue)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const s=this.featureStore.upsertMany(t),i=s.map((e=>new Set(Object.keys(e.attributes)))).reduce(((e,t)=>(0,X.jV)(e,t)),new Set(Object.keys(s[0]?.attributes??[])));this._addTileStorage(e,new Set(s.map((e=>e.objectId))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if(null==e)return 0;const t=(0,ae.do)(e.lengths,4);return 32+(0,ae.do)(e.coords,8)+t}(e.geometry)+(0,ae.f2)(e.attributes)}(t)),0)}(s),i),this._tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s,i){const n=e.id;this._tiles.set(n,new pe(e,t,s,i)),this._tileBounds.set(n,e.extent),this._tileFeatureCounts.set(n,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)this._unreferenceFeature(s)===ye.REMOVED&&t.push(s);this.featureStore.removeManyById(t);const s=e.data.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const[,t]of this._tiles){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){const i=(await t(e,s)).features,{hasZ:n,hasM:r}=this.featureStore;for(const e of i){const t=(0,J.$)(this._tmpBoundingRect,e.geometry,n,r);null!=t&&this._tileBounds.forEachInBounds(t,(t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.data.id,s.objectIds.size))}))}}process(e,t=(()=>!0),s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,G.kK)((0,G.oJ)(this.extent,this._tmpBoundingRect),e.extent))return new _e(e);const i=this.getAttributesForTile(e.id);if((0,X.ik)(s,i))return new _e(e);const n=this._createTileTree(e,this.tileInfo);return this._simplify(n,t,null,0,1),this._collectMissingTiles(e,n,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map((({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const n=this._tileFeatureCounts.get(e.id);if(null!=n)return n;const r=await(0,Q.hH)(t,s,i);return this._tileFeatureCounts.set(e.id,r.data.count),r.data.count}_createTileTree(e,t){const s=new fe(e.level,e.row,e.col);return t.updateTileInfo(s,f.Z.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,(i=>{const n=this._tiles.get(i)?.data;n&&this._tilesAreRelated(e,n)&&this._populateChildren(s,n,t,this._tileFeatureCounts.get(n.id)||0)})),s}_tilesAreRelated(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,n=s?t:e,r=1<<n.level-i.level;return Math.floor(n.row/r)===i.row&&Math.floor(n.col/r)===i.col}_populateChildren(e,t,s,i){const n=t.level-e.level-1;if(n<0)return void(e.isLeaf=!0);const r=t.row>>n,o=t.col>>n,a=e.row<<1,l=o-(e.col<<1)+(r-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,s,i);else{const n=new fe(e.level+1,r,o);s.updateTileInfo(n,f.Z.ExtrapolateOptions.POWER_OF_TWO),e.children[l]=n,this._populateChildren(n,t,s,i)}}_simplify(e,t,s,i,n){const r=n*n;if(e.isLeaf)return t(this.getFeatureCount(e),n)?0:(this._remove(e),null!=s&&(s.children[i]=null),r);const o=n/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/r<me&&(this._purge(e),null!=s&&(s.children[i]=null),l=r),l}_mergeChildren(e){const t=new Set;let s,i=0;this._forEachLeaf(e,(e=>{const n=this._tiles.get(e.id);if(n){s=s?(0,X.jV)(s,n.attributeKeys):new Set(n.attributeKeys),i+=n.byteSize;for(const e of n.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,i,s??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const n=new ge(s,e,this.extent);return this._collectMissingTilesRecurse(t,n,1,i),n.info}_collectMissingTilesRecurse(e,t,s,i){const n=this.getAttributesForTile(e.id),r=n&&!(0,X.ik)(i,n);if(r&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,s));const o=s/2;for(let s=0;s<e.children.length;s++){const n=e.children[s];null==n?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),o):this._collectMissingTilesRecurse(n,t,o,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?ye.ADDED:ye.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),ye.REMOVED):(t>0&&this._refCounts.set(e,t),ye.UNCHANGED)}get test(){return{tiles:Array.from(this._tiles.values()).map((e=>`${e.data.id}:[${Array.from(e.objectIds)}]`)),featureReferences:Array.from(this._refCounts.keys()).map((e=>`${e}:${this._refCounts.get(e)}`))}}};(0,i._)([(0,a.Cb)({constructOnly:!0})],ce.prototype,"featureStore",void 0),(0,i._)([(0,a.Cb)()],ce.prototype,"tileInfo",void 0),(0,i._)([(0,a.Cb)()],ce.prototype,"extent",void 0),(0,i._)([(0,a.Cb)()],ce.prototype,"maximumByteSize",void 0),ce=(0,i._)([(0,u.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],ce);class pe{constructor(e,t,s,i){this.data=e,this.objectIds=t,this.byteSize=s,this.attributeKeys=i}}class fe{constructor(e,t,s){this.level=e,this.row=t,this.col=s,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class _e{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,G.SO)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class ge{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new _e(t),null!=s&&(this._extent=(0,G.oJ)(s))}addMissing(e,t,s,i){const n=new he.f(null,e,t,s);this._tileInfo.updateTileInfo(n,f.Z.ExtrapolateOptions.POWER_OF_TWO),null==n.extent||null!=this._extent&&!(0,G.kK)(this._extent,n.extent)||(this.info.missingTiles.push({data:n,resolution:i}),this.info.coveredArea-=(0,G.SO)(n.extent))}}const me=.18751;var ye;!function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.UNCHANGED=2]="UNCHANGED"}(ye||(ye={}));var ve=s(33955);let be=class extends n.Z.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,r.hh)(),this._elevationAligner=I(),this._elevationFilter=B(),this._symbologyCandidatesFetcher=j(),this._updatingHandles=new h.R,this._editsUpdatingHandles=new h.R,this._pendingApplyEdits=new Map,this._alignPointsInFeatures=async(e,t)=>{const s={query:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,r.k_)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,r.k_)(t),i}}get updating(){return this.updatingExcludingEdits||this._editsUpdatingHandles.updating||this._featureFetcher.updating}get updatingExcludingEdits(){return this._featureFetcher.updatingExcludingEdits||this._isInitializing||this._updatingHandles.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fieldsIndex:n}=e.serviceInfo,{hasZ:r}=e,a=d.Z.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new c.Z({...e.serviceInfo,hasZ:r,hasM:!1}),this._queryEngine=new p.q({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:n,hasZ:r,hasM:!1,objectIdField:s,timeInfo:i}),this._featureFetcher=new te({store:new ce({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:d.Z.fromJSON(e.serviceInfo.spatialReference)});const l="3d"===e.configuration.viewType;return this._elevationAligner=I(l,{elevationInfo:null!=e.elevationInfo?g.Z.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=B(l),this.addHandles([(0,o.YP)((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),o.Z_),(0,o.YP)((()=>this.updating),(()=>this._notifyUpdating()))]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),Ce}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.k_)(t),this._featureFetcher.suspended=e,Ce}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.k_)(t),this._featureFetcher.outFields=new Set(e??[]),Ce}async fetchCandidates(e,t){await this._whenSetup.promise,(0,r.k_)(t);const s=function(e){if(!e.filter)return{...e,query:{where:"1=1"}};const{distance:t,units:s,spatialRel:i,where:n,timeExtent:r,objectIds:o}=e.filter,a={geometry:e.filter.geometry?(0,ve.im)(e.filter.geometry):void 0,distance:t,units:s,spatialRel:i,timeExtent:r,objectIds:o,where:n??"1=1"};return{...e,query:a}}(e),i=t?.signal,n=await this._queryEngine.executeQueryForSnapping(s,i);(0,r.k_)(i);const o=await this._elevationAligner.alignCandidates(n.candidates,e.point.spatialReference??d.Z.WGS84,i);(0,r.k_)(i);const a=await this._symbologyCandidatesFetcher.fetch(o,i);(0,r.k_)(i);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.k_)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?f.Z.fromJSON(e.tileInfo):null,Ce}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.k_)(t),this._featureFetcher.refresh(),Ce}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.k_)(t),await(0,o.N1)((()=>!this.updatingExcludingEdits),t),(0,r.k_)(t),Ce}async getDebugInfo(e,t){return(0,r.k_)(t),{result:this._featureFetcher.debugInfo}}async beginApplyEdits(e,t){this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.k_)(t);const s=(0,r.hh)();return this._pendingApplyEdits.set(e.id,s),this._featureFetcher.applyEdits(s.promise),this._editsUpdatingHandles.addPromise(s.promise),Ce}async endApplyEdits(e,t){const s=this._pendingApplyEdits.get(e.id);return s&&s.resolve(e.edits),(0,r.k_)(t),Ce}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),Ce}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),Ce}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=j(e,this._getSymbologyCandidates),Ce}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?_.Z.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i._)([(0,a.Cb)({readOnly:!0})],be.prototype,"updating",null),(0,i._)([(0,a.Cb)({readOnly:!0})],be.prototype,"updatingExcludingEdits",null),(0,i._)([(0,a.Cb)()],be.prototype,"_isInitializing",void 0),be=(0,i._)([(0,u.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],be);const Ie=be,Ce={result:{}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9507],{25929:(e,r,t)=>{t.d(r,{M:()=>d,a:()=>h,e:()=>p,f:()=>s,i:()=>c,p:()=>f,r:()=>o,t:()=>l,w:()=>u});var n=t(17452);function s(e,r){const t=r?.url?.path;if(e&&t&&(e=(0,n.hF)(e,t,{preserveProtocolRelative:!0}),r.portalItem&&r.readResourcePaths)){const t=(0,n.PF)(e,r.portalItem.itemUrl);null!=t&&a.test(t)&&r.readResourcePaths.push(r.portalItem.resourceFromPath(t).path)}return m(e,r?.portal)}function l(e,r,t=d.YES){if(null==e)return e;!(0,n.YP)(e)&&r?.blockedRelativeUrls&&r.blockedRelativeUrls.push(e);let s=(0,n.hF)(e);if(r){const t=r.verifyItemRelativeUrls?.rootPath||r.url?.path;if(t){const l=m(t,r.portal),o=m(s,r.portal);s=(0,n.PF)(o,l,l),null!=s&&s!==o&&s!==e&&r.verifyItemRelativeUrls&&r.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=p(s,r?.portal),(0,n.YP)(s)&&(s=(0,n.Fv)(s)),r?.resources&&r?.portalItem&&!(0,n.YP)(s)&&!(0,n.HK)(s)&&t===d.YES&&r.resources.toKeep.push({resource:r.portalItem.resourceFromPath(s),compress:!1}),s}function o(e,r,t){return s(e,t)}function u(e,r,t,n){const s=l(e,n);void 0!==s&&(r[t]=s)}const i=/\/items\/([^\/]+)\/resources\/(.*)/,a=/^\.\/resources\//;function c(e){const r=e?.match(i)??null;return r?.[1]??null}function f(e){const r=e?.match(i)??null;if(null==r)return null;const t=r[2],s=t.lastIndexOf("/");if(-1===s){const{path:e,extension:r}=(0,n.fZ)(t);return{prefix:null,filename:e,extension:r}}const{path:l,extension:o}=(0,n.fZ)(t.slice(s+1));return{prefix:t.slice(0,s),filename:l,extension:o}}function p(e,r){return r&&!r.isPortal&&r.urlKey&&r.customBaseUrl?(0,n.Ie)(e,`${r.urlKey}.${r.customBaseUrl}`,r.portalHostname):e}function m(e,r){if(!r||r.isPortal||!r.urlKey||!r.customBaseUrl)return e;const t=`${r.urlKey}.${r.customBaseUrl}`,s=(0,n.TI)();return(0,n.D6)(s,`${s.scheme}://${t}`)?(0,n.Ie)(e,r.portalHostname,t):(0,n.Ie)(e,t,r.portalHostname)}var d,v;(v=d||(d={}))[v.YES=0]="YES",v[v.NO=1]="NO";const h=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return d},ensureMainOnlineDomain:p,fromJSON:s,itemIdFromResourceUrl:c,prefixAndFilenameFromResourceUrl:f,read:o,toJSON:l,write:u},Symbol.toStringTag,{value:"Module"}))},66677:(e,r,t)=>{t.d(r,{B5:()=>c,DR:()=>p,G:()=>I,M8:()=>v,Nm:()=>h,Qc:()=>f,XG:()=>y,a7:()=>d,ld:()=>m,wH:()=>S});var n=t(17452),s=t(25929);const l={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(l),u=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),i=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),a=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function c(e){return!!u.test(e)}function f(e){if(null==e)return null;const r=(0,n.mN)(e),t=r?.path.match(u)||r?.path.match(i);if(!t)return null;const[,s,o,a,c]=t,f=o.indexOf("/");return{title:m(-1!==f?o.slice(f+1):o),serverType:l[a.toLowerCase()],sublayer:null!=c&&""!==c?parseInt(c,10):null,url:{path:s}}}function p(e){const r=(0,n.mN)(e).path.match(a);return r?{serviceUrl:r[1],sublayerId:Number(r[2])}:null}function m(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function d(e,r){const t=[];if(e){const r=f(e);null!=r&&r.title&&t.push(r.title)}if(r){const e=m(r);t.push(e)}if(2===t.length){if(t[0].toLowerCase().includes(t[1].toLowerCase()))return t[0];if(t[1].toLowerCase().includes(t[0].toLowerCase()))return t[1]}return t.join(" - ")}function v(e){if(!e)return!1;const r=(e=e.toLowerCase()).includes(".arcgis.com/"),t=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return r&&t}function h(e,r){return e?(0,n.Qj)((0,n.Hu)(e,r)):e}function y(e){let{url:r}=e;if(!r)return{url:r};r=(0,n.Hu)(r,e.logger);const t=(0,n.mN)(r),s=f(t.path);let l;if(null!=s)null!=s.sublayer&&null==e.layer.layerId&&(l=s.sublayer),r=s.url.path;else if(e.nonStandardUrlAllowed){const e=p(t.path);null!=e&&(r=e.serviceUrl,l=e.sublayerId)}return{url:(0,n.Qj)(r),layerId:l}}function S(e,r,t,l,o){(0,s.w)(r,l,"url",o),l.url&&null!=e.layerId&&(l.url=(0,n.v_)(l.url,t,e.layerId.toString()))}function I(e){if(!e)return!1;const r=e.toLowerCase(),t=r.includes("/services/"),n=r.includes("/mapserver/wmsserver"),s=r.includes("/imageserver/wmsserver"),l=r.includes("/wmsserver");return t&&(n||s||l)}},14661:(e,r,t)=>{t.d(r,{$o:()=>c,Fj:()=>i,Kz:()=>f,Ss:()=>p,_$:()=>u,ck:()=>a,qj:()=>o});var n=t(73615),s=t(82971),l=t(40488);function o(e,r){if(!u(e,r)){const t=e.typeKeywords;t?t.push(r):e.typeKeywords=[r]}}function u(e,r){return!!e.typeKeywords?.includes(r)}function i(e){return u(e,f.HOSTED_SERVICE)}function a(e,r){const t=e.typeKeywords;if(t){const e=t.indexOf(r);e>-1&&t.splice(e,1)}}async function c(e){const r=e.clone().normalize();let t;if(r.length>1)for(const e of r)t?e.width>t.width&&(t=e):t=e;else t=r[0];return async function(e){const r=e.spatialReference;if(r.isWGS84)return e.clone();if(r.isWebMercator)return(0,l.Sx)(e);const t=s.Z.WGS84;return await(0,n.initializeProjection)(r,t),(0,n.project)(e,t)}(t)}const f={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table",HOSTED_SERVICE:"Hosted Service",LOCAL_SCENE:"ViewingMode-Local",TILED_IMAGERY:"Tiled Imagery",GROUP_LAYER_MAP:"Map"};function p(e){const{portal:r,isOrgItem:t,itemControl:n}=e,s=r.user?.privileges;let l=!s||s.includes("features:user:edit"),o=!!t&&!!s?.includes("features:user:fullEdit");const u="update"===n||"admin"===n;return u?o=l=!0:o&&(l=!0),{features:{edit:l,fullEdit:o},content:{updateItem:u}}}}}]);
|