@arcgis/core 4.28.0-next.20230707 → 4.28.0-next.20230708
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/4e4e62462deec25e82ce.js +1 -0
- package/interfaces.d.ts +0 -32
- package/layers/WebTileLayer.js +1 -1
- package/networks/Network.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/package.json +1 -1
- package/rest/networks/support/ValidateNetworkTopologyResult.js +1 -1
- package/support/revision.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/Zoom/ZoomConditions2D.js +1 -1
- package/assets/esri/core/workers/chunks/7d9ad61c7896cafc19f7.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var RemoteClient;(()=>{var e={88277:(e,t,r)=>{r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},43697:(e,t,r)=>{"use strict";function n(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}r.d(t,{_:()=>n}),"function"==typeof SuppressedError&&SuppressedError},68773:(e,t,r)=>{"use strict";r.d(t,{default:()=>o}),r(80442);var n=r(78286),s=r(17202);const o={analysisTheme:{accentColor:[255,127,0],textColor:"white"},apiKey:void 0,applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!1,portalUrl:"https://www.arcgis.com",routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,n.RH)(o,globalThis.esriConfig,!0),delete o.has),!o.assetsPath){{const e="4.28.0";o.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${s.r}/assets`}o.defaultAssetsPath=o.assetsPath}},92036:(e,t,r)=>{"use strict";r.d(t,{Z:()=>x});var n=r(60235),s=r(61247),o=r(92604),i=r(70586),a=r(88022),c=r(67723),l=r(7628),u=(r(80442),r(22974)),f=r(71143),d=r(97831),h=r(42100),p=r(31263),g=r(58971),y=r(44550);class b{constructor(e,t){this.propertyName=e,this.metadata=t,this.observerObject=new m,this._accessed=null,this._handles=null,this.observerObject.flags=y.v.Dirty|(t.nonNullable?y.v.NonNullable:0)|(t.hasOwnProperty("value")?y.v.HasDefaultValue:0)|(void 0===t.get?y.v.DepTrackingInitialized:0)|(void 0===t.dependsOn?y.v.AutoTracked:0)}destroy(){this.observerObject.destroy(),this._accessed=null,this._clearObservationHandles()}getComputed(e){const t=this.observerObject;(0,g.it)(t);const r=e.store,n=this.propertyName,s=t.flags,o=r.get(n);if(s&y.v.Computing)return o;if(~s&y.v.Dirty&&r.has(n))return o;t.flags|=y.v.Computing;const i=e.host;let a;s&y.v.AutoTracked?a=(0,g.LJ)(this,this.metadata.get,i):((0,g.GF)(i,this),a=this.metadata.get.call(i)),r.set(n,a,p.s3.COMPUTED);const c=r.get(n);return c===o?t.flags&=~y.v.Dirty:(0,g.gb)(this.commit,this),t.flags&=~y.v.Computing,c}onObservableAccessed(e){if(e===this.observerObject)return;let t=this._accessed;if(null==t)t=[],this._accessed=t;else if(t.includes(e))return;t.push(e)}onTrackingEnd(){this._clearObservationHandles();const e=this.observerObject;e.flags|=y.v.DepTrackingInitialized;const t=this._accessed;if(null==t||0===t.length)return;let r=this._handles;null==r&&(r=[],this._handles=r);for(let n=0;n<t.length;++n)r.push(t[n].observe(e));t.length=0}notifyChange(){const e=this.observerObject;e.onInvalidated(),e.onCommitted()}invalidate(){this.observerObject.onInvalidated()}commit(){const e=this.observerObject;e.flags&=~y.v.Dirty,e.onCommitted()}_clearObservationHandles(){const e=this._handles;if(null!==e){for(let t=0;t<e.length;++t)e[t].remove();e.length=0}}}class m extends h.s{constructor(){super(...arguments),this.flags=0}onInvalidated(){~this.flags&y.v.Overriden&&(this.flags|=y.v.Dirty);const e=this._observers;if(e&&e.length>0)for(const t of e)t.onInvalidated()}onCommitted(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onCommitted()}}destroy(){this.flags&y.v.Dirty&&this.onCommitted(),super.destroy()}}class v{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const t=new v;return this._values.forEach(((r,n)=>{e&&e.has(n)||t.set(n,(0,u.d9)(r))})),t}get(e){return this._values.get(e)}originOf(){return p.s3.USER}keys(){return[...this._values.keys()]}set(e,t){this._values.set(e,t)}delete(e){this._values.delete(e)}has(e){return this._values.has(e)}forEach(e){this._values.forEach(e)}}function _(e,t,r){return void 0!==e}function w(e,t,r,n){return!(void 0===e||null==r&&e.observerObject.flags&y.v.NonNullable&&(n.lifecycle,d.F.INITIALIZING,1))}function O(e){return e&&"function"==typeof e.destroy}o.Z.getLogger("esri.core.accessorSupport.Properties");class A{constructor(e){this.host=e,this.propertiesByName=new Map,this.ctorArgs=null,this.destroyed=!1,this.lifecycle=d.F.INITIALIZING,this.store=new v,this._origin=p.s3.USER;const t=this.host.constructor.__accessorMetadata__;for(const e in t){const r=new b(e,t[e]);this.propertiesByName.set(e,r)}this.metadatas=t}initialize(){this.lifecycle=d.F.CONSTRUCTING}constructed(){this.lifecycle=d.F.CONSTRUCTED}destroy(){this.destroyed=!0;for(const[e,t]of this.propertiesByName){if(t.metadata.autoDestroy){const r=this.internalGet(e);r&&O(r)&&(r.destroy(),~t.observerObject.flags&y.v.NonNullable&&this._internalSet(t,null))}t.destroy()}}get initialized(){return this.lifecycle!==d.F.INITIALIZING}get(e){const t=this.propertiesByName.get(e);if(t.metadata.get)return t.getComputed(this);(0,g.it)(t.observerObject);const r=this.store;return r.has(e)?r.get(e):t.metadata.value}originOf(e){const t=this.store.originOf(e);if(void 0===t){const t=this.propertiesByName.get(e);if(void 0!==t&&t.observerObject.flags&y.v.HasDefaultValue)return"defaults"}return(0,p.x3)(t)}has(e){return!!this.propertiesByName.has(e)&&this.store.has(e)}keys(){return[...this.propertiesByName.keys()]}internalGet(e){const t=this.propertiesByName.get(e);if(_(t))return this.store.has(e)?this.store.get(e):t.metadata.value}internalSet(e,t){const r=this.propertiesByName.get(e);_(r)&&this._internalSet(r,t)}getDependsInfo(e,t,r){const n=this.propertiesByName.get(t);if(!_(n))return"";const s=new Set,o=(0,g.LJ)({onObservableAccessed:e=>s.add(e),onTrackingEnd:()=>{}},(()=>n.metadata.get?.call(e)));let i=`${r}${e.declaredClass.split(".").pop()}.${t}: ${o}\n`;if(0===s.size)return i;r+=" ";for(const e of s)e instanceof b&&(i+=`${r}${e.propertyName}: undefined\n`);return i}setAtOrigin(e,t,r){const n=this.propertiesByName.get(e);if(_(n))return this._setAtOrigin(n,t,r)}isOverridden(e){const t=this.propertiesByName.get(e);return void 0!==t&&!!(t.observerObject.flags&y.v.Overriden)}clearOverride(e){const t=this.propertiesByName.get(e),r=t?.observerObject;r&&r.flags&y.v.Overriden&&(r.flags&=~y.v.Overriden,t.notifyChange())}override(e,t){const r=this.propertiesByName.get(e);if(!w(r,0,t,this))return;const n=r.metadata.cast;if(n){const e=this._cast(n,t),{valid:r,value:s}=e;if(S.release(e),!r)return;t=s}r.observerObject.flags|=y.v.Overriden,this._internalSet(r,t)}set(e,t){const r=this.propertiesByName.get(e);if(!w(r,0,t,this))return;const n=r.metadata.cast;if(n){const e=this._cast(n,t),{valid:r,value:s}=e;if(S.release(e),!r)return;t=s}const s=r.metadata.set;s?s.call(this.host,t):this._internalSet(r,t)}setDefaultOrigin(e){this._origin=(0,p.M9)(e)}getDefaultOrigin(){return(0,p.x3)(this._origin)}notifyChange(e){const t=this.propertiesByName.get(e);void 0!==t&&t.notifyChange()}invalidate(e){const t=this.propertiesByName.get(e);void 0!==t&&t.invalidate()}commit(e){const t=this.propertiesByName.get(e);void 0!==t&&t.commit()}_internalSet(e,t){const r=this.lifecycle!==d.F.INITIALIZING?this._origin:p.s3.DEFAULTS;this._setAtOrigin(e,t,r)}_setAtOrigin(e,t,r){const n=this.store,s=e.propertyName;n.has(s,r)&&(0,u.fS)(t,n.get(s))&&~e.observerObject.flags&y.v.Overriden&&r===n.originOf(s)||(e.invalidate(),n.set(s,t,r),e.commit(),(0,g.mS)(this.host,e))}_cast(e,t){const r=S.acquire();return r.valid=!0,r.value=t,e&&(r.value=e.call(this.host,t,r)),r}}const S=new f.Z(class{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}});var k=r(37697);var T,j,E=r(26258),N=r(5600),C=r(52011);function P(e){if(null==e)return{value:e};if(Array.isArray(e))return{type:[e[0]],value:null};switch(typeof e){case"object":return e.constructor?.__accessorMetadata__||e instanceof Date?{type:e.constructor,value:e}:e;case"boolean":return{type:Boolean,value:e};case"string":return{type:String,value:e};case"number":return{type:Number,value:e};case"function":return{type:e,value:null};default:return}}const M=Symbol("Accessor-Handles"),I=Symbol("Accessor-Initialized");class x{static createSubclass(e={}){if(Array.isArray(e))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:t,declaredClass:r,constructor:n}=e;delete e.declaredClass,delete e.properties,delete e.constructor;const s=this;class o extends s{constructor(...e){super(...e),this.inherited=null,n&&n.apply(this,e)}}(0,l.fp)(o.prototype);for(const t in e){const r=e[t];o.prototype[t]="function"==typeof r?function(...e){const n=this.inherited;let o;this.inherited=function(...e){if(s.prototype[t])return s.prototype[t].apply(this,e)};try{o=r.apply(this,e)}catch(e){throw this.inherited=n,e}return this.inherited=n,o}:e[t]}for(const e in t){const r=P(t[e]);(0,N.Cb)(r)(o.prototype,e)}return(0,C.j)(r)(o)}constructor(...e){if(this[T]=null,this[j]=!1,this.constructor===x)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const t=new A(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:t}),e.length>0&&this.normalizeCtorArgs&&(t.ctorArgs=this.normalizeCtorArgs.apply(this,e)),$.register(this,t.propertiesByName,this)}postscript(e){const t=this.__accessor__,r=t.ctorArgs||e;t.initialize(),r&&(this.set(r),t.ctorArgs=null),t.constructed(),this.initialize(),this[I]=!0}initialize(){}[a.F](){this[M]=(0,i.SC)(this[M])}destroy(){this.destroyed||($.unregister(this),(0,E.BT)(this),this.__accessor__.destroy())}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[I]}get destroyed(){return this.__accessor__&&this.__accessor__.destroyed||!1}commitProperty(e){(0,c.U2)(this,e)}get(e){return(0,n.XV)(o.Z.getLogger("esri.core.Accessor"),"`Accessor.get` is deprecated in favor of using optional chaining",{version:"4.28",see:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining"}),(0,c.U2)(this,e)}hasOwnProperty(e){return this.__accessor__?this.__accessor__.has(e):Object.prototype.hasOwnProperty.call(this,e)}keys(){return this.__accessor__?this.__accessor__.keys():[]}set(e,t){return(0,k.t)(this,e,t),this}watch(e,t,r){return(0,E.YP)(this,e,t,r)}addHandles(e,t){if(this.destroyed){const t=Array.isArray(e)?e:[e];for(const e of t)e.remove();return}let r=this[M];null==r&&(r=this[M]=new s.Z),r.add(e,t)}removeHandles(e){const t=this[M];null!=t&&t.remove(e)}removeAllHandles(){const e=this[M];null!=e&&e.removeAll()}hasHandles(e){const t=this[M];return null!=t&&t.has(e)}_override(e,t){void 0===t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_clearOverride(e){return this.__accessor__.clearOverride(e)}_overrideIfSome(e,t){null==t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_isOverridden(e){return this.__accessor__.isOverridden(e)}notifyChange(e){this.__accessor__.notifyChange(e)}_get(e){return this.__accessor__.internalGet(e)}_set(e,t){return this.__accessor__.internalSet(e,t),this}}T=M,j=I;const $=new FinalizationRegistry((e=>{for(const t of e.values())t.destroy()}))},3894:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(71143);function s(e){e.length=0}class o{constructor(e=50,t=50){this._pool=new n.Z(Array,void 0,s,t,e)}acquire(){return this._pool.acquire()}release(e){this._pool.release(e)}prune(){this._pool.prune(0)}static acquire(){return i.acquire()}static release(e){return i.release(e)}static prune(){i.prune()}}const i=new o(100)},20102:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(22974),s=r(92604),o=r(58896);class i extends o.Z{constructor(e,t,r){super(e,t,r)}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,((e,t)=>{if(t&&"object"==typeof t&&"function"==typeof t.toJSON)return t;try{return(0,n.d9)(t)}catch(e){return"[object]"}})))}}catch(e){throw s.Z.getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new i(e.name,e.message,e.details)}}i.prototype.type="error"},61247:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(66374);class s{constructor(){this._groups=new Map}destroy(){this.removeAll()}get size(){let e=0;return this._groups.forEach((t=>{e+=t.length})),e}add(e,t){if((0,n.TW)(e)){const r=this._getOrCreateGroup(t);for(const t of e)this._isHandle(t)&&r.push(t)}else this._isHandle(e)&&this._getOrCreateGroup(t).push(e);return this}forEach(e,t){if("function"==typeof e)this._groups.forEach((t=>t.forEach(e)));else{const r=this._getGroup(e);r&&t&&r.forEach(t)}}has(e){return this._groups.has(this._ensureGroupKey(e))}remove(e){if("string"!=typeof e&&(0,n.TW)(e)){for(const t of e)this.remove(t);return this}return this.has(e)?(this._removeAllFromGroup(this._getGroup(e)),this._groups.delete(this._ensureGroupKey(e)),this):this}removeAll(){return this._groups.forEach((e=>this._removeAllFromGroup(e))),this._groups.clear(),this}_isHandle(e){return e&&(!!e.remove||e instanceof s)}_getOrCreateGroup(e){if(this.has(e))return this._getGroup(e);const t=[];return this._groups.set(this._ensureGroupKey(e),t),t}_getGroup(e){return this._groups.get(this._ensureGroupKey(e))}_ensureGroupKey(e){return e||"_default_"}_removeAllFromGroup(e){for(const t of e)t instanceof s?t.removeAll():t.remove()}}},96674:(e,t,r)=>{"use strict";r.d(t,{wq:()=>b,eC:()=>p,AK:()=>y});var n=r(43697),s=r(92036),o=r(22974),i=r(31263);class a{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const t=new a;return this._values.forEach(((r,n)=>{e&&e.has(n)||t.set(n,(0,o.d9)(r.value),r.origin)})),t}get(e,t){t=this._normalizeOrigin(t);const r=this._values.get(e);return null==t||r?.origin===t?r?.value:void 0}originOf(e){return this._values.get(e)?.origin??i.s3.USER}keys(e){e=this._normalizeOrigin(e);const t=[...this._values.keys()];return null==e?t:t.filter((t=>this._values.get(t)?.origin===e))}set(e,t,r){if((r=this._normalizeOrigin(r))===i.s3.DEFAULTS){const t=this._values.get(e);if(t&&null!=t.origin&&t.origin>r)return}this._values.set(e,new c(t,r))}delete(e,t){null!=(t=this._normalizeOrigin(t))&&this._values.get(e)?.origin!==t||this._values.delete(e)}has(e,t){return null!=(t=this._normalizeOrigin(t))?this._values.get(e)?.origin===t:this._values.has(e)}forEach(e){this._values.forEach((({value:t},r)=>e(t,r)))}_normalizeOrigin(e){if(null!=e)return e===i.s3.DEFAULTS?e:i.s3.USER}}class c{constructor(e,t){this.value=e,this.origin=t}}var l=r(41103),u=r(50549),f=r(1153),d=r(76169),h=r(52011);const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,f.vw)(this),r=t.store,n=new a;t.store=n,(0,l.M)(t,r,n)}read(e,t){(0,u.i)(this,e,t)}write(e,t){return(0,d.c)(this,e??{},t)}toJSON(e){return this.write({},e)}static fromJSON(e,t){return g.call(this,e,t)}};return t=(0,n._)([(0,h.j)("esri.core.JSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function g(e,t){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const r=new this;return r.read(e,t),r}function y(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}let b=class extends(p(s.Z)){};b=(0,n._)([(0,h.j)("esri.core.JSONSupport")],b)},92604:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(68773),s=(r(80442),r(19153));const o={info:0,warn:1,error:2,none:3};class i{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,i._loggers.set(this.module,this);const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=i.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){const e=this;return{loggedMessages:e._loggedMessages,clearLoggedWarnings:()=>e._loggedMessages.warn.clear()}}static get test(){return{resetLoggers(e=new Map){const t=i._loggers;return i._loggers=e,t},set throttlingDisabled(e){i._throttlingDisabled=e}}}static getLogger(e){return e="string"!=typeof e?e.declaredClass:e,i._loggers.get(e)||new i({module:e})}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!i._throttlingDisabled){const n=this._argsToKey(r),s=this._loggedMessages[e].get(n);if("once"===t&&null!=s||"oncePerTick"===t&&s&&s>=i._tickCounter)return;this._loggedMessages[e].set(n,i._tickCounter),i._scheduleTickCounterIncrement()}for(const t of n.default.log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;null!=r;){const t=r[e];if(null!=t)return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",this._consoleWriter)}_consoleWriter(e,t,...r){console[e](`[${t}]`,...r)}_matchLevel(e){const t=n.default.log.level||"warn";return o[this._parentWithMember("level",t)]<=o[e]}_argsToKey(...e){return(0,s.hP)(JSON.stringify(e,((e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]")))}static _scheduleTickCounterIncrement(){i._tickCounterScheduled||(i._tickCounterScheduled=!0,Promise.resolve().then((()=>{i._tickCounter++,i._tickCounterScheduled=!1})))}}i._loggers=new Map,i._tickCounter=0,i._tickCounterScheduled=!1,i._throttlingDisabled=!1},30175:(e,t,r)=>{"use strict";function n(e,t,r){const n=e.get(t);if(void 0!==n)return n;const s=r();return e.set(t,s),s}r.d(t,{s1:()=>n})},58896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(78286);class s{constructor(e,t,r){this.name=e,this.details=r,this.message=(t&&function(e,t){return e.replaceAll(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,((e,r)=>""===r?"$":((0,n.hS)(r,t)??"").toString()))}(t,r))??""}toString(){return"["+this.name+"]: "+this.message}}},71143:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e,t,r,n=1,s=0){if(this._ctor=e,this._acquireFunction=t,this._releaseFunction=r,this.allocationSize=n,this._pool=new Array(s),this._initialSize=s,this._ctor)for(let e=0;e<s;e++)this._pool[e]=new this._ctor;this.allocationSize=Math.max(n,1)}destroy(){this.prune(0)}acquire(...e){let t;if(n.test.disabled)t=new this._ctor;else{if(0===this._pool.length){const e=this.allocationSize;for(let t=0;t<e;t++)this._pool[t]=new this._ctor}t=this._pool.pop()}return this._acquireFunction?this._acquireFunction(t,...e):function(e){return e&&e.acquire&&"function"==typeof e.acquire}(t)&&t.acquire(...e),t}release(e){var t;e&&!n.test.disabled&&(this._releaseFunction?this._releaseFunction(e):(t=e)&&t.release&&"function"==typeof t.release&&e.release(),this._pool.push(e))}prune(e=this._initialSize){if(!(e>=this._pool.length)){for(let t=e;t<this._pool.length;++t){const e=this._pool[t];this._dispose(e)}this._pool.length=e}}_dispose(e){e.dispose&&"function"==typeof e.dispose&&e.dispose()}}n.test={disabled:!1}},54790:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e,t=30){this.name=e,this._counter=0,this._samples=new Array(t)}record(e){null!=e&&(this._samples[++this._counter%this._samples.length]=e)}get median(){return this._samples.slice().sort(((e,t)=>e-t))[Math.floor(this._samples.length/2)]}get average(){return this._samples.reduce(((e,t)=>e+t),0)/this._samples.length}get last(){return this._samples[this._counter%this._samples.length]}}},44553:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n,s=r(67676);!function(e){const t=(e,t,r,n)=>{let s=t,o=t;const i=r>>>1,a=e[s-1];for(;o<=i;){o=s<<1,o<r&&n(e[o-1],e[o])<0&&++o;const t=e[o-1];if(n(t,a)<=0)break;e[s-1]=t,s=o}e[s-1]=a},r=(e,t)=>e<t?-1:e>t?1:0;e.sort=function(e,n,s,o){void 0===n&&(n=0),void 0===s&&(s=e.length),void 0===o&&(o=r);for(let r=s>>>1;r>n;r--)t(e,r,s,o);const i=n+1;for(let r=s-1;r>n;r--){const s=e[n];e[n]=e[r],e[r]=s,t(e,i,r,o)}},e.iterableSort=function*(e,n,s,o){void 0===n&&(n=0),void 0===s&&(s=e.length),void 0===o&&(o=r);for(let r=s>>>1;r>n;r--)t(e,r,s,o),yield;const i=n+1;for(let r=s-1;r>n;r--){const s=e[n];e[n]=e[r],e[r]=s,t(e,i,r,o),yield}}}(n||(n={}));const o=n;class i{constructor(e){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new s.SO,e&&(e.initialSize&&(this.data=new Array(e.initialSize)),e.allocator&&(this._allocator=e.allocator),void 0!==e.deallocator&&(this._deallocator=e.deallocator),e.shrink&&(this._shrink=()=>a(this)))}toArray(){return this.data.slice(0,this.length)}filter(e){const t=new Array;for(let r=0;r<this._length;r++){const n=this.data[r];e(n)&&t.push(n)}return t}at(e){if((e=Math.trunc(e)||0)<0&&(e+=this._length),!(e<0||e>=this._length))return this.data[e]}includes(e,t){const r=this.data.indexOf(e,t);return-1!==r&&r<this.length}get length(){return this._length}set length(e){if(e>this._length){if(this._allocator){for(;this._length<e;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=e}else{if(this._deallocator)for(let t=e;t<this._length;++t)this.data[t]=this._deallocator(this.data[t]);this._length=e,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(e){this.data[this._length++]=e}pushArray(e,t=e.length){for(let r=0;r<t;r++)this.data[this._length++]=e[r]}fill(e,t){for(let r=0;r<t;r++)this.data[this._length++]=e}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const e=this.data[this._length];return++this._length,e}unshift(e){this.data.unshift(e),this._length++,a(this)}pop(){if(0===this.length)return;const e=this.data[this.length-1];return this.length=this.length-1,this._shrink(),e}remove(e){const t=(0,s.cq)(this.data,e,this.length,this._hint);if(-1!==t)return this.data.splice(t,1),this.length=this.length-1,e}removeUnordered(e){return this.removeUnorderedIndex((0,s.cq)(this.data,e,this.length,this._hint))}removeUnorderedIndex(e){if(!(e>=this.length||e<0))return this.swapElements(e,this.length-1),this.pop()}removeUnorderedMany(e,t=e.length,r){this.length=(0,s.FY)(this.data,e,this.length,t,this._hint,r),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(e,t){if(e>=this.length||t>=this.length||e===t)return;const r=this.data[e];this.data[e]=this.data[t],this.data[t]=r}sort(e){o.sort(this.data,0,this.length,e)}iterableSort(e){return o.iterableSort(this.data,0,this.length,e)}some(e,t){for(let r=0;r<this.length;++r)if(e.call(t,this.data[r],r,this.data))return!0;return!1}find(e,t){for(let r=0;r<this.length;++r){const n=this.data[r];if(e.call(t,n,r))return n}}filterInPlace(e,t){let r=0;for(let n=0;n<this._length;++n){const s=this.data[n];e.call(t,s,n,this.data)&&(this.data[n]=this.data[r],this.data[r]=s,r++)}if(this._deallocator)for(let e=r;e<this._length;e++)this.data[e]=this._deallocator(this.data[e]);return this._length=r,this._shrink(),this}forAll(e,t){const r=this.length,n=this.data;for(let s=0;s<r;++s)e.call(t,n[s],s,n)}forEach(e,t){for(let r=0;r<this.length;++r)e.call(t,this.data[r],r,this.data)}map(e,t){const r=new Array(this.length);for(let n=0;n<this.length;++n)r[n]=e.call(t,this.data[n],n,this.data);return r}reduce(e,t){let r=t;for(let t=0;t<this.length;++t)r=e(r,this.data[t],t,this.data);return r}has(e){const t=this.length,r=this.data;for(let n=0;n<t;++n)if(r[n]===e)return!0;return!1}}function a(e){e.data.length>1.5*e.length&&(e.data.length=Math.floor(1.1*e.length))}},77734:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e=1){this._seed=e}set seed(e){this._seed=e??Math.random()*n._m}getInt(){return this._seed=(n._a*this._seed+n._c)%n._m,this._seed}getFloat(){return this.getInt()/(n._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/n._m*r}}n._m=2147483647,n._a=48271,n._c=0},20941:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(58896);class s extends n.Z{constructor(e,t,r){super(e,t,r)}}s.prototype.type="warning"},42100:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(50758),s=r(67676);class o{constructor(e,t){this._observers=e,this._observer=t}remove(){(0,s.Od)(this._observers,this._observer)}}class i{constructor(){this._observers=null,this.destroyed=!1}observe(e){if(this.destroyed||e.destroyed)return a;null==this._observers&&(this._observers=[]);const t=this._observers;let r=!1,n=!1;const s=t.length;for(let o=0;o<s;++o){const s=t[o];if(s.destroyed)n=!0;else if(s===e){r=!0;break}}return r||(t.push(e),n&&this._removeDestroyedObservers()),new o(t,e)}_removeDestroyedObservers(){const e=this._observers;if(!e||0===e.length)return;const t=e.length;let r=0;for(let n=0;n<t;++n){for(;n+r<t&&e[n+r].destroyed;)++r;if(r>0){if(!(n+r<t))break;e[n]=e[n+r]}}e.length=t-r}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this._observers;if(null!=e){for(const t of e)t.onCommitted();this._observers=null}}}const a=(0,n.kB)()},31263:(e,t,r)=>{"use strict";var n;r.d(t,{M9:()=>o,Wm:()=>a,kk:()=>s,s3:()=>n,x3:()=>i}),function(e){e[e.DEFAULTS=0]="DEFAULTS",e[e.COMPUTED=1]="COMPUTED",e[e.SERVICE=2]="SERVICE",e[e.PORTAL_ITEM=3]="PORTAL_ITEM",e[e.WEB_SCENE=4]="WEB_SCENE",e[e.WEB_MAP=5]="WEB_MAP",e[e.LINK_CHART=6]="LINK_CHART",e[e.USER=7]="USER"}(n||(n={}));const s=n.USER+1;function o(e){switch(e){case"defaults":return n.DEFAULTS;case"service":return n.SERVICE;case"portal-item":return n.PORTAL_ITEM;case"web-scene":return n.WEB_SCENE;case"web-map":return n.WEB_MAP;case"link-chart":return n.LINK_CHART;case"user":return n.USER;default:return null}}function i(e){switch(e){case n.DEFAULTS:return"defaults";case n.SERVICE:return"service";case n.PORTAL_ITEM:return"portal-item";case n.WEB_SCENE:return"web-scene";case n.WEB_MAP:return"web-map";case n.LINK_CHART:return"link-chart";case n.USER:return"user"}}function a(e){return i(e)}},88022:(e,t,r)=>{"use strict";r.d(t,{F:()=>n});const n=Symbol("Accessor-beforeDestroy")},5600:(e,t,r)=>{"use strict";r.d(t,{CJ:()=>l,Cb:()=>c,Eg:()=>u});var n=r(92604),s=r(75215),o=r(67723),i=r(7628),a=r(37697);function c(e={}){return(t,r)=>{if(t===Function.prototype)throw new Error(`Inappropriate use of @property() on a static field: ${t.name}.${r}. Accessor does not support static properties.`);const c=Object.getOwnPropertyDescriptor(t,r),l=(0,i.Oe)(t,r);c&&(c.get||c.set?(l.get=c.get||l.get,l.set=c.set||l.set):"value"in c&&("value"in e&&n.Z.getLogger("esri.core.accessorSupport.decorators.property").warn(`@property() will redefine the value of "${r}" on "${t.constructor.name}" already defined in the metadata`,e),l.value=e.value=c.value)),null!=e.readOnly&&(l.readOnly=e.readOnly);const f=e.aliasOf;if(f){const e="string"==typeof f?f:f.source,t="string"==typeof f?null:!0===f.overridable;let n;l.dependsOn=[e],l.get=function(){let t=(0,o.U2)(this,e);if("function"==typeof t){n||(n=e.split(".").slice(0,-1).join("."));const r=(0,o.U2)(this,n);r&&(t=t.bind(r))}return t},l.readOnly||(l.set=t?function(e){this._override(r,e)}:function(t){(0,a.t)(this,e,t)})}const d=e.type,h=e.types;l.cast||(d?l.cast=function(e){let t=0,r=e;if((0,s.AY)(e))return(0,s.sY)(e);for(;Array.isArray(r)&&1===r.length&&"string"!=typeof r[0]&&"number"!=typeof r[0];)r=r[0],t++;const n=r;if((0,s.gB)(n))return 0===t?(0,s.i$)(n):(0,s.Iu)((0,s.i$)(n),t);if(1===t)return(0,s.rY)(n);if(t>1)return(0,s.di)(n,t);const o=e;return o.from?o.from:(0,s.se)(o)}(d):h&&(Array.isArray(h)?l.cast=(0,s.Ls)((0,s.N7)(h[0])):l.cast=(0,s.N7)(h))),(0,i.tz)(l,e),e.range&&(l.cast=u(l.cast,e.range))}}function l(e,t,r){const n=(0,i.Oe)(e,r);n.json||(n.json={});let s=n.json;return void 0!==t&&(s.origins||(s.origins={}),s.origins[t]||(s.origins[t]={}),s=s.origins[t]),s}function u(e,t){return r=>{let n=+e(r);return null!=t.step&&(n=Math.round(n/t.step)*t.step),null!=t.min&&(n=Math.max(t.min,n)),null!=t.max&&(n=Math.min(t.max,n)),n}}},52011:(e,t,r)=>{"use strict";r.d(t,{j:()=>u}),r(80442);var n=r(88022),s=r(97831),o=r(7628),i=r(58971),a=r(53906);const c=new Set,l=new Set;function u(e){return t=>{t.prototype.declaredClass=e,d(t);const r=[],s=[];let i=t.prototype;for(;i;)i.hasOwnProperty("initialize")&&!c.has(i.initialize)&&(c.add(i.initialize),r.push(i.initialize)),i.hasOwnProperty("destroy")&&!l.has(i.destroy)&&(l.add(i.destroy),s.push(i.destroy)),i=Object.getPrototypeOf(i);c.clear(),l.clear();const a=class extends t{constructor(...e){if(super(...e),this.constructor===a&&"function"==typeof this.postscript){if(r.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let e=r.length-1;e>=0;e--)r[e].call(this)}}),s.length){let e=!1;const t=this[n.F];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!e){e=!0,t.call(this);for(let e=0;e<s.length;e++)s[e].call(this)}}})}this.postscript(...e)}}};a.__accessorMetadata__=(0,o.fp)(t.prototype),a.prototype.declaredClass=e;const u=(e||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(a,"name",{value:u,configurable:!0}),a}}function f(e,t){return null==t.get?function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0===r)return;(0,i.it)(r.observerObject);const n=t.store;return n.has(e)?n.get(e):r.metadata.value}:function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0!==r)return r.getComputed(t)}}function d(e){const t=e.prototype,r=(0,o.fp)(t),n={};for(const e of Object.getOwnPropertyNames(r)){const t=r[e];(0,a.OM)(t),n[e]={enumerable:!0,configurable:!0,get:f(e,t),set(r){const n=this.__accessor__;if(void 0!==n){if(!Object.isFrozen(this)){if(n.initialized&&t.readOnly)throw new TypeError(`[accessor] cannot assign to read-only property '${e}' of ${this.declaredClass}`);if(n.lifecycle===s.F.CONSTRUCTED&&t.constructOnly)throw new TypeError(`[accessor] cannot assign to construct-only property '${e}' of ${this.declaredClass}`);n.set(e,r)}}else Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:r})}}}Object.defineProperties(e.prototype,n)}},41103:(e,t,r)=>{"use strict";r.d(t,{M:()=>s});var n=r(31263);function s(e,t,r){t.keys().forEach((e=>{r.set(e,t.get(e),n.s3.DEFAULTS)}));const s=e.metadatas;Object.keys(s).forEach((t=>{e.internalGet(t)&&r.set(t,e.internalGet(t),n.s3.DEFAULTS)}))}},75215:(e,t,r)=>{"use strict";r.d(t,{AY:()=>C,Iu:()=>A,Ls:()=>_,N7:()=>j,TJ:()=>y,V5:()=>N,Zs:()=>c,di:()=>S,gB:()=>k,i$:()=>T,q9:()=>l,rY:()=>w,sY:()=>P,se:()=>v,vU:()=>u,z8:()=>E}),r(80442);var n=r(92604),s=r(30175);const o=n.Z.getLogger("esri.core.accessorSupport.ensureTypes");function i(e){return null==e?e:new Date(e)}function a(e){return null==e?e:!!e}function c(e){return null==e?e:e.toString()}function l(e){return null==e?e:(e=parseFloat(e),isNaN(e)?0:e)}function u(e){return null==e?e:Math.round(parseFloat(e))}function f(e){return e&&e.constructor&&void 0!==e.constructor.__accessorMetadata__}function d(e,t){return null!=t&&e&&!(t instanceof e)}function h(e){return e&&"isCollection"in e}function p(e){return e&&e.Type?"function"==typeof e.Type?e.Type:e.Type.base:null}function g(e,t){return!!f(t)&&(o.error("Accessor#set","Assigning an instance of '"+(t.declaredClass||"unknown")+"' which is not a subclass of '"+b(e)+"'"),!0)}function y(e,t){return null==t?t:h(e)?function(e,t){if(!t||!t.constructor||!h(t.constructor))return g(e,t)?t:new e(t);const r=p(e.prototype.itemType),n=p(t.constructor.prototype.itemType);return r?n?r===n?t:r.prototype.isPrototypeOf(n.prototype)?new e(t):(g(e,t),t):new e(t):t}(e,t):d(e,t)?g(e,t)?t:new e(t):t}function b(e){return e&&e.prototype&&e.prototype.declaredClass||"unknown"}const m=new WeakMap;function v(e,t){const r=function(e){switch(e){case Number:return l;case E:return u;case Boolean:return a;case String:return c;case Date:return i;default:return(0,s.s1)(m,e,(()=>y.bind(null,e)))}}(e);return 1===arguments.length?r:r(t)}function _(e,t,r){return 1===arguments.length?_.bind(null,e):t?Array.isArray(t)?t.map((t=>e(t,r))):[e(t,r)]:t}function w(e,t){return 1===arguments.length?_((t=>v(e,t))):_((t=>v(e,t)),t)}function O(e,t,r){return 0!==t&&Array.isArray(r)?r.map((r=>O(e,t-1,r))):e(r)}function A(e,t,r){if(2===arguments.length)return r=>A(e,t,r);if(!r)return r;r=O(e,t,r);let n=t,s=r;for(;n>0&&Array.isArray(s);)n--,s=s[0];if(void 0!==s)for(let e=0;e<n;e++)r=[r];return r}function S(e,t,r){return 2===arguments.length?A((t=>v(e,t)),t):A((t=>v(e,t)),t,r)}function k(e){return!!Array.isArray(e)&&!e.some((t=>{const r=typeof t;return!("string"===r||"number"===r||"function"===r&&e.length>1)}))}function T(e,t){if(2===arguments.length)return T(e).call(null,t);const r=new Set,n=e.filter((e=>"function"!=typeof e)),s=e.filter((e=>"function"==typeof e));for(const t of e)"string"!=typeof t&&"number"!=typeof t||r.add(t);let i=null,a=null;return(e,t)=>{if(null==e)return e;const c=typeof e,l="string"===c||"number"===c;return l&&(r.has(e)||s.some((e=>"string"===c&&e===String||"number"===c&&e===Number)))||"object"===c&&s.some((t=>!d(e,t)))?e:(l&&n.length?(i||(i=n.map((e=>"string"==typeof e?`'${e}'`:`${e}`)).join(", ")),o.error("Accessor#set",`'${e}' is not a valid value for this property, only the following values are valid: ${i}`)):"object"==typeof e&&s.length?(a||(a=s.map((e=>b(e))).join(", ")),o.error("Accessor#set",`'${e}' is not a valid value for this property, value must be one of ${a}`)):o.error("Accessor#set",`'${e}' is not a valid value for this property`),t&&(t.valid=!1),null)}}function j(e,t){if(2===arguments.length)return j(e).call(null,t);const r={},n=[],s=[];for(const t in e.typeMap){const o=e.typeMap[t];r[t]=v(o),n.push(b(o)),s.push(t)}const i=()=>`'${n.join("', '")}'`,a=()=>`'${s.join("', '")}'`,c="string"==typeof e.key?t=>t[e.key]:e.key;return t=>{if(e.base&&!d(e.base,t))return t;if(null==t)return t;const n=c(t)||e.defaultKeyValue,s=r[n];if(!s)return o.error("Accessor#set",`Invalid property value, value needs to be one of ${i()}, or a plain object that can autocast (having .type = ${a()})`),null;if(!d(e.typeMap[n],t))return t;if("string"==typeof e.key&&!f(t)){const r={};for(const n in t)n!==e.key&&(r[n]=t[n]);return s(r)}return s(t)}}class E{}const N={native:e=>({type:"native",value:e}),array:e=>({type:"array",value:e}),oneOf:e=>({type:"one-of",values:e})};function C(e){if(!e||!("type"in e))return!1;switch(e.type){case"native":case"array":case"one-of":return!0}return!1}function P(e){switch(e.type){case"native":return v(e.value);case"array":return _(P(e.value));case"one-of":return function(e){let t=null;return(r,n)=>I(r,e)?r:(null==t&&(t=M(e)),o.error("Accessor#set",`Invalid property value, value needs to be of type ${t}`),n&&(n.valid=!1),null)}(e);default:return null}}function M(e){switch(e.type){case"native":switch(e.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case E:return"integer";case Date:return"date";default:return b(e.value)}case"array":return`array of ${M(e.value)}`;case"one-of":{const t=e.values.map((e=>M(e)));return`one of ${t.slice(0,t.length-1)} or ${t[t.length-1]}`}}return"unknown"}function I(e,t){if(null==e)return!0;switch(t.type){case"native":switch(t.value){case Number:case E:return"number"==typeof e;case Boolean:return"boolean"==typeof e;case String:return"string"==typeof e}return e instanceof t.value;case"array":return!!Array.isArray(e)&&!e.some((e=>!I(e,t.value)));case"one-of":return t.values.some((t=>I(e,t)))}}},53906:(e,t,r)=>{"use strict";r.d(t,{hk:()=>u,HS:()=>f,Ah:()=>d,OM:()=>b});var n=r(75215),s=r(63213);function o(e){if(e.json||(e.json={}),a(e.json),c(e.json),i(e.json),e.json.origins)for(const t in e.json.origins)a(e.json.origins[t]),c(e.json.origins[t]),i(e.json.origins[t]);return!0}function i(e){e.name&&(e.read&&"object"==typeof e.read?void 0===e.read.source&&(e.read.source=e.name):e.read={source:e.name},e.write&&"object"==typeof e.write?void 0===e.write.target&&(e.write.target=e.name):e.write={target:e.name})}function a(e){"boolean"==typeof e.read?e.read={enabled:e.read}:"function"==typeof e.read?e.read={enabled:!0,reader:e.read}:e.read&&"object"==typeof e.read&&void 0===e.read.enabled&&(e.read.enabled=!0)}function c(e){"boolean"==typeof e.write?e.write={enabled:e.write}:"function"==typeof e.write?e.write={enabled:!0,writer:e.write}:e.write&&"object"==typeof e.write&&void 0===e.write.enabled&&(e.write.enabled=!0)}var l=r(827);function u(e,t){return h(e,"any",t?.origin)}function f(e,t){return h(e,"read",t?.origin)}function d(e,t){return h(e,"write",t?.origin)}function h(e,t,r){let n=e?.json;if(n?.origins&&r){let e;e="link-chart"===r?n.origins[r]&&("any"===t||t in n.origins[r])?n.origins[r]:n.origins["web-map"]:n.origins[r],e&&("any"===t||t in e)&&(n=e)}return n}function p(e){return e.type?g(e):y(e)}function g(e){if(!e.type)return;let t=0,r=e.type;for(;Array.isArray(r)&&!(0,n.gB)(r);)r=r[0],t++;return{type:r,ndimArray:t}}function y(e){if(!e.types)return;let t=0,r=e.types;for(;Array.isArray(r);)r=r[0],t++;return{types:r,ndimArray:t}}function b(e){o(e)&&(function(e){if(e.json&&e.json.origins){const t=e.json.origins,r={"web-document":["web-scene","web-map"]};for(const e in r)if(t[e]){const n=t[e];r[e].forEach((e=>{t[e]=n})),delete t[e]}}}(e),function(e){const t=function(e){return e.json.types?y(e.json):e.type?g(e):y(e)}(e);if(e.json.origins)for(const r in e.json.origins){const n=e.json.origins[r],o=n.types?p(n):t;(0,s.U)(o,n,!1),n.types&&!n.write&&e.json.write&&e.json.write.enabled&&(n.write={...e.json.write}),(0,l.U)(o,n)}(0,s.U)(t,e.json,!0),(0,l.U)(t,e.json)}(e))}},63213:(e,t,r)=>{"use strict";r.d(t,{U:()=>l,d:()=>u});var n=r(92604),s=r(78286),o=r(20941),i=r(7628),a=r(14062);const c=n.Z.getLogger("esri.core.accessorSupport.extensions.serializableProperty.reader");function l(e,t,r){e&&(!r&&!t.read||t.read?.reader||!1===t.read?.enabled||function(e){return"types"in e?y(e.types):g(e.type)}(e)&&(0,s.RB)("read.reader",u(e),t))}function u(e){const t=e.ndimArray??0;if(t>1)return function(e){const t=f(e),r=d.bind(null,t),n=e.ndimArray??0;return(e,t,s)=>{if(null==e)return e;e=r(e,s,n);let o=n,i=e;for(;o>0&&Array.isArray(i);)o--,i=i[0];if(void 0!==i)for(let t=0;t<o;t++)e=[e];return e}}(e);if(1===t)return h(e);if("type"in e&&p(e.type)){const t=e.type.prototype?.itemType?.Type,r=h("function"==typeof t?{type:t}:{types:t});return(t,n,s)=>{const o=r(t,n,s);return o?new e.type(o):o}}return f(e)}function f(e){return"type"in e?function(e){return e.prototype.read?(t,r,n)=>{if(null==t)return t;const s=typeof t;if("object"!==s)return void c.error(`Expected JSON value of type 'object' to deserialize type '${e.prototype.declaredClass}', but got '${s}'`);const o=new e;return o.read(t,n),o}:e.fromJSON}(e.type):function(e){let t=null;const r=e.errorContext??"type",n=e.validate;return(s,a,l)=>{if(null==s)return s;const u=typeof s;if("object"!==u)return void c.error(`Expected JSON value of type 'object' to deserialize, but got '${u}'`);t||(t=function(e){const t={};for(const r in e.typeMap){const n=e.typeMap[r],s=(0,i.fp)(n.prototype);if("function"==typeof e.key)continue;const o=s[e.key];if(!o)continue;o.json?.type&&Array.isArray(o.json.type)&&1===o.json.type.length&&"string"==typeof o.json.type[0]&&(t[o.json.type[0]]=n);const a=o.json?.write;if(!a||!a.writer){t[r]=n;continue}const c=a.target,l="string"==typeof c?c:e.key,u={};a.writer(r,u,l),u[l]&&(t[u[l]]=n)}return t}(e));const f=e.key;if("string"!=typeof f)return;const d=s[f],h=d?t[d]:e.defaultKeyValue?e.typeMap[e.defaultKeyValue]:void 0;if(!h){const e=`Type '${d||"unknown"}' is not supported`;return l&&l.messages&&s&&l.messages.push(new o.Z(`${r}:unsupported`,e,{definition:s,context:l})),void c.error(e)}const p=new h;return p.read(s,l),n?n(p):p}}(e.types)}function d(e,t,r,n){return 0!==n&&Array.isArray(t)?t.map((t=>d(e,t,r,n-1))):e(t,void 0,r)}function h(e){const t=f(e);return(e,r,n)=>{if(null==e)return e;if(Array.isArray(e)){const r=[];for(const s of e){const e=t(s,void 0,n);void 0!==e&&r.push(e)}return r}const s=t(e,void 0,n);return void 0!==s?[s]:void 0}}function p(e){if(!(0,a.u)(e))return!1;const t=e.prototype.itemType;return!(!t||!t.Type)&&("function"==typeof t.Type?g(t.Type):y(t.Type))}function g(e){return!Array.isArray(e)&&!!e&&e.prototype&&("read"in e.prototype||"fromJSON"in e||p(e))}function y(e){for(const t in e.typeMap)if(!g(e.typeMap[t]))return!1;return!0}},14062:(e,t,r)=>{"use strict";function n(e){return!!e&&e.prototype&&e.prototype.declaredClass&&0===e.prototype.declaredClass.indexOf("esri.core.Collection")}r.d(t,{u:()=>n})},827:(e,t,r)=>{"use strict";r.d(t,{U:()=>a,k:()=>f});var n=r(20102),s=r(92604),o=r(78286),i=r(14062);function a(e,t){if(!t.write||t.write.writer||!1===t.write.enabled&&!t.write.overridePolicy)return;const r=e?.ndimArray??0;e&&(1===r||"type"in e&&(0,i.u)(e.type))?t.write.writer=d:r>1?t.write.writer=function(e){return(t,r,n,s)=>{let i;if(null===t)i=null;else{i=h(t,s,e);let r=e,n=i;for(;r>0&&Array.isArray(n);)r--,n=n[0];if(void 0!==n)for(let e=0;e<r;e++)i=[i]}(0,o.RB)(n,i,r)}}(r):t.types?Array.isArray(t.types)?t.write.writer=function(e){return(t,r,n,s)=>t&&Array.isArray(t)?l(t.filter((t=>c(t,e,s))),r,n,s):l(t,r,n,s)}(t.types[0]):t.write.writer=function(e){return(t,r,n,s)=>t?c(t,e,s)?l(t,r,n,s):void 0:l(t,r,n,s)}(t.types):t.write.writer=l}function c(e,t,r){for(const r in t.typeMap)if(e instanceof t.typeMap[r])return!0;if(r?.messages){const o=t.errorContext??"type",i=`Values of type '${("function"!=typeof t.key?e[t.key]:e.declaredClass)??"Unknown"}' cannot be written`;r&&r.messages&&e&&r.messages.push(new n.Z(`${o}:unsupported`,i,{definition:e,context:r})),s.Z.getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer").error(i)}return!1}function l(e,t,r,n){(0,o.RB)(r,u(e,n),t)}function u(e,t){return e&&"function"==typeof e.write?e.write({},t):e&&"function"==typeof e.toJSON?e.toJSON():"number"==typeof e?f(e):e}function f(e){return e===-1/0?-Number.MAX_VALUE:e===1/0?Number.MAX_VALUE:isNaN(e)?null:e}function d(e,t,r,n){let s;null===e?s=null:e&&"function"==typeof e.map?(s=e.map((e=>u(e,n))),"function"==typeof s.toArray&&(s=s.toArray())):s=[u(e,n)],(0,o.RB)(r,s,t)}function h(e,t,r){return 0!==r&&Array.isArray(e)?e.map((e=>h(e,t,r-1))):u(e,t)}},67723:(e,t,r)=>{"use strict";r.d(t,{$z:()=>i,Gg:()=>c,U2:()=>a});var n=r(1153);function s(e,t){const r="?"===e[e.length-1]?e.slice(0,-1):e;if(null!=t.getItemAt||Array.isArray(t)){const e=parseInt(r,10);if(!isNaN(e))return Array.isArray(t)?t[e]:t.at(e)}const s=(0,n.vw)(t);return(0,n.b6)(s,r)?s.get(r):t[r]}function o(e,t,r){if(null==e)return e;const n=s(t[r],e);return!n&&r<t.length-1?void 0:r===t.length-1?n:o(n,t,r+1)}function i(e,t,r=0){return"string"!=typeof t||t.includes(".")?o(e,(0,n.NI)(t),r):s(t,e)}function a(e,t){return i(e,t)}function c(e,t){return void 0!==i(t,e)}},97831:(e,t,r)=>{"use strict";var n;r.d(t,{F:()=>n}),function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CONSTRUCTING=1]="CONSTRUCTING",e[e.CONSTRUCTED=2]="CONSTRUCTED"}(n||(n={}))},7628:(e,t,r)=>{"use strict";r.d(t,{Oe:()=>i,fp:()=>o,tz:()=>a});var n=r(22974),s=r(1153);function o(e){let t=e.constructor.__accessorMetadata__;const r=Object.prototype.hasOwnProperty.call(e.constructor,"__accessorMetadata__");if(t){if(!r){t=Object.create(t);for(const e in t)t[e]=(0,n.d9)(t[e]);Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0})}}else t={},Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0});return e.constructor.__accessorMetadata__}function i(e,t){const r=o(e);let n=r[t];return n||(n=r[t]={}),n}function a(e,t){return(0,s.TS)(e,t,l)}const c=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;function l(e){return c.test(e)?"replace":"merge"}},50549:(e,t,r)=>{"use strict";r.d(t,{$:()=>f,i:()=>u});var n=r(67723),s=r(1153),o=r(53906);function i(e,t,r){if(!e||!e.read||!1===e.read.enabled||!e.read.source)return!1;const s=e.read.source;if("string"==typeof s){if(s===t)return!0;if(s.includes(".")&&0===s.indexOf(t)&&(0,n.Gg)(s,r))return!0}else for(const e of s){if(e===t)return!0;if(e.includes(".")&&0===e.indexOf(t)&&(0,n.Gg)(e,r))return!0}return!1}function a(e,t,r,n,s){let a=(0,o.HS)(t[r],s);(function(e){return e&&(!e.read||!1!==e.read.enabled&&!e.read.source)})(a)&&(e[r]=!0);for(const c of Object.getOwnPropertyNames(t))a=(0,o.HS)(t[c],s),i(a,r,n)&&(e[c]=!0)}function c(e,t,r,n){const s=r.metadatas,i=(0,o.hk)(s[t],n),a=i?.default;if(void 0===a)return;const c="function"==typeof a?a.call(e,t,n):a;void 0!==c&&r.set(t,c)}const l={origin:"service"};function u(e,t,r=l){if(!t||"object"!=typeof t)return;const i=(0,s.vw)(e),u=i.metadatas,f={};for(const e of Object.getOwnPropertyNames(t))a(f,u,e,t,r);i.setDefaultOrigin(r.origin);for(const s of Object.getOwnPropertyNames(f)){const a=(0,o.HS)(u[s],r).read,c=a&&a.source;let l;l=c&&"string"==typeof c?(0,n.$z)(t,c):t[s],a&&a.reader&&(l=a.reader.call(e,l,t,r)),void 0!==l&&i.set(s,l)}if(!r||!r.ignoreDefaults){i.setDefaultOrigin("defaults");for(const t of Object.getOwnPropertyNames(u))f[t]||c(e,t,i,r)}i.setDefaultOrigin("user")}function f(e,t,r,n=l){const s={...n,messages:[]};r(s),s.messages?.forEach((t=>{"warning"!==t.type||e.loaded?n&&n.messages&&n.messages.push(t):e.loadWarnings.push(t)}))}},37697:(e,t,r)=>{"use strict";r.d(t,{t:()=>i});var n=r(20102),s=r(80442),o=(r(92604),r(67723));function i(e,t,r){if(e&&t)if("object"==typeof t)for(const r of Object.getOwnPropertyNames(t))i(e,r,t[r]);else{if(t.includes(".")){const n=t.split("."),s=n.splice(n.length-1,1)[0];return void i((0,o.U2)(e,n),s,r)}const a=e.__accessor__;null!=a&&function(e,t){if((0,s.Z)("esri-unknown-property-errors")&&!function(e,t){return null!=t.metadatas[e]}(e,t))throw new n.Z("set:unknown-property",function(e,t){return"setting unknown property '"+e+"' on instance of "+t.host.declaredClass}(e,t))}(t,a),e[t]=r}}},58971:(e,t,r)=>{"use strict";r.d(t,{GF:()=>v,LJ:()=>d,gb:()=>h,it:()=>l,mS:()=>b}),r(80442);var n=r(92604),s=r(1153),o=r(44550);const i={onObservableAccessed:()=>{},onTrackingEnd:()=>{}},a=[];let c=i;function l(e){c.onObservableAccessed(e)}let u=!1,f=!1;function d(e,t,r){if(u)return p(e,t,r);g(e);const n=t.call(r);return y(),n}function h(e,t){return d(i,e,t)}function p(e,t,r){const s=u;u=!0,g(e);let o=null;try{o=t.call(r)}catch(e){f&&n.Z.getLogger("esri.core.accessorSupport.tracking").error(e)}return y(),u=s,o}function g(e){c=e,a.push(e)}function y(){const e=a.length;if(e>1){const t=a.pop();c=a[e-2],t.onTrackingEnd()}else if(1===e){const e=a.pop();c=i,e.onTrackingEnd()}else c=i}function b(e,t){const r=t.observerObject;if(r.flags&o.v.DepTrackingInitialized)return;const n=f;f=!1,r.flags&o.v.AutoTracked?p(t,t.metadata.get,e):v(e,t),f=n}const m=[];function v(e,t){const r=t.observerObject;r.flags&o.v.ExplicitlyTracking||(r.flags|=o.v.ExplicitlyTracking,p(t,(()=>{const r=t.metadata.dependsOn||m;for(const t of r)if("string"!=typeof t||t.includes(".")){const r=(0,s.NI)(t);for(let t=0,n=e;t<r.length&&null!=n&&"object"==typeof n;++t)n=_(n,r[t],t!==r.length-1)}else _(e,t,!1)})),r.flags&=~o.v.ExplicitlyTracking)}function _(e,t,r){const n="?"===t[t.length-1]?t.slice(0,-1):t;if(null!=e.getItemAt||Array.isArray(e)){const t=parseInt(n,10);if(!isNaN(t))return Array.isArray(e)?e[t]:e.at(t)}const o=(0,s.vw)(e);if(o){const t=o.propertiesByName.get(n);t&&(l(t.observerObject),b(e,t))}return r?e[n]:void 0}},44550:(e,t,r)=>{"use strict";var n;r.d(t,{v:()=>n}),function(e){e[e.Dirty=1]="Dirty",e[e.Overriden=2]="Overriden",e[e.Computing=4]="Computing",e[e.NonNullable=8]="NonNullable",e[e.HasDefaultValue=16]="HasDefaultValue",e[e.DepTrackingInitialized=32]="DepTrackingInitialized",e[e.AutoTracked=64]="AutoTracked",e[e.ExplicitlyTracking=128]="ExplicitlyTracking"}(n||(n={}))},38805:(e,t,r)=>{"use strict";r.d(t,{M:()=>n});class n{constructor(e){this._accessed=[],this._handles=[],this._observerObject=new s(e),o.register(this,new WeakRef(this._observerObject),this)}destroy(){o.unregister(this._observerObject),this._accessed.length=0,this._observerObject?.destroy(),this.clear()}onObservableAccessed(e){const t=this._accessed;t.includes(e)||t.push(e)}onTrackingEnd(){const e=this._handles,t=this._accessed,r=this._observerObject;for(let n=0;n<t.length;++n)e.push(t[n].observe(r));t.length=0}clear(){const e=this._handles;for(let t=0;t<e.length;++t)e[t].remove();e.length=0}}class s{constructor(e){this._notify=e,this._invalidCount=0,this.destroyed=!1}onInvalidated(){this._invalidCount++}onCommitted(){if(this.destroyed)return;const e=this._invalidCount;if(1===e)return this._invalidCount=0,void this._notify();this._invalidCount=e>0?e-1:0}destroy(){this.destroyed=!0,this._notify=i}}const o=new FinalizationRegistry((e=>{e.deref()?.destroy()}));function i(){}},87538:(e,t,r)=>{"use strict";r.d(t,{EH:()=>u,U5:()=>c,Xz:()=>l});var n=r(50758),s=r(58971),o=r(38805);let i=!1;const a=[];function c(e,t){let r=new o.M((function n(){if(!r||c)return;if(i)return void f(n);const o=a;r.clear(),i=!0,c=!0,a=(0,s.LJ)(r,e),c=!1,i=!1,t(a,o),d()})),a=null,c=!1;return c=!0,a=(0,s.LJ)(r,e),c=!1,(0,n.kB)((function(){r&&(r.destroy(),r=null,a=null)}))}function l(e,t){let r=new o.M((function(){t(i,a)})),i=null;function a(){return r?(r.clear(),i=(0,s.LJ)(r,e),i):null}return a(),(0,n.kB)((function(){r&&(r.destroy(),r=null),i=null}))}function u(e){let t=new o.M((function n(){t&&!r&&(i?f(n):(t.clear(),i=!0,r=!0,(0,s.LJ)(t,e),r=!1,i=!1,d()))})),r=!1;return r=!0,(0,s.LJ)(t,e),r=!1,(0,n.kB)((function(){t&&(t.destroy(),t=null)}))}function f(e){a.includes(e)||a.unshift(e)}function d(){for(;a.length;)a.pop()()}},1153:(e,t,r)=>{"use strict";r.d(t,{NI:()=>l,Qc:()=>f,TS:()=>a,b6:()=>i,vw:()=>o});var n=r(50758),s=r(22974);function o(e){return e.__accessor__??null}function i(e,t){return null!=e&&e.metadatas&&null!=e.metadatas[t]}function a(e,t,r){return c(e,t,r?{policy:r,path:""}:null)}function c(e,t,r){return t?Object.keys(t).reduce(((e,n)=>{const o=n;let i=null,a="merge";if(r&&(i=r.path?`${r.path}.${n}`:n,a=r.policy(i)),"replace"===a)return e[o]=t[o],e;if("replace-arrays"===a&&Array.isArray(e[o]))return e[o]=t[o],e;if(void 0===e[o])return e[o]=(0,s.d9)(t[o]),e;let l=e[o],u=t[o];if(l===u)return e;if(Array.isArray(u)||Array.isArray(e))l=l?Array.isArray(l)?e[o]=l.concat():e[o]=[l]:e[o]=[],u&&(Array.isArray(u)||(u=[u]),u.forEach((e=>{l.includes(e)||l.push(e)})));else if(u&&"object"==typeof u)if(r){const t=r.path;r.path=i,e[o]=c(l,u,r),r.path=t}else e[o]=c(l,u,null);else e.hasOwnProperty(n)&&!t.hasOwnProperty(n)||(e[o]=u);return e}),e||{}):e}function l(e){return Array.isArray(e)?e:e.split(".")}function u(e){return e.includes(",")?e.split(",").map((e=>e.trim())):[e.trim()]}function f(e,t,r,s){const o=function(e){if(Array.isArray(e)){const t=[];for(const r of e)t.push(...u(r));return t}return u(e)}(t);if(1!==o.length){const t=o.map((t=>s(e,t,r)));return(0,n.AL)(t)}return s(e,o[0],r)}},26258:(e,t,r)=>{"use strict";r.d(t,{BT:()=>w,YP:()=>k,aQ:()=>T});var n=r(3894),s=r(50758),o=r(22974),i=r(71143);class a extends i.Z{constructor(){super(...arguments),this._set=new Set}destroy(){super.destroy(),this._set=null}acquire(...e){const t=super.acquire(...e);return this._set.delete(t),t}release(e){e&&!this._set.has(e)&&(super.release(e),this._set.add(e))}_dispose(e){this._set.delete(e),super._dispose(e)}}var c,l,u=r(1654),f=r(99001),d=r(67723),h=r(87538),p=r(1153);(l=c||(c={}))[l.Untracked=0]="Untracked",l[l.Tracked=1]="Tracked";class g{constructor(){this.uid=(0,f.D)(),this.removed=!1,this.type=null,this.oldValue=null,this.callback=null,this.getValue=null,this.target=null,this.path=null,this.equals=null}static acquireUntracked(e,t,r,n,s){return this.pool.acquire(c.Untracked,e,t,r,n,s,o.fS)}static acquireTracked(e,t,r,n){return this.pool.acquire(c.Tracked,e,t,r,null,null,n)}notify(e,t){this.type===c.Untracked?this.callback.call(this.target,e,t,this.path,this.target):this.callback.call(null,e,t,void 0,void 0)}acquire(e,t,r,n,s,o,i){this.uid=(0,f.D)(),this.removed=!1,this.type=e,this.oldValue=t,this.callback=r,this.getValue=n,this.target=s,this.path=o,this.equals=i}release(){this.target=this.path=this.oldValue=this.callback=this.getValue=null,this.uid=(0,f.D)(),this.removed=!0}}g.pool=new a(g);const y=new n.Z,b=new Set;let m;function v(e){b.delete(e),b.add(e),m||(m=(0,u.Os)(O))}function _(e){if(e.removed)return;const t=e.oldValue,r=e.getValue();e.equals(t,r)||(e.oldValue=r,e.notify(r,t))}function w(e){for(const t of b.values())t.target===e&&(t.removed=!0)}function O(){let e=10;for(;m&&e--;){m=null;const e=A(),t=y.acquire();for(const r of e){const e=r.uid;_(r),e===r.uid&&r.removed&&t.push(r)}for(const e of b)e.removed&&(t.push(e),b.delete(e));for(const e of t)g.pool.release(e);y.release(t),y.release(e),S.forEach((e=>e()))}}function A(){const e=y.acquire();e.length=b.size;let t=0;for(const r of b)e[t]=r,++t;return b.clear(),e}const S=new Set;function k(e,t,r,n=!1){return!e.__accessor__||e.__accessor__.destroyed?(0,s.kB)():n?function(e,t,r){const n=(0,p.Qc)(e,t,r,((e,t,r)=>{let s=!1;return(0,h.U5)((()=>(0,d.$z)(e,t)),((i,a)=>{e.__accessor__.destroyed?n.remove():s||(s=!0,(0,o.fS)(a,i)||r.call(e,i,a,t,e),s=!1)}))}));return n}(e,t,r):function(e,t,r){let n=(0,p.Qc)(e,t,r,((e,t,r)=>{let o,i,a=(0,h.Xz)((()=>(0,d.$z)(e,t)),((s,a)=>{e.__accessor__.destroyed||o&&o.uid!==i?n.remove():(o||(o=g.acquireUntracked(s,r,a,e,t),i=o.uid),v(o))}));return(0,s.kB)((()=>{a.remove(),o&&(o.uid!==i||o.removed||(o.removed=!0,v(o)),o=null),n=a=null}))}));return n}(e,t,r)}function T(e,t,r=!1,n=o.y7){return r?function(e,t,r){let n=!1;return(0,h.U5)(e,((e,s)=>{n||(n=!0,r(s,e)||t(e,s),n=!1)}))}(e,t,n):function(e,t,r){let n,o,i=(0,h.Xz)(e,((e,s)=>{n&&n.uid!==o?i.remove():(n||(n=g.acquireTracked(e,t,s,r),o=n.uid),v(n))}));return(0,s.kB)((()=>{i.remove(),n&&(n.uid!==o||n.removed||(n.removed=!0,v(n)),n=null),i=null}))}(e,t,n)}},76169:(e,t,r)=>{"use strict";r.d(t,{c:()=>h,d:()=>d});var n=r(67676),s=r(20102),o=r(92604),i=r(67723),a=r(31263),c=r(1153),l=r(53906);function u(e,t,r,n,s){const o={};return t.write?.writer?.call(e,n,o,r,s),o}function f(e,t,r,c,l,u){if(!c||!c.write)return!1;const f=(0,i.U2)(e,r);if(!l&&c.write.overridePolicy){const t=c.write.overridePolicy.call(e,f,r,u??void 0);void 0!==t&&(l=t)}if(l||(l=c.write),!l||!1===l.enabled)return!1;if((null===f&&!l.allowNull&&!l.writerEnsuresNonNull||void 0===f)&&l.isRequired){const t=new s.Z("web-document-write:property-required",`Missing value for required property '${r}' on '${e.declaredClass}'`,{propertyName:r,target:e});return t&&u&&u.messages?u.messages.push(t):t&&!u&&o.Z.getLogger("esri.core.accessorSupport.write").error(t.name,t.message),!1}return!(void 0===f||null===f&&!l.allowNull&&!l.writerEnsuresNonNull||!(l.alwaysWriteDefaults||t.store.multipleOriginsSupported&&t.store.originOf(r)!==a.s3.DEFAULTS)&&function(e,t,r,s,o){const i=s.default;if(void 0===i)return!1;if(null!=s.defaultEquals)return s.defaultEquals(o);if("function"==typeof i){if(Array.isArray(o)){const s=i.call(e,t,r??void 0);return(0,n.fS)(s,o)}return!1}return i===o}(e,r,u,c,f)||!l.ignoreOrigin&&u&&u.origin&&t.store.multipleOriginsSupported&&t.store.originOf(r)<(0,a.M9)(u.origin))}function d(e,t,r,n){const s=(0,c.vw)(e),o=s.metadatas,i=(0,l.Ah)(o[t],n);return!!i&&f(e,s,t,i,r,n)}function h(e,t,r){if(e&&"function"==typeof e.toJSON&&(!e.toJSON.isDefaultToJSON||!e.write))return(0,c.TS)(t,e.toJSON(r));const n=(0,c.vw)(e),s=n.metadatas;for(const o in s){const d=(0,l.Ah)(s[o],r);if(!f(e,n,o,d,void 0,r))continue;const h=(0,i.U2)(e,o),p=u(e,d,d.write&&"string"==typeof d.write.target?d.write.target:o,h,r);Object.keys(p).length>0&&(t=(0,c.TS)(t,p),r?.resources?.pendingOperations?.length&&r.resources.pendingOperations.push(Promise.all(r.resources.pendingOperations).then((()=>(0,c.TS)(t,p,(()=>"replace-arrays"))))),r&&r.writtenProperties&&r.writtenProperties.push({target:e,propName:o,oldOrigin:(0,a.Wm)(n.store.originOf(o)),newOrigin:r.origin}))}return t}},67676:(e,t,r)=>{"use strict";r.d(t,{FY:()=>y,Od:()=>b,SO:()=>f,Vx:()=>o,a9:()=>l,cq:()=>h,e$:()=>p,e5:()=>i,fS:()=>s,pC:()=>m,w6:()=>u,zG:()=>a});var n=r(77734);function s(e,t,r){if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)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}function o(e,t){let r=e.length!==t.length;r&&(e.length=t.length);for(let n=0;n<t.length;++n)e[n]!==t[n]&&(e[n]=t[n],r=!0);return r}function i(e,t,r){let n,s;return r?(n=t.filter((t=>!e.some((e=>r(e,t))))),s=e.filter((e=>!t.some((t=>r(t,e)))))):(n=t.filter((t=>!e.includes(t))),s=e.filter((e=>!t.includes(e)))),{added:n,removed:s}}function a(e){return e&&"number"==typeof e.length}const c=!!Array.prototype.fill;function l(e,t){if(c)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function u(e,t){void 0===t&&(t=e,e=0);const r=new Array(t-e);for(let n=e;n<t;n++)r[n-e]=n;return r}class f{constructor(){this.last=0}}const d=new f;function h(e,t,r,n){n=n||d;const s=Math.max(0,n.last-10);for(let o=s;o<r;++o)if(e[o]===t)return n.last=o,o;const o=Math.min(s,r);for(let r=0;r<o;++r)if(e[r]===t)return n.last=r,r;return-1}function p(e,t,r,n){const s=r??e.length,o=h(e,t,s,n);if(-1!==o)return e[o]=e[s-1],null==r&&e.pop(),t}const g=new Set;function y(e,t,r=e.length,n=t.length,s,o){if(0===n||0===r)return r;g.clear();for(let e=0;e<n;++e)g.add(t[e]);s=s||d;const i=Math.max(0,s.last-10);for(let t=i;t<r;++t)if(g.has(e[t])&&(o&&o.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;for(let t=0;t<i;++t)if(g.has(e[t])&&(o&&o.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;return g.clear(),r}function b(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}function m(e,t){return null!=e}new n.Z},60235:(e,t,r)=>{"use strict";r.d(t,{Mr:()=>a,XV:()=>i,x9:()=>c});var n=r(80442);const s=new Set;function o(e,t,r=!1){r&&s.has(t)||(r&&s.add(t),e.warn(`🛑 DEPRECATED - ${t}`))}function i(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{moduleName:n}=r;c(e,"Function: "+(n?n+"::":"")+t+"()",r)}}function a(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{moduleName:n}=r;c(e,"Property: "+(n?n+"::":"")+t,r)}}function c(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{replacement:n,version:s,see:i,warnOnce:a}=r;let c=t;n&&(c+=`\n\t🛠️ Replacement: ${n}`),s&&(c+=`\n\t⚙️ Version: ${s}`),i&&(c+=`\n\t🔗 See ${i} for more details.`),o(e,c,a)}}},91460:(e,t,r)=>{"use strict";r.d(t,{IH:()=>i,on:()=>o,vT:()=>s});var n=r(50758);function s(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function o(e,t,r){if(!s(e))throw new TypeError("target is not a Evented or EventTarget object");if("on"in e)return e.on(t,r);if(Array.isArray(t)){const s=t.slice();for(const t of s)e.addEventListener(t,r);return(0,n.kB)((()=>{for(const t of s)e.removeEventListener(t,r)}))}return e.addEventListener(t,r),(0,n.kB)((()=>e.removeEventListener(t,r)))}function i(e,t,r){if(!s(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const n=o(e,t,(t=>{n.remove(),r.call(e,t)}));return n}},50758:(e,t,r)=>{"use strict";r.d(t,{AL:()=>o,kB:()=>s});const n={remove:()=>{}};function s(e){return e?{remove(){e&&(e(),e=void 0)}}:n}function o(e){return s((()=>function(e){e.forEach((e=>e?.remove()))}(e)))}},80442:(e,t,r)=>{"use strict";let n;function s(e){return"function"==typeof n[e]?n[e]=n[e](globalThis):n[e]}r.d(t,{Z:()=>s}),n=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},s.add=(e,t,r,o)=>((o||void 0===n[e])&&(n[e]=t),r&&s(e)),s.cache=n,s.add("esri-deprecation-warnings",!0),s.add("esri-force-fullscreen-debug",!1),(()=>{s.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(s.add("host-browser",e),s.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),s.add("dom",e),s("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(s.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),s.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),s.add("khtml",r.includes("Konqueror")?n:void 0),s.add("edge",parseFloat(t.split("Edge/")[1])||void 0),s.add("opr",parseFloat(t.split("OPR/")[1])||void 0),s.add("webkit",!s("wp")&&!s("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),s.add("chrome",!s("edge")&&!s("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),s.add("android",!s("wp")&&parseFloat(t.split("Android ")[1])||void 0),s.add("safari",!r.includes("Safari")||s("wp")||s("chrome")||s("android")||s("edge")||s("opr")?void 0:parseFloat(r.split("Version/")[1])),s.add("mac",r.includes("Macintosh")),!s("wp")&&/(iPhone|iPod|iPad)/.test(t)){const e=RegExp.$1.replace(/P/,"p"),r=/OS ([\d_]+)/.test(t)?RegExp.$1:"1",n=parseFloat(r.replace(/_/,".").replaceAll("_",""));s.add(e,n),s.add("ios",n)}s("webkit")||(!t.includes("Gecko")||s("wp")||s("khtml")||s("edge")||s.add("mozilla",n),s("mozilla")&&s.add("ff",parseFloat(t.split("Firefox/")[1]||t.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&s.add("esri-mobile",t),r&&s.add("esri-iPhone",r),s.add("esri-geolocation",!!navigator.geolocation)}s.add("esri-wasm","WebAssembly"in globalThis),s.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t})),s.add("wasm-simd",(()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])))),s.add("esri-atomics","Atomics"in globalThis),s.add("esri-workers","Worker"in globalThis),s.add("web-feat:cache","caches"in globalThis),s.add("esri-workers-arraybuffer-transfer",!s("safari")||Number(s("safari"))>=12),s.add("workers-pool-size",8),s.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),s.add("featurelayer-simplify-payload-size-factors",[1,1,4]),s.add("featurelayer-animation-enabled",!0),s.add("featurelayer-snapshot-enabled",!0),s.add("featurelayer-snapshot-point-min-threshold",8e4),s.add("featurelayer-snapshot-point-max-threshold",4e5),s.add("featurelayer-snapshot-point-coverage",.1),s.add("featurelayer-advanced-symbols",!1),s.add("featurelayer-pbf",!0),s.add("featurelayer-pbf-statistics",!1),s.add("feature-layers-workers",!0),s.add("feature-polyline-generalization-factor",1),s.add("mapview-transitions-duration",200),s.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),s.add("mapserver-pbf-version-support",10.81),s.add("mapservice-popup-identify-max-tolerance",20),s.add("heatmap-allow-raster-fallback",!1),s.add("heatmap-force-raster",!1),s("host-webworker")||s("host-browser")&&(s.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),s.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{s.add("esri-image-decode",!0,!0,!0)})).catch((()=>{s.add("esri-image-decode",!1,!0,!0)}))}return!1})),s.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})()},66374:(e,t,r)=>{"use strict";function n(e){const t=[];return function*(){yield*t;for(const r of e)t.push(r),yield r}}function s(e,t){for(const r of e)if(null!=r&&t(r))return r}function o(e){return null!=e&&"function"==typeof e[Symbol.iterator]}r.d(t,{Fs:()=>n,TW:()=>o,sE:()=>s})},22974:(e,t,r)=>{"use strict";r.d(t,{Vo:()=>a,d9:()=>i,fS:()=>h,tZ:()=>c,y7:()=>p,yd:()=>o});var n=r(67676),s=r(1533);function o(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&o(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function i(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=d(e);if(null!=t)return t;if(c(e))return e.clone();if(l(e))return e.map(i);if(u(e))return e.clone();const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=i(e[t]);return r}function a(e){if(!e||"object"!=typeof e||"function"==typeof e||"HTMLElement"in globalThis&&e instanceof HTMLElement)return e;const t=d(e);if(null!=t)return t;if(l(e)){let t=!0;const r=e.map((e=>{const r=a(e);return null!=e&&null==r&&(t=!1),r}));return t?r:null}if(c(e))return e.clone();if(e instanceof File||e instanceof Blob)return e;if(!u(e)){const t=new(0,Object.getPrototypeOf(e).constructor);for(const r of Object.getOwnPropertyNames(e)){const n=e[r],s=a(n);if(null!=n&&null==s)return null;t[r]=s}return t}return null}function c(e){return"function"==typeof e.clone}function l(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function u(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function f(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function d(e){if((0,s.W0)(e)||(0,s.lq)(e)||(0,s.KZ)(e)||(0,s.z3)(e)||(0,s.Uc)(e)||(0,s.Hx)(e)||(0,s.ZY)(e)||(0,s.xZ)(e)||(0,s.fS)(e))return e.slice();if(e instanceof Date)return new Date(e.getTime());if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){const t=new Map;for(const[r,n]of e)t.set(r,i(n));return t}if(e instanceof Set){const t=new Set;for(const r of e)t.add(i(r));return t}return null}function h(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof(e||{}).getTime&&"function"==typeof(t||{}).getTime&&e.getTime()===t.getTime()||!1}function p(e,t){return e===t||(null==e||"string"==typeof e?e===t:"number"==typeof e?e===t||"number"==typeof t&&isNaN(e)&&isNaN(t):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():Array.isArray(e)?Array.isArray(t)&&(0,n.fS)(e,t):e instanceof Set?t instanceof Set&&function(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}(e,t):e instanceof Map?t instanceof Map&&function(e,t){if(e.size!==t.size)return!1;for(const[r,n]of e){const e=t.get(r);if(e!==n||void 0===e&&!t.has(r))return!1}return!0}(e,t):!!f(e)&&f(t)&&function(e,t){if(null===e||null===t)return!1;const r=Object.keys(e);if(null===t||Object.keys(t).length!==r.length)return!1;for(const n of r)if(e[n]!==t[n]||!Object.prototype.hasOwnProperty.call(t,n))return!1;return!0}(e,t))}},70586:(e,t,r)=>{"use strict";function n(e,t){if(null==e)throw new Error(t??"value is None")}function s(e){return e?.destroy(),null}function o(e){return e?.dispose(),null}function i(e){return e?.remove(),null}function a(e){return e?.abort(),null}function c(e){return e?.release(),null}function l(e,t,r){return null!=e&&null!=t?null!=r?r(e,t):e.equals(t):e===t}r.d(t,{IM:()=>a,M2:()=>o,O3:()=>n,RY:()=>c,SC:()=>s,_W:()=>l,hw:()=>i})},41213:(e,t,r)=>{"use strict";r.d(t,{Y:()=>s});const n=[];function s(e){n.push(e),1===n.length&&queueMicrotask((()=>{const e=n.slice();n.length=0;for(const t of e)t()}))}},78286:(e,t,r)=>{"use strict";r.d(t,{RB:()=>i,RH:()=>s,hS:()=>o});var n=r(22974);function s(e,t,r=!1){return c(e,t,r)}function o(e,t){if(null!=t)return t[e]||a(e.split("."),!1,t)}function i(e,t,r){const n=e.split("."),s=n.pop(),o=a(n,!0,r);o&&s&&(o[s]=t)}function a(e,t,r){let n=r;for(const r of e){if(null==n)return;if(!(r in n)){if(!t)return;n[r]={}}n=n[r]}return n}function c(e,t,r){return t?Object.keys(t).reduce(((e,s)=>{let o=e[s],i=t[s];return o===i?e:void 0===o?(e[s]=(0,n.d9)(i),e):(Array.isArray(i)||Array.isArray(e)?(o=o?Array.isArray(o)?e[s]=o.concat():e[s]=[o]:e[s]=[],i&&(Array.isArray(i)||(i=[i]),r?i.forEach((e=>{o.includes(e)||o.push(e)})):e[s]=i.concat())):i&&"object"==typeof i?e[s]=c(o,i,r):e.hasOwnProperty(s)&&!t.hasOwnProperty(s)||(e[s]=i),e)}),e||{}):e}},95330:(e,t,r)=>{"use strict";r.d(t,{e4:()=>S,UO:()=>A,OT:()=>O,zE:()=>l,hh:()=>E,Ds:()=>j,as:()=>_,WW:()=>w,R8:()=>v,D_:()=>m,Hc:()=>d,y8:()=>k,fu:()=>g,$F:()=>y,r9:()=>h,k_:()=>u,H9:()=>p,Yn:()=>N,gx:()=>T,Hl:()=>b});var n=r(50758);const s=(o=globalThis,{setTimeout:(e,t)=>{const r=o.setTimeout(e,t);return(0,n.kB)((()=>o.clearTimeout(r)))}});var o,i=r(20102),a=r(91460),c=(r(92604),r(70586));function l(e="Aborted"){return new i.Z("AbortError",e)}function u(e,t="Aborted"){if(d(e))throw l(t)}function f(e){return null!=e?"aborted"in e?e:e.signal:e}function d(e){const t=f(e);return null!=t&&t.aborted}function h(e){if(m(e))throw e}function p(e){if(!m(e))throw e}function g(e,t){const r=f(e);if(null!=r){if(!r.aborted)return(0,a.IH)(r,"abort",(()=>t()));t()}}function y(e,t){const r=f(e);if(null!=r)return u(r),(0,a.IH)(r,"abort",(()=>t(l())))}function b(e,t){return null==f(t)?e:new Promise(((r,n)=>{let s=g(t,(()=>n(l())));const o=()=>s=(0,c.hw)(s);e.then(o,o),e.then(r,n)}))}function m(e){return"AbortError"===e?.name}async function v(e){try{return await e}catch(e){if(!m(e))throw e;return}}async function _(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e),r=t.map((t=>e[t])),n=await _(r),s={};return t.map(((e,t)=>s[e]=n[t])),s}const t=e;return Promise.allSettled(t).then((e=>Array.from(t,((t,r)=>{const n=e[r];return"fulfilled"===n.status?{promise:t,value:n.value}:{promise:t,error:n.reason}}))))}async function w(e){return(await _(e)).filter((e=>!!e.value)).map((e=>e.value))}async function O(e){return(await Promise.allSettled(e)).filter((e=>"fulfilled"===e.status)).map((e=>e.value))}async function A(e){return(await Promise.allSettled(e)).filter((e=>"rejected"===e.status)).map((e=>e.reason))}function S(e,t=void 0,r){const n=new AbortController;return g(r,(()=>n.abort())),new Promise(((r,s)=>{let o=setTimeout((()=>{o=0,r(t)}),e);g(n,(()=>{o&&(clearTimeout(o),s(l()))}))}))}function k(e){return e&&"function"==typeof e.then}function T(e){return k(e)?e:Promise.resolve(e)}function j(e,t=-1){let r,n,s,o,i=null;const a=(...c)=>{if(r){n=c,o&&o.reject(l()),o=E();const e=o.promise;if(i){const e=i;i=null,e.abort()}return e}if(s=o||E(),o=null,t>0){const n=new AbortController;r=T(e(...c,n.signal));const s=r;S(t).then((()=>{r===s&&(o?n.abort():i=n)}))}else r=1,r=T(e(...c));const u=()=>{const e=n;n=s=r=i=null,null!=e&&a(...e)},f=r,d=s;return f.then(u,u),f.then(d.resolve,d.reject),d.promise};return a}function E(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n})),n=t=>{e(t)};return n.resolve=t=>e(t),n.reject=e=>t(e),n.timeout=(e,t)=>s.setTimeout((()=>n.reject(t)),e),n.promise=r,n}async function N(e){await Promise.resolve(),u(e)}},1654:(e,t,r)=>{"use strict";r.d(t,{MU:()=>v,Os:()=>g});var n=r(41213),s=r(54790),o=r(44553),i=r(95330),a=r(76882);class c{constructor(e){this.callback=e,this.isActive=!0}remove(){this.isActive=!1}}let l=0;const u={time:(0,a.HA)(0),deltaTime:(0,a.HA)(0),elapsedFrameTime:(0,a.HA)(0),frameDuration:(0,a.HA)(0)},f=["prepare","preRender","render","postRender","update","finish"],d=[],h=new o.Z,p={frameTasks:h,willDispatch:!1,clearFrameTasks:function(e=!1){h.forAll((e=>{e.removed=!0})),e&&b()},dispatch:m,executeFrameTasks:function(e){const t=(0,a.HA)(e-l);l=e;const r=1e3/60,n=Math.max(0,t-r);u.time=e,u.frameDuration=(0,a.HA)(r-n);for(let r=0;r<f.length;r++){const n=performance.now(),s=f[r];h.forAll((n=>{n.paused||n.removed||(0===r&&n.ticks++,n.phases[s]&&(u.elapsedFrameTime=(0,a.HA)(performance.now()-e),u.deltaTime=0===n.ticks?(0,a.HA)(0):t,n.phases[s]?.call(n,u)))})),_[r].record(performance.now()-n)}b(),w.record(performance.now()-e)}};function g(e){const t=new c(e);return d.push(t),p.willDispatch||(p.willDispatch=!0,(0,n.Y)(m)),t}const y=new o.Z;function b(){h.forAll((e=>{e.removed&&y.push(e)})),h.removeUnorderedMany(y.data,y.length),y.clear()}function m(){for(;d.length;){const e=d.shift();e.isActive&&e.callback()}p.willDispatch=!1}function v(e=1,t){const r=(0,i.hh)(),s=()=>{(0,i.Hc)(t)?r.reject((0,i.zE)()):0===e?r():(--e,(0,n.Y)((()=>s())))};return s(),r.promise}const _=f.map((e=>new s.Z(e))),w=new s.Z("total")},19153:(e,t,r)=>{"use strict";r.d(t,{Cb:()=>l,Qs:()=>a,gx:()=>i,hP:()=>c});var n=r(78286);const s=/\{([^\}]+)\}/g;function o(e){return e??""}function i(e,t){return e.replaceAll(s,"object"==typeof t?(e,r)=>o((0,n.hS)(r,t)):(e,r)=>o(t(r)))}function a(e,t){return e.replaceAll(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,(e=>t&&t.includes(e)?e:`\\${e}`))}function c(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function l(e){return(new DOMParser).parseFromString(e||"","text/html").body.innerText||""}},76882:(e,t,r)=>{"use strict";function n(e){return e}r.d(t,{HA:()=>n})},1533:(e,t,r)=>{"use strict";function n(e){return e instanceof ArrayBuffer}function s(e){return"Int8Array"===e?.constructor?.name}function o(e){return"Uint8Array"===e?.constructor?.name}function i(e){return"Uint8ClampedArray"===e?.constructor?.name}function a(e){return"Int16Array"===e?.constructor?.name}function c(e){return"Uint16Array"===e?.constructor?.name}function l(e){return"Int32Array"===e?.constructor?.name}function u(e){return"Uint32Array"===e?.constructor?.name}function f(e){return"Float32Array"===e?.constructor?.name}function d(e){return"Float64Array"===e?.constructor?.name}function h(e){return!("buffer"in e)}function p(e){return null!=e?h(e)?8*e.length+12:e.byteLength+g:0}r.d(t,{B3:()=>b,DB:()=>y,Hx:()=>l,KZ:()=>i,Op:()=>v,Q7:()=>m,Uc:()=>c,W0:()=>s,Xw:()=>p,ZY:()=>u,eP:()=>n,fS:()=>d,kJ:()=>h,lq:()=>o,xZ:()=>f,z3:()=>a}),r(80442);const g=145,y=1024;function b(e){return d(e)||f(e)||l(e)||a(e)||s(e)}function m(e){return d(e)||f(e)}function v(e){return d(e)?179769e303:f(e)?3402823e32:u(e)?4294967295:c(e)?65535:o(e)||i(e)?255:l(e)?2147483647:a(e)?32767:s(e)?127:256}},99001:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});let n=0;function s(){return++n}},17452:(e,t,r)=>{"use strict";r.d(t,{$U:()=>ae,AH:()=>Q,B7:()=>N,D6:()=>z,Fv:()=>W,HK:()=>Y,Hu:()=>ye,IR:()=>we,Ie:()=>pe,L:()=>T,Ml:()=>ve,P$:()=>G,PF:()=>J,Qj:()=>he,R9:()=>w,TI:()=>k,YP:()=>V,Yd:()=>fe,ZN:()=>be,Zo:()=>R,_l:()=>re,b7:()=>C,ed:()=>U,fZ:()=>_e,fl:()=>me,fw:()=>ne,hF:()=>H,hO:()=>ce,io:()=>se,jc:()=>K,kl:()=>q,mN:()=>j,oC:()=>oe,oh:()=>D,qg:()=>P,rS:()=>X,sJ:()=>te,tD:()=>$,tm:()=>L,u0:()=>E,v_:()=>Z,vt:()=>de});var n=r(68773),s=r(67676),o=r(20102),i=r(96674),a=r(92604),c=r(19745),l=r(49917);const u=a.Z.getLogger("esri.core.urlUtils"),f=n.default.request,d="esri/config: esriConfig.request.proxyUrl is not set.",h=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,p=/^\s*http:/i,g=/^\s*https:/i,y=/^\s*file:/i,b=/:\d+$/,m=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,v=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),_=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");class w{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let t=this.uri.match(v);this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=this.authority.match(_),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const O={};let A=new w(n.default.applicationUrl);let S=function(){const e=A.path,t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${A.scheme}://${A.host}${null!=A.port?`:${A.port}`:""}${t}`}();const k=()=>A,T=()=>S;function j(e){if(!e)return null;const t={path:null,query:null},r=new w(e),n=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.substring(0,n),t.query=E(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.substring(0,t.path.length-(r.fragment.length+1)))),t}function E(e){const t=e.split("&"),r={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let n,s;t<0?(n=decodeURIComponent(e),s=""):(n=decodeURIComponent(e.slice(0,t)),s=decodeURIComponent(e.slice(t+1)));let o=r[n];"string"==typeof o&&(o=r[n]=[o]),Array.isArray(o)?o.push(s):r[n]=s}return r}function N(e,t){return e?t&&"function"==typeof t?Object.keys(e).map((r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r])))).join("&"):Object.keys(e).map((r=>{const n=e[r];if(null==n)return"";const s=encodeURIComponent(r)+"=",o=t&&t[r];return o?s+encodeURIComponent(o(n)):Array.isArray(n)?n.map((e=>(0,i.AK)(e)?s+encodeURIComponent(JSON.stringify(e)):s+encodeURIComponent(e))).join("&"):(0,i.AK)(n)?s+encodeURIComponent(JSON.stringify(n)):s+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function C(e=!1){let t,r=f.proxyUrl;if("string"==typeof e){t=ae(e);const n=U(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw u.warn(d),new o.Z("urlutils:proxy-not-set",d);return t&&le()&&(r=ce(r)),j(r)}function P(e){const t=U(e);let r,n;if(t){const e=I(t.proxyUrl);r=e.path,n=e.query?E(e.query):null}if(r){const t=j(e);e=r+"?"+t.path;const s=N({...n,...t.query});s&&(e=`${e}?${s}`)}return e}const M={path:"",query:""};function I(e){const t=e.indexOf("?");return-1!==t?(M.path=e.slice(0,t),M.query=e.slice(t+1)):(M.path=e,M.query=null),M}function x(e){return(e=ue(e=function(e){return e&&"/"===e[e.length-1]?e:`${e}/`}(e=I(e).path),!0)).toLowerCase()}function $(e){const t={proxyUrl:e.proxyUrl,urlPrefix:x(e.urlPrefix)},r=f.proxyRules,n=t.urlPrefix;let s=r.length;for(let e=0;e<r.length;e++){const t=r[e].urlPrefix;if(0===n.indexOf(t)){if(n.length===t.length)return-1;s=e;break}0===t.indexOf(n)&&(s=e+1)}return r.splice(s,0,t),s}function U(e){const t=f.proxyRules,r=x(e);for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e].urlPrefix))return t[e]}function R(e,t){if(!e||!t)return!1;e=B(e),t=B(t);const r=(0,c.a)(e),n=(0,c.a)(t);return null!=r&&null!=n?r.portalHostname===n.portalHostname:null==r&&null==n&&z(e,t,!0)}function L(e,t){return e=B(e),t=B(t),ue(e)===ue(t)}function B(e){const t=(e=W(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function D(e){const t=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t),r=f.interceptors;if(r)for(const e of r)if(Array.isArray(e.urls)){if(e.urls.some(t))return e}else if(t(e.urls))return e;return null}function z(e,t,r=!1){if(!e||!t)return!1;const n=ge(e),s=ge(t);return!(!r&&n.scheme!==s.scheme)&&null!=n.host&&null!=s.host&&n.host.toLowerCase()===s.host.toLowerCase()&&n.port===s.port}function q(e){if("string"==typeof e){if(!V(e))return!0;e=ge(e)}if(z(e,A))return!0;const t=f.trustedServers||[];for(let r=0;r<t.length;r++){const n=F(t[r]);for(let t=0;t<n.length;t++)if(z(e,n[t]))return!0}return!1}function F(e){return O[e]||(ie(e)||oe(e)?O[e]=[new w(H(e))]:O[e]=[new w(`http://${e}`),new w(`https://${e}`)]),O[e]}function H(e,t=S,r){return oe(e)?r&&r.preserveProtocolRelative?e:"http"===A.scheme&&A.authority===G(e).slice(2)?`http:${e}`:`https:${e}`:ie(e)?e:Z("/"===e[0]?function(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}(t):t,e)}function J(e,t=S,r){if(null==e||!V(e))return e;const n=W(e),s=n.toLowerCase(),o=W(t).toLowerCase().replace(/\/+$/,""),i=r?W(r).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==o.indexOf(i))return e;const a=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let c=a(s,"/",s.indexOf("//")+2),l=-1;for(;s.slice(0,c+1)===o.slice(0,c)+"/"&&(l=c+1,c!==s.length);)c=a(s,"/",c+1);if(-1===l)return e;if(i&&l<i.length)return e;e=n.slice(l);const u=o.slice(l-1).replaceAll(/[^/]+/g,"").length;if(u>0)for(let t=0;t<u;t++)e=`../${e}`;else e=`./${e}`;return e}function W(e){return function(e){const t=f.httpsDomains;if(!function(e){return null!=e&&p.test(e)||"http"===A.scheme&&oe(e)}(e))return e;const r=e.indexOf("/",7);let n;if(n=-1===r?e:e.slice(0,r),n=n.toLowerCase().slice(7),b.test(n)){if(!n.endsWith(":80"))return e;n=n.slice(0,-3),e=e.replace(":80","")}return"http"===A.scheme&&n===A.authority&&!m.test(e)||(le()&&n===A.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||le()&&!U(e))&&(e=ce(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=I(e);e=(e=t.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=H(e=e.trim()))))}function Z(...e){const t=e.filter(s.pC);if(!t||!t.length)return;const r=[];if(V(t[0])){const e=t[0],n=e.indexOf("//");-1!==n&&(r.push(e.slice(0,n+1)),function(e){return null!=e&&y.test(e)}(t[0])&&(r[0]+="/"),t[0]=e.slice(n+2))}else"/"===t[0][0]&&r.push("");const n=t.reduce(((e,t)=>t?e.concat(t.split("/")):e),[]);for(let e=0;e<n.length;e++){const t=n[e];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&e===n.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function G(e,t=!1){if(null==e||K(e)||Y(e))return null;let r=e.indexOf("://");if(-1===r&&oe(e))r=2;else{if(-1===r)return null;r+=3}const n=e.indexOf("/",r);return-1!==n&&(e=e.slice(0,n)),t&&(e=ue(e,!0)),e}function V(e){return oe(e)||ie(e)}function K(e){return null!=e&&"blob:"===e.slice(0,5)}function Y(e){return null!=e&&"data:"===e.slice(0,5)}function Q(e){const t=te(e);return t&&t.isBase64?(0,l.R)(t.data):null}function X(e){return(0,l.s)(e).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const ee=/^data:(.*?)(;base64)?,(.*)$/;function te(e){const t=e.match(ee);if(!t)return null;const[,r,n,s]=t;return{mediaType:r,isBase64:!!n,data:s}}function re(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}function ne(e){const t=Q(e);if(!t)return null;const r=te(e);return new Blob([t],{type:r.mediaType})}function se(e,t){!function(e,t){if(!e)return!1;const r=document.createElement("a");if(!("download"in r))return!1;const n=URL.createObjectURL(e);r.download=t,r.href=n,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}(e,t)}function oe(e){return null!=e&&"/"===e[0]&&"/"===e[1]}function ie(e){return null!=e&&h.test(e)}function ae(e){return null!=e&&g.test(e)||"https"===A.scheme&&oe(e)}function ce(e){return oe(e)?`https:${e}`:e.replace(p,"https:")}function le(){return"https"===A.scheme}function ue(e,t=!1){return oe(e)?e.slice(2):(e=e.replace(h,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function fe(e){let t=0;if(V(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function de(e,t){if(!e)return"";const r=j(e).path.replace(/\/+$/,""),n=r.substring(r.lastIndexOf("/")+1);if(!t?.length)return n;const s=new RegExp(`.(${t.join("|")})$`,"ig");return n.replace(s,"")}function he(e){return e.replace(/\/+$/,"")}function pe(e,t,r){if(!(t&&r&&e&&V(e)))return e;const n=e.indexOf("//"),s=e.indexOf("/",n+2),o=e.indexOf(":",n+2),i=Math.min(s<0?e.length:s,o<0?e.length:o);return e.slice(n+2,i).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,n+2)}${r}${e.slice(i)}`}function ge(e){return"string"==typeof e?new w(H(e)):(e.scheme||(e.scheme=A.scheme),e)}function ye(e,t){const r=j(e),n=Object.keys(r.query||{});return n.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function be(e,t,r){const n=j(e),s=n.query||{};return s[t]=String(r),`${n.path}?${N(s)}`}function me(e,t){const r=j(e),n=r.query||{};for(const e in t)n[e]=t[e];const s=N(n);return s?`${r.path}?${s}`:r.path}function ve(e){if(null==e)return null;const t=e.match(Oe);return t?t[2]:null}function _e(e){if(null==e)return null;const t=e.match(Oe);return t?{path:t[1],extension:t[2]}:{path:e,extension:null}}async function we(e){return"string"==typeof e?te(e)??{data:e}:new Promise(((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(te(n.result)),n.onerror=e=>r(e)}))}const Oe=/([^.]*)\.([^\/]*)$/},728:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>v});var n=r(40330),s=r(20102),o=r(91460),i=r(50758),a=r(70586),c=r(95330);const l={statsWorker:()=>Promise.all([r.e(1622),r.e(3314),r.e(5712),r.e(6841)]).then(r.bind(r,36841)),geometryEngineWorker:()=>Promise.all([r.e(5837),r.e(8228)]).then(r.bind(r,48227)),CSVSourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(7096)]).then(r.bind(r,27793)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(7681),r.e(6314),r.e(9594)]).then(r.bind(r,49594)),ElevationSamplerWorker:()=>Promise.all([r.e(4547),r.e(1622),r.e(3314),r.e(6481),r.e(6459),r.e(749)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(7126),r.e(5983),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(4599),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(4565),r.e(5545),r.e(5967)]).then(r.bind(r,65967)),GeoJSONSourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(3422),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(3422),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(1622),r.e(3314),r.e(9561),r.e(802)]).then(r.bind(r,10802)),Pipeline:()=>Promise.all([r.e(7126),r.e(5983),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(4599),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(4565),r.e(4325),r.e(5545),r.e(7937)]).then(r.bind(r,27937)),PointCloudWorker:()=>Promise.all([r.e(4547),r.e(1622),r.e(3314),r.e(4266),r.e(6122)]).then(r.bind(r,90447)),RasterWorker:()=>Promise.all([r.e(4547),r.e(1622),r.e(3314),r.e(6610),r.e(7420),r.e(4035)]).then(r.bind(r,61576)),SceneLayerSnappingSourceWorker:()=>Promise.all([r.e(6481),r.e(7681),r.e(6314),r.e(3248)]).then(r.bind(r,73248)),SceneLayerWorker:()=>Promise.all([r.e(3314),r.e(1412)]).then(r.bind(r,31412)),WFSSourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(3422),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(4325),r.e(9805),r.e(4982),r.e(284)]).then(r.bind(r,56456))};var u=r(94362),f=r(17202);const{CLOSE:d,ABORT:h,INVOKE:p,RESPONSE:g,OPEN_PORT:y,ON:b}=u.MessageType;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===u.MessageType.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class v{static connect(e){const t=new MessageChannel;let r;r="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const n=new v(t.port1,{channel:t,client:r},(()=>null));return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=n),v.clients.set(n,r),t.port2}static loadWorker(e){const t=l[e];return t?t():Promise.resolve(null)}constructor(e,t,r){this._port=e,this._getNextJob=r,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}close(){this._post({type:d}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){const n=r?.signal,o=r?.transferList;if(!this._port)return Promise.reject(new s.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const i=(0,u.jt)();return new Promise(((r,s)=>{if((0,c.Hc)(n))return this._processWork(),void s((0,c.zE)());const l=(0,c.fu)(n,(()=>{const e=this._outJobs.get(i);e&&(this._outJobs.delete(i),this._processWork(),(0,a.hw)(e.abortHandle),this._post({type:h,jobId:i}),s((0,c.zE)()))})),u={resolve:r,reject:s,abortHandle:l,debugInfo:e};this._outJobs.set(i,u),this._post({type:p,jobId:i,methodName:e,abortable:null!=n},t,o)}))}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:u.MessageType.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),(0,i.kB)((()=>{r.port1.postMessage({type:u.MessageType.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",n)}))}jobAdded(){this._processWork()}openPort(){const e=new MessageChannel;return this._post({type:y,port:e.port2}),e.port1}_processWork(){if(this._outJobs.size>=2)return;const e=this._getNextJob();if(!e)return;const{methodName:t,data:r,invokeOptions:n,resolver:s}=e;this.invoke(t,r,n).then((e=>s.resolve(e))).catch((e=>s.reject(e)))}_close(){this._channel&&(this._channel=void 0),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{(0,a.hw)(e.abortHandle),e.reject((0,c.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=null,this._client=null,this._schedule=null}_onMessage(e){null!=this._schedule?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,u.QM)(e);if(t)switch(t.type){case g:this._onResponseMessage(t);break;case p:this._invokeQueue.push(t);break;case h:this._onAbortMessage(t);break;case d:this._onCloseMessage();break;case y:this._onOpenPortMessage(t);break;case b:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);this._invokeQueue.push(e),n&&(n.controller&&n.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&v.clients.get(this)===e&&e.destroy(),v.clients.delete(this),e?.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:s}=e,o=s?new AbortController:null,i=this._inJobs;let a,l=this._client,f=l[t];try{if(!f&&t&&t.includes(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)l=l[e[t]],f=l[e[t+1]]}if("function"!=typeof f)throw new TypeError(`${t} is not a function`);a=f.call(l,n,{client:this,signal:o?o.signal:null})}catch(e){return void this._post({type:g,jobId:r,error:(0,u.AB)(e)})}(0,c.y8)(a)?(i.set(r,{controller:o,promise:a}),a.then((e=>{i.has(r)&&(i.delete(r),this._post({type:g,jobId:r},e))}),(e=>{i.has(r)&&(i.delete(r),(0,c.D_)(e)||this._post({type:g,jobId:r,error:(0,u.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:g,jobId:r},a)}_onOpenPortMessage(e){new v(e.port,{client:this._client},(()=>null))}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,(e=>{t.postMessage(e)})),n=(0,o.on)(e.port,"message",(e=>{const s=(0,u.QM)(e);s?.type===u.MessageType.CLOSE&&(n.remove(),r.remove(),t.close())}))}_onResponseMessage(e){const{jobId:t,error:r,data:n}=e,o=this._outJobs;if(!o.has(t))return;const i=o.get(t);o.delete(t),this._processWork(),(0,a.hw)(i.abortHandle),r?i.reject(s.Z.fromJSON(JSON.parse(r))):i.resolve(n)}_post(e,t,r){return(0,u.oi)(this._port,e,t,r)}}v.kernelInfo={buildDate:f.r,fullVersion:n.bR,revision:f.$},v.clients=new Map},94362:(e,t,r)=>{"use strict";r.d(t,{AB:()=>a,MessageType:()=>n,QM:()=>l,jt:()=>i,oi:()=>c});var n,s=r(80442);!function(e){e[e.HANDSHAKE=0]="HANDSHAKE",e[e.OPEN=1]="OPEN",e[e.OPENED=2]="OPENED",e[e.RESPONSE=3]="RESPONSE",e[e.INVOKE=4]="INVOKE",e[e.ABORT=5]="ABORT",e[e.CLOSE=6]="CLOSE",e[e.OPEN_PORT=7]="OPEN_PORT",e[e.ON=8]="ON"}(n||(n={}));let o=0;function i(){return o++}function a(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function c(e,t,r,o){if(t.type===n.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==n.INVOKE&&t.type!==n.RESPONSE)return void e.postMessage(t);let i;if(function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(i=u(r.transferList),t.data=r.result):(i=u(o),t.data=r),i){if((0,s.Z)("ff"))for(const r of i)if("byteLength"in r&&r.byteLength>267386880){const r="Worker call with large ArrayBuffer would crash Firefox";switch(t.type){case n.INVOKE:throw r;case n.RESPONSE:return void c(e,{type:n.RESPONSE,jobId:t.jobId,error:a(r)})}}e.postMessage(t,i)}else e.postMessage(t)}function l(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function u(e){if(!e||!e.length)return null;if((0,s.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||"ArrayBuffer"===e?.constructor?.name}(e)));return t.length?t:null}},40330:(e,t,r)=>{"use strict";r.d(t,{Dp:()=>f,Nv:()=>c,bR:()=>a,i8:()=>i,id:()=>l,qh:()=>u});var n=r(80442),s=r(17452),o=r(17202);const i="4.28";let a=i;a=`4.28.0-next.${o.r}`;const c={async request(e,t){const{default:n}=await r.e(3172).then(r.bind(r,3172)),o=e.options,i=o.responseType;o.signal=t?.signal,o.responseType="native"===i||"native-request-init"===i?"native-request-init":i&&["blob","json","text"].includes(i)&&(0,s.oh)(e.url)?.after?i:"array-buffer";const a=await n(e.url,o),c={data:a.data,httpStatus:a.httpStatus,ssl:a.ssl};switch(a.requestOptions?.responseType){case"native-request-init":return delete c.data.signal,c;case"blob":c.data=await c.data.arrayBuffer();break;case"json":c.data=(new TextEncoder).encode(JSON.stringify(c.data)).buffer;break;case"text":c.data=(new TextEncoder).encode(c.data).buffer}return{result:c,transferList:[c.data]}}};let l;function u(e){l=e}function f(e){const t=l?.findCredential(e);return t?.token?(0,s.ZN)(e,"token",t.token):e}(0,n.Z)("host-webworker")},19745:(e,t,r)=>{"use strict";r.d(t,{P:()=>i,a:()=>o});const n=/^https:\/\/([a-z\d-]+)(\.maps([^.]*))?\.arcgis\.com/i,s={devext:{customBaseUrl:"mapsdevext.arcgis.com",portalHostname:"devext.arcgis.com"},qaext:{customBaseUrl:"mapsqa.arcgis.com",portalHostname:"qaext.arcgis.com"},www:{customBaseUrl:"maps.arcgis.com",portalHostname:"www.arcgis.com"}};function o(e){const t=e?.match(n);if(!t)return null;const[,r,o,i]=t;if(!r)return null;let a=null,c=null,l=null;const{devext:u,qaext:f,www:d}=s;if(o)if(a=r,i)switch(i.toLowerCase()){case"devext":({customBaseUrl:c,portalHostname:l}=u);break;case"qa":({customBaseUrl:c,portalHostname:l}=f);break;default:return null}else({customBaseUrl:c,portalHostname:l}=d);else switch(r.toLowerCase()){case"devext":({customBaseUrl:c,portalHostname:l}=u);break;case"qaext":({customBaseUrl:c,portalHostname:l}=f);break;case"www":({customBaseUrl:c,portalHostname:l}=d);break;default:return null}return{customBaseUrl:c,isPortal:!1,portalHostname:l,urlKey:a}}function i(e){return/\/(sharing|usrsvcs)\/(appservices|servers)\//i.test(e)}},49917:(e,t,r)=>{"use strict";function n(e){const t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r.buffer}function s(e){const t=new Uint8Array(e);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return btoa(r)}r.d(t,{R:()=>n,s:()=>s})},17202:(e,t,r)=>{"use strict";r.d(t,{$:()=>s,r:()=>n});const n="20230707",s="01b55fb4a3c9695c446ac07371daa50310d0cbad"}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.m=e,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"chunks/"+{7:"5583921a498172edd5ac",17:"7a898d167029ee11a680",24:"7d9d2629af373c84624f",163:"14d6afec657bf93a3d06",223:"536962375ce4f1394481",247:"a9f83bbccf3b5f229262",284:"64bb4093c019a02d5309",448:"9e5f59a8e8f12cd9e5e0",450:"00b023cb63f23bc074b8",540:"fcec1e27531633cfc99c",565:"6e562fa57c0347091154",576:"c5c56b6d99db96a6755a",639:"3048157f4f13d22c1753",749:"1cbb03eec9dc23ef043b",802:"7fbdfd1527582c52f9b6",819:"d1ead6e8aa7e8e21fbc6",822:"408b790d24bea4181ede",837:"2f5f398374ff77fb17f0",853:"c912466351e37db68b6c",889:"e70314ac10cc1f8f9f86",1007:"0b28b5eec6dc67be8ce9",1073:"d0d9dcf9a06762087f08",1074:"77fcc4fc0fb3739365f6",1158:"803e81ff317e3082ebd5",1194:"30deb5a8e9a82186991d",1231:"b43c55fbb35dbcff2b69",1412:"fe277d33b5b8a11c76df",1421:"93e17ab3bc56ceea928d",1423:"417377c8e76944f428a7",1433:"4d5bdf18feeb9c8cb6ff",1444:"086173d3ada7857eea15",1534:"3bbaa78c68a4bf159722",1537:"8e1879242f9b5a4940cb",1622:"9f5337a80963e0b3c009",1773:"eb4eec67a4b9f39a3948",1790:"a8f094ca487bd794f766",1888:"e039108eb3a592f6d8e3",1900:"f6040205c50e2795a1a0",1965:"6dcffe6683a798a42c78",2134:"c16ec2f614844b3191c0",2220:"0f57b8d4fa3afb296392",2462:"0a0af540f4fe64c3d292",2594:"ad38aede3ec854191511",2637:"fb97d39b25b0b009d2f0",2664:"08ea1b3090a393cfa162",2763:"3736e17dd6461f74cfaf",3025:"3a0b45ecc48e23a3a5d5",3027:"52731ab6856abb7cb5fd",3172:"dcccc9760998271254b5",3230:"bb28207cae9e3cfc71c5",3248:"cb763c42379341b94d1e",3314:"f4549e1a149324297fa7",3422:"dda6fab95d50c1215808",3529:"afdf30439d71a7cc19ae",3582:"3155c750fc5a4e04a785",3668:"f156387d6c645b18a8dd",3852:"f0c62bb406bb93b1408a",3887:"d86ec98a0582cd3dfe8c",3919:"2c2cab197c47f080772a",3992:"b68f207f29808c1d8eb4",4035:"346f67995b327bca8ee0",4166:"60b422009f58d7bbb8c4",4202:"25187c5e6a04917d3519",4266:"ea478f2f4a19463e13fd",4325:"953407451813f406fdf1",4358:"4a2a0091cd830b6a1729",4371:"bedb5d399dbeff7526ba",4466:"c9ef45225947ccc2bd4c",4475:"d981e2e90b8ce617116f",4499:"ee21b5ac2afa00d00e9d",4547:"fdcb37a99392c348cc3f",4565:"1747cb9ee7b0674aaa64",4578:"3a0e2535f6cdb2e65667",4599:"812cba53143565a825f1",4609:"308f3811dfa71f619279",4695:"308eeeaec591b4eea1de",4720:"27fec382097efdcfee8a",4727:"ce7f575a6c2053c7ca17",4788:"da17d217222d6aee4c3e",4828:"044b15794b6403792f04",4885:"f74d4e1eecec06f84ee2",4982:"740dc67038f554431f1b",5235:"f073ed545e8380be2091",5242:"e86dcc239c6a57000afc",5243:"212417c115cd1b21b94d",5245:"1d2b8b937bbda91a6549",5329:"0e21e5b4d065567a6a91",5334:"80bf6cf1bef17215bca4",5389:"d08800a30b1227591986",5394:"e0dfd109e860371d7323",5428:"fe57c5de660e28ec253b",5481:"d5009010aefb5cd41099",5545:"1e413a44b35bfecbfa59",5575:"b8171b4c6f3b37e367ce",5642:"5e4dde2886a1027b4b96",5660:"4e2029c8cc8a5afe5759",5712:"26212a08ea383547335b",5732:"83f7e22a12d90ef93e62",5837:"277a477446d6644aada6",5935:"60a08ce29d09cb07ef06",5967:"730eb7e5f617fdab4f10",5983:"1c4475057483041418c3",6004:"928431e1c449c6054547",6122:"10028df973ef7f9531c8",6124:"5ae63d31468222841d62",6138:"87bb6b8f464727d58a64",6233:"766f397dfdfbc0eb72d1",6237:"8a7fa4e8b0d14da7c9eb",6261:"98c2445fd3cd5d200a6d",6314:"f2d399b394a1a9156214",6399:"3835a76c017431f19422",6459:"50b17799f1abce982a19",6481:"f6c39edd04cb96d98240",6565:"b20167d9163d0ee74b65",6610:"fb7eff7f76386f81d57b",6695:"0d805fd9cd9ff3a636ca",6710:"1fc3b526e881ada30420",6748:"c09db831248054600e16",6774:"0f04978e8342d9a35e59",6841:"d9fe6cfbc9ad2920ca9c",6946:"6fdfb71558958f2a265d",7096:"71c029f95cb4666ae207",7126:"e0499f45b098450b80b4",7215:"6cf5949a4754b18c08ec",7316:"b94b432173b3bd6a318e",7374:"1c86f80d73dee1a4d9b7",7420:"4804020020afbe5c9450",7446:"05f3374114bce72d3560",7476:"e3b5c22ce4290c19679e",7528:"d2f9988b576ac968dd92",7681:"885cb0da78e6853b23a4",7794:"4f92fd5167e22c602e8a",7845:"f3225ae2673562f2592d",7873:"c4eb3bd0e9cba4b20510",7937:"69de4733173ee2dee6e1",8008:"289061552a2a64bebd76",8024:"036cd65514eab1749363",8062:"4806116da11ef5192af3",8079:"6d084a1a8cd4d01db22f",8092:"f1b26b73101210b8f29c",8096:"0a6297f5ccffd392b27a",8153:"d4cb1cdd1cc5240526de",8159:"c4b066760e9aa85b7607",8228:"e5352dc8983d06d4ee0f",8244:"37e60f9ca86f9d4bf4ea",8522:"498dca81073e1fb477b9",8598:"95115370c2d1e1ae592d",8636:"36e6037ec266061966d6",8758:"595a2baa04d92de59558",8828:"4922a0fed7cbc6895882",8855:"b1fa1571fd98d3b8dffe",8949:"dabd889e064c4e7807fa",9059:"8d50449c029c73136204",9169:"cfad34c949cbe8a31ef8",9238:"8e28862296972e9e6f82",9243:"6c519c5a474f51f37af0",9291:"75ac2302859b0486763b",9296:"5d5d4a4fdf5ca8d7837f",9370:"8913bddc76b82cb24664",9561:"0bd95f46a0a9005a19f9",9594:"1535423349f7eee694bc",9717:"2f9aec2238ff6cb99e09",9790:"0652f6a8d5221e978033",9805:"7a973d70e6bc42d804ee",9880:"38ebd270e6ffa60791bb",9884:"68b0e0aa33880bc1ba77",9904:"e05b54a0b834b4e4268e",9931:"b0571b9e602218cdc7aa",9971:"7d9ad61c7896cafc19f7"}[e]+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&!e;)e=n[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={134:1};r.f.i=(t,n)=>{e[t]||importScripts(r.p+r.u(t))};var t=self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[],n=t.push.bind(t);t.push=t=>{var[s,o,i]=t;for(var a in o)r.o(o,a)&&(r.m[a]=o[a]);for(i&&i(r);s.length;)e[s.pop()]=1;n(t)}})(),r(88277);var n=r(728);RemoteClient=n})();
|
|
1
|
+
var RemoteClient;(()=>{var e={88277:(e,t,r)=>{r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},43697:(e,t,r)=>{"use strict";function n(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}r.d(t,{_:()=>n}),"function"==typeof SuppressedError&&SuppressedError},68773:(e,t,r)=>{"use strict";r.d(t,{default:()=>o}),r(80442);var n=r(78286),s=r(17202);const o={analysisTheme:{accentColor:[255,127,0],textColor:"white"},apiKey:void 0,applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!1,portalUrl:"https://www.arcgis.com",routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,n.RH)(o,globalThis.esriConfig,!0),delete o.has),!o.assetsPath){{const e="4.28.0";o.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${s.r}/assets`}o.defaultAssetsPath=o.assetsPath}},92036:(e,t,r)=>{"use strict";r.d(t,{Z:()=>x});var n=r(60235),s=r(61247),o=r(92604),i=r(70586),a=r(88022),c=r(67723),l=r(7628),u=(r(80442),r(22974)),f=r(71143),d=r(97831),h=r(42100),p=r(31263),g=r(58971),y=r(44550);class b{constructor(e,t){this.propertyName=e,this.metadata=t,this.observerObject=new m,this._accessed=null,this._handles=null,this.observerObject.flags=y.v.Dirty|(t.nonNullable?y.v.NonNullable:0)|(t.hasOwnProperty("value")?y.v.HasDefaultValue:0)|(void 0===t.get?y.v.DepTrackingInitialized:0)|(void 0===t.dependsOn?y.v.AutoTracked:0)}destroy(){this.observerObject.destroy(),this._accessed=null,this._clearObservationHandles()}getComputed(e){const t=this.observerObject;(0,g.it)(t);const r=e.store,n=this.propertyName,s=t.flags,o=r.get(n);if(s&y.v.Computing)return o;if(~s&y.v.Dirty&&r.has(n))return o;t.flags|=y.v.Computing;const i=e.host;let a;s&y.v.AutoTracked?a=(0,g.LJ)(this,this.metadata.get,i):((0,g.GF)(i,this),a=this.metadata.get.call(i)),r.set(n,a,p.s3.COMPUTED);const c=r.get(n);return c===o?t.flags&=~y.v.Dirty:(0,g.gb)(this.commit,this),t.flags&=~y.v.Computing,c}onObservableAccessed(e){if(e===this.observerObject)return;let t=this._accessed;if(null==t)t=[],this._accessed=t;else if(t.includes(e))return;t.push(e)}onTrackingEnd(){this._clearObservationHandles();const e=this.observerObject;e.flags|=y.v.DepTrackingInitialized;const t=this._accessed;if(null==t||0===t.length)return;let r=this._handles;null==r&&(r=[],this._handles=r);for(let n=0;n<t.length;++n)r.push(t[n].observe(e));t.length=0}notifyChange(){const e=this.observerObject;e.onInvalidated(),e.onCommitted()}invalidate(){this.observerObject.onInvalidated()}commit(){const e=this.observerObject;e.flags&=~y.v.Dirty,e.onCommitted()}_clearObservationHandles(){const e=this._handles;if(null!==e){for(let t=0;t<e.length;++t)e[t].remove();e.length=0}}}class m extends h.s{constructor(){super(...arguments),this.flags=0}onInvalidated(){~this.flags&y.v.Overriden&&(this.flags|=y.v.Dirty);const e=this._observers;if(e&&e.length>0)for(const t of e)t.onInvalidated()}onCommitted(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onCommitted()}}destroy(){this.flags&y.v.Dirty&&this.onCommitted(),super.destroy()}}class v{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const t=new v;return this._values.forEach(((r,n)=>{e&&e.has(n)||t.set(n,(0,u.d9)(r))})),t}get(e){return this._values.get(e)}originOf(){return p.s3.USER}keys(){return[...this._values.keys()]}set(e,t){this._values.set(e,t)}delete(e){this._values.delete(e)}has(e){return this._values.has(e)}forEach(e){this._values.forEach(e)}}function _(e,t,r){return void 0!==e}function w(e,t,r,n){return!(void 0===e||null==r&&e.observerObject.flags&y.v.NonNullable&&(n.lifecycle,d.F.INITIALIZING,1))}function O(e){return e&&"function"==typeof e.destroy}o.Z.getLogger("esri.core.accessorSupport.Properties");class A{constructor(e){this.host=e,this.propertiesByName=new Map,this.ctorArgs=null,this.destroyed=!1,this.lifecycle=d.F.INITIALIZING,this.store=new v,this._origin=p.s3.USER;const t=this.host.constructor.__accessorMetadata__;for(const e in t){const r=new b(e,t[e]);this.propertiesByName.set(e,r)}this.metadatas=t}initialize(){this.lifecycle=d.F.CONSTRUCTING}constructed(){this.lifecycle=d.F.CONSTRUCTED}destroy(){this.destroyed=!0;for(const[e,t]of this.propertiesByName){if(t.metadata.autoDestroy){const r=this.internalGet(e);r&&O(r)&&(r.destroy(),~t.observerObject.flags&y.v.NonNullable&&this._internalSet(t,null))}t.destroy()}}get initialized(){return this.lifecycle!==d.F.INITIALIZING}get(e){const t=this.propertiesByName.get(e);if(t.metadata.get)return t.getComputed(this);(0,g.it)(t.observerObject);const r=this.store;return r.has(e)?r.get(e):t.metadata.value}originOf(e){const t=this.store.originOf(e);if(void 0===t){const t=this.propertiesByName.get(e);if(void 0!==t&&t.observerObject.flags&y.v.HasDefaultValue)return"defaults"}return(0,p.x3)(t)}has(e){return!!this.propertiesByName.has(e)&&this.store.has(e)}keys(){return[...this.propertiesByName.keys()]}internalGet(e){const t=this.propertiesByName.get(e);if(_(t))return this.store.has(e)?this.store.get(e):t.metadata.value}internalSet(e,t){const r=this.propertiesByName.get(e);_(r)&&this._internalSet(r,t)}getDependsInfo(e,t,r){const n=this.propertiesByName.get(t);if(!_(n))return"";const s=new Set,o=(0,g.LJ)({onObservableAccessed:e=>s.add(e),onTrackingEnd:()=>{}},(()=>n.metadata.get?.call(e)));let i=`${r}${e.declaredClass.split(".").pop()}.${t}: ${o}\n`;if(0===s.size)return i;r+=" ";for(const e of s)e instanceof b&&(i+=`${r}${e.propertyName}: undefined\n`);return i}setAtOrigin(e,t,r){const n=this.propertiesByName.get(e);if(_(n))return this._setAtOrigin(n,t,r)}isOverridden(e){const t=this.propertiesByName.get(e);return void 0!==t&&!!(t.observerObject.flags&y.v.Overriden)}clearOverride(e){const t=this.propertiesByName.get(e),r=t?.observerObject;r&&r.flags&y.v.Overriden&&(r.flags&=~y.v.Overriden,t.notifyChange())}override(e,t){const r=this.propertiesByName.get(e);if(!w(r,0,t,this))return;const n=r.metadata.cast;if(n){const e=this._cast(n,t),{valid:r,value:s}=e;if(S.release(e),!r)return;t=s}r.observerObject.flags|=y.v.Overriden,this._internalSet(r,t)}set(e,t){const r=this.propertiesByName.get(e);if(!w(r,0,t,this))return;const n=r.metadata.cast;if(n){const e=this._cast(n,t),{valid:r,value:s}=e;if(S.release(e),!r)return;t=s}const s=r.metadata.set;s?s.call(this.host,t):this._internalSet(r,t)}setDefaultOrigin(e){this._origin=(0,p.M9)(e)}getDefaultOrigin(){return(0,p.x3)(this._origin)}notifyChange(e){const t=this.propertiesByName.get(e);void 0!==t&&t.notifyChange()}invalidate(e){const t=this.propertiesByName.get(e);void 0!==t&&t.invalidate()}commit(e){const t=this.propertiesByName.get(e);void 0!==t&&t.commit()}_internalSet(e,t){const r=this.lifecycle!==d.F.INITIALIZING?this._origin:p.s3.DEFAULTS;this._setAtOrigin(e,t,r)}_setAtOrigin(e,t,r){const n=this.store,s=e.propertyName;n.has(s,r)&&(0,u.fS)(t,n.get(s))&&~e.observerObject.flags&y.v.Overriden&&r===n.originOf(s)||(e.invalidate(),n.set(s,t,r),e.commit(),(0,g.mS)(this.host,e))}_cast(e,t){const r=S.acquire();return r.valid=!0,r.value=t,e&&(r.value=e.call(this.host,t,r)),r}}const S=new f.Z(class{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}});var k=r(37697);var T,j,E=r(26258),N=r(5600),C=r(52011);function P(e){if(null==e)return{value:e};if(Array.isArray(e))return{type:[e[0]],value:null};switch(typeof e){case"object":return e.constructor?.__accessorMetadata__||e instanceof Date?{type:e.constructor,value:e}:e;case"boolean":return{type:Boolean,value:e};case"string":return{type:String,value:e};case"number":return{type:Number,value:e};case"function":return{type:e,value:null};default:return}}const M=Symbol("Accessor-Handles"),I=Symbol("Accessor-Initialized");class x{static createSubclass(e={}){if(Array.isArray(e))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:t,declaredClass:r,constructor:n}=e;delete e.declaredClass,delete e.properties,delete e.constructor;const s=this;class o extends s{constructor(...e){super(...e),this.inherited=null,n&&n.apply(this,e)}}(0,l.fp)(o.prototype);for(const t in e){const r=e[t];o.prototype[t]="function"==typeof r?function(...e){const n=this.inherited;let o;this.inherited=function(...e){if(s.prototype[t])return s.prototype[t].apply(this,e)};try{o=r.apply(this,e)}catch(e){throw this.inherited=n,e}return this.inherited=n,o}:e[t]}for(const e in t){const r=P(t[e]);(0,N.Cb)(r)(o.prototype,e)}return(0,C.j)(r)(o)}constructor(...e){if(this[T]=null,this[j]=!1,this.constructor===x)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const t=new A(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:t}),e.length>0&&this.normalizeCtorArgs&&(t.ctorArgs=this.normalizeCtorArgs.apply(this,e)),$.register(this,t.propertiesByName,this)}postscript(e){const t=this.__accessor__,r=t.ctorArgs||e;t.initialize(),r&&(this.set(r),t.ctorArgs=null),t.constructed(),this.initialize(),this[I]=!0}initialize(){}[a.F](){this[M]=(0,i.SC)(this[M])}destroy(){this.destroyed||($.unregister(this),(0,E.BT)(this),this.__accessor__.destroy())}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[I]}get destroyed(){return this.__accessor__&&this.__accessor__.destroyed||!1}commitProperty(e){(0,c.U2)(this,e)}get(e){return(0,n.XV)(o.Z.getLogger("esri.core.Accessor"),"`Accessor.get` is deprecated in favor of using optional chaining",{version:"4.28",see:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining"}),(0,c.U2)(this,e)}hasOwnProperty(e){return this.__accessor__?this.__accessor__.has(e):Object.prototype.hasOwnProperty.call(this,e)}keys(){return this.__accessor__?this.__accessor__.keys():[]}set(e,t){return(0,k.t)(this,e,t),this}watch(e,t,r){return(0,E.YP)(this,e,t,r)}addHandles(e,t){if(this.destroyed){const t=Array.isArray(e)?e:[e];for(const e of t)e.remove();return}let r=this[M];null==r&&(r=this[M]=new s.Z),r.add(e,t)}removeHandles(e){const t=this[M];null!=t&&t.remove(e)}removeAllHandles(){const e=this[M];null!=e&&e.removeAll()}hasHandles(e){const t=this[M];return null!=t&&t.has(e)}_override(e,t){void 0===t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_clearOverride(e){return this.__accessor__.clearOverride(e)}_overrideIfSome(e,t){null==t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_isOverridden(e){return this.__accessor__.isOverridden(e)}notifyChange(e){this.__accessor__.notifyChange(e)}_get(e){return this.__accessor__.internalGet(e)}_set(e,t){return this.__accessor__.internalSet(e,t),this}}T=M,j=I;const $=new FinalizationRegistry((e=>{for(const t of e.values())t.destroy()}))},3894:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(71143);function s(e){e.length=0}class o{constructor(e=50,t=50){this._pool=new n.Z(Array,void 0,s,t,e)}acquire(){return this._pool.acquire()}release(e){this._pool.release(e)}prune(){this._pool.prune(0)}static acquire(){return i.acquire()}static release(e){return i.release(e)}static prune(){i.prune()}}const i=new o(100)},20102:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(22974),s=r(92604),o=r(58896);class i extends o.Z{constructor(e,t,r){super(e,t,r)}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,((e,t)=>{if(t&&"object"==typeof t&&"function"==typeof t.toJSON)return t;try{return(0,n.d9)(t)}catch(e){return"[object]"}})))}}catch(e){throw s.Z.getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new i(e.name,e.message,e.details)}}i.prototype.type="error"},61247:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(66374);class s{constructor(){this._groups=new Map}destroy(){this.removeAll()}get size(){let e=0;return this._groups.forEach((t=>{e+=t.length})),e}add(e,t){if((0,n.TW)(e)){const r=this._getOrCreateGroup(t);for(const t of e)this._isHandle(t)&&r.push(t)}else this._isHandle(e)&&this._getOrCreateGroup(t).push(e);return this}forEach(e,t){if("function"==typeof e)this._groups.forEach((t=>t.forEach(e)));else{const r=this._getGroup(e);r&&t&&r.forEach(t)}}has(e){return this._groups.has(this._ensureGroupKey(e))}remove(e){if("string"!=typeof e&&(0,n.TW)(e)){for(const t of e)this.remove(t);return this}return this.has(e)?(this._removeAllFromGroup(this._getGroup(e)),this._groups.delete(this._ensureGroupKey(e)),this):this}removeAll(){return this._groups.forEach((e=>this._removeAllFromGroup(e))),this._groups.clear(),this}_isHandle(e){return e&&(!!e.remove||e instanceof s)}_getOrCreateGroup(e){if(this.has(e))return this._getGroup(e);const t=[];return this._groups.set(this._ensureGroupKey(e),t),t}_getGroup(e){return this._groups.get(this._ensureGroupKey(e))}_ensureGroupKey(e){return e||"_default_"}_removeAllFromGroup(e){for(const t of e)t instanceof s?t.removeAll():t.remove()}}},96674:(e,t,r)=>{"use strict";r.d(t,{wq:()=>b,eC:()=>p,AK:()=>y});var n=r(43697),s=r(92036),o=r(22974),i=r(31263);class a{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const t=new a;return this._values.forEach(((r,n)=>{e&&e.has(n)||t.set(n,(0,o.d9)(r.value),r.origin)})),t}get(e,t){t=this._normalizeOrigin(t);const r=this._values.get(e);return null==t||r?.origin===t?r?.value:void 0}originOf(e){return this._values.get(e)?.origin??i.s3.USER}keys(e){e=this._normalizeOrigin(e);const t=[...this._values.keys()];return null==e?t:t.filter((t=>this._values.get(t)?.origin===e))}set(e,t,r){if((r=this._normalizeOrigin(r))===i.s3.DEFAULTS){const t=this._values.get(e);if(t&&null!=t.origin&&t.origin>r)return}this._values.set(e,new c(t,r))}delete(e,t){null!=(t=this._normalizeOrigin(t))&&this._values.get(e)?.origin!==t||this._values.delete(e)}has(e,t){return null!=(t=this._normalizeOrigin(t))?this._values.get(e)?.origin===t:this._values.has(e)}forEach(e){this._values.forEach((({value:t},r)=>e(t,r)))}_normalizeOrigin(e){if(null!=e)return e===i.s3.DEFAULTS?e:i.s3.USER}}class c{constructor(e,t){this.value=e,this.origin=t}}var l=r(41103),u=r(50549),f=r(1153),d=r(76169),h=r(52011);const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,f.vw)(this),r=t.store,n=new a;t.store=n,(0,l.M)(t,r,n)}read(e,t){(0,u.i)(this,e,t)}write(e,t){return(0,d.c)(this,e??{},t)}toJSON(e){return this.write({},e)}static fromJSON(e,t){return g.call(this,e,t)}};return t=(0,n._)([(0,h.j)("esri.core.JSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function g(e,t){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const r=new this;return r.read(e,t),r}function y(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}let b=class extends(p(s.Z)){};b=(0,n._)([(0,h.j)("esri.core.JSONSupport")],b)},92604:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(68773),s=(r(80442),r(19153));const o={info:0,warn:1,error:2,none:3};class i{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,i._loggers.set(this.module,this);const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=i.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){const e=this;return{loggedMessages:e._loggedMessages,clearLoggedWarnings:()=>e._loggedMessages.warn.clear()}}static get test(){return{resetLoggers(e=new Map){const t=i._loggers;return i._loggers=e,t},set throttlingDisabled(e){i._throttlingDisabled=e}}}static getLogger(e){return e="string"!=typeof e?e.declaredClass:e,i._loggers.get(e)||new i({module:e})}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!i._throttlingDisabled){const n=this._argsToKey(r),s=this._loggedMessages[e].get(n);if("once"===t&&null!=s||"oncePerTick"===t&&s&&s>=i._tickCounter)return;this._loggedMessages[e].set(n,i._tickCounter),i._scheduleTickCounterIncrement()}for(const t of n.default.log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;null!=r;){const t=r[e];if(null!=t)return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",this._consoleWriter)}_consoleWriter(e,t,...r){console[e](`[${t}]`,...r)}_matchLevel(e){const t=n.default.log.level||"warn";return o[this._parentWithMember("level",t)]<=o[e]}_argsToKey(...e){return(0,s.hP)(JSON.stringify(e,((e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]")))}static _scheduleTickCounterIncrement(){i._tickCounterScheduled||(i._tickCounterScheduled=!0,Promise.resolve().then((()=>{i._tickCounter++,i._tickCounterScheduled=!1})))}}i._loggers=new Map,i._tickCounter=0,i._tickCounterScheduled=!1,i._throttlingDisabled=!1},30175:(e,t,r)=>{"use strict";function n(e,t,r){const n=e.get(t);if(void 0!==n)return n;const s=r();return e.set(t,s),s}r.d(t,{s1:()=>n})},58896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(78286);class s{constructor(e,t,r){this.name=e,this.details=r,this.message=(t&&function(e,t){return e.replaceAll(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,((e,r)=>""===r?"$":((0,n.hS)(r,t)??"").toString()))}(t,r))??""}toString(){return"["+this.name+"]: "+this.message}}},71143:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e,t,r,n=1,s=0){if(this._ctor=e,this._acquireFunction=t,this._releaseFunction=r,this.allocationSize=n,this._pool=new Array(s),this._initialSize=s,this._ctor)for(let e=0;e<s;e++)this._pool[e]=new this._ctor;this.allocationSize=Math.max(n,1)}destroy(){this.prune(0)}acquire(...e){let t;if(n.test.disabled)t=new this._ctor;else{if(0===this._pool.length){const e=this.allocationSize;for(let t=0;t<e;t++)this._pool[t]=new this._ctor}t=this._pool.pop()}return this._acquireFunction?this._acquireFunction(t,...e):function(e){return e&&e.acquire&&"function"==typeof e.acquire}(t)&&t.acquire(...e),t}release(e){var t;e&&!n.test.disabled&&(this._releaseFunction?this._releaseFunction(e):(t=e)&&t.release&&"function"==typeof t.release&&e.release(),this._pool.push(e))}prune(e=this._initialSize){if(!(e>=this._pool.length)){for(let t=e;t<this._pool.length;++t){const e=this._pool[t];this._dispose(e)}this._pool.length=e}}_dispose(e){e.dispose&&"function"==typeof e.dispose&&e.dispose()}}n.test={disabled:!1}},54790:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e,t=30){this.name=e,this._counter=0,this._samples=new Array(t)}record(e){null!=e&&(this._samples[++this._counter%this._samples.length]=e)}get median(){return this._samples.slice().sort(((e,t)=>e-t))[Math.floor(this._samples.length/2)]}get average(){return this._samples.reduce(((e,t)=>e+t),0)/this._samples.length}get last(){return this._samples[this._counter%this._samples.length]}}},44553:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n,s=r(67676);!function(e){const t=(e,t,r,n)=>{let s=t,o=t;const i=r>>>1,a=e[s-1];for(;o<=i;){o=s<<1,o<r&&n(e[o-1],e[o])<0&&++o;const t=e[o-1];if(n(t,a)<=0)break;e[s-1]=t,s=o}e[s-1]=a},r=(e,t)=>e<t?-1:e>t?1:0;e.sort=function(e,n,s,o){void 0===n&&(n=0),void 0===s&&(s=e.length),void 0===o&&(o=r);for(let r=s>>>1;r>n;r--)t(e,r,s,o);const i=n+1;for(let r=s-1;r>n;r--){const s=e[n];e[n]=e[r],e[r]=s,t(e,i,r,o)}},e.iterableSort=function*(e,n,s,o){void 0===n&&(n=0),void 0===s&&(s=e.length),void 0===o&&(o=r);for(let r=s>>>1;r>n;r--)t(e,r,s,o),yield;const i=n+1;for(let r=s-1;r>n;r--){const s=e[n];e[n]=e[r],e[r]=s,t(e,i,r,o),yield}}}(n||(n={}));const o=n;class i{constructor(e){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new s.SO,e&&(e.initialSize&&(this.data=new Array(e.initialSize)),e.allocator&&(this._allocator=e.allocator),void 0!==e.deallocator&&(this._deallocator=e.deallocator),e.shrink&&(this._shrink=()=>a(this)))}toArray(){return this.data.slice(0,this.length)}filter(e){const t=new Array;for(let r=0;r<this._length;r++){const n=this.data[r];e(n)&&t.push(n)}return t}at(e){if((e=Math.trunc(e)||0)<0&&(e+=this._length),!(e<0||e>=this._length))return this.data[e]}includes(e,t){const r=this.data.indexOf(e,t);return-1!==r&&r<this.length}get length(){return this._length}set length(e){if(e>this._length){if(this._allocator){for(;this._length<e;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=e}else{if(this._deallocator)for(let t=e;t<this._length;++t)this.data[t]=this._deallocator(this.data[t]);this._length=e,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(e){this.data[this._length++]=e}pushArray(e,t=e.length){for(let r=0;r<t;r++)this.data[this._length++]=e[r]}fill(e,t){for(let r=0;r<t;r++)this.data[this._length++]=e}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const e=this.data[this._length];return++this._length,e}unshift(e){this.data.unshift(e),this._length++,a(this)}pop(){if(0===this.length)return;const e=this.data[this.length-1];return this.length=this.length-1,this._shrink(),e}remove(e){const t=(0,s.cq)(this.data,e,this.length,this._hint);if(-1!==t)return this.data.splice(t,1),this.length=this.length-1,e}removeUnordered(e){return this.removeUnorderedIndex((0,s.cq)(this.data,e,this.length,this._hint))}removeUnorderedIndex(e){if(!(e>=this.length||e<0))return this.swapElements(e,this.length-1),this.pop()}removeUnorderedMany(e,t=e.length,r){this.length=(0,s.FY)(this.data,e,this.length,t,this._hint,r),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(e,t){if(e>=this.length||t>=this.length||e===t)return;const r=this.data[e];this.data[e]=this.data[t],this.data[t]=r}sort(e){o.sort(this.data,0,this.length,e)}iterableSort(e){return o.iterableSort(this.data,0,this.length,e)}some(e,t){for(let r=0;r<this.length;++r)if(e.call(t,this.data[r],r,this.data))return!0;return!1}find(e,t){for(let r=0;r<this.length;++r){const n=this.data[r];if(e.call(t,n,r))return n}}filterInPlace(e,t){let r=0;for(let n=0;n<this._length;++n){const s=this.data[n];e.call(t,s,n,this.data)&&(this.data[n]=this.data[r],this.data[r]=s,r++)}if(this._deallocator)for(let e=r;e<this._length;e++)this.data[e]=this._deallocator(this.data[e]);return this._length=r,this._shrink(),this}forAll(e,t){const r=this.length,n=this.data;for(let s=0;s<r;++s)e.call(t,n[s],s,n)}forEach(e,t){for(let r=0;r<this.length;++r)e.call(t,this.data[r],r,this.data)}map(e,t){const r=new Array(this.length);for(let n=0;n<this.length;++n)r[n]=e.call(t,this.data[n],n,this.data);return r}reduce(e,t){let r=t;for(let t=0;t<this.length;++t)r=e(r,this.data[t],t,this.data);return r}has(e){const t=this.length,r=this.data;for(let n=0;n<t;++n)if(r[n]===e)return!0;return!1}}function a(e){e.data.length>1.5*e.length&&(e.data.length=Math.floor(1.1*e.length))}},77734:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e=1){this._seed=e}set seed(e){this._seed=e??Math.random()*n._m}getInt(){return this._seed=(n._a*this._seed+n._c)%n._m,this._seed}getFloat(){return this.getInt()/(n._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/n._m*r}}n._m=2147483647,n._a=48271,n._c=0},20941:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(58896);class s extends n.Z{constructor(e,t,r){super(e,t,r)}}s.prototype.type="warning"},42100:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(50758),s=r(67676);class o{constructor(e,t){this._observers=e,this._observer=t}remove(){(0,s.Od)(this._observers,this._observer)}}class i{constructor(){this._observers=null,this.destroyed=!1}observe(e){if(this.destroyed||e.destroyed)return a;null==this._observers&&(this._observers=[]);const t=this._observers;let r=!1,n=!1;const s=t.length;for(let o=0;o<s;++o){const s=t[o];if(s.destroyed)n=!0;else if(s===e){r=!0;break}}return r||(t.push(e),n&&this._removeDestroyedObservers()),new o(t,e)}_removeDestroyedObservers(){const e=this._observers;if(!e||0===e.length)return;const t=e.length;let r=0;for(let n=0;n<t;++n){for(;n+r<t&&e[n+r].destroyed;)++r;if(r>0){if(!(n+r<t))break;e[n]=e[n+r]}}e.length=t-r}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this._observers;if(null!=e){for(const t of e)t.onCommitted();this._observers=null}}}const a=(0,n.kB)()},31263:(e,t,r)=>{"use strict";var n;r.d(t,{M9:()=>o,Wm:()=>a,kk:()=>s,s3:()=>n,x3:()=>i}),function(e){e[e.DEFAULTS=0]="DEFAULTS",e[e.COMPUTED=1]="COMPUTED",e[e.SERVICE=2]="SERVICE",e[e.PORTAL_ITEM=3]="PORTAL_ITEM",e[e.WEB_SCENE=4]="WEB_SCENE",e[e.WEB_MAP=5]="WEB_MAP",e[e.LINK_CHART=6]="LINK_CHART",e[e.USER=7]="USER"}(n||(n={}));const s=n.USER+1;function o(e){switch(e){case"defaults":return n.DEFAULTS;case"service":return n.SERVICE;case"portal-item":return n.PORTAL_ITEM;case"web-scene":return n.WEB_SCENE;case"web-map":return n.WEB_MAP;case"link-chart":return n.LINK_CHART;case"user":return n.USER;default:return null}}function i(e){switch(e){case n.DEFAULTS:return"defaults";case n.SERVICE:return"service";case n.PORTAL_ITEM:return"portal-item";case n.WEB_SCENE:return"web-scene";case n.WEB_MAP:return"web-map";case n.LINK_CHART:return"link-chart";case n.USER:return"user"}}function a(e){return i(e)}},88022:(e,t,r)=>{"use strict";r.d(t,{F:()=>n});const n=Symbol("Accessor-beforeDestroy")},5600:(e,t,r)=>{"use strict";r.d(t,{CJ:()=>l,Cb:()=>c,Eg:()=>u});var n=r(92604),s=r(75215),o=r(67723),i=r(7628),a=r(37697);function c(e={}){return(t,r)=>{if(t===Function.prototype)throw new Error(`Inappropriate use of @property() on a static field: ${t.name}.${r}. Accessor does not support static properties.`);const c=Object.getOwnPropertyDescriptor(t,r),l=(0,i.Oe)(t,r);c&&(c.get||c.set?(l.get=c.get||l.get,l.set=c.set||l.set):"value"in c&&("value"in e&&n.Z.getLogger("esri.core.accessorSupport.decorators.property").warn(`@property() will redefine the value of "${r}" on "${t.constructor.name}" already defined in the metadata`,e),l.value=e.value=c.value)),null!=e.readOnly&&(l.readOnly=e.readOnly);const f=e.aliasOf;if(f){const e="string"==typeof f?f:f.source,t="string"==typeof f?null:!0===f.overridable;let n;l.dependsOn=[e],l.get=function(){let t=(0,o.U2)(this,e);if("function"==typeof t){n||(n=e.split(".").slice(0,-1).join("."));const r=(0,o.U2)(this,n);r&&(t=t.bind(r))}return t},l.readOnly||(l.set=t?function(e){this._override(r,e)}:function(t){(0,a.t)(this,e,t)})}const d=e.type,h=e.types;l.cast||(d?l.cast=function(e){let t=0,r=e;if((0,s.AY)(e))return(0,s.sY)(e);for(;Array.isArray(r)&&1===r.length&&"string"!=typeof r[0]&&"number"!=typeof r[0];)r=r[0],t++;const n=r;if((0,s.gB)(n))return 0===t?(0,s.i$)(n):(0,s.Iu)((0,s.i$)(n),t);if(1===t)return(0,s.rY)(n);if(t>1)return(0,s.di)(n,t);const o=e;return o.from?o.from:(0,s.se)(o)}(d):h&&(Array.isArray(h)?l.cast=(0,s.Ls)((0,s.N7)(h[0])):l.cast=(0,s.N7)(h))),(0,i.tz)(l,e),e.range&&(l.cast=u(l.cast,e.range))}}function l(e,t,r){const n=(0,i.Oe)(e,r);n.json||(n.json={});let s=n.json;return void 0!==t&&(s.origins||(s.origins={}),s.origins[t]||(s.origins[t]={}),s=s.origins[t]),s}function u(e,t){return r=>{let n=+e(r);return null!=t.step&&(n=Math.round(n/t.step)*t.step),null!=t.min&&(n=Math.max(t.min,n)),null!=t.max&&(n=Math.min(t.max,n)),n}}},52011:(e,t,r)=>{"use strict";r.d(t,{j:()=>u}),r(80442);var n=r(88022),s=r(97831),o=r(7628),i=r(58971),a=r(53906);const c=new Set,l=new Set;function u(e){return t=>{t.prototype.declaredClass=e,d(t);const r=[],s=[];let i=t.prototype;for(;i;)i.hasOwnProperty("initialize")&&!c.has(i.initialize)&&(c.add(i.initialize),r.push(i.initialize)),i.hasOwnProperty("destroy")&&!l.has(i.destroy)&&(l.add(i.destroy),s.push(i.destroy)),i=Object.getPrototypeOf(i);c.clear(),l.clear();const a=class extends t{constructor(...e){if(super(...e),this.constructor===a&&"function"==typeof this.postscript){if(r.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let e=r.length-1;e>=0;e--)r[e].call(this)}}),s.length){let e=!1;const t=this[n.F];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!e){e=!0,t.call(this);for(let e=0;e<s.length;e++)s[e].call(this)}}})}this.postscript(...e)}}};a.__accessorMetadata__=(0,o.fp)(t.prototype),a.prototype.declaredClass=e;const u=(e||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(a,"name",{value:u,configurable:!0}),a}}function f(e,t){return null==t.get?function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0===r)return;(0,i.it)(r.observerObject);const n=t.store;return n.has(e)?n.get(e):r.metadata.value}:function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0!==r)return r.getComputed(t)}}function d(e){const t=e.prototype,r=(0,o.fp)(t),n={};for(const e of Object.getOwnPropertyNames(r)){const t=r[e];(0,a.OM)(t),n[e]={enumerable:!0,configurable:!0,get:f(e,t),set(r){const n=this.__accessor__;if(void 0!==n){if(!Object.isFrozen(this)){if(n.initialized&&t.readOnly)throw new TypeError(`[accessor] cannot assign to read-only property '${e}' of ${this.declaredClass}`);if(n.lifecycle===s.F.CONSTRUCTED&&t.constructOnly)throw new TypeError(`[accessor] cannot assign to construct-only property '${e}' of ${this.declaredClass}`);n.set(e,r)}}else Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:r})}}}Object.defineProperties(e.prototype,n)}},41103:(e,t,r)=>{"use strict";r.d(t,{M:()=>s});var n=r(31263);function s(e,t,r){t.keys().forEach((e=>{r.set(e,t.get(e),n.s3.DEFAULTS)}));const s=e.metadatas;Object.keys(s).forEach((t=>{e.internalGet(t)&&r.set(t,e.internalGet(t),n.s3.DEFAULTS)}))}},75215:(e,t,r)=>{"use strict";r.d(t,{AY:()=>C,Iu:()=>A,Ls:()=>_,N7:()=>j,TJ:()=>y,V5:()=>N,Zs:()=>c,di:()=>S,gB:()=>k,i$:()=>T,q9:()=>l,rY:()=>w,sY:()=>P,se:()=>v,vU:()=>u,z8:()=>E}),r(80442);var n=r(92604),s=r(30175);const o=n.Z.getLogger("esri.core.accessorSupport.ensureTypes");function i(e){return null==e?e:new Date(e)}function a(e){return null==e?e:!!e}function c(e){return null==e?e:e.toString()}function l(e){return null==e?e:(e=parseFloat(e),isNaN(e)?0:e)}function u(e){return null==e?e:Math.round(parseFloat(e))}function f(e){return e&&e.constructor&&void 0!==e.constructor.__accessorMetadata__}function d(e,t){return null!=t&&e&&!(t instanceof e)}function h(e){return e&&"isCollection"in e}function p(e){return e&&e.Type?"function"==typeof e.Type?e.Type:e.Type.base:null}function g(e,t){return!!f(t)&&(o.error("Accessor#set","Assigning an instance of '"+(t.declaredClass||"unknown")+"' which is not a subclass of '"+b(e)+"'"),!0)}function y(e,t){return null==t?t:h(e)?function(e,t){if(!t||!t.constructor||!h(t.constructor))return g(e,t)?t:new e(t);const r=p(e.prototype.itemType),n=p(t.constructor.prototype.itemType);return r?n?r===n?t:r.prototype.isPrototypeOf(n.prototype)?new e(t):(g(e,t),t):new e(t):t}(e,t):d(e,t)?g(e,t)?t:new e(t):t}function b(e){return e&&e.prototype&&e.prototype.declaredClass||"unknown"}const m=new WeakMap;function v(e,t){const r=function(e){switch(e){case Number:return l;case E:return u;case Boolean:return a;case String:return c;case Date:return i;default:return(0,s.s1)(m,e,(()=>y.bind(null,e)))}}(e);return 1===arguments.length?r:r(t)}function _(e,t,r){return 1===arguments.length?_.bind(null,e):t?Array.isArray(t)?t.map((t=>e(t,r))):[e(t,r)]:t}function w(e,t){return 1===arguments.length?_((t=>v(e,t))):_((t=>v(e,t)),t)}function O(e,t,r){return 0!==t&&Array.isArray(r)?r.map((r=>O(e,t-1,r))):e(r)}function A(e,t,r){if(2===arguments.length)return r=>A(e,t,r);if(!r)return r;r=O(e,t,r);let n=t,s=r;for(;n>0&&Array.isArray(s);)n--,s=s[0];if(void 0!==s)for(let e=0;e<n;e++)r=[r];return r}function S(e,t,r){return 2===arguments.length?A((t=>v(e,t)),t):A((t=>v(e,t)),t,r)}function k(e){return!!Array.isArray(e)&&!e.some((t=>{const r=typeof t;return!("string"===r||"number"===r||"function"===r&&e.length>1)}))}function T(e,t){if(2===arguments.length)return T(e).call(null,t);const r=new Set,n=e.filter((e=>"function"!=typeof e)),s=e.filter((e=>"function"==typeof e));for(const t of e)"string"!=typeof t&&"number"!=typeof t||r.add(t);let i=null,a=null;return(e,t)=>{if(null==e)return e;const c=typeof e,l="string"===c||"number"===c;return l&&(r.has(e)||s.some((e=>"string"===c&&e===String||"number"===c&&e===Number)))||"object"===c&&s.some((t=>!d(e,t)))?e:(l&&n.length?(i||(i=n.map((e=>"string"==typeof e?`'${e}'`:`${e}`)).join(", ")),o.error("Accessor#set",`'${e}' is not a valid value for this property, only the following values are valid: ${i}`)):"object"==typeof e&&s.length?(a||(a=s.map((e=>b(e))).join(", ")),o.error("Accessor#set",`'${e}' is not a valid value for this property, value must be one of ${a}`)):o.error("Accessor#set",`'${e}' is not a valid value for this property`),t&&(t.valid=!1),null)}}function j(e,t){if(2===arguments.length)return j(e).call(null,t);const r={},n=[],s=[];for(const t in e.typeMap){const o=e.typeMap[t];r[t]=v(o),n.push(b(o)),s.push(t)}const i=()=>`'${n.join("', '")}'`,a=()=>`'${s.join("', '")}'`,c="string"==typeof e.key?t=>t[e.key]:e.key;return t=>{if(e.base&&!d(e.base,t))return t;if(null==t)return t;const n=c(t)||e.defaultKeyValue,s=r[n];if(!s)return o.error("Accessor#set",`Invalid property value, value needs to be one of ${i()}, or a plain object that can autocast (having .type = ${a()})`),null;if(!d(e.typeMap[n],t))return t;if("string"==typeof e.key&&!f(t)){const r={};for(const n in t)n!==e.key&&(r[n]=t[n]);return s(r)}return s(t)}}class E{}const N={native:e=>({type:"native",value:e}),array:e=>({type:"array",value:e}),oneOf:e=>({type:"one-of",values:e})};function C(e){if(!e||!("type"in e))return!1;switch(e.type){case"native":case"array":case"one-of":return!0}return!1}function P(e){switch(e.type){case"native":return v(e.value);case"array":return _(P(e.value));case"one-of":return function(e){let t=null;return(r,n)=>I(r,e)?r:(null==t&&(t=M(e)),o.error("Accessor#set",`Invalid property value, value needs to be of type ${t}`),n&&(n.valid=!1),null)}(e);default:return null}}function M(e){switch(e.type){case"native":switch(e.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case E:return"integer";case Date:return"date";default:return b(e.value)}case"array":return`array of ${M(e.value)}`;case"one-of":{const t=e.values.map((e=>M(e)));return`one of ${t.slice(0,t.length-1)} or ${t[t.length-1]}`}}return"unknown"}function I(e,t){if(null==e)return!0;switch(t.type){case"native":switch(t.value){case Number:case E:return"number"==typeof e;case Boolean:return"boolean"==typeof e;case String:return"string"==typeof e}return e instanceof t.value;case"array":return!!Array.isArray(e)&&!e.some((e=>!I(e,t.value)));case"one-of":return t.values.some((t=>I(e,t)))}}},53906:(e,t,r)=>{"use strict";r.d(t,{hk:()=>u,HS:()=>f,Ah:()=>d,OM:()=>b});var n=r(75215),s=r(63213);function o(e){if(e.json||(e.json={}),a(e.json),c(e.json),i(e.json),e.json.origins)for(const t in e.json.origins)a(e.json.origins[t]),c(e.json.origins[t]),i(e.json.origins[t]);return!0}function i(e){e.name&&(e.read&&"object"==typeof e.read?void 0===e.read.source&&(e.read.source=e.name):e.read={source:e.name},e.write&&"object"==typeof e.write?void 0===e.write.target&&(e.write.target=e.name):e.write={target:e.name})}function a(e){"boolean"==typeof e.read?e.read={enabled:e.read}:"function"==typeof e.read?e.read={enabled:!0,reader:e.read}:e.read&&"object"==typeof e.read&&void 0===e.read.enabled&&(e.read.enabled=!0)}function c(e){"boolean"==typeof e.write?e.write={enabled:e.write}:"function"==typeof e.write?e.write={enabled:!0,writer:e.write}:e.write&&"object"==typeof e.write&&void 0===e.write.enabled&&(e.write.enabled=!0)}var l=r(827);function u(e,t){return h(e,"any",t?.origin)}function f(e,t){return h(e,"read",t?.origin)}function d(e,t){return h(e,"write",t?.origin)}function h(e,t,r){let n=e?.json;if(n?.origins&&r){let e;e="link-chart"===r?n.origins[r]&&("any"===t||t in n.origins[r])?n.origins[r]:n.origins["web-map"]:n.origins[r],e&&("any"===t||t in e)&&(n=e)}return n}function p(e){return e.type?g(e):y(e)}function g(e){if(!e.type)return;let t=0,r=e.type;for(;Array.isArray(r)&&!(0,n.gB)(r);)r=r[0],t++;return{type:r,ndimArray:t}}function y(e){if(!e.types)return;let t=0,r=e.types;for(;Array.isArray(r);)r=r[0],t++;return{types:r,ndimArray:t}}function b(e){o(e)&&(function(e){if(e.json&&e.json.origins){const t=e.json.origins,r={"web-document":["web-scene","web-map"]};for(const e in r)if(t[e]){const n=t[e];r[e].forEach((e=>{t[e]=n})),delete t[e]}}}(e),function(e){const t=function(e){return e.json.types?y(e.json):e.type?g(e):y(e)}(e);if(e.json.origins)for(const r in e.json.origins){const n=e.json.origins[r],o=n.types?p(n):t;(0,s.U)(o,n,!1),n.types&&!n.write&&e.json.write&&e.json.write.enabled&&(n.write={...e.json.write}),(0,l.U)(o,n)}(0,s.U)(t,e.json,!0),(0,l.U)(t,e.json)}(e))}},63213:(e,t,r)=>{"use strict";r.d(t,{U:()=>l,d:()=>u});var n=r(92604),s=r(78286),o=r(20941),i=r(7628),a=r(14062);const c=n.Z.getLogger("esri.core.accessorSupport.extensions.serializableProperty.reader");function l(e,t,r){e&&(!r&&!t.read||t.read?.reader||!1===t.read?.enabled||function(e){return"types"in e?y(e.types):g(e.type)}(e)&&(0,s.RB)("read.reader",u(e),t))}function u(e){const t=e.ndimArray??0;if(t>1)return function(e){const t=f(e),r=d.bind(null,t),n=e.ndimArray??0;return(e,t,s)=>{if(null==e)return e;e=r(e,s,n);let o=n,i=e;for(;o>0&&Array.isArray(i);)o--,i=i[0];if(void 0!==i)for(let t=0;t<o;t++)e=[e];return e}}(e);if(1===t)return h(e);if("type"in e&&p(e.type)){const t=e.type.prototype?.itemType?.Type,r=h("function"==typeof t?{type:t}:{types:t});return(t,n,s)=>{const o=r(t,n,s);return o?new e.type(o):o}}return f(e)}function f(e){return"type"in e?function(e){return e.prototype.read?(t,r,n)=>{if(null==t)return t;const s=typeof t;if("object"!==s)return void c.error(`Expected JSON value of type 'object' to deserialize type '${e.prototype.declaredClass}', but got '${s}'`);const o=new e;return o.read(t,n),o}:e.fromJSON}(e.type):function(e){let t=null;const r=e.errorContext??"type",n=e.validate;return(s,a,l)=>{if(null==s)return s;const u=typeof s;if("object"!==u)return void c.error(`Expected JSON value of type 'object' to deserialize, but got '${u}'`);t||(t=function(e){const t={};for(const r in e.typeMap){const n=e.typeMap[r],s=(0,i.fp)(n.prototype);if("function"==typeof e.key)continue;const o=s[e.key];if(!o)continue;o.json?.type&&Array.isArray(o.json.type)&&1===o.json.type.length&&"string"==typeof o.json.type[0]&&(t[o.json.type[0]]=n);const a=o.json?.write;if(!a||!a.writer){t[r]=n;continue}const c=a.target,l="string"==typeof c?c:e.key,u={};a.writer(r,u,l),u[l]&&(t[u[l]]=n)}return t}(e));const f=e.key;if("string"!=typeof f)return;const d=s[f],h=d?t[d]:e.defaultKeyValue?e.typeMap[e.defaultKeyValue]:void 0;if(!h){const e=`Type '${d||"unknown"}' is not supported`;return l&&l.messages&&s&&l.messages.push(new o.Z(`${r}:unsupported`,e,{definition:s,context:l})),void c.error(e)}const p=new h;return p.read(s,l),n?n(p):p}}(e.types)}function d(e,t,r,n){return 0!==n&&Array.isArray(t)?t.map((t=>d(e,t,r,n-1))):e(t,void 0,r)}function h(e){const t=f(e);return(e,r,n)=>{if(null==e)return e;if(Array.isArray(e)){const r=[];for(const s of e){const e=t(s,void 0,n);void 0!==e&&r.push(e)}return r}const s=t(e,void 0,n);return void 0!==s?[s]:void 0}}function p(e){if(!(0,a.u)(e))return!1;const t=e.prototype.itemType;return!(!t||!t.Type)&&("function"==typeof t.Type?g(t.Type):y(t.Type))}function g(e){return!Array.isArray(e)&&!!e&&e.prototype&&("read"in e.prototype||"fromJSON"in e||p(e))}function y(e){for(const t in e.typeMap)if(!g(e.typeMap[t]))return!1;return!0}},14062:(e,t,r)=>{"use strict";function n(e){return!!e&&e.prototype&&e.prototype.declaredClass&&0===e.prototype.declaredClass.indexOf("esri.core.Collection")}r.d(t,{u:()=>n})},827:(e,t,r)=>{"use strict";r.d(t,{U:()=>a,k:()=>f});var n=r(20102),s=r(92604),o=r(78286),i=r(14062);function a(e,t){if(!t.write||t.write.writer||!1===t.write.enabled&&!t.write.overridePolicy)return;const r=e?.ndimArray??0;e&&(1===r||"type"in e&&(0,i.u)(e.type))?t.write.writer=d:r>1?t.write.writer=function(e){return(t,r,n,s)=>{let i;if(null===t)i=null;else{i=h(t,s,e);let r=e,n=i;for(;r>0&&Array.isArray(n);)r--,n=n[0];if(void 0!==n)for(let e=0;e<r;e++)i=[i]}(0,o.RB)(n,i,r)}}(r):t.types?Array.isArray(t.types)?t.write.writer=function(e){return(t,r,n,s)=>t&&Array.isArray(t)?l(t.filter((t=>c(t,e,s))),r,n,s):l(t,r,n,s)}(t.types[0]):t.write.writer=function(e){return(t,r,n,s)=>t?c(t,e,s)?l(t,r,n,s):void 0:l(t,r,n,s)}(t.types):t.write.writer=l}function c(e,t,r){for(const r in t.typeMap)if(e instanceof t.typeMap[r])return!0;if(r?.messages){const o=t.errorContext??"type",i=`Values of type '${("function"!=typeof t.key?e[t.key]:e.declaredClass)??"Unknown"}' cannot be written`;r&&r.messages&&e&&r.messages.push(new n.Z(`${o}:unsupported`,i,{definition:e,context:r})),s.Z.getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer").error(i)}return!1}function l(e,t,r,n){(0,o.RB)(r,u(e,n),t)}function u(e,t){return e&&"function"==typeof e.write?e.write({},t):e&&"function"==typeof e.toJSON?e.toJSON():"number"==typeof e?f(e):e}function f(e){return e===-1/0?-Number.MAX_VALUE:e===1/0?Number.MAX_VALUE:isNaN(e)?null:e}function d(e,t,r,n){let s;null===e?s=null:e&&"function"==typeof e.map?(s=e.map((e=>u(e,n))),"function"==typeof s.toArray&&(s=s.toArray())):s=[u(e,n)],(0,o.RB)(r,s,t)}function h(e,t,r){return 0!==r&&Array.isArray(e)?e.map((e=>h(e,t,r-1))):u(e,t)}},67723:(e,t,r)=>{"use strict";r.d(t,{$z:()=>i,Gg:()=>c,U2:()=>a});var n=r(1153);function s(e,t){const r="?"===e[e.length-1]?e.slice(0,-1):e;if(null!=t.getItemAt||Array.isArray(t)){const e=parseInt(r,10);if(!isNaN(e))return Array.isArray(t)?t[e]:t.at(e)}const s=(0,n.vw)(t);return(0,n.b6)(s,r)?s.get(r):t[r]}function o(e,t,r){if(null==e)return e;const n=s(t[r],e);return!n&&r<t.length-1?void 0:r===t.length-1?n:o(n,t,r+1)}function i(e,t,r=0){return"string"!=typeof t||t.includes(".")?o(e,(0,n.NI)(t),r):s(t,e)}function a(e,t){return i(e,t)}function c(e,t){return void 0!==i(t,e)}},97831:(e,t,r)=>{"use strict";var n;r.d(t,{F:()=>n}),function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CONSTRUCTING=1]="CONSTRUCTING",e[e.CONSTRUCTED=2]="CONSTRUCTED"}(n||(n={}))},7628:(e,t,r)=>{"use strict";r.d(t,{Oe:()=>i,fp:()=>o,tz:()=>a});var n=r(22974),s=r(1153);function o(e){let t=e.constructor.__accessorMetadata__;const r=Object.prototype.hasOwnProperty.call(e.constructor,"__accessorMetadata__");if(t){if(!r){t=Object.create(t);for(const e in t)t[e]=(0,n.d9)(t[e]);Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0})}}else t={},Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0});return e.constructor.__accessorMetadata__}function i(e,t){const r=o(e);let n=r[t];return n||(n=r[t]={}),n}function a(e,t){return(0,s.TS)(e,t,l)}const c=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;function l(e){return c.test(e)?"replace":"merge"}},50549:(e,t,r)=>{"use strict";r.d(t,{$:()=>f,i:()=>u});var n=r(67723),s=r(1153),o=r(53906);function i(e,t,r){if(!e||!e.read||!1===e.read.enabled||!e.read.source)return!1;const s=e.read.source;if("string"==typeof s){if(s===t)return!0;if(s.includes(".")&&0===s.indexOf(t)&&(0,n.Gg)(s,r))return!0}else for(const e of s){if(e===t)return!0;if(e.includes(".")&&0===e.indexOf(t)&&(0,n.Gg)(e,r))return!0}return!1}function a(e,t,r,n,s){let a=(0,o.HS)(t[r],s);(function(e){return e&&(!e.read||!1!==e.read.enabled&&!e.read.source)})(a)&&(e[r]=!0);for(const c of Object.getOwnPropertyNames(t))a=(0,o.HS)(t[c],s),i(a,r,n)&&(e[c]=!0)}function c(e,t,r,n){const s=r.metadatas,i=(0,o.hk)(s[t],n),a=i?.default;if(void 0===a)return;const c="function"==typeof a?a.call(e,t,n):a;void 0!==c&&r.set(t,c)}const l={origin:"service"};function u(e,t,r=l){if(!t||"object"!=typeof t)return;const i=(0,s.vw)(e),u=i.metadatas,f={};for(const e of Object.getOwnPropertyNames(t))a(f,u,e,t,r);i.setDefaultOrigin(r.origin);for(const s of Object.getOwnPropertyNames(f)){const a=(0,o.HS)(u[s],r).read,c=a&&a.source;let l;l=c&&"string"==typeof c?(0,n.$z)(t,c):t[s],a&&a.reader&&(l=a.reader.call(e,l,t,r)),void 0!==l&&i.set(s,l)}if(!r||!r.ignoreDefaults){i.setDefaultOrigin("defaults");for(const t of Object.getOwnPropertyNames(u))f[t]||c(e,t,i,r)}i.setDefaultOrigin("user")}function f(e,t,r,n=l){const s={...n,messages:[]};r(s),s.messages?.forEach((t=>{"warning"!==t.type||e.loaded?n&&n.messages&&n.messages.push(t):e.loadWarnings.push(t)}))}},37697:(e,t,r)=>{"use strict";r.d(t,{t:()=>i});var n=r(20102),s=r(80442),o=(r(92604),r(67723));function i(e,t,r){if(e&&t)if("object"==typeof t)for(const r of Object.getOwnPropertyNames(t))i(e,r,t[r]);else{if(t.includes(".")){const n=t.split("."),s=n.splice(n.length-1,1)[0];return void i((0,o.U2)(e,n),s,r)}const a=e.__accessor__;null!=a&&function(e,t){if((0,s.Z)("esri-unknown-property-errors")&&!function(e,t){return null!=t.metadatas[e]}(e,t))throw new n.Z("set:unknown-property",function(e,t){return"setting unknown property '"+e+"' on instance of "+t.host.declaredClass}(e,t))}(t,a),e[t]=r}}},58971:(e,t,r)=>{"use strict";r.d(t,{GF:()=>v,LJ:()=>d,gb:()=>h,it:()=>l,mS:()=>b}),r(80442);var n=r(92604),s=r(1153),o=r(44550);const i={onObservableAccessed:()=>{},onTrackingEnd:()=>{}},a=[];let c=i;function l(e){c.onObservableAccessed(e)}let u=!1,f=!1;function d(e,t,r){if(u)return p(e,t,r);g(e);const n=t.call(r);return y(),n}function h(e,t){return d(i,e,t)}function p(e,t,r){const s=u;u=!0,g(e);let o=null;try{o=t.call(r)}catch(e){f&&n.Z.getLogger("esri.core.accessorSupport.tracking").error(e)}return y(),u=s,o}function g(e){c=e,a.push(e)}function y(){const e=a.length;if(e>1){const t=a.pop();c=a[e-2],t.onTrackingEnd()}else if(1===e){const e=a.pop();c=i,e.onTrackingEnd()}else c=i}function b(e,t){const r=t.observerObject;if(r.flags&o.v.DepTrackingInitialized)return;const n=f;f=!1,r.flags&o.v.AutoTracked?p(t,t.metadata.get,e):v(e,t),f=n}const m=[];function v(e,t){const r=t.observerObject;r.flags&o.v.ExplicitlyTracking||(r.flags|=o.v.ExplicitlyTracking,p(t,(()=>{const r=t.metadata.dependsOn||m;for(const t of r)if("string"!=typeof t||t.includes(".")){const r=(0,s.NI)(t);for(let t=0,n=e;t<r.length&&null!=n&&"object"==typeof n;++t)n=_(n,r[t],t!==r.length-1)}else _(e,t,!1)})),r.flags&=~o.v.ExplicitlyTracking)}function _(e,t,r){const n="?"===t[t.length-1]?t.slice(0,-1):t;if(null!=e.getItemAt||Array.isArray(e)){const t=parseInt(n,10);if(!isNaN(t))return Array.isArray(e)?e[t]:e.at(t)}const o=(0,s.vw)(e);if(o){const t=o.propertiesByName.get(n);t&&(l(t.observerObject),b(e,t))}return r?e[n]:void 0}},44550:(e,t,r)=>{"use strict";var n;r.d(t,{v:()=>n}),function(e){e[e.Dirty=1]="Dirty",e[e.Overriden=2]="Overriden",e[e.Computing=4]="Computing",e[e.NonNullable=8]="NonNullable",e[e.HasDefaultValue=16]="HasDefaultValue",e[e.DepTrackingInitialized=32]="DepTrackingInitialized",e[e.AutoTracked=64]="AutoTracked",e[e.ExplicitlyTracking=128]="ExplicitlyTracking"}(n||(n={}))},38805:(e,t,r)=>{"use strict";r.d(t,{M:()=>n});class n{constructor(e){this._accessed=[],this._handles=[],this._observerObject=new s(e),o.register(this,new WeakRef(this._observerObject),this)}destroy(){o.unregister(this._observerObject),this._accessed.length=0,this._observerObject?.destroy(),this.clear()}onObservableAccessed(e){const t=this._accessed;t.includes(e)||t.push(e)}onTrackingEnd(){const e=this._handles,t=this._accessed,r=this._observerObject;for(let n=0;n<t.length;++n)e.push(t[n].observe(r));t.length=0}clear(){const e=this._handles;for(let t=0;t<e.length;++t)e[t].remove();e.length=0}}class s{constructor(e){this._notify=e,this._invalidCount=0,this.destroyed=!1}onInvalidated(){this._invalidCount++}onCommitted(){if(this.destroyed)return;const e=this._invalidCount;if(1===e)return this._invalidCount=0,void this._notify();this._invalidCount=e>0?e-1:0}destroy(){this.destroyed=!0,this._notify=i}}const o=new FinalizationRegistry((e=>{e.deref()?.destroy()}));function i(){}},87538:(e,t,r)=>{"use strict";r.d(t,{EH:()=>u,U5:()=>c,Xz:()=>l});var n=r(50758),s=r(58971),o=r(38805);let i=!1;const a=[];function c(e,t){let r=new o.M((function n(){if(!r||c)return;if(i)return void f(n);const o=a;r.clear(),i=!0,c=!0,a=(0,s.LJ)(r,e),c=!1,i=!1,t(a,o),d()})),a=null,c=!1;return c=!0,a=(0,s.LJ)(r,e),c=!1,(0,n.kB)((function(){r&&(r.destroy(),r=null,a=null)}))}function l(e,t){let r=new o.M((function(){t(i,a)})),i=null;function a(){return r?(r.clear(),i=(0,s.LJ)(r,e),i):null}return a(),(0,n.kB)((function(){r&&(r.destroy(),r=null),i=null}))}function u(e){let t=new o.M((function n(){t&&!r&&(i?f(n):(t.clear(),i=!0,r=!0,(0,s.LJ)(t,e),r=!1,i=!1,d()))})),r=!1;return r=!0,(0,s.LJ)(t,e),r=!1,(0,n.kB)((function(){t&&(t.destroy(),t=null)}))}function f(e){a.includes(e)||a.unshift(e)}function d(){for(;a.length;)a.pop()()}},1153:(e,t,r)=>{"use strict";r.d(t,{NI:()=>l,Qc:()=>f,TS:()=>a,b6:()=>i,vw:()=>o});var n=r(50758),s=r(22974);function o(e){return e.__accessor__??null}function i(e,t){return null!=e&&e.metadatas&&null!=e.metadatas[t]}function a(e,t,r){return c(e,t,r?{policy:r,path:""}:null)}function c(e,t,r){return t?Object.keys(t).reduce(((e,n)=>{const o=n;let i=null,a="merge";if(r&&(i=r.path?`${r.path}.${n}`:n,a=r.policy(i)),"replace"===a)return e[o]=t[o],e;if("replace-arrays"===a&&Array.isArray(e[o]))return e[o]=t[o],e;if(void 0===e[o])return e[o]=(0,s.d9)(t[o]),e;let l=e[o],u=t[o];if(l===u)return e;if(Array.isArray(u)||Array.isArray(e))l=l?Array.isArray(l)?e[o]=l.concat():e[o]=[l]:e[o]=[],u&&(Array.isArray(u)||(u=[u]),u.forEach((e=>{l.includes(e)||l.push(e)})));else if(u&&"object"==typeof u)if(r){const t=r.path;r.path=i,e[o]=c(l,u,r),r.path=t}else e[o]=c(l,u,null);else e.hasOwnProperty(n)&&!t.hasOwnProperty(n)||(e[o]=u);return e}),e||{}):e}function l(e){return Array.isArray(e)?e:e.split(".")}function u(e){return e.includes(",")?e.split(",").map((e=>e.trim())):[e.trim()]}function f(e,t,r,s){const o=function(e){if(Array.isArray(e)){const t=[];for(const r of e)t.push(...u(r));return t}return u(e)}(t);if(1!==o.length){const t=o.map((t=>s(e,t,r)));return(0,n.AL)(t)}return s(e,o[0],r)}},26258:(e,t,r)=>{"use strict";r.d(t,{BT:()=>w,YP:()=>k,aQ:()=>T});var n=r(3894),s=r(50758),o=r(22974),i=r(71143);class a extends i.Z{constructor(){super(...arguments),this._set=new Set}destroy(){super.destroy(),this._set=null}acquire(...e){const t=super.acquire(...e);return this._set.delete(t),t}release(e){e&&!this._set.has(e)&&(super.release(e),this._set.add(e))}_dispose(e){this._set.delete(e),super._dispose(e)}}var c,l,u=r(1654),f=r(99001),d=r(67723),h=r(87538),p=r(1153);(l=c||(c={}))[l.Untracked=0]="Untracked",l[l.Tracked=1]="Tracked";class g{constructor(){this.uid=(0,f.D)(),this.removed=!1,this.type=null,this.oldValue=null,this.callback=null,this.getValue=null,this.target=null,this.path=null,this.equals=null}static acquireUntracked(e,t,r,n,s){return this.pool.acquire(c.Untracked,e,t,r,n,s,o.fS)}static acquireTracked(e,t,r,n){return this.pool.acquire(c.Tracked,e,t,r,null,null,n)}notify(e,t){this.type===c.Untracked?this.callback.call(this.target,e,t,this.path,this.target):this.callback.call(null,e,t,void 0,void 0)}acquire(e,t,r,n,s,o,i){this.uid=(0,f.D)(),this.removed=!1,this.type=e,this.oldValue=t,this.callback=r,this.getValue=n,this.target=s,this.path=o,this.equals=i}release(){this.target=this.path=this.oldValue=this.callback=this.getValue=null,this.uid=(0,f.D)(),this.removed=!0}}g.pool=new a(g);const y=new n.Z,b=new Set;let m;function v(e){b.delete(e),b.add(e),m||(m=(0,u.Os)(O))}function _(e){if(e.removed)return;const t=e.oldValue,r=e.getValue();e.equals(t,r)||(e.oldValue=r,e.notify(r,t))}function w(e){for(const t of b.values())t.target===e&&(t.removed=!0)}function O(){let e=10;for(;m&&e--;){m=null;const e=A(),t=y.acquire();for(const r of e){const e=r.uid;_(r),e===r.uid&&r.removed&&t.push(r)}for(const e of b)e.removed&&(t.push(e),b.delete(e));for(const e of t)g.pool.release(e);y.release(t),y.release(e),S.forEach((e=>e()))}}function A(){const e=y.acquire();e.length=b.size;let t=0;for(const r of b)e[t]=r,++t;return b.clear(),e}const S=new Set;function k(e,t,r,n=!1){return!e.__accessor__||e.__accessor__.destroyed?(0,s.kB)():n?function(e,t,r){const n=(0,p.Qc)(e,t,r,((e,t,r)=>{let s=!1;return(0,h.U5)((()=>(0,d.$z)(e,t)),((i,a)=>{e.__accessor__.destroyed?n.remove():s||(s=!0,(0,o.fS)(a,i)||r.call(e,i,a,t,e),s=!1)}))}));return n}(e,t,r):function(e,t,r){let n=(0,p.Qc)(e,t,r,((e,t,r)=>{let o,i,a=(0,h.Xz)((()=>(0,d.$z)(e,t)),((s,a)=>{e.__accessor__.destroyed||o&&o.uid!==i?n.remove():(o||(o=g.acquireUntracked(s,r,a,e,t),i=o.uid),v(o))}));return(0,s.kB)((()=>{a.remove(),o&&(o.uid!==i||o.removed||(o.removed=!0,v(o)),o=null),n=a=null}))}));return n}(e,t,r)}function T(e,t,r=!1,n=o.y7){return r?function(e,t,r){let n=!1;return(0,h.U5)(e,((e,s)=>{n||(n=!0,r(s,e)||t(e,s),n=!1)}))}(e,t,n):function(e,t,r){let n,o,i=(0,h.Xz)(e,((e,s)=>{n&&n.uid!==o?i.remove():(n||(n=g.acquireTracked(e,t,s,r),o=n.uid),v(n))}));return(0,s.kB)((()=>{i.remove(),n&&(n.uid!==o||n.removed||(n.removed=!0,v(n)),n=null),i=null}))}(e,t,n)}},76169:(e,t,r)=>{"use strict";r.d(t,{c:()=>h,d:()=>d});var n=r(67676),s=r(20102),o=r(92604),i=r(67723),a=r(31263),c=r(1153),l=r(53906);function u(e,t,r,n,s){const o={};return t.write?.writer?.call(e,n,o,r,s),o}function f(e,t,r,c,l,u){if(!c||!c.write)return!1;const f=(0,i.U2)(e,r);if(!l&&c.write.overridePolicy){const t=c.write.overridePolicy.call(e,f,r,u??void 0);void 0!==t&&(l=t)}if(l||(l=c.write),!l||!1===l.enabled)return!1;if((null===f&&!l.allowNull&&!l.writerEnsuresNonNull||void 0===f)&&l.isRequired){const t=new s.Z("web-document-write:property-required",`Missing value for required property '${r}' on '${e.declaredClass}'`,{propertyName:r,target:e});return t&&u&&u.messages?u.messages.push(t):t&&!u&&o.Z.getLogger("esri.core.accessorSupport.write").error(t.name,t.message),!1}return!(void 0===f||null===f&&!l.allowNull&&!l.writerEnsuresNonNull||!(l.alwaysWriteDefaults||t.store.multipleOriginsSupported&&t.store.originOf(r)!==a.s3.DEFAULTS)&&function(e,t,r,s,o){const i=s.default;if(void 0===i)return!1;if(null!=s.defaultEquals)return s.defaultEquals(o);if("function"==typeof i){if(Array.isArray(o)){const s=i.call(e,t,r??void 0);return(0,n.fS)(s,o)}return!1}return i===o}(e,r,u,c,f)||!l.ignoreOrigin&&u&&u.origin&&t.store.multipleOriginsSupported&&t.store.originOf(r)<(0,a.M9)(u.origin))}function d(e,t,r,n){const s=(0,c.vw)(e),o=s.metadatas,i=(0,l.Ah)(o[t],n);return!!i&&f(e,s,t,i,r,n)}function h(e,t,r){if(e&&"function"==typeof e.toJSON&&(!e.toJSON.isDefaultToJSON||!e.write))return(0,c.TS)(t,e.toJSON(r));const n=(0,c.vw)(e),s=n.metadatas;for(const o in s){const d=(0,l.Ah)(s[o],r);if(!f(e,n,o,d,void 0,r))continue;const h=(0,i.U2)(e,o),p=u(e,d,d.write&&"string"==typeof d.write.target?d.write.target:o,h,r);Object.keys(p).length>0&&(t=(0,c.TS)(t,p),r?.resources?.pendingOperations?.length&&r.resources.pendingOperations.push(Promise.all(r.resources.pendingOperations).then((()=>(0,c.TS)(t,p,(()=>"replace-arrays"))))),r&&r.writtenProperties&&r.writtenProperties.push({target:e,propName:o,oldOrigin:(0,a.Wm)(n.store.originOf(o)),newOrigin:r.origin}))}return t}},67676:(e,t,r)=>{"use strict";r.d(t,{FY:()=>y,Od:()=>b,SO:()=>f,Vx:()=>o,a9:()=>l,cq:()=>h,e$:()=>p,e5:()=>i,fS:()=>s,pC:()=>m,w6:()=>u,zG:()=>a});var n=r(77734);function s(e,t,r){if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)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}function o(e,t){let r=e.length!==t.length;r&&(e.length=t.length);for(let n=0;n<t.length;++n)e[n]!==t[n]&&(e[n]=t[n],r=!0);return r}function i(e,t,r){let n,s;return r?(n=t.filter((t=>!e.some((e=>r(e,t))))),s=e.filter((e=>!t.some((t=>r(t,e)))))):(n=t.filter((t=>!e.includes(t))),s=e.filter((e=>!t.includes(e)))),{added:n,removed:s}}function a(e){return e&&"number"==typeof e.length}const c=!!Array.prototype.fill;function l(e,t){if(c)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function u(e,t){void 0===t&&(t=e,e=0);const r=new Array(t-e);for(let n=e;n<t;n++)r[n-e]=n;return r}class f{constructor(){this.last=0}}const d=new f;function h(e,t,r,n){n=n||d;const s=Math.max(0,n.last-10);for(let o=s;o<r;++o)if(e[o]===t)return n.last=o,o;const o=Math.min(s,r);for(let r=0;r<o;++r)if(e[r]===t)return n.last=r,r;return-1}function p(e,t,r,n){const s=r??e.length,o=h(e,t,s,n);if(-1!==o)return e[o]=e[s-1],null==r&&e.pop(),t}const g=new Set;function y(e,t,r=e.length,n=t.length,s,o){if(0===n||0===r)return r;g.clear();for(let e=0;e<n;++e)g.add(t[e]);s=s||d;const i=Math.max(0,s.last-10);for(let t=i;t<r;++t)if(g.has(e[t])&&(o&&o.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;for(let t=0;t<i;++t)if(g.has(e[t])&&(o&&o.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;return g.clear(),r}function b(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}function m(e,t){return null!=e}new n.Z},60235:(e,t,r)=>{"use strict";r.d(t,{Mr:()=>a,XV:()=>i,x9:()=>c});var n=r(80442);const s=new Set;function o(e,t,r=!1){r&&s.has(t)||(r&&s.add(t),e.warn(`🛑 DEPRECATED - ${t}`))}function i(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{moduleName:n}=r;c(e,"Function: "+(n?n+"::":"")+t+"()",r)}}function a(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{moduleName:n}=r;c(e,"Property: "+(n?n+"::":"")+t,r)}}function c(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{replacement:n,version:s,see:i,warnOnce:a}=r;let c=t;n&&(c+=`\n\t🛠️ Replacement: ${n}`),s&&(c+=`\n\t⚙️ Version: ${s}`),i&&(c+=`\n\t🔗 See ${i} for more details.`),o(e,c,a)}}},91460:(e,t,r)=>{"use strict";r.d(t,{IH:()=>i,on:()=>o,vT:()=>s});var n=r(50758);function s(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function o(e,t,r){if(!s(e))throw new TypeError("target is not a Evented or EventTarget object");if("on"in e)return e.on(t,r);if(Array.isArray(t)){const s=t.slice();for(const t of s)e.addEventListener(t,r);return(0,n.kB)((()=>{for(const t of s)e.removeEventListener(t,r)}))}return e.addEventListener(t,r),(0,n.kB)((()=>e.removeEventListener(t,r)))}function i(e,t,r){if(!s(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const n=o(e,t,(t=>{n.remove(),r.call(e,t)}));return n}},50758:(e,t,r)=>{"use strict";r.d(t,{AL:()=>o,kB:()=>s});const n={remove:()=>{}};function s(e){return e?{remove(){e&&(e(),e=void 0)}}:n}function o(e){return s((()=>function(e){e.forEach((e=>e?.remove()))}(e)))}},80442:(e,t,r)=>{"use strict";let n;function s(e){return"function"==typeof n[e]?n[e]=n[e](globalThis):n[e]}r.d(t,{Z:()=>s}),n=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},s.add=(e,t,r,o)=>((o||void 0===n[e])&&(n[e]=t),r&&s(e)),s.cache=n,s.add("esri-deprecation-warnings",!0),s.add("esri-force-fullscreen-debug",!1),(()=>{s.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(s.add("host-browser",e),s.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),s.add("dom",e),s("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(s.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),s.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),s.add("khtml",r.includes("Konqueror")?n:void 0),s.add("edge",parseFloat(t.split("Edge/")[1])||void 0),s.add("opr",parseFloat(t.split("OPR/")[1])||void 0),s.add("webkit",!s("wp")&&!s("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),s.add("chrome",!s("edge")&&!s("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),s.add("android",!s("wp")&&parseFloat(t.split("Android ")[1])||void 0),s.add("safari",!r.includes("Safari")||s("wp")||s("chrome")||s("android")||s("edge")||s("opr")?void 0:parseFloat(r.split("Version/")[1])),s.add("mac",r.includes("Macintosh")),!s("wp")&&/(iPhone|iPod|iPad)/.test(t)){const e=RegExp.$1.replace(/P/,"p"),r=/OS ([\d_]+)/.test(t)?RegExp.$1:"1",n=parseFloat(r.replace(/_/,".").replaceAll("_",""));s.add(e,n),s.add("ios",n)}s("webkit")||(!t.includes("Gecko")||s("wp")||s("khtml")||s("edge")||s.add("mozilla",n),s("mozilla")&&s.add("ff",parseFloat(t.split("Firefox/")[1]||t.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&s.add("esri-mobile",t),r&&s.add("esri-iPhone",r),s.add("esri-geolocation",!!navigator.geolocation)}s.add("esri-wasm","WebAssembly"in globalThis),s.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t})),s.add("wasm-simd",(()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])))),s.add("esri-atomics","Atomics"in globalThis),s.add("esri-workers","Worker"in globalThis),s.add("web-feat:cache","caches"in globalThis),s.add("esri-workers-arraybuffer-transfer",!s("safari")||Number(s("safari"))>=12),s.add("workers-pool-size",8),s.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),s.add("featurelayer-simplify-payload-size-factors",[1,1,4]),s.add("featurelayer-animation-enabled",!0),s.add("featurelayer-snapshot-enabled",!0),s.add("featurelayer-snapshot-point-min-threshold",8e4),s.add("featurelayer-snapshot-point-max-threshold",4e5),s.add("featurelayer-snapshot-point-coverage",.1),s.add("featurelayer-advanced-symbols",!1),s.add("featurelayer-pbf",!0),s.add("featurelayer-pbf-statistics",!1),s.add("feature-layers-workers",!0),s.add("feature-polyline-generalization-factor",1),s.add("mapview-transitions-duration",200),s.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),s.add("mapserver-pbf-version-support",10.81),s.add("mapservice-popup-identify-max-tolerance",20),s.add("heatmap-allow-raster-fallback",!1),s.add("heatmap-force-raster",!1),s("host-webworker")||s("host-browser")&&(s.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),s.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{s.add("esri-image-decode",!0,!0,!0)})).catch((()=>{s.add("esri-image-decode",!1,!0,!0)}))}return!1})),s.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})()},66374:(e,t,r)=>{"use strict";function n(e){const t=[];return function*(){yield*t;for(const r of e)t.push(r),yield r}}function s(e,t){for(const r of e)if(null!=r&&t(r))return r}function o(e){return null!=e&&"function"==typeof e[Symbol.iterator]}r.d(t,{Fs:()=>n,TW:()=>o,sE:()=>s})},22974:(e,t,r)=>{"use strict";r.d(t,{Vo:()=>a,d9:()=>i,fS:()=>h,tZ:()=>c,y7:()=>p,yd:()=>o});var n=r(67676),s=r(1533);function o(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&o(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function i(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=d(e);if(null!=t)return t;if(c(e))return e.clone();if(l(e))return e.map(i);if(u(e))return e.clone();const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=i(e[t]);return r}function a(e){if(!e||"object"!=typeof e||"function"==typeof e||"HTMLElement"in globalThis&&e instanceof HTMLElement)return e;const t=d(e);if(null!=t)return t;if(l(e)){let t=!0;const r=e.map((e=>{const r=a(e);return null!=e&&null==r&&(t=!1),r}));return t?r:null}if(c(e))return e.clone();if(e instanceof File||e instanceof Blob)return e;if(!u(e)){const t=new(0,Object.getPrototypeOf(e).constructor);for(const r of Object.getOwnPropertyNames(e)){const n=e[r],s=a(n);if(null!=n&&null==s)return null;t[r]=s}return t}return null}function c(e){return"function"==typeof e.clone}function l(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function u(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function f(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function d(e){if((0,s.W0)(e)||(0,s.lq)(e)||(0,s.KZ)(e)||(0,s.z3)(e)||(0,s.Uc)(e)||(0,s.Hx)(e)||(0,s.ZY)(e)||(0,s.xZ)(e)||(0,s.fS)(e))return e.slice();if(e instanceof Date)return new Date(e.getTime());if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){const t=new Map;for(const[r,n]of e)t.set(r,i(n));return t}if(e instanceof Set){const t=new Set;for(const r of e)t.add(i(r));return t}return null}function h(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof(e||{}).getTime&&"function"==typeof(t||{}).getTime&&e.getTime()===t.getTime()||!1}function p(e,t){return e===t||(null==e||"string"==typeof e?e===t:"number"==typeof e?e===t||"number"==typeof t&&isNaN(e)&&isNaN(t):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():Array.isArray(e)?Array.isArray(t)&&(0,n.fS)(e,t):e instanceof Set?t instanceof Set&&function(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}(e,t):e instanceof Map?t instanceof Map&&function(e,t){if(e.size!==t.size)return!1;for(const[r,n]of e){const e=t.get(r);if(e!==n||void 0===e&&!t.has(r))return!1}return!0}(e,t):!!f(e)&&f(t)&&function(e,t){if(null===e||null===t)return!1;const r=Object.keys(e);if(null===t||Object.keys(t).length!==r.length)return!1;for(const n of r)if(e[n]!==t[n]||!Object.prototype.hasOwnProperty.call(t,n))return!1;return!0}(e,t))}},70586:(e,t,r)=>{"use strict";function n(e,t){if(null==e)throw new Error(t??"value is None")}function s(e){return e?.destroy(),null}function o(e){return e?.dispose(),null}function i(e){return e?.remove(),null}function a(e){return e?.abort(),null}function c(e){return e?.release(),null}function l(e,t,r){return null!=e&&null!=t?null!=r?r(e,t):e.equals(t):e===t}r.d(t,{IM:()=>a,M2:()=>o,O3:()=>n,RY:()=>c,SC:()=>s,_W:()=>l,hw:()=>i})},41213:(e,t,r)=>{"use strict";r.d(t,{Y:()=>s});const n=[];function s(e){n.push(e),1===n.length&&queueMicrotask((()=>{const e=n.slice();n.length=0;for(const t of e)t()}))}},78286:(e,t,r)=>{"use strict";r.d(t,{RB:()=>i,RH:()=>s,hS:()=>o});var n=r(22974);function s(e,t,r=!1){return c(e,t,r)}function o(e,t){if(null!=t)return t[e]||a(e.split("."),!1,t)}function i(e,t,r){const n=e.split("."),s=n.pop(),o=a(n,!0,r);o&&s&&(o[s]=t)}function a(e,t,r){let n=r;for(const r of e){if(null==n)return;if(!(r in n)){if(!t)return;n[r]={}}n=n[r]}return n}function c(e,t,r){return t?Object.keys(t).reduce(((e,s)=>{let o=e[s],i=t[s];return o===i?e:void 0===o?(e[s]=(0,n.d9)(i),e):(Array.isArray(i)||Array.isArray(e)?(o=o?Array.isArray(o)?e[s]=o.concat():e[s]=[o]:e[s]=[],i&&(Array.isArray(i)||(i=[i]),r?i.forEach((e=>{o.includes(e)||o.push(e)})):e[s]=i.concat())):i&&"object"==typeof i?e[s]=c(o,i,r):e.hasOwnProperty(s)&&!t.hasOwnProperty(s)||(e[s]=i),e)}),e||{}):e}},95330:(e,t,r)=>{"use strict";r.d(t,{e4:()=>S,UO:()=>A,OT:()=>O,zE:()=>l,hh:()=>E,Ds:()=>j,as:()=>_,WW:()=>w,R8:()=>v,D_:()=>m,Hc:()=>d,y8:()=>k,fu:()=>g,$F:()=>y,r9:()=>h,k_:()=>u,H9:()=>p,Yn:()=>N,gx:()=>T,Hl:()=>b});var n=r(50758);const s=(o=globalThis,{setTimeout:(e,t)=>{const r=o.setTimeout(e,t);return(0,n.kB)((()=>o.clearTimeout(r)))}});var o,i=r(20102),a=r(91460),c=(r(92604),r(70586));function l(e="Aborted"){return new i.Z("AbortError",e)}function u(e,t="Aborted"){if(d(e))throw l(t)}function f(e){return null!=e?"aborted"in e?e:e.signal:e}function d(e){const t=f(e);return null!=t&&t.aborted}function h(e){if(m(e))throw e}function p(e){if(!m(e))throw e}function g(e,t){const r=f(e);if(null!=r){if(!r.aborted)return(0,a.IH)(r,"abort",(()=>t()));t()}}function y(e,t){const r=f(e);if(null!=r)return u(r),(0,a.IH)(r,"abort",(()=>t(l())))}function b(e,t){return null==f(t)?e:new Promise(((r,n)=>{let s=g(t,(()=>n(l())));const o=()=>s=(0,c.hw)(s);e.then(o,o),e.then(r,n)}))}function m(e){return"AbortError"===e?.name}async function v(e){try{return await e}catch(e){if(!m(e))throw e;return}}async function _(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e),r=t.map((t=>e[t])),n=await _(r),s={};return t.map(((e,t)=>s[e]=n[t])),s}const t=e;return Promise.allSettled(t).then((e=>Array.from(t,((t,r)=>{const n=e[r];return"fulfilled"===n.status?{promise:t,value:n.value}:{promise:t,error:n.reason}}))))}async function w(e){return(await _(e)).filter((e=>!!e.value)).map((e=>e.value))}async function O(e){return(await Promise.allSettled(e)).filter((e=>"fulfilled"===e.status)).map((e=>e.value))}async function A(e){return(await Promise.allSettled(e)).filter((e=>"rejected"===e.status)).map((e=>e.reason))}function S(e,t=void 0,r){const n=new AbortController;return g(r,(()=>n.abort())),new Promise(((r,s)=>{let o=setTimeout((()=>{o=0,r(t)}),e);g(n,(()=>{o&&(clearTimeout(o),s(l()))}))}))}function k(e){return e&&"function"==typeof e.then}function T(e){return k(e)?e:Promise.resolve(e)}function j(e,t=-1){let r,n,s,o,i=null;const a=(...c)=>{if(r){n=c,o&&o.reject(l()),o=E();const e=o.promise;if(i){const e=i;i=null,e.abort()}return e}if(s=o||E(),o=null,t>0){const n=new AbortController;r=T(e(...c,n.signal));const s=r;S(t).then((()=>{r===s&&(o?n.abort():i=n)}))}else r=1,r=T(e(...c));const u=()=>{const e=n;n=s=r=i=null,null!=e&&a(...e)},f=r,d=s;return f.then(u,u),f.then(d.resolve,d.reject),d.promise};return a}function E(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n})),n=t=>{e(t)};return n.resolve=t=>e(t),n.reject=e=>t(e),n.timeout=(e,t)=>s.setTimeout((()=>n.reject(t)),e),n.promise=r,n}async function N(e){await Promise.resolve(),u(e)}},1654:(e,t,r)=>{"use strict";r.d(t,{MU:()=>v,Os:()=>g});var n=r(41213),s=r(54790),o=r(44553),i=r(95330),a=r(76882);class c{constructor(e){this.callback=e,this.isActive=!0}remove(){this.isActive=!1}}let l=0;const u={time:(0,a.HA)(0),deltaTime:(0,a.HA)(0),elapsedFrameTime:(0,a.HA)(0),frameDuration:(0,a.HA)(0)},f=["prepare","preRender","render","postRender","update","finish"],d=[],h=new o.Z,p={frameTasks:h,willDispatch:!1,clearFrameTasks:function(e=!1){h.forAll((e=>{e.removed=!0})),e&&b()},dispatch:m,executeFrameTasks:function(e){const t=(0,a.HA)(e-l);l=e;const r=1e3/60,n=Math.max(0,t-r);u.time=e,u.frameDuration=(0,a.HA)(r-n);for(let r=0;r<f.length;r++){const n=performance.now(),s=f[r];h.forAll((n=>{n.paused||n.removed||(0===r&&n.ticks++,n.phases[s]&&(u.elapsedFrameTime=(0,a.HA)(performance.now()-e),u.deltaTime=0===n.ticks?(0,a.HA)(0):t,n.phases[s]?.call(n,u)))})),_[r].record(performance.now()-n)}b(),w.record(performance.now()-e)}};function g(e){const t=new c(e);return d.push(t),p.willDispatch||(p.willDispatch=!0,(0,n.Y)(m)),t}const y=new o.Z;function b(){h.forAll((e=>{e.removed&&y.push(e)})),h.removeUnorderedMany(y.data,y.length),y.clear()}function m(){for(;d.length;){const e=d.shift();e.isActive&&e.callback()}p.willDispatch=!1}function v(e=1,t){const r=(0,i.hh)(),s=()=>{(0,i.Hc)(t)?r.reject((0,i.zE)()):0===e?r():(--e,(0,n.Y)((()=>s())))};return s(),r.promise}const _=f.map((e=>new s.Z(e))),w=new s.Z("total")},19153:(e,t,r)=>{"use strict";r.d(t,{Cb:()=>l,Qs:()=>a,gx:()=>i,hP:()=>c});var n=r(78286);const s=/\{([^\}]+)\}/g;function o(e){return e??""}function i(e,t){return e.replaceAll(s,"object"==typeof t?(e,r)=>o((0,n.hS)(r,t)):(e,r)=>o(t(r)))}function a(e,t){return e.replaceAll(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,(e=>t&&t.includes(e)?e:`\\${e}`))}function c(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function l(e){return(new DOMParser).parseFromString(e||"","text/html").body.innerText||""}},76882:(e,t,r)=>{"use strict";function n(e){return e}r.d(t,{HA:()=>n})},1533:(e,t,r)=>{"use strict";function n(e){return e instanceof ArrayBuffer}function s(e){return"Int8Array"===e?.constructor?.name}function o(e){return"Uint8Array"===e?.constructor?.name}function i(e){return"Uint8ClampedArray"===e?.constructor?.name}function a(e){return"Int16Array"===e?.constructor?.name}function c(e){return"Uint16Array"===e?.constructor?.name}function l(e){return"Int32Array"===e?.constructor?.name}function u(e){return"Uint32Array"===e?.constructor?.name}function f(e){return"Float32Array"===e?.constructor?.name}function d(e){return"Float64Array"===e?.constructor?.name}function h(e){return!("buffer"in e)}function p(e){return null!=e?h(e)?8*e.length+12:e.byteLength+g:0}r.d(t,{B3:()=>b,DB:()=>y,Hx:()=>l,KZ:()=>i,Op:()=>v,Q7:()=>m,Uc:()=>c,W0:()=>s,Xw:()=>p,ZY:()=>u,eP:()=>n,fS:()=>d,kJ:()=>h,lq:()=>o,xZ:()=>f,z3:()=>a}),r(80442);const g=145,y=1024;function b(e){return d(e)||f(e)||l(e)||a(e)||s(e)}function m(e){return d(e)||f(e)}function v(e){return d(e)?179769e303:f(e)?3402823e32:u(e)?4294967295:c(e)?65535:o(e)||i(e)?255:l(e)?2147483647:a(e)?32767:s(e)?127:256}},99001:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});let n=0;function s(){return++n}},17452:(e,t,r)=>{"use strict";r.d(t,{$U:()=>ae,AH:()=>Q,B7:()=>N,D6:()=>z,Fv:()=>W,HK:()=>Y,Hu:()=>ye,IR:()=>we,Ie:()=>pe,L:()=>T,Ml:()=>ve,P$:()=>G,PF:()=>J,Qj:()=>he,R9:()=>w,TI:()=>k,YP:()=>V,Yd:()=>fe,ZN:()=>be,Zo:()=>R,_l:()=>re,b7:()=>C,ed:()=>U,fZ:()=>_e,fl:()=>me,fw:()=>ne,hF:()=>H,hO:()=>ce,io:()=>se,jc:()=>K,kl:()=>q,mN:()=>j,oC:()=>oe,oh:()=>D,qg:()=>P,rS:()=>X,sJ:()=>te,tD:()=>$,tm:()=>L,u0:()=>E,v_:()=>Z,vt:()=>de});var n=r(68773),s=r(67676),o=r(20102),i=r(96674),a=r(92604),c=r(19745),l=r(49917);const u=a.Z.getLogger("esri.core.urlUtils"),f=n.default.request,d="esri/config: esriConfig.request.proxyUrl is not set.",h=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,p=/^\s*http:/i,g=/^\s*https:/i,y=/^\s*file:/i,b=/:\d+$/,m=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,v=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),_=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");class w{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let t=this.uri.match(v);this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=this.authority.match(_),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const O={};let A=new w(n.default.applicationUrl);let S=function(){const e=A.path,t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${A.scheme}://${A.host}${null!=A.port?`:${A.port}`:""}${t}`}();const k=()=>A,T=()=>S;function j(e){if(!e)return null;const t={path:null,query:null},r=new w(e),n=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.substring(0,n),t.query=E(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.substring(0,t.path.length-(r.fragment.length+1)))),t}function E(e){const t=e.split("&"),r={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let n,s;t<0?(n=decodeURIComponent(e),s=""):(n=decodeURIComponent(e.slice(0,t)),s=decodeURIComponent(e.slice(t+1)));let o=r[n];"string"==typeof o&&(o=r[n]=[o]),Array.isArray(o)?o.push(s):r[n]=s}return r}function N(e,t){return e?t&&"function"==typeof t?Object.keys(e).map((r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r])))).join("&"):Object.keys(e).map((r=>{const n=e[r];if(null==n)return"";const s=encodeURIComponent(r)+"=",o=t&&t[r];return o?s+encodeURIComponent(o(n)):Array.isArray(n)?n.map((e=>(0,i.AK)(e)?s+encodeURIComponent(JSON.stringify(e)):s+encodeURIComponent(e))).join("&"):(0,i.AK)(n)?s+encodeURIComponent(JSON.stringify(n)):s+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function C(e=!1){let t,r=f.proxyUrl;if("string"==typeof e){t=ae(e);const n=U(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw u.warn(d),new o.Z("urlutils:proxy-not-set",d);return t&&le()&&(r=ce(r)),j(r)}function P(e){const t=U(e);let r,n;if(t){const e=I(t.proxyUrl);r=e.path,n=e.query?E(e.query):null}if(r){const t=j(e);e=r+"?"+t.path;const s=N({...n,...t.query});s&&(e=`${e}?${s}`)}return e}const M={path:"",query:""};function I(e){const t=e.indexOf("?");return-1!==t?(M.path=e.slice(0,t),M.query=e.slice(t+1)):(M.path=e,M.query=null),M}function x(e){return(e=ue(e=function(e){return e&&"/"===e[e.length-1]?e:`${e}/`}(e=I(e).path),!0)).toLowerCase()}function $(e){const t={proxyUrl:e.proxyUrl,urlPrefix:x(e.urlPrefix)},r=f.proxyRules,n=t.urlPrefix;let s=r.length;for(let e=0;e<r.length;e++){const t=r[e].urlPrefix;if(0===n.indexOf(t)){if(n.length===t.length)return-1;s=e;break}0===t.indexOf(n)&&(s=e+1)}return r.splice(s,0,t),s}function U(e){const t=f.proxyRules,r=x(e);for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e].urlPrefix))return t[e]}function R(e,t){if(!e||!t)return!1;e=B(e),t=B(t);const r=(0,c.a)(e),n=(0,c.a)(t);return null!=r&&null!=n?r.portalHostname===n.portalHostname:null==r&&null==n&&z(e,t,!0)}function L(e,t){return e=B(e),t=B(t),ue(e)===ue(t)}function B(e){const t=(e=W(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function D(e){const t=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t),r=f.interceptors;if(r)for(const e of r)if(Array.isArray(e.urls)){if(e.urls.some(t))return e}else if(t(e.urls))return e;return null}function z(e,t,r=!1){if(!e||!t)return!1;const n=ge(e),s=ge(t);return!(!r&&n.scheme!==s.scheme)&&null!=n.host&&null!=s.host&&n.host.toLowerCase()===s.host.toLowerCase()&&n.port===s.port}function q(e){if("string"==typeof e){if(!V(e))return!0;e=ge(e)}if(z(e,A))return!0;const t=f.trustedServers||[];for(let r=0;r<t.length;r++){const n=F(t[r]);for(let t=0;t<n.length;t++)if(z(e,n[t]))return!0}return!1}function F(e){return O[e]||(ie(e)||oe(e)?O[e]=[new w(H(e))]:O[e]=[new w(`http://${e}`),new w(`https://${e}`)]),O[e]}function H(e,t=S,r){return oe(e)?r&&r.preserveProtocolRelative?e:"http"===A.scheme&&A.authority===G(e).slice(2)?`http:${e}`:`https:${e}`:ie(e)?e:Z("/"===e[0]?function(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}(t):t,e)}function J(e,t=S,r){if(null==e||!V(e))return e;const n=W(e),s=n.toLowerCase(),o=W(t).toLowerCase().replace(/\/+$/,""),i=r?W(r).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==o.indexOf(i))return e;const a=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let c=a(s,"/",s.indexOf("//")+2),l=-1;for(;s.slice(0,c+1)===o.slice(0,c)+"/"&&(l=c+1,c!==s.length);)c=a(s,"/",c+1);if(-1===l)return e;if(i&&l<i.length)return e;e=n.slice(l);const u=o.slice(l-1).replaceAll(/[^/]+/g,"").length;if(u>0)for(let t=0;t<u;t++)e=`../${e}`;else e=`./${e}`;return e}function W(e){return function(e){const t=f.httpsDomains;if(!function(e){return null!=e&&p.test(e)||"http"===A.scheme&&oe(e)}(e))return e;const r=e.indexOf("/",7);let n;if(n=-1===r?e:e.slice(0,r),n=n.toLowerCase().slice(7),b.test(n)){if(!n.endsWith(":80"))return e;n=n.slice(0,-3),e=e.replace(":80","")}return"http"===A.scheme&&n===A.authority&&!m.test(e)||(le()&&n===A.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||le()&&!U(e))&&(e=ce(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=I(e);e=(e=t.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=H(e=e.trim()))))}function Z(...e){const t=e.filter(s.pC);if(!t||!t.length)return;const r=[];if(V(t[0])){const e=t[0],n=e.indexOf("//");-1!==n&&(r.push(e.slice(0,n+1)),function(e){return null!=e&&y.test(e)}(t[0])&&(r[0]+="/"),t[0]=e.slice(n+2))}else"/"===t[0][0]&&r.push("");const n=t.reduce(((e,t)=>t?e.concat(t.split("/")):e),[]);for(let e=0;e<n.length;e++){const t=n[e];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&e===n.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function G(e,t=!1){if(null==e||K(e)||Y(e))return null;let r=e.indexOf("://");if(-1===r&&oe(e))r=2;else{if(-1===r)return null;r+=3}const n=e.indexOf("/",r);return-1!==n&&(e=e.slice(0,n)),t&&(e=ue(e,!0)),e}function V(e){return oe(e)||ie(e)}function K(e){return null!=e&&"blob:"===e.slice(0,5)}function Y(e){return null!=e&&"data:"===e.slice(0,5)}function Q(e){const t=te(e);return t&&t.isBase64?(0,l.R)(t.data):null}function X(e){return(0,l.s)(e).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const ee=/^data:(.*?)(;base64)?,(.*)$/;function te(e){const t=e.match(ee);if(!t)return null;const[,r,n,s]=t;return{mediaType:r,isBase64:!!n,data:s}}function re(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}function ne(e){const t=Q(e);if(!t)return null;const r=te(e);return new Blob([t],{type:r.mediaType})}function se(e,t){!function(e,t){if(!e)return!1;const r=document.createElement("a");if(!("download"in r))return!1;const n=URL.createObjectURL(e);r.download=t,r.href=n,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}(e,t)}function oe(e){return null!=e&&"/"===e[0]&&"/"===e[1]}function ie(e){return null!=e&&h.test(e)}function ae(e){return null!=e&&g.test(e)||"https"===A.scheme&&oe(e)}function ce(e){return oe(e)?`https:${e}`:e.replace(p,"https:")}function le(){return"https"===A.scheme}function ue(e,t=!1){return oe(e)?e.slice(2):(e=e.replace(h,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function fe(e){let t=0;if(V(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function de(e,t){if(!e)return"";const r=j(e).path.replace(/\/+$/,""),n=r.substring(r.lastIndexOf("/")+1);if(!t?.length)return n;const s=new RegExp(`.(${t.join("|")})$`,"ig");return n.replace(s,"")}function he(e){return e.replace(/\/+$/,"")}function pe(e,t,r){if(!(t&&r&&e&&V(e)))return e;const n=e.indexOf("//"),s=e.indexOf("/",n+2),o=e.indexOf(":",n+2),i=Math.min(s<0?e.length:s,o<0?e.length:o);return e.slice(n+2,i).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,n+2)}${r}${e.slice(i)}`}function ge(e){return"string"==typeof e?new w(H(e)):(e.scheme||(e.scheme=A.scheme),e)}function ye(e,t){const r=j(e),n=Object.keys(r.query||{});return n.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function be(e,t,r){const n=j(e),s=n.query||{};return s[t]=String(r),`${n.path}?${N(s)}`}function me(e,t){const r=j(e),n=r.query||{};for(const e in t)n[e]=t[e];const s=N(n);return s?`${r.path}?${s}`:r.path}function ve(e){if(null==e)return null;const t=e.match(Oe);return t?t[2]:null}function _e(e){if(null==e)return null;const t=e.match(Oe);return t?{path:t[1],extension:t[2]}:{path:e,extension:null}}async function we(e){return"string"==typeof e?te(e)??{data:e}:new Promise(((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(te(n.result)),n.onerror=e=>r(e)}))}const Oe=/([^.]*)\.([^\/]*)$/},728:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>v});var n=r(40330),s=r(20102),o=r(91460),i=r(50758),a=r(70586),c=r(95330);const l={statsWorker:()=>Promise.all([r.e(1622),r.e(3314),r.e(5712),r.e(6841)]).then(r.bind(r,36841)),geometryEngineWorker:()=>Promise.all([r.e(5837),r.e(8228)]).then(r.bind(r,48227)),CSVSourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(7096)]).then(r.bind(r,27793)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(7681),r.e(6314),r.e(9594)]).then(r.bind(r,49594)),ElevationSamplerWorker:()=>Promise.all([r.e(4547),r.e(1622),r.e(3314),r.e(6481),r.e(6459),r.e(749)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(7126),r.e(5983),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(4599),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(4565),r.e(5545),r.e(5967)]).then(r.bind(r,65967)),GeoJSONSourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(3422),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(3422),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(1622),r.e(3314),r.e(9561),r.e(802)]).then(r.bind(r,10802)),Pipeline:()=>Promise.all([r.e(7126),r.e(5983),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(4599),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(4565),r.e(4325),r.e(5545),r.e(7937)]).then(r.bind(r,27937)),PointCloudWorker:()=>Promise.all([r.e(4547),r.e(1622),r.e(3314),r.e(4266),r.e(6122)]).then(r.bind(r,90447)),RasterWorker:()=>Promise.all([r.e(4547),r.e(1622),r.e(3314),r.e(6610),r.e(7420),r.e(4035)]).then(r.bind(r,61576)),SceneLayerSnappingSourceWorker:()=>Promise.all([r.e(6481),r.e(7681),r.e(6314),r.e(3248)]).then(r.bind(r,73248)),SceneLayerWorker:()=>Promise.all([r.e(3314),r.e(1412)]).then(r.bind(r,31412)),WFSSourceWorker:()=>Promise.all([r.e(7126),r.e(4547),r.e(1534),r.e(1622),r.e(3314),r.e(9561),r.e(822),r.e(5712),r.e(1965),r.e(3422),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(4325),r.e(9805),r.e(4982),r.e(284)]).then(r.bind(r,56456))};var u=r(94362),f=r(17202);const{CLOSE:d,ABORT:h,INVOKE:p,RESPONSE:g,OPEN_PORT:y,ON:b}=u.MessageType;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===u.MessageType.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class v{static connect(e){const t=new MessageChannel;let r;r="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const n=new v(t.port1,{channel:t,client:r},(()=>null));return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=n),v.clients.set(n,r),t.port2}static loadWorker(e){const t=l[e];return t?t():Promise.resolve(null)}constructor(e,t,r){this._port=e,this._getNextJob=r,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}close(){this._post({type:d}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){const n=r?.signal,o=r?.transferList;if(!this._port)return Promise.reject(new s.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const i=(0,u.jt)();return new Promise(((r,s)=>{if((0,c.Hc)(n))return this._processWork(),void s((0,c.zE)());const l=(0,c.fu)(n,(()=>{const e=this._outJobs.get(i);e&&(this._outJobs.delete(i),this._processWork(),(0,a.hw)(e.abortHandle),this._post({type:h,jobId:i}),s((0,c.zE)()))})),u={resolve:r,reject:s,abortHandle:l,debugInfo:e};this._outJobs.set(i,u),this._post({type:p,jobId:i,methodName:e,abortable:null!=n},t,o)}))}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:u.MessageType.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),(0,i.kB)((()=>{r.port1.postMessage({type:u.MessageType.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",n)}))}jobAdded(){this._processWork()}openPort(){const e=new MessageChannel;return this._post({type:y,port:e.port2}),e.port1}_processWork(){if(this._outJobs.size>=2)return;const e=this._getNextJob();if(!e)return;const{methodName:t,data:r,invokeOptions:n,resolver:s}=e;this.invoke(t,r,n).then((e=>s.resolve(e))).catch((e=>s.reject(e)))}_close(){this._channel&&(this._channel=void 0),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{(0,a.hw)(e.abortHandle),e.reject((0,c.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=null,this._client=null,this._schedule=null}_onMessage(e){null!=this._schedule?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,u.QM)(e);if(t)switch(t.type){case g:this._onResponseMessage(t);break;case p:this._invokeQueue.push(t);break;case h:this._onAbortMessage(t);break;case d:this._onCloseMessage();break;case y:this._onOpenPortMessage(t);break;case b:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);this._invokeQueue.push(e),n&&(n.controller&&n.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&v.clients.get(this)===e&&e.destroy(),v.clients.delete(this),e?.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:s}=e,o=s?new AbortController:null,i=this._inJobs;let a,l=this._client,f=l[t];try{if(!f&&t&&t.includes(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)l=l[e[t]],f=l[e[t+1]]}if("function"!=typeof f)throw new TypeError(`${t} is not a function`);a=f.call(l,n,{client:this,signal:o?o.signal:null})}catch(e){return void this._post({type:g,jobId:r,error:(0,u.AB)(e)})}(0,c.y8)(a)?(i.set(r,{controller:o,promise:a}),a.then((e=>{i.has(r)&&(i.delete(r),this._post({type:g,jobId:r},e))}),(e=>{i.has(r)&&(i.delete(r),(0,c.D_)(e)||this._post({type:g,jobId:r,error:(0,u.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:g,jobId:r},a)}_onOpenPortMessage(e){new v(e.port,{client:this._client},(()=>null))}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,(e=>{t.postMessage(e)})),n=(0,o.on)(e.port,"message",(e=>{const s=(0,u.QM)(e);s?.type===u.MessageType.CLOSE&&(n.remove(),r.remove(),t.close())}))}_onResponseMessage(e){const{jobId:t,error:r,data:n}=e,o=this._outJobs;if(!o.has(t))return;const i=o.get(t);o.delete(t),this._processWork(),(0,a.hw)(i.abortHandle),r?i.reject(s.Z.fromJSON(JSON.parse(r))):i.resolve(n)}_post(e,t,r){return(0,u.oi)(this._port,e,t,r)}}v.kernelInfo={buildDate:f.r,fullVersion:n.bR,revision:f.$},v.clients=new Map},94362:(e,t,r)=>{"use strict";r.d(t,{AB:()=>a,MessageType:()=>n,QM:()=>l,jt:()=>i,oi:()=>c});var n,s=r(80442);!function(e){e[e.HANDSHAKE=0]="HANDSHAKE",e[e.OPEN=1]="OPEN",e[e.OPENED=2]="OPENED",e[e.RESPONSE=3]="RESPONSE",e[e.INVOKE=4]="INVOKE",e[e.ABORT=5]="ABORT",e[e.CLOSE=6]="CLOSE",e[e.OPEN_PORT=7]="OPEN_PORT",e[e.ON=8]="ON"}(n||(n={}));let o=0;function i(){return o++}function a(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function c(e,t,r,o){if(t.type===n.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==n.INVOKE&&t.type!==n.RESPONSE)return void e.postMessage(t);let i;if(function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(i=u(r.transferList),t.data=r.result):(i=u(o),t.data=r),i){if((0,s.Z)("ff"))for(const r of i)if("byteLength"in r&&r.byteLength>267386880){const r="Worker call with large ArrayBuffer would crash Firefox";switch(t.type){case n.INVOKE:throw r;case n.RESPONSE:return void c(e,{type:n.RESPONSE,jobId:t.jobId,error:a(r)})}}e.postMessage(t,i)}else e.postMessage(t)}function l(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function u(e){if(!e||!e.length)return null;if((0,s.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||"ArrayBuffer"===e?.constructor?.name}(e)));return t.length?t:null}},40330:(e,t,r)=>{"use strict";r.d(t,{Dp:()=>f,Nv:()=>c,bR:()=>a,i8:()=>i,id:()=>l,qh:()=>u});var n=r(80442),s=r(17452),o=r(17202);const i="4.28";let a=i;a=`4.28.0-next.${o.r}`;const c={async request(e,t){const{default:n}=await r.e(3172).then(r.bind(r,3172)),o=e.options,i=o.responseType;o.signal=t?.signal,o.responseType="native"===i||"native-request-init"===i?"native-request-init":i&&["blob","json","text"].includes(i)&&(0,s.oh)(e.url)?.after?i:"array-buffer";const a=await n(e.url,o),c={data:a.data,httpStatus:a.httpStatus,ssl:a.ssl};switch(a.requestOptions?.responseType){case"native-request-init":return delete c.data.signal,c;case"blob":c.data=await c.data.arrayBuffer();break;case"json":c.data=(new TextEncoder).encode(JSON.stringify(c.data)).buffer;break;case"text":c.data=(new TextEncoder).encode(c.data).buffer}return{result:c,transferList:[c.data]}}};let l;function u(e){l=e}function f(e){const t=l?.findCredential(e);return t?.token?(0,s.ZN)(e,"token",t.token):e}(0,n.Z)("host-webworker")},19745:(e,t,r)=>{"use strict";r.d(t,{P:()=>i,a:()=>o});const n=/^https:\/\/([a-z\d-]+)(\.maps([^.]*))?\.arcgis\.com/i,s={devext:{customBaseUrl:"mapsdevext.arcgis.com",portalHostname:"devext.arcgis.com"},qaext:{customBaseUrl:"mapsqa.arcgis.com",portalHostname:"qaext.arcgis.com"},www:{customBaseUrl:"maps.arcgis.com",portalHostname:"www.arcgis.com"}};function o(e){const t=e?.match(n);if(!t)return null;const[,r,o,i]=t;if(!r)return null;let a=null,c=null,l=null;const{devext:u,qaext:f,www:d}=s;if(o)if(a=r,i)switch(i.toLowerCase()){case"devext":({customBaseUrl:c,portalHostname:l}=u);break;case"qa":({customBaseUrl:c,portalHostname:l}=f);break;default:return null}else({customBaseUrl:c,portalHostname:l}=d);else switch(r.toLowerCase()){case"devext":({customBaseUrl:c,portalHostname:l}=u);break;case"qaext":({customBaseUrl:c,portalHostname:l}=f);break;case"www":({customBaseUrl:c,portalHostname:l}=d);break;default:return null}return{customBaseUrl:c,isPortal:!1,portalHostname:l,urlKey:a}}function i(e){return/\/(sharing|usrsvcs)\/(appservices|servers)\//i.test(e)}},49917:(e,t,r)=>{"use strict";function n(e){const t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r.buffer}function s(e){const t=new Uint8Array(e);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return btoa(r)}r.d(t,{R:()=>n,s:()=>s})},17202:(e,t,r)=>{"use strict";r.d(t,{$:()=>s,r:()=>n});const n="20230708",s="b898d4d18b7efb1436e338128b02169a23c8f104"}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.m=e,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"chunks/"+{7:"5583921a498172edd5ac",17:"7a898d167029ee11a680",24:"7d9d2629af373c84624f",163:"14d6afec657bf93a3d06",223:"536962375ce4f1394481",247:"a9f83bbccf3b5f229262",284:"64bb4093c019a02d5309",448:"9e5f59a8e8f12cd9e5e0",450:"00b023cb63f23bc074b8",540:"fcec1e27531633cfc99c",565:"6e562fa57c0347091154",576:"c5c56b6d99db96a6755a",639:"3048157f4f13d22c1753",749:"1cbb03eec9dc23ef043b",802:"7fbdfd1527582c52f9b6",819:"d1ead6e8aa7e8e21fbc6",822:"408b790d24bea4181ede",837:"2f5f398374ff77fb17f0",853:"c912466351e37db68b6c",889:"e70314ac10cc1f8f9f86",1007:"0b28b5eec6dc67be8ce9",1073:"d0d9dcf9a06762087f08",1074:"77fcc4fc0fb3739365f6",1158:"803e81ff317e3082ebd5",1194:"30deb5a8e9a82186991d",1231:"b43c55fbb35dbcff2b69",1412:"fe277d33b5b8a11c76df",1421:"93e17ab3bc56ceea928d",1423:"417377c8e76944f428a7",1433:"4d5bdf18feeb9c8cb6ff",1444:"086173d3ada7857eea15",1534:"3bbaa78c68a4bf159722",1537:"8e1879242f9b5a4940cb",1622:"9f5337a80963e0b3c009",1773:"eb4eec67a4b9f39a3948",1790:"a8f094ca487bd794f766",1888:"e039108eb3a592f6d8e3",1900:"f6040205c50e2795a1a0",1965:"6dcffe6683a798a42c78",2134:"c16ec2f614844b3191c0",2220:"0f57b8d4fa3afb296392",2462:"0a0af540f4fe64c3d292",2594:"ad38aede3ec854191511",2637:"fb97d39b25b0b009d2f0",2664:"08ea1b3090a393cfa162",2763:"3736e17dd6461f74cfaf",3025:"3a0b45ecc48e23a3a5d5",3027:"52731ab6856abb7cb5fd",3172:"dcccc9760998271254b5",3230:"bb28207cae9e3cfc71c5",3248:"cb763c42379341b94d1e",3314:"f4549e1a149324297fa7",3422:"dda6fab95d50c1215808",3529:"afdf30439d71a7cc19ae",3582:"3155c750fc5a4e04a785",3668:"f156387d6c645b18a8dd",3852:"f0c62bb406bb93b1408a",3887:"d86ec98a0582cd3dfe8c",3919:"2c2cab197c47f080772a",3992:"b68f207f29808c1d8eb4",4035:"346f67995b327bca8ee0",4166:"60b422009f58d7bbb8c4",4202:"25187c5e6a04917d3519",4266:"ea478f2f4a19463e13fd",4325:"953407451813f406fdf1",4358:"4a2a0091cd830b6a1729",4371:"bedb5d399dbeff7526ba",4466:"c9ef45225947ccc2bd4c",4475:"d981e2e90b8ce617116f",4499:"ee21b5ac2afa00d00e9d",4547:"fdcb37a99392c348cc3f",4565:"1747cb9ee7b0674aaa64",4578:"3a0e2535f6cdb2e65667",4599:"812cba53143565a825f1",4609:"308f3811dfa71f619279",4695:"308eeeaec591b4eea1de",4720:"27fec382097efdcfee8a",4727:"ce7f575a6c2053c7ca17",4788:"da17d217222d6aee4c3e",4828:"044b15794b6403792f04",4885:"f74d4e1eecec06f84ee2",4982:"740dc67038f554431f1b",5235:"f073ed545e8380be2091",5242:"e86dcc239c6a57000afc",5243:"212417c115cd1b21b94d",5245:"1d2b8b937bbda91a6549",5329:"0e21e5b4d065567a6a91",5334:"80bf6cf1bef17215bca4",5389:"d08800a30b1227591986",5394:"e0dfd109e860371d7323",5428:"fe57c5de660e28ec253b",5481:"d5009010aefb5cd41099",5545:"1e413a44b35bfecbfa59",5575:"b8171b4c6f3b37e367ce",5642:"5e4dde2886a1027b4b96",5660:"4e2029c8cc8a5afe5759",5712:"26212a08ea383547335b",5732:"83f7e22a12d90ef93e62",5837:"277a477446d6644aada6",5935:"60a08ce29d09cb07ef06",5967:"730eb7e5f617fdab4f10",5983:"1c4475057483041418c3",6004:"928431e1c449c6054547",6122:"10028df973ef7f9531c8",6124:"5ae63d31468222841d62",6138:"87bb6b8f464727d58a64",6233:"766f397dfdfbc0eb72d1",6237:"8a7fa4e8b0d14da7c9eb",6261:"98c2445fd3cd5d200a6d",6314:"f2d399b394a1a9156214",6399:"3835a76c017431f19422",6459:"50b17799f1abce982a19",6481:"f6c39edd04cb96d98240",6565:"b20167d9163d0ee74b65",6610:"fb7eff7f76386f81d57b",6695:"0d805fd9cd9ff3a636ca",6710:"1fc3b526e881ada30420",6748:"c09db831248054600e16",6774:"0f04978e8342d9a35e59",6841:"d9fe6cfbc9ad2920ca9c",6946:"6fdfb71558958f2a265d",7096:"71c029f95cb4666ae207",7126:"e0499f45b098450b80b4",7215:"6cf5949a4754b18c08ec",7316:"b94b432173b3bd6a318e",7374:"1c86f80d73dee1a4d9b7",7420:"4804020020afbe5c9450",7446:"05f3374114bce72d3560",7476:"e3b5c22ce4290c19679e",7528:"d2f9988b576ac968dd92",7681:"885cb0da78e6853b23a4",7794:"4f92fd5167e22c602e8a",7845:"f3225ae2673562f2592d",7873:"c4eb3bd0e9cba4b20510",7937:"69de4733173ee2dee6e1",8008:"289061552a2a64bebd76",8024:"036cd65514eab1749363",8062:"4806116da11ef5192af3",8079:"6d084a1a8cd4d01db22f",8092:"f1b26b73101210b8f29c",8096:"0a6297f5ccffd392b27a",8153:"d4cb1cdd1cc5240526de",8159:"c4b066760e9aa85b7607",8228:"e5352dc8983d06d4ee0f",8244:"37e60f9ca86f9d4bf4ea",8522:"498dca81073e1fb477b9",8598:"95115370c2d1e1ae592d",8636:"36e6037ec266061966d6",8758:"595a2baa04d92de59558",8828:"4922a0fed7cbc6895882",8855:"b1fa1571fd98d3b8dffe",8949:"dabd889e064c4e7807fa",9059:"8d50449c029c73136204",9169:"cfad34c949cbe8a31ef8",9238:"8e28862296972e9e6f82",9243:"6c519c5a474f51f37af0",9291:"75ac2302859b0486763b",9296:"5d5d4a4fdf5ca8d7837f",9370:"8913bddc76b82cb24664",9561:"0bd95f46a0a9005a19f9",9594:"1535423349f7eee694bc",9717:"2f9aec2238ff6cb99e09",9790:"0652f6a8d5221e978033",9805:"7a973d70e6bc42d804ee",9880:"38ebd270e6ffa60791bb",9884:"68b0e0aa33880bc1ba77",9904:"e05b54a0b834b4e4268e",9931:"b0571b9e602218cdc7aa",9971:"4e4e62462deec25e82ce"}[e]+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&!e;)e=n[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={134:1};r.f.i=(t,n)=>{e[t]||importScripts(r.p+r.u(t))};var t=self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[],n=t.push.bind(t);t.push=t=>{var[s,o,i]=t;for(var a in o)r.o(o,a)&&(r.m[a]=o[a]);for(i&&i(r);s.length;)e[s.pop()]=1;n(t)}})(),r(88277);var n=r(728);RemoteClient=n})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9971,5732],{92835:(e,t,r)=>{r.d(t,{Z:()=>f});var l,s=r(43697),i=r(96674),n=r(35463),o=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),p=r(30556);let c=l=class extends i.wq{static get allTime(){return h}static get empty(){return d}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?e.getTime():null}get isAllTime(){return this.equals(l.allTime)}get isEmpty(){return this.equals(l.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new l({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,r=null!=this.end?this.end.getTime():this.end,l=null!=e.start?e.start.getTime():e.start,s=null!=e.end?e.end.getTime():e.end;return t===l&&r===s}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();let t=this.start;t&&(t=(0,n.JE)(t,e));let r=this.end;if(r){const t=(0,n.JE)(r,e);r=r.getTime()===t.getTime()?t:(0,n.Nm)(t,1,e)}return new l({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return l.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,s=e.start?.getTime()??-1/0,i=e.end?.getTime()??1/0;let n,o;if(s>=t&&s<=r?n=s:t>=s&&t<=i&&(n=t),r>=s&&r<=i?o=r:i>=t&&i<=r&&(o=i),null!=n&&null!=o&&!isNaN(n)&&!isNaN(o)){const e=new l;return e.start=n===-1/0?null:new Date(n),e.end=o===1/0?null:new Date(o),e}return l.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new l,{start:s,end:i}=this;return null!=s&&(r.start=(0,n.Nm)(s,e,t)),null!=i&&(r.end=(0,n.Nm)(i,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.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 l({start:t,end:r})}};(0,s._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s._)([(0,a.r)("end")],c.prototype,"readEnd",null),(0,s._)([(0,p.c)("end")],c.prototype,"writeEnd",null),(0,s._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s._)([(0,a.r)("start")],c.prototype,"readStart",null),(0,s._)([(0,p.c)("start")],c.prototype,"writeStart",null),c=l=(0,s._)([(0,u.j)("esri.TimeExtent")],c);const h=new c,d=new c({start:void 0,end:void 0}),f=c},5732:(e,t,r)=>{r.d(t,{c:()=>l,g:()=>s});var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},35463:(e,t,r)=>{r.d(t,{JE:()=>n,Nm:()=>i,rJ:()=>o}),r(80442);const l={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},s={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function i(e,t,r){const l=new Date(e.getTime());if(t&&r){const e=s[r],{getter:i,setter:n,multiplier:o}=e;if("months"===r){const e=function(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}(l.getFullYear(),l.getMonth()+t);l.getDate()>e&&l.setDate(e)}l[n](l[i]()+t*o)}return l}function n(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function o(e,t,r){return 0===e?0:e*l[t]/l[r]}},16199:(e,t,r)=>{r.r(t),r.d(t,{default:()=>P});var l,s=r(43697),i=(r(66577),r(3172)),n=r(20102),o=r(16453),a=r(19153),u=r(17452),p=r(5600),c=(r(75215),r(67676),r(80442),r(71715)),h=r(52011),d=r(30556),f=r(87085),m=r(71612),g=r(38009),y=r(16859),w=r(34760),v=r(72965),b=r(90082),_=r(39450),T=r(11145),I=r(5833),C=r(6570),Z=r(82971),D=r(94139);let E=l=class extends((0,m.h)((0,w.Q)((0,v.M)((0,g.q)((0,y.I)((0,o.R)(f.Z))))))){constructor(...e){super(...e),this.copyright="",this.fullExtent=new C.Z(-20037508.342787,-20037508.34278,20037508.34278,20037508.342787,Z.Z.WebMercator),this.legendEnabled=!1,this.isReference=null,this.popupEnabled=!1,this.spatialReference=Z.Z.WebMercator,this.subDomains=null,this.tileInfo=new T.Z({size:[256,256],dpi:96,format:"png8",compressionQuality:0,origin:new D.Z({x:-20037508.342787,y:20037508.342787,spatialReference:Z.Z.WebMercator}),spatialReference:Z.Z.WebMercator,lods:[new _.Z({level:0,scale:591657527.591555,resolution:156543.033928}),new _.Z({level:1,scale:295828763.795777,resolution:78271.5169639999}),new _.Z({level:2,scale:147914381.897889,resolution:39135.7584820001}),new _.Z({level:3,scale:73957190.948944,resolution:19567.8792409999}),new _.Z({level:4,scale:36978595.474472,resolution:9783.93962049996}),new _.Z({level:5,scale:18489297.737236,resolution:4891.96981024998}),new _.Z({level:6,scale:9244648.868618,resolution:2445.98490512499}),new _.Z({level:7,scale:4622324.434309,resolution:1222.99245256249}),new _.Z({level:8,scale:2311162.217155,resolution:611.49622628138}),new _.Z({level:9,scale:1155581.108577,resolution:305.748113140558}),new _.Z({level:10,scale:577790.554289,resolution:152.874056570411}),new _.Z({level:11,scale:288895.277144,resolution:76.4370282850732}),new _.Z({level:12,scale:144447.638572,resolution:38.2185141425366}),new _.Z({level:13,scale:72223.819286,resolution:19.1092570712683}),new _.Z({level:14,scale:36111.909643,resolution:9.55462853563415}),new _.Z({level:15,scale:18055.954822,resolution:4.77731426794937}),new _.Z({level:16,scale:9027.977411,resolution:2.38865713397468}),new _.Z({level:17,scale:4513.988705,resolution:1.19432856685505}),new _.Z({level:18,scale:2256.994353,resolution:.597164283559817}),new _.Z({level:19,scale:1128.497176,resolution:.298582141647617}),new _.Z({level:20,scale:564.248588,resolution:.14929107082380833}),new _.Z({level:21,scale:282.124294,resolution:.07464553541190416}),new _.Z({level:22,scale:141.062147,resolution:.03732276770595208}),new _.Z({level:23,scale:70.5310735,resolution:.01866138385297604})]}),this.type="web-tile",this.urlTemplate=null,this.wmtsInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{urlTemplate:e,...t}:e}load(e){const t=this.loadFromPortal({supportedTypes:["WMTS"]},e).then((()=>{let e="";if(this.urlTemplate)if(this.spatialReference.equals(this.tileInfo.spatialReference)){const t=new u.R9(this.urlTemplate);!(this.subDomains&&this.subDomains.length>0)&&t.authority?.includes("{subDomain}")&&(e="is missing 'subDomains' property")}else e="spatialReference must match tileInfo.spatialReference";else e="is missing the required 'urlTemplate' property value";if(e)throw new n.Z("web-tile-layer:load",`WebTileLayer (title: '${this.title}', id: '${this.id}') ${e}`)}));return this.addResolvingPromise(t),Promise.resolve(this)}get levelValues(){const e=[];if(!this.tileInfo)return null;for(const t of this.tileInfo.lods)e[t.level]=t.levelValue||t.level;return e}readSpatialReference(e,t){return e||Z.Z.fromJSON(t.fullExtent?.spatialReference)}get tileServers(){if(!this.urlTemplate)return null;const e=[],{urlTemplate:t,subDomains:r}=this,l=new u.R9(t),s=l.scheme?l.scheme+"://":"//",i=s+l.authority+"/",n=l.authority;if(n?.includes("{subDomain}")){if(r&&r.length>0&&n.split(".").length>1)for(const t of r)e.push(s+n.replaceAll(/\{subDomain\}/gi,t)+"/")}else e.push(i);return e.map((e=>("/"!==e.charAt(e.length-1)&&(e+="/"),e)))}get urlPath(){if(!this.urlTemplate)return null;const e=this.urlTemplate,t=new u.R9(e),r=(t.scheme?t.scheme+"://":"//")+t.authority+"/";return e.substring(r.length)}readUrlTemplate(e,t){return e||t.templateUrl}writeUrlTemplate(e,t){e&&(0,u.oC)(e)&&(e="https:"+e),e&&(e=e.replaceAll(/\{z\}/gi,"{level}").replaceAll(/\{x\}/gi,"{col}").replaceAll(/\{y\}/gi,"{row}"),e=(0,u.Fv)(e)),t.templateUrl=e}fetchTile(e,t,r,l={}){const{signal:s}=l,n=this.getTileUrl(e,t,r),o={responseType:"image",signal:s,query:{...this.refreshParameters}};return(0,i.default)(n,o).then((e=>e.data))}async fetchImageBitmapTile(e,t,r,s={}){const{signal:n}=s;if(this.fetchTile!==l.prototype.fetchTile){const l=await this.fetchTile(e,t,r,s);return(0,b.V)(l,e,t,r,n)}const o=this.getTileUrl(e,t,r),a={responseType:"blob",signal:n,query:{...this.refreshParameters}},{data:u}=await(0,i.default)(o,a);return(0,b.V)(u,e,t,r,n)}getTileUrl(e,t,r){const{levelValues:l,tileServers:s,urlPath:i}=this;if(!l||!s||!i)return"";const n=l[e];return s[t%s.length]+(0,a.gx)(i,{level:n,z:n,col:r,x:r,row:t,y:t})}};(0,s._)([(0,p.Cb)({type:String,value:"",json:{write:!0}})],E.prototype,"copyright",void 0),(0,s._)([(0,p.Cb)({type:C.Z,json:{write:!0},nonNullable:!0})],E.prototype,"fullExtent",void 0),(0,s._)([(0,p.Cb)({readOnly:!0,json:{read:!1,write:!1}})],E.prototype,"legendEnabled",void 0),(0,s._)([(0,p.Cb)({type:["show","hide"]})],E.prototype,"listMode",void 0),(0,s._)([(0,p.Cb)({json:{read:!0,write:!0}})],E.prototype,"blendMode",void 0),(0,s._)([(0,p.Cb)()],E.prototype,"levelValues",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],E.prototype,"isReference",void 0),(0,s._)([(0,p.Cb)({type:["WebTiledLayer"],value:"WebTiledLayer"})],E.prototype,"operationalLayerType",void 0),(0,s._)([(0,p.Cb)({readOnly:!0,json:{read:!1,write:!1}})],E.prototype,"popupEnabled",void 0),(0,s._)([(0,p.Cb)({type:Z.Z})],E.prototype,"spatialReference",void 0),(0,s._)([(0,c.r)("spatialReference",["spatialReference","fullExtent.spatialReference"])],E.prototype,"readSpatialReference",null),(0,s._)([(0,p.Cb)({type:[String],json:{write:!0}})],E.prototype,"subDomains",void 0),(0,s._)([(0,p.Cb)({type:T.Z,json:{write:!0}})],E.prototype,"tileInfo",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],E.prototype,"tileServers",null),(0,s._)([(0,p.Cb)({json:{read:!1}})],E.prototype,"type",void 0),(0,s._)([(0,p.Cb)()],E.prototype,"urlPath",null),(0,s._)([(0,p.Cb)({type:String,json:{origins:{"portal-item":{read:{source:"url"}}}}})],E.prototype,"urlTemplate",void 0),(0,s._)([(0,c.r)("urlTemplate",["urlTemplate","templateUrl"])],E.prototype,"readUrlTemplate",null),(0,s._)([(0,d.c)("urlTemplate",{templateUrl:{type:String}})],E.prototype,"writeUrlTemplate",null),(0,s._)([(0,p.Cb)({type:I.B,json:{write:!0}})],E.prototype,"wmtsInfo",void 0),E=l=(0,s._)([(0,h.j)("esri.layers.WebTileLayer")],E);const P=E},16859:(e,t,r)=>{r.d(t,{I:()=>_});var l=r(43697),s=r(68773),i=r(40330),n=r(3172),o=r(66643),a=r(20102),u=r(92604),p=r(95330),c=r(17452),h=r(5600),d=(r(75215),r(67676),r(80442),r(71715)),f=r(52011),m=r(30556),g=r(84230),y=r(48522),w=r(15235),v=r(86082),b=r(14661);const _=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=null,this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:l}=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await l({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.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,p.r9)(e),!0))))}async setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:l},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",l),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const l=e===r.id;if(l&&r.portal.user)return(0,b.Ss)(r);let s,n;if(l)s=r.portal.url;else try{s=await(0,g.oP)(this.url,t)}catch(e){(0,p.r9)(e)}if(!s||!(0,c.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(i.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.r9)(e)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(l?await r.reload():(r=new w.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,b.Ss)(r)}catch(e){(0,p.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,p.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?i.id?.findCredential(this.url):null;if(!t)return!0;const r=T.credential===t?T.user:await this._fetchEditingUser(e);return T.credential=t,T.user=r,null==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=i.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const l=`${r.owningSystemUrl}/sharing/rest`,s=y.Z.getDefault();if(s&&s.loaded&&(0,c.Fv)(s.restUrl)===(0,c.Fv)(l))return s.user;const a=`${l}/community/self`,u=null!=e?e.signal:null,p=await(0,o.q6)((0,n.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?v.default.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,l=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||y.Z.getDefault());return r&&l&&!(0,c.tm)(l.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,l._)([(0,h.Cb)({type:w.default})],t.prototype,"portalItem",null),(0,l._)([(0,d.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,l._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,l._)([(0,h.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,l._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,l._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,l._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,l._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},T={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>y});var l=r(43697),s=r(92604),i=r(95330),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),a=r(46791),u=(r(66643),r(20102),r(26258),r(87538));const p=new a.Z,c=new WeakMap;function h(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function d(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:d(t,e%t):0}let f=0,m=0;function g(){const e=Date.now();for(const t of p)t.refreshInterval&&e-(c.get(t)??0)+5>=6e4*t.refreshInterval&&(c.set(t,e),t.refresh(e))}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of p)t=d(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?c.get(r)||c.set(r,e):c.delete(r);if(t!==m){if(m=t,clearInterval(f),0===m)return void(f=0);f=setInterval(g,m)}}));const y=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,i.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){h(e)&&p.push(e)}(this)}),(()=>{}))}destroy(){h(this)&&p.includes(this)&&p.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,i.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,l._)([(0,n.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,l._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,l._)([(0,n.Cb)()],t.prototype,"refreshParameters",null),t=(0,l._)([(0,o.j)("esri.layers.mixins.RefreshableLayer")],t),t}},39450:(e,t,r)=>{r.d(t,{Z:()=>p});var l,s=r(43697),i=r(96674),n=r(5600),o=r(75215),a=(r(67676),r(80442),r(52011));let u=l=class extends i.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 l({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s._)([(0,n.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,s._)([(0,n.Cb)({type:o.z8,json:{write:!0}})],u.prototype,"level",void 0),(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,s._)([(0,n.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,s._)([(0,n.Cb)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,s._)([(0,n.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,s._)([(0,n.Cb)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=l=(0,s._)([(0,a.j)("esri.layers.support.LOD")],u);const p=u},11145:(e,t,r)=>{r.d(t,{Z:()=>C});var l,s=r(43697),i=r(35454),n=r(96674),o=r(67900),a=r(5600),u=r(75215),p=(r(67676),r(80442),r(71715)),c=r(52011),h=r(30556),d=r(94139),f=r(82971),m=r(24470),g=r(8744),y=r(40488),w=r(39450),v=r(43077);const b=new i.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 _=l=class extends n.wq{static create(e={}){const{resolutionFactor:t=1,scales:r,size:s=256,spatialReference:i=f.Z.WebMercator,numLODs:n=24}=e;if(!(0,g.JY)(i)){const e=[];if(r)for(let t=0;t<r.length;t++){const l=r[t];e.push(new w.Z({level:t,scale:l,resolution:l}))}else{let t=5e-4;for(let r=n-1;r>=0;r--)e.unshift(new w.Z({level:r,scale:t,resolution:t})),t*=2}return new l({dpi:96,lods:e,origin:new d.Z(0,0,i),size:[s,s],spatialReference:i})}const a=(0,g.C5)(i),u=e.origin?new d.Z({x:e.origin.x,y:e.origin.y,spatialReference:i}):new d.Z(a?{x:a.origin[0],y:a.origin[1],spatialReference:i}:{x:0,y:0,spatialReference:i}),p=1/(39.37*(0,o.c9)(i)*96),c=[];if(r)for(let e=0;e<r.length;e++){const t=r[e],l=t*p;c.push(new w.Z({level:e,scale:t,resolution:l}))}else{let e=(0,g.sT)(i)?512/s*591657527.5917094:256/s*591657527.591555;const r=Math.ceil(n/t);c.push(new w.Z({level:0,scale:e,resolution:e*p}));for(let l=1;l<r;l++){const r=e/2**t,s=r*p;c.push(new w.Z({level:l,scale:r,resolution:s})),e=r}}return new l({dpi:96,lods:c,origin:u,size:[s,s],spatialReference:i})}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 r=(0,g.C5)(e);return e.isWrappable&&!!r&&Math.abs(r.origin[0]-t.x)<=r.dx}return!1}readOrigin(e,t){return d.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,r=0;const l=[],s=this._levelToLOD={};e&&(t=-1/0,r=1/0,e.forEach((e=>{l.push(e.scale),t=e.scale>t?e.scale:t,r=e.scale<r?e.scale:r,s[e.level]=e}))),this._set("scales",l),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 r=Math.floor(e),l=r+1;return t[r]/(t[r]/t[l])**(e-r)}scaleToZoom(e){const t=this.scales,r=t.length-1;let l=0;for(;l<r;l++){const r=t[l],s=t[l+1];if(r<=e)return l;if(s===e)return l+1;if(r>e&&s<e)return l+Math.log(r/e)/Math.log(r/s)}return l}snapScale(e,t=.95){const r=this.scaleToZoom(e);return r%Math.floor(r)>=t?this.zoomToScale(Math.ceil(r)):this.zoomToScale(Math.floor(r))}tileAt(e,t,r,l){const s=this.lodAt(e);if(!s)return null;let i,n;if("number"==typeof t)i=t,n=r;else if((0,g.fS)(t.spatialReference,this.spatialReference))i=t.x,n=t.y,l=r;else{const e=(0,y.iV)(t,this.spatialReference);if(null==e)return null;i=e.x,n=e.y,l=r}const o=s.resolution*this.size[0],a=s.resolution*this.size[1];return l||(l=new v.f(null,0,0,0,(0,m.Ue)())),l.level=e,l.row=Math.floor((this.origin.y-n)/a+.001),l.col=Math.floor((i-this.origin.x)/o+.001),this.updateTileInfo(l),l}updateTileInfo(e,t=l.ExtrapolateOptions.NONE){let r=this.lodAt(e.level);if(!r&&t===l.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(r=t)}if(!r)return;const s=e.level-r.level,i=r.resolution*this.size[0]/2**s,n=r.resolution*this.size[1]/2**s;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,m.Ue)()),e.extent[0]=this.origin.x+e.col*i,e.extent[1]=this.origin.y-(e.row+1)*n,e.extent[2]=e.extent[0]+i,e.extent[3]=e.extent[1]+n}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 r=this.lodAt(t.level);if(null==r)return null;const{resolution:l}=r,s=l*this.size[0],i=l*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*i,e[2]=e[0]+s,e[3]=e[1]+i,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return l.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const r=[],s=this.lods.length;for(let e=0;e<s;e++){const l=this.lods[e],s=l.resolution*t;r.push(new w.Z({level:l.level,scale:l.scale,resolution:s}))}return new l({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:r})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let r=0;r<e.length;r++){const l=e[r];this._upsampleLevels[l.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/l.resolution:0},t=l}}};var T,I;(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],_.prototype,"compressionQuality",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],_.prototype,"dpi",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:b.read,write:b.write,origins:{"web-scene":{read:!1,write:!1}}}})],_.prototype,"format",void 0),(0,s._)([(0,a.Cb)({readOnly:!0})],_.prototype,"isWrappable",null),(0,s._)([(0,a.Cb)({type:d.Z,json:{write:!0}})],_.prototype,"origin",void 0),(0,s._)([(0,p.r)("origin")],_.prototype,"readOrigin",null),(0,s._)([(0,a.Cb)({type:[w.Z],value:null,json:{write:!0}})],_.prototype,"lods",null),(0,s._)([(0,a.Cb)({readOnly:!0})],_.prototype,"scales",void 0),(0,s._)([(0,a.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],_.prototype,"size",void 0),(0,s._)([(0,p.r)("size",["rows","cols"])],_.prototype,"readSize",null),(0,s._)([(0,h.c)("size",{cols:{type:u.z8},rows:{type:u.z8}})],_.prototype,"writeSize",null),(0,s._)([(0,a.Cb)({type:f.Z,json:{write:!0}})],_.prototype,"spatialReference",void 0),_=l=(0,s._)([(0,c.j)("esri.layers.support.TileInfo")],_),(I=(T=_||(_={})).ExtrapolateOptions||(T.ExtrapolateOptions={}))[I.NONE=0]="NONE",I[I.POWER_OF_TWO=1]="POWER_OF_TWO";const C=_},43077:(e,t,r)=>{r.d(t,{f:()=>l});class l{constructor(e,t,r,l,s=void 0){this.id=e,this.level=t,this.row=r,this.col=l,this.extent=s}}},5833:(e,t,r)=>{r.d(t,{B:()=>u});var l,s=r(43697),i=r(96674),n=r(22974),o=r(5600),a=(r(75215),r(52011));let u=l=class extends i.wq{constructor(e){super(e)}clone(){return new l({customLayerParameters:(0,n.d9)(this.customLayerParameters),customParameters:(0,n.d9)(this.customParameters),layerIdentifier:this.layerIdentifier,tileMatrixSet:this.tileMatrixSet,url:this.url})}};(0,s._)([(0,o.Cb)({json:{type:Object,write:!0}})],u.prototype,"customLayerParameters",void 0),(0,s._)([(0,o.Cb)({json:{type:Object,write:!0}})],u.prototype,"customParameters",void 0),(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"layerIdentifier",void 0),(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"tileMatrixSet",void 0),(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"url",void 0),u=l=(0,s._)([(0,a.j)("esri.layer.support.WMTSLayerInfo")],u)},90082:(e,t,r)=>{r.d(t,{V:()=>n,g:()=>i});var l=r(20102),s=r(95330);async function i(e,t,r){let i;try{i=await createImageBitmap(e)}catch(e){throw new l.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.k_)(r),i}async function n(e,t,r,i,n){let o;try{o=await createImageBitmap(e)}catch(e){throw new l.Z("request:server",`Unable to load tile ${t}/${r}/${i}`,{error:e,level:t,row:r,col:i})}return(0,s.k_)(n),o}}}]);
|
package/interfaces.d.ts
CHANGED
|
@@ -33498,22 +33498,6 @@ declare namespace __esri {
|
|
|
33498
33498
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#domainNetworkNames)
|
|
33499
33499
|
*/
|
|
33500
33500
|
readonly domainNetworkNames: string[];
|
|
33501
|
-
/**
|
|
33502
|
-
* The layer id of the service containing the utility network rules table.
|
|
33503
|
-
*
|
|
33504
|
-
* @deprecated since version 4.25. Use [networkSystemLayers.rulesTableId](#networkSystemLayers) instead.
|
|
33505
|
-
*
|
|
33506
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#rulesTableId)
|
|
33507
|
-
*/
|
|
33508
|
-
readonly rulesTableId: number;
|
|
33509
|
-
/**
|
|
33510
|
-
* The service url containing the utility network rules table.
|
|
33511
|
-
*
|
|
33512
|
-
* @deprecated since version 4.25. Use [networkSystemLayers.rulesTableUrl](#networkSystemLayers) instead.
|
|
33513
|
-
*
|
|
33514
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#rulesTableUrl)
|
|
33515
|
-
*/
|
|
33516
|
-
readonly rulesTableUrl: string;
|
|
33517
33501
|
/**
|
|
33518
33502
|
* The layer id of the service territory class used to define the extent of the utility network.
|
|
33519
33503
|
*
|
|
@@ -33526,22 +33510,6 @@ declare namespace __esri {
|
|
|
33526
33510
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#sharedNamedTraceConfigurations)
|
|
33527
33511
|
*/
|
|
33528
33512
|
sharedNamedTraceConfigurations: NamedTraceConfiguration[];
|
|
33529
|
-
/**
|
|
33530
|
-
* The layer id of the service containing the utility network's [Subnetworks table](https://pro.arcgis.com/en/pro-app/latest/help/data/utility-network/subnetworks-table.htm).
|
|
33531
|
-
*
|
|
33532
|
-
* @deprecated since version 4.25. Use [networkSystemLayers.subnetworksTableId](#networkSystemLayers) instead.
|
|
33533
|
-
*
|
|
33534
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#subnetworksTableId)
|
|
33535
|
-
*/
|
|
33536
|
-
readonly subnetworksTableId: number;
|
|
33537
|
-
/**
|
|
33538
|
-
* The service url containing the utility network's [Subnetworks table](https://pro.arcgis.com/en/pro-app/latest/help/data/utility-network/subnetworks-table.htm).
|
|
33539
|
-
*
|
|
33540
|
-
* @deprecated since version 4.25. Use [networkSystemLayers.subnetworksTableUrl](#networkSystemLayers) instead.
|
|
33541
|
-
*
|
|
33542
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#subnetworksTableUrl)
|
|
33543
|
-
*/
|
|
33544
|
-
readonly subnetworksTableUrl: string;
|
|
33545
33513
|
/**
|
|
33546
33514
|
* Returns all the terminal configurations on the utility network.
|
|
33547
33515
|
*
|
package/layers/WebTileLayer.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../geometry.js";import t from"../request.js";import r from"../core/Error.js";import{MultiOriginJSONMixin as l}from"../core/MultiOriginJSONSupport.js";import{replace as o}from"../core/string.js";import{Url as s,isProtocolRelative as i,normalize as n}from"../core/urlUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{reader as p}from"../core/accessorSupport/decorators/reader.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import{writer as c}from"../core/accessorSupport/decorators/writer.js";import m from"./Layer.js";import{BlendLayer as f}from"./mixins/BlendLayer.js";import{OperationalLayer as y}from"./mixins/OperationalLayer.js";import{PortalLayer as h}from"./mixins/PortalLayer.js";import{RefreshableLayer as d}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as v}from"./mixins/ScaleRangeLayer.js";import{createTileBitmap as w}from"./support/imageBitmapUtils.js";import g from"./support/LOD.js";import j from"./support/TileInfo.js";import{WMTSLayerInfo as T}from"./support/WMTSLayerInfo.js";import b from"../geometry/Extent.js";import
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../geometry.js";import t from"../request.js";import r from"../core/Error.js";import{MultiOriginJSONMixin as l}from"../core/MultiOriginJSONSupport.js";import{replace as o}from"../core/string.js";import{Url as s,isProtocolRelative as i,normalize as n}from"../core/urlUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{reader as p}from"../core/accessorSupport/decorators/reader.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import{writer as c}from"../core/accessorSupport/decorators/writer.js";import m from"./Layer.js";import{BlendLayer as f}from"./mixins/BlendLayer.js";import{OperationalLayer as y}from"./mixins/OperationalLayer.js";import{PortalLayer as h}from"./mixins/PortalLayer.js";import{RefreshableLayer as d}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as v}from"./mixins/ScaleRangeLayer.js";import{createTileBitmap as w}from"./support/imageBitmapUtils.js";import g from"./support/LOD.js";import j from"./support/TileInfo.js";import{WMTSLayerInfo as T}from"./support/WMTSLayerInfo.js";import b from"../geometry/Extent.js";import S from"../geometry/SpatialReference.js";import R from"../geometry/Point.js";var x;let U=x=class extends(f(d(v(y(h(l(m))))))){constructor(...e){super(...e),this.copyright="",this.fullExtent=new b(-20037508.342787,-20037508.34278,20037508.34278,20037508.342787,S.WebMercator),this.legendEnabled=!1,this.isReference=null,this.popupEnabled=!1,this.spatialReference=S.WebMercator,this.subDomains=null,this.tileInfo=new j({size:[256,256],dpi:96,format:"png8",compressionQuality:0,origin:new R({x:-20037508.342787,y:20037508.342787,spatialReference:S.WebMercator}),spatialReference:S.WebMercator,lods:[new g({level:0,scale:591657527.591555,resolution:156543.033928}),new g({level:1,scale:295828763.795777,resolution:78271.5169639999}),new g({level:2,scale:147914381.897889,resolution:39135.7584820001}),new g({level:3,scale:73957190.948944,resolution:19567.8792409999}),new g({level:4,scale:36978595.474472,resolution:9783.93962049996}),new g({level:5,scale:18489297.737236,resolution:4891.96981024998}),new g({level:6,scale:9244648.868618,resolution:2445.98490512499}),new g({level:7,scale:4622324.434309,resolution:1222.99245256249}),new g({level:8,scale:2311162.217155,resolution:611.49622628138}),new g({level:9,scale:1155581.108577,resolution:305.748113140558}),new g({level:10,scale:577790.554289,resolution:152.874056570411}),new g({level:11,scale:288895.277144,resolution:76.4370282850732}),new g({level:12,scale:144447.638572,resolution:38.2185141425366}),new g({level:13,scale:72223.819286,resolution:19.1092570712683}),new g({level:14,scale:36111.909643,resolution:9.55462853563415}),new g({level:15,scale:18055.954822,resolution:4.77731426794937}),new g({level:16,scale:9027.977411,resolution:2.38865713397468}),new g({level:17,scale:4513.988705,resolution:1.19432856685505}),new g({level:18,scale:2256.994353,resolution:.597164283559817}),new g({level:19,scale:1128.497176,resolution:.298582141647617}),new g({level:20,scale:564.248588,resolution:.14929107082380833}),new g({level:21,scale:282.124294,resolution:.07464553541190416}),new g({level:22,scale:141.062147,resolution:.03732276770595208}),new g({level:23,scale:70.5310735,resolution:.01866138385297604})]}),this.type="web-tile",this.urlTemplate=null,this.wmtsInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{urlTemplate:e,...t}:e}load(e){const t=this.loadFromPortal({supportedTypes:["WMTS"]},e).then((()=>{let e="";if(this.urlTemplate)if(this.spatialReference.equals(this.tileInfo.spatialReference)){const t=new s(this.urlTemplate);!(!!this.subDomains&&this.subDomains.length>0)&&t.authority?.includes("{subDomain}")&&(e="is missing 'subDomains' property")}else e="spatialReference must match tileInfo.spatialReference";else e="is missing the required 'urlTemplate' property value";if(e)throw new r("web-tile-layer:load",`WebTileLayer (title: '${this.title}', id: '${this.id}') ${e}`)}));return this.addResolvingPromise(t),Promise.resolve(this)}get levelValues(){const e=[];if(!this.tileInfo)return null;for(const t of this.tileInfo.lods)e[t.level]=t.levelValue||t.level;return e}readSpatialReference(e,t){return e||S.fromJSON(t.fullExtent?.spatialReference)}get tileServers(){if(!this.urlTemplate)return null;const e=[],{urlTemplate:t,subDomains:r}=this,l=new s(t),o=l.scheme?l.scheme+"://":"//",i=o+l.authority+"/",n=l.authority;if(n?.includes("{subDomain}")){if(r&&r.length>0&&n.split(".").length>1)for(const s of r)e.push(o+n.replaceAll(/\{subDomain\}/gi,s)+"/")}else e.push(i);return e.map((e=>("/"!==e.charAt(e.length-1)&&(e+="/"),e)))}get urlPath(){if(!this.urlTemplate)return null;const e=this.urlTemplate,t=new s(e),r=(t.scheme?t.scheme+"://":"//")+t.authority+"/";return e.substring(r.length)}readUrlTemplate(e,t){return e||t.templateUrl}writeUrlTemplate(e,t){e&&i(e)&&(e="https:"+e),e&&(e=e.replaceAll(/\{z\}/gi,"{level}").replaceAll(/\{x\}/gi,"{col}").replaceAll(/\{y\}/gi,"{row}"),e=n(e)),t.templateUrl=e}fetchTile(e,r,l,o={}){const{signal:s}=o,i=this.getTileUrl(e,r,l),n={responseType:"image",signal:s,query:{...this.refreshParameters}};return t(i,n).then((e=>e.data))}async fetchImageBitmapTile(e,r,l,o={}){const{signal:s}=o;if(this.fetchTile!==x.prototype.fetchTile){const t=await this.fetchTile(e,r,l,o);return w(t,e,r,l,s)}const i=this.getTileUrl(e,r,l),n={responseType:"blob",signal:s,query:{...this.refreshParameters}},{data:a}=await t(i,n);return w(a,e,r,l,s)}getTileUrl(e,t,r){const{levelValues:l,tileServers:s,urlPath:i}=this;if(!l||!s||!i)return"";const n=l[e];return s[t%s.length]+o(i,{level:n,z:n,col:r,x:r,row:t,y:t})}};e([a({type:String,value:"",json:{write:!0}})],U.prototype,"copyright",void 0),e([a({type:b,json:{write:!0},nonNullable:!0})],U.prototype,"fullExtent",void 0),e([a({readOnly:!0,json:{read:!1,write:!1}})],U.prototype,"legendEnabled",void 0),e([a({type:["show","hide"]})],U.prototype,"listMode",void 0),e([a({json:{read:!0,write:!0}})],U.prototype,"blendMode",void 0),e([a()],U.prototype,"levelValues",null),e([a({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],U.prototype,"isReference",void 0),e([a({type:["WebTiledLayer"],value:"WebTiledLayer"})],U.prototype,"operationalLayerType",void 0),e([a({readOnly:!0,json:{read:!1,write:!1}})],U.prototype,"popupEnabled",void 0),e([a({type:S})],U.prototype,"spatialReference",void 0),e([p("spatialReference",["spatialReference","fullExtent.spatialReference"])],U.prototype,"readSpatialReference",null),e([a({type:[String],json:{write:!0}})],U.prototype,"subDomains",void 0),e([a({type:j,json:{write:!0}})],U.prototype,"tileInfo",void 0),e([a({readOnly:!0})],U.prototype,"tileServers",null),e([a({json:{read:!1}})],U.prototype,"type",void 0),e([a()],U.prototype,"urlPath",null),e([a({type:String,json:{origins:{"portal-item":{read:{source:"url"}}}}})],U.prototype,"urlTemplate",void 0),e([p("urlTemplate",["urlTemplate","templateUrl"])],U.prototype,"readUrlTemplate",null),e([c("urlTemplate",{templateUrl:{type:String}})],U.prototype,"writeUrlTemplate",null),e([a({type:T,json:{write:!0}})],U.prototype,"wmtsInfo",void 0),U=x=e([u("esri.layers.WebTileLayer")],U);const L=U;export{L as default};
|
package/networks/Network.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../geometry.js";import t from"../Graphic.js";import r from"../request.js";import o from"../core/Error.js";import a from"../core/Loadable.js";import s from"../core/Logger.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{isAbortError as n}from"../core/promiseUtils.js";import{urlToObject as l}from"../core/urlUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import p from"../geometry/Extent.js";import{fromJSON as c}from"../geometry/support/jsonUtils.js";import{emitApplyEditsEvent as m}from"../layers/mixins/EditBusLayer.js";import{parse as y}from"../layers/support/arcgisLayerUrl.js";import f from"./support/TopologyValidationJobInfo.js";import{networkFromPortalItem as h}from"./support/utils.js";import g from"../rest/networks/support/QueryNamedTraceConfigurationsParameters.js";import w from"../geometry/SpatialReference.js";let v=class extends(i(a)){static fromPortalItem(e){return h(e)}constructor(e){super(e),this.id=null,this.title=null,this.layerUrl=null,this.dataElement=null,this.fullExtent=null,this.spatialReference=null,this.type=null,this.sourceJSON=null}initialize(){this.when().catch((e=>{n(e)||s.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}get datasetName(){return this.dataElement?.name??null}get owner(){return this.dataElement?.userIdentity??null}get schemaGeneration(){return this.dataElement?.schemaGeneration??null}get parsedUrl(){return l(this.layerUrl)}get featureServiceUrl(){
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../geometry.js";import t from"../Graphic.js";import r from"../request.js";import o from"../core/Error.js";import a from"../core/Loadable.js";import s from"../core/Logger.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{isAbortError as n}from"../core/promiseUtils.js";import{urlToObject as l}from"../core/urlUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import p from"../geometry/Extent.js";import{fromJSON as c}from"../geometry/support/jsonUtils.js";import{emitApplyEditsEvent as m}from"../layers/mixins/EditBusLayer.js";import{parse as y}from"../layers/support/arcgisLayerUrl.js";import f from"./support/TopologyValidationJobInfo.js";import{networkFromPortalItem as h}from"./support/utils.js";import g from"../rest/networks/support/QueryNamedTraceConfigurationsParameters.js";import w from"../geometry/SpatialReference.js";let v=class extends(i(a)){static fromPortalItem(e){return h(e)}constructor(e){super(e),this.id=null,this.title=null,this.layerUrl=null,this.dataElement=null,this.fullExtent=null,this.spatialReference=null,this.type=null,this.sourceJSON=null}initialize(){this.when().catch((e=>{n(e)||s.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}get datasetName(){return this.dataElement?.name??null}get owner(){return this.dataElement?.userIdentity??null}get schemaGeneration(){return this.dataElement?.schemaGeneration??null}get parsedUrl(){return l(this.layerUrl)}get featureServiceUrl(){return y(this.parsedUrl.path).url.path}get networkServiceUrl(){return this.featureServiceUrl.replace(/\/FeatureServer/i,"/UtilityNetworkServer")}get layerId(){return y(this.parsedUrl.path).sublayer}get networkSystemLayers(){return null}async load(e){return this.addResolvingPromise(this._fetchDataElement(this.featureServiceUrl,this.layerId.toString(),e)),this.addResolvingPromise(this._fetchLayerMetaData(this.layerUrl,e)),this}getLayerIdBySourceId(e){if(this.dataElement){const t=this.dataElement.domainNetworks;for(const r of t){for(const t of r.edgeSources??[])if(t.sourceId===e)return t.layerId;for(const t of r.junctionSources??[])if(t.sourceId===e)return t.layerId}return null}return null}async queryNamedTraceConfigurations(e,t){const{queryNamedTraceConfigurations:r}=await import("../rest/networks/queryNamedTraceConfigurations.js"),o=this.networkServiceUrl,a=new g({...e});return(await r(o,a,{...t}))?.namedTraceConfigurations??null}async validateTopology(e,t){if(!e.validateArea)throw new o("network:undefined-validateArea","the network must have validateArea defined in the validate network topology parameters.");const[{validateNetworkTopology:r},{default:a}]=await Promise.all([import("../rest/networks/validateNetworkTopology.js"),import("../rest/networks/support/ValidateNetworkTopologyParameters.js")]),s=a.from(e),i=this.networkServiceUrl,n=this.featureServiceUrl,l=m(n,null,null,!0),d=await r(i,s,{...t});if(d?.serviceEdits){const e=[];for(const t of d.serviceEdits){const{editedFeatures:r}=t,o=r?.spatialReference?new w(r.spatialReference):null;e.push({layerId:t.layerId,editedFeatures:{adds:r?.adds?.map((e=>this._createEditedFeature(e,o)))||[],updates:r?.updates?.map((e=>({original:this._createEditedFeature(e[0],o),current:this._createEditedFeature(e[1],o)})))||[],deletes:r?.deletes?.map((e=>this._createEditedFeature(e,o)))||[],spatialReference:o}})}l.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],editedFeatures:e,exceededTransferLimit:!1,historicMoment:d.moment})}return d}async submitTopologyValidationJob(e,t){if(!e.validateArea)throw new o("network:undefined-validateArea","the network must have validateArea defined in the validate network topology parameters.");if(!e.gdbVersion)throw new o("network:undefined-gdb-version","version must be defined");const[{submitValidateNetworkTopologyJob:r},{default:a}]=await Promise.all([import("../rest/networks/validateNetworkTopology.js"),import("../rest/networks/support/ValidateNetworkTopologyParameters.js")]),s=a.from(e),i=this.networkServiceUrl,n=this.featureServiceUrl?m(this.featureServiceUrl,null,null,!0):void 0,l=await r(i,s,{...t});return new f({statusUrl:l,editsResolver:n})}_createEditedFeature(e,r){return new t({attributes:e.attributes,geometry:c({...e.geometry,spatialReference:r})})}async _fetchLayerMetaData(e,t){const o=await r(e,{responseType:"json",query:{f:"json"},...t});this.sourceJSON=o.data,this.read(o.data,{origin:"service"})}async _fetchDataElement(e,t,o){if(this.dataElement)return;const a=await r(`${e}/queryDataElements`,{responseType:"json",query:{layers:JSON.stringify([t]),f:"json"},...o}).then((e=>e.data.layerDataElements?.[0]));a&&this.read(a,{origin:"service"})}};e([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}},service:{read:!0}},read:!1}})],v.prototype,"id",void 0),e([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}},service:{read:{source:"name"}}},read:!1}})],v.prototype,"title",void 0),e([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:{source:"url"},write:{target:"url",isRequired:!0}}},read:!1}})],v.prototype,"layerUrl",void 0),e([d({type:Object,json:{origins:{service:{read:!0}},read:!1}})],v.prototype,"dataElement",void 0),e([d({type:p,json:{origins:{service:{read:{source:"extent"}}},read:!1}})],v.prototype,"fullExtent",void 0),e([d({type:w,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:!1}})],v.prototype,"spatialReference",void 0),e([d({type:["utility","trace"],readOnly:!0,json:{read:!1,write:!1}})],v.prototype,"type",void 0),e([d({readOnly:!0})],v.prototype,"datasetName",null),e([d({readOnly:!0})],v.prototype,"owner",null),e([d({readOnly:!0})],v.prototype,"schemaGeneration",null),e([d({readOnly:!0})],v.prototype,"parsedUrl",null),e([d({readOnly:!0})],v.prototype,"featureServiceUrl",null),e([d({readOnly:!0})],v.prototype,"networkServiceUrl",null),e([d({readOnly:!0})],v.prototype,"layerId",null),e([d()],v.prototype,"sourceJSON",void 0),e([d({readOnly:!0})],v.prototype,"networkSystemLayers",null),v=e([u("esri.networks.Network")],v);const j=v;export{j as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import{
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import s from"../layers/FeatureLayer.js";import{queryAllJSON as a}from"../layers/support/featureQueryAll.js";import o from"./Network.js";import n from"./RulesTable.js";import i from"./support/NamedTraceConfiguration.js";import u from"./support/NetworkSystemLayers.js";import l from"./support/TerminalConfiguration.js";import m from"./support/TraceJobInfo.js";import{RuleType as d}from"./support/typeUtils.js";import c from"../rest/support/Query.js";let p=class extends o{constructor(e){super(e),this.sharedNamedTraceConfigurations=[],this.type="utility"}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new u({rulesTableId:this.sourceJSON?.systemLayers.rulesTableId,rulesTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.rulesTableId}`:null,subnetworksTableId:this.sourceJSON?.systemLayers.subnetworksTableId,subnetworksTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.subnetworksTableId}`:null,dirtyAreasLayerId:this.sourceJSON?.systemLayers.dirtyAreasLayerId,dirtyAreasLayerUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.dirtyAreasLayerId}`:null})}get terminalConfigurations(){return this.dataElement?.terminalConfigurations.map((e=>l.fromJSON(e)))||[]}get domainNetworkNames(){return this.dataElement?.domainNetworks.map((e=>e.domainNetworkName))||[]}get _utilityLayerList(){const e=new Set;return this.dataElement?.domainNetworks?.map((t=>{t.edgeSources.map((t=>{e.add(t.layerId)})),t.junctionSources.map((t=>{e.add(t.layerId)}))})),e}async load(e){return this.addResolvingPromise(super.load(e)),this.addResolvingPromise(this._loadNamedTraceConfigurationsFromNetwork(e)),this}getTerminalConfiguration(e){let t=null,r=null;const s=e.layer;let a=null;if("feature"===s?.type){if(a=s.layerId,null===a)return null}else{if("subtype-sublayer"!==s?.type)return null;if(a=s?.parent?.layerId??null,null===a)return null}const o=e.attributes;if(null==o)return null;for(const u of Object.keys(o))"ASSETGROUP"===u.toUpperCase()&&(t=e.getAttribute(u)),"ASSETTYPE"===u.toUpperCase()&&(r=e.getAttribute(u));if(!this.dataElement)return null;let n=null;const i=this.dataElement.domainNetworks;for(const u of i){const e=u.junctionSources?.find((e=>e.layerId===a));if(e){const s=e.assetGroups?.find((e=>e.assetGroupCode===t));if(s){const e=s.assetTypes?.find((e=>e.assetTypeCode===r));if(e){n=e.terminalConfigurationId;break}}}}if(null!=n){const e=this.dataElement.terminalConfigurations,t=e?.find((e=>e.terminalConfigurationId===n));return t?l.fromJSON(t):null}return null}getTierNames(e){const t=this.dataElement?.domainNetworks.find((t=>t.domainNetworkName===e));return t?.tiers.map((e=>e.name))||[]}async getRulesTable(){return this._createRulesTable()}isUtilityLayer(e){return this._utilityLayerList.has(e.layerId)}async trace(e){const[{trace:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);return t(this.networkServiceUrl,s)}async submitTraceJob(e){const[{submitTraceJob:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e),a=await t(this.networkServiceUrl,s);return new m({statusUrl:a})}async _loadNamedTraceConfigurationsFromNetwork(e){if(0===this.sharedNamedTraceConfigurations?.length)return;const t=this.sharedNamedTraceConfigurations.map((e=>e.globalId)),r=await this.queryNamedTraceConfigurations({globalIds:t},e);for(const s of this.sharedNamedTraceConfigurations){const e=r?.find((e=>e.globalId===s.globalId));if(e){const t=e.write({},{origin:"service"});s.read(t,{origin:"service"})}}}async _createRulesTable(){const e=this.networkSystemLayers.rulesTableUrl,t=new s({url:e});await t.load();const r=this.dataElement?.domainNetworks;if(!r)return null;const a=r.flatMap((e=>[...e.edgeSources,...e.junctionSources])),o=(await this._queryRulesTable(t)).map((e=>this._hydrateRuleInfo(t,a,e)));return new n({layer:t,rules:o})}async _queryRulesTable(e){const t=new c({where:"1=1",outFields:["*"]});return(await a(e,t)).features}_hydrateRuleInfo(e,t,r){const s=e.fieldsIndex,a=s.get("RULETYPE"),o=s.get("CREATIONDATE"),n=s.get("FROMNETWORKSOURCEID"),i=s.get("FROMASSETGROUP"),u=s.get("FROMASSETTYPE"),l=s.get("FROMTERMINALID"),m=s.get("TONETWORKSOURCEID"),c=s.get("TOASSETGROUP"),p=s.get("TOASSETTYPE"),y=s.get("TOTERMINALID"),f=s.get("VIANETWORKSOURCEID"),T=s.get("VIAASSETGROUP"),g=s.get("VIAASSETTYPE"),I=s.get("VIATERMINALID"),h=r.attributes[a.name],b=new Date(r.attributes[o.name]),S=[{networkSourceId:r.attributes[n.name],assetGroupId:r.attributes[i.name],assetTypeId:r.attributes[u.name],terminalId:r.attributes[l.name]},{networkSourceId:r.attributes[m.name],assetGroupId:r.attributes[c.name],assetTypeId:r.attributes[p.name],terminalId:r.attributes[y.name]},{networkSourceId:r.attributes[f.name],assetGroupId:r.attributes[T.name],assetTypeId:r.attributes[g.name],terminalId:r.attributes[I.name]}];let w;!function(e){e[e.from=0]="from",e[e.to=1]="to",e[e.via=2]="via"}(w||(w={}));const N={ruleType:h,creationDate:b};for(const k of[w.from,w.to,w.via]){if(h!==d.RTEdgeJunctionEdgeConnectivity&&k===w.via)continue;const e=S[k],r=t.find((t=>t.sourceId===e.networkSourceId)),s=r?.assetGroups.find((t=>t.assetGroupCode===e.assetGroupId)),a=s?.assetTypes.find((t=>t.assetTypeCode===e.assetTypeId));let o=this._getTerminal(h,a,e);h!==d.RTContainment&&h!==d.RTAttachment||(o=null);let n="";switch(k){case w.from:n="from";break;case w.to:n="to";break;case w.via:n="via"}N[`${n}NetworkSource`]=r,N[`${n}AssetGroup`]=s,N[`${n}AssetType`]=a,N[`${n}Terminal`]=o?.toJSON()}return N}_getTerminal(e,t,r){if(e===d.RTAttachment||e===d.RTContainment)return null;const s=t?.terminalConfigurationId,a=this.terminalConfigurations?.find((e=>e.id===s));return a?.terminals?.find((e=>e.id===r.terminalId))??null}};e([t({type:[i],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],p.prototype,"sharedNamedTraceConfigurations",void 0),e([t({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],p.prototype,"type",void 0),e([t({readOnly:!0})],p.prototype,"serviceTerritoryFeatureLayerId",null),e([t({readOnly:!0})],p.prototype,"networkSystemLayers",null),e([t({readOnly:!0})],p.prototype,"terminalConfigurations",null),e([t({readOnly:!0})],p.prototype,"domainNetworkNames",null),p=e([r("esri.networks.UtilityNetwork")],p);const y=p;export{y as default};
|
package/package.json
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import{JSONSupport as t}from"../../../core/JSONSupport.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";let s=class extends t{constructor(e){super(e),this.moment=null,this.fullUpdate=!1,this.validateErrorsCreated=!1,this.dirtyAreaCount=null,this.exceededTransferLimit=null,this.serviceEdits=null}};e([o({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.moment=e?e.getTime():null}}}})],s.prototype,"moment",void 0),e([o({type:Boolean,json:{write:!0}})],s.prototype,"fullUpdate",void 0),e([o({type:Boolean,json:{write:!0}})],s.prototype,"validateErrorsCreated",void 0),e([o({type:Number,json:{write:!0}})],s.prototype,"dirtyAreaCount",void 0),e([o({type:Boolean,json:{write:!0}})],s.prototype,"exceededTransferLimit",void 0),e([o({type:[Object],json:{write:!0}})],s.prototype,"serviceEdits",void 0),s=e([r("esri.rest.networks.support.ValidateNetworkTopologyResult")],s);const
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import{JSONSupport as t}from"../../../core/JSONSupport.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";let s=class extends t{constructor(e){super(e),this.moment=null,this.fullUpdate=!1,this.validateErrorsCreated=!1,this.dirtyAreaCount=null,this.exceededTransferLimit=null,this.serviceEdits=null,this.discoveredSubnetworks=null}};e([o({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.moment=e?e.getTime():null}}}})],s.prototype,"moment",void 0),e([o({type:Boolean,json:{write:!0}})],s.prototype,"fullUpdate",void 0),e([o({type:Boolean,json:{write:!0}})],s.prototype,"validateErrorsCreated",void 0),e([o({type:Number,json:{write:!0}})],s.prototype,"dirtyAreaCount",void 0),e([o({type:Boolean,json:{write:!0}})],s.prototype,"exceededTransferLimit",void 0),e([o({type:[Object],json:{write:!0}})],s.prototype,"serviceEdits",void 0),e([o({type:[Object],json:{write:!0}})],s.prototype,"discoveredSubnetworks",void 0),s=e([r("esri.rest.networks.support.ValidateNetworkTopologyResult")],s);const i=s;export{i as default};
|
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const b="20230708",e="b898d4d18b7efb1436e338128b02169a23c8f104";export{b as buildDate,e as commitHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../Graphic.js";import{createTask as t}from"../../core/asyncUtils.js";import"../../core/has.js";import{handlesGroup as i,makeHandle as r}from"../../core/handleUtils.js";import{clone as n}from"../../core/lang.js";import{throwIfAborted as a,whenOrAbort as s}from"../../core/promiseUtils.js";import{watch as l,whenOnce as o}from"../../core/reactiveUtils.js";import{px2pt as c}from"../../core/screenUtils.js";import{diff as u}from"../../core/accessorSupport/diffUtils.js";import{getDisplayFieldName as p}from"../../layers/support/fieldUtils.js";import{calculateTolerance as y}from"../../renderers/support/clickToleranceUtils.js";import{meterIn as d}from"../../renderers/support/lengthUtils.js";import{getTransformationType as f,TransformationType as m}from"../../renderers/visualVariables/support/sizeVariableUtils.js";import{getRotationAngle as h,getSize as g}from"../../renderers/visualVariables/support/visualVariableUtils.js";import{sceneLayerEditingEnabled as b,i3sPatchingEnabled as w}from"../../support/featureFlags.js";import{to3D as v}from"../../symbols/support/symbolConversion.js";import{getDisplayedSymbol as S}from"../../symbols/support/symbolUtils.js";import{GraphicState as j}from"../../views/3d/layers/graphics/GraphicState.js";import{createQueryGeometry as I}from"../../views/support/drapedUtils.js";import{hitTestSelectSimilarDistance as U,filterGraphicHits as V}from"../../views/support/hitTestSelectUtils.js";function F(e){const t=e.sourceLayer;if(!t||"feature"!==t.type||!E(t.renderer))return{rotation:null,size:null};let i=null,r=null;const n=t.renderer.getVisualVariablesForType("rotation").filter((t=>(!t.axis||"heading"===t.axis)&&t.field&&!t.valueExpression&&null!=h(t,e)));1===n.length&&(i=L(n[0],t));const a=t.renderer.getVisualVariablesForType("size").filter((t=>t.field&&!t.useSymbolValue&&!t.valueExpression&&f(t)===m.RealWorldSize&&null!=g(t,e)));return 1===a.length&&(r=x(a[0],t)),{rotation:i,size:r}}function L(e,t){const i="heading"===(e.axis||"heading")&&"arithmetic"===e.rotationType?-1:1,r=e.field,n=t.fields&&t.fields.filter((e=>e.name===r)),a=n&&1===n.length?n[0].type:"double",s={initial:0,current:0};return{field:r,fieldType:a,getDefault:()=>Promise.resolve(0),getValue:e=>(s.current=s.initial-i*e,k((s.current+360)%360,a)),initValue:e=>{s.initial=null!=e?e:s.current,s.current=0},isUpdatingInteractively:!1,rotationType:e.rotationType??"geographic"}}function T(e,t){switch(t){case"width":return e[0];case"depth":return e[1];case"height":return e[2];default:return e[2]||e[1]||e[0]}}async function z(e,t,i){if(null==t)return 0;const{symbol:r}=v(t);if(null==r||"web-style"===r.type||"cim"===r.type)return 0;const n=r.symbolLayers.at(0);if(!n)return 0;switch(n.type){case"icon":{const{computeIconLayerResourceSize:e}=await import("../../symbols/support/symbolLayerUtils.js");return n.size||Math.min(Y.icon,(await e(n,Y.icon))[0])||Y.icon}case"text":return n.size||Y.text;case"line":return n.size||Y.line;case"object":{const{computeObjectLayerResourceSize:t}=await import("../../symbols/support/symbolLayerUtils.js");return T(await t(n,e.scale/Y.viewScaleSizeFactor),i)}case"path":return(null!=n.width?n.width:n.height)||e.scale/Y.viewScaleSizeFactor;case"extrude":return n.size||e.scale/Y.viewScaleSizeFactor;default:return 0}}function x(e,t){const i=e.field,r=e.axis,n=t.fields&&t.fields.filter((e=>e.name===i)),a=n&&1===n.length?n[0].type:"double",s={updating:!1,initial:0,current:0},l=d[e.valueUnit]??1;let o;return o="area"===e.valueRepresentation?e=>(e*l/2)**2*Math.PI:"radius"===e.valueRepresentation||"distance"===e.valueRepresentation?e=>e*l/2:e=>e*l,{field:i,fieldType:a,getDefault:async(e,t)=>k(o(await z(t,e,r)),a),getValue:(e,t)=>(s.initial||(s.initial=t.pixelSizeAt(t.center)),s.current=s.initial*e,k(s.current,a)),initValue:e=>{s.initial=null!=e?e:s.current,s.current=0},isUpdatingInteractively:!1,displayUnit:ie(e.valueUnit),axis:e.axis}}function k(e,t){switch(t){case"small-integer":case"integer":case"long":return Math.round(e);case"double":case"single":return e;default:return 0}}function E(e){switch(e?.type){case"class-breaks":case"simple":case"unique-value":case"dot-density":case"dictionary":case"pie-chart":return!0;default:return!1}}async function O(e,t){const i=await S(e,{useSourceLayer:!0,ignoreGraphicSymbol:!0,webStyleCache:t});null!=u(e.symbol,i)&&(e.symbol=i)}function A(e){if(!e)throw new Error("no geometry type");return"multipatch"===e?"mesh":e}async function M(e,t,n,a){await C(e,t,a);const s=e.on("create",(async i=>{if("cancel"===i.state)return C(e,t,a);if("complete"===i.state){const e=i.graphic;e.sourceLayer||(e.sourceLayer=t.layer),e.attributes||(e.attributes={...t.template?.prototype.attributes}),await O(e,a),n(e)}}));return i([s,r((()=>e.cancel()))])}async function C(e,t,i){const r=t.layer,n={...t.template?.prototype.attributes};await G(e,r,n,i),e.layer.elevationInfo=r.elevationInfo,await e.create(A(r.geometryType),{graphicProperties:{attributes:n,sourceLayer:r},hasZ:r.capabilities.data.supportsZ,geometryToPlace:t.geometryToPlace??void 0})}async function G(t,i,r,n){const a=new e({sourceLayer:i,attributes:r}),{rotation:s,size:l}=F(a);let o=await S(a,{useSourceLayer:!0,webStyleCache:n}),c=!1;for(const e of[l,s]){if(null==e)continue;null==r[e.field]&&(r[e.field]=await e.getDefault(o,t.view),c=!0)}switch(c&&(o=await S(a,{useSourceLayer:!0,webStyleCache:n})),o?.type){case"simple-fill":case"polygon-3d":t.polygonSymbol=o;break;case"simple-line":case"line-3d":t.polylineSymbol=o;break;case"simple-marker":case"picture-marker":case"point-3d":case"cim":t.pointSymbol=o}P(t.tooltipOptions,l,s)}function P(e,t,i){e.visualVariables=null!=t||null!=i?{size:null!=t?{unit:t.displayUnit,axis:t.axis,valueType:t.fieldType}:null,rotation:null!=i?{valueType:i.fieldType,rotationType:i.rotationType??"geographic"}:null}:null}function R(e,t){return e?e.find((e=>e.layer===t)):void 0}async function D(e,t,i,r){if(0===e.length)return[];const{updatable:n,graphicsByLayer:a}=await i.async((async()=>{const{results:n}=await s(U(t,i),r),a=new Map,l=e=>{const t=e.layer,i=a.get(t);if(!i){const e=new Array;return a.set(t,e),e}return i};V(n).forEach((({graphic:e})=>l(e).push(e)));const o=e.filter((({supports:e,layer:t})=>e.includes("update")&&a.has(t)));return 0!==o.length&&i.stopPropagation(),{updatable:o,graphicsByLayer:a}}));return s(Promise.allSettled(n.map((async({layer:e})=>{const{objectIdField:t}=e,i="displayField"in e?e.displayField:null,n=[t];null!=i&&e.fieldsIndex.has(i)&&n.push(i);const s=a.get(e);if(!!s.some((e=>n.some((t=>!(t in e.attributes)))))){const t=e.createQuery();return t.outFields=n,t.returnGeometry=!1,t.objectIds=s.map((e=>e.getObjectId())),e.queryFeatures(t,{signal:r}).then((({features:e})=>e))}return s}))),r)}async function q(e,t,i,r){if(0===e.length)return[];let n=null;const a=await i.async((async()=>{const{results:a}=await s(t.hitTest(i),r);if(0===a.length)return[];const l=new Set;n=V(a),n.forEach((({graphic:e})=>e&&l.add(e.layer)));const o=e.items.filter((({layer:e,supports:t,attachmentsOnUpdateEnabled:i})=>l.has(e)&&(t.includes("update")||t.includes("delete")||i)));return o.length>0&&i.stopPropagation(),o}));return s(Promise.allSettled(a.map((({layer:e})=>{const a=e.objectIdField,s="displayField"in e?e.displayField:null,l=p({displayField:s,fields:e.fields}),o=[a];null!=l&&e.fieldsIndex.has(l)&&o.push(l);const c=e.createQuery();c.outFields=o,c.returnGeometry=!1;const u="renderer"in e?y({renderer:e.renderer,event:i}):0;return c.geometry=I(i.mapPoint,u,t),c.outSpatialReference=t.spatialReference,e.queryFeatures(c,{signal:r}).then((({features:t})=>(n?.forEach((({graphic:i})=>{i.layer!==e||t.some((e=>e.getObjectId()===i.getObjectId()))||t.push(i)})),t)))}))),r)}async function Z(e,t,i,r){switch(t.type){case"3d":return D(e,t,i,r);case"2d":return q(e,t,i,r)}}async function Q(e,t,i){const{sourceLayer:r}=e,n=r.createQuery();n.objectIds=[e.getAttribute(r.objectIdField)],n.outFields=["*"],n.outSpatialReference=t,n.returnM=r.capabilities.data.supportsM,n.returnZ=r.capabilities.data.supportsZ,b()&&w()&&"scene"===r.type&&null!=r.infoFor3D&&(n.returnGeometry=!0,n.formatOf3DObjects="3D_glb");const s=await r.queryFeatures(n,{signal:i});a(i);return s.features[0]}async function B(e){const{graphic:t,sketchViewModel:i,sourceLayer:r,visualVariables:n,webStyleCache:a}=e;let s=!1;const{rotation:l,size:o}=n;[l,o].forEach((async e=>{if(null==e)return;const r=t.getAttribute(e.field);if(null!=r)e.initValue(r);else{const r=await e.getDefault(t.symbol,i.view);e.initValue(r),t.setAttribute(e.field,r),s=!0}})),s&&await O(t,a);const c={multipleSelectionEnabled:!1};return"point"===r.geometryType&&(c.enableRotation=null!=l,c.enableScaling=null!=o),P(i.tooltipOptions,o,l),i.layer.elevationInfo=r.elevationInfo,i.update(t,c)}function W(e){return null==e||"rotate-start"!==e.type&&"rotate"!==e.type&&"rotate-stop"!==e.type?null:e}function _(e){return null==e||"scale-start"!==e.type&&"scale"!==e.type&&"scale-stop"!==e.type?null:e}async function H(e,t,i,r,n){if(null==t.geometry||"point"!==t.geometry?.type)return;const a=r.rotation,s=W(i.toolEventInfo);if(null!=a&&null!=s)if("rotate-stop"===s.type)a.isUpdatingInteractively=!1,a.initValue();else{a.isUpdatingInteractively=!0;const{field:i,getValue:r}=a;t.setAttribute(i,r(s.angle,e))}const l=r.size,o=_(i.toolEventInfo);if(null!=l&&null!=o)if("scale-stop"===o.type)l.isUpdatingInteractively=!1,l.initValue();else{l.isUpdatingInteractively=!0;const{field:i,getValue:r}=l;t.setAttribute(i,r(o.xScale,e))}await O(t,n)}async function J(e,t,n,a,s,o){const c=ue(e);await O(c,o),a.map.add(n.layer),n.layer.add(c);const u=e.sourceLayer,p=se(a,u);await X(a,c),await B({graphic:c,sketchViewModel:n,sourceLayer:u,visualVariables:t,webStyleCache:o});const y=K(n,e,c);let d=null;p.then((e=>d=e)).catch((()=>{}));const f=t.size,m=t.rotation,h=l((()=>e.attributes),(async e=>{let t=!1;for(const i in e){const r=e[i];r!==c.getAttribute(i)&&(c.setAttribute(i,r),null==f||f.isUpdatingInteractively||f.field!==i||f.initValue(r),null==m||m.isUpdatingInteractively||m.field!==i||m.initValue(r),(null==d||d.requiredFields.includes(i))&&(t=!0))}t&&await O(c,o)})),g=n.on("update",(async e=>{const i=e.graphics[0];if("complete"===e.state)return B({graphic:i,sketchViewModel:n,sourceLayer:u,visualVariables:t,webStyleCache:o});await H(a,i,e,t,o),s(ue(i),e)})),b=n.on(["undo","redo"],(async e=>{s(ue(e.graphics[0]),e)})),w=n.updateOnGraphicClick;return{visual:i([y,r((()=>{n.updateOnGraphicClick=w}))]),interactive:i([b,g,r((()=>n.cancel())),h,r((()=>{n.updateOnGraphicClick=!1}))])}}function K(e,n,s){const l=e.view,c=n.sourceLayer,u=n.layer,p=n.getAttribute(u.objectIdField);let y=null;function d(e){y?.abort(),y=t((async t=>{const i=await se(l,c);a(t),i.setVisibility?.(p,e)}))}return d(!1),i([N(l,s,(e=>d(!e))),r((async()=>{d(!0);try{const e=await se(l,c);await o((()=>!e.updating))}finally{e.layer.remove(s)}}))])}function N(e,t,r){if("3d"===e.type){const n=new j({graphic:t});return i([e.trackGraphicState(n),l((()=>n.displaying),r)])}return l((()=>t.visible),r)}async function X(e,t){if("3d"===e.type){const i=new j({graphic:t}),r=e.trackGraphicState(i);await o((()=>i.displaying)),r.remove()}else await o((()=>t.visible))}const Y={icon:c(24),text:c(12),line:c(1),viewScaleSizeFactor:100};function $(e,t,i){let r=!1;return e.filter((e=>!!r||(r=e===t,r))).map((e=>i[e]()))}function ee(e){if(1!==e.length)return null;const t=e[0];if("items"in t){const e=t;return 1===e.items.length?e.items[0]:null}return t}function te(e,t){if(e.viewModel.refreshCreationTemplates(),"awaiting-feature-creation-info"===t[0].id){const i=ee(e.viewModel.featureTemplatesViewModel.items);null==i||i.supportsUpload||(e.creationInfo=i,t.shift())}return t}function ie(e){switch(e){case"unknown":case"decimal-degrees":return null;default:return e}}function re(e){e.filesEnabled=!0,e.mode="view",e.capabilities={editing:!0,operations:{add:!0,update:!0,delete:!0}}}function ne(e){const{creationInfo:t,viewModel:i}=e;if(!t)return!1;const{layer:r}=t,n=i.editableItems.find((e=>e.layer===r));if(n)return n.attachmentsOnCreateEnabled;const a=r.capabilities?.data,s=i.layerInfos?.find((e=>e.layer===r));return!(!(a&&"supportsAttachment"in a&&a.supportsAttachment)||s&&(!1===s.allowAttachments||!1===s.attachmentsOnUpdateEnabled))}const ae=e=>/-stop/.test(e)||/vertex-/.test(e),se=(e,t)=>{const i="subtype-sublayer"===t.type?t.parent:t;return e.whenLayerView(i)};function le(e){return"createInteractiveEditSession"in e}const oe=Symbol();function ce(e){return e&&"object"==typeof e&&oe in e}function ue(e){const t=e.geometry;if("mesh"===t?.type){const i=e.cloneShallow();return i.attributes=n(e.attributes),i.geometry=t.cloneShallow(),i.geometry.transform=t.transform?.clone()??null,i}return e.clone()}function pe(e){const t=e.cursor;return e.cursor="progress",r((()=>e.cursor=t))}export{oe as UsesSketchViewModelSymbol,te as avoidFeatureTemplateSelectionWithOnlyOneItem,le as canCreateInteractiveEditSession,ue as cloneGraphicExceptMesh,$ as createWorkflowSteps,Z as fetchCandidates,Q as fetchFullFeature,R as findLayerInfo,F as getVisualVariableAttributes,ae as isTerminalUpdateEventType,re as prepareAttachmentsForCreateWorkflow,M as setUpFeatureAdd,J as setUpGeometryUpdate,ne as shouldShowAttachmentsForCreateWorkflow,pe as showProgressCursor,Y as sizeDefaults,ie as sizeVariableUnitToLengthUnit,C as startCreatingNewFeature,B as startUpdatingFeature,O as updateGraphicSymbolWhenRequired,H as visualVariableInteractiveUpdate,se as whenEditorLayerView,X as whenGraphicDisplayed,ce as workflowUsesSketchViewModel};
|
|
5
|
+
import e from"../../Graphic.js";import{createTask as t}from"../../core/asyncUtils.js";import"../../core/has.js";import{handlesGroup as r,makeHandle as i}from"../../core/handleUtils.js";import{clone as n}from"../../core/lang.js";import{throwIfAborted as a,whenOrAbort as s}from"../../core/promiseUtils.js";import{watch as l,whenOnce as o}from"../../core/reactiveUtils.js";import{px2pt as c}from"../../core/screenUtils.js";import{diff as u}from"../../core/accessorSupport/diffUtils.js";import{getDisplayFieldName as p}from"../../layers/support/fieldUtils.js";import{calculateTolerance as y}from"../../renderers/support/clickToleranceUtils.js";import{meterIn as d}from"../../renderers/support/lengthUtils.js";import{getTransformationType as f,TransformationType as m}from"../../renderers/visualVariables/support/sizeVariableUtils.js";import{getRotationAngle as h,getSize as g}from"../../renderers/visualVariables/support/visualVariableUtils.js";import{sceneLayerEditingEnabled as b,i3sPatchingEnabled as w}from"../../support/featureFlags.js";import{to3D as v}from"../../symbols/support/symbolConversion.js";import{getDisplayedSymbol as S}from"../../symbols/support/symbolUtils.js";import{GraphicState as j}from"../../views/3d/layers/graphics/GraphicState.js";import{createQueryGeometry as I}from"../../views/support/drapedUtils.js";import{hitTestSelectSimilarDistance as U,filterGraphicHits as V}from"../../views/support/hitTestSelectUtils.js";function F(e){const t=e.sourceLayer;if(!t||"feature"!==t.type||!E(t.renderer))return{rotation:null,size:null};let r=null,i=null;const n=t.renderer.getVisualVariablesForType("rotation").filter((t=>(!t.axis||"heading"===t.axis)&&t.field&&!t.valueExpression&&null!=h(t,e)));1===n.length&&(r=L(n[0],t));const a=t.renderer.getVisualVariablesForType("size").filter((t=>t.field&&!t.useSymbolValue&&!t.valueExpression&&f(t)===m.RealWorldSize&&null!=g(t,e)));return 1===a.length&&(i=x(a[0],t)),{rotation:r,size:i}}function L(e,t){const r="heading"===(e.axis||"heading")&&"arithmetic"===e.rotationType?-1:1,i=e.field,n=t.fields&&t.fields.filter((e=>e.name===i)),a=n&&1===n.length?n[0].type:"double",s={initial:0,current:0};return{field:i,fieldType:a,getDefault:()=>Promise.resolve(0),getValue:e=>(s.current=s.initial-r*e,k((s.current+360)%360,a)),initValue:e=>{s.initial=null!=e?e:s.current,s.current=0},isUpdatingInteractively:!1,rotationType:e.rotationType??"geographic"}}function T(e,t){switch(t){case"width":return e[0];case"depth":return e[1];case"height":return e[2];default:return e[2]||e[1]||e[0]}}async function z(e,t,r){if(null==t)return 0;const{symbol:i}=v(t);if(null==i||"web-style"===i.type||"cim"===i.type)return 0;const n=i.symbolLayers.at(0);if(!n)return 0;switch(n.type){case"icon":{const{computeIconLayerResourceSize:e}=await import("../../symbols/support/symbolLayerUtils.js");return n.size||Math.min(Y.icon,(await e(n,Y.icon))[0])||Y.icon}case"text":return n.size||Y.text;case"line":return n.size||Y.line;case"object":{const{computeObjectLayerResourceSize:t}=await import("../../symbols/support/symbolLayerUtils.js");return T(await t(n,e.scale/Y.viewScaleSizeFactor),r)}case"path":return(null!=n.width?n.width:n.height)||e.scale/Y.viewScaleSizeFactor;case"extrude":return n.size||e.scale/Y.viewScaleSizeFactor;default:return 0}}function x(e,t){const r=e.field,i=e.axis,n=t.fields&&t.fields.filter((e=>e.name===r)),a=n&&1===n.length?n[0].type:"double",s={updating:!1,initial:0,current:0},l=d[e.valueUnit]??1;let o;return o="area"===e.valueRepresentation?e=>(e*l/2)**2*Math.PI:"radius"===e.valueRepresentation||"distance"===e.valueRepresentation?e=>e*l/2:e=>e*l,{field:r,fieldType:a,getDefault:async(e,t)=>k(o(await z(t,e,i)),a),getValue:(e,t)=>(s.initial||(s.initial=t.pixelSizeAt(t.center)),s.current=s.initial*e,k(s.current,a)),initValue:e=>{s.initial=null!=e?e:s.current,s.current=0},isUpdatingInteractively:!1,displayUnit:re(e.valueUnit),axis:e.axis}}function k(e,t){switch(t){case"small-integer":case"integer":case"long":return Math.round(e);case"double":case"single":return e;default:return 0}}function E(e){switch(e?.type){case"class-breaks":case"simple":case"unique-value":case"dot-density":case"dictionary":case"pie-chart":return!0;default:return!1}}async function O(e,t){const r=await S(e,{useSourceLayer:!0,ignoreGraphicSymbol:!0,webStyleCache:t});null!=u(e.symbol,r)&&(e.symbol=r)}function A(e){if(!e)throw new Error("no geometry type");return"multipatch"===e?"mesh":e}async function M(e,t,n,a){await C(e,t,a);const s=e.on("create",(async r=>{if("cancel"===r.state)return C(e,t,a);if("complete"===r.state){const e=r.graphic;e.sourceLayer||(e.sourceLayer=t.layer),e.attributes||(e.attributes={...t.template?.prototype.attributes}),await O(e,a),n(e)}}));return r([s,i((()=>e.cancel()))])}async function C(e,t,r){const i=t.layer,n={...t.template?.prototype.attributes};await G(e,i,n,r),e.layer.elevationInfo=i.elevationInfo,await e.create(A(i.geometryType),{graphicProperties:{attributes:n,sourceLayer:i},hasZ:i.capabilities.data.supportsZ,geometryToPlace:t.geometryToPlace??void 0})}async function G(t,r,i,n){const a=new e({sourceLayer:r,attributes:i}),{rotation:s,size:l}=F(a);let o=await S(a,{useSourceLayer:!0,webStyleCache:n}),c=!1;for(const e of[l,s]){if(null==e)continue;null==i[e.field]&&(i[e.field]=await e.getDefault(o,t.view),c=!0)}switch(c&&(o=await S(a,{useSourceLayer:!0,webStyleCache:n})),o?.type){case"simple-fill":case"polygon-3d":t.polygonSymbol=o;break;case"simple-line":case"line-3d":t.polylineSymbol=o;break;case"simple-marker":case"picture-marker":case"point-3d":case"cim":t.pointSymbol=o;break;case"mesh-3d":t.meshSymbol=o}P(t.tooltipOptions,l,s)}function P(e,t,r){e.visualVariables=null!=t||null!=r?{size:null!=t?{unit:t.displayUnit,axis:t.axis,valueType:t.fieldType}:null,rotation:null!=r?{valueType:r.fieldType,rotationType:r.rotationType??"geographic"}:null}:null}function R(e,t){return e?e.find((e=>e.layer===t)):void 0}async function D(e,t,r,i){if(0===e.length)return[];const{updatable:n,graphicsByLayer:a}=await r.async((async()=>{const{results:n}=await s(U(t,r),i),a=new Map,l=e=>{const t=e.layer,r=a.get(t);if(!r){const e=new Array;return a.set(t,e),e}return r};V(n).forEach((({graphic:e})=>l(e).push(e)));const o=e.filter((({supports:e,layer:t})=>e.includes("update")&&a.has(t)));return 0!==o.length&&r.stopPropagation(),{updatable:o,graphicsByLayer:a}}));return s(Promise.allSettled(n.map((async({layer:e})=>{const{objectIdField:t}=e,r="displayField"in e?e.displayField:null,n=[t];null!=r&&e.fieldsIndex.has(r)&&n.push(r);const s=a.get(e);if(!!s.some((e=>n.some((t=>!(t in e.attributes)))))){const t=e.createQuery();return t.outFields=n,t.returnGeometry=!1,t.objectIds=s.map((e=>e.getObjectId())),e.queryFeatures(t,{signal:i}).then((({features:e})=>e))}return s}))),i)}async function q(e,t,r,i){if(0===e.length)return[];let n=null;const a=await r.async((async()=>{const{results:a}=await s(t.hitTest(r),i);if(0===a.length)return[];const l=new Set;n=V(a),n.forEach((({graphic:e})=>e&&l.add(e.layer)));const o=e.items.filter((({layer:e,supports:t,attachmentsOnUpdateEnabled:r})=>l.has(e)&&(t.includes("update")||t.includes("delete")||r)));return o.length>0&&r.stopPropagation(),o}));return s(Promise.allSettled(a.map((({layer:e})=>{const a=e.objectIdField,s="displayField"in e?e.displayField:null,l=p({displayField:s,fields:e.fields}),o=[a];null!=l&&e.fieldsIndex.has(l)&&o.push(l);const c=e.createQuery();c.outFields=o,c.returnGeometry=!1;const u="renderer"in e?y({renderer:e.renderer,event:r}):0;return c.geometry=I(r.mapPoint,u,t),c.outSpatialReference=t.spatialReference,e.queryFeatures(c,{signal:i}).then((({features:t})=>(n?.forEach((({graphic:r})=>{r.layer!==e||t.some((e=>e.getObjectId()===r.getObjectId()))||t.push(r)})),t)))}))),i)}async function Z(e,t,r,i){switch(t.type){case"3d":return D(e,t,r,i);case"2d":return q(e,t,r,i)}}async function Q(e,t,r){const{sourceLayer:i}=e,n=i.createQuery();n.objectIds=[e.getAttribute(i.objectIdField)],n.outFields=["*"],n.outSpatialReference=t,n.returnM=i.capabilities.data.supportsM,n.returnZ=i.capabilities.data.supportsZ,b()&&w()&&"scene"===i.type&&null!=i.infoFor3D&&(n.returnGeometry=!0,n.formatOf3DObjects="3D_glb");const s=await i.queryFeatures(n,{signal:r});a(r);return s.features[0]}async function B(e){const{graphic:t,sketchViewModel:r,sourceLayer:i,visualVariables:n,webStyleCache:a}=e;let s=!1;const{rotation:l,size:o}=n;[l,o].forEach((async e=>{if(null==e)return;const i=t.getAttribute(e.field);if(null!=i)e.initValue(i);else{const i=await e.getDefault(t.symbol,r.view);e.initValue(i),t.setAttribute(e.field,i),s=!0}})),s&&await O(t,a);const c={multipleSelectionEnabled:!1};return"point"===i.geometryType&&(c.enableRotation=null!=l,c.enableScaling=null!=o),P(r.tooltipOptions,o,l),r.layer.elevationInfo=i.elevationInfo,r.update(t,c)}function W(e){return null==e||"rotate-start"!==e.type&&"rotate"!==e.type&&"rotate-stop"!==e.type?null:e}function _(e){return null==e||"scale-start"!==e.type&&"scale"!==e.type&&"scale-stop"!==e.type?null:e}async function H(e,t,r,i,n){if(null==t.geometry||"point"!==t.geometry?.type)return;const a=i.rotation,s=W(r.toolEventInfo);if(null!=a&&null!=s)if("rotate-stop"===s.type)a.isUpdatingInteractively=!1,a.initValue();else{a.isUpdatingInteractively=!0;const{field:r,getValue:i}=a;t.setAttribute(r,i(s.angle,e))}const l=i.size,o=_(r.toolEventInfo);if(null!=l&&null!=o)if("scale-stop"===o.type)l.isUpdatingInteractively=!1,l.initValue();else{l.isUpdatingInteractively=!0;const{field:r,getValue:i}=l;t.setAttribute(r,i(o.xScale,e))}await O(t,n)}async function J(e,t,n,a,s,o){const c=ue(e);await O(c,o),a.map.add(n.layer),n.layer.add(c);const u=e.sourceLayer,p=se(a,u);await X(a,c),await B({graphic:c,sketchViewModel:n,sourceLayer:u,visualVariables:t,webStyleCache:o});const y=K(n,e,c);let d=null;p.then((e=>d=e)).catch((()=>{}));const f=t.size,m=t.rotation,h=l((()=>e.attributes),(async e=>{let t=!1;for(const r in e){const i=e[r];i!==c.getAttribute(r)&&(c.setAttribute(r,i),null==f||f.isUpdatingInteractively||f.field!==r||f.initValue(i),null==m||m.isUpdatingInteractively||m.field!==r||m.initValue(i),(null==d||d.requiredFields.includes(r))&&(t=!0))}t&&await O(c,o)})),g=n.on("update",(async e=>{const r=e.graphics[0];if("complete"===e.state)return B({graphic:r,sketchViewModel:n,sourceLayer:u,visualVariables:t,webStyleCache:o});await H(a,r,e,t,o),s(ue(r),e)})),b=n.on(["undo","redo"],(async e=>{s(ue(e.graphics[0]),e)})),w=n.updateOnGraphicClick;return{visual:r([y,i((()=>{n.updateOnGraphicClick=w}))]),interactive:r([b,g,i((()=>n.cancel())),h,i((()=>{n.updateOnGraphicClick=!1}))])}}function K(e,n,s){const l=e.view,c=n.sourceLayer,u=n.layer,p=n.getAttribute(u.objectIdField);let y=null;function d(e){y?.abort(),y=t((async t=>{const r=await se(l,c);a(t),r.setVisibility?.(p,e)}))}return d(!1),r([N(l,s,(e=>d(!e))),i((async()=>{d(!0);try{const e=await se(l,c);await o((()=>!e.updating))}finally{e.layer.remove(s)}}))])}function N(e,t,i){if("3d"===e.type){const n=new j({graphic:t});return r([e.trackGraphicState(n),l((()=>n.displaying),i)])}return l((()=>t.visible),i)}async function X(e,t){if("3d"===e.type){const r=new j({graphic:t}),i=e.trackGraphicState(r);await o((()=>r.displaying)),i.remove()}else await o((()=>t.visible))}const Y={icon:c(24),text:c(12),line:c(1),viewScaleSizeFactor:100};function $(e,t,r){let i=!1;return e.filter((e=>!!i||(i=e===t,i))).map((e=>r[e]()))}function ee(e){if(1!==e.length)return null;const t=e[0];if("items"in t){const e=t;return 1===e.items.length?e.items[0]:null}return t}function te(e,t){if(e.viewModel.refreshCreationTemplates(),"awaiting-feature-creation-info"===t[0].id){const r=ee(e.viewModel.featureTemplatesViewModel.items);null==r||r.supportsUpload||(e.creationInfo=r,t.shift())}return t}function re(e){switch(e){case"unknown":case"decimal-degrees":return null;default:return e}}function ie(e){e.filesEnabled=!0,e.mode="view",e.capabilities={editing:!0,operations:{add:!0,update:!0,delete:!0}}}function ne(e){const{creationInfo:t,viewModel:r}=e;if(!t)return!1;const{layer:i}=t,n=r.editableItems.find((e=>e.layer===i));if(n)return n.attachmentsOnCreateEnabled;const a=i.capabilities?.data,s=r.layerInfos?.find((e=>e.layer===i));return!(!(a&&"supportsAttachment"in a&&a.supportsAttachment)||s&&(!1===s.allowAttachments||!1===s.attachmentsOnUpdateEnabled))}const ae=e=>/-stop/.test(e)||/vertex-/.test(e),se=(e,t)=>{const r="subtype-sublayer"===t.type?t.parent:t;return e.whenLayerView(r)};function le(e){return"createInteractiveEditSession"in e}const oe=Symbol();function ce(e){return e&&"object"==typeof e&&oe in e}function ue(e){const t=e.geometry;if("mesh"===t?.type){const r=e.cloneShallow();return r.attributes=n(e.attributes),r.geometry=t.cloneShallow(),r.geometry.transform=t.transform?.clone()??null,r}return e.clone()}function pe(e){const t=e.cursor;return e.cursor="progress",i((()=>e.cursor=t))}export{oe as UsesSketchViewModelSymbol,te as avoidFeatureTemplateSelectionWithOnlyOneItem,le as canCreateInteractiveEditSession,ue as cloneGraphicExceptMesh,$ as createWorkflowSteps,Z as fetchCandidates,Q as fetchFullFeature,R as findLayerInfo,F as getVisualVariableAttributes,ae as isTerminalUpdateEventType,ie as prepareAttachmentsForCreateWorkflow,M as setUpFeatureAdd,J as setUpGeometryUpdate,ne as shouldShowAttachmentsForCreateWorkflow,pe as showProgressCursor,Y as sizeDefaults,re as sizeVariableUnitToLengthUnit,C as startCreatingNewFeature,B as startUpdatingFeature,O as updateGraphicSymbolWhenRequired,H as visualVariableInteractiveUpdate,se as whenEditorLayerView,X as whenGraphicDisplayed,ce as workflowUsesSketchViewModel};
|
package/widgets/Print.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Collection.js";import{on as i,eventKey as a}from"../core/events.js";import{clone as n}from"../core/lang.js";import s from"../core/Logger.js";import{watch as o,initial as l}from"../core/reactiveUtils.js";import{addProxy as r,hasSameOrigin as d}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{getToken as u}from"../rest/utils.js";import h from"./Widget.js";import m from"./Print/FileLink.js";import _ from"./Print/PrintViewModel.js";import b from"./Print/TemplateOptions.js";import{Heading as v}from"./support/Heading.js";import g from"./support/Popover.js";import{isActivationKey as y,keepMenuItemWithinView as f}from"./support/widgetUtils.js";import{messageBundle as T}from"./support/decorators/messageBundle.js";import{tsx as w}from"./support/jsxFactory.js";const O=t.ofType(m),x="MAP_ONLY";var C;!function(e){e.layout="layoutTab",e.mapOnly="mapOnlyTab"}(C||(C={}));const L="esri-print",k=`${L}__advanced-options-button`,I={base:L,headerTitle:`${L}__header-title`,inputText:`${L}__input-text`,layoutTabList:`${L}__layout-tab-list`,layoutTab:`${L}__layout-tab`,layoutSection:`${L}__layout-section`,mapOnlySection:`${L}__map-only-section`,scaleInput:`${L}__scale-input`,templateList:`${L}__template-list`,templateListScroller:`${L}__template-list-scroller`,templateListFooter:`${L}__template-list-footer`,loader:`${L}__loader`,advancedOptionsButton:k,advancedOptionsButtonContainer:`${k}-container`,advancedOptionsButtonTitle:`${k}-title`,advancedOptionsButtonIconOpened:`${k}-icon--opened`,advancedOptionsButtonIconClosed:`${k}-icon--closed`,advancedOptionsButtonIconClosed_RTL:`${k}-icon--closed-rtl`,refreshButton:`${L}__refresh-button`,swapButton:`${L}__swap-button`,linkButton:`${L}__link-button`,printButton:`${L}__export-button`,templateButton:`${L}__template-button`,formSectionContainer:`${L}__form-section-container`,advancedOptionsSection:`${L}__advanced-options-section`,advancedOptionsContainer:`${L}__advanced-options-container`,authorInfoContainer:`${L}__author-info-container`,copyrightInfoContainer:`${L}__copyright-info-container`,exportedFilesContainer:`${L}__export-panel-container`,exportedFilesTitle:`${L}__export-title`,exportedFile:`${L}__exported-file`,exportedFileLink:"esri-widget__anchor esri-print__exported-file-link",exportedFileLinkTitle:`${L}__exported-file-link-title`,heightContainer:`${L}__height-container`,legendInfoContainer:`${L}__legend-info-container`,printWidgetContainer:`${L}__container`,panelContainer:`${L}__panel-container`,scaleInfoContainer:`${L}__scale-info-container`,scaleInputContainer:`${L}__scale-input-container`,sizeContainer:`${L}__size-container`,widthContainer:`${L}__width-container`,widget:"esri-widget",panel:"esri-widget--panel",widgetButton:"esri-widget--button",button:"esri-button",buttonSecondary:"esri-button--secondary",buttonTertiary:"esri-button--tertiary",select:"esri-select",input:"esri-input",disabled:"esri-disabled",anchorDisabled:"esri-widget__anchor--disabled",buttonDisabled:"esri-button--disabled",panelError:`${L}__panel--error`,exportedFileError:`${L}__exported-file--error`,hide:"esri-hidden",rotate:"esri-rotating",anchor:"esri-widget__anchor",menu:"esri-menu",menuList:"esri-menu__list",menuItem:"esri-menu__list-item",menuItemFocus:"esri-menu__list-item--focus",menuHeader:"esri-menu__header",iconCheckMark:"esri-icon-check-mark",iconDownload:"esri-icon-download",iconLaunchLink:"esri-icon-launch-link-external",iconError:"esri-icon-error",iconPrinter:"esri-icon-printer",iconRightTriangleArrow:"esri-icon-right-triangle-arrow",iconLeftTriangleArrow:"esri-icon-left-triangle-arrow",iconDownArrow:"esri-icon-down-arrow",iconRefresh:"esri-icon-refresh",iconSpinner:"esri-icon-loading-indicator",iconSwap:"esri-icon-swap",iconLinked:"esri-icon-link-horizontal",iconUnlinked:"esri-icon-unlocked-link-horizontal",widgetIcon:"esri-icon-printer"},S="User sets an invalid layout, resetting it to the default valid one...",$="User sets an invalid format, resetting it to the default valid one...";function M(e){const t=8.3333,i=11.4583;return{width:Math.round(e*t),height:Math.round(e*i)}}function F(e){return!isNaN(e)&&e>0}function E(e){return e?.toUpperCase()===x}let P=class extends h{constructor(e,t){super(e,t),this._activeTabFocusRequested=!1,this._advancedOptionsVisibleForLayout=!1,this._advancedOptionsVisibleForMapOnly=!1,this._awaitingServerResponse=!1,this._exportedFileNameMap={},this._focusedTemplateIndex=0,this._layoutTabSelected=!0,this._pendingExportScroll=!1,this._rootNode=null,this._selectTemplateNode=null,this._templateListPopover=new g({owner:this,placement:"top",offset:[0,-100],anchorElement:()=>this._selectTemplateNode,renderContentFunction:this.renderTemplateList}),this.exportedLinks=new O,this.headingLevel=3,this.iconClass=I.widgetIcon,this.icon=null,this.templateOptions=new b,this.viewModel=new _,this.handleTemplateListCreation=e=>e.focus(),this.handleTemplateChildBlur=e=>{const t=e.relatedTarget?.closest(`.${I.templateList}`);t||this.handleCloseTemplateSelection()},this.handleCloseTemplateSelection=()=>{this._focusedTemplateIndex=0,this._templateListPopover.open=!1,this._selectTemplateNode?.focus()},this.handleSelectTemplateClick=()=>{this._focusedTemplateIndex=0,this._templateListPopover.open=!0},this.handleTemplateListClick=e=>{const t=A(e.target);t&&this.applyTemplate(t)},this.handleTemplateListKeyDown=e=>{if(this._focusedTemplateIndex){if(y(e.key))return this.applyTemplate(this.viewModel.defaultTemplates.at(this._focusedTemplateIndex)),void e.preventDefault();if("ArrowDown"===e.key||"ArrowUp"===e.key){const{defaultTemplates:t}=this.viewModel,i="ArrowDown"===e.key?1:-1,a=(this._focusedTemplateIndex+i)%t.length;this._focusedTemplateIndex=a<0?t.length-1:a;const n=e.currentTarget;f(n.querySelectorAll(`.${I.menuItem}`)[this._focusedTemplateIndex],n.parentElement),e.preventDefault()}"Escape"===e.key&&this.handleCloseTemplateSelection()}},this._removeLink=e=>{const t=e.currentTarget["data-item"];t&&"error"===t.state&&this.exportedLinks.remove(t)},this._handleLinkClick=e=>{const t=e.currentTarget,{href:i}=t,a=u(this.viewModel.effectivePrintServiceUrl);if(!a)return;if(!e.isTrusted)return void e.stopPropagation();e.preventDefault();const n=new URL(i);n.searchParams.set("token",a),t.href=n.href,t.click(),t.href=i},this._focusOnTabChange=this._focusOnTabChange.bind(this)}initialize(){this.addHandles([o((()=>this.viewModel?.templatesInfo),(e=>{const{format:t,layout:i}=this.templateOptions;if(e){const a=i===e.layout.defaultValue||E(i)||e.layout.choiceList&&i&&e.layout.choiceList.includes(i),n=t===e.format.defaultValue||e.format.choiceList&&t&&e.format.choiceList.includes(t);a||(i&&s.getLogger(this).warn(S),this.templateOptions.layout=e.layout.defaultValue),n||(t&&s.getLogger(this).warn($),this.templateOptions.format=e.format.defaultValue),E(i)&&(this._layoutTabSelected=!1)}}),l),o((()=>this.templateOptions?.format),(e=>{const{viewModel:{templatesInfo:t}}=this;if(t&&e){let i=!1;t.format.choiceList&&t.format.choiceList.forEach((t=>{t.toUpperCase()===e.toUpperCase()&&(this.templateOptions.format=t,i=!0)})),i||(this.templateOptions.format=t.format.defaultValue,s.getLogger(this).warn($)),this.scheduleRender()}}),l),o((()=>this.templateOptions?.layout),(e=>{const{viewModel:{templatesInfo:t}}=this;if(t&&e){this._layoutTabSelected=!E(e);let i=!this._layoutTabSelected;i||t.layout.choiceList&&t.layout.choiceList.forEach((t=>{t.toUpperCase()===e.toUpperCase()&&(this.templateOptions.layout=t,i=!0)})),i||(this.templateOptions.layout=t.layout.defaultValue,s.getLogger(this).warn(S));const a=this.viewModel.effectiveTemplateCustomTextElements[this.templateOptions.layout];this.templateOptions.customTextElements=a?n(a):null,this.scheduleRender()}}),l),o((()=>this.templateOptions?.dpi),(e=>{e<=0?this.templateOptions.dpi=1:this.scheduleRender()}),l),o((()=>this.viewModel?.view?.scale),(e=>{const{scale:t,scaleEnabled:i}=this.templateOptions;i&&t||(this.templateOptions.scale=e)}),l)]);const{height:e,width:t}=this.templateOptions;this.templateOptions.width=t||800,this.templateOptions.height=e||1100;const i=setTimeout((()=>{this._awaitingServerResponse=!0,this.scheduleRender()}),500);this.viewModel.load().then((()=>clearTimeout(i)))}get allowedFormats(){return this.viewModel.allowedFormats}set allowedFormats(e){this.viewModel.allowedFormats=e}get allowedLayouts(){return this.viewModel.allowedLayouts}set allowedLayouts(e){this.viewModel.allowedLayouts=e}get error(){return this.viewModel.error}get extraParameters(){return this.viewModel.extraParameters}set extraParameters(e){this.viewModel.extraParameters=e}get includeDefaultTemplates(){return this.viewModel.includeDefaultTemplates}set includeDefaultTemplates(e){this.viewModel.includeDefaultTemplates=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get portal(){return this.viewModel.portal}set portal(e){this.viewModel.portal=e}get printServiceUrl(){return this.viewModel.printServiceUrl}set printServiceUrl(e){this.viewModel.printServiceUrl=e}get templateCustomTextElements(){return this.viewModel.templateCustomTextElements}set templateCustomTextElements(e){this.viewModel.templateCustomTextElements=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const{attributionEnabled:e,author:t,copyright:i,dpi:a,format:n,height:s,layout:o,legendEnabled:l,northArrowEnabled:r,scaleEnabled:d,scale:p,width:c}=this.templateOptions,u="ready"!==this.viewModel?.state,h=this.renderTitleOrFileNameSection(),{includeDefaultTemplates:m,messages:_,viewModel:b}=this,g=this.viewModel?.templatesInfo?.format?.choiceList||[],y=g.length>0?g.map((e=>w("option",{key:e,selected:e===n,value:e},e.toUpperCase()))):w("option",{key:"format-default-option"},_.formatDefaultOption),f=w("div",{class:I.formSectionContainer},w("label",null,_.fileFormatTitle,w("select",{class:I.select,onchange:this._updateFromOption,"data-target-property":"format",bind:this},y))),T=this.viewModel?.templatesInfo?.layout?.choiceList,O=T?.length?T.map((e=>w("option",{key:e,selected:e===o,value:e},_[e]||e))):w("option",{key:"layout-default-option"},_.layoutDefaultOption),x=w("div",{class:I.formSectionContainer},w("label",null,_.layoutTitle,w("select",{class:I.select,onchange:this._updateFromOption,"data-target-property":"layout",bind:this},O))),L=w("div",{class:I.formSectionContainer},w("label",null,_.dpi,w("input",{type:"number",class:this.classes(I.inputText,I.input),"data-input-name":"dpi",onchange:this._handleDPIChange,value:`${a}`,min:"1",tabIndex:0,bind:this}))),k=w("div",{class:this.classes(I.scaleInfoContainer,I.formSectionContainer)},w("label",null,w("input",{"data-option-name":"scaleEnabled",checked:d,type:"checkbox",tabIndex:0,onchange:this._toggleInputValue,bind:this}),_.scale),w("div",{class:I.scaleInputContainer},w("input",{"aria-label":_.scaleLabel,"aria-valuenow":`${p}`,role:"spinbutton",type:"number",class:this.classes(I.inputText,I.input,I.scaleInput),tabIndex:0,"data-input-name":"scale",onchange:this._updateInputValue,disabled:!d,value:`${p}`,bind:this}),w("button",{type:"button","aria-label":_.reset,class:this.classes(I.widgetButton,I.refreshButton,I.iconRefresh),tabIndex:0,onclick:this._resetToCurrentScale,bind:this}))),S=this._advancedOptionsVisibleForLayout?w("div",{"aria-labelledby":`${this.id}__advancedOptionsForLayout`,class:I.advancedOptionsContainer},k,w("div",{class:this.classes(I.authorInfoContainer,I.formSectionContainer)},w("label",null,_.author,w("input",{type:"text",value:t??"",class:this.classes(I.inputText,I.input),tabIndex:0,"data-input-name":"author",onchange:this._updateInputValue,bind:this}))),w("div",{class:this.classes(I.copyrightInfoContainer,I.formSectionContainer)},w("label",null,_.copyright,w("input",{type:"text",class:this.classes(I.inputText,I.input),tabIndex:0,value:i??"","data-input-name":"copyright",onchange:this._updateInputValue,bind:this}))),L,w("div",{class:this.classes(I.legendInfoContainer,I.formSectionContainer)},w("label",null,w("input",{type:"checkbox","data-option-name":"legendEnabled",tabIndex:0,checked:l,onchange:this._toggleInputValue,bind:this}),_.legend)),this.viewModel.templateToNorthArrowInfo[o]?w("div",{class:this.classes(I.legendInfoContainer,I.formSectionContainer),key:"north-arrow"},w("label",null,w("input",{type:"checkbox","data-option-name":"northArrowEnabled",tabIndex:0,checked:r,onchange:this._toggleInputValue,bind:this}),_.northArrow)):null,this.renderCustomTextElementSection()):null,$=this._advancedOptionsVisibleForMapOnly?w("div",{"aria-labelledby":`${this.id}__advancedOptionsForMapOnly`,class:I.advancedOptionsContainer},k,L,w("div",{class:I.formSectionContainer},w("label",null,w("input",{"data-option-name":"attributionEnabled",type:"checkbox",onchange:this._toggleInputValue,tabIndex:0,checked:e,bind:this}),_.attribution)),this.renderCustomTextElementSection()):null,M=this._layoutTabSelected?w("section",{key:"esri-print__layoutContent",id:`${this.id}__layoutContent`,"aria-labelledby":`${this.id}__layoutTab`,class:I.layoutSection,role:"tabpanel"},w("div",{class:I.panelContainer},h,x,this._layoutTabSelected?f:null),w("div",{class:this.classes(I.panelContainer,I.advancedOptionsSection)},w("button",{"aria-label":_.advancedOptions,"aria-expanded":this._advancedOptionsVisibleForLayout?"true":"false",class:I.advancedOptionsButton,onclick:this._showAdvancedOptions,bind:this,type:"button"},w("div",{class:I.advancedOptionsButtonContainer},w("span",{"aria-hidden":"true",class:this.classes(I.iconRightTriangleArrow,I.advancedOptionsButtonIconClosed)}),w("span",{"aria-hidden":"true",class:this.classes(I.iconLeftTriangleArrow,I.advancedOptionsButtonIconClosed_RTL)}),w("span",{"aria-hidden":"true",class:this.classes(I.iconDownArrow,I.advancedOptionsButtonIconOpened)}),w("span",{class:I.advancedOptionsButtonTitle},_.advancedOptions))),S)):w("section",{key:"esri-print__mapOnlyContent",id:`${this.id}__mapOnlyContent`,"aria-labelledby":`${this.id}__mapOnlyTab`,class:I.mapOnlySection,role:"tabpanel"},w("div",{class:I.panelContainer},h,this._layoutTabSelected?null:f,w("div",{class:this.classes(I.sizeContainer,I.formSectionContainer)},w("div",{class:I.widthContainer},w("label",null,_.width,w("input",{type:"number",class:this.classes(I.inputText,I.input),"data-input-name":"width",onchange:this._updateInputValue,value:`${c}`,tabIndex:0,bind:this}))),w("div",{class:I.heightContainer},w("label",null,_.height,w("input",{type:"number",class:this.classes(I.inputText,I.input),"data-input-name":"height",onchange:this._updateInputValue,value:`${s}`,tabIndex:0,bind:this}))),w("button",{type:"button","aria-label":_.swap,class:this.classes(I.widgetButton,I.swapButton,I.iconSwap),onclick:this._switchInput,tabIndex:0,bind:this})),w("div",{class:this.classes(I.panelContainer,I.advancedOptionsSection)},w("button",{"aria-label":_.advancedOptions,"aria-expanded":this._advancedOptionsVisibleForMapOnly?"true":"false",type:"button",class:I.advancedOptionsButton,onclick:this._showAdvancedOptions,bind:this},w("div",{class:I.advancedOptionsButtonContainer},w("span",{"aria-hidden":"true",class:this.classes(I.iconRightTriangleArrow,I.advancedOptionsButtonIconClosed)}),w("span",{"aria-hidden":"true",class:this.classes(I.iconLeftTriangleArrow,I.advancedOptionsButtonIconClosed_RTL)}),w("span",{"aria-hidden":"true",class:this.classes(I.iconDownArrow,I.advancedOptionsButtonIconOpened)}),w("span",{class:I.advancedOptionsButtonTitle},_.advancedOptions))),$))),F=this.exportedLinks.toArray(),E=this._renderExportedLink(F),P={[I.buttonDisabled]:u||!o&&!n},A="2d"!==this.view?.type,V=w("div",{class:I.panelError},A?_.sceneViewError:_.serviceError),B=w("div",null,w("ul",{class:I.layoutTabList,role:"tablist",onclick:this._toggleLayoutPanel,onkeydown:this._handleLayoutPanelKeyDown,bind:this},w("li",{afterCreate:this._focusOnTabChange,afterUpdate:this._focusOnTabChange,id:`${this.id}__layoutTab`,"data-tab-id":C.layout,class:I.layoutTab,role:"tab",tabIndex:0,"aria-selected":`${this._layoutTabSelected}`},_.layoutTab),w("li",{afterCreate:this._focusOnTabChange,afterUpdate:this._focusOnTabChange,id:`${this.id}__mapOnlyTab`,"data-tab-id":C.mapOnly,class:I.layoutTab,role:"tab",tabIndex:0,"aria-selected":`${!this._layoutTabSelected}`},_.mapOnlyTab)),M,w("button",{"aria-label":_.exportDescription,type:"button",class:this.classes(I.printButton,I.button,P),disabled:u,tabIndex:0,onclick:this._handlePrintMap,bind:this},_.export),m&&b.defaultTemplates.length>0?this.renderTemplateSectionTrigger():null,w("div",{class:I.exportedFilesContainer,afterUpdate:this._scrollExportIntoView,bind:this},w(v,{class:I.exportedFilesTitle,level:this.headingLevel},_.exportText),F.length>0?null:w("div",null,w("div",null,_.exportHint)),E)),D=w("div",{class:I.printWidgetContainer},w("header",{class:I.headerTitle},_.export),this.error||A||!this.view?V:B),N="initializing"===this.viewModel?.state?this._renderLoader():D;return w("div",{afterCreate:this._handleRootAfterCreate,bind:this,class:this.classes(I.base,I.widget,I.panel)},N)}renderTemplateSectionTrigger(){const{messages:e,_templateListPopover:t}=this,i=t.open;return w("button",{afterCreate:e=>this._selectTemplateNode=e,"aria-controls":i?`${this.id}__template-selection`:"","aria-label":e.selectTemplateDescription,"aria-pressed":i.toString(),class:this.classes(I.button,I.buttonTertiary,I.templateButton),onclick:this.handleSelectTemplateClick,title:e.selectTemplateDescription,type:"button"},e.selectTemplate)}renderCustomTextElementSection(){const{templateOptions:{customTextElements:e}}=this;return e?w("div",{class:I.formSectionContainer,key:"custom-text-elements"},e.map((e=>{const[t,i]=Object.entries(e)[0];return"date"===t?null:w("label",{key:t},t,w("input",{bind:this,class:this.classes(I.inputText,I.input),"data-input-custom":!0,"data-input-name":t,onchange:this._updateInputValue,type:"text",value:i}))}))):null}renderTemplateList(){const{messages:e,messagesCommon:t,viewModel:i}=this,{defaultTemplates:a}=i,n=e.selectTemplateDescription,s=`${this.id}__template-selection`;return w("div",{class:this.classes(I.templateList,I.widget,I.panel),id:s},w(v,{class:I.menuHeader,level:this.headingLevel},e.selectTemplate),w("div",{class:I.templateListScroller},w("ul",{afterCreate:this.handleTemplateListCreation,"aria-activedescendant":`${this.id}__template-item--${this._focusedTemplateIndex}`,"aria-label":n,class:I.menuList,key:"templates",onblur:this.handleTemplateChildBlur,onclick:this.handleTemplateListClick,onkeydown:this.handleTemplateListKeyDown,role:"listbox",tabIndex:0,title:n},a.toArray().map(((t,i)=>{const a=i===this._focusedTemplateIndex,n=t.description??"",s=t.label??"";return w("li",{"aria-label":n,class:this.classes(I.menuItem,{[I.menuItemFocus]:a}),"data-template":t,id:`${this.id}__template-item--${i}`,key:s,title:n},E(s)?e.mapOnlyTab:s)})))),w("div",{class:I.templateListFooter},w("button",{type:"button",class:this.classes(I.button,I.buttonSecondary),onblur:this.handleTemplateChildBlur,onclick:this.handleCloseTemplateSelection},t.done)))}applyTemplate(e){const{format:t,layout:i,layoutOptions:a}=e,{templateOptions:n}=this;this._templateListPopover.open=!1,this._toggleTab("map-only"===i?C.mapOnly:C.layout,!1),t&&(n.format=t),i&&(n.layout=i),this._focusedTemplateIndex=null,n.legendEnabled=a?.legend??n.legendEnabled,this.handleCloseTemplateSelection()}renderTitleOrFileNameSection(){const{templateOptions:e,messages:t}=this;let i,a,n,s;return this._layoutTabSelected?(i=t.title,a=t.titlePlaceHolder,n=e.title,s="title"):(i=t.fileName,a=t.fileNamePlaceHolder,n=e.fileName,s="fileName"),w("div",{class:I.formSectionContainer,key:s},w("label",null,i,w("input",{type:"text",tabIndex:0,placeholder:a,class:this.classes(I.inputText,I.input),value:n??"","data-input-name":s,onchange:this._updateInputValue,bind:this})))}_handleRootAfterCreate(e){this._rootNode=e,this.addHandles(i(e,"scroll",(()=>{this._templateListPopover.open&&this.handleCloseTemplateSelection()})))}_focusOnTabChange(e){if(!this._activeTabFocusRequested)return;const t=e.getAttribute("data-tab-id");("layoutTab"===t&&this._layoutTabSelected||"mapOnlyTab"===t&&!this._layoutTabSelected)&&(e.focus(),this._activeTabFocusRequested=!1)}_renderLoader(){const e={[I.loader]:this._awaitingServerResponse};return w("div",{class:this.classes(e),key:"loader"})}_createFileLink(e,t){const i=t||this.messages.untitled,a=e.format.toLowerCase(),n=a.includes("png")?"png":a,s=i+n;return void 0!==this._exportedFileNameMap[s]?this._exportedFileNameMap[s]++:this._exportedFileNameMap[s]=0,new m({name:i,extension:n,count:this._exportedFileNameMap[s]})}_resetToCurrentScale(){this.templateOptions.scale=this.viewModel.view?.scale}_updateCustomTextElementValue(e,t,i){e.find((e=>{const[i]=Object.entries(e)[0];return i===t}))[t]=i}_updateInputValue(e){const t=e.target,i=t.getAttribute("data-input-name"),a=!!t["data-input-custom"],{templateOptions:n}=this;if(a)return void this._updateCustomTextElementValue(n.customTextElements,i,t.value);let s;if("number"===t.type){if(!F(t.valueAsNumber)){const e=n[i];return void(t.value=`${e}`)}s=t.valueAsNumber}else s=t.value;n[i]=s}_handleDPIChange(e){this._updateInputValue(e);const t=e.currentTarget.valueAsNumber,{height:i,width:a}=M(t),{templateOptions:n}=this;n.height=i,n.width=a}_handlePrintMap(){this._pendingExportScroll=!0;const{templateOptions:e}=this,t=this.viewModel.toPrintTemplate(e),i=this._layoutTabSelected?t.layoutOptions?.titleText:e.fileName,a=this._createFileLink(t,i);this.exportedLinks.add(a),this.emit("submit",{link:a}),this.viewModel.print(t).then((e=>{a.set({url:e&&e.url,state:"ready"})})).catch((e=>{a.set({error:e,state:"error"})})).then((()=>{this.emit("complete",{link:a}),this.scheduleRender()}))}_updateFromOption(e){const t=e.target,i=t.selectedOptions?t.selectedOptions.item(0)?.value:t.options[t.selectedIndex].value,a=t.getAttribute("data-target-property");this.templateOptions[a]=i}_switchInput(){[this.templateOptions.width,this.templateOptions.height]=[this.templateOptions.height,this.templateOptions.width]}_showAdvancedOptions(){this._layoutTabSelected?this._advancedOptionsVisibleForLayout=!this._advancedOptionsVisibleForLayout:this._advancedOptionsVisibleForMapOnly=!this._advancedOptionsVisibleForMapOnly}_scrollExportIntoView(){if(!this._pendingExportScroll)return;this._pendingExportScroll=!1;const e=this._rootNode;if(!e)return;const{clientHeight:t,scrollHeight:i}=e,a=i-t;a>0&&(e.scrollTop=a)}_toggleInputValue(e){const t=e.target,i=t.getAttribute("data-option-name");this.templateOptions[i]=t.checked,"scaleEnabled"===i&&(this.templateOptions[i]||this._resetToCurrentScale())}_renderExportedLink(e){const t=this.messages;return e.map((e=>{const{error:i,url:a,state:n}=e,s=e.formattedName??"",o="error"===n,l="pending"===n,p="ready"===n,c={[I.anchorDisabled]:l||o};let u=a||null;u&&(u=r(u));const h=d(a,location.href),m={[I.iconSpinner]:l,[I.rotate]:l,[I.iconDownload]:h&&p,[I.iconLaunchLink]:!h&&p,[I.iconError]:o,[I.exportedFileError]:o},_={[I.exportedFileError]:o};let b;b=l?t.pending:p?t.ready:t.errorMessage;const v=o?"print-task:cim-symbol-unsupported"===i?.name?t.exportWebMapCIMError:t.exportWebMapError:"";return w("div",{"aria-label":b,class:I.exportedFile,"data-item":e,key:s,onclick:this._removeLink,title:v},w("a",{"aria-label":`${s}. ${t.linkReady}`,download:s,href:u??"",rel:"noreferrer",tabIndex:0,target:"_blank",class:this.classes(I.exportedFileLink,c),onclick:this._handleLinkClick},w("span",{class:this.classes(m)}),w("span",{class:this.classes(I.exportedFileLinkTitle,_)},s)))}))}_toggleLayoutPanel(e){const t=e.target;this._toggleTab(t.getAttribute("data-tab-id"))}_toggleTab(e,t=!0){if(this._layoutTabSelected=e===C.layout,this._layoutTabSelected){const e=this.viewModel?.templatesInfo?.layout?.choiceList;this.templateOptions.layout=e?e[0]:"letter-ansi-a-landscape"}else this.templateOptions.layout=x;t&&(this._activeTabFocusRequested=!0)}_handleLayoutPanelKeyDown(e){const t=a(e),i=e.target.getAttribute("data-tab-id");if(y(t))return this._toggleTab(i),e.preventDefault(),void e.stopPropagation();"ArrowLeft"!==t&&"ArrowRight"!==t||(this._toggleTab(i===C.layout?C.mapOnly:C.layout),e.preventDefault(),e.stopPropagation())}};function A(e){return e?.["data-template"]}e([p()],P.prototype,"allowedFormats",null),e([p()],P.prototype,"allowedLayouts",null),e([p()],P.prototype,"error",null),e([p({type:O})],P.prototype,"exportedLinks",void 0),e([p()],P.prototype,"extraParameters",null),e([p()],P.prototype,"headingLevel",void 0),e([p()],P.prototype,"iconClass",void 0),e([p()],P.prototype,"icon",void 0),e([p()],P.prototype,"includeDefaultTemplates",null),e([p()],P.prototype,"label",null),e([p(),T("esri/widgets/Print/t9n/Print")],P.prototype,"messages",void 0),e([p(),T("esri/t9n/common")],P.prototype,"messagesCommon",void 0),e([p()],P.prototype,"portal",null),e([p()],P.prototype,"printServiceUrl",null),e([p()],P.prototype,"templateCustomTextElements",null),e([p({type:b})],P.prototype,"templateOptions",void 0),e([p()],P.prototype,"view",null),e([p({type:_})],P.prototype,"viewModel",void 0),P=e([c("esri.widgets.Print")],P);const V=P;export{V as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Collection.js";import{on as i,eventKey as a}from"../core/events.js";import{clone as n}from"../core/lang.js";import s from"../core/Logger.js";import{watch as o,initial as l}from"../core/reactiveUtils.js";import{addProxy as r,hasSameOrigin as d}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{getToken as u}from"../rest/utils.js";import h from"./Widget.js";import m from"./Print/FileLink.js";import _ from"./Print/PrintViewModel.js";import b from"./Print/TemplateOptions.js";import{Heading as v}from"./support/Heading.js";import g from"./support/Popover.js";import{isActivationKey as y,keepMenuItemWithinView as f}from"./support/widgetUtils.js";import{messageBundle as T}from"./support/decorators/messageBundle.js";import{tsx as w}from"./support/jsxFactory.js";const O=t.ofType(m),x="MAP_ONLY";var C;!function(e){e.layout="layoutTab",e.mapOnly="mapOnlyTab"}(C||(C={}));const L="esri-print",k=`${L}__advanced-options-button`,I={base:L,headerTitle:`${L}__header-title`,inputText:`${L}__input-text`,layoutTabList:`${L}__layout-tab-list`,layoutTab:`${L}__layout-tab`,layoutSection:`${L}__layout-section`,mapOnlySection:`${L}__map-only-section`,scaleInput:`${L}__scale-input`,templateList:`${L}__template-list`,templateListScroller:`${L}__template-list-scroller`,templateListFooter:`${L}__template-list-footer`,loader:`${L}__loader`,advancedOptionsButton:k,advancedOptionsButtonContainer:`${k}-container`,advancedOptionsButtonTitle:`${k}-title`,advancedOptionsButtonIconOpened:`${k}-icon--opened`,advancedOptionsButtonIconClosed:`${k}-icon--closed`,advancedOptionsButtonIconClosed_RTL:`${k}-icon--closed-rtl`,refreshButton:`${L}__refresh-button`,swapButton:`${L}__swap-button`,linkButton:`${L}__link-button`,printButton:`${L}__export-button`,templateButton:`${L}__template-button`,formSectionContainer:`${L}__form-section-container`,advancedOptionsSection:`${L}__advanced-options-section`,advancedOptionsContainer:`${L}__advanced-options-container`,authorInfoContainer:`${L}__author-info-container`,copyrightInfoContainer:`${L}__copyright-info-container`,exportedFilesContainer:`${L}__export-panel-container`,exportedFilesTitle:`${L}__export-title`,exportedFile:`${L}__exported-file`,exportedFileLink:"esri-widget__anchor esri-print__exported-file-link",exportedFileLinkTitle:`${L}__exported-file-link-title`,heightContainer:`${L}__height-container`,legendInfoContainer:`${L}__legend-info-container`,printWidgetContainer:`${L}__container`,panelContainer:`${L}__panel-container`,scaleInfoContainer:`${L}__scale-info-container`,scaleInputContainer:`${L}__scale-input-container`,sizeContainer:`${L}__size-container`,widthContainer:`${L}__width-container`,widget:"esri-widget",panel:"esri-widget--panel",widgetButton:"esri-widget--button",button:"esri-button",buttonSecondary:"esri-button--secondary",buttonTertiary:"esri-button--tertiary",select:"esri-select",input:"esri-input",disabled:"esri-disabled",anchorDisabled:"esri-widget__anchor--disabled",buttonDisabled:"esri-button--disabled",panelError:`${L}__panel--error`,exportedFileError:`${L}__exported-file--error`,hide:"esri-hidden",rotate:"esri-rotating",anchor:"esri-widget__anchor",menu:"esri-menu",menuList:"esri-menu__list",menuItem:"esri-menu__list-item",menuItemFocus:"esri-menu__list-item--focus",menuHeader:"esri-menu__header",iconCheckMark:"esri-icon-check-mark",iconDownload:"esri-icon-download",iconLaunchLink:"esri-icon-launch-link-external",iconError:"esri-icon-error",iconPrinter:"esri-icon-printer",iconRightTriangleArrow:"esri-icon-right-triangle-arrow",iconLeftTriangleArrow:"esri-icon-left-triangle-arrow",iconDownArrow:"esri-icon-down-arrow",iconRefresh:"esri-icon-refresh",iconSpinner:"esri-icon-loading-indicator",iconSwap:"esri-icon-swap",iconLinked:"esri-icon-link-horizontal",iconUnlinked:"esri-icon-unlocked-link-horizontal",widgetIcon:"esri-icon-printer"},S="User sets an invalid layout, resetting it to the default valid one...",$="User sets an invalid format, resetting it to the default valid one...";function M(e){const t=8.3333,i=11.4583;return{width:Math.round(e*t),height:Math.round(e*i)}}function F(e){return!isNaN(e)&&e>0}function E(e){return e?.toUpperCase()===x}let P=class extends h{constructor(e,t){super(e,t),this._activeTabFocusRequested=!1,this._advancedOptionsVisibleForLayout=!1,this._advancedOptionsVisibleForMapOnly=!1,this._awaitingServerResponse=!1,this._exportedFileNameMap={},this._focusedTemplateIndex=0,this._layoutTabSelected=!0,this._pendingExportScroll=!1,this._rootNode=null,this._selectTemplateNode=null,this._templateListPopover=new g({owner:this,placement:"top",offset:[0,-100],anchorElement:()=>this._selectTemplateNode,renderContentFunction:this.renderTemplateList}),this.exportedLinks=new O,this.headingLevel=3,this.iconClass=I.widgetIcon,this.icon=null,this.templateOptions=new b,this.viewModel=new _,this.handleTemplateListCreation=e=>e.focus(),this.handleTemplateChildBlur=e=>{const t=e.relatedTarget?.closest(`.${I.templateList}`);t||this.handleCloseTemplateSelection()},this.handleCloseTemplateSelection=()=>{this._focusedTemplateIndex=0,this._templateListPopover.open=!1,this._selectTemplateNode?.focus()},this.handleSelectTemplateClick=()=>{this._focusedTemplateIndex=0,this._templateListPopover.open=!0},this.handleTemplateListClick=e=>{const t=A(e.target);t&&this.applyTemplate(t)},this.handleTemplateListKeyDown=e=>{if(this._focusedTemplateIndex){if(y(e.key))return this.applyTemplate(this.viewModel.defaultTemplates.at(this._focusedTemplateIndex)),void e.preventDefault();if("ArrowDown"===e.key||"ArrowUp"===e.key){const{defaultTemplates:t}=this.viewModel,i="ArrowDown"===e.key?1:-1,a=(this._focusedTemplateIndex+i)%t.length;this._focusedTemplateIndex=a<0?t.length-1:a;const n=e.currentTarget;f(n.querySelectorAll(`.${I.menuItem}`)[this._focusedTemplateIndex],n.parentElement),e.preventDefault()}"Escape"===e.key&&this.handleCloseTemplateSelection()}},this._removeLink=e=>{const t=e.currentTarget["data-item"];t&&"error"===t.state&&this.exportedLinks.remove(t)},this._handleLinkClick=e=>{const t=e.currentTarget,{href:i}=t,a=u(this.viewModel.effectivePrintServiceUrl);if(!a)return;if(!e.isTrusted)return void e.stopPropagation();e.preventDefault();const n=new URL(i);n.searchParams.set("token",a),t.href=n.href,t.click(),t.href=i},this._focusOnTabChange=this._focusOnTabChange.bind(this)}initialize(){this.addHandles([o((()=>this.viewModel?.templatesInfo),(e=>{const{format:t,layout:i}=this.templateOptions;if(e){const a=i===e.layout.defaultValue||E(i)||e.layout.choiceList&&i&&e.layout.choiceList.includes(i),n=t===e.format.defaultValue||e.format.choiceList&&t&&e.format.choiceList.includes(t);a||(i&&s.getLogger(this).warn(S),this.templateOptions.layout=e.layout.defaultValue),n||(t&&s.getLogger(this).warn($),this.templateOptions.format=e.format.defaultValue),E(i)&&(this._layoutTabSelected=!1)}}),l),o((()=>this.templateOptions?.format),(e=>{const{viewModel:{templatesInfo:t}}=this;if(t&&e){let i=!1;t.format.choiceList&&t.format.choiceList.forEach((t=>{t.toUpperCase()===e.toUpperCase()&&(this.templateOptions.format=t,i=!0)})),i||(this.templateOptions.format=t.format.defaultValue,s.getLogger(this).warn($)),this.scheduleRender()}}),l),o((()=>this.templateOptions?.layout),(e=>{const{viewModel:{templatesInfo:t}}=this;if(t&&e){this._layoutTabSelected=!E(e);let i=!this._layoutTabSelected;i||t.layout.choiceList&&t.layout.choiceList.forEach((t=>{t.toUpperCase()===e.toUpperCase()&&(this.templateOptions.layout=t,i=!0)})),i||(this.templateOptions.layout=t.layout.defaultValue,s.getLogger(this).warn(S));const a=this.viewModel.effectiveTemplateCustomTextElements[this.templateOptions.layout];this.templateOptions.customTextElements=a?n(a):null,this.scheduleRender()}}),l),o((()=>this.templateOptions?.dpi),(e=>{e<=0?this.templateOptions.dpi=1:this.scheduleRender()}),l),o((()=>this.viewModel?.view?.scale),(e=>{const{scale:t,scaleEnabled:i}=this.templateOptions;i&&t||(this.templateOptions.scale=e)}),l)]);const{height:e,width:t}=this.templateOptions;this.templateOptions.width=t||800,this.templateOptions.height=e||1100;const i=setTimeout((()=>{this._awaitingServerResponse=!0,this.scheduleRender()}),500);this.viewModel.load().then((()=>clearTimeout(i)))}get allowedFormats(){return this.viewModel.allowedFormats}set allowedFormats(e){this.viewModel.allowedFormats=e}get allowedLayouts(){return this.viewModel.allowedLayouts}set allowedLayouts(e){this.viewModel.allowedLayouts=e}get error(){return this.viewModel.error}get extraParameters(){return this.viewModel.extraParameters}set extraParameters(e){this.viewModel.extraParameters=e}get includeDefaultTemplates(){return this.viewModel.includeDefaultTemplates}set includeDefaultTemplates(e){this.viewModel.includeDefaultTemplates=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get portal(){return this.viewModel.portal}set portal(e){this.viewModel.portal=e}get printServiceUrl(){return this.viewModel.printServiceUrl}set printServiceUrl(e){this.viewModel.printServiceUrl=e}get templateCustomTextElements(){return this.viewModel.templateCustomTextElements}set templateCustomTextElements(e){this.viewModel.templateCustomTextElements=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const{attributionEnabled:e,author:t,copyright:i,dpi:a,format:n,height:s,layout:o,legendEnabled:l,northArrowEnabled:r,scaleEnabled:d,scale:p,width:c}=this.templateOptions,u="ready"!==this.viewModel?.state,h=this.renderTitleOrFileNameSection(),{includeDefaultTemplates:m,messages:_,viewModel:b}=this,g=this.viewModel?.templatesInfo?.format?.choiceList||[],y=g.length>0?g.map((e=>w("option",{key:e,selected:e===n,value:e},e.toUpperCase()))):w("option",{key:"format-default-option"},_.formatDefaultOption),f=w("div",{class:I.formSectionContainer},w("label",null,_.fileFormatTitle,w("select",{class:I.select,onchange:this._updateFromOption,"data-target-property":"format",bind:this},y))),T=this.viewModel?.templatesInfo?.layout?.choiceList,O=T?.length?T.map((e=>w("option",{key:e,selected:e===o,value:e},_[e]||e))):w("option",{key:"layout-default-option"},_.layoutDefaultOption),x=w("div",{class:I.formSectionContainer},w("label",null,_.layoutTitle,w("select",{class:I.select,onchange:this._updateFromOption,"data-target-property":"layout",bind:this},O))),L=w("div",{class:I.formSectionContainer},w("label",null,_.dpi,w("input",{type:"number",class:this.classes(I.inputText,I.input),"data-input-name":"dpi",onchange:this._handleDPIChange,value:`${a}`,min:"1",tabIndex:0,bind:this}))),k=w("div",{class:this.classes(I.scaleInfoContainer,I.formSectionContainer)},w("label",null,w("input",{"data-option-name":"scaleEnabled",checked:d,type:"checkbox",tabIndex:0,onchange:this._toggleInputValue,bind:this}),_.scale),w("div",{class:I.scaleInputContainer},w("input",{"aria-label":_.scaleLabel,"aria-valuenow":`${p}`,role:"spinbutton",type:"number",class:this.classes(I.inputText,I.input,I.scaleInput),tabIndex:0,"data-input-name":"scale",onchange:this._updateInputValue,disabled:!d,value:`${p}`,bind:this}),w("button",{type:"button","aria-label":_.reset,class:this.classes(I.widgetButton,I.refreshButton,I.iconRefresh),tabIndex:0,onclick:this._resetToCurrentScale,bind:this}))),S=this._advancedOptionsVisibleForLayout?w("div",{"aria-labelledby":`${this.id}__advancedOptionsForLayout`,class:I.advancedOptionsContainer},k,w("div",{class:this.classes(I.authorInfoContainer,I.formSectionContainer)},w("label",null,_.author,w("input",{type:"text",value:t??"",class:this.classes(I.inputText,I.input),tabIndex:0,"data-input-name":"author",onchange:this._updateInputValue,bind:this}))),w("div",{class:this.classes(I.copyrightInfoContainer,I.formSectionContainer)},w("label",null,_.copyright,w("input",{type:"text",class:this.classes(I.inputText,I.input),tabIndex:0,value:i??"","data-input-name":"copyright",onchange:this._updateInputValue,bind:this}))),L,w("div",{class:this.classes(I.legendInfoContainer,I.formSectionContainer)},w("label",null,w("input",{type:"checkbox","data-option-name":"legendEnabled",tabIndex:0,checked:l,onchange:this._toggleInputValue,bind:this}),_.legend)),this.viewModel.templateToNorthArrowInfo[o]?w("div",{class:this.classes(I.legendInfoContainer,I.formSectionContainer),key:"north-arrow"},w("label",null,w("input",{type:"checkbox","data-option-name":"northArrowEnabled",tabIndex:0,checked:r,onchange:this._toggleInputValue,bind:this}),_.northArrow)):null,this.renderCustomTextElementSection()):null,$=this._advancedOptionsVisibleForMapOnly?w("div",{"aria-labelledby":`${this.id}__advancedOptionsForMapOnly`,class:I.advancedOptionsContainer},k,L,w("div",{class:I.formSectionContainer},w("label",null,w("input",{"data-option-name":"attributionEnabled",type:"checkbox",onchange:this._toggleInputValue,tabIndex:0,checked:e,bind:this}),_.attribution)),this.renderCustomTextElementSection()):null,M=this._layoutTabSelected?w("section",{key:"esri-print__layoutContent",id:`${this.id}__layoutContent`,"aria-labelledby":`${this.id}__layoutTab`,class:I.layoutSection,role:"tabpanel"},w("div",{class:I.panelContainer},h,x,this._layoutTabSelected?f:null),w("div",{class:this.classes(I.panelContainer,I.advancedOptionsSection)},w("button",{"aria-label":_.advancedOptions,"aria-expanded":this._advancedOptionsVisibleForLayout?"true":"false",class:I.advancedOptionsButton,onclick:this._showAdvancedOptions,bind:this,type:"button"},w("div",{class:I.advancedOptionsButtonContainer},w("span",{"aria-hidden":"true",class:this.classes(I.iconRightTriangleArrow,I.advancedOptionsButtonIconClosed)}),w("span",{"aria-hidden":"true",class:this.classes(I.iconLeftTriangleArrow,I.advancedOptionsButtonIconClosed_RTL)}),w("span",{"aria-hidden":"true",class:this.classes(I.iconDownArrow,I.advancedOptionsButtonIconOpened)}),w("span",{class:I.advancedOptionsButtonTitle},_.advancedOptions))),S)):w("section",{key:"esri-print__mapOnlyContent",id:`${this.id}__mapOnlyContent`,"aria-labelledby":`${this.id}__mapOnlyTab`,class:I.mapOnlySection,role:"tabpanel"},w("div",{class:I.panelContainer},h,this._layoutTabSelected?null:f,w("div",{class:this.classes(I.sizeContainer,I.formSectionContainer)},w("div",{class:I.widthContainer},w("label",null,_.width,w("input",{type:"number",class:this.classes(I.inputText,I.input),"data-input-name":"width",onchange:this._updateInputValue,value:`${c}`,tabIndex:0,bind:this}))),w("div",{class:I.heightContainer},w("label",null,_.height,w("input",{type:"number",class:this.classes(I.inputText,I.input),"data-input-name":"height",onchange:this._updateInputValue,value:`${s}`,tabIndex:0,bind:this}))),w("button",{type:"button","aria-label":_.swap,class:this.classes(I.widgetButton,I.swapButton,I.iconSwap),onclick:this._switchInput,tabIndex:0,bind:this})),w("div",{class:this.classes(I.panelContainer,I.advancedOptionsSection)},w("button",{"aria-label":_.advancedOptions,"aria-expanded":this._advancedOptionsVisibleForMapOnly?"true":"false",type:"button",class:I.advancedOptionsButton,onclick:this._showAdvancedOptions,bind:this},w("div",{class:I.advancedOptionsButtonContainer},w("span",{"aria-hidden":"true",class:this.classes(I.iconRightTriangleArrow,I.advancedOptionsButtonIconClosed)}),w("span",{"aria-hidden":"true",class:this.classes(I.iconLeftTriangleArrow,I.advancedOptionsButtonIconClosed_RTL)}),w("span",{"aria-hidden":"true",class:this.classes(I.iconDownArrow,I.advancedOptionsButtonIconOpened)}),w("span",{class:I.advancedOptionsButtonTitle},_.advancedOptions))),$))),F=this.exportedLinks.toArray(),E=this._renderExportedLink(F),P={[I.buttonDisabled]:u||!o&&!n},{view:A}=this,V=!A||"2d"!==A.type,B=w("div",{class:I.panelError},V?_.sceneViewError:_.serviceError),D=w("div",null,w("ul",{class:I.layoutTabList,role:"tablist",onclick:this._toggleLayoutPanel,onkeydown:this._handleLayoutPanelKeyDown,bind:this},w("li",{afterCreate:this._focusOnTabChange,afterUpdate:this._focusOnTabChange,id:`${this.id}__layoutTab`,"data-tab-id":C.layout,class:I.layoutTab,role:"tab",tabIndex:0,"aria-selected":`${this._layoutTabSelected}`},_.layoutTab),w("li",{afterCreate:this._focusOnTabChange,afterUpdate:this._focusOnTabChange,id:`${this.id}__mapOnlyTab`,"data-tab-id":C.mapOnly,class:I.layoutTab,role:"tab",tabIndex:0,"aria-selected":`${!this._layoutTabSelected}`},_.mapOnlyTab)),M,w("button",{"aria-label":_.exportDescription,type:"button",class:this.classes(I.printButton,I.button,P),disabled:u,tabIndex:0,onclick:this._handlePrintMap,bind:this},_.export),m&&b.defaultTemplates.length>0?this.renderTemplateSectionTrigger():null,w("div",{class:I.exportedFilesContainer,afterUpdate:this._scrollExportIntoView,bind:this},w(v,{class:I.exportedFilesTitle,level:this.headingLevel},_.exportText),F.length>0?null:w("div",null,w("div",null,_.exportHint)),E)),N=w("div",{class:I.printWidgetContainer},w("header",{class:I.headerTitle},_.export),this.error||V||!this.view?B:D),R="initializing"===this.viewModel?.state?this._renderLoader():N;return w("div",{afterCreate:this._handleRootAfterCreate,bind:this,class:this.classes(I.base,I.widget,I.panel)},R)}renderTemplateSectionTrigger(){const{messages:e,_templateListPopover:t}=this,i=t.open;return w("button",{afterCreate:e=>this._selectTemplateNode=e,"aria-controls":i?`${this.id}__template-selection`:"","aria-label":e.selectTemplateDescription,"aria-pressed":i.toString(),class:this.classes(I.button,I.buttonTertiary,I.templateButton),onclick:this.handleSelectTemplateClick,title:e.selectTemplateDescription,type:"button"},e.selectTemplate)}renderCustomTextElementSection(){const{templateOptions:{customTextElements:e}}=this;return e?w("div",{class:I.formSectionContainer,key:"custom-text-elements"},e.map((e=>{const[t,i]=Object.entries(e)[0];return"date"===t?null:w("label",{key:t},t,w("input",{bind:this,class:this.classes(I.inputText,I.input),"data-input-custom":!0,"data-input-name":t,onchange:this._updateInputValue,type:"text",value:i}))}))):null}renderTemplateList(){const{messages:e,messagesCommon:t,viewModel:i}=this,{defaultTemplates:a}=i,n=e.selectTemplateDescription,s=`${this.id}__template-selection`;return w("div",{class:this.classes(I.templateList,I.widget,I.panel),id:s},w(v,{class:I.menuHeader,level:this.headingLevel},e.selectTemplate),w("div",{class:I.templateListScroller},w("ul",{afterCreate:this.handleTemplateListCreation,"aria-activedescendant":`${this.id}__template-item--${this._focusedTemplateIndex}`,"aria-label":n,class:I.menuList,key:"templates",onblur:this.handleTemplateChildBlur,onclick:this.handleTemplateListClick,onkeydown:this.handleTemplateListKeyDown,role:"listbox",tabIndex:0,title:n},a.toArray().map(((t,i)=>{const a=i===this._focusedTemplateIndex,n=t.description??"",s=t.label??"";return w("li",{"aria-label":n,class:this.classes(I.menuItem,{[I.menuItemFocus]:a}),"data-template":t,id:`${this.id}__template-item--${i}`,key:s,title:n},E(s)?e.mapOnlyTab:s)})))),w("div",{class:I.templateListFooter},w("button",{type:"button",class:this.classes(I.button,I.buttonSecondary),onblur:this.handleTemplateChildBlur,onclick:this.handleCloseTemplateSelection},t.done)))}applyTemplate(e){const{format:t,layout:i,layoutOptions:a}=e,{templateOptions:n}=this;this._templateListPopover.open=!1,this._toggleTab("map-only"===i?C.mapOnly:C.layout,!1),t&&(n.format=t),i&&(n.layout=i),this._focusedTemplateIndex=null,n.legendEnabled=a?.legend??n.legendEnabled,this.handleCloseTemplateSelection()}renderTitleOrFileNameSection(){const{templateOptions:e,messages:t}=this;let i,a,n,s;return this._layoutTabSelected?(i=t.title,a=t.titlePlaceHolder,n=e.title,s="title"):(i=t.fileName,a=t.fileNamePlaceHolder,n=e.fileName,s="fileName"),w("div",{class:I.formSectionContainer,key:s},w("label",null,i,w("input",{type:"text",tabIndex:0,placeholder:a,class:this.classes(I.inputText,I.input),value:n??"","data-input-name":s,onchange:this._updateInputValue,bind:this})))}_handleRootAfterCreate(e){this._rootNode=e,this.addHandles(i(e,"scroll",(()=>{this._templateListPopover.open&&this.handleCloseTemplateSelection()})))}_focusOnTabChange(e){if(!this._activeTabFocusRequested)return;const t=e.getAttribute("data-tab-id");("layoutTab"===t&&this._layoutTabSelected||"mapOnlyTab"===t&&!this._layoutTabSelected)&&(e.focus(),this._activeTabFocusRequested=!1)}_renderLoader(){const e={[I.loader]:this._awaitingServerResponse};return w("div",{class:this.classes(e),key:"loader"})}_createFileLink(e,t){const i=t||this.messages.untitled,a=e.format.toLowerCase(),n=a.includes("png")?"png":a,s=i+n;return void 0!==this._exportedFileNameMap[s]?this._exportedFileNameMap[s]++:this._exportedFileNameMap[s]=0,new m({name:i,extension:n,count:this._exportedFileNameMap[s]})}_resetToCurrentScale(){this.templateOptions.scale=this.viewModel.view?.scale}_updateCustomTextElementValue(e,t,i){e.find((e=>{const[i]=Object.entries(e)[0];return i===t}))[t]=i}_updateInputValue(e){const t=e.target,i=t.getAttribute("data-input-name"),a=!!t["data-input-custom"],{templateOptions:n}=this;if(a)return void this._updateCustomTextElementValue(n.customTextElements,i,t.value);let s;if("number"===t.type){if(!F(t.valueAsNumber)){const e=n[i];return void(t.value=`${e}`)}s=t.valueAsNumber}else s=t.value;n[i]=s}_handleDPIChange(e){this._updateInputValue(e);const t=e.currentTarget.valueAsNumber,{height:i,width:a}=M(t),{templateOptions:n}=this;n.height=i,n.width=a}_handlePrintMap(){this._pendingExportScroll=!0;const{templateOptions:e}=this,t=this.viewModel.toPrintTemplate(e),i=this._layoutTabSelected?t.layoutOptions?.titleText:e.fileName,a=this._createFileLink(t,i);this.exportedLinks.add(a),this.emit("submit",{link:a}),this.viewModel.print(t).then((e=>{a.set({url:e&&e.url,state:"ready"})})).catch((e=>{a.set({error:e,state:"error"})})).then((()=>{this.emit("complete",{link:a}),this.scheduleRender()}))}_updateFromOption(e){const t=e.target,i=t.selectedOptions?t.selectedOptions.item(0)?.value:t.options[t.selectedIndex].value,a=t.getAttribute("data-target-property");this.templateOptions[a]=i}_switchInput(){[this.templateOptions.width,this.templateOptions.height]=[this.templateOptions.height,this.templateOptions.width]}_showAdvancedOptions(){this._layoutTabSelected?this._advancedOptionsVisibleForLayout=!this._advancedOptionsVisibleForLayout:this._advancedOptionsVisibleForMapOnly=!this._advancedOptionsVisibleForMapOnly}_scrollExportIntoView(){if(!this._pendingExportScroll)return;this._pendingExportScroll=!1;const e=this._rootNode;if(!e)return;const{clientHeight:t,scrollHeight:i}=e,a=i-t;a>0&&(e.scrollTop=a)}_toggleInputValue(e){const t=e.target,i=t.getAttribute("data-option-name");this.templateOptions[i]=t.checked,"scaleEnabled"===i&&(this.templateOptions[i]||this._resetToCurrentScale())}_renderExportedLink(e){const t=this.messages;return e.map((e=>{const{error:i,url:a,state:n}=e,s=e.formattedName??"",o="error"===n,l="pending"===n,p="ready"===n,c={[I.anchorDisabled]:l||o};let u=a||null;u&&(u=r(u));const h=d(a,location.href),m={[I.iconSpinner]:l,[I.rotate]:l,[I.iconDownload]:h&&p,[I.iconLaunchLink]:!h&&p,[I.iconError]:o,[I.exportedFileError]:o},_={[I.exportedFileError]:o};let b;b=l?t.pending:p?t.ready:t.errorMessage;const v=o?"print-task:cim-symbol-unsupported"===i?.name?t.exportWebMapCIMError:t.exportWebMapError:"";return w("div",{"aria-label":b,class:I.exportedFile,"data-item":e,key:s,onclick:this._removeLink,title:v},w("a",{"aria-label":`${s}. ${t.linkReady}`,download:s,href:u??"",rel:"noreferrer",tabIndex:0,target:"_blank",class:this.classes(I.exportedFileLink,c),onclick:this._handleLinkClick},w("span",{class:this.classes(m)}),w("span",{class:this.classes(I.exportedFileLinkTitle,_)},s)))}))}_toggleLayoutPanel(e){const t=e.target;this._toggleTab(t.getAttribute("data-tab-id"))}_toggleTab(e,t=!0){if(this._layoutTabSelected=e===C.layout,this._layoutTabSelected){const e=this.viewModel?.templatesInfo?.layout?.choiceList;this.templateOptions.layout=e?e[0]:"letter-ansi-a-landscape"}else this.templateOptions.layout=x;t&&(this._activeTabFocusRequested=!0)}_handleLayoutPanelKeyDown(e){const t=a(e),i=e.target.getAttribute("data-tab-id");if(y(t))return this._toggleTab(i),e.preventDefault(),void e.stopPropagation();"ArrowLeft"!==t&&"ArrowRight"!==t||(this._toggleTab(i===C.layout?C.mapOnly:C.layout),e.preventDefault(),e.stopPropagation())}};function A(e){return e?.["data-template"]}e([p()],P.prototype,"allowedFormats",null),e([p()],P.prototype,"allowedLayouts",null),e([p()],P.prototype,"error",null),e([p({type:O})],P.prototype,"exportedLinks",void 0),e([p()],P.prototype,"extraParameters",null),e([p()],P.prototype,"headingLevel",void 0),e([p()],P.prototype,"iconClass",void 0),e([p()],P.prototype,"icon",void 0),e([p()],P.prototype,"includeDefaultTemplates",null),e([p()],P.prototype,"label",null),e([p(),T("esri/widgets/Print/t9n/Print")],P.prototype,"messages",void 0),e([p(),T("esri/t9n/common")],P.prototype,"messagesCommon",void 0),e([p()],P.prototype,"portal",null),e([p()],P.prototype,"printServiceUrl",null),e([p()],P.prototype,"templateCustomTextElements",null),e([p({type:b})],P.prototype,"templateOptions",void 0),e([p()],P.prototype,"view",null),e([p({type:_})],P.prototype,"viewModel",void 0),P=e([c("esri.widgets.Print")],P);const V=P;export{V as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as
|
|
5
|
+
import{_ as o}from"../../chunks/tslib.es6.js";import e from"../../core/Accessor.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";let r=class extends e{get canZoomIn(){const o=this.view?.ready;if(!o)return!1;const e=this.view?.constraints?.effectiveMaxScale;return 0===e||this._scale>e}get canZoomOut(){const{view:o}=this,e=o?.ready;if(!e)return!1;const t=o.constraints?.effectiveMinScale;return 0===t||this._scale<t}get _scale(){const o=this.view?.animation?.target;return(o&&"then"in o?void 0:o?.scale)??this.view?.scale??0}};o([t({readOnly:!0})],r.prototype,"canZoomIn",null),o([t({readOnly:!0})],r.prototype,"canZoomOut",null),o([t()],r.prototype,"view",void 0),o([t()],r.prototype,"_scale",null),r=o([s("esri.widgets.Zoom.ZoomConditions2D")],r);const c=r;export{c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9971,5732],{92835:(e,t,r)=>{r.d(t,{Z:()=>f});var l,s=r(43697),i=r(96674),n=r(35463),o=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),p=r(30556);let c=l=class extends i.wq{static get allTime(){return h}static get empty(){return d}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?e.getTime():null}get isAllTime(){return this.equals(l.allTime)}get isEmpty(){return this.equals(l.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new l({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,r=null!=this.end?this.end.getTime():this.end,l=null!=e.start?e.start.getTime():e.start,s=null!=e.end?e.end.getTime():e.end;return t===l&&r===s}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();let t=this.start;t&&(t=(0,n.JE)(t,e));let r=this.end;if(r){const t=(0,n.JE)(r,e);r=r.getTime()===t.getTime()?t:(0,n.Nm)(t,1,e)}return new l({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return l.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,s=e.start?.getTime()??-1/0,i=e.end?.getTime()??1/0;let n,o;if(s>=t&&s<=r?n=s:t>=s&&t<=i&&(n=t),r>=s&&r<=i?o=r:i>=t&&i<=r&&(o=i),null!=n&&null!=o&&!isNaN(n)&&!isNaN(o)){const e=new l;return e.start=n===-1/0?null:new Date(n),e.end=o===1/0?null:new Date(o),e}return l.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new l,{start:s,end:i}=this;return null!=s&&(r.start=(0,n.Nm)(s,e,t)),null!=i&&(r.end=(0,n.Nm)(i,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.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 l({start:t,end:r})}};(0,s._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s._)([(0,a.r)("end")],c.prototype,"readEnd",null),(0,s._)([(0,p.c)("end")],c.prototype,"writeEnd",null),(0,s._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s._)([(0,a.r)("start")],c.prototype,"readStart",null),(0,s._)([(0,p.c)("start")],c.prototype,"writeStart",null),c=l=(0,s._)([(0,u.j)("esri.TimeExtent")],c);const h=new c,d=new c({start:void 0,end:void 0}),f=c},5732:(e,t,r)=>{r.d(t,{c:()=>l,g:()=>s});var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},35463:(e,t,r)=>{r.d(t,{JE:()=>n,Nm:()=>i,rJ:()=>o}),r(80442);const l={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},s={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function i(e,t,r){const l=new Date(e.getTime());if(t&&r){const e=s[r],{getter:i,setter:n,multiplier:o}=e;if("months"===r){const e=function(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}(l.getFullYear(),l.getMonth()+t);l.getDate()>e&&l.setDate(e)}l[n](l[i]()+t*o)}return l}function n(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function o(e,t,r){return 0===e?0:e*l[t]/l[r]}},16199:(e,t,r)=>{r.r(t),r.d(t,{default:()=>P});var l,s=r(43697),i=(r(66577),r(3172)),n=r(20102),o=r(16453),a=r(19153),u=r(17452),p=r(5600),c=(r(75215),r(67676),r(80442),r(71715)),h=r(52011),d=r(30556),f=r(87085),m=r(71612),g=r(38009),y=r(16859),w=r(34760),v=r(72965),b=r(90082),_=r(39450),T=r(11145),I=r(5833),C=r(6570),Z=r(82971),D=r(94139);let E=l=class extends((0,m.h)((0,w.Q)((0,v.M)((0,g.q)((0,y.I)((0,o.R)(f.Z))))))){constructor(...e){super(...e),this.copyright="",this.fullExtent=new C.Z(-20037508.342787,-20037508.34278,20037508.34278,20037508.342787,Z.Z.WebMercator),this.legendEnabled=!1,this.isReference=null,this.popupEnabled=!1,this.spatialReference=Z.Z.WebMercator,this.subDomains=null,this.tileInfo=new T.Z({size:[256,256],dpi:96,format:"png8",compressionQuality:0,origin:new D.Z({x:-20037508.342787,y:20037508.342787,spatialReference:Z.Z.WebMercator}),spatialReference:Z.Z.WebMercator,lods:[new _.Z({level:0,scale:591657527.591555,resolution:156543.033928}),new _.Z({level:1,scale:295828763.795777,resolution:78271.5169639999}),new _.Z({level:2,scale:147914381.897889,resolution:39135.7584820001}),new _.Z({level:3,scale:73957190.948944,resolution:19567.8792409999}),new _.Z({level:4,scale:36978595.474472,resolution:9783.93962049996}),new _.Z({level:5,scale:18489297.737236,resolution:4891.96981024998}),new _.Z({level:6,scale:9244648.868618,resolution:2445.98490512499}),new _.Z({level:7,scale:4622324.434309,resolution:1222.99245256249}),new _.Z({level:8,scale:2311162.217155,resolution:611.49622628138}),new _.Z({level:9,scale:1155581.108577,resolution:305.748113140558}),new _.Z({level:10,scale:577790.554289,resolution:152.874056570411}),new _.Z({level:11,scale:288895.277144,resolution:76.4370282850732}),new _.Z({level:12,scale:144447.638572,resolution:38.2185141425366}),new _.Z({level:13,scale:72223.819286,resolution:19.1092570712683}),new _.Z({level:14,scale:36111.909643,resolution:9.55462853563415}),new _.Z({level:15,scale:18055.954822,resolution:4.77731426794937}),new _.Z({level:16,scale:9027.977411,resolution:2.38865713397468}),new _.Z({level:17,scale:4513.988705,resolution:1.19432856685505}),new _.Z({level:18,scale:2256.994353,resolution:.597164283559817}),new _.Z({level:19,scale:1128.497176,resolution:.298582141647617}),new _.Z({level:20,scale:564.248588,resolution:.14929107082380833}),new _.Z({level:21,scale:282.124294,resolution:.07464553541190416}),new _.Z({level:22,scale:141.062147,resolution:.03732276770595208}),new _.Z({level:23,scale:70.5310735,resolution:.01866138385297604})]}),this.type="web-tile",this.urlTemplate=null,this.wmtsInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{urlTemplate:e,...t}:e}load(e){const t=this.loadFromPortal({supportedTypes:["WMTS"]},e).then((()=>{let e="";if(this.urlTemplate)if(this.spatialReference.equals(this.tileInfo.spatialReference)){const t=new u.R9(this.urlTemplate);!(this.subDomains&&this.subDomains.length>0)&&t.authority?.includes("{subDomain}")&&(e="is missing 'subDomains' property")}else e="spatialReference must match tileInfo.spatialReference";else e="is missing the required 'urlTemplate' property value";if(e)throw new n.Z("web-tile-layer:load",`WebTileLayer (title: '${this.title}', id: '${this.id}') ${e}`)}));return this.addResolvingPromise(t),Promise.resolve(this)}get levelValues(){const e=[];if(!this.tileInfo)return null;for(const t of this.tileInfo.lods)e[t.level]=t.levelValue||t.level;return e}readSpatialReference(e,t){return e||t.fullExtent?.spatialReference&&Z.Z.fromJSON(t.fullExtent.spatialReference)}get tileServers(){if(!this.urlTemplate)return null;const e=[],{urlTemplate:t,subDomains:r}=this,l=new u.R9(t),s=l.scheme?l.scheme+"://":"//",i=s+l.authority+"/",n=l.authority;if(n?.includes("{subDomain}")){if(r&&r.length>0&&n.split(".").length>1)for(const t of r)e.push(s+n.replaceAll(/\{subDomain\}/gi,t)+"/")}else e.push(i);return e.map((e=>("/"!==e.charAt(e.length-1)&&(e+="/"),e)))}get urlPath(){if(!this.urlTemplate)return null;const e=this.urlTemplate,t=new u.R9(e),r=(t.scheme?t.scheme+"://":"//")+t.authority+"/";return e.substring(r.length)}readUrlTemplate(e,t){return e||t.templateUrl}writeUrlTemplate(e,t){e&&(0,u.oC)(e)&&(e="https:"+e),e&&(e=e.replaceAll(/\{z\}/gi,"{level}").replaceAll(/\{x\}/gi,"{col}").replaceAll(/\{y\}/gi,"{row}"),e=(0,u.Fv)(e)),t.templateUrl=e}fetchTile(e,t,r,l={}){const{signal:s}=l,n=this.getTileUrl(e,t,r),o={responseType:"image",signal:s,query:{...this.refreshParameters}};return(0,i.default)(n,o).then((e=>e.data))}async fetchImageBitmapTile(e,t,r,s={}){const{signal:n}=s;if(this.fetchTile!==l.prototype.fetchTile){const l=await this.fetchTile(e,t,r,s);return(0,b.V)(l,e,t,r,n)}const o=this.getTileUrl(e,t,r),a={responseType:"blob",signal:n,query:{...this.refreshParameters}},{data:u}=await(0,i.default)(o,a);return(0,b.V)(u,e,t,r,n)}getTileUrl(e,t,r){const{levelValues:l,tileServers:s,urlPath:i}=this;if(!l||!s||!i)return"";const n=l[e];return s[t%s.length]+(0,a.gx)(i,{level:n,z:n,col:r,x:r,row:t,y:t})}};(0,s._)([(0,p.Cb)({type:String,value:"",json:{write:!0}})],E.prototype,"copyright",void 0),(0,s._)([(0,p.Cb)({type:C.Z,json:{write:!0},nonNullable:!0})],E.prototype,"fullExtent",void 0),(0,s._)([(0,p.Cb)({readOnly:!0,json:{read:!1,write:!1}})],E.prototype,"legendEnabled",void 0),(0,s._)([(0,p.Cb)({type:["show","hide"]})],E.prototype,"listMode",void 0),(0,s._)([(0,p.Cb)({json:{read:!0,write:!0}})],E.prototype,"blendMode",void 0),(0,s._)([(0,p.Cb)()],E.prototype,"levelValues",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],E.prototype,"isReference",void 0),(0,s._)([(0,p.Cb)({type:["WebTiledLayer"],value:"WebTiledLayer"})],E.prototype,"operationalLayerType",void 0),(0,s._)([(0,p.Cb)({readOnly:!0,json:{read:!1,write:!1}})],E.prototype,"popupEnabled",void 0),(0,s._)([(0,p.Cb)({type:Z.Z})],E.prototype,"spatialReference",void 0),(0,s._)([(0,c.r)("spatialReference",["spatialReference","fullExtent.spatialReference"])],E.prototype,"readSpatialReference",null),(0,s._)([(0,p.Cb)({type:[String],json:{write:!0}})],E.prototype,"subDomains",void 0),(0,s._)([(0,p.Cb)({type:T.Z,json:{write:!0}})],E.prototype,"tileInfo",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],E.prototype,"tileServers",null),(0,s._)([(0,p.Cb)({json:{read:!1}})],E.prototype,"type",void 0),(0,s._)([(0,p.Cb)()],E.prototype,"urlPath",null),(0,s._)([(0,p.Cb)({type:String,json:{origins:{"portal-item":{read:{source:"url"}}}}})],E.prototype,"urlTemplate",void 0),(0,s._)([(0,c.r)("urlTemplate",["urlTemplate","templateUrl"])],E.prototype,"readUrlTemplate",null),(0,s._)([(0,d.c)("urlTemplate",{templateUrl:{type:String}})],E.prototype,"writeUrlTemplate",null),(0,s._)([(0,p.Cb)({type:I.B,json:{write:!0}})],E.prototype,"wmtsInfo",void 0),E=l=(0,s._)([(0,h.j)("esri.layers.WebTileLayer")],E);const P=E},16859:(e,t,r)=>{r.d(t,{I:()=>_});var l=r(43697),s=r(68773),i=r(40330),n=r(3172),o=r(66643),a=r(20102),u=r(92604),p=r(95330),c=r(17452),h=r(5600),d=(r(75215),r(67676),r(80442),r(71715)),f=r(52011),m=r(30556),g=r(84230),y=r(48522),w=r(15235),v=r(86082),b=r(14661);const _=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=null,this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:l}=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await l({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.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,p.r9)(e),!0))))}async setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:l},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",l),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const l=e===r.id;if(l&&r.portal.user)return(0,b.Ss)(r);let s,n;if(l)s=r.portal.url;else try{s=await(0,g.oP)(this.url,t)}catch(e){(0,p.r9)(e)}if(!s||!(0,c.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(i.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.r9)(e)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(l?await r.reload():(r=new w.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,b.Ss)(r)}catch(e){(0,p.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,p.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?i.id?.findCredential(this.url):null;if(!t)return!0;const r=T.credential===t?T.user:await this._fetchEditingUser(e);return T.credential=t,T.user=r,null==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=i.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const l=`${r.owningSystemUrl}/sharing/rest`,s=y.Z.getDefault();if(s&&s.loaded&&(0,c.Fv)(s.restUrl)===(0,c.Fv)(l))return s.user;const a=`${l}/community/self`,u=null!=e?e.signal:null,p=await(0,o.q6)((0,n.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?v.default.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,l=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||y.Z.getDefault());return r&&l&&!(0,c.tm)(l.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,l._)([(0,h.Cb)({type:w.default})],t.prototype,"portalItem",null),(0,l._)([(0,d.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,l._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,l._)([(0,h.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,l._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,l._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,l._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,l._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},T={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>y});var l=r(43697),s=r(92604),i=r(95330),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),a=r(46791),u=(r(66643),r(20102),r(26258),r(87538));const p=new a.Z,c=new WeakMap;function h(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function d(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:d(t,e%t):0}let f=0,m=0;function g(){const e=Date.now();for(const t of p)t.refreshInterval&&e-(c.get(t)??0)+5>=6e4*t.refreshInterval&&(c.set(t,e),t.refresh(e))}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of p)t=d(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?c.get(r)||c.set(r,e):c.delete(r);if(t!==m){if(m=t,clearInterval(f),0===m)return void(f=0);f=setInterval(g,m)}}));const y=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,i.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){h(e)&&p.push(e)}(this)}),(()=>{}))}destroy(){h(this)&&p.includes(this)&&p.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,i.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,l._)([(0,n.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,l._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,l._)([(0,n.Cb)()],t.prototype,"refreshParameters",null),t=(0,l._)([(0,o.j)("esri.layers.mixins.RefreshableLayer")],t),t}},39450:(e,t,r)=>{r.d(t,{Z:()=>p});var l,s=r(43697),i=r(96674),n=r(5600),o=r(75215),a=(r(67676),r(80442),r(52011));let u=l=class extends i.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 l({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s._)([(0,n.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,s._)([(0,n.Cb)({type:o.z8,json:{write:!0}})],u.prototype,"level",void 0),(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,s._)([(0,n.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,s._)([(0,n.Cb)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,s._)([(0,n.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,s._)([(0,n.Cb)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=l=(0,s._)([(0,a.j)("esri.layers.support.LOD")],u);const p=u},11145:(e,t,r)=>{r.d(t,{Z:()=>C});var l,s=r(43697),i=r(35454),n=r(96674),o=r(67900),a=r(5600),u=r(75215),p=(r(67676),r(80442),r(71715)),c=r(52011),h=r(30556),d=r(94139),f=r(82971),m=r(24470),g=r(8744),y=r(40488),w=r(39450),v=r(43077);const b=new i.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 _=l=class extends n.wq{static create(e={}){const{resolutionFactor:t=1,scales:r,size:s=256,spatialReference:i=f.Z.WebMercator,numLODs:n=24}=e;if(!(0,g.JY)(i)){const e=[];if(r)for(let t=0;t<r.length;t++){const l=r[t];e.push(new w.Z({level:t,scale:l,resolution:l}))}else{let t=5e-4;for(let r=n-1;r>=0;r--)e.unshift(new w.Z({level:r,scale:t,resolution:t})),t*=2}return new l({dpi:96,lods:e,origin:new d.Z(0,0,i),size:[s,s],spatialReference:i})}const a=(0,g.C5)(i),u=e.origin?new d.Z({x:e.origin.x,y:e.origin.y,spatialReference:i}):new d.Z(a?{x:a.origin[0],y:a.origin[1],spatialReference:i}:{x:0,y:0,spatialReference:i}),p=1/(39.37*(0,o.c9)(i)*96),c=[];if(r)for(let e=0;e<r.length;e++){const t=r[e],l=t*p;c.push(new w.Z({level:e,scale:t,resolution:l}))}else{let e=(0,g.sT)(i)?512/s*591657527.5917094:256/s*591657527.591555;const r=Math.ceil(n/t);c.push(new w.Z({level:0,scale:e,resolution:e*p}));for(let l=1;l<r;l++){const r=e/2**t,s=r*p;c.push(new w.Z({level:l,scale:r,resolution:s})),e=r}}return new l({dpi:96,lods:c,origin:u,size:[s,s],spatialReference:i})}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 r=(0,g.C5)(e);return e.isWrappable&&!!r&&Math.abs(r.origin[0]-t.x)<=r.dx}return!1}readOrigin(e,t){return d.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,r=0;const l=[],s=this._levelToLOD={};e&&(t=-1/0,r=1/0,e.forEach((e=>{l.push(e.scale),t=e.scale>t?e.scale:t,r=e.scale<r?e.scale:r,s[e.level]=e}))),this._set("scales",l),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 r=Math.floor(e),l=r+1;return t[r]/(t[r]/t[l])**(e-r)}scaleToZoom(e){const t=this.scales,r=t.length-1;let l=0;for(;l<r;l++){const r=t[l],s=t[l+1];if(r<=e)return l;if(s===e)return l+1;if(r>e&&s<e)return l+Math.log(r/e)/Math.log(r/s)}return l}snapScale(e,t=.95){const r=this.scaleToZoom(e);return r%Math.floor(r)>=t?this.zoomToScale(Math.ceil(r)):this.zoomToScale(Math.floor(r))}tileAt(e,t,r,l){const s=this.lodAt(e);if(!s)return null;let i,n;if("number"==typeof t)i=t,n=r;else if((0,g.fS)(t.spatialReference,this.spatialReference))i=t.x,n=t.y,l=r;else{const e=(0,y.iV)(t,this.spatialReference);if(null==e)return null;i=e.x,n=e.y,l=r}const o=s.resolution*this.size[0],a=s.resolution*this.size[1];return l||(l=new v.f(null,0,0,0,(0,m.Ue)())),l.level=e,l.row=Math.floor((this.origin.y-n)/a+.001),l.col=Math.floor((i-this.origin.x)/o+.001),this.updateTileInfo(l),l}updateTileInfo(e,t=l.ExtrapolateOptions.NONE){let r=this.lodAt(e.level);if(!r&&t===l.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(r=t)}if(!r)return;const s=e.level-r.level,i=r.resolution*this.size[0]/2**s,n=r.resolution*this.size[1]/2**s;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,m.Ue)()),e.extent[0]=this.origin.x+e.col*i,e.extent[1]=this.origin.y-(e.row+1)*n,e.extent[2]=e.extent[0]+i,e.extent[3]=e.extent[1]+n}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 r=this.lodAt(t.level);if(null==r)return null;const{resolution:l}=r,s=l*this.size[0],i=l*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*i,e[2]=e[0]+s,e[3]=e[1]+i,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return l.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const r=[],s=this.lods.length;for(let e=0;e<s;e++){const l=this.lods[e],s=l.resolution*t;r.push(new w.Z({level:l.level,scale:l.scale,resolution:s}))}return new l({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:r})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let r=0;r<e.length;r++){const l=e[r];this._upsampleLevels[l.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/l.resolution:0},t=l}}};var T,I;(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],_.prototype,"compressionQuality",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],_.prototype,"dpi",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:b.read,write:b.write,origins:{"web-scene":{read:!1,write:!1}}}})],_.prototype,"format",void 0),(0,s._)([(0,a.Cb)({readOnly:!0})],_.prototype,"isWrappable",null),(0,s._)([(0,a.Cb)({type:d.Z,json:{write:!0}})],_.prototype,"origin",void 0),(0,s._)([(0,p.r)("origin")],_.prototype,"readOrigin",null),(0,s._)([(0,a.Cb)({type:[w.Z],value:null,json:{write:!0}})],_.prototype,"lods",null),(0,s._)([(0,a.Cb)({readOnly:!0})],_.prototype,"scales",void 0),(0,s._)([(0,a.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],_.prototype,"size",void 0),(0,s._)([(0,p.r)("size",["rows","cols"])],_.prototype,"readSize",null),(0,s._)([(0,h.c)("size",{cols:{type:u.z8},rows:{type:u.z8}})],_.prototype,"writeSize",null),(0,s._)([(0,a.Cb)({type:f.Z,json:{write:!0}})],_.prototype,"spatialReference",void 0),_=l=(0,s._)([(0,c.j)("esri.layers.support.TileInfo")],_),(I=(T=_||(_={})).ExtrapolateOptions||(T.ExtrapolateOptions={}))[I.NONE=0]="NONE",I[I.POWER_OF_TWO=1]="POWER_OF_TWO";const C=_},43077:(e,t,r)=>{r.d(t,{f:()=>l});class l{constructor(e,t,r,l,s=void 0){this.id=e,this.level=t,this.row=r,this.col=l,this.extent=s}}},5833:(e,t,r)=>{r.d(t,{B:()=>u});var l,s=r(43697),i=r(96674),n=r(22974),o=r(5600),a=(r(75215),r(52011));let u=l=class extends i.wq{constructor(e){super(e)}clone(){return new l({customLayerParameters:(0,n.d9)(this.customLayerParameters),customParameters:(0,n.d9)(this.customParameters),layerIdentifier:this.layerIdentifier,tileMatrixSet:this.tileMatrixSet,url:this.url})}};(0,s._)([(0,o.Cb)({json:{type:Object,write:!0}})],u.prototype,"customLayerParameters",void 0),(0,s._)([(0,o.Cb)({json:{type:Object,write:!0}})],u.prototype,"customParameters",void 0),(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"layerIdentifier",void 0),(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"tileMatrixSet",void 0),(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"url",void 0),u=l=(0,s._)([(0,a.j)("esri.layer.support.WMTSLayerInfo")],u)},90082:(e,t,r)=>{r.d(t,{V:()=>n,g:()=>i});var l=r(20102),s=r(95330);async function i(e,t,r){let i;try{i=await createImageBitmap(e)}catch(e){throw new l.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.k_)(r),i}async function n(e,t,r,i,n){let o;try{o=await createImageBitmap(e)}catch(e){throw new l.Z("request:server",`Unable to load tile ${t}/${r}/${i}`,{error:e,level:t,row:r,col:i})}return(0,s.k_)(n),o}}}]);
|