@arcgis/core 4.28.0-next.20230923 → 4.28.0-next.20230925

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.
@@ -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={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:!0,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 extends h.s{constructor(e,t){super(),this.propertyName=e,this.metadata=t,this._accessed=null,this._handles=null,this.flags=0,this.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.flags&y.v.Dirty&&this.onCommitted(),super.destroy(),this._accessed=null,this._clearObservationHandles()}getComputed(e){(0,g.it)(this);const t=e.store,r=this.propertyName,n=this.flags,s=t.get(r);if(n&y.v.Computing)return s;if(~n&y.v.Dirty&&t.has(r))return s;this.flags|=y.v.Computing;const o=e.host;let i;n&y.v.AutoTracked?i=(0,g.LJ)(this,this.metadata.get,o):((0,g.GF)(o,this),i=this.metadata.get.call(o)),t.set(r,i,p.s3.COMPUTED);const a=t.get(r);return a===s?this.flags&=~y.v.Dirty:(0,g.gb)(this.commit,this),this.flags&=~y.v.Computing,a}onObservableAccessed(e){if(e===this)return;let t=this._accessed;if(null==t)t=[],this._accessed=t;else if(t.includes(e))return;t.push(e)}onTrackingEnd(){this._clearObservationHandles(),this.flags|=y.v.DepTrackingInitialized;const e=this._accessed;if(null==e||0===e.length)return;let t=this._handles;null==t&&(t=[],this._handles=t);for(let r=0;r<e.length;++r)t.push(e[r].observe(this));e.length=0}notifyChange(){this.onInvalidated(),this.onCommitted()}invalidate(){this.onInvalidated()}commit(){this.flags&=~y.v.Dirty,this.onCommitted()}_clearObservationHandles(){const e=this._handles;if(null!==e){for(let t=0;t<e.length;++t)e[t].remove();e.length=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()}}}class m{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const t=new m;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 v(e,t,r,n){return!(void 0===e||null==r&&e.flags&y.v.NonNullable&&(n.lifecycle,d.F.INITIALIZING,1))}function w(e){return e&&"function"==typeof e.destroy}o.Z.getLogger("esri.core.accessorSupport.Properties");class O{constructor(e){this.host=e,this.propertiesByName=new Map,this.ctorArgs=null,this.destroyed=!1,this.lifecycle=d.F.INITIALIZING,this.store=new m,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&&w(r)&&(r.destroy(),~t.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);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.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.flags&y.v.Overriden)}clearOverride(e){const t=this.propertiesByName.get(e);t&&t.flags&y.v.Overriden&&(t.flags&=~y.v.Overriden,t.notifyChange())}override(e,t){const r=this.propertiesByName.get(e);if(!v(r,0,t,this))return;const n=r.metadata.cast;if(n){const e=this._cast(n,t),{valid:r,value:s}=e;if(A.release(e),!r)return;t=s}r.flags|=y.v.Overriden,this._internalSet(r,t)}set(e,t){const r=this.propertiesByName.get(e);if(!v(r,0,t,this))return;const n=r.metadata.cast;if(n){const e=this._cast(n,t),{valid:r,value:s}=e;if(A.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.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=A.acquire();return r.valid=!0,r.value=t,e&&(r.value=e.call(this.host,t,r)),r}}const A=new f.Z(class{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}});var S=r(37697);var k;!function(e){e[e.Ignore=0]="Ignore",e[e.Destroy=1]="Destroy",e[e.ThrowError=2]="ThrowError"}(k||(k={}));var T,E,N=r(26258),j=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,j.Cb)(r)(o.prototype,e)}return(0,C.j)(r)(o)}constructor(...e){if(this[T]=null,this[E]=!1,this.constructor===x)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const t=new O(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:t}),e.length>0&&this.normalizeCtorArgs&&(t.ctorArgs=this.normalizeCtorArgs.apply(this,e)),$.register(this,new WeakRef(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.l](){this[M]=(0,i.SC)(this[M])}destroy(){this.destroyed||($.unregister(this),(0,N.BT)(this),this.__accessor__.destroy())}[Symbol.dispose](){this.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(this),"`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,S.t)(this,e,t),this}watch(e,t,r){return(0,N.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,E=I;const $=new FinalizationRegistry((e=>{const t=e.deref();if(t)for(const e of t.values())e.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,{l:()=>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=>{e??="esri.core.Accessor",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.l];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);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:()=>v,N7:()=>E,TJ:()=>y,V5:()=>j,Zs:()=>c,di:()=>S,gB:()=>k,i$:()=>T,q9:()=>l,rY:()=>w,sY:()=>P,se:()=>_,vU:()=>u,z8:()=>N}),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 _(e,t){const r=function(e){switch(e){case Number:return l;case N: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 v(e,t,r){return 1===arguments.length?v.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?v((t=>_(e,t))):v((t=>_(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=>_(e,t)),t):A((t=>_(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 E(e,t){if(2===arguments.length)return E(e).call(null,t);const r={},n=[],s=[];for(const t in e.typeMap){const o=e.typeMap[t];r[t]=_(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 N{}const j={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 _(e.value);case"array":return v(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 N: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,-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 N: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(-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:()=>_,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){if(t.flags&o.v.DepTrackingInitialized)return;const r=f;f=!1,t.flags&o.v.AutoTracked?p(t,t.metadata.get,e):_(e,t),f=r}const m=[];function _(e,t){t.flags&o.v.ExplicitlyTracking||(t.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=v(n,r[t],t!==r.length-1)}else v(e,t,!1)})),t.flags&=~o.v.ExplicitlyTracking)}function v(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),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 _(e){b.delete(e),b.add(e),m||(m=(0,u.Os)(O))}function v(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;v(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),_(o))}));return(0,s.kB)((()=>{a.remove(),o&&(o.uid!==i||o.removed||(o.removed=!0,_(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),_(n))}));return(0,s.kB)((()=>{i.remove(),n&&(n.uid!==o||n.removed||(n.removed=!0,_(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(l.layerContainerTypes&&u?.layerContainerType&&!l.layerContainerTypes.includes(u.layerContainerType))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,wR:()=>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},43090:(e,t,r)=>{"use strict";function n(e){return 32+e.length}function s(){return 16}function o(e){if(!e)return 0;let t=l;for(const r in e)if(e.hasOwnProperty(r)){const s=e[r];switch(typeof s){case"string":t+=n(s);break;case"number":t+=16;break;case"boolean":t+=4}}return t}function i(e){if(!e)return 0;if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return 32+8*t;let r=u;for(let n=0;n<t;n++)r+=a(e[n]);return r}(e);let t=l;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e){switch(typeof e){case"object":return i(e);case"string":return n(e);case"number":return 16;case"boolean":return 4;default:return 8}}function c(e,t){return u+e.length*t}r.d(t,{G3:()=>s,Ul:()=>i,do:()=>c,f2:()=>o});const l=32,u=32},60235:(e,t,r)=>{"use strict";r.d(t,{Mr:()=>a,XV:()=>i});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("big-integer-warning-enabled",!0),s.add("esri-deprecation-warnings",!0),s.add("esri-tests-disable-screenshots",!1),s.add("esri-tests-use-full-window",!1),s.add("esri-tests-post-to-influx",!0),(()=>{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-performance-mode-frames-between-render",20),s.add("esri-force-performance-mode",!1),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:()=>N,Ds:()=>E,as:()=>v,WW:()=>w,R8:()=>_,D_:()=>m,Hc:()=>d,y8:()=>k,fu:()=>g,$F:()=>y,r9:()=>h,k_:()=>u,H9:()=>p,Yn:()=>j,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 _(e){try{return await e}catch(e){if(!m(e))throw e;return}}async function v(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e),r=t.map((t=>e[t])),n=await v(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 v(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 E(e,t=-1){let r,n,s,o,i=null;const a=(...c)=>{if(r){n=c,o&&o.reject(l()),o=N();const e=o.promise;if(i){const e=i;i=null,e.abort()}return e}if(s=o||N(),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 N(){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 j(e){await Promise.resolve(),u(e)}},1654:(e,t,r)=>{"use strict";r.d(t,{MU:()=>_,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)))})),v[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 _(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 v=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 t?e.replaceAll(s,"object"==typeof t?(e,r)=>o((0,n.hS)(r,t)):(e,r)=>o(t(r))):e}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}function s(e){return 1e3*e}function o(e){return e}r.d(t,{HA:()=>n,_H:()=>o,up:()=>s})},1533:(e,t,r)=>{"use strict";r.d(t,{B3:()=>m,Hx:()=>u,KZ:()=>a,Op:()=>v,Q7:()=>_,Uc:()=>l,W0:()=>o,Xw:()=>g,ZY:()=>f,c8:()=>b,eP:()=>s,fS:()=>h,kJ:()=>p,lq:()=>i,xZ:()=>d,z3:()=>c});var n=r(43090);function s(e){return e instanceof ArrayBuffer}function o(e){return"Int8Array"===e?.constructor?.name}function i(e){return"Uint8Array"===e?.constructor?.name}function a(e){return"Uint8ClampedArray"===e?.constructor?.name}function c(e){return"Int16Array"===e?.constructor?.name}function l(e){return"Uint16Array"===e?.constructor?.name}function u(e){return"Int32Array"===e?.constructor?.name}function f(e){return"Uint32Array"===e?.constructor?.name}function d(e){return"Float32Array"===e?.constructor?.name}function h(e){return"Float64Array"===e?.constructor?.name}function p(e){return!("buffer"in e)}function g(...e){return e.reduce(((e,t)=>e+(t?p(t)?(0,n.do)(t,(0,n.G3)()):t.byteLength+y:0)),0)}r(80442);const y=145,b=1024;function m(e){return h(e)||d(e)||u(e)||c(e)||o(e)}function _(e){return h(e)||d(e)}function v(e){return h(e)?179769e303:d(e)?3402823e32:f(e)?4294967295:l(e)?65535:i(e)||a(e)?255:u(e)?2147483647:c(e)?32767:o(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:()=>ce,AH:()=>Q,B7:()=>j,D6:()=>z,Fv:()=>Z,HK:()=>Y,Hu:()=>me,IR:()=>Ae,Ie:()=>ye,L:()=>T,Ml:()=>we,P$:()=>G,PF:()=>W,Qj:()=>ge,R9:()=>w,TI:()=>k,YP:()=>V,Yd:()=>de,ZN:()=>_e,Zo:()=>R,_l:()=>re,b7:()=>C,ed:()=>U,fZ:()=>Oe,fl:()=>ve,fw:()=>se,gi:()=>ne,hF:()=>q,hO:()=>le,io:()=>oe,jc:()=>K,kl:()=>F,mN:()=>E,oC:()=>ie,oh:()=>B,qg:()=>P,rS:()=>X,sJ:()=>te,tD:()=>$,tm:()=>L,u0:()=>N,v_:()=>J,vt:()=>he,xs:()=>pe});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,_=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),v=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(_);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(v),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 E(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=N(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 N(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 j(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=ce(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&&ue()&&(r=le(r)),E(r)}function P(e){const t=U(e);let r,n;if(t){const e=I(t.proxyUrl);r=e.path,n=e.query?N(e.query):null}if(r){const t=E(e);e=r+"?"+t.path;const s=j({...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=fe(e=pe(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=D(e),t=D(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=D(e),t=D(t),fe(e)===fe(t)}function D(e){const t=(e=Z(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function B(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=be(e),s=be(t);return!(!r&&n.scheme!==s.scheme)&&null!=n.host&&null!=s.host&&n.host.toLowerCase()===s.host.toLowerCase()&&n.port===s.port}function F(e){if("string"==typeof e){if(!V(e))return!0;e=be(e)}if(z(e,A))return!0;const t=f.trustedServers||[];for(let r=0;r<t.length;r++){const n=H(t[r]);for(let t=0;t<n.length;t++)if(z(e,n[t]))return!0}return!1}function H(e){return O[e]||(ae(e)||ie(e)?O[e]=[new w(q(e))]:O[e]=[new w(`http://${e}`),new w(`https://${e}`)]),O[e]}function q(e,t=S,r){return ie(e)?r&&r.preserveProtocolRelative?e:"http"===A.scheme&&A.authority===G(e).slice(2)?`http:${e}`:`https:${e}`:ae(e)?e:J("/"===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 W(e,t=S,r){if(null==e||!V(e))return e;const n=Z(e),s=n.toLowerCase(),o=Z(t).toLowerCase().replace(/\/+$/,""),i=r?Z(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 Z(e){return function(e){const t=f.httpsDomains;if(!function(e){return null!=e&&p.test(e)||"http"===A.scheme&&ie(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)||(ue()&&n===A.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||ue()&&!U(e))&&(e=le(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=q(e=e.trim()))))}function J(...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&&ie(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=fe(e,!0)),e}function V(e){return ie(e)||ae(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}`}async function ne(e){return(await fetch(e)).blob()}function se(e){const t=Q(e);if(!t)return null;const r=te(e);return new Blob([t],{type:r.mediaType})}function oe(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 ie(e){return null!=e&&"/"===e[0]&&"/"===e[1]}function ae(e){return null!=e&&h.test(e)}function ce(e){return null!=e&&g.test(e)||"https"===A.scheme&&ie(e)}function le(e){return ie(e)?`https:${e}`:e.replace(p,"https:")}function ue(){return"https"===A.scheme}function fe(e,t=!1){return ie(e)?e.slice(2):(e=e.replace(h,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function de(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 he(e,t){if(!e)return"";const r=E(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 pe(e){return e.endsWith("/")?e:`${e}/`}function ge(e){return e.replace(/\/+$/,"")}function ye(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 be(e){return"string"==typeof e?new w(q(e)):(e.scheme||(e.scheme=A.scheme),e)}function me(e,t){const r=E(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 _e(e,t,r){const n=E(e),s=n.query||{};return s[t]=String(r),`${n.path}?${j(s)}`}function ve(e,t){if(!t)return e;const r=E(e),n=r.query||{};for(const[e,r]of Object.entries(t))null!=r&&(n[e]=r);const s=j(n);return s?`${r.path}?${s}`:r.path}function we(e){if(null==e)return null;const t=e.match(Se);return t?t[2]:null}function Oe(e){if(null==e)return null;const t=e.match(Se);return t?{path:t[1],extension:t[2]}:{path:e,extension:null}}async function Ae(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 Se=/([^.]*)\.([^\/]*)$/},728:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>_});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(6537),r.e(2971),r.e(3215),r.e(4386),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(3615),r.e(6537),r.e(2971),r.e(3215),r.e(4386),r.e(8465)]).then(r.bind(r,27793)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(1072),r.e(8527),r.e(4505)]).then(r.bind(r,49594)),ElevationSamplerWorker:()=>Promise.all([r.e(3615),r.e(6537),r.e(2971),r.e(3215),r.e(6481),r.e(6459),r.e(4925)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(7126),r.e(4165),r.e(3615),r.e(6537),r.e(8968),r.e(2971),r.e(3215),r.e(4599),r.e(8732),r.e(5286),r.e(4386),r.e(7863),r.e(2823)]).then(r.bind(r,65967)),GeoJSONSourceWorker:()=>Promise.all([r.e(3615),r.e(6537),r.e(2971),r.e(3215),r.e(8732),r.e(4386),r.e(4107)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(3615),r.e(6537),r.e(2971),r.e(3215),r.e(8732),r.e(4386),r.e(8038)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(6537),r.e(2971),r.e(3215),r.e(8732),r.e(3597)]).then(r.bind(r,61916)),Pipeline:()=>Promise.all([r.e(7126),r.e(3547),r.e(4165),r.e(3615),r.e(6537),r.e(8968),r.e(2971),r.e(3215),r.e(4599),r.e(8732),r.e(5286),r.e(4386),r.e(4325),r.e(7863),r.e(7937)]).then(r.bind(r,27937)),PointCloudWorker:()=>Promise.all([r.e(6537),r.e(2971),r.e(8643),r.e(5851)]).then(r.bind(r,91700)),RasterWorker:()=>Promise.all([r.e(3615),r.e(6537),r.e(2971),r.e(3215),r.e(6610),r.e(4136),r.e(5677)]).then(r.bind(r,61576)),SceneLayerSnappingSourceWorker:()=>Promise.all([r.e(6481),r.e(6170),r.e(1072),r.e(8527),r.e(4275)]).then(r.bind(r,73248)),SceneLayerWorker:()=>Promise.all([r.e(6537),r.e(2971),r.e(1412)]).then(r.bind(r,31412)),WFSSourceWorker:()=>Promise.all([r.e(3615),r.e(6537),r.e(2971),r.e(3215),r.e(8732),r.e(4386),r.e(6060)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(6537),r.e(4325),r.e(9805),r.e(4982),r.e(6456)]).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 _{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 _(t.port1,{channel:t,client:r});return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=n),_.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._jobQueue=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._jobQueue?.pop();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&&_.clients.get(this)===e&&e.destroy(),_.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 _(e.port,{client:this._client})}_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)}}_.kernelInfo={buildDate:f.r,fullVersion:n.bR,revision:f.$},_.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:()=>u,bR:()=>c,i8:()=>i,id:()=>a,qh:()=>l});var n=r(80442),s=r(17452),o=r(17202);Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const i="4.28";let a,c=i;function l(e){a=e}function u(e){const t=a?.findCredential(e);return t?.token?(0,s.ZN)(e,"token",t.token):e}c=`4.28.0-next.${o.r}`,(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="20230923",s="8c4f2ebf9b43765d48a05cf5da3e72c63a7689b7"}},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/"+{24:"f793cd41fcd022baeea2",163:"5ffaa1a9ba56ce71fb06",247:"a9f83bbccf3b5f229262",261:"a39ae87298ac674f129d",540:"8be617f74c57a6dc29eb",565:"01ec6da0c371bf43f48c",576:"c5c56b6d99db96a6755a",661:"39ae4b9b766f674bc6f2",801:"3f218d65ec451b2a1027",819:"d1ead6e8aa7e8e21fbc6",951:"645ba2d5c10184632d23",1043:"97658ac749664a07c92d",1072:"24c717492ea1b35310d8",1073:"9275ab11ba306dc32df0",1158:"68035e9fe01983d56854",1161:"44b8e75593b7df1843e1",1174:"e0dd6789fb797e9b7206",1316:"4c110c7f4f940ec58010",1370:"af54b233f6d6ad70b4a3",1412:"47be4c75dd6372b96fe4",1421:"93e17ab3bc56ceea928d",1423:"079b2048c97cf46c8e01",1433:"4d5bdf18feeb9c8cb6ff",1444:"425b5733bb88e6efe242",1537:"e5dcff7a4fa84ba09670",1574:"7d078b8b9997b5300c0a",1790:"19a23c6477452d175abc",2046:"c3b8b40115be5a2b960e",2134:"1b2f450fdbab3a1fcdce",2341:"542ce10e1872399790b4",2575:"74d3ecb1a06d9f81e2c5",2594:"69058a8adf64858e57b5",2596:"c5acddea13fd01912e79",2664:"7ea33aa455c5143affb1",2712:"169a61c6e128b8a16021",2763:"8458ed96f3e72814cef2",2823:"1186ba1947bd0c32f148",2863:"cbdc5dfc0f27db3d7c93",2971:"b1746c022fe6edaeda55",3027:"bb1c35a959f24ee742ae",3215:"b8b35e3d7f642a960703",3310:"e83c9a71d2cce98c5a57",3376:"eeac53da496de4cd4182",3529:"21fc02f0d5716c4a7acd",3547:"be05cc0cdabd5e051045",3554:"ffc0627707469c87d6be",3584:"f0c3af458c7b4cb4f1b7",3597:"06621efb2573fad23b45",3608:"d414dba3179bcf75bc6b",3615:"53ba56b86a26913d13b0",3663:"1c8469fbde39d85ee622",3681:"098073c3b2849f56dad8",3694:"76483c9a8848f3106126",3778:"91c9f0d59eaed7a735ce",3780:"57e8933164c5ebcbf941",3831:"652749dc847fcb887234",3852:"f0c62bb406bb93b1408a",3928:"54ecb6cae310818d1aa2",3975:"a277c980ba8704939688",3992:"4cd095c12319fd864060",4041:"9a7cc762e57714cbf00a",4107:"17a36704e63ca1b34c5d",4136:"2a0b3b52ecd787a613bc",4140:"59a807220d6f0dd18776",4165:"88d43db03cc11cbffa68",4166:"5d334dd768a8f6adce4c",4275:"ea332c0b501367df6c98",4325:"189dd81cf95bd8417ee3",4330:"53097659f31750c03a6d",4358:"4a2a0091cd830b6a1729",4371:"83d4ab132796123388ac",4386:"250bb6ae6f1992b5b4f9",4475:"bc7e32321d35d0193525",4492:"914adb8839e250bb8390",4499:"0914b513579eb5ca515b",4505:"592c1fb531f2be928e8a",4573:"609a475ab395f2ce63e2",4599:"90771b0de3e520a1df9a",4608:"c5f5f37bef11c6fbdc40",4609:"c34615c0b7ad83d1ad24",4695:"2f0924e7aa89e689da4a",4697:"4339ce8aaf87fabb80cc",4720:"7fe641cf1467496e670a",4828:"7aa58c96798447ce5907",4925:"467a821d05df8ec0dc1c",4982:"5baae5acd184e87d5dc4",4998:"186445b9fbedd261f684",5234:"8b6b963230df56850580",5235:"d9061beaa43065316062",5286:"d24afa6d8fd0061d9f00",5329:"a90d9ce7acf8c2620c81",5334:"84870178173951ad6c2b",5389:"315cbe76a7822b9fb27c",5481:"02156fd04279f4d0fd3f",5576:"41c0df2577921ed0ee57",5613:"65186e168dd112ac6221",5642:"610afd59e4844a9f198f",5660:"6f324fd19869a7943afa",5677:"7ed70c96fbfe00792e7c",5732:"aa453ae526a233cedf0c",5837:"9d2f3de6953a8ebafdd3",5851:"a99070ec4c06c435b744",5913:"43ba2bacd0f7d19915f7",5935:"60a08ce29d09cb07ef06",6030:"eb01f4cdb9b918cc61e7",6060:"cec607d0138351a4952e",6124:"5ae63d31468222841d62",6138:"a8ca4b116909e47722f9",6148:"6c495077cc79e1898927",6170:"810c8d6ff19976fd1366",6233:"766f397dfdfbc0eb72d1",6237:"8a7fa4e8b0d14da7c9eb",6261:"98c2445fd3cd5d200a6d",6319:"aeeeb386134b341d7ad2",6404:"dea1b32fdeaf26babe4b",6456:"0359f614a04a012eea31",6459:"1a723bb4a341f645e5fe",6472:"59dff10d7ad2b1bf469e",6481:"f6c39edd04cb96d98240",6506:"d6e5408f9fa6b4bcd118",6537:"e4e49deae8da74f629db",6569:"749fc49246093d693227",6571:"887652bbdb3b71d0a089",6610:"d96f825630c348c8f2eb",6710:"0bb57b54897fb4381b46",6753:"10fd951bd296b2beeeba",6774:"24b1bf1a5d80f43a6c9a",6841:"134524cf6b1ebf208338",7126:"0f804e3f888cb4998f46",7132:"97073a60f0ea2a397165",7277:"6ea1763bef36af0a1da1",7307:"5c551e5fc76fb9a2dd17",7360:"4354b5696fce0421927a",7374:"5c39d18ae37138e0f56b",7520:"36710c57bb4c49f22bac",7863:"d9fb500cbd0f04d219a3",7865:"72c5bd6f7b8541b8d69e",7873:"8db3ee2931be5cca3f5e",7937:"b9146daae8457224fd08",8008:"74368a5213def6c200a2",8038:"32ba4eba730e9232d964",8062:"51324d042f469f3b8914",8079:"1573065cb29dac670fe6",8092:"f1b26b73101210b8f29c",8096:"2721aa6b6941b28b9758",8153:"612c485c5aad1548d708",8228:"69da907a92901f0fb391",8324:"25b09e9c0511c8e1cf8a",8465:"45d6b942cdccca2ce44a",8522:"0a322163b3441834b915",8527:"4bf1a7e82a68ccee0ee1",8598:"9866bbaeaf885c2dcca9",8636:"02d088d47b3a207058fa",8643:"b1a8024bf8cdd0cd3884",8654:"896bfda379cf620b63ec",8732:"107546ef77a45d31c7ac",8758:"6b9248fb2d6aadbce7bb",8767:"709465832d306e02df52",8775:"a7b3048c19348540e004",8828:"400a260047e3c1708ccd",8949:"dabd889e064c4e7807fa",8968:"246a954347fe9318190e",9016:"a1627c92cdfb48fb8ddd",9059:"2bc9b55e655968229ef4",9069:"4ed77097e69fa3096ce4",9083:"ec8258c9dc1491e97fc8",9153:"54d2b7e2ac4ba883bee8",9169:"4fe5bac782a742d5b1c0",9206:"e6faef300ff2e80a20a6",9238:"ee0bf611d191103a7046",9243:"6c519c5a474f51f37af0",9291:"7b3d5f044c96e2c2af11",9296:"b4e4d77a385f9636d864",9327:"fad6a7bb82a0a2df726f",9379:"07f6175b52366b2c28bd",9717:"bcdd2e8841abcb4df6da",9790:"f145912072d41327cf9b",9805:"37116fb4c68cf3c3890a",9863:"57c932e289d89d97da4b",9884:"68b0e0aa33880bc1ba77",9904:"4108445c4a653772c5ee",9931:"8892ba980382e8ca4a29",9971:"ab145d13932d87dd7bf9"}[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={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:!0,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 extends h.s{constructor(e,t){super(),this.propertyName=e,this.metadata=t,this._accessed=null,this._handles=null,this.flags=0,this.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.flags&y.v.Dirty&&this.onCommitted(),super.destroy(),this._accessed=null,this._clearObservationHandles()}getComputed(e){(0,g.it)(this);const t=e.store,r=this.propertyName,n=this.flags,s=t.get(r);if(n&y.v.Computing)return s;if(~n&y.v.Dirty&&t.has(r))return s;this.flags|=y.v.Computing;const o=e.host;let i;n&y.v.AutoTracked?i=(0,g.LJ)(this,this.metadata.get,o):((0,g.GF)(o,this),i=this.metadata.get.call(o)),t.set(r,i,p.s3.COMPUTED);const a=t.get(r);return a===s?this.flags&=~y.v.Dirty:(0,g.gb)(this.commit,this),this.flags&=~y.v.Computing,a}onObservableAccessed(e){if(e===this)return;let t=this._accessed;if(null==t)t=[],this._accessed=t;else if(t.includes(e))return;t.push(e)}onTrackingEnd(){this._clearObservationHandles(),this.flags|=y.v.DepTrackingInitialized;const e=this._accessed;if(null==e||0===e.length)return;let t=this._handles;null==t&&(t=[],this._handles=t);for(let r=0;r<e.length;++r)t.push(e[r].observe(this));e.length=0}notifyChange(){this.onInvalidated(),this.onCommitted()}invalidate(){this.onInvalidated()}commit(){this.flags&=~y.v.Dirty,this.onCommitted()}_clearObservationHandles(){const e=this._handles;if(null!==e){for(let t=0;t<e.length;++t)e[t].remove();e.length=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()}}}class m{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const t=new m;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 v(e,t,r,n){return!(void 0===e||null==r&&e.flags&y.v.NonNullable&&(n.lifecycle,d.F.INITIALIZING,1))}function w(e){return e&&"function"==typeof e.destroy}o.Z.getLogger("esri.core.accessorSupport.Properties");class O{constructor(e){this.host=e,this.propertiesByName=new Map,this.ctorArgs=null,this.destroyed=!1,this.lifecycle=d.F.INITIALIZING,this.store=new m,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&&w(r)&&(r.destroy(),~t.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);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.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.flags&y.v.Overriden)}clearOverride(e){const t=this.propertiesByName.get(e);t&&t.flags&y.v.Overriden&&(t.flags&=~y.v.Overriden,t.notifyChange())}override(e,t){const r=this.propertiesByName.get(e);if(!v(r,0,t,this))return;const n=r.metadata.cast;if(n){const e=this._cast(n,t),{valid:r,value:s}=e;if(A.release(e),!r)return;t=s}r.flags|=y.v.Overriden,this._internalSet(r,t)}set(e,t){const r=this.propertiesByName.get(e);if(!v(r,0,t,this))return;const n=r.metadata.cast;if(n){const e=this._cast(n,t),{valid:r,value:s}=e;if(A.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.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=A.acquire();return r.valid=!0,r.value=t,e&&(r.value=e.call(this.host,t,r)),r}}const A=new f.Z(class{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}});var S=r(37697);var k;!function(e){e[e.Ignore=0]="Ignore",e[e.Destroy=1]="Destroy",e[e.ThrowError=2]="ThrowError"}(k||(k={}));var T,E,N=r(26258),j=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,j.Cb)(r)(o.prototype,e)}return(0,C.j)(r)(o)}constructor(...e){if(this[T]=null,this[E]=!1,this.constructor===x)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const t=new O(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:t}),e.length>0&&this.normalizeCtorArgs&&(t.ctorArgs=this.normalizeCtorArgs.apply(this,e)),$.register(this,new WeakRef(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.l](){this[M]=(0,i.SC)(this[M])}destroy(){this.destroyed||($.unregister(this),(0,N.BT)(this),this.__accessor__.destroy())}[Symbol.dispose](){this.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(this),"`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,S.t)(this,e,t),this}watch(e,t,r){return(0,N.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,E=I;const $=new FinalizationRegistry((e=>{const t=e.deref();if(t)for(const e of t.values())e.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,{l:()=>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=>{e??="esri.core.Accessor",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.l];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);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:()=>v,N7:()=>E,TJ:()=>y,V5:()=>j,Zs:()=>c,di:()=>S,gB:()=>k,i$:()=>T,q9:()=>l,rY:()=>w,sY:()=>P,se:()=>_,vU:()=>u,z8:()=>N}),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 _(e,t){const r=function(e){switch(e){case Number:return l;case N: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 v(e,t,r){return 1===arguments.length?v.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?v((t=>_(e,t))):v((t=>_(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=>_(e,t)),t):A((t=>_(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 E(e,t){if(2===arguments.length)return E(e).call(null,t);const r={},n=[],s=[];for(const t in e.typeMap){const o=e.typeMap[t];r[t]=_(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 N{}const j={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 _(e.value);case"array":return v(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 N: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,-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 N: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(-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:()=>_,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){if(t.flags&o.v.DepTrackingInitialized)return;const r=f;f=!1,t.flags&o.v.AutoTracked?p(t,t.metadata.get,e):_(e,t),f=r}const m=[];function _(e,t){t.flags&o.v.ExplicitlyTracking||(t.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=v(n,r[t],t!==r.length-1)}else v(e,t,!1)})),t.flags&=~o.v.ExplicitlyTracking)}function v(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),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 _(e){b.delete(e),b.add(e),m||(m=(0,u.Os)(O))}function v(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;v(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),_(o))}));return(0,s.kB)((()=>{a.remove(),o&&(o.uid!==i||o.removed||(o.removed=!0,_(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),_(n))}));return(0,s.kB)((()=>{i.remove(),n&&(n.uid!==o||n.removed||(n.removed=!0,_(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(l.layerContainerTypes&&u?.layerContainerType&&!l.layerContainerTypes.includes(u.layerContainerType))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,wR:()=>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},43090:(e,t,r)=>{"use strict";function n(e){return 32+e.length}function s(){return 16}function o(e){if(!e)return 0;let t=l;for(const r in e)if(e.hasOwnProperty(r)){const s=e[r];switch(typeof s){case"string":t+=n(s);break;case"number":t+=16;break;case"boolean":t+=4}}return t}function i(e){if(!e)return 0;if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return 32+8*t;let r=u;for(let n=0;n<t;n++)r+=a(e[n]);return r}(e);let t=l;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e){switch(typeof e){case"object":return i(e);case"string":return n(e);case"number":return 16;case"boolean":return 4;default:return 8}}function c(e,t){return u+e.length*t}r.d(t,{G3:()=>s,Ul:()=>i,do:()=>c,f2:()=>o});const l=32,u=32},60235:(e,t,r)=>{"use strict";r.d(t,{Mr:()=>a,XV:()=>i});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("big-integer-warning-enabled",!0),s.add("esri-deprecation-warnings",!0),s.add("esri-tests-disable-screenshots",!1),s.add("esri-tests-use-full-window",!1),s.add("esri-tests-post-to-influx",!0),(()=>{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-performance-mode-frames-between-render",20),s.add("esri-force-performance-mode",!1),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:()=>N,Ds:()=>E,as:()=>v,WW:()=>w,R8:()=>_,D_:()=>m,Hc:()=>d,y8:()=>k,fu:()=>g,$F:()=>y,r9:()=>h,k_:()=>u,H9:()=>p,Yn:()=>j,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 _(e){try{return await e}catch(e){if(!m(e))throw e;return}}async function v(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e),r=t.map((t=>e[t])),n=await v(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 v(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 E(e,t=-1){let r,n,s,o,i=null;const a=(...c)=>{if(r){n=c,o&&o.reject(l()),o=N();const e=o.promise;if(i){const e=i;i=null,e.abort()}return e}if(s=o||N(),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 N(){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 j(e){await Promise.resolve(),u(e)}},1654:(e,t,r)=>{"use strict";r.d(t,{MU:()=>_,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)))})),v[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 _(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 v=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 t?e.replaceAll(s,"object"==typeof t?(e,r)=>o((0,n.hS)(r,t)):(e,r)=>o(t(r))):e}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}function s(e){return 1e3*e}function o(e){return e}r.d(t,{HA:()=>n,_H:()=>o,up:()=>s})},1533:(e,t,r)=>{"use strict";r.d(t,{B3:()=>m,Hx:()=>u,KZ:()=>a,Op:()=>v,Q7:()=>_,Uc:()=>l,W0:()=>o,Xw:()=>g,ZY:()=>f,c8:()=>b,eP:()=>s,fS:()=>h,kJ:()=>p,lq:()=>i,xZ:()=>d,z3:()=>c});var n=r(43090);function s(e){return e instanceof ArrayBuffer}function o(e){return"Int8Array"===e?.constructor?.name}function i(e){return"Uint8Array"===e?.constructor?.name}function a(e){return"Uint8ClampedArray"===e?.constructor?.name}function c(e){return"Int16Array"===e?.constructor?.name}function l(e){return"Uint16Array"===e?.constructor?.name}function u(e){return"Int32Array"===e?.constructor?.name}function f(e){return"Uint32Array"===e?.constructor?.name}function d(e){return"Float32Array"===e?.constructor?.name}function h(e){return"Float64Array"===e?.constructor?.name}function p(e){return!("buffer"in e)}function g(...e){return e.reduce(((e,t)=>e+(t?p(t)?(0,n.do)(t,(0,n.G3)()):t.byteLength+y:0)),0)}r(80442);const y=145,b=1024;function m(e){return h(e)||d(e)||u(e)||c(e)||o(e)}function _(e){return h(e)||d(e)}function v(e){return h(e)?179769e303:d(e)?3402823e32:f(e)?4294967295:l(e)?65535:i(e)||a(e)?255:u(e)?2147483647:c(e)?32767:o(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:()=>ce,AH:()=>Q,B7:()=>j,D6:()=>z,Fv:()=>Z,HK:()=>Y,Hu:()=>me,IR:()=>Ae,Ie:()=>ye,L:()=>T,Ml:()=>we,P$:()=>G,PF:()=>W,Qj:()=>ge,R9:()=>w,TI:()=>k,YP:()=>V,Yd:()=>de,ZN:()=>_e,Zo:()=>R,_l:()=>re,b7:()=>C,ed:()=>U,fZ:()=>Oe,fl:()=>ve,fw:()=>se,gi:()=>ne,hF:()=>q,hO:()=>le,io:()=>oe,jc:()=>K,kl:()=>F,mN:()=>E,oC:()=>ie,oh:()=>B,qg:()=>P,rS:()=>X,sJ:()=>te,tD:()=>$,tm:()=>L,u0:()=>N,v_:()=>J,vt:()=>he,xs:()=>pe});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,_=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),v=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(_);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(v),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 E(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=N(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 N(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 j(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=ce(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&&ue()&&(r=le(r)),E(r)}function P(e){const t=U(e);let r,n;if(t){const e=I(t.proxyUrl);r=e.path,n=e.query?N(e.query):null}if(r){const t=E(e);e=r+"?"+t.path;const s=j({...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=fe(e=pe(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=D(e),t=D(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=D(e),t=D(t),fe(e)===fe(t)}function D(e){const t=(e=Z(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function B(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=be(e),s=be(t);return!(!r&&n.scheme!==s.scheme)&&null!=n.host&&null!=s.host&&n.host.toLowerCase()===s.host.toLowerCase()&&n.port===s.port}function F(e){if("string"==typeof e){if(!V(e))return!0;e=be(e)}if(z(e,A))return!0;const t=f.trustedServers||[];for(let r=0;r<t.length;r++){const n=H(t[r]);for(let t=0;t<n.length;t++)if(z(e,n[t]))return!0}return!1}function H(e){return O[e]||(ae(e)||ie(e)?O[e]=[new w(q(e))]:O[e]=[new w(`http://${e}`),new w(`https://${e}`)]),O[e]}function q(e,t=S,r){return ie(e)?r&&r.preserveProtocolRelative?e:"http"===A.scheme&&A.authority===G(e).slice(2)?`http:${e}`:`https:${e}`:ae(e)?e:J("/"===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 W(e,t=S,r){if(null==e||!V(e))return e;const n=Z(e),s=n.toLowerCase(),o=Z(t).toLowerCase().replace(/\/+$/,""),i=r?Z(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 Z(e){return function(e){const t=f.httpsDomains;if(!function(e){return null!=e&&p.test(e)||"http"===A.scheme&&ie(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)||(ue()&&n===A.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||ue()&&!U(e))&&(e=le(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=q(e=e.trim()))))}function J(...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&&ie(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=fe(e,!0)),e}function V(e){return ie(e)||ae(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}`}async function ne(e){return(await fetch(e)).blob()}function se(e){const t=Q(e);if(!t)return null;const r=te(e);return new Blob([t],{type:r.mediaType})}function oe(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 ie(e){return null!=e&&"/"===e[0]&&"/"===e[1]}function ae(e){return null!=e&&h.test(e)}function ce(e){return null!=e&&g.test(e)||"https"===A.scheme&&ie(e)}function le(e){return ie(e)?`https:${e}`:e.replace(p,"https:")}function ue(){return"https"===A.scheme}function fe(e,t=!1){return ie(e)?e.slice(2):(e=e.replace(h,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function de(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 he(e,t){if(!e)return"";const r=E(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 pe(e){return e.endsWith("/")?e:`${e}/`}function ge(e){return e.replace(/\/+$/,"")}function ye(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 be(e){return"string"==typeof e?new w(q(e)):(e.scheme||(e.scheme=A.scheme),e)}function me(e,t){const r=E(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 _e(e,t,r){const n=E(e),s=n.query||{};return s[t]=String(r),`${n.path}?${j(s)}`}function ve(e,t){if(!t)return e;const r=E(e),n=r.query||{};for(const[e,r]of Object.entries(t))null!=r&&(n[e]=r);const s=j(n);return s?`${r.path}?${s}`:r.path}function we(e){if(null==e)return null;const t=e.match(Se);return t?t[2]:null}function Oe(e){if(null==e)return null;const t=e.match(Se);return t?{path:t[1],extension:t[2]}:{path:e,extension:null}}async function Ae(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 Se=/([^.]*)\.([^\/]*)$/},728:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>_});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(6537),r.e(2971),r.e(3215),r.e(4386),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(3615),r.e(6537),r.e(2971),r.e(3215),r.e(4386),r.e(8465)]).then(r.bind(r,27793)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(1072),r.e(8527),r.e(4505)]).then(r.bind(r,49594)),ElevationSamplerWorker:()=>Promise.all([r.e(3615),r.e(6537),r.e(2971),r.e(3215),r.e(6481),r.e(6459),r.e(4925)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(7126),r.e(4165),r.e(3615),r.e(6537),r.e(8968),r.e(2971),r.e(3215),r.e(4599),r.e(8732),r.e(5286),r.e(4386),r.e(7863),r.e(2823)]).then(r.bind(r,65967)),GeoJSONSourceWorker:()=>Promise.all([r.e(3615),r.e(6537),r.e(2971),r.e(3215),r.e(8732),r.e(4386),r.e(4107)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(3615),r.e(6537),r.e(2971),r.e(3215),r.e(8732),r.e(4386),r.e(8038)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(6537),r.e(2971),r.e(3215),r.e(8732),r.e(3597)]).then(r.bind(r,61916)),Pipeline:()=>Promise.all([r.e(7126),r.e(3547),r.e(4165),r.e(3615),r.e(6537),r.e(8968),r.e(2971),r.e(3215),r.e(4599),r.e(8732),r.e(5286),r.e(4386),r.e(4325),r.e(7863),r.e(7937)]).then(r.bind(r,27937)),PointCloudWorker:()=>Promise.all([r.e(6537),r.e(2971),r.e(8643),r.e(5851)]).then(r.bind(r,91700)),RasterWorker:()=>Promise.all([r.e(3615),r.e(6537),r.e(2971),r.e(3215),r.e(6610),r.e(4136),r.e(5677)]).then(r.bind(r,61576)),SceneLayerSnappingSourceWorker:()=>Promise.all([r.e(6481),r.e(6170),r.e(1072),r.e(8527),r.e(4275)]).then(r.bind(r,73248)),SceneLayerWorker:()=>Promise.all([r.e(6537),r.e(2971),r.e(1412)]).then(r.bind(r,31412)),WFSSourceWorker:()=>Promise.all([r.e(3615),r.e(6537),r.e(2971),r.e(3215),r.e(8732),r.e(4386),r.e(6060)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(6537),r.e(4325),r.e(9805),r.e(4982),r.e(6456)]).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 _{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 _(t.port1,{channel:t,client:r});return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=n),_.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._jobQueue=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._jobQueue?.pop();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&&_.clients.get(this)===e&&e.destroy(),_.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 _(e.port,{client:this._client})}_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)}}_.kernelInfo={buildDate:f.r,fullVersion:n.bR,revision:f.$},_.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:()=>u,bR:()=>c,i8:()=>i,id:()=>a,qh:()=>l});var n=r(80442),s=r(17452),o=r(17202);Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const i="4.28";let a,c=i;function l(e){a=e}function u(e){const t=a?.findCredential(e);return t?.token?(0,s.ZN)(e,"token",t.token):e}c=`4.28.0-next.${o.r}`,(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="20230925",s="0c1ef7095391df9f6d5dd56f85dc0aba2343e0e2"}},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/"+{24:"f793cd41fcd022baeea2",163:"5ffaa1a9ba56ce71fb06",247:"a9f83bbccf3b5f229262",261:"a39ae87298ac674f129d",540:"8be617f74c57a6dc29eb",565:"01ec6da0c371bf43f48c",576:"c5c56b6d99db96a6755a",661:"39ae4b9b766f674bc6f2",801:"3f218d65ec451b2a1027",819:"d1ead6e8aa7e8e21fbc6",951:"645ba2d5c10184632d23",1043:"97658ac749664a07c92d",1072:"24c717492ea1b35310d8",1073:"9275ab11ba306dc32df0",1158:"68035e9fe01983d56854",1161:"44b8e75593b7df1843e1",1174:"e0dd6789fb797e9b7206",1316:"4c110c7f4f940ec58010",1370:"af54b233f6d6ad70b4a3",1412:"47be4c75dd6372b96fe4",1421:"93e17ab3bc56ceea928d",1423:"079b2048c97cf46c8e01",1433:"4d5bdf18feeb9c8cb6ff",1444:"425b5733bb88e6efe242",1537:"e5dcff7a4fa84ba09670",1574:"7d078b8b9997b5300c0a",1790:"19a23c6477452d175abc",2046:"c3b8b40115be5a2b960e",2134:"1b2f450fdbab3a1fcdce",2341:"542ce10e1872399790b4",2575:"74d3ecb1a06d9f81e2c5",2594:"69058a8adf64858e57b5",2596:"c5acddea13fd01912e79",2664:"7ea33aa455c5143affb1",2712:"169a61c6e128b8a16021",2763:"8458ed96f3e72814cef2",2823:"1186ba1947bd0c32f148",2863:"cbdc5dfc0f27db3d7c93",2971:"b1746c022fe6edaeda55",3027:"bb1c35a959f24ee742ae",3215:"b8b35e3d7f642a960703",3310:"e83c9a71d2cce98c5a57",3376:"eeac53da496de4cd4182",3529:"21fc02f0d5716c4a7acd",3547:"be05cc0cdabd5e051045",3554:"ffc0627707469c87d6be",3584:"f0c3af458c7b4cb4f1b7",3597:"06621efb2573fad23b45",3608:"d414dba3179bcf75bc6b",3615:"53ba56b86a26913d13b0",3663:"1c8469fbde39d85ee622",3681:"098073c3b2849f56dad8",3694:"76483c9a8848f3106126",3778:"91c9f0d59eaed7a735ce",3780:"57e8933164c5ebcbf941",3831:"652749dc847fcb887234",3852:"f0c62bb406bb93b1408a",3928:"54ecb6cae310818d1aa2",3975:"a277c980ba8704939688",3992:"4cd095c12319fd864060",4041:"9a7cc762e57714cbf00a",4107:"17a36704e63ca1b34c5d",4136:"2a0b3b52ecd787a613bc",4140:"59a807220d6f0dd18776",4165:"88d43db03cc11cbffa68",4166:"5d334dd768a8f6adce4c",4275:"ea332c0b501367df6c98",4325:"189dd81cf95bd8417ee3",4330:"53097659f31750c03a6d",4358:"4a2a0091cd830b6a1729",4371:"83d4ab132796123388ac",4386:"250bb6ae6f1992b5b4f9",4475:"bc7e32321d35d0193525",4492:"914adb8839e250bb8390",4499:"0914b513579eb5ca515b",4505:"592c1fb531f2be928e8a",4573:"609a475ab395f2ce63e2",4599:"90771b0de3e520a1df9a",4608:"c5f5f37bef11c6fbdc40",4609:"c34615c0b7ad83d1ad24",4695:"2f0924e7aa89e689da4a",4697:"4339ce8aaf87fabb80cc",4720:"7fe641cf1467496e670a",4828:"7aa58c96798447ce5907",4925:"467a821d05df8ec0dc1c",4982:"5baae5acd184e87d5dc4",4998:"186445b9fbedd261f684",5234:"8b6b963230df56850580",5235:"d9061beaa43065316062",5286:"d24afa6d8fd0061d9f00",5329:"a90d9ce7acf8c2620c81",5334:"84870178173951ad6c2b",5389:"315cbe76a7822b9fb27c",5481:"02156fd04279f4d0fd3f",5576:"41c0df2577921ed0ee57",5613:"65186e168dd112ac6221",5642:"610afd59e4844a9f198f",5660:"6f324fd19869a7943afa",5677:"7ed70c96fbfe00792e7c",5732:"aa453ae526a233cedf0c",5837:"9d2f3de6953a8ebafdd3",5851:"a99070ec4c06c435b744",5913:"43ba2bacd0f7d19915f7",5935:"60a08ce29d09cb07ef06",6030:"eb01f4cdb9b918cc61e7",6060:"cec607d0138351a4952e",6124:"5ae63d31468222841d62",6138:"a8ca4b116909e47722f9",6148:"6c495077cc79e1898927",6170:"810c8d6ff19976fd1366",6233:"766f397dfdfbc0eb72d1",6237:"8a7fa4e8b0d14da7c9eb",6261:"98c2445fd3cd5d200a6d",6319:"aeeeb386134b341d7ad2",6404:"dea1b32fdeaf26babe4b",6456:"0359f614a04a012eea31",6459:"1a723bb4a341f645e5fe",6472:"59dff10d7ad2b1bf469e",6481:"f6c39edd04cb96d98240",6506:"d6e5408f9fa6b4bcd118",6537:"e4e49deae8da74f629db",6569:"749fc49246093d693227",6571:"887652bbdb3b71d0a089",6610:"d96f825630c348c8f2eb",6710:"0bb57b54897fb4381b46",6753:"10fd951bd296b2beeeba",6774:"24b1bf1a5d80f43a6c9a",6841:"134524cf6b1ebf208338",7126:"0f804e3f888cb4998f46",7132:"97073a60f0ea2a397165",7277:"6ea1763bef36af0a1da1",7307:"5c551e5fc76fb9a2dd17",7360:"4354b5696fce0421927a",7374:"5c39d18ae37138e0f56b",7520:"36710c57bb4c49f22bac",7863:"d9fb500cbd0f04d219a3",7865:"72c5bd6f7b8541b8d69e",7873:"8db3ee2931be5cca3f5e",7937:"b9146daae8457224fd08",8008:"74368a5213def6c200a2",8038:"32ba4eba730e9232d964",8062:"51324d042f469f3b8914",8079:"1573065cb29dac670fe6",8092:"f1b26b73101210b8f29c",8096:"2721aa6b6941b28b9758",8153:"612c485c5aad1548d708",8228:"69da907a92901f0fb391",8324:"25b09e9c0511c8e1cf8a",8465:"45d6b942cdccca2ce44a",8522:"0a322163b3441834b915",8527:"4bf1a7e82a68ccee0ee1",8598:"9866bbaeaf885c2dcca9",8636:"02d088d47b3a207058fa",8643:"b1a8024bf8cdd0cd3884",8654:"896bfda379cf620b63ec",8732:"107546ef77a45d31c7ac",8758:"6b9248fb2d6aadbce7bb",8767:"709465832d306e02df52",8775:"a7b3048c19348540e004",8828:"400a260047e3c1708ccd",8949:"dabd889e064c4e7807fa",8968:"246a954347fe9318190e",9016:"a1627c92cdfb48fb8ddd",9059:"2bc9b55e655968229ef4",9069:"4ed77097e69fa3096ce4",9083:"ec8258c9dc1491e97fc8",9153:"54d2b7e2ac4ba883bee8",9169:"4fe5bac782a742d5b1c0",9206:"e6faef300ff2e80a20a6",9238:"ee0bf611d191103a7046",9243:"6c519c5a474f51f37af0",9291:"7b3d5f044c96e2c2af11",9296:"b4e4d77a385f9636d864",9327:"fad6a7bb82a0a2df726f",9379:"07f6175b52366b2c28bd",9717:"bcdd2e8841abcb4df6da",9790:"f145912072d41327cf9b",9805:"37116fb4c68cf3c3890a",9863:"57c932e289d89d97da4b",9884:"68b0e0aa33880bc1ba77",9904:"4108445c4a653772c5ee",9931:"8892ba980382e8ca4a29",9971:"ab145d13932d87dd7bf9"}[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})();
@@ -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"../../core/Logger.js";import{equals as r}from"../../geometry/support/spatialReferenceUtils.js";import{getMimeTypeFormatId as t,getFilenameFormatId as i}from"./infoFor3D.js";import{getEffectiveLayerCapabilities as s,getEffectiveEditingEnabled as a}from"./layerUtils.js";function o(e){return!(!(e&&"object"==typeof e&&"loaded"in e&&e.loaded&&s(e)?.operations?.supportsEditing&&"type"in e)||"editingEnabled"in e&&!a(e)||"scene"===e.type&&!n(e))}function n(s){const{associatedLayer:a}=s,o=a?.infoFor3D;if(!!!o)return!0;const{supportedFormats:n,queryFormats:c}=o,d=t("model/gltf-binary",n)??i("glb",n);if(!(null!=d&&c.includes(d)))return e.getLogger("esri.layers.support.editableLayers").warnOnce(`SceneLayer ${s.uid} is not editable because it does not support GLB queries.`),!1;const l=s.spatialReference,p=a.spatialReference;if(!r(l,p))return e.getLogger("esri.layers.support.editableLayers").warnOnce(`SceneLayer ${s.uid} is not editable because its spatial reference (wkid:${l.wkid}) is different from its associated FeatureLayer's spatial reference (wkid:${p.wkid}).`),!1;const u=a.sourceJSON.sourceSpatialReference;return!(null!=u&&!r(u,p))||(e.getLogger("esri.layers.support.editableLayers").warnOnce(`SceneLayer ${s.uid} is not editable because the spatial reference of its associated FeatureLayer's service (wkid:${p.wkid}) is different from its source spatial reference (wkid:${u.wkid}).`),!1)}export{o as isEditableLayer};
5
+ import e from"../../core/Logger.js";import{equals as r}from"../../geometry/support/spatialReferenceUtils.js";import{getMimeTypeFormatId as t,getFilenameFormatId as i}from"./infoFor3D.js";import{getEffectiveLayerCapabilities as s,getEffectiveEditingEnabled as a}from"./layerUtils.js";function o(e){return!(!(e&&"object"==typeof e&&"loaded"in e&&e.loaded&&s(e)?.operations?.supportsEditing&&"type"in e)||"editingEnabled"in e&&!a(e)||"scene"===e.type&&!n(e))}function n(s){const{associatedLayer:a}=s,o=a?.infoFor3D;if(!!!o)return!0;const{supportedFormats:n,queryFormats:l}=o,d=t("model/gltf-binary",n)??i("glb",n);if(!(null!=d&&l.includes(d)))return e.getLogger("esri.layers.support.editableLayers").warnOnce(`SceneLayer (${s.title??"Untitled layer"}, ${s.id}) is not editable because it does not support GLB queries.`),!1;const c=s.spatialReference,p=a.spatialReference;if(!r(c,p))return e.getLogger("esri.layers.support.editableLayers").warnOnce(`SceneLayer (${s.title??"Untitled layer"}, ${s.id}) is not editable because its spatial reference (wkid:${c.wkid}) is different from its associated FeatureLayer's spatial reference (wkid:${p.wkid}).`),!1;const f=a.sourceJSON.sourceSpatialReference;return!(null!=f&&!r(f,p))||(e.getLogger("esri.layers.support.editableLayers").warnOnce(`SceneLayer (${s.title??"Untitled layer"}, ${s.id}) is not editable because the spatial reference of its associated FeatureLayer's service (wkid:${p.wkid}) is different from its source spatial reference (wkid:${f.wkid}).`),!1)}export{o as isEditableLayer};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.28.0-next.20230923",
3
+ "version": "4.28.0-next.20230925",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -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 c="20230923",a="8c4f2ebf9b43765d48a05cf5da3e72c63a7689b7";export{c as buildDate,a as commitHash};
5
+ const d="20230925",e="0c1ef7095391df9f6d5dd56f85dc0aba2343e0e2";export{d 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"../../../geometry.js";import e from"../../../Graphic.js";import"../../../symbols.js";import{makeHandle as r}from"../../../core/handleUtils.js";import{px2pt as i}from"../../../core/screenUtils.js";import{c as t,f as n}from"../../../chunks/vec2.js";import{a as o}from"../../../chunks/vec2f64.js";import{c as a}from"../../../chunks/vec3f64.js";import{LineCapStyle as l,LineJoinStyle as s}from"../../../symbols/cim/enums.js";import{colors as m}from"../../draw/support/settings.js";import{defaults as p}from"../../interactive/snapping/Settings.js";import{SnappingVisualizer as y}from"../../interactive/snapping/SnappingVisualizer.js";import c from"../../../symbols/SimpleMarkerSymbol.js";import b from"../../../symbols/SimpleLineSymbol.js";import S from"../../../symbols/CIMSymbol.js";import h from"../../../geometry/Point.js";import g from"../../../geometry/Polyline.js";class u extends y{constructor(e){super(),this._graphicsLayer=e}visualizeIntersectionPoint(e,r){return this._visualizeSnappingIndicator(new h({x:e.intersectionPoint[0],y:e.intersectionPoint[1],spatialReference:r.spatialReference}),f)}visualizePoint(e,r){return this._visualizeSnappingIndicator(new h({x:e.point[0],y:e.point[1],spatialReference:r.spatialReference}),I)}visualizeLine(e,r){return this._visualizeSnappingIndicator(new g({paths:[[e.lineStart,e.lineEnd]],spatialReference:r.spatialReference}),P)}visualizeParallelSign(e,r){return this._visualizeSnappingIndicator(new g({paths:[[e.lineStart,e.lineEnd]],spatialReference:r.spatialReference}),x)}visualizeRightAngleQuad(e,r){return this._visualizeSnappingIndicator(new g({paths:[[e.previousVertex,e.centerVertex,e.nextVertex]],spatialReference:r.spatialReference}),z(e))}_visualizeSnappingIndicator(i,t){const n=new e({geometry:i,symbol:t});return this._graphicsLayer.add(n),r((()=>{this._graphicsLayer.remove(n)}))}}const M=m.main.toArray(),d=[...m.main.toRgb(),100],f=new c({outline:new b({width:1.5,color:M}),size:15,color:[0,0,0,0]}),I=new c({outline:{width:.5,color:[0,0,0,1]},size:10,color:M}),P=new S({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:l.Butt,joinStyle:s.Round,miterLimit:10,width:i(p.lineHintWidthTarget),color:M}]}}}),x=new S({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:-1,z:0},anchorPointUnits:"Relative",size:5,markerPlacement:{type:"CIMMarkerPlacementOnLine",placePerPart:!0,angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-5,ymin:-1.5,xmax:5,ymax:1.5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[7,0],[-7,0],[-7,1.5],[7,1.5]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:M}]}}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:1,z:0},anchorPointUnits:"Relative",size:5,markerPlacement:{type:"CIMMarkerPlacementOnLine",placePerPart:!0,angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-5,ymin:-1.5,xmax:5,ymax:1.5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[7,0],[-7,0],[-7,-1.5],[7,-1.5]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:M}]}}],scaleSymbolsProportionally:!0,respectFrame:!0}]}}}),v=e=>new S({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:.5,y:.5,z:0},anchorPointUnits:"Relative",size:i(p.rightAngleHintSize),rotation:e,markerPlacement:{type:"CIMMarkerPlacementOnVertices",placePerPart:!0,angleToLine:!0,placeOnEndPoints:!1},frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[5,-5],[-5,-5],[-5,5],[5,5],[5,-5]]]},symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:"Butt",joinStyle:"Round",miterLimit:10,width:i(p.rightAngleHintOutlineSize),color:M},{type:"CIMSolidFill",enable:!0,color:d}]}}],scaleSymbolsProportionally:!0,respectFrame:!0}]}}}),C=v(45),L=v(225),z=(()=>{const e=o(),r=o(),i=a();return o=>(t(e,o.centerVertex,o.previousVertex),t(r,o.nextVertex,o.previousVertex),n(i,e,r),i[2]<0?C:L)})();export{u as SnappingVisualizer2D};
5
+ import"../../../geometry.js";import e from"../../../Graphic.js";import"../../../symbols.js";import{makeHandle as t}from"../../../core/handleUtils.js";import{px2pt as r}from"../../../core/screenUtils.js";import{c as i,f as n}from"../../../chunks/vec2.js";import{a as o}from"../../../chunks/vec2f64.js";import{c as a}from"../../../chunks/vec3f64.js";import{LineCapStyle as l,LineJoinStyle as s}from"../../../symbols/cim/enums.js";import{defaults as m}from"../../interactive/snapping/Settings.js";import{SnappingVisualizer as c}from"../../interactive/snapping/SnappingVisualizer.js";import p from"../../../geometry/Point.js";import y from"../../../geometry/Polyline.js";import g from"../../../symbols/CIMSymbol.js";import h from"../../../symbols/SimpleMarkerSymbol.js";import b from"../../../symbols/SimpleLineSymbol.js";class S extends c{constructor(e){super(),this._graphicsLayer=e,this._symbolPairingsByType=new Map}visualizeIntersectionPoint(e,t){return this._visualizeSnappingIndicator(new p({x:e.intersectionPoint[0],y:e.intersectionPoint[1],spatialReference:t.spatialReference}),this._getOrCreateSymbol("intersectionPoint",t.view.effectiveTheme.accentColor))}visualizePoint(e,t){return this._visualizeSnappingIndicator(new p({x:e.point[0],y:e.point[1],spatialReference:t.spatialReference}),this._getOrCreateSymbol("point",t.view.effectiveTheme.accentColor))}visualizeLine(e,t){return this._visualizeSnappingIndicator(new y({paths:[[e.lineStart,e.lineEnd]],spatialReference:t.spatialReference}),this._getOrCreateSymbol("line",t.view.effectiveTheme.accentColor))}visualizeParallelSign(e,t){return this._visualizeSnappingIndicator(new y({paths:[[e.lineStart,e.lineEnd]],spatialReference:t.spatialReference}),this._getOrCreateSymbol("parallelSign",t.view.effectiveTheme.accentColor))}visualizeRightAngleQuad(e,t){const r=o(),l=o(),s=a();i(r,e.centerVertex,e.previousVertex),i(l,e.nextVertex,e.previousVertex),n(s,r,l);const m=`rightAngleQuad${s[2]<0?45:225}`;return this._visualizeSnappingIndicator(new y({paths:[[e.previousVertex,e.centerVertex,e.nextVertex]],spatialReference:t.spatialReference}),this._getOrCreateSymbol(m,t.view.effectiveTheme.accentColor))}_visualizeSnappingIndicator(r,i){const n=new e({geometry:r,symbol:i});return this._graphicsLayer.add(n),t((()=>{this._graphicsLayer.remove(n)}))}_getOrCreateSymbol(e,t){const r=this._symbolPairingsByType;return r.get(e)?.color!==t&&r.set(e,{color:t,symbol:u(e,t)}),r.get(e).symbol}}function u(e,t){const i=[...t.toRgb(),255*t.a];switch(e){case"point":return new h({outline:{width:.5,color:[0,0,0,1]},size:10,color:t});case"intersectionPoint":return new h({outline:new b({width:1.5,color:t}),size:15,color:[0,0,0,0]});case"line":return new g({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:l.Butt,joinStyle:s.Round,miterLimit:10,width:r(m.lineHintWidthTarget),color:i}]}}});case"parallelSign":return new g({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:-1,z:0},anchorPointUnits:"Relative",size:5,markerPlacement:{type:"CIMMarkerPlacementOnLine",placePerPart:!0,angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-5,ymin:-1.5,xmax:5,ymax:1.5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[7,0],[-7,0],[-7,1.5],[7,1.5]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:i}]}}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:1,z:0},anchorPointUnits:"Relative",size:5,markerPlacement:{type:"CIMMarkerPlacementOnLine",placePerPart:!0,angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-5,ymin:-1.5,xmax:5,ymax:1.5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[7,0],[-7,0],[-7,-1.5],[7,-1.5]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:i}]}}],scaleSymbolsProportionally:!0,respectFrame:!0}]}}});case"rightAngleQuad45":case"rightAngleQuad225":{const n="rightAngleQuad45"===e?45:225;return new g({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:.5,y:.5,z:0},anchorPointUnits:"Relative",size:r(m.rightAngleHintSize),rotation:n,markerPlacement:{type:"CIMMarkerPlacementOnVertices",placePerPart:!0,angleToLine:!0,placeOnEndPoints:!1},frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[5,-5],[-5,-5],[-5,5],[5,5],[5,-5]]]},symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:"Butt",joinStyle:"Round",miterLimit:10,width:r(m.rightAngleHintOutlineSize),color:i},{type:"CIMSolidFill",enable:!0,color:[...t.toRgb(),255*t.a*.4]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0}]}}})}}}export{S as SnappingVisualizer2D};
@@ -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"../../../Graphic.js";import{binaryIndexOf as r}from"../../../core/arrayUtils.js";import i from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{initial as o,watch as a}from"../../../core/reactiveUtils.js";import{estimateSize as n}from"../../../core/typedArrayUtil.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import{s as u}from"../../../chunks/vec3.js";import{c as h}from"../../../chunks/vec3f64.js";import{projectBuffer as c}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as p}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as g,extentContainsCoords2D as m}from"../../../geometry/support/contains.js";import{newDoubleArray as y,doubleArrayFrom as f}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as _}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as b}from"../../../layers/LayerConstants.js";import{estimateSize as v}from"../../../layers/graphics/dehydratedFeatures.js";import{makeDehydratedPoint as E}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as x}from"../../../layers/graphics/hydratedFeatures.js";import I from"../../../layers/graphics/controllers/I3SOnDemandController.js";import w from"../../../layers/support/FeatureFilter.js";import N from"../../../rest/support/Query.js";import{isBasemapLayer as O}from"../../../support/basemapUtils.js";import{I3SPointsWorkerHandle as j}from"./I3SPointsWorkerHandle.js";import{LayerView3D as C}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as F}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as D}from"./graphics/QueryEngine.js";import{createInteractiveEditSession as S,normalizeEditResultsEvent as G,processAttributeEdits as A}from"./i3s/featureEditing.js";import{I3SGraphicsMap as P}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as L}from"./i3s/I3SOverrides.js";import{checkRecyclable as V,checkSpatialReferences as M,containsDraco as H,whenGraphicAttributes as R,getCachedAttributeValue as U}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as q}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as Q}from"./support/fieldProperties.js";import{PopupSceneLayerView as T}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as B}from"./support/SceneLayerViewRequiredFields.js";import{debugFlags as k}from"../support/debugFlags.js";import{compute as z}from"../support/orientedBoundingBox.js";import{updatingProgress as W}from"../support/updatingProperties.js";import{Vertices as Z}from"../webgl-engine/lib/Attribute.js";import{UpdatePolicy as K}from"../webgl-engine/lib/UpdatePolicy.js";import Y from"../../layers/SceneLayerView.js";import{hasPopupTemplate as $}from"../../layers/support/popupUtils.js";import{TaskPriority as J}from"../../support/Scheduler.js";const X=Q();class ee{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributeInfo=r,this.node=i}}let te=class extends(q(T(C(Y)))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new P(((e,t,r)=>oe(e,t,r)),(e=>this.processor.graphicsCore.recreateGraphics(e))),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then((()=>{V(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const t=this.view.resourceController?.memoryController;this._i3sOverrides=new L({view:this.view,layer:e,memoryController:t}),s(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()})):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new L({view:this.view,layer:this.layer,memoryController:e}),M(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new B({layerView:this}),this._updatingHandles.add((()=>this.layer.rangeInfos),(e=>this._rangeInfosChanged(e)),o),this._updatingHandles.add((()=>this.layer.renderer),((e,t)=>this._rendererChange(e,t))),this._updatingHandles.add((()=>[this.parsedDefinitionExpression,this._excludeObjectIdsSorted]),(()=>this._filterChange())),this.addHandles(a((()=>k.I3S_TREE_SHOW_TILES),(e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then((({I3STreeDebugger:t})=>{!this._treeDebugger&&k.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))}))}else e||!this._treeDebugger||k.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)}),o)),this._set("processor",new F({owner:this,preferredUpdatePolicy:K.ASYNC,scaleVisibilityEnabled:!0,filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",(e=>this._controller.updateElevationChanged(e.extent,e.spatialReference))),this.supportsHeightUnitConversion&&(this._verticalScale=_("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.initializePromise),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new I({layerView:this,scaleVisibilityEnabled:!1}),H(this.layer.geometryDefinitions)&&(this._worker=new j((e=>this.view.resourceController.immediate.schedule(e)))),this.addHandles(this.layer.on("apply-edits",(e=>this._updatingHandles.addPromise(e.result)))),this.addHandles(this.layer.on("edits",(e=>{const t=new Promise((t=>{this._pendingEditsQueue.then((()=>this._handleEdits(e))).then((()=>t()))}));this._updatingHandles.addPromise(t)}))),this.when((()=>{this._setupQueryEngine(),this._updatingHandles.add((()=>this.maximumNumberOfFeatures),(e=>this._controller.featureTarget=e),o),this._updatingHandles.add((()=>this.suspended),(e=>{e&&this._removeAllNodeData()}))}))}destroy(){this._treeDebugger=s(this._treeDebugger),this._i3sOverrides=s(this._i3sOverrides),this._set("processor",s(this.processor)),this._controller=s(this._controller),this._queryEngine=s(this._queryEngine),this._worker=s(this._worker),this._memCache=s(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=s(this._fieldsHelper)}get i3slayer(){return this.layer}get updatingProgressValue(){return this._controller?.updatingProgress??1}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIdsSorted(){const e=this.layer.excludeObjectIds;return e.length?e.toArray().sort(((e,t)=>e-t)):null}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.point.lodFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}async whenGraphicAttributes(e,t){return R(this.layer,e,this._getObjectIdField(),t,(()=>[...this.loadedGraphics.nodes()]))}getHit(e){if(!this.loadedGraphics)return null;const t=x(this.loadedGraphics.find((t=>t.uid===e)),this.layer),r=this._getObjectIdField();return t&&t.attributes&&t.attributes[r]?(t.layer=this.layer,t.sourceLayer=this.layer,{type:"graphic",graphic:t,layer:t.layer}):null}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e){return this.processor.highlight(e,this.layer.objectIdField)}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return S(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._worker&&(this._worker=new j((e=>this.view.resourceController.immediate.schedule(e))));const i=await this._worker.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,t,r){if(!se(t)&&!ie(t))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void i.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?ne(this.layer.fullExtent.clone(),.5):null,o=[],{featureIds:a,pointPositions:n}=se(t)?await this._extractBinaryPointPositions(e,t,r):this._extractLegacyPointPositions(t);this._validatePositions(e,a,n,s,o);const l=this._controller.crsVertex,d=this.view.spatialReference;c(n,l,0,n,d,0,a.length);const u=se(t)?e.level:0,h=this._createGraphics(a,n,e.index,u),p=new ee(h,a,t.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(p.featureIds,t.attributeDataInfo,r),e.numFeatures=p.graphics.length,this._updateNodeMemory(e),ae(p),o.length>0&&(this._computeObb(e,o,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(p);if(null!=this._verticalScale)for(const i of p.graphics)this._verticalScale(i.geometry);const g=this.view._stage.renderView.objectAndLayerIdRenderHelper;if(null!=g){const e=O(this.view.map,this.layer.uid);for(let t=0;t<p.featureIds.length;t++){const r=p.featureIds[t];g.setUidToObjectAndLayerId(r,p.graphics[t].uid,this.layer.id,this.layer.uid,this.layer.popupEnabled&&!e&&$(this.layer,this.view.popup?.defaultPopupTemplateEnabled),p.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,p),this._controller.updateLoadStatus(e.index,!0),this._filterNode(p),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;c(t,r,0,t,s,0,t.length/3),e.serviceObb=z(new Z(t,3)),i.isGeographic&&p(e.serviceObb.center,s,e.serviceObb.center,i)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=y(3*a),l=null!=e.serviceObb?e.serviceObb.center:[0,0,0],d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?f(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=y(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??le[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,t,r,s,o){if(null==s&&e.serviceObb)return;const a=t.length,n=3;for(let l=0;l<a;l++){const t=l*n;u(de,r[t],r[t+1],r[t+2]);const a=!Number.isNaN(r[2]);null==s||(a?g(s,de):m(s,de))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&i.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&i.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObb||o.push(de[0],de[1],de[2])}}_createGraphics(e,r,i,s){const o=e.length,a=3,n=this._getObjectIdField(),l=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<o;h++){const o=e[h],c={};null!=o&&(c[n]=o);const p=o??t.generateUID(),g=h*a,m=isNaN(r[g+2])?void 0:r[g+2],y=E(r[g],r[g+1],m,u),f=this.loadedGraphics.get(p);if(null!=f)(null==f.level||f.level<s)&&(ue.property="geometry",ue.graphic=f,ue.oldValue=f.geometry,ue.newValue=y,f.geometry=y,f.level=s,l.graphicUpdateHandler(ue)),d.push(f);else{const e=t.generateUID();d.push({objectId:p,uid:e,geometry:y,attributes:c,visible:!0,nodeIndex:i,level:s})}}return d}_updateNodeMemory(e){e.memory=4096+(null!=e.numFeatures?e.numFeatures*this.processor.graphicsCore.usedMemoryPerGraphic:0)}_cacheNodeData(e){const t=e.graphics.reduce(((e,t)=>v(t)+e),n(e.featureIds)+1024);this._memCache.put(this._getMemCacheKey(e.node),e,t)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode(((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)})),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,t,r,s){this.loadedGraphics.hasNode(e.index)?i.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(t.featureIds,r,s),this.loadedGraphics.addNode(e.index,t),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),t.attributeInfo=r,this._attributeValuesChanged(t),this._filterNode(t),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode((t=>e.push(t.node.id))),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode((t=>e.push(t.node))),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode(((t,r)=>e.push(r)))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t&&null!=t.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t&&null!=t.attributeInfo)return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r&&null!=r.attributeInfo&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){if(ae(e),this._filterNode(e),this.processor.graphicsCore.labelsEnabled){const t=e.graphics.map((e=>e.uid));this.processor.graphicsCore.updateLabelingInfo(t)}}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||b}_getGlobalIdField(){return this.layer.associatedLayer?.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every(((e,t)=>s[t]===o[t]))||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&i.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode((e=>this._filterNode(e)))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const t=this.parsedDefinitionExpression,i=this._excludeObjectIdsSorted,s=this._getObjectIdField();for(const o of e.graphics){const e=o.visible,a=!t||this._evaluateClause(t,o),n=null==i||r(i,o.attributes[s])<0;o.visible=a&&n,e!==o.visible&&(ue.graphic=o,ue.property="visible",ue.oldValue=e,ue.newValue=o.visible,this.processor.graphicsCore.graphicUpdateHandler(ue))}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return null!=this.filter?this.filter.createQuery(e):new N(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():N.from(e))}_setupQueryEngine(){const e=()=>this.processor.featureStore;this._queryEngine=new D({context:{spatialReference:this.view.spatialReference,layer:this.layer,scheduler:this.view.resourceController.scheduler,get featureStore(){return e()},hasZ:this.hasZ,hasM:this.hasM},priority:J.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await G(t,e);A(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode((t=>e(t.node,t.featureIds))),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){const e={displayedNumberOfFeatures:this.loadedGraphics.length,maximumNumberOfFeatures:this.maximumNumberOfFeatures,totalNumberOfFeatures:-1,nodes:this.loadedGraphics.nodeCount,core:this.processor.graphicsCore.performanceInfo};return this._controller&&this._controller.updateStats(e),e}get test(){return{controller:this._controller,numNodes:this.loadedGraphics.nodeCount,loadedGraphics:this.loadedGraphics}}};e([l()],te.prototype,"processor",void 0),e([l({type:w})],te.prototype,"filter",void 0),e([l()],te.prototype,"loadedGraphics",void 0),e([l()],te.prototype,"i3slayer",null),e([l()],te.prototype,"_controller",void 0),e([l()],te.prototype,"updating",void 0),e([l()],te.prototype,"suspended",void 0),e([l()],te.prototype,"holeFilling",void 0),e([l(W)],te.prototype,"updatingProgress",void 0),e([l()],te.prototype,"updatingProgressValue",null),e([l(X.requiredFields)],te.prototype,"requiredFields",null),e([l(X.availableFields)],te.prototype,"availableFields",void 0),e([l()],te.prototype,"_fieldsHelper",void 0),e([l({type:Number})],te.prototype,"maximumNumberOfFeatures",null),e([l({readOnly:!0})],te.prototype,"maximumNumberOfFeaturesExceeded",null),e([l()],te.prototype,"_excludeObjectIdsSorted",null),e([l({readOnly:!0})],te.prototype,"lodFactor",null),e([l({readOnly:!0})],te.prototype,"hasM",null),e([l({readOnly:!0})],te.prototype,"hasZ",null),e([l()],te.prototype,"contentVisible",null),e([l({readOnly:!0})],te.prototype,"legendEnabled",null),te=e([d("esri.views.3d.layers.SceneLayerGraphicsView3D")],te);const re=te;function ie(e){return"pointData"in e}function se(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function oe(e,t,r){const i=t.attributeInfo;if(null==i||null==i.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=U(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function ae(e){const t=e.attributeInfo,r=e.node.index;if(null!=t&&null!=t.loadedAttributes&&null!=t.attributeData)for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=U(t.attributeData[e],i))}}}function ne(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const le={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},de=h(),ue={graphic:null,property:null,oldValue:null,newValue:null};export{re as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import{binaryIndexOf as r}from"../../../core/arrayUtils.js";import i from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{initial as o,watch as a}from"../../../core/reactiveUtils.js";import{estimateSize as n}from"../../../core/typedArrayUtil.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import{s as u}from"../../../chunks/vec3.js";import{c as h}from"../../../chunks/vec3f64.js";import{projectBuffer as c}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as p}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as g,extentContainsCoords2D as m}from"../../../geometry/support/contains.js";import{newDoubleArray as y,doubleArrayFrom as f}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as _}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as b}from"../../../layers/LayerConstants.js";import{estimateSize as v}from"../../../layers/graphics/dehydratedFeatures.js";import{makeDehydratedPoint as E}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as x}from"../../../layers/graphics/hydratedFeatures.js";import I from"../../../layers/graphics/controllers/I3SOnDemandController.js";import w from"../../../layers/support/FeatureFilter.js";import N from"../../../rest/support/Query.js";import{isBasemapLayer as O}from"../../../support/basemapUtils.js";import{I3SPointsWorkerHandle as j}from"./I3SPointsWorkerHandle.js";import{LayerView3D as C}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as F}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as D}from"./graphics/QueryEngine.js";import{createInteractiveEditSession as S,normalizeEditResultsEvent as G,processAttributeEdits as A}from"./i3s/featureEditing.js";import{I3SGraphicsMap as P}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as L}from"./i3s/I3SOverrides.js";import{checkRecyclable as V,checkSpatialReferences as M,containsDraco as H,whenGraphicAttributes as R,getCachedAttributeValue as Q}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as U}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as q}from"./support/fieldProperties.js";import{PopupSceneLayerView as T}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as B}from"./support/SceneLayerViewRequiredFields.js";import{debugFlags as k}from"../support/debugFlags.js";import{compute as z}from"../support/orientedBoundingBox.js";import{updatingProgress as W}from"../support/updatingProperties.js";import{Vertices as Z}from"../webgl-engine/lib/Attribute.js";import{UpdatePolicy as K}from"../webgl-engine/lib/UpdatePolicy.js";import Y from"../../layers/SceneLayerView.js";import{hasPopupTemplate as $}from"../../layers/support/popupUtils.js";import{TaskPriority as J}from"../../support/Scheduler.js";const X=q();class ee{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributeInfo=r,this.node=i}}let te=class extends(U(T(C(Y)))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new P(((e,t,r)=>oe(e,t,r)),(e=>this.processor.graphicsCore.recreateGraphics(e))),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then((()=>{V(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const t=this.view.resourceController?.memoryController;this._i3sOverrides=new L({view:this.view,layer:e,memoryController:t}),s(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()})):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new L({view:this.view,layer:this.layer,memoryController:e}),M(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new B({layerView:this}),this._updatingHandles.add((()=>this.layer.rangeInfos),(e=>this._rangeInfosChanged(e)),o),this._updatingHandles.add((()=>this.layer.renderer),((e,t)=>this._rendererChange(e,t))),this._updatingHandles.add((()=>[this.parsedDefinitionExpression,this._excludeObjectIdsSorted]),(()=>this._filterChange())),this.addHandles(a((()=>k.I3S_TREE_SHOW_TILES),(e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then((({I3STreeDebugger:t})=>{!this._treeDebugger&&k.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))}))}else e||!this._treeDebugger||k.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)}),o)),this._set("processor",new F({owner:this,preferredUpdatePolicy:K.ASYNC,scaleVisibilityEnabled:!0,filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",(e=>this._controller.updateElevationChanged(e.extent,e.spatialReference))),this.supportsHeightUnitConversion&&(this._verticalScale=_("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.initializePromise),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new I({layerView:this,scaleVisibilityEnabled:!1}),H(this.layer.geometryDefinitions)&&(this._worker=new j((e=>this.view.resourceController.immediate.schedule(e)))),this.addHandles(this.layer.on("apply-edits",(e=>this._updatingHandles.addPromise(e.result)))),this.addHandles(this.layer.on("edits",(e=>{const t=this._pendingEditsQueue.then((()=>this._handleEdits(e))).then();this._pendingEditsQueue=t,this._updatingHandles.addPromise(t)}))),this.when((()=>{this._setupQueryEngine(),this._updatingHandles.add((()=>this.maximumNumberOfFeatures),(e=>this._controller.featureTarget=e),o),this._updatingHandles.add((()=>this.suspended),(e=>{e&&this._removeAllNodeData()}))}))}destroy(){this._treeDebugger=s(this._treeDebugger),this._i3sOverrides=s(this._i3sOverrides),this._set("processor",s(this.processor)),this._controller=s(this._controller),this._queryEngine=s(this._queryEngine),this._worker=s(this._worker),this._memCache=s(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=s(this._fieldsHelper)}get i3slayer(){return this.layer}get updatingProgressValue(){return this._controller?.updatingProgress??1}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIdsSorted(){const e=this.layer.excludeObjectIds;return e.length?e.toArray().sort(((e,t)=>e-t)):null}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.point.lodFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}async whenGraphicAttributes(e,t){return R(this.layer,e,this._getObjectIdField(),t,(()=>[...this.loadedGraphics.nodes()]))}getHit(e){if(!this.loadedGraphics)return null;const t=x(this.loadedGraphics.find((t=>t.uid===e)),this.layer),r=this._getObjectIdField();return t&&t.attributes&&t.attributes[r]?(t.layer=this.layer,t.sourceLayer=this.layer,{type:"graphic",graphic:t,layer:t.layer}):null}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e){return this.processor.highlight(e,this.layer.objectIdField)}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return S(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._worker&&(this._worker=new j((e=>this.view.resourceController.immediate.schedule(e))));const i=await this._worker.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,t,r){if(!se(t)&&!ie(t))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void i.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?ne(this.layer.fullExtent.clone(),.5):null,o=[],{featureIds:a,pointPositions:n}=se(t)?await this._extractBinaryPointPositions(e,t,r):this._extractLegacyPointPositions(t);this._validatePositions(e,a,n,s,o);const l=this._controller.crsVertex,d=this.view.spatialReference;c(n,l,0,n,d,0,a.length);const u=se(t)?e.level:0,h=this._createGraphics(a,n,e.index,u),p=new ee(h,a,t.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(p.featureIds,t.attributeDataInfo,r),e.numFeatures=p.graphics.length,this._updateNodeMemory(e),ae(p),o.length>0&&(this._computeObb(e,o,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(p);if(null!=this._verticalScale)for(const i of p.graphics)this._verticalScale(i.geometry);const g=this.view._stage.renderView.objectAndLayerIdRenderHelper;if(null!=g){const e=O(this.view.map,this.layer.uid);for(let t=0;t<p.featureIds.length;t++){const r=p.featureIds[t];g.setUidToObjectAndLayerId(r,p.graphics[t].uid,this.layer.id,this.layer.uid,this.layer.popupEnabled&&!e&&$(this.layer,this.view.popup?.defaultPopupTemplateEnabled),p.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,p),this._controller.updateLoadStatus(e.index,!0),this._filterNode(p),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;c(t,r,0,t,s,0,t.length/3),e.serviceObb=z(new Z(t,3)),i.isGeographic&&p(e.serviceObb.center,s,e.serviceObb.center,i)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=y(3*a),l=null!=e.serviceObb?e.serviceObb.center:[0,0,0],d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?f(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=y(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??le[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,t,r,s,o){if(null==s&&e.serviceObb)return;const a=t.length,n=3;for(let l=0;l<a;l++){const t=l*n;u(de,r[t],r[t+1],r[t+2]);const a=!Number.isNaN(r[2]);null==s||(a?g(s,de):m(s,de))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&i.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&i.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObb||o.push(de[0],de[1],de[2])}}_createGraphics(e,r,i,s){const o=e.length,a=3,n=this._getObjectIdField(),l=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<o;h++){const o=e[h],c={};null!=o&&(c[n]=o);const p=o??t.generateUID(),g=h*a,m=isNaN(r[g+2])?void 0:r[g+2],y=E(r[g],r[g+1],m,u),f=this.loadedGraphics.get(p);if(null!=f)(null==f.level||f.level<s)&&(ue.property="geometry",ue.graphic=f,ue.oldValue=f.geometry,ue.newValue=y,f.geometry=y,f.level=s,l.graphicUpdateHandler(ue)),d.push(f);else{const e=t.generateUID();d.push({objectId:p,uid:e,geometry:y,attributes:c,visible:!0,nodeIndex:i,level:s})}}return d}_updateNodeMemory(e){e.memory=4096+(null!=e.numFeatures?e.numFeatures*this.processor.graphicsCore.usedMemoryPerGraphic:0)}_cacheNodeData(e){const t=e.graphics.reduce(((e,t)=>v(t)+e),n(e.featureIds)+1024);this._memCache.put(this._getMemCacheKey(e.node),e,t)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode(((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)})),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,t,r,s){this.loadedGraphics.hasNode(e.index)?i.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(t.featureIds,r,s),this.loadedGraphics.addNode(e.index,t),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),t.attributeInfo=r,this._attributeValuesChanged(t),this._filterNode(t),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode((t=>e.push(t.node.id))),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode((t=>e.push(t.node))),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode(((t,r)=>e.push(r)))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t&&null!=t.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t&&null!=t.attributeInfo)return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r&&null!=r.attributeInfo&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){if(ae(e),this._filterNode(e),this.processor.graphicsCore.labelsEnabled){const t=e.graphics.map((e=>e.uid));this.processor.graphicsCore.updateLabelingInfo(t)}}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||b}_getGlobalIdField(){return this.layer.associatedLayer?.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every(((e,t)=>s[t]===o[t]))||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&i.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode((e=>this._filterNode(e)))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const t=this.parsedDefinitionExpression,i=this._excludeObjectIdsSorted,s=this._getObjectIdField();for(const o of e.graphics){const e=o.visible,a=!t||this._evaluateClause(t,o),n=null==i||r(i,o.attributes[s])<0;o.visible=a&&n,e!==o.visible&&(ue.graphic=o,ue.property="visible",ue.oldValue=e,ue.newValue=o.visible,this.processor.graphicsCore.graphicUpdateHandler(ue))}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return null!=this.filter?this.filter.createQuery(e):new N(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():N.from(e))}_setupQueryEngine(){const e=()=>this.processor.featureStore;this._queryEngine=new D({context:{spatialReference:this.view.spatialReference,layer:this.layer,scheduler:this.view.resourceController.scheduler,get featureStore(){return e()},hasZ:this.hasZ,hasM:this.hasM},priority:J.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await G(t,e);A(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode((t=>e(t.node,t.featureIds))),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){const e={displayedNumberOfFeatures:this.loadedGraphics.length,maximumNumberOfFeatures:this.maximumNumberOfFeatures,totalNumberOfFeatures:-1,nodes:this.loadedGraphics.nodeCount,core:this.processor.graphicsCore.performanceInfo};return this._controller&&this._controller.updateStats(e),e}get test(){return{controller:this._controller,numNodes:this.loadedGraphics.nodeCount,loadedGraphics:this.loadedGraphics}}};e([l()],te.prototype,"processor",void 0),e([l({type:w})],te.prototype,"filter",void 0),e([l()],te.prototype,"loadedGraphics",void 0),e([l()],te.prototype,"i3slayer",null),e([l()],te.prototype,"_controller",void 0),e([l()],te.prototype,"updating",void 0),e([l()],te.prototype,"suspended",void 0),e([l()],te.prototype,"holeFilling",void 0),e([l(W)],te.prototype,"updatingProgress",void 0),e([l()],te.prototype,"updatingProgressValue",null),e([l(X.requiredFields)],te.prototype,"requiredFields",null),e([l(X.availableFields)],te.prototype,"availableFields",void 0),e([l()],te.prototype,"_fieldsHelper",void 0),e([l({type:Number})],te.prototype,"maximumNumberOfFeatures",null),e([l({readOnly:!0})],te.prototype,"maximumNumberOfFeaturesExceeded",null),e([l()],te.prototype,"_excludeObjectIdsSorted",null),e([l({readOnly:!0})],te.prototype,"lodFactor",null),e([l({readOnly:!0})],te.prototype,"hasM",null),e([l({readOnly:!0})],te.prototype,"hasZ",null),e([l()],te.prototype,"contentVisible",null),e([l({readOnly:!0})],te.prototype,"legendEnabled",null),te=e([d("esri.views.3d.layers.SceneLayerGraphicsView3D")],te);const re=te;function ie(e){return"pointData"in e}function se(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function oe(e,t,r){const i=t.attributeInfo;if(null==i||null==i.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=Q(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function ae(e){const t=e.attributeInfo,r=e.node.index;if(null!=t&&null!=t.loadedAttributes&&null!=t.attributeData)for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=Q(t.attributeData[e],i))}}}function ne(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const le={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},de=h(),ue={graphic:null,property:null,oldValue:null,newValue:null};export{re 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 t from"../../../Graphic.js";import i from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import s from"../../../core/ReactiveSet.js";import{initial as l}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{WhereClause as a}from"../../../core/sql/WhereClause.js";import d from"../../../layers/support/FeatureFilter.js";import{getFloorFilterClause as u}from"../../../layers/support/floorFilterUtils.js";import h from"../../../rest/support/Query.js";import{sceneLayerEditingEnabled as p}from"../../../support/featureFlags.js";import{I3SMeshView3D as c}from"./I3SMeshView3D.js";import{ForAllFeaturesMode as y}from"./II3SMeshView3D.js";import{LayerView3D as g}from"./LayerView3D.js";import{createInteractiveEditSession as f,normalizeEditResultsEvent as m,processGeometryEdits as _,processAttributeEdits as F}from"./i3s/featureEditing.js";import{createGetFeatureExtent as b}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as j}from"./i3s/I3SMeshViewFilter.js";import{NodeFilterImpact as v}from"./i3s/I3SNode.js";import{I3SOverrides as I}from"./i3s/I3SOverrides.js";import{I3SQueryEngine as w}from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as S}from"./i3s/I3SQueryFeatureAdapter.js";import{I3SQueryFeatureStore as E}from"./i3s/I3SQueryFeatureStore.js";import{checkRecyclable as O,getIndexCrs as Q,objectIdFilter as x}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as C}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as H}from"./support/fieldProperties.js";import{PopupSceneLayerView as V}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as q}from"./support/SceneLayerViewRequiredFields.js";import{updatingProgress as D}from"../support/updatingProperties.js";import R from"../../layers/SceneLayerView.js";import{hasPopupTemplate as A}from"../../layers/support/popupUtils.js";import{TaskPriority as L}from"../../support/Scheduler.js";const U=H();let P=class extends(c(C(V(g(R))))){constructor(){super(...arguments),this.type="scene-layer-3d",this._setVisibilityHiddenObjectIds=new s,this.progressiveLoadFactor=1,this._elevationContext="scene",this._isIntegratedMesh=!1,this._supportsLabeling=!0,this._pendingEditsQueue=Promise.resolve(),this._interactiveEditingSessions=new Map,this._queryEngine=null}get i3slayer(){return this.layer}tryRecycleWith(e,t){return e.url===this.layer.url&&this.i3sOverrides.isEmpty?e.load(t).then((()=>{O(this.layer,e,this.i3sOverrides),this.layer=e,this.i3sOverrides.destroy();const t=this.view.resourceController?.memoryController;this.i3sOverrides=new I({view:this.view,layer:e,memoryController:t}),this.resetHighlights()})):null}get layerPopupEnabledAndHasTemplate(){return this.layer.popupEnabled&&A(this.layer,this.view.popup?.defaultPopupTemplateEnabled)}get filter(){return this._get("filter")}set filter(e){this._set("filter",j.checkSupport(e)?e:null)}get viewFilter(){const e=this.filter,t=this.layerFilter;if(null==e&&null==t)return null;const i=this._get("viewFilter");return null==i?new j({layerFilter:t,viewFilter:e,layerFieldsIndex:this.layer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),addSqlFilter:(e,t)=>this.addSqlFilter(e,t,this.logError)}):(i.viewFilter=e,i.layerFilter=t,i)}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get _floorFilterClause(){const e=u(this);return null!=e?a.create(e,this.layer.fieldsIndex):null}get _excludeObjectIdsSorted(){const e=this.layer.excludeObjectIds.toArray();return e.length?e.sort(((e,t)=>e-t)):null}get _setVisibilityHiddenObjectIdsSorted(){return this._setVisibilityHiddenObjectIds.size?Array.from(this._setVisibilityHiddenObjectIds).sort(((e,t)=>e-t)):null}get _objectQualitySettings(){return this.view?.qualitySettings?.sceneService?.object}get lodFactor(){return this._objectQualitySettings?.lodFactor??1}get lodCrossfadeinDuration(){return this._objectQualitySettings.lodCrossfadeinDuration??0}get lodCrossfadeoutDuration(){return this._objectQualitySettings.lodCrossfadeoutDuration??0}get lodCrossfadeUncoveredDuration(){return this._objectQualitySettings.lodCrossfadeUncoveredDuration??0}get updatingProgressValue(){return this._controller?.updatingProgress??0}initialize(){this._fieldsHelper=new q({layerView:this}),this._updatingHandles.add((()=>this.layer.rangeInfos),(e=>this._rangeInfosChanged(e)),l),this._updatingHandles.add((()=>this.layer.renderer),(e=>this._updatingHandles.addPromise(this._rendererChange(e))),l);const e=()=>this._filterChange();this._updatingHandles.add((()=>this.parsedDefinitionExpression),e),this._updatingHandles.add((()=>this.filter),e),this._updatingHandles.add((()=>this._floorFilterClause),e),this._updatingHandles.add((()=>this._excludeObjectIdsSorted),e),this._updatingHandles.add((()=>this._setVisibilityHiddenObjectIdsSorted),e),this._updatingHandles.add((()=>null!=this.viewFilter?this.viewFilter.sortedObjectIds:null),e),this._updatingHandles.add((()=>null!=this.viewFilter?this.viewFilter.parsedWhereClause:null),e),this._updatingHandles.add((()=>[null!=this.viewFilter?this.viewFilter.parsedGeometry:null,null!=this.filter?this.filter.spatialRelationship:null,null!=this.layer.filter?this.layer.filter.spatialRelationship:null]),(()=>this._geometryFilterChange())),p()&&this.i3sOverrides.is3DOFL&&this._updatingHandles.add((()=>this.i3sOverrides.sortedGeometryChangedObjectIds),e),this.addHandles(this.layer.on("apply-edits",(e=>this._updatingHandles.addPromise(e.result)))),this.addHandles(this.layer.on("edits",(e=>{const t=new Promise((t=>{this._pendingEditsQueue.then((()=>this._handleEdits(e))).then((()=>t()))}));this._updatingHandles.addPromise(t)})))}destroy(){this._fieldsHelper=r(this._fieldsHelper)}_rangeInfosChanged(e){null!=e&&e.length>0&&i.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}createQuery(){const e={outFields:["*"],returnGeometry:!1,outSpatialReference:this.view.spatialReference};return null!=this.filter?this.filter.createQuery(e):new h(e)}queryExtent(e,t){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),t?.signal)}queryFeatures(e,t){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),t?.signal).then((e=>{if(!e?.features)return e;const t=this.layer;for(const i of e.features)i.layer=t,i.sourceLayer=t;return e}))}queryObjectIds(e,t){return this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),t?.signal)}_ensureQueryEngine(){return this._queryEngine||(this._queryEngine=this._createQueryEngine()),this._queryEngine}_createQueryEngine(){const e=b(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new w({layerView:this,priority:L.FEATURE_QUERY_ENGINE,spatialIndex:new E({featureAdapter:new S({objectIdField:this.layer.objectIdField,attributeStorageInfo:this.layer.attributeStorageInfo??[],getFeatureExtent:e}),forAllFeatures:(e,t)=>this._forAllFeatures(((t,i,r)=>e({id:t,index:i,meta:r})),t,y.QUERYABLE),getFeatureExtent:e,sourceSpatialReference:Q(this.layer),viewSpatialReference:this.view.spatialReference})})}highlight(e){const t=this._highlights;if(e instanceof h){const{set:i,handle:r}=t.acquireSet();return this.queryObjectIds(e).then((e=>t.setFeatureIds(i,e))),r}return super.highlight(e)}createInteractiveEditSession(e){return f(this._attributeEditingContext,e)}_createLayerGraphic(e){const i=new t(null,null,e);return i.layer=this.layer,i.sourceLayer=this.layer,i}getFilters(){const e=super.getFilters();p()&&this.i3sOverrides.is3DOFL&&this.i3sOverrides.sortedGeometryChangedObjectIds.length>0&&e.push(((e,t)=>{t.node.index>=0&&x(this.i3sOverrides.sortedGeometryChangedObjectIds,!1,e)}));const t=this._setVisibilityHiddenObjectIdsSorted;null!=t&&e.push((e=>x(t,!1,e)));const i=this._excludeObjectIdsSorted;return null!=i&&e.push((e=>x(i,!1,e))),this._floorFilterClause&&this.addSqlFilter(e,this._floorFilterClause,this.logError),this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),null!=this.viewFilter&&this.viewFilter.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}setVisibility(e,t){t?this._setVisibilityHiddenObjectIds.delete(e):this._setVisibilityHiddenObjectIds.add(e)}isUpdating(){return super.isUpdating()||this.layerFilterUpdating||null!=this.viewFilter&&this.viewFilter.updating||null!=this.i3sOverrides&&this.i3sOverrides.updating}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():h.from(e))}get _attributeEditingContext(){return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:this._getObjectIdField(),globalIdField:this._getGlobalIdField(),forEachNode:e=>this._forAllNodes((t=>null!=t?e(t.node,t.featureIds):null)),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this.i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(e,t)=>this.setAttributeData(e,t),clearMemCache:()=>this.clearMemCache()}}async _handleEdits(e){const t=p(),i=this._attributeEditingContext,r=await m(i,e);t&&_(i,r),F(i,r)}get hasGeometryFilter(){const e=this.viewFilter;return null!=e&&null!=e.parsedGeometry}computeNodeFiltering(e){const t=this.viewFilter;return null==t||!this.view.spatialReference||t.isMBSGeometryVisible(e,this.view.spatialReference,this._controller.crsIndex)?v.Unmodified:v.Culled}};e([n()],P.prototype,"i3slayer",null),e([n(D)],P.prototype,"updatingProgress",void 0),e([n({type:d})],P.prototype,"filter",null),e([n({readOnly:!0})],P.prototype,"viewFilter",null),e([n(U.requiredFields)],P.prototype,"requiredFields",null),e([n(U.availableFields)],P.prototype,"availableFields",void 0),e([n()],P.prototype,"_fieldsHelper",void 0),e([n()],P.prototype,"_floorFilterClause",null),e([n()],P.prototype,"_excludeObjectIdsSorted",null),e([n()],P.prototype,"_setVisibilityHiddenObjectIds",void 0),e([n()],P.prototype,"_setVisibilityHiddenObjectIdsSorted",null),e([n()],P.prototype,"_objectQualitySettings",null),e([n()],P.prototype,"lodFactor",null),e([n()],P.prototype,"updatingProgressValue",null),P=e([o("esri.views.3d.layers.SceneLayerView3D")],P);const G=P;export{G as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import i from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import s from"../../../core/ReactiveSet.js";import{initial as l}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{WhereClause as a}from"../../../core/sql/WhereClause.js";import d from"../../../layers/support/FeatureFilter.js";import{getFloorFilterClause as u}from"../../../layers/support/floorFilterUtils.js";import h from"../../../rest/support/Query.js";import{sceneLayerEditingEnabled as p}from"../../../support/featureFlags.js";import{I3SMeshView3D as c}from"./I3SMeshView3D.js";import{ForAllFeaturesMode as y}from"./II3SMeshView3D.js";import{LayerView3D as g}from"./LayerView3D.js";import{createInteractiveEditSession as f,normalizeEditResultsEvent as m,processGeometryEdits as _,processAttributeEdits as F}from"./i3s/featureEditing.js";import{createGetFeatureExtent as b}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as j}from"./i3s/I3SMeshViewFilter.js";import{NodeFilterImpact as v}from"./i3s/I3SNode.js";import{I3SOverrides as I}from"./i3s/I3SOverrides.js";import{I3SQueryEngine as w}from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as S}from"./i3s/I3SQueryFeatureAdapter.js";import{I3SQueryFeatureStore as E}from"./i3s/I3SQueryFeatureStore.js";import{checkRecyclable as O,getIndexCrs as Q,objectIdFilter as x}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as C}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as H}from"./support/fieldProperties.js";import{PopupSceneLayerView as V}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as q}from"./support/SceneLayerViewRequiredFields.js";import{updatingProgress as D}from"../support/updatingProperties.js";import R from"../../layers/SceneLayerView.js";import{hasPopupTemplate as A}from"../../layers/support/popupUtils.js";import{TaskPriority as L}from"../../support/Scheduler.js";const U=H();let G=class extends(c(C(V(g(R))))){constructor(){super(...arguments),this.type="scene-layer-3d",this._setVisibilityHiddenObjectIds=new s,this.progressiveLoadFactor=1,this._elevationContext="scene",this._isIntegratedMesh=!1,this._supportsLabeling=!0,this._pendingEditsQueue=Promise.resolve(),this._interactiveEditingSessions=new Map,this._queryEngine=null}get i3slayer(){return this.layer}tryRecycleWith(e,t){return e.url===this.layer.url&&this.i3sOverrides.isEmpty?e.load(t).then((()=>{O(this.layer,e,this.i3sOverrides),this.layer=e,this.i3sOverrides.destroy();const t=this.view.resourceController?.memoryController;this.i3sOverrides=new I({view:this.view,layer:e,memoryController:t}),this.resetHighlights()})):null}get layerPopupEnabledAndHasTemplate(){return this.layer.popupEnabled&&A(this.layer,this.view.popup?.defaultPopupTemplateEnabled)}get filter(){return this._get("filter")}set filter(e){this._set("filter",j.checkSupport(e)?e:null)}get viewFilter(){const e=this.filter,t=this.layerFilter;if(null==e&&null==t)return null;const i=this._get("viewFilter");return null==i?new j({layerFilter:t,viewFilter:e,layerFieldsIndex:this.layer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),addSqlFilter:(e,t)=>this.addSqlFilter(e,t,this.logError)}):(i.viewFilter=e,i.layerFilter=t,i)}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get _floorFilterClause(){const e=u(this);return null!=e?a.create(e,this.layer.fieldsIndex):null}get _excludeObjectIdsSorted(){const e=this.layer.excludeObjectIds.toArray();return e.length?e.sort(((e,t)=>e-t)):null}get _setVisibilityHiddenObjectIdsSorted(){return this._setVisibilityHiddenObjectIds.size?Array.from(this._setVisibilityHiddenObjectIds).sort(((e,t)=>e-t)):null}get _objectQualitySettings(){return this.view?.qualitySettings?.sceneService?.object}get lodFactor(){return this._objectQualitySettings?.lodFactor??1}get lodCrossfadeinDuration(){return this._objectQualitySettings.lodCrossfadeinDuration??0}get lodCrossfadeoutDuration(){return this._objectQualitySettings.lodCrossfadeoutDuration??0}get lodCrossfadeUncoveredDuration(){return this._objectQualitySettings.lodCrossfadeUncoveredDuration??0}get updatingProgressValue(){return this._controller?.updatingProgress??0}initialize(){this._fieldsHelper=new q({layerView:this}),this._updatingHandles.add((()=>this.layer.rangeInfos),(e=>this._rangeInfosChanged(e)),l),this._updatingHandles.add((()=>this.layer.renderer),(e=>this._updatingHandles.addPromise(this._rendererChange(e))),l);const e=()=>this._filterChange();this._updatingHandles.add((()=>this.parsedDefinitionExpression),e),this._updatingHandles.add((()=>this.filter),e),this._updatingHandles.add((()=>this._floorFilterClause),e),this._updatingHandles.add((()=>this._excludeObjectIdsSorted),e),this._updatingHandles.add((()=>this._setVisibilityHiddenObjectIdsSorted),e),this._updatingHandles.add((()=>null!=this.viewFilter?this.viewFilter.sortedObjectIds:null),e),this._updatingHandles.add((()=>null!=this.viewFilter?this.viewFilter.parsedWhereClause:null),e),this._updatingHandles.add((()=>[null!=this.viewFilter?this.viewFilter.parsedGeometry:null,null!=this.filter?this.filter.spatialRelationship:null,null!=this.layer.filter?this.layer.filter.spatialRelationship:null]),(()=>this._geometryFilterChange())),p()&&this.i3sOverrides.is3DOFL&&this._updatingHandles.add((()=>this.i3sOverrides.sortedGeometryChangedObjectIds),e),this.addHandles(this.layer.on("apply-edits",(e=>this._updatingHandles.addPromise(e.result)))),this.addHandles(this.layer.on("edits",(e=>{const t=this._pendingEditsQueue.then((()=>this._handleEdits(e))).then();this._pendingEditsQueue=t,this._updatingHandles.addPromise(t)})))}destroy(){this._fieldsHelper=r(this._fieldsHelper)}_rangeInfosChanged(e){null!=e&&e.length>0&&i.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}createQuery(){const e={outFields:["*"],returnGeometry:!1,outSpatialReference:this.view.spatialReference};return null!=this.filter?this.filter.createQuery(e):new h(e)}queryExtent(e,t){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),t?.signal)}queryFeatures(e,t){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),t?.signal).then((e=>{if(!e?.features)return e;const t=this.layer;for(const i of e.features)i.layer=t,i.sourceLayer=t;return e}))}queryObjectIds(e,t){return this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),t?.signal)}_ensureQueryEngine(){return this._queryEngine||(this._queryEngine=this._createQueryEngine()),this._queryEngine}_createQueryEngine(){const e=b(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new w({layerView:this,priority:L.FEATURE_QUERY_ENGINE,spatialIndex:new E({featureAdapter:new S({objectIdField:this.layer.objectIdField,attributeStorageInfo:this.layer.attributeStorageInfo??[],getFeatureExtent:e}),forAllFeatures:(e,t)=>this._forAllFeatures(((t,i,r)=>e({id:t,index:i,meta:r})),t,y.QUERYABLE),getFeatureExtent:e,sourceSpatialReference:Q(this.layer),viewSpatialReference:this.view.spatialReference})})}highlight(e){const t=this._highlights;if(e instanceof h){const{set:i,handle:r}=t.acquireSet();return this.queryObjectIds(e).then((e=>t.setFeatureIds(i,e))),r}return super.highlight(e)}createInteractiveEditSession(e){return f(this._attributeEditingContext,e)}_createLayerGraphic(e){const i=new t(null,null,e);return i.layer=this.layer,i.sourceLayer=this.layer,i}getFilters(){const e=super.getFilters();p()&&this.i3sOverrides.is3DOFL&&this.i3sOverrides.sortedGeometryChangedObjectIds.length>0&&e.push(((e,t)=>{t.node.index>=0&&x(this.i3sOverrides.sortedGeometryChangedObjectIds,!1,e)}));const t=this._setVisibilityHiddenObjectIdsSorted;null!=t&&e.push((e=>x(t,!1,e)));const i=this._excludeObjectIdsSorted;return null!=i&&e.push((e=>x(i,!1,e))),this._floorFilterClause&&this.addSqlFilter(e,this._floorFilterClause,this.logError),this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),null!=this.viewFilter&&this.viewFilter.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}setVisibility(e,t){t?this._setVisibilityHiddenObjectIds.delete(e):this._setVisibilityHiddenObjectIds.add(e)}isUpdating(){return super.isUpdating()||this.layerFilterUpdating||null!=this.viewFilter&&this.viewFilter.updating||null!=this.i3sOverrides&&this.i3sOverrides.updating}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():h.from(e))}get _attributeEditingContext(){return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:this._getObjectIdField(),globalIdField:this._getGlobalIdField(),forEachNode:e=>this._forAllNodes((t=>null!=t?e(t.node,t.featureIds):null)),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this.i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(e,t)=>this.setAttributeData(e,t),clearMemCache:()=>this.clearMemCache()}}async _handleEdits(e){const t=p(),i=this._attributeEditingContext,r=await m(i,e);t&&_(i,r),F(i,r)}get hasGeometryFilter(){const e=this.viewFilter;return null!=e&&null!=e.parsedGeometry}computeNodeFiltering(e){const t=this.viewFilter;return null==t||!this.view.spatialReference||t.isMBSGeometryVisible(e,this.view.spatialReference,this._controller.crsIndex)?v.Unmodified:v.Culled}};e([n()],G.prototype,"i3slayer",null),e([n(D)],G.prototype,"updatingProgress",void 0),e([n({type:d})],G.prototype,"filter",null),e([n({readOnly:!0})],G.prototype,"viewFilter",null),e([n(U.requiredFields)],G.prototype,"requiredFields",null),e([n(U.availableFields)],G.prototype,"availableFields",void 0),e([n()],G.prototype,"_fieldsHelper",void 0),e([n()],G.prototype,"_floorFilterClause",null),e([n()],G.prototype,"_excludeObjectIdsSorted",null),e([n()],G.prototype,"_setVisibilityHiddenObjectIds",void 0),e([n()],G.prototype,"_setVisibilityHiddenObjectIdsSorted",null),e([n()],G.prototype,"_objectQualitySettings",null),e([n()],G.prototype,"lodFactor",null),e([n()],G.prototype,"updatingProgressValue",null),G=e([o("esri.views.3d.layers.SceneLayerView3D")],G);const P=G;export{P 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{B as t,m as e,i as a,h as s,d as r}from"../../../../chunks/mat4.js";import{I as i,a as o}from"../../../../chunks/mat4f64.js";import{i as n}from"../../../../chunks/vec3.js";import{c as m}from"../../../../chunks/vec3f64.js";import{perObjectElevationAligner as l}from"./ElevationAligners.js";import{evaluateElevationInfoAtPoint as f}from"./elevationAlignmentUtils.js";import{setContextFeature as c}from"./featureExpressionInfoUtils.js";import{Graphics3DObject3DGraphicLayer as h}from"./Graphics3DObject3DGraphicLayer.js";class d extends h{constructor(){super(...arguments),this._originalGeometries=[],this._fastTransformUpdatesEnabled=!1}get fastTransformUpdatesEnabled(){return this._fastTransformUpdatesEnabled}enableFastTransformUpdates(e,a){if(this._fastTransformUpdatesEnabled)return;this._fastTransformUpdatesEnabled=!0;const{stageObject:s}=this,r=s.geometries.slice();s.removeAllGeometries();const i=t(g,s.transformation),o=a.getOrigin(i);for(const t of r){const a=e(t.material),r=t.instantiate({material:a});r.localOrigin=o,s.addGeometry(r)}this._originalGeometries=r}disableFastTransformUpdates(t){if(!this._fastTransformUpdatesEnabled)return;this._fastTransformUpdatesEnabled=!1;const{stageObject:e}=this,a=e.geometries.map((e=>t(e.material)));e.removeAllGeometries();for(let s=0;s<this._originalGeometries.length;s++){const t=this._originalGeometries[s],r=a[s];r.setParameters({modelTransformation:null}),r===t.material?e.addGeometry(t):e.addGeometry(t.instantiate({material:r}))}this._originalGeometries.length=0}updateFastLocalOrigin(e,a,s){if(!this._fastTransformUpdatesEnabled)return;const{stageObject:r}=this;if(0===r.geometries.length)return;const o=r.geometries[0].localOrigin,n=t(g,e),m=s.getOrigin(n);if(m===o)return;const l=a?.localMatrix??i;r.shaderTransformation=null,r.transformation=e,r.geometries.forEach((t=>{t.transformation=l,t.localOrigin=m}))}updateTransform(t,s,r){const{stageObject:o}=this,n=s?.localMatrix??i;if(!this._fastTransformUpdatesEnabled)return o.shaderTransformation=null,o.transformation=t,o.geometries.forEach((t=>{t.transformation=n})),void this.resetEdgeObject(r);const m=o.transformation,l=o.geometries[0].transformation,f=t,c=n,h=e(p,m,l),d=e(u,f,c),g=e(b,d,a(b,l));o.shaderTransformation=g,this._setFastMaterialTransformation({matA:h,matB:d}),this.resetEdgeObject(r)}alignWithElevation(t,a,r,i){if(!this._fastTransformUpdatesEnabled)return void super.alignWithElevation(t,a,r,i);null!=r&&c(this.elevationContext.featureExpressionInfoContext,r);const o=(e,s)=>f(e,t,this.elevationContext,a,s),{stageObject:n}=this;if(!n.geometries[0].material.parameters.modelTransformation)return;const m=n.transformation,h=n.geometries[0].transformation,d=e(p,m,h),g=n.effectiveTransformation,b=s(T,g);this.alignedSampledElevation=l(this,this.elevationContext,t.spatialReference,o,a,b),n.shaderTransformation=b;const E=n.geometries[0].transformation,j=e(u,b,E);this._setFastMaterialTransformation({matA:d,matB:j}),this.resetEdgeObject(i)}_setFastMaterialTransformation({matA:t,matB:s}){const{stageObject:i}=this;if(0===i.geometries.length)return;const o=i.geometries[0].localOrigin,m=r(O,n(g,o.vec3,-1)),l=e(E,m,t),f=e(j,m,s),c=a(E,l),h=e(j,f,c);for(const e of i.geometries)e.material.setParameters({modelTransformation:h})}}const g=m(),p=o(),u=o(),T=o(),b=o(),E=o(),j=o(),O=o();export{d as Graphics3DMeshObject3DGraphicLayer};
5
+ import{B as t,m as e,i as a,h as s,d as r}from"../../../../chunks/mat4.js";import{I as i,a as o}from"../../../../chunks/mat4f64.js";import{i as n}from"../../../../chunks/vec3.js";import{c as m}from"../../../../chunks/vec3f64.js";import{perObjectElevationAligner as f}from"./ElevationAligners.js";import{evaluateElevationInfoAtPoint as l}from"./elevationAlignmentUtils.js";import{setContextFeature as d}from"./featureExpressionInfoUtils.js";import{Graphics3DObject3DGraphicLayer as c}from"./Graphics3DObject3DGraphicLayer.js";class g extends c{constructor(){super(...arguments),this._originalGeometries=[],this._fastTransformUpdatesEnabled=!1}get fastTransformUpdatesEnabled(){return this._fastTransformUpdatesEnabled}enableFastTransformUpdates(e,a){if(this._fastTransformUpdatesEnabled)return;this._fastTransformUpdatesEnabled=!0;const{stageObject:s}=this,r=s.geometries.slice();s.removeAllGeometries();const i=t(h,s.transformation),o=a.getOrigin(i);for(const t of r){const a=e(t.material),r=t.instantiate({material:a});r.localOrigin=o,s.addGeometry(r)}this._originalGeometries=r}disableFastTransformUpdates(t){if(!this._fastTransformUpdatesEnabled)return;this._fastTransformUpdatesEnabled=!1;const{stageObject:e}=this,a=e.geometries.map((e=>t(e.material)));e.removeAllGeometries();for(let s=0;s<this._originalGeometries.length;s++){const t=this._originalGeometries[s],r=a[s];r.setParameters({modelTransformation:null}),r===t.material?e.addGeometry(t):e.addGeometry(t.instantiate({material:r}))}this._originalGeometries.length=0}updateFastLocalOrigin(e,a,s){if(!this._fastTransformUpdatesEnabled)return;const{stageObject:r}=this;if(0===r.geometries.length)return;const o=r.geometries[0].localOrigin,n=t(h,e),m=s.getOrigin(n);if(m===o)return;const f=a?.localMatrix??i;r.shaderTransformation=null,r.transformation=e,r.geometries.forEach((t=>{t.transformation=f,t.localOrigin=m}))}updateTransform(t,s,r){const{stageObject:o}=this,n=s?.localMatrix??i;if(!this._fastTransformUpdatesEnabled)return o.shaderTransformation=null,o.transformation=t,o.geometries.forEach((t=>{t.transformation=n})),void this.resetEdgeObject(r);const m=o.transformation,f=o.geometries[0].transformation,l=t,d=n,c=e(p,m,f),g=e(T,l,d),h=e(E,g,a(E,f));o.shaderTransformation=h,this._setFastMaterialTransformation({matA:c,matB:g}),this._fastUpdateEdgeTransform()||this.resetEdgeObject(r)}alignWithElevation(t,a,r,i){if(!this._fastTransformUpdatesEnabled)return void super.alignWithElevation(t,a,r,i);null!=r&&d(this.elevationContext.featureExpressionInfoContext,r);const o=(e,s)=>l(e,t,this.elevationContext,a,s),{stageObject:n}=this;if(!n.geometries[0].material.parameters.modelTransformation)return;const m=n.transformation,c=n.geometries[0].transformation,g=e(p,m,c),h=n.effectiveTransformation,E=s(u,h);this.alignedSampledElevation=f(this,this.elevationContext,t.spatialReference,o,a,E),n.shaderTransformation=E;const b=n.geometries[0].transformation,_=e(T,E,b);this._setFastMaterialTransformation({matA:g,matB:_}),this._fastUpdateEdgeTransform()||this.resetEdgeObject(i)}_setFastMaterialTransformation({matA:t,matB:s}){const{stageObject:i}=this;if(0===i.geometries.length)return;const o=i.geometries[0].localOrigin,m=r(j,n(h,o.vec3,-1)),f=e(b,m,t),l=e(_,m,s),d=a(b,f),c=e(_,l,d);for(const e of i.geometries)e.material.setParameters({modelTransformation:c})}_fastUpdateEdgeTransform(){return this._stageLayer.stage.renderer.ensureEdgeView().fastUpdateObject3DEdgesTransform(this.stageObject)}}const h=m(),p=o(),T=o(),u=o(),E=o(),b=o(),_=o(),j=o();export{g as Graphics3DMeshObject3DGraphicLayer};
@@ -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"../../../../core/PooledArray.js";import{isAbortError as t}from"../../../../core/promiseUtils.js";import{l as i}from"../../../../chunks/vec3.js";import{projectBoundingSphere as n}from"../../../../geometry/projection/projectBoundingSphere.js";import{f as s,h as o,u as r,c as a}from"../../../../chunks/sphere.js";import{i3sPatchingEnabled as l}from"../../../../support/featureFlags.js";import{LodMetric as d,NodeBase as h,Node as u,NodeFilterImpact as c,NodeIMModificationImpact as g,NodeTraversalState as _}from"./I3SNode.js";import{invalidateMbs as f,invalidateObb as m,addWraparound as v}from"./I3SUtil.js";import{clone as b}from"../../support/orientedBoundingBox.js";class p{constructor(e,t,i,n,s){this.childOffset=e,this.childCount=t,this.visibilityCache=i,this.ref=n,this.node=s,this.useAsHole=0,this.filterImpact=c.NotChecked,this.traversalState=null,this.parent=-1}}class N{constructor(t,i,n,s,o,r,a,h,u,c,g,_,f,m,v){this._layer=t,this._streamDataController=n,this._clientNodeLoader=s,this._viewportQueries=o,this._logger=r,this.holeFilling=a,this._isLoaded=h,this._isReloading=u,this._isSelected=c,this._enable=g,this._needsUpdate=_,this._canRequest=f,this._computeVisibilityObb=m,this._computeNodeFiltering=v,this._dirty=!0,this._nodePages=new Map,this._clientNodePage=null,this._nodeCount=0,this._nodesPerPage=0,this._rootIndex=0,this._lodMetric=d.None,this._lodConversion=e=>e,this._isEditable=!1,this._urlPrefix="",this._loading=new Set,this._failedNodes=new Set,this._failedPages=new Set,this._indexMissing=1,this._maxUnloadedPrio=Number.NEGATIVE_INFINITY,this._maxProcessingPrio=Number.POSITIVE_INFINITY,this._version=C(0),this._visibilityCacheVersion=C(0),this._maxLevel=1,this._featureEstimate={estimate:0,leavesReached:!1},this._unloadedMemoryEstimate=0,this._missing=new e({deallocator:null}),this._prefetch=new e({deallocator:null}),this._updates=new y(this._missing),this._imModificationUncategorized=new e({deallocator:null}),this.ignoreServiceObb=!1,this.progressiveLoadPenalty=0,this._pageQueue=new Array,this._newPages=new Array,this.needNodeElevationRange=!1,this.layerHasModifications=!1,this._layerHasFilter=!1,this._frameNumber=0,this._isEditable=l()&&null!=t.associatedLayer&&null!=t.associatedLayer.infoFor3D,t.serviceUpdateTimeStamp&&t.serviceUpdateTimeStamp.lastUpdate&&(this._lastUpdate=`${t.serviceUpdateTimeStamp.lastUpdate}`),this._maxLodLevel=this._viewportQueries?this._viewportQueries.maxLodLevel:1,this._init(i)}_init(e){if("page"===e.type){const t=e.rootPage;switch(this._urlPrefix=e.urlPrefix,this._nodesPerPage=e.pageSize,e.lodMetric){case"maxScreenThreshold":this._lodMetric=d.MaxScreenThreshold;break;case"maxScreenThresholdSQ":this._lodMetric=d.MaxScreenThreshold,this._lodConversion=F}if(this._isEditable){this._rootIndex=-1;const i=O(e.rootIndex,e.pageSize),n=t.nodes[i],s={nodes:[{index:this._rootIndex,children:[e.rootIndex],mesh:void 0,obb:n.obb,lodThreshold:n.lodThreshold}]};this._addPage(E(this._rootIndex,this._nodesPerPage),s),this.getNode(-1).serviceObb=void 0}else this._rootIndex=e.rootIndex;this._addPage(E(e.rootIndex,this._nodesPerPage),t),this._updateParentsAndLevel()}else if("node"===e.type){this._urlPrefix=e.urlPrefix;const t=S();if(this._nodePages.set(0,t),this._isEditable){this._clientNodePage=S();const t={id:"-1",version:null,mbs:e.rootNode.mbs,obb:e.rootNode.obb,sharedResource:null,geometryData:null,attributeData:null,featureData:null,children:[{id:"root",href:"../root",mbs:e.rootNode.mbs,obb:e.rootNode.obb}]};this._rootIndex=this._makeClientRefNode(new h(t.id,null),-1);const i=this._validateNode(t.id,t);i&&this._addNode(i,this._rootIndex)}else this._rootIndex=this._makeRefNode(new h(e.rootNode.id,null),-1);const i=this._validateNode(e.rootNode.id,e.rootNode);i&&this._addNode(i,0)}}addClientNodeToIndex(e,t){const i=-1,n=new h(e,t),s=this._makeClientRefNode(n,i);return this._linkChildToParentNode(i,s),this.requestUpdate(),s}removeClientNodeFromIndex(e,t,i){this._destroyClientRefNode(e,t,i),this.requestUpdate()}_loadPage(e){this._loading.add(e);const i=this._urlPrefix+e;this._streamDataController.request(i,"json").then((t=>{this._pageQueue.push({pageIndex:e,page:t})})).catch((i=>{this._loading.delete(e),t(i)||(this._failedPages.add(e),this._logger.error("#loadPage()",this._layer,`Error when loading page ${e}`,i))}))}_addQueuedPages(e){for(;this._pageQueue.length>0&&!e.done;){const{pageIndex:t,page:i}=this._pageQueue.shift();this._addPage(t,i),this._loading.delete(t),e.madeProgress(),this.needNodeElevationRange&&this._newPages.push(t)}this._updateParentsAndLevel()}_invalidateElevationRangeForNewPages(e){if(this.needNodeElevationRange)for(;this._newPages.length>0&&!e.done;){const e=this._nodePages.get(this._newPages.shift());if(null==e)continue;const t=e.nodes;for(let i=0;i<this._nodesPerPage;i++){let e=t[i].parent;for(;null!=e&&e!==this._rootIndex;){const t=this.getNode(e);t&&!Number.isNaN(t?.elevationRangeMin)&&(t.invalidateElevationRange(),this.invalidateBoundingVolumeCache(e)),e=this.getParentIndex(e)}}}}_addPage(e,t){const n=[],o=[],r=t.nodes.map(((t,r)=>{const a=n.length,l=t.children?t.children.length:0;o.push(this._rootIndex);for(let e=0;e<l;e++)n.push(t.children[e]);const d=`${t.index}`,h=b(t.obb),c=s(h.center[0],h.center[1],h.center[2],i(h.halfSize)),g=t.mesh&&t.mesh.attribute,_=t.mesh&&t.mesh.geometry,f=t.mesh&&t.mesh.material,m={hasSharedResource:!1,isEmpty:null==_,attributes:g&&null!=g.resource?`${g.resource}`:void 0,geometry:_&&null!=_.resource?`${_.resource}`:void 0,texture:f&&null!=f.resource?`${f.resource}`:void 0,geometryDefinition:_?_.definition:-1,materialDefinition:f?f.definition:-1},v=new u(d,L(r,e,this._nodesPerPage),c,l,0,m,this._lastUpdate,this._lodMetric,this._lodConversion(t.lodThreshold),_?_.featureCount:null);return v.serviceObb=h,v.visibilityObb=this._computeVisibilityObb(v),v.vertexCount=_?_.vertexCount:0,new p(a,l,I(this._visibilityCacheVersion),null,v)})),a=S(r,n);-1===e?this._clientNodePage=a:this._nodePages.set(e,a),this._nodeCount+=r.length}_updateParentsAndLevel(){const e=new Array,t=(t,i,n)=>{const s=this._getPage(t);if(null!=s){const o=O(t,this._nodesPerPage),r=s.nodes[o];r.parent=null!=i?i:-1;const a=r.node;null!=a&&(a.level=n,e.push(t))}};for(t(this._rootIndex,null,0);e.length;){const i=e.pop(),n=this.getNode(i);if(null!=n)for(let e=0;e<n.childCount;e++){t(this.getChildIndex(n.index,e),i,n.level+1),this._maxLevel=Math.max(this._maxLevel,n.level+1)}}}_getPage(e){const t=E(e,this._nodesPerPage);return t<0?this._clientNodePage:this._nodePages.get(t)}_getNodeInternal(e){const t=this._getPage(e);return null==t?null:(t.lastTraversed=this._frameNumber,t.nodes[O(e,this._nodesPerPage)])}_addNode(e,t){null!=e.children&&this.populateChildren(t,e.children);const i=this.getParent(t),n=null!=i?i.level+1:0;this._maxLevel=Math.max(this._maxLevel,e.children?n+1:n);const{lodMetric:s,maxError:o}=k(e.lodSelection),r=this._getNodeInternal(t);return r.node=new u(e.id,t,e.mbs,r.childCount,n,e.resources,e.version,s,o,e.numFeatures),e.obb&&(r.node.serviceObb=b(e.obb)),r.node.visibilityObb=this._computeVisibilityObb(r.node),null!=r.ref&&(null==r.ref.mbs&&(r.ref.mbs=e.mbs),r.node.renderMbs=r.ref.renderMbs,r.node.serviceObbInRenderSR=r.ref.serviceObbInRenderSR,r.ref.visibilityObb=r.node.visibilityObb),r.node}_makeRefNode(e,t){const i=this._nodePages.get(0);if(t<-1)return this._makeClientRefNode(e,t);if(null==i)return-1;const n=i.nodes.length,s=new p(0,0,I(this._visibilityCacheVersion),e,null);return i.nodes.push(s),this._nodeCount++,s.parent=t,f(e.renderMbs),m(e.serviceObbInRenderSR),n}_makeClientRefNode(e,t){const i=this._clientNodePage;if(null==i)return-1;if(t>=0)throw new Error("I3SIndex::client side nodes can not be made children of service side nodes.");const n=-(i.nodes.length+1),s=new p(0,0,I(this._visibilityCacheVersion),e,null);return i.nodes.push(s),this._nodeCount++,s.parent=t,f(e.renderMbs),m(e.serviceObbInRenderSR),n}_linkChildToParentNode(e,t){const i=this._clientNodePage;if(null==i||e>=0)return;const n=O(e,this._nodesPerPage),s=O(t,this._nodesPerPage),o=i.nodes[n],r=o.childOffset;i.children.splice(o.childOffset+o.childCount,0,t);const a=1;o.childCount+=a,null!=o.node&&(o.node.childCount+=a);for(const l of i.nodes)l.childOffset>r&&(l.childOffset+=a);i.nodes[s].parent=e,this._updateParentBoundingInformation(e)}_destroyClientRefNode(e,t,i){const n=this._clientNodePage;if(null==n)return;const s=this.getParentIndex(e);if(null==s)return;const o=new Set,r=new Map,a=e=>{const i=O(e,this._nodesPerPage),s=n.nodes[i];if(s.childCount>0)for(let t=s.childOffset;t<s.childOffset+s.childCount;++t)a(n.children[t]);const r=s.node?.id??s.ref?.id;if(null==r)throw new Error("Node has no id");t(r,e),o.add(s)};a(e);const l=n.nodes,d=n.children,h=n.nodes.map((()=>-1)),u=[],c=[];for(let g=0;g<l.length;++g){const e=l[g];if(o.has(e))continue;const t=u.length,n=L(g,-1,this._nodesPerPage),s=L(t,-1,this._nodesPerPage);if(e.node&&(e.node.index=s),h[g]=s,u.push(e),n!==s){const t=e.node?.id??e.ref?.id;if(null==t)throw new Error("Node has no id");i(t,n,s),r.set(n,s)}}this._nodeCount-=l.length-u.length;for(let g=0;g<u.length;++g){const e=L(g,-1,this._nodesPerPage),t=u[g],i=c.length;for(let n=t.childOffset;n<t.childOffset+t.childCount;++n){const t=d[n];if(t>=0)c.push(t);else{const i=O(t,this._nodesPerPage),n=l[i];if(o.has(n))continue;const s=h[i];c.push(s),n.parent=e}}t.childOffset=i,t.childCount=c.length-i,t.node&&(t.node.childCount=t.childCount)}n.nodes=u,n.children=c,this._updateParentBoundingInformation(h[O(s,this._nodesPerPage)])}_updateParentBoundingInformation(e){let t=e;do{let e=null;const i=this._clientNodeLoader.indexSR,s=this._clientNodeLoader.renderSR,l=this._getNodeInternal(t);if(null==l)return;for(let a=0;a<l.childCount;a++){const l=this.getChildIndex(t,a),d=this._getNodeInternal(l),h=null!=d?d.ref||d.node:null;if(null!=h&&h.mbs[3]>0)if(null==e)e=o(h.mbs,T);else{const t=D,o=U,a=$;n(h.mbs,i,t,s),n(e,i,o,s),r(t,o,a),n(a,s,e,i)}}const d=l.ref||l.node;null!=d&&(null!=e?d.mbs=o(e,null!=d.mbs?d.mbs:a()):f(d.mbs),f(d.renderMbs),m(d.serviceObbInRenderSR),d.geometryObb=null),this.invalidateNodeVisibilityCacheInternal(l),t=this.getParentIndex(t)}while(null!=t)}populateChildren(e,t){const i=this._getNodeInternal(e),n=this._getPage(e);i.childOffset=n.children.length,i.childCount=t.length;for(let s=0;s<t.length;s++){const i=this._makeRefNode(t[s],e);n.children.push(i)}}getNode(e){const t=this._getNodeInternal(e);return null!=t?t.node:null}getIndexById(e){let t;return this._forAllNodes(((i,n)=>{(null!=i.node&&i.node.id===e||null!=i.ref&&i.ref.id===e)&&(t=n)})),t}getNodeById(e){const t=this.getIndexById(e);return null!=t&&t>=0?this.getNode(t):null}getChildIndex(e,t){const i=this._getPage(e);if(null==i)return-1;const n=i.nodes[O(e,this._nodesPerPage)];return i.children[n.childOffset+t]}getParentIndex(e){const t=this._getPage(e);return null!=t&&e!==this._rootIndex?t.nodes[O(e,this._nodesPerPage)].parent:null}getParent(e){const t=this.getParentIndex(e);return null!=t?this.getNode(t):null}isLeaf(e){const t=this._getNodeInternal(e);return null!=t&&0===t.childCount}get rootNode(){return this.getNode(this._rootIndex)}get size(){return this._nodeCount}get isEditable(){return this._isEditable}removeAllGeometryObbs(){this._forAllNodes((e=>{null!=e.node&&(e.node.geometryObb=null)}))}invalidateVisibilityCache(){this._visibilityCacheVersion=C(this._visibilityCacheVersion)}invalidateNodeVisibilityCache(e){const t=this._getNodeInternal(e);null!=t&&this.invalidateNodeVisibilityCacheInternal(t)}invalidateNodeVisibilityCacheInternal(e){e.visibilityCache=I(this._visibilityCacheVersion)}invalidateBoundingVolumeCache(e){const t=this._getNodeInternal(e);null!=t&&(x(t),this.invalidateNodeVisibilityCacheInternal(t))}updateElevationChanged(e){const t=this._getNodeInternal(e);if(null==t)return;if(!this.needNodeElevationRange)return void this.invalidateBoundingVolumeCache(e);const i=null!=t.node?t.node:t.ref;null!=i&&i.invalidateElevationRange()}invalidateGeometryVisibility(e){const t=this._getNodeInternal(e);null!=t&&null!=t.node&&(t.node.geometryObb=null,f(t.node.renderMbs),m(t.node.serviceObbInRenderSR))}invalidateVisibilityObbs(){null!=this.rootNode&&this.traverse(this.rootNode,(e=>(e.visibilityObb=this._computeVisibilityObb(e),e.geometryObb=null,!0)))}_updateElevationRange(e){this._updateElevationRangeInternal(e,null)}_updateElevationRangeInternal(e,t){const i=this._getNodeInternal(e);if(!i)return!1;const n=i?.node??i?.ref;if(!n)return!1;const s=n.elevationRangeMin;if(!Number.isNaN(s))return Q(t,n),!0;const o={elevationRangeMin:1/0,elevationRangeMax:-1/0};let r=!1;for(let l=0;l<i.childCount;l++){const t=this.getChildIndex(e,l);this._updateElevationRangeInternal(t,o)||(r=!0)}if(0===i.childCount||r){const e=null!=i.node&&!i.node.resources.isEmpty;this._viewportQueries.expandElevationRange(n,e,o)}const a=n.elevationRangeMax;return Number.isNaN(s)||s!==o.elevationRangeMin||a!==o.elevationRangeMax?(null!=i.node&&(i.node.elevationRangeMin=o.elevationRangeMin,i.node.elevationRangeMax=o.elevationRangeMax),null!=i.ref&&(i.ref.elevationRangeMin=o.elevationRangeMin,i.ref.elevationRangeMax=o.elevationRangeMax),this.invalidateBoundingVolumeCache(e),Q(t,n),!0):(Q(t,n),!0)}isNodeVisible(e){const t=this._getNodeInternal(e);if(null==t||null!=t.ref&&!t.ref.mbs)return!0;if(this.needNodeElevationRange&&this._updateElevationRange(e),!R(t.visibilityCache,this._visibilityCacheVersion)){const e=t.node,i=!e||t.ref&&!e.visibilityObb?t.ref??null:e;if(this._layerHasFilter&&this._computeNodeFiltering&&(null!=e||null!=t.ref)&&t.filterImpact===c.NotChecked){const i=null!=e?e.mbs:null!=t.ref?t.ref.mbs:null;t.filterImpact=null!=i?this._computeNodeFiltering(i):c.Unmodified}const n=null!=e&&t.filterImpact===c.Culled,s=!(null!=e&&e.imModificationImpact===g.Culled)&&(!i||this._viewportQueries.isNodeVisible(i))&&!n;return t.visibilityCache=w(s,this._visibilityCacheVersion),s}return M(t.visibilityCache)}isGeometryVisible(e){if(!this.isNodeVisible(e))return!1;const t=this._getNodeInternal(e);return!!(null==t||null==t.node||null==t.node.geometryObb||this.layerHasModifications&&t.node.imModificationImpact===g.NotChecked)||this._viewportQueries.isGeometryVisible(t.node)}_traverseCoverage(e,t,i,n,s){const o=this._getPage(e);if(null==o||0===t.childCount)return;const r=t.childOffset+t.childCount,a=new Array;for(let l=t.childOffset;l<r;++l){const e=o.children[l],t=this._getNodeInternal(e);null!=t&&null!=t.node&&this.isGeometryVisible(e)&&a.push(t)}n/=a.length;for(const l of a){const e=l.node.index;this._isLoaded(e)||this._isReloading(e)?(s.delta=Math.max(s.delta,i),s.coverage+=n):this._traverseCoverage(e,l,i+1,n,s)}}useNodeAsHole(e){if("off"===this.holeFilling)return!1;const t=this._getNodeInternal(e);if(null==t)return!1;if("always"===this.holeFilling)return!0;if(R(t.useAsHole,this._version))return M(t.useAsHole);const i={delta:0,coverage:0};this._traverseCoverage(e,t,0,1,i);const n=i.delta*i.coverage<=.5;return t.useAsHole=w(n,this._version),n}get maxLevel(){return this._maxLevel}get dirty(){return this._dirty}destroy(){this._updates.add.prune(),this._updates.update.prune()}requestUpdate(){this._dirty=!0,this._indexMissing=1,this._version=C(this._version)}imModificationsChanged(e){this.layerHasModifications=e,this._forAllNodes((({node:e})=>{null!=e&&(e.imModificationImpact=g.NotChecked,e.visibilityObb=this._computeVisibilityObb(e),e.hasModifications&&this.invalidateGeometryVisibility(e.index))})),this.invalidateVisibilityCache()}layerFilterChanged(e){this._layerHasFilter=e,this._forAllNodes((e=>{if(null!=e){e.filterImpact=c.NotChecked;const t=e.node;null!=t&&this.invalidateNodeVisibilityCache(t.index)}})),this.invalidateVisibilityCache()}update(e,t,i){if(!this._dirty)return;this._pageQueue.length>0&&this._addQueuedPages(t),this._invalidateElevationRangeForNewPages(t),this._maxUnloadedPrio=Number.NEGATIVE_INFINITY,this._maxProcessingPrio=Number.NEGATIVE_INFINITY,this._missing.clear(),this._prefetch.clear(),this._updates.reset(e),P.clear();let n=!0;const s=new A,o=new A,r=this._imModificationUncategorized;r.clear();const a=new Set,l=new Set,d=(d,h,u)=>{const c=E(d,this._nodesPerPage);if(l.add(c),null==h){let e=this._entryPriority(d);return e===1/0&&(e=this._entryPriority(u)),P.set(c,Math.max(e,P.get(c)||0)),this._loading.has(c)||this._failedPages.has(c)||this._missing.push(c),void(this._maxProcessingPrio=Math.max(this._maxProcessingPrio,e))}const _=h.node;if(this._updateNodeFeatureEstimate(_,o),null==_){const e=this._entryPriority(d);return this._loading.has(d)||this._failedNodes.has(d)||(this._missing.push(d),P.set(d,e)),void(this._maxProcessingPrio=Math.max(this._maxProcessingPrio,e))}const f=this._getPage(d);if(0===this._missing.length&&0===this._nodesPerPage)for(let e=0;e<h.childCount;e++){const t=f.children[h.childOffset+e],i=this._getNodeInternal(t);null==i||i.node||this._loading.has(t)||this._failedNodes.has(t)||(P.set(t,this._entryPriority(t)),this._prefetch.push(t))}if(_.failed||_.resources.isEmpty)return void(n&&h.childCount>0&&this._isSelected(_)&&(n=!1));if(a.add(_.id),this._isLoaded(d)){if(s.known+=_.memory,++s.knownNodes,this._isSelected(_)?h.childCount>0&&(n=!1):(s.unremoved+=_.memory,n=!1),this._needsUpdate(_)){const e=this._entryPriority(d);P.set(d,e),this._maxProcessingPrio=Math.max(this._maxProcessingPrio,e),this._updates.update.push(d)}return}if(_.memory&&(s.known+=_.memory,++s.knownNodes),!this._isSelected(_))return void(this._isReloading(d)&&this._updates.remove.push(d));if(h.childCount>0&&(n=!1),_.memory?(s.missing+=_.memory,s.known+=_.memory,++s.knownNodes):++s.missingNodes,e.includes(_.index))return this._maxProcessingPrio=Math.max(this._maxProcessingPrio,this._entryPriority(d)),void(this._updates.cancel=this._updates.cancel.filter((e=>e!==_.index)));if(!t.done&&this._enable(_))return void t.madeProgress();const m=this._entryPriority(d);P.set(d,m),this._maxProcessingPrio=Math.max(this._maxProcessingPrio,m),this._updates.add.push(d),this.layerHasModifications&&i&&null!=_&&_.imModificationImpact===g.NotChecked&&r.push(d)};if(this.traverseVisible(d),this._frameNumber++,0!==this._nodesPerPage){const e=this._nodePages,t=l.size,i=e.size;if(i>100&&i>1.5*t){const i=1.1*t,n=[];for(const[t,o]of e)0!==o.numNodesWithLoadedChildren||l.has(t)||n.push([o.lastTraversed,t]);n.sort(((e,t)=>e[0]-t[0]));let s=0;for(;e.size>i&&s<n.length;){const t=n[s][1];l.has(t)?console.error(`Trying to remove used page ${t}`):e.has(t)?this._deleteNodePage(t):console.error(`Trying to remove non-existetn page ${t}`),++s}}}const h=this._updates.add;h.length>0&&this.layerHasModifications&&(r.length>0&&i?.(r),h.filterInPlace((e=>{const t=this._getNodeInternal(e),i=null==t||null==t.node||t.node.imModificationImpact!==g.Culled;return i||this.invalidateNodeVisibilityCache(e),i}))),this._unloadedMemoryEstimate=s.missing-s.unremoved,s.knownNodes>3&&s.missingNodes>0&&(this._unloadedMemoryEstimate+=s.known/s.knownNodes*s.missingNodes),this._unloadedMemoryEstimate=.8*Math.max(0,this._unloadedMemoryEstimate),this._featureEstimate.estimate=this._computeFeatureEstimate(o),this._featureEstimate.leavesReached=n,this._missing.sort(((e,t)=>e-t)),this._missing.filterInPlace(((e,t)=>t<1||this._missing.data[t-1]!==e)),this._missing.sort(((e,t)=>P.get(e)-P.get(t))),this._missing.length>0&&(this._maxUnloadedPrio=P.get(this._missing.back()),this._prefetch.clear()),this._updates.add.filterInPlace((e=>P.get(e)>=this._maxUnloadedPrio)).sort(((e,t)=>P.get(e)-P.get(t))),this._updates.update.sort(((e,t)=>P.get(e)-P.get(t))),this._indexMissing=this._loading.size+this._missing.length,this._dirty=this._indexMissing>0,P.clear()}checkFeatureTarget(e,t){const i=this._viewportQueries.updateScreenSpaceErrorBias(t);let n=t,s=t,o=i,r=10;for(;r--;){const i=new A;this._updateFeatureEstimate(n,i);if(this._computeFeatureEstimate(i)<=e){if(n>=t||i.missingNodes>0||0===r)break;o=n,n=.5*(n+s)}else s=n,n=.5*(n+o)}return this._version=C(this._version),this._viewportQueries.updateScreenSpaceErrorBias(i),Math.min(t,n)}_updateFeatureEstimate(e,t){this._version=C(this._version),this._viewportQueries.updateScreenSpaceErrorBias(e),this.traverseVisible(((e,i)=>this._updateNodeFeatureEstimate(null!=i?i.node:void 0,t)))}_updateNodeFeatureEstimate(e,t){if(null!=e&&!e.failed&&null!=e.numFeatures)return this._isLoaded(e.index)?(t.known+=e.numFeatures,++t.knownNodes,void(this._isSelected(e)||(t.unremoved+=e.numFeatures))):void(this._isSelected(e)&&(null!=e.numFeatures?(t.missing+=e.numFeatures,t.known+=e.numFeatures,++t.knownNodes):++t.missingNodes))}_computeFeatureEstimate(e){let t=e.known-e.unremoved;return e.knownNodes>3&&e.missingNodes>0&&(t+=e.known/e.knownNodes*e.missingNodes),Math.max(0,t)}load(){return this._load(this._missing)}prefetch(){return this._prefetch.sort(((e,t)=>P.get(e)-P.get(t))),this._load(this._prefetch)}_load(e){if(0===e.length||!this._canRequest())return!1;for(;e.length>0&&this._canRequest();)if(0===this._nodesPerPage)this._loadNode(e.pop());else{const t=e.pop();t>=0?this._loadPage(t):this._loadNode(t)}return!0}get isLoading(){return this._indexMissing>0}get isPrefetching(){return this._prefetch.length>0}get indexLoading(){return this._loading.size}get indexMissing(){return this._indexMissing}get unloadedMemoryEstimate(){return this._unloadedMemoryEstimate}get updates(){return this._updates}get featureEstimate(){return this._featureEstimate}get maxPriority(){return Math.max(this._maxProcessingPrio,this._maxUnloadedPrio)}nodeTraversalState(e){if(null==e)return null;const t=e.index,i=this._getNodeInternal(t);if(!i)return null;let n=i?.traversalState;if(n&&R(n.version,this._version))return n;const s=this._viewportQueries.getLodLevel(e),o=this._viewportQueries.hasLOD(e);let r=!0;if(o){const e=this.getParentIndex(t);if(null!=e){const t=this._getNodeInternal(e),i=t?.traversalState;r=!!i&&s>i.lodLevel}else r=s>0}else r=0===e.childCount;return n?(n.lodLevel=s,n.isChosen=r,n.version=w(!0,this._version),n):(n=new _(o,r,s,w(!0,this._version)),i.traversalState=n,n)}async _loadNode(e){this._loading.add(e);const i=this._getNodeInternal(e).ref;if(null==i)return void this._failedNodes.add(e);const n=i.id,s=this._urlPrefix+n,o=()=>{this._loading.delete(e),0===this._missing.length&&0===this._loading.size&&this.requestUpdate()};let r=null;try{r=e>=0?await this._streamDataController.request(s,"json"):await this._clientNodeLoader.loadNodeJSON(n)}catch(d){return o(),void(t(d)||(this._logger.error("#loadNode()",this._layer,"Error loading node: "+s),this._failedNodes.add(e)))}o();const a=this._validateNode(n,r);if(null==a)return;a.obb&&this.invalidateNodeVisibilityCache(e);const l=this._addNode(a,e);this.nodeTraversalState(l)}_validateNode(e,t){if(null==t||"object"!=typeof t||t.id!==e)return this._logger.error("#validateNode()",this._layer,`Invalid node. Wrong type or wrong id "${e}"`),null;if(!Array.isArray(t.mbs))return this._logger.error("#validateNode()",this._layer,`Invalid bounding volume on node ${e}.`),null;t.sharedResource&&"./shared"!==t.sharedResource.href&&"./shared/"!==t.sharedResource.href&&this._logger.warn("#validateNode()",this._layer,`Invalid shared resource href on node "${e}"`);const i=t.geometryData;null==i||Array.isArray(i)&&0===i.length||Array.isArray(i)&&1===i.length&&"./geometries/0"===i[0].href||this._logger.warn("#validateNode()",this._layer,`Invalid geometry data on node "${e}"`);const n=t.attributeData,s=this._layer.attributeStorageInfo;null==n||Array.isArray(n)&&!n.some(((e,t)=>e.href!==`./attributes/${s?.[t]?.key??`f_${t}`}/0`))||this._logger.warn("#validateNode()",this._layer,`Invalid attribute data on node "${e}"`),t.featureData&&t.featureData.length>1&&this._logger.warn("#validateNode()",this._layer,`Node ${e} has ${t.featureData.length} bundles. Only the first bundle will be loaded.`);const o=t.hasOwnProperty("obb")&&!this.ignoreServiceObb?t.obb:null,r=t.featureData&&1===t.featureData.length&&t.featureData[0].featureRange?t.featureData[0].featureRange[1]-t.featureData[0].featureRange[0]+1:void 0,a=t=>{if(null==t)return null;const i=t=>this._logger.error("#validateNode()",this._layer,`Invalid node reference on node ${e}: ${t}`);if("number"==typeof t.id)i(`id ${t.id} is a number instead of a string.`);else if("string"!=typeof t.id||!Array.isArray(t.mbs))return i("Missing or invalid id."),null;if(!Array.isArray(t.mbs))return i(`Invalid bounding volume on reference ${t.id}.`),null;t.href&&t.href!=="../"+t.id&&this._logger.error("#validateNode()",this._layer,`Invalid node href on node "${e}"`);const n=t.hasOwnProperty("obb")&&!this.ignoreServiceObb?t.obb:null,s=new h(`${t.id}`,t.mbs);return s.serviceObb=n,s.visibilityObb=this._computeVisibilityObb(s),s},l=Array.isArray(t.children)?t.children.map(a).filter((e=>null!=e)):null,d=t.featureData?.length??!1,u=!0===t.isEmpty;return{id:e,mbs:t.mbs,obb:o,children:l,resources:{isEmpty:!d&&u,hasSharedResource:null!=t.sharedResource,attributes:t.attributeData?e:void 0,texture:t.textureData&&t.textureData.length>0?e:void 0,geometry:null!=t.geometryData?e:void 0},version:"string"==typeof t.version?t.version:null,lodSelection:Array.isArray(t.lodSelection)?t.lodSelection:null,numFeatures:r}}resetFailedNodes(){this._failedNodes.clear(),this._failedPages.clear(),this._forAllNodes((e=>{null!=e.node&&(e.node.failed=!1)}))}_entryPriority(e){const t=this._getNodeInternal(e),i=this.getParentIndex(e);if(null==t||null==i&&null==t.node)return null==i?1/0:this._entryPriority(i);let n=0;if(t.node&&null!=i){const e=this._getNodeInternal(i).traversalState;null!=e&&(n=e.lodLevel)}let s=this.progressiveLoadPenalty;for(let r=e;null!=r;r=this.getParentIndex(r))if(this._isLoaded(r)){s=0;break}const o=null!=t.ref?this._viewportQueries.distToPOI(t.ref):null!=t.node?this._viewportQueries.distToPOI(t.node):0;return-o-n*(o+this.progressiveLoadPenalty)+s}traverseVisible(e){const t=this._getNodeInternal(this._rootIndex);null!=t?this._traverseVisible(this._rootIndex,null,t,e):e(this._rootIndex,null,null)}_traverseVisible(e,t,i,n){if(i.node&&0===i.childCount)return void(this.isGeometryVisible(e)&&n(e,i,t));if(!this.isNodeVisible(e))return;if(n(e,i,t),null==i.node)return;const s=this.nodeTraversalState(i.node);if(s?.nodeHasLOD&&s.lodLevel===this._maxLodLevel)return;const o=this._getPage(e);for(let r=0;r<i.childCount;r++){const t=o.children[i.childOffset+r],s=this._getNodeInternal(t);null!=s?this._traverseVisible(t,e,s,n):n(t,null,e)}}traverse(e,t){t(e)&&this.traverseChildren(e,t)}traverseChildren(e,t){const i=e.index,n=this._getNodeInternal(i);null!=n&&this._traverseChildren(i,n,t)}_traverseChildren(e,t,i){const n=this._getPage(e);if(null==n)return;const s=t.childOffset+t.childCount;for(let o=t.childOffset;o<s;++o){const e=n.children[o],t=this._getNodeInternal(e);null!=t&&null!=t.node&&i(t.node)&&this._traverseChildren(e,t,i)}}updateChildrenLoaded(e,t){let i=this.getNode(e);for(;null!=i;){const e=i.childrenLoaded,n=e+t;i.childrenLoaded=n;const s=0===e?1:0===n?-1:0,o=i.index;if(0!==s){this._getPage(o).numNodesWithLoadedChildren+=s}i=this.getParent(o)}}checkChildrenLoadedInvariant(){if(null==this.rootNode)return!0;const e=[],t=i=>{let n=this._isLoaded(i.index)||this._isReloading(i.index)?1:0;return this.traverseChildren(i,(e=>(n+=t(e),!1))),i.childrenLoaded!==n&&e.push(i.index),n};return t(this.rootNode),e.length&&this._logger.error("childrenLoaded invariant broken at following nodes: "+e.join(",")),e.length>0}updateStats(e){if(this._updates.add.length>0&&(e.nodes+=" + "+this._updates.add.length),(this._indexMissing||this._prefetch.length>0)&&(e.index+=" + "+this._indexMissing||this._prefetch.length),e.prio=this._maxProcessingPrio,this._featureEstimate.estimate){const t=this._featureEstimate.estimate-e.features;t>0?e.features+=" + "+t:t<0&&(e.features+=" - "+-t)}}updateElevationInfo(e,t){this.needNodeElevationRange=t&&!!e&&("relative-to-ground"===e.mode||"on-the-ground"===e.mode),this._viewportQueries.updateElevationInfo(e),this.invalidateAllElevationRanges()}invalidateAllElevationRanges(){this._forAllNodes((e=>{x(e),null!=e.node&&e.node.invalidateElevationRange(),null!=e.ref&&e.ref.invalidateElevationRange()}))}_forAllNodes(e){if(null!=this._clientNodePage){const t=this._clientNodePage;for(let i=0;i<t.nodes.length;i++)e(t.nodes[i],-(i+1))}for(const[t,i]of this._nodePages){const n=t*this._nodesPerPage;for(let t=0;t<i.nodes.length;t++)e(i.nodes[t],n+t)}}get test(){return{addNode:(e,t)=>this._addNode(e,t),getNodeInternal:e=>this._getNodeInternal(e),getPageIndex:e=>E(e,this._nodesPerPage),getIndexWithinPage:e=>O(e,this._nodesPerPage),getNodePage:e=>e<0?this._clientNodePage:this._nodePages.get(e),getChildIndices:e=>{const t=this._getNodeInternal(e),i=this._getPage(e);if(null==t||null==i)return[];const n=[];for(let s=t.childOffset;s<t.childOffset+t.childCount;++s)n.push(i.children[s]);return n},rootIndex:this._rootIndex,clientNodePage:this._clientNodePage,nodePages:this._nodePages}}clearCaches(){if(0!==this._nodesPerPage){const e=this._nodePages,t=new Set,i=this._nodesPerPage;this.traverseVisible((e=>t.add(E(e,i))));for(const[n,s]of e)if(0!==s.numNodesWithLoadedChildren||t.has(n))for(const e of s.nodes)e.traversalState=null;else this._deleteNodePage(n)}}_deleteNodePage(e){this._nodePages.delete(e),this._nodeCount-=this._nodesPerPage}}const P=new Map;class y{constructor(t){this.missing=t,this.update=new e({deallocator:null}),this.add=new e({deallocator:null}),this.remove=new e({deallocator:null}),this.cancel=[]}reset(e){this.add.clear(),this.update.clear(),this.cancel=e}}function x(e){null!=e.node&&(f(e.node.renderMbs),m(e.node.serviceObbInRenderSR)),null!=e.ref&&(f(e.ref.renderMbs),m(e.ref.serviceObbInRenderSR))}function I(e){return v(e,-2)}function C(e){return v(e,2)}function w(e,t){return t+(e?1:0)}function R(e,t){return(-2&e)===t}function M(e){return 1==(1&e)}function E(e,t){return e<0?-1:0===t?0:e/t|0}function S(e=[],t=[]){return{nodes:e,children:t,lastTraversed:0,numNodesWithLoadedChildren:0}}function O(e,t){return e<0?-e-1:0===t?e:e%t}function L(e,t,i){return-1===t?-(e+1):0===i?e:t*i+e}const V=[["maxScreenThreshold",d.MaxScreenThreshold],["screenSpaceRelative",d.ScreenSpaceRelative],["removedFeatureDiameter",d.RemovedFeatureDiameter],["distanceRangeFromDefaultCamera",d.DistanceRangeFromDefaultCamera]];function k(e){if(e)for(let t=0;t<e.length;t++)for(const i of V)if(i[0]===e[t].metricType)return{lodMetric:i[1],maxError:e[t].maxError};return{lodMetric:d.None,maxError:0}}class A{constructor(){this.known=0,this.knownNodes=0,this.missing=0,this.missingNodes=0,this.unremoved=0}}function F(e){return Math.sqrt(e*(4/Math.PI))}const T=a(),D=a(),U=a(),$=a();function Q(e,t){e&&(e.elevationRangeMin=Math.min(e.elevationRangeMin,t.elevationRangeMin),e.elevationRangeMax=Math.max(e.elevationRangeMax,t.elevationRangeMax))}export{N as I3SIndex,k as selectErrorMetric};
5
+ import has from"../../../../core/has.js";import e from"../../../../core/PooledArray.js";import{isAbortError as t}from"../../../../core/promiseUtils.js";import{l as i}from"../../../../chunks/vec3.js";import{projectBoundingSphere as n}from"../../../../geometry/projection/projectBoundingSphere.js";import{f as s,h as o,u as r,c as a}from"../../../../chunks/sphere.js";import{i3sPatchingEnabled as l}from"../../../../support/featureFlags.js";import{LodMetric as d,NodeBase as h,Node as u,NodeFilterImpact as c,NodeIMModificationImpact as g,NodeTraversalState as _}from"./I3SNode.js";import{invalidateMbs as f,invalidateObb as m,addWraparound as v}from"./I3SUtil.js";import{clone as b}from"../../support/orientedBoundingBox.js";class p{constructor(e,t,i,n,s){this.childOffset=e,this.childCount=t,this.visibilityCache=i,this.ref=n,this.node=s,this.useAsHole=0,this.filterImpact=c.NotChecked,this.traversalState=null,this.parent=-1}}class N{constructor(t,i,n,s,o,r,a,h,u,c,g,_,f,m,v){this._layer=t,this._streamDataController=n,this._clientNodeLoader=s,this._viewportQueries=o,this._logger=r,this.holeFilling=a,this._isLoaded=h,this._isReloading=u,this._isSelected=c,this._enable=g,this._needsUpdate=_,this._canRequest=f,this._computeVisibilityObb=m,this._computeNodeFiltering=v,this._dirty=!0,this._nodePages=new Map,this._clientNodePage=null,this._nodeCount=0,this._nodesPerPage=0,this._rootIndex=0,this._lodMetric=d.None,this._lodConversion=e=>e,this._isEditable=!1,this._urlPrefix="",this._loading=new Set,this._failedNodes=new Set,this._failedPages=new Set,this._indexMissing=1,this._maxUnloadedPrio=Number.NEGATIVE_INFINITY,this._maxProcessingPrio=Number.POSITIVE_INFINITY,this._version=C(0),this._visibilityCacheVersion=C(0),this._maxLevel=1,this._featureEstimate={estimate:0,leavesReached:!1},this._unloadedMemoryEstimate=0,this._missing=new e({deallocator:null}),this._prefetch=new e({deallocator:null}),this._updates=new y(this._missing),this._imModificationUncategorized=new e({deallocator:null}),this.ignoreServiceObb=!1,this.progressiveLoadPenalty=0,this._pageQueue=new Array,this._newPages=new Array,this.needNodeElevationRange=!1,this.layerHasModifications=!1,this._layerHasFilter=!1,this._frameNumber=0,this._isEditable=l()&&null!=t.associatedLayer&&null!=t.associatedLayer.infoFor3D,t.serviceUpdateTimeStamp&&t.serviceUpdateTimeStamp.lastUpdate&&(this._lastUpdate=`${t.serviceUpdateTimeStamp.lastUpdate}`),this._maxLodLevel=this._viewportQueries?this._viewportQueries.maxLodLevel:1,this._init(i)}_init(e){if("page"===e.type){const t=e.rootPage;switch(this._urlPrefix=e.urlPrefix,this._nodesPerPage=e.pageSize,e.lodMetric){case"maxScreenThreshold":this._lodMetric=d.MaxScreenThreshold;break;case"maxScreenThresholdSQ":this._lodMetric=d.MaxScreenThreshold,this._lodConversion=F}if(this._isEditable){this._rootIndex=-1;const i=O(e.rootIndex,e.pageSize),n=t.nodes[i],s={nodes:[{index:this._rootIndex,children:[e.rootIndex],mesh:void 0,obb:n.obb,lodThreshold:n.lodThreshold}]};this._addPage(E(this._rootIndex,this._nodesPerPage),s),this.getNode(-1).serviceObb=void 0}else this._rootIndex=e.rootIndex;this._addPage(E(e.rootIndex,this._nodesPerPage),t),this._updateParentsAndLevel()}else if("node"===e.type){this._urlPrefix=e.urlPrefix;const t=S();if(this._nodePages.set(0,t),this._isEditable){this._clientNodePage=S();const t={id:"-1",version:null,mbs:e.rootNode.mbs,obb:e.rootNode.obb,sharedResource:null,geometryData:null,attributeData:null,featureData:null,children:[{id:"root",href:"../root",mbs:e.rootNode.mbs,obb:e.rootNode.obb}]};this._rootIndex=this._makeClientRefNode(new h(t.id,null),-1);const i=this._validateNode(t.id,t);i&&this._addNode(i,this._rootIndex)}else this._rootIndex=this._makeRefNode(new h(e.rootNode.id,null),-1);const i=this._validateNode(e.rootNode.id,e.rootNode);i&&this._addNode(i,0)}}addClientNodeToIndex(e,t){const i=-1,n=new h(e,t),s=this._makeClientRefNode(n,i);return this._linkChildToParentNode(i,s),this.requestUpdate(),s}removeClientNodeFromIndex(e,t,i){this._destroyClientRefNode(e,t,i),this.requestUpdate()}_loadPage(e){this._loading.add(e);const i=this._urlPrefix+e;this._streamDataController.request(i,"json").then((t=>{this._pageQueue.push({pageIndex:e,page:t})})).catch((i=>{this._loading.delete(e),t(i)||(this._failedPages.add(e),this._logger.error("#loadPage()",this._layer,`Error when loading page ${e}`,i))}))}_addQueuedPages(e){for(;this._pageQueue.length>0&&!e.done;){const{pageIndex:t,page:i}=this._pageQueue.shift();this._addPage(t,i),this._loading.delete(t),e.madeProgress(),this.needNodeElevationRange&&this._newPages.push(t)}this._updateParentsAndLevel()}_invalidateElevationRangeForNewPages(e){if(this.needNodeElevationRange)for(;this._newPages.length>0&&!e.done;){const e=this._nodePages.get(this._newPages.shift());if(null==e)continue;const t=e.nodes;for(let i=0;i<this._nodesPerPage;i++){let e=t[i].parent;for(;null!=e&&e!==this._rootIndex;){const t=this.getNode(e);t&&!Number.isNaN(t?.elevationRangeMin)&&(t.invalidateElevationRange(),this.invalidateBoundingVolumeCache(e)),e=this.getParentIndex(e)}}}}_addPage(e,t){const n=[],o=[],r=t.nodes.map(((t,r)=>{const a=n.length,l=t.children?t.children.length:0;o.push(this._rootIndex);for(let e=0;e<l;e++)n.push(t.children[e]);const d=`${t.index}`,h=b(t.obb),c=s(h.center[0],h.center[1],h.center[2],i(h.halfSize)),g=t.mesh&&t.mesh.attribute,_=t.mesh&&t.mesh.geometry,f=t.mesh&&t.mesh.material,m={hasSharedResource:!1,isEmpty:null==_,attributes:g&&null!=g.resource?`${g.resource}`:void 0,geometry:_&&null!=_.resource?`${_.resource}`:void 0,texture:f&&null!=f.resource?`${f.resource}`:void 0,geometryDefinition:_?_.definition:-1,materialDefinition:f?f.definition:-1},v=new u(d,L(r,e,this._nodesPerPage),c,l,0,m,this._lastUpdate,this._lodMetric,this._lodConversion(t.lodThreshold),_?_.featureCount:null);return v.serviceObb=h,v.visibilityObb=this._computeVisibilityObb(v),v.vertexCount=_?_.vertexCount:0,new p(a,l,I(this._visibilityCacheVersion),null,v)})),a=S(r,n);-1===e?this._clientNodePage=a:this._nodePages.set(e,a),this._nodeCount+=r.length}_updateParentsAndLevel(){const e=new Array,t=(t,i,n)=>{const s=this._getPage(t);if(null!=s){const o=O(t,this._nodesPerPage),r=s.nodes[o];r.parent=null!=i?i:-1;const a=r.node;null!=a&&(a.level=n,e.push(t))}};for(t(this._rootIndex,null,0);e.length;){const i=e.pop(),n=this.getNode(i);if(null!=n)for(let e=0;e<n.childCount;e++){t(this.getChildIndex(n.index,e),i,n.level+1),this._maxLevel=Math.max(this._maxLevel,n.level+1)}}}_getPage(e){const t=E(e,this._nodesPerPage);return t<0?this._clientNodePage:this._nodePages.get(t)}_getNodeInternal(e){const t=this._getPage(e);return null==t?null:(t.lastTraversed=this._frameNumber,t.nodes[O(e,this._nodesPerPage)])}_addNode(e,t){null!=e.children&&this.populateChildren(t,e.children);const i=this.getParent(t),n=null!=i?i.level+1:0;this._maxLevel=Math.max(this._maxLevel,e.children?n+1:n);const{lodMetric:s,maxError:o}=k(e.lodSelection),r=this._getNodeInternal(t);return r.node=new u(e.id,t,e.mbs,r.childCount,n,e.resources,e.version,s,o,e.numFeatures),e.obb&&(r.node.serviceObb=b(e.obb)),r.node.visibilityObb=this._computeVisibilityObb(r.node),null!=r.ref&&(null==r.ref.mbs&&(r.ref.mbs=e.mbs),r.node.renderMbs=r.ref.renderMbs,r.node.serviceObbInRenderSR=r.ref.serviceObbInRenderSR,r.ref.visibilityObb=r.node.visibilityObb),r.node}_makeRefNode(e,t){const i=this._nodePages.get(0);if(t<-1)return this._makeClientRefNode(e,t);if(null==i)return-1;const n=i.nodes.length,s=new p(0,0,I(this._visibilityCacheVersion),e,null);return i.nodes.push(s),this._nodeCount++,s.parent=t,f(e.renderMbs),m(e.serviceObbInRenderSR),n}_makeClientRefNode(e,t){const i=this._clientNodePage;if(null==i)return-1;if(t>=0)throw new Error("I3SIndex::client side nodes can not be made children of service side nodes.");const n=-(i.nodes.length+1),s=new p(0,0,I(this._visibilityCacheVersion),e,null);return i.nodes.push(s),this._nodeCount++,s.parent=t,f(e.renderMbs),m(e.serviceObbInRenderSR),n}_linkChildToParentNode(e,t){const i=this._clientNodePage;if(null==i||e>=0)return;const n=O(e,this._nodesPerPage),s=O(t,this._nodesPerPage),o=i.nodes[n],r=o.childOffset;i.children.splice(o.childOffset+o.childCount,0,t);const a=1;o.childCount+=a,null!=o.node&&(o.node.childCount+=a);for(const l of i.nodes)l.childOffset>r&&(l.childOffset+=a);i.nodes[s].parent=e,this._updateParentBoundingInformation(e)}_destroyClientRefNode(e,t,i){const n=this._clientNodePage;if(null==n)return;const s=this.getParentIndex(e);if(null==s)return;const o=new Set,r=new Map,a=e=>{const i=O(e,this._nodesPerPage),s=n.nodes[i];if(s.childCount>0)for(let t=s.childOffset;t<s.childOffset+s.childCount;++t)a(n.children[t]);const r=s.node?.id??s.ref?.id;if(null==r)throw new Error("Node has no id");t(r,e),o.add(s)};a(e);const l=n.nodes,d=n.children,h=n.nodes.map((()=>-1)),u=[],c=[];for(let g=0;g<l.length;++g){const e=l[g];if(o.has(e))continue;const t=u.length,n=L(g,-1,this._nodesPerPage),s=L(t,-1,this._nodesPerPage);if(e.node&&(e.node.index=s),h[g]=s,u.push(e),n!==s){const t=e.node?.id??e.ref?.id;if(null==t)throw new Error("Node has no id");i(t,n,s),r.set(n,s)}}this._nodeCount-=l.length-u.length;for(let g=0;g<u.length;++g){const e=L(g,-1,this._nodesPerPage),t=u[g],i=c.length;for(let n=t.childOffset;n<t.childOffset+t.childCount;++n){const t=d[n];if(t>=0)c.push(t);else{const i=O(t,this._nodesPerPage),n=l[i];if(o.has(n))continue;const s=h[i];c.push(s),n.parent=e}}t.childOffset=i,t.childCount=c.length-i,t.node&&(t.node.childCount=t.childCount)}n.nodes=u,n.children=c,this._updateParentBoundingInformation(h[O(s,this._nodesPerPage)])}_updateParentBoundingInformation(e){let t=e;do{let e=null;const i=this._clientNodeLoader.indexSR,s=this._clientNodeLoader.renderSR,l=this._getNodeInternal(t);if(null==l)return;for(let a=0;a<l.childCount;a++){const l=this.getChildIndex(t,a),d=this._getNodeInternal(l),h=null!=d?d.ref||d.node:null;if(null!=h&&h.mbs[3]>0)if(null==e)e=o(h.mbs,T);else{const t=D,o=$,a=U;n(h.mbs,i,t,s),n(e,i,o,s),r(t,o,a),n(a,s,e,i)}}const d=l.ref||l.node;null!=d&&(null!=e?d.mbs=o(e,null!=d.mbs?d.mbs:a()):f(d.mbs),f(d.renderMbs),m(d.serviceObbInRenderSR),d.geometryObb=null),this.invalidateNodeVisibilityCacheInternal(l),t=this.getParentIndex(t)}while(null!=t)}populateChildren(e,t){const i=this._getNodeInternal(e),n=this._getPage(e);i.childOffset=n.children.length,i.childCount=t.length;for(let s=0;s<t.length;s++){const i=this._makeRefNode(t[s],e);n.children.push(i)}}getNode(e){const t=this._getNodeInternal(e);return null!=t?t.node:null}getIndexById(e){let t;return this._forAllNodes(((i,n)=>{(null!=i.node&&i.node.id===e||null!=i.ref&&i.ref.id===e)&&(t=n)})),t}getNodeById(e){const t=this.getIndexById(e);return null!=t&&t>=0?this.getNode(t):null}getChildIndex(e,t){const i=this._getPage(e);if(null==i)return-1;const n=i.nodes[O(e,this._nodesPerPage)];return i.children[n.childOffset+t]}getParentIndex(e){const t=this._getPage(e);return null!=t&&e!==this._rootIndex?t.nodes[O(e,this._nodesPerPage)].parent:null}getParent(e){const t=this.getParentIndex(e);return null!=t?this.getNode(t):null}isLeaf(e){const t=this._getNodeInternal(e);return null!=t&&0===t.childCount}get rootNode(){return this.getNode(this._rootIndex)}get size(){return this._nodeCount}get isEditable(){return this._isEditable}removeAllGeometryObbs(){this._forAllNodes((e=>{null!=e.node&&(e.node.geometryObb=null)}))}invalidateVisibilityCache(){this._visibilityCacheVersion=C(this._visibilityCacheVersion)}invalidateNodeVisibilityCache(e){const t=this._getNodeInternal(e);null!=t&&this.invalidateNodeVisibilityCacheInternal(t)}invalidateNodeVisibilityCacheInternal(e){e.visibilityCache=I(this._visibilityCacheVersion)}invalidateBoundingVolumeCache(e){const t=this._getNodeInternal(e);null!=t&&(x(t),this.invalidateNodeVisibilityCacheInternal(t))}updateElevationChanged(e){const t=this._getNodeInternal(e);if(null==t)return;if(!this.needNodeElevationRange)return void this.invalidateBoundingVolumeCache(e);const i=null!=t.node?t.node:t.ref;null!=i&&i.invalidateElevationRange()}invalidateGeometryVisibility(e){const t=this._getNodeInternal(e);null!=t&&null!=t.node&&(t.node.geometryObb=null,f(t.node.renderMbs),m(t.node.serviceObbInRenderSR))}invalidateVisibilityObbs(){null!=this.rootNode&&this.traverse(this.rootNode,(e=>(e.visibilityObb=this._computeVisibilityObb(e),e.geometryObb=null,!0)))}_updateElevationRange(e){this._updateElevationRangeInternal(e,null)}_updateElevationRangeInternal(e,t){const i=this._getNodeInternal(e);if(!i)return!1;const n=i?.node??i?.ref;if(!n)return!1;const s=n.elevationRangeMin;if(!Number.isNaN(s))return Q(t,n),!0;const o={elevationRangeMin:1/0,elevationRangeMax:-1/0};let r=!1;for(let l=0;l<i.childCount;l++){const t=this.getChildIndex(e,l);this._updateElevationRangeInternal(t,o)||(r=!0)}if(0===i.childCount||r){const e=null!=i.node&&!i.node.resources.isEmpty;this._viewportQueries.expandElevationRange(n,e,o)}const a=n.elevationRangeMax;return Number.isNaN(s)||s!==o.elevationRangeMin||a!==o.elevationRangeMax?(null!=i.node&&(i.node.elevationRangeMin=o.elevationRangeMin,i.node.elevationRangeMax=o.elevationRangeMax),null!=i.ref&&(i.ref.elevationRangeMin=o.elevationRangeMin,i.ref.elevationRangeMax=o.elevationRangeMax),this.invalidateBoundingVolumeCache(e),Q(t,n),!0):(Q(t,n),!0)}isNodeVisible(e){const t=this._getNodeInternal(e);if(null==t||null!=t.ref&&!t.ref.mbs)return!0;if(this.needNodeElevationRange&&this._updateElevationRange(e),!M(t.visibilityCache,this._visibilityCacheVersion)){const e=t.node,i=!e||t.ref&&!e.visibilityObb?t.ref??null:e;if(this._layerHasFilter&&this._computeNodeFiltering&&(null!=e||null!=t.ref)&&t.filterImpact===c.NotChecked){const i=null!=e?e.mbs:null!=t.ref?t.ref.mbs:null;t.filterImpact=null!=i?this._computeNodeFiltering(i):c.Unmodified}const n=null!=e&&t.filterImpact===c.Culled,s=!(null!=e&&e.imModificationImpact===g.Culled)&&(!i||this._viewportQueries.isNodeVisible(i))&&!n;return t.visibilityCache=w(s,this._visibilityCacheVersion),s}return R(t.visibilityCache)}isGeometryVisible(e){if(!this.isNodeVisible(e))return!1;const t=this._getNodeInternal(e);return!!(null==t||null==t.node||null==t.node.geometryObb||this.layerHasModifications&&t.node.imModificationImpact===g.NotChecked)||this._viewportQueries.isGeometryVisible(t.node)}_traverseCoverage(e,t,i,n,s){const o=this._getPage(e);if(null==o||0===t.childCount)return;const r=t.childOffset+t.childCount,a=new Array;for(let l=t.childOffset;l<r;++l){const e=o.children[l],t=this._getNodeInternal(e);null!=t&&null!=t.node&&this.isGeometryVisible(e)&&a.push(t)}n/=a.length;for(const l of a){const e=l.node.index;this._isLoaded(e)||this._isReloading(e)?(s.delta=Math.max(s.delta,i),s.coverage+=n):this._traverseCoverage(e,l,i+1,n,s)}}useNodeAsHole(e){if("off"===this.holeFilling)return!1;const t=this._getNodeInternal(e);if(null==t)return!1;if("always"===this.holeFilling)return!0;if(M(t.useAsHole,this._version))return R(t.useAsHole);const i={delta:0,coverage:0};this._traverseCoverage(e,t,0,1,i);const n=i.delta*i.coverage<=.5;return t.useAsHole=w(n,this._version),n}get maxLevel(){return this._maxLevel}get dirty(){return this._dirty}destroy(){this._updates.add.prune(),this._updates.update.prune()}requestUpdate(){this._dirty=!0,this._indexMissing=1,this._version=C(this._version)}imModificationsChanged(e){this.layerHasModifications=e,this._forAllNodes((({node:e})=>{null!=e&&(e.imModificationImpact=g.NotChecked,e.visibilityObb=this._computeVisibilityObb(e),e.hasModifications&&this.invalidateGeometryVisibility(e.index))})),this.invalidateVisibilityCache()}layerFilterChanged(e){this._layerHasFilter=e,this._forAllNodes((e=>{if(null!=e){e.filterImpact=c.NotChecked;const t=e.node;null!=t&&this.invalidateNodeVisibilityCache(t.index)}})),this.invalidateVisibilityCache()}update(e,t,i){if(!this._dirty)return;this._pageQueue.length>0&&this._addQueuedPages(t),this._invalidateElevationRangeForNewPages(t),this._maxUnloadedPrio=Number.NEGATIVE_INFINITY,this._maxProcessingPrio=Number.NEGATIVE_INFINITY,this._missing.clear(),this._prefetch.clear(),this._updates.reset(e),P.clear();let n=!0;const s=new A,o=new A,r=this._imModificationUncategorized;r.clear();const a=new Set,l=new Set,d=(d,h,u)=>{const c=E(d,this._nodesPerPage);if(l.add(c),null==h){let e=this._entryPriority(d);return e===1/0&&(e=this._entryPriority(u)),P.set(c,Math.max(e,P.get(c)||0)),this._loading.has(c)||this._failedPages.has(c)||this._missing.push(c),void(this._maxProcessingPrio=Math.max(this._maxProcessingPrio,e))}const _=h.node;if(this._updateNodeFeatureEstimate(_,o),null==_){const e=this._entryPriority(d);return this._loading.has(d)||this._failedNodes.has(d)||(this._missing.push(d),P.set(d,e)),void(this._maxProcessingPrio=Math.max(this._maxProcessingPrio,e))}const f=this._getPage(d);if(0===this._missing.length&&0===this._nodesPerPage)for(let e=0;e<h.childCount;e++){const t=f.children[h.childOffset+e],i=this._getNodeInternal(t);null==i||i.node||this._loading.has(t)||this._failedNodes.has(t)||(P.set(t,this._entryPriority(t)),this._prefetch.push(t))}if(_.failed||_.resources.isEmpty)return void(n&&h.childCount>0&&this._isSelected(_)&&(n=!1));if(a.add(_.id),this._isLoaded(d)){if(s.known+=_.memory,++s.knownNodes,this._isSelected(_)?h.childCount>0&&(n=!1):(s.unremoved+=_.memory,n=!1),this._needsUpdate(_)){const e=this._entryPriority(d);P.set(d,e),this._maxProcessingPrio=Math.max(this._maxProcessingPrio,e),this._updates.update.push(d)}return}if(_.memory&&(s.known+=_.memory,++s.knownNodes),!this._isSelected(_))return void(this._isReloading(d)&&this._updates.remove.push(d));if(h.childCount>0&&(n=!1),_.memory?(s.missing+=_.memory,s.known+=_.memory,++s.knownNodes):++s.missingNodes,e.includes(_.index))return this._maxProcessingPrio=Math.max(this._maxProcessingPrio,this._entryPriority(d)),void(this._updates.cancel=this._updates.cancel.filter((e=>e!==_.index)));if(!t.done&&this._enable(_))return void t.madeProgress();const m=this._entryPriority(d);P.set(d,m),this._maxProcessingPrio=Math.max(this._maxProcessingPrio,m),this._updates.add.push(d),this.layerHasModifications&&i&&null!=_&&_.imModificationImpact===g.NotChecked&&r.push(d)};if(this.traverseVisible(d),this._frameNumber++,0!==this._nodesPerPage){const e=this._nodePages,t=l.size,i=e.size,n=this._missing.length,s=i>t&&i+n>j;if(i>50&&i>1.5*t||s){const i=s?t:1.1*t,n=[];for(const[t,s]of e)0!==s.numNodesWithLoadedChildren||l.has(t)||n.push([s.lastTraversed,t]);n.sort(((e,t)=>e[0]-t[0]));let o=0;for(;e.size>i&&o<n.length;){const t=n[o][1];l.has(t)?console.error(`Trying to remove used page ${t}`):e.has(t)?this._deleteNodePage(t):console.error(`Trying to remove non-existetn page ${t}`),++o}}}const h=this._updates.add;if(h.length>0&&this.layerHasModifications&&(r.length>0&&i?.(r),h.filterInPlace((e=>{const t=this._getNodeInternal(e),i=null==t||null==t.node||t.node.imModificationImpact!==g.Culled;return i||this.invalidateNodeVisibilityCache(e),i}))),this._unloadedMemoryEstimate=s.missing-s.unremoved,s.knownNodes>3&&s.missingNodes>0&&(this._unloadedMemoryEstimate+=s.known/s.knownNodes*s.missingNodes),this._unloadedMemoryEstimate=.8*Math.max(0,this._unloadedMemoryEstimate),this._featureEstimate.estimate=this._computeFeatureEstimate(o),this._featureEstimate.leavesReached=n,this._missing.sort(((e,t)=>e-t)),this._missing.filterInPlace(((e,t)=>t<1||this._missing.data[t-1]!==e)),this._missing.sort(((e,t)=>P.get(e)-P.get(t))),this._missing.length>0&&(this._maxUnloadedPrio=P.get(this._missing.back()),this._prefetch.clear()),0!==this._nodesPerPage){const e=this._nodePages.size,t=this._missing.length;e+t>j&&(this._logger.warn(`I3S: Exceeded limit of ${j} node pages on layer "${this._layer.title} : current+missing=${e}+${t}"`),this._missing.length=Math.max(j-e,0))}this._updates.add.filterInPlace((e=>P.get(e)>=this._maxUnloadedPrio)).sort(((e,t)=>P.get(e)-P.get(t))),this._updates.update.sort(((e,t)=>P.get(e)-P.get(t))),this._indexMissing=this._loading.size+this._missing.length,this._dirty=this._indexMissing>0,P.clear()}checkFeatureTarget(e,t){const i=this._viewportQueries.updateScreenSpaceErrorBias(t);let n=t,s=t,o=i,r=10;for(;r--;){const i=new A;this._updateFeatureEstimate(n,i);if(this._computeFeatureEstimate(i)<=e){if(n>=t||i.missingNodes>0||0===r)break;o=n,n=.5*(n+s)}else s=n,n=.5*(n+o)}return this._version=C(this._version),this._viewportQueries.updateScreenSpaceErrorBias(i),Math.min(t,n)}_updateFeatureEstimate(e,t){this._version=C(this._version),this._viewportQueries.updateScreenSpaceErrorBias(e),this.traverseVisible(((e,i)=>this._updateNodeFeatureEstimate(null!=i?i.node:void 0,t)))}_updateNodeFeatureEstimate(e,t){if(null!=e&&!e.failed&&null!=e.numFeatures)return this._isLoaded(e.index)?(t.known+=e.numFeatures,++t.knownNodes,void(this._isSelected(e)||(t.unremoved+=e.numFeatures))):void(this._isSelected(e)&&(null!=e.numFeatures?(t.missing+=e.numFeatures,t.known+=e.numFeatures,++t.knownNodes):++t.missingNodes))}_computeFeatureEstimate(e){let t=e.known-e.unremoved;return e.knownNodes>3&&e.missingNodes>0&&(t+=e.known/e.knownNodes*e.missingNodes),Math.max(0,t)}load(){return this._load(this._missing)}prefetch(){return this._prefetch.sort(((e,t)=>P.get(e)-P.get(t))),this._load(this._prefetch)}_load(e){if(0===e.length||!this._canRequest())return!1;for(;e.length>0&&this._canRequest();){const t=e.pop();0===this._nodesPerPage?this._loadNode(t):t>=0?this._loadPage(t):this._loadNode(t)}return!0}get isLoading(){return this._indexMissing>0}get isPrefetching(){return this._prefetch.length>0}get indexLoading(){return this._loading.size}get indexMissing(){return this._indexMissing}get unloadedMemoryEstimate(){return this._unloadedMemoryEstimate}get updates(){return this._updates}get featureEstimate(){return this._featureEstimate}get maxPriority(){return Math.max(this._maxProcessingPrio,this._maxUnloadedPrio)}nodeTraversalState(e){if(null==e)return null;const t=e.index,i=this._getNodeInternal(t);if(!i)return null;let n=i?.traversalState;if(n&&M(n.version,this._version))return n;const s=this._viewportQueries.getLodLevel(e),o=this._viewportQueries.hasLOD(e);let r=!0;if(o){const e=this.getParentIndex(t);if(null!=e){const t=this._getNodeInternal(e),i=t?.traversalState;r=!!i&&s>i.lodLevel}else r=s>0}else r=0===e.childCount;return n?(n.lodLevel=s,n.isChosen=r,n.version=w(!0,this._version),n):(n=new _(o,r,s,w(!0,this._version)),i.traversalState=n,n)}async _loadNode(e){this._loading.add(e);const i=this._getNodeInternal(e).ref;if(null==i)return void this._failedNodes.add(e);const n=i.id,s=this._urlPrefix+n,o=()=>{this._loading.delete(e),0===this._missing.length&&0===this._loading.size&&this.requestUpdate()};let r=null;try{r=e>=0?await this._streamDataController.request(s,"json"):await this._clientNodeLoader.loadNodeJSON(n)}catch(d){return o(),void(t(d)||(this._logger.error("#loadNode()",this._layer,"Error loading node: "+s),this._failedNodes.add(e)))}o();const a=this._validateNode(n,r);if(null==a)return;a.obb&&this.invalidateNodeVisibilityCache(e);const l=this._addNode(a,e);this.nodeTraversalState(l)}_validateNode(e,t){if(null==t||"object"!=typeof t||t.id!==e)return this._logger.error("#validateNode()",this._layer,`Invalid node. Wrong type or wrong id "${e}"`),null;if(!Array.isArray(t.mbs))return this._logger.error("#validateNode()",this._layer,`Invalid bounding volume on node ${e}.`),null;t.sharedResource&&"./shared"!==t.sharedResource.href&&"./shared/"!==t.sharedResource.href&&this._logger.warn("#validateNode()",this._layer,`Invalid shared resource href on node "${e}"`);const i=t.geometryData;null==i||Array.isArray(i)&&0===i.length||Array.isArray(i)&&1===i.length&&"./geometries/0"===i[0].href||this._logger.warn("#validateNode()",this._layer,`Invalid geometry data on node "${e}"`);const n=t.attributeData,s=this._layer.attributeStorageInfo;null==n||Array.isArray(n)&&!n.some(((e,t)=>e.href!==`./attributes/${s?.[t]?.key??`f_${t}`}/0`))||this._logger.warn("#validateNode()",this._layer,`Invalid attribute data on node "${e}"`),t.featureData&&t.featureData.length>1&&this._logger.warn("#validateNode()",this._layer,`Node ${e} has ${t.featureData.length} bundles. Only the first bundle will be loaded.`);const o=t.hasOwnProperty("obb")&&!this.ignoreServiceObb?t.obb:null,r=t.featureData&&1===t.featureData.length&&t.featureData[0].featureRange?t.featureData[0].featureRange[1]-t.featureData[0].featureRange[0]+1:void 0,a=t=>{if(null==t)return null;const i=t=>this._logger.error("#validateNode()",this._layer,`Invalid node reference on node ${e}: ${t}`);if("number"==typeof t.id)i(`id ${t.id} is a number instead of a string.`);else if("string"!=typeof t.id||!Array.isArray(t.mbs))return i("Missing or invalid id."),null;if(!Array.isArray(t.mbs))return i(`Invalid bounding volume on reference ${t.id}.`),null;t.href&&t.href!=="../"+t.id&&this._logger.error("#validateNode()",this._layer,`Invalid node href on node "${e}"`);const n=t.hasOwnProperty("obb")&&!this.ignoreServiceObb?t.obb:null,s=new h(`${t.id}`,t.mbs);return s.serviceObb=n,s.visibilityObb=this._computeVisibilityObb(s),s},l=Array.isArray(t.children)?t.children.map(a).filter((e=>null!=e)):null,d=t.featureData?.length??!1,u=!0===t.isEmpty;return{id:e,mbs:t.mbs,obb:o,children:l,resources:{isEmpty:!d&&u,hasSharedResource:null!=t.sharedResource,attributes:t.attributeData?e:void 0,texture:t.textureData&&t.textureData.length>0?e:void 0,geometry:null!=t.geometryData?e:void 0},version:"string"==typeof t.version?t.version:null,lodSelection:Array.isArray(t.lodSelection)?t.lodSelection:null,numFeatures:r}}resetFailedNodes(){this._failedNodes.clear(),this._failedPages.clear(),this._forAllNodes((e=>{null!=e.node&&(e.node.failed=!1)}))}_entryPriority(e){const t=this._getNodeInternal(e),i=this.getParentIndex(e);if(null==t||null==i&&null==t.node)return null==i?1/0:this._entryPriority(i);let n=0;if(t.node&&null!=i){const e=this._getNodeInternal(i).traversalState;null!=e&&(n=e.lodLevel)}let s=this.progressiveLoadPenalty;for(let r=e;null!=r;r=this.getParentIndex(r))if(this._isLoaded(r)){s=0;break}const o=null!=t.ref?this._viewportQueries.distToPOI(t.ref):null!=t.node?this._viewportQueries.distToPOI(t.node):0;return-o-n*(o+this.progressiveLoadPenalty)+s}traverseVisible(e){const t=this._getNodeInternal(this._rootIndex);null!=t?this._traverseVisible(this._rootIndex,null,t,e):e(this._rootIndex,null,null)}_traverseVisible(e,t,i,n){if(i.node&&0===i.childCount)return void(this.isGeometryVisible(e)&&n(e,i,t));if(!this.isNodeVisible(e))return;if(n(e,i,t),null==i.node)return;const s=this.nodeTraversalState(i.node);if(s?.nodeHasLOD&&s.lodLevel===this._maxLodLevel)return;const o=this._getPage(e);for(let r=0;r<i.childCount;r++){const t=o.children[i.childOffset+r],s=this._getNodeInternal(t);null!=s?this._traverseVisible(t,e,s,n):n(t,null,e)}}traverse(e,t){t(e)&&this.traverseChildren(e,t)}traverseChildren(e,t){const i=e.index,n=this._getNodeInternal(i);null!=n&&this._traverseChildren(i,n,t)}_traverseChildren(e,t,i){const n=this._getPage(e);if(null==n)return;const s=t.childOffset+t.childCount;for(let o=t.childOffset;o<s;++o){const e=n.children[o],t=this._getNodeInternal(e);null!=t&&null!=t.node&&i(t.node)&&this._traverseChildren(e,t,i)}}updateChildrenLoaded(e,t){let i=this.getNode(e);for(;null!=i;){const e=i.childrenLoaded,n=e+t;i.childrenLoaded=n;const s=0===e?1:0===n?-1:0,o=i.index;if(0!==s){this._getPage(o).numNodesWithLoadedChildren+=s}i=this.getParent(o)}}checkChildrenLoadedInvariant(){if(null==this.rootNode)return!0;const e=[],t=i=>{let n=this._isLoaded(i.index)||this._isReloading(i.index)?1:0;return this.traverseChildren(i,(e=>(n+=t(e),!1))),i.childrenLoaded!==n&&e.push(i.index),n};return t(this.rootNode),e.length&&this._logger.error("childrenLoaded invariant broken at following nodes: "+e.join(",")),e.length>0}updateStats(e){if(this._updates.add.length>0&&(e.nodes+=" + "+this._updates.add.length),(this._indexMissing||this._prefetch.length>0)&&(e.index+=" + "+this._indexMissing||this._prefetch.length),e.prio=this._maxProcessingPrio,this._featureEstimate.estimate){const t=this._featureEstimate.estimate-e.features;t>0?e.features+=" + "+t:t<0&&(e.features+=" - "+-t)}}updateElevationInfo(e,t){this.needNodeElevationRange=t&&!!e&&("relative-to-ground"===e.mode||"on-the-ground"===e.mode),this._viewportQueries.updateElevationInfo(e),this.invalidateAllElevationRanges()}invalidateAllElevationRanges(){this._forAllNodes((e=>{x(e),null!=e.node&&e.node.invalidateElevationRange(),null!=e.ref&&e.ref.invalidateElevationRange()}))}_forAllNodes(e){if(null!=this._clientNodePage){const t=this._clientNodePage;for(let i=0;i<t.nodes.length;i++)e(t.nodes[i],-(i+1))}for(const[t,i]of this._nodePages){const n=t*this._nodesPerPage;for(let t=0;t<i.nodes.length;t++)e(i.nodes[t],n+t)}}get test(){return{addNode:(e,t)=>this._addNode(e,t),getNodeInternal:e=>this._getNodeInternal(e),getPageIndex:e=>E(e,this._nodesPerPage),getIndexWithinPage:e=>O(e,this._nodesPerPage),getNodePage:e=>e<0?this._clientNodePage:this._nodePages.get(e),getChildIndices:e=>{const t=this._getNodeInternal(e),i=this._getPage(e);if(null==t||null==i)return[];const n=[];for(let s=t.childOffset;s<t.childOffset+t.childCount;++s)n.push(i.children[s]);return n},rootIndex:this._rootIndex,clientNodePage:this._clientNodePage,nodePages:this._nodePages}}clearCaches(){if(0!==this._nodesPerPage){const e=this._nodePages,t=new Set,i=this._nodesPerPage;this.traverseVisible((e=>t.add(E(e,i))));for(const[n,s]of e)if(0!==s.numNodesWithLoadedChildren||t.has(n))for(const e of s.nodes)e.traversalState=null;else this._deleteNodePage(n)}}_deleteNodePage(e){this._nodePages.delete(e),this._nodeCount-=this._nodesPerPage}}const P=new Map;class y{constructor(t){this.missing=t,this.update=new e({deallocator:null}),this.add=new e({deallocator:null}),this.remove=new e({deallocator:null}),this.cancel=[]}reset(e){this.add.clear(),this.update.clear(),this.cancel=e}}function x(e){null!=e.node&&(f(e.node.renderMbs),m(e.node.serviceObbInRenderSR)),null!=e.ref&&(f(e.ref.renderMbs),m(e.ref.serviceObbInRenderSR))}function I(e){return v(e,-2)}function C(e){return v(e,2)}function w(e,t){return t+(e?1:0)}function M(e,t){return(-2&e)===t}function R(e){return 1==(1&e)}function E(e,t){return e<0?-1:0===t?0:e/t|0}function S(e=[],t=[]){return{nodes:e,children:t,lastTraversed:0,numNodesWithLoadedChildren:0}}function O(e,t){return e<0?-e-1:0===t?e:e%t}function L(e,t,i){return-1===t?-(e+1):0===i?e:t*i+e}const V=[["maxScreenThreshold",d.MaxScreenThreshold],["screenSpaceRelative",d.ScreenSpaceRelative],["removedFeatureDiameter",d.RemovedFeatureDiameter],["distanceRangeFromDefaultCamera",d.DistanceRangeFromDefaultCamera]];function k(e){if(e)for(let t=0;t<e.length;t++)for(const i of V)if(i[0]===e[t].metricType)return{lodMetric:i[1],maxError:e[t].maxError};return{lodMetric:d.None,maxError:0}}class A{constructor(){this.known=0,this.knownNodes=0,this.missing=0,this.missingNodes=0,this.unremoved=0}}function F(e){return Math.sqrt(e*(4/Math.PI))}const T=a(),D=a(),$=a(),U=a();function Q(e,t){e&&(e.elevationRangeMin=Math.min(e.elevationRangeMin,t.elevationRangeMin),e.elevationRangeMax=Math.max(e.elevationRangeMax,t.elevationRangeMax))}const j=has("android")||has("ios")?100:300;export{N as I3SIndex,k as selectErrorMetric};
@@ -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/Accessor.js";import{equals as r,binaryIndexOf as s}from"../../../../../core/arrayUtils.js";import n from"../../../../../core/Logger.js";import{clamp as o}from"../../../../../core/mathUtils.js";import{disposeMaybe as i,destroyMaybe as a}from"../../../../../core/maybe.js";import{property as c}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/has.js";import{subclass as l}from"../../../../../core/accessorSupport/decorators/subclass.js";import{f as d,t as u,d as h}from"../../../../../chunks/mat3.js";import{a as m}from"../../../../../chunks/mat3f64.js";import{a as g}from"../../../../../chunks/mat4f64.js";import{s as p,c as f,u as _,j as b}from"../../../../../chunks/vec3.js";import{c as y}from"../../../../../chunks/vec3f64.js";import{UpdatingHandles as j}from"../../../../../core/support/UpdatingHandles.js";import{g as O,a as w}from"../../../../../chunks/sphere.js";import{c as E}from"../../../../../chunks/vec33.js";import{ViewingMode as R}from"../../../../ViewingMode.js";import{encodeElevationOffset as v}from"../../collections/Component/Material/shader/ComponentData.glsl.js";import{TwoVectorPosition as x}from"../../core/util/TwoVectorPosition.js";import{Attribute as T}from"../Attribute.js";import{GridLocalOriginFactory as C}from"../GridLocalOriginFactory.js";import{applyToModelMatrix as M}from"../localOriginHelper.js";import{LocalOriginManager as P}from"../LocalOriginManager.js";import{Object3D as S}from"../Object3D.js";import{VertexArrayObject as D}from"../VertexArrayObject.js";import{VertexAttribute as A}from"../VertexAttribute.js";import{VertexLayout as U,EdgeInputBufferLayout as B,EdgeShaderAttributeLocations as k,glVertexLayout as L}from"./bufferLayouts.js";import{RegularEdgeBufferWriter as I,SilhouetteEdgeBufferWriter as H}from"./edgeBufferWriters.js";import{EdgeType as V}from"./edgePreprocessing.js";import{EdgeRenderer as G,lineWidthFractionFactor as N,extensionLengthOffset as q}from"./EdgeRenderer.js";import{EdgePassParameters as W}from"./EdgeShaderParameters.js";import{EdgeWorkerHandle as z}from"./EdgeWorkerHandle.js";import{Transparency as K}from"./interfaces.js";import{generateStrokesTexture as F}from"./strokes.js";import{determineRendererType as Q,determineEdgeTransparency as J,determineObjectTransparency as X,fillComponenBufferIndices as Y}from"./util.js";import{BufferManager as Z}from"../TextureBackedBuffer/BufferManager.js";import{EdgeSilhouette as $}from"../../shaders/sources/edgeRenderer/EdgeUtil.glsl.js";import{BufferObject as ee}from"../../../../webgl/BufferObject.js";import{Usage as te}from"../../../../webgl/enums.js";let re=class extends t{constructor(e){super(e),this._updatingHandles=new j,this._perObjectData=new Map,this._perObjectDataEvictionCache=new Set,this._renderers=new Map,this._gpuMemoryUsage=0,this._workerAbort=new AbortController,this._tmpModelPosition=y(),this._localOrigins=new P(new C(e.renderSR))}initialize(){this._worker=new z(this.schedule),this._componentColorManager=new Z(this.rctx,3);const e=U.createBuffer(4);for(let t=0;t<4;t++)e.sideness.set(t,0,0===t||3===t?0:1),e.sideness.set(t,1,0===t||1===t?0:1);this._verticesBufferObject=ee.createVertex(this.rctx,te.STATIC_DRAW,e.buffer)}destroy(){this.destroyed||(this._perObjectData.forEach((e=>this._discardObjectEntry(e))),this._perObjectData.clear(),this._strokesTexture=i(this._strokesTexture),this._componentColorManager=a(this._componentColorManager),this._workerAbort.abort(),this._worker.destroy(),this._verticesBufferObject=i(this._verticesBufferObject),this._renderers.clear(),this._updatingHandles.destroy(),this._set("schedule",_e))}get updating(){return this._updatingHandles.updating}get usedMemory(){return this._gpuMemoryUsage}shouldRender(){return this._renderers.size>0}async addComponentObject(e,t,r,s,n,o,i,a){if(this.hasObject(e))return this.getObjectMemoryUsage(e);let c;const l=new oe(new Promise((e=>c=e)),r.center,r.radius);this._perObjectData.set(e,l);const d=await this._updatingHandles.addPromise(this._addComponentGeometry(t,l,s,n,o,i,a));return this.setNeedsRender(),c(),d}async addOrUpdateObject3D(e,t,r,s){if(this.destroyed)return void n.getLogger(this).warn("Attempt to add an object to a destroyed instance");const o=this._perObjectData.get(e);let i;o?.renderables.length>0&&this._perObjectDataEvictionCache.add(o);const a=e.boundingVolumeWorldSpace.bounds,c=new oe(new Promise((e=>i=e)),O(a),w(a));this._perObjectData.set(e,c);const l=new Array;if(r.mergeGeometries&&e.geometries.length>1&&ne(e))l.push(this._addObjectMergedGeometries(e,c,t,r,s));else for(let n=0;n<e.geometries.length;n++){const o=e.geometries[n];o.material.supportsEdges&&l.push(this._addGeometry(e,c,o,t[0],r,s))}await this._updatingHandles.addPromise(Promise.all(l)),this._perObjectDataEvictionCache.delete(c),this._discardObjectEntry(o),this.setNeedsRender(),i()}_discardObjectEntry(e){e&&(e.renderables.length&&(e.renderables.forEach((e=>this._removeRenderable(e))),this.setNeedsRender()),e.loaded=null)}hasObject(e){return this._perObjectData.has(e)}async updateAllComponentOpacities(e,t){const r=await this._updatingHandles.addPromise(this._getObjectEntry(e));if(null==r)return;const s=t instanceof Array?e=>t[e]:()=>t;r.renderables.forEach((e=>{const t=e.components.meta.length;for(let r=0;r<t;r++){const t=s(r),n=e.components.meta[r],o=n.index;n.material.opacity=t,e.components.buffer.textureBuffer.setDataElement(o,1,3,255*t)}this._updateTransparency(e)})),this.setNeedsRender()}async getObjectMemoryUsage(e){const t=await this._getObjectEntry(e);return null!=t?t.renderables.reduce(((e,t)=>e+t.statistics.gpuMemoryUsage),0):0}async updateAllComponentMaterials(e,t,r,s){const n=e instanceof S,o=!!r.hasSlicePlane,i=Q(t),a=G.getKey(i,o,n),c=await this._updatingHandles.addPromise(this._getObjectEntry(e));null!=c&&(c.renderables.forEach((e=>{if(a!==e.rendererKey){const t=this._renderers.get(e.rendererKey),r=this._acquireRenderer(i,o,n);t.removeRenderable(e),--t.refCount,e.rendererKey=a,r.addRenderable(e)}for(let r=0;r<t.length;r++)e.components.meta[r].material=t[r];s&&this._updateComponentBuffer(e.components),this._updateTransparency(e)})),this.setNeedsRender())}async updateAllVerticalOffsets(e,t){const r=await this._updatingHandles.addPromise(this._getObjectEntry(e));null!=r&&(r.renderables.forEach((e=>{const r=e.components.meta;for(let s=0;s<r.length;s++)e.components.meta[s].verticalOffset=t?.[s]??0;this._updateComponentBuffer(e.components)})),this.setNeedsRender())}async updateObjectVisibility(e,t){const r=await this._updatingHandles.addPromise(this._getObjectEntry(e));null!=r&&(r.renderables.forEach((e=>e.visible=t)),this.setNeedsRender())}removeObject(e){const t=this._perObjectData.get(e);t&&(this._perObjectData.delete(e),this._discardObjectEntry(t))}async _getObjectEntry(e){const t=this._perObjectData.get(e);if(!t)throw new Error("no object");return await t.loaded,null==t.loaded?null:t}render(e,t){if(null==this._componentColorManager)return;this._localOrigins.updateViewMatrices(e.camera.viewMatrix);const r=e.camera.viewInverseTransposeMatrix,s=y(),n=new x;let o=0,i=0;if(this._renderers.forEach((r=>{if(0===r.refCount)this._renderers.delete(r.key),r.dispose();else{let s=!0,n=!0;r.forEachRenderable((t=>{t.visible&&(o+=t.statistics.averageEdgeLength,i++,s&&t.regular&&(r.updateTechnique(e,!1),s=!1),n&&t.silhouette&&(r.updateTechnique(e,!0),n=!1))}),t)}})),this._componentColorManager.garbageCollect(),this._componentColorManager.updateTextures(),0===i)return;const a=new W(40*o/i,t);p(s,r[3],r[7],r[11]),n.set(s),f(a.transformWorldFromViewTH,n.high),f(a.transformWorldFromViewTL,n.low),d(a.transformViewFromCameraRelativeRS,e.camera.viewMatrix),u(fe,a.transformViewFromCameraRelativeRS),h(a.transformNormalViewFromGlobal,fe),a.transformProjFromView=e.camera.projectionMatrix,this._updateObjectCameraDistances(e),this._renderers.forEach((t=>{this._renderRegularEdges(t,e,a),this._renderSilhouetteEdges(t,e,a)}))}_updateTransparency(e){const t=J(e.components.meta),r=X(e.components.meta);t===e.edgeTransparency&&r===e.objectTransparency||(e.edgeTransparency=t,e.objectTransparency=r,this._renderers.get(e.rendererKey).setRenderablesDirty())}_computeModelTransformWithLocalOrigin(e,t,r){e.getCombinedShaderTransformation(t,r);const s=null!=t.localOrigin?this._localOrigins.register(t.localOrigin):this._localOrigins.acquire(p(this._tmpModelPosition,r[12],r[13],r[14]));return t.localOrigin=s.origin,M(s.origin.vec3,r),s}_updateComponentBuffer(e){const{meta:t,buffer:r}=e,s=new Uint8Array(4);for(let n=0;n<t.length;n++){const e=t[n].material,i=t[n].index,a=o(Math.round(e.size*N),0,255),c=o(e.extensionLength,-q,255-q)+q,l="solid"===e.type?V.SOLID:V.SKETCH,d=255*e.opacity,u=e.color,h=255*u[0],m=255*u[1],g=255*u[2],p=255*u[3];r.textureBuffer.setData(i,0,h,m,g,p),r.textureBuffer.setData(i,1,a,c,l,d),v(t[n].verticalOffset,s),r.textureBuffer.setData(i,2,s[0],s[1],s[2],s[3])}}_createComponentBuffers(e){if(null==this._componentColorManager)return null;const t=new Array,r=this._componentColorManager.getBuffer(e.length);for(let n=0;n<e.length;n++){const s=e[n],o=r.acquireIndex();t.push({index:o,verticalOffset:0,material:s})}const s=new ie(r,t);return this._updateComponentBuffer(s),s}_extractEdges(e,t,r,s,n,o=n.length){return this._worker.process({data:t,indices:n,indicesLength:o,writerSettings:e,skipDeduplicate:r},this._workerAbort.signal,s)}_createRenderable(e,t,r,s,n){const o=t=>null!=this._verticesBufferObject?new ae(new D(this.rctx,k,{vertices:L,instances:t===$.REGULAR?I.glLayout:H.glLayout},{vertices:this._verticesBufferObject,instances:ee.createVertex(this.rctx,te.STATIC_DRAW,t===$.REGULAR?e.regular.instancesData.buffer:e.silhouette.instancesData.buffer)}),t===$.REGULAR?e.regular.lodInfo:e.silhouette.lodInfo):null,i=e.regular.lodInfo.lengths.length>0?o($.REGULAR):null,a=e.silhouette.lodInfo.lengths.length>0?o($.SILHOUETTE):null,c=(i?.vao.memoryUsage??0)+(a?.vao.memoryUsage??0);return new le(i,a,{gpuMemoryUsage:c,externalMemoryUsage:n,averageEdgeLength:e.averageEdgeLength},r,J(t.meta),X(t.meta),t,s)}async _addGeometry(e,t,r,s,n,o){const i=r.attributes.get(A.POSITION),a=g(),c=this._computeModelTransformWithLocalOrigin(e,r,a),l=new pe(i,a,c);return this._addPositionData(t,l,r.edgeIndicesLength,s,n,o)}async _addPositionData(e,t,r,s,n,o=!1){if(null==e.loaded)return;const i=this._createComponentBuffers([s]);if(null==i||r<=0)return;const a=this._acquireRenderer(s.type,!!n.hasSlicePlane,!0),{modelTransform:c,origin:l}=t,d=t.position.indices,u=t.position,h=u.data.length/u.size,m=B.createBuffer(h);for(let f=0;f<h;f++)m.position.set(f,0,u.data[f*u.size]),m.position.set(f,1,u.data[f*u.size+1]),m.position.set(f,2,u.data[f*u.size+2]);Y(i.meta,[0,m.componentIndex.count],m.componentIndex);const g=await this._updatingHandles.addPromise(this._extractEdges(a.writerSettings,m,!1,o,d,r));if(null==e.loaded)return;const p=this._createRenderable(g,i,new ce(c,l),a.key,!1);e.renderables.push(p),a.addRenderable(p),this._gpuMemoryUsage+=p.statistics.gpuMemoryUsage}async _addComponentGeometry(e,t,r,s,n,o,i){if(null==t.loaded)return 0;const a=this._createComponentBuffers(o);if(null==a)return 0;const c=Q(o),l=this._acquireRenderer(c,i.hasSlicePlane||!1,!1),d=B.createBuffer(r.length/3);E(d.position.typedBuffer,r,d.position.typedBufferStride,3),Y(a.meta,n,d.componentIndex,s);const u=!0,h=l.writerSettings,m=await this._updatingHandles.addPromise(this._extractEdges(h,d,u,!1,s));if(null==t.loaded)return 0;const g=this._createRenderable(m,a,e,l.key,!0);return t.renderables.push(g),l.addRenderable(g),g.statistics.gpuMemoryUsage}async _addObjectMergedGeometries(e,t,r,s,n){const o=new Map;let i=0,a=null,c=0;for(let g=0;g<e.geometries.length;g++){const t=e.geometries[g];if(!t.material.supportsEdges)continue;!a&&t.localOrigin&&(a=t);const r=t.attributes.get(A.POSITION);c+=r.data.length/r.size,i+=t.edgeIndicesLength}const l=c>=65536?Uint32Array:Uint16Array,d=i?new l(i):null,u=[];let h=0;for(let g=0;g<e.geometries.length;g++){const t=e.geometries[g];if(!t.material.supportsEdges)continue;const r=t.attributes.get(A.POSITION),s=r.indices;let n=o.get(r.data);if(null==n){n=u.length/3;for(let e=0;e<r.data.length;e+=r.size)u.push(r.data[e]),u.push(r.data[e+1]),u.push(r.data[e+2]);o.set(r.data,n)}if(s)for(let e=0;e<t.edgeIndicesLength;e++)d[h++]=n+s[e]}const m=a||e.geometries[0],p=g(),f=this._computeModelTransformWithLocalOrigin(e,m,p);for(let g=0;g<e.geometries.length;g++)e.geometries[g].localOrigin=f.origin;const _=new pe(new T(u,d,3),p,f);await this._updatingHandles.addPromise(this._addPositionData(t,_,d.length,r[0],s,n))}_acquireRenderer(e,t,r){const s=G.getKey(e,t,r);let n=this._renderers.get(s);return null==this._strokesTexture&&(this._strokesTexture=F(this.rctx)),n||(n=new G(this.rctx,this.techniqueRepository,{type:e,hasSlicePlane:t,strokesTexture:this._strokesTexture,legacy:r,spherical:this.viewingMode===R.Global}),this._renderers.set(s,n)),++n.refCount,n}_removeRenderable(e){se(e.regular),se(e.silhouette);const t=this._renderers.get(e.rendererKey);if(t){t.removeRenderable(e),--t.refCount,"origin"in e.transform&&this._localOrigins.release(e.transform.origin),this._gpuMemoryUsage-=e.statistics.externalMemoryUsage?0:e.statistics.gpuMemoryUsage;for(const t of e.components.meta)e.components.buffer.releaseIndex(t.index)}}_updateObjectCameraDistances(e){const t=e.camera.eye,r=e.camera.viewForward,s=y(),n=e=>{_(s,e.center,t);const n=b(s,r),o=e.radius,i=n<-o?1/0:n<o?0:n-o;e.renderables.forEach((e=>e.distanceToCamera=i))};this._perObjectData.forEach(n),this._perObjectDataEvictionCache.forEach(n)}_renderRegularEdges(e,t,r){const s=e.bindRegularEdges(r,t),n=r.transparency,o=t.camera.perScreenPixelRatio;e.forEachRenderable((n=>{if(!ue(n)||!n.visible)return;const i=ge(n.regular.lod.lengths,n.distanceToCamera,o);e.renderRegularEdges(s,n,r,t,i)}),n)}_renderSilhouetteEdges(e,t,r){const s=e.bindSilhouetteEdges(r,t),n=r.transparency,o=t.camera.perScreenPixelRatio;e.forEachRenderable((n=>{if(!me(n)||!n.visible)return;const i=ge(n.silhouette.lod.lengths,n.distanceToCamera,o);e.renderSilhouetteEdges(s,n,r,t,i)}),n)}get test(){return{hasRenderedPrimitives:e=>{let t=!1;const r=e.perScreenPixelRatio,s=(e,s)=>e.forEachRenderable((e=>{e.visible&&!t&&(ue(e)&&(t=ge(e.regular.lod.lengths,e.distanceToCamera,r)>0),!t&&me(e)&&(t=ge(e.silhouette.lod.lengths,e.distanceToCamera,r)>0))}),s);return this._renderers.forEach((e=>{t||(s(e,K.OPAQUE),s(e,K.TRANSPARENT))})),t}}}};function se(e){null!=e&&(e.vao.vertexBuffers.instances.dispose(),e.vao.disposeVAOOnly(),e.vao=null)}function ne(e){let t=null,s=null;for(let n=0;n<e.geometries.length;n++){const o=e.geometries[n];if(o.material.supportsEdges){if(t){if(!r(t,o.transformation))return!1}else t=o.transformation;if(s||null==o.localOrigin){if(s&&null!=s.localOrigin&&null!=o.localOrigin&&s.localOrigin.id!==o.localOrigin.id)return!1}else s=o}}return!0}e([c({constructOnly:!0})],re.prototype,"rctx",void 0),e([c({constructOnly:!0})],re.prototype,"renderSR",void 0),e([c({constructOnly:!0})],re.prototype,"viewingMode",void 0),e([c({constructOnly:!0})],re.prototype,"techniqueRepository",void 0),e([c({constructOnly:!0})],re.prototype,"setNeedsRender",void 0),e([c({constructOnly:!0})],re.prototype,"schedule",void 0),e([c({readOnly:!0})],re.prototype,"_updatingHandles",void 0),e([c({readOnly:!0})],re.prototype,"updating",null),re=e([l("esri.views.3d.webgl-engine.lib.edgeRendering.EdgeView")],re);class oe{constructor(e,t,r){this.center=t,this.radius=r,this.renderables=new Array,this.loaded=e,this.loaded.then((()=>{null!=this.loaded&&(this.loaded=!0)}))}}class ie{constructor(e,t){this.buffer=e,this.meta=t}}class ae{constructor(e,t){this.vao=e,this.lod=t}}class ce{constructor(e,t){this.modelMatrix=e,this.origin=t}}class le{constructor(e,t,r,s,n,o,i,a){this.regular=e,this.silhouette=t,this.statistics=r,this.transform=s,this.edgeTransparency=n,this.objectTransparency=o,this.components=i,this.rendererKey=a,this.distanceToCamera=0,this.visible=!0}}class de extends le{}function ue(e){return null!=e.regular}class he extends le{}function me(e){return null!=e.silhouette}function ge(e,t,r){const n=t*r,o=s(e,n,!0);return-1===o?n<e[0]?e.length:0:e.length-o}class pe{constructor(e,t,r){this.position=e,this.modelTransform=t,this.origin=r}}const fe=m(),_e=()=>Promise.reject();export{re as EdgeView,ce as LegacyTransform,de as RegularRenderable,le as Renderable,he as SilhouetteRenderable};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import t from"../../../../../core/Accessor.js";import{equals as r,binaryIndexOf as s}from"../../../../../core/arrayUtils.js";import n from"../../../../../core/Logger.js";import{clamp as o}from"../../../../../core/mathUtils.js";import{disposeMaybe as i,destroyMaybe as a}from"../../../../../core/maybe.js";import{property as c}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/has.js";import{subclass as l}from"../../../../../core/accessorSupport/decorators/subclass.js";import{f as d,t as u,d as h}from"../../../../../chunks/mat3.js";import{a as m}from"../../../../../chunks/mat3f64.js";import{a as g}from"../../../../../chunks/mat4f64.js";import{h as p,s as f,c as _,u as b,j as y}from"../../../../../chunks/vec3.js";import{c as j}from"../../../../../chunks/vec3f64.js";import{UpdatingHandles as O}from"../../../../../core/support/UpdatingHandles.js";import{g as w,a as E}from"../../../../../chunks/sphere.js";import{c as v}from"../../../../../chunks/vec33.js";import{ViewingMode as R}from"../../../../ViewingMode.js";import{encodeElevationOffset as x}from"../../collections/Component/Material/shader/ComponentData.glsl.js";import{TwoVectorPosition as T}from"../../core/util/TwoVectorPosition.js";import{Attribute as M}from"../Attribute.js";import{GridLocalOriginFactory as C}from"../GridLocalOriginFactory.js";import{applyToModelMatrix as D}from"../localOriginHelper.js";import{LocalOriginManager as P}from"../LocalOriginManager.js";import{Object3D as S}from"../Object3D.js";import{VertexArrayObject as A}from"../VertexArrayObject.js";import{VertexAttribute as U}from"../VertexAttribute.js";import{VertexLayout as B,EdgeInputBufferLayout as k,EdgeShaderAttributeLocations as L,glVertexLayout as I}from"./bufferLayouts.js";import{RegularEdgeBufferWriter as H,SilhouetteEdgeBufferWriter as V}from"./edgeBufferWriters.js";import{EdgeType as N}from"./edgePreprocessing.js";import{EdgeRenderer as G,lineWidthFractionFactor as W,extensionLengthOffset as q}from"./EdgeRenderer.js";import{EdgePassParameters as z}from"./EdgeShaderParameters.js";import{EdgeWorkerHandle as K}from"./EdgeWorkerHandle.js";import{Transparency as F}from"./interfaces.js";import{generateStrokesTexture as Q}from"./strokes.js";import{determineRendererType as J,determineEdgeTransparency as X,determineObjectTransparency as Y,fillComponenBufferIndices as Z}from"./util.js";import{BufferManager as $}from"../TextureBackedBuffer/BufferManager.js";import{EdgeSilhouette as ee}from"../../shaders/sources/edgeRenderer/EdgeUtil.glsl.js";import{BufferObject as te}from"../../../../webgl/BufferObject.js";import{Usage as re}from"../../../../webgl/enums.js";let se=class extends t{constructor(e){super(e),this._updatingHandles=new O,this._perObjectData=new Map,this._perObjectDataEvictionCache=new Set,this._renderers=new Map,this._gpuMemoryUsage=0,this._workerAbort=new AbortController,this._tmpModelPosition=j(),this._localOrigins=new P(new C(e.renderSR))}initialize(){this._worker=new K(this.schedule),this._componentColorManager=new $(this.rctx,3);const e=B.createBuffer(4);for(let t=0;t<4;t++)e.sideness.set(t,0,0===t||3===t?0:1),e.sideness.set(t,1,0===t||1===t?0:1);this._verticesBufferObject=te.createVertex(this.rctx,re.STATIC_DRAW,e.buffer)}destroy(){this.destroyed||(this._perObjectData.forEach((e=>this._discardObjectEntry(e))),this._perObjectData.clear(),this._strokesTexture=i(this._strokesTexture),this._componentColorManager=a(this._componentColorManager),this._workerAbort.abort(),this._worker.destroy(),this._verticesBufferObject=i(this._verticesBufferObject),this._renderers.clear(),this._updatingHandles.destroy(),this._set("schedule",be))}get updating(){return this._updatingHandles.updating}get usedMemory(){return this._gpuMemoryUsage}shouldRender(){return this._renderers.size>0}async addComponentObject(e,t,r,s,n,o,i,a){if(this.hasObject(e))return this.getObjectMemoryUsage(e);let c;const l=new ie(new Promise((e=>c=e)),r.center,r.radius);this._perObjectData.set(e,l);const d=await this._updatingHandles.addPromise(this._addComponentGeometry(t,l,s,n,o,i,a));return this.setNeedsRender(),c(),d}async addOrUpdateObject3D(e,t,r,s){if(this.destroyed)return void n.getLogger(this).warn("Attempt to add an object to a destroyed instance");const o=this._perObjectData.get(e);let i;o?.renderables.length>0&&this._perObjectDataEvictionCache.add(o);const a=e.boundingVolumeWorldSpace.bounds,c=new ie(new Promise((e=>i=e)),w(a),E(a));this._perObjectData.set(e,c);const l=new Array;if(r.mergeGeometries&&e.geometries.length>1&&oe(e))l.push(this._addObjectMergedGeometries(e,c,t,r,s));else for(let n=0;n<e.geometries.length;n++){const o=e.geometries[n];o.material.supportsEdges&&l.push(this._addGeometry(e,c,o,t[0],r,s))}await this._updatingHandles.addPromise(Promise.all(l)),this._perObjectDataEvictionCache.delete(c),this._discardObjectEntry(o),this.setNeedsRender(),i()}fastUpdateObject3DEdgesTransform(e){if(this.destroyed)return!1;const t=this._perObjectData.get(e);if(!t)return!1;const{geometries:r}=e,{renderables:s}=t;if(0===r.length||0===s.length)return!0;if(s.length>1)return!1;const[n]=s,o=n.transform;if(!(o instanceof le))return!1;const[i]=r,a=o.origin.origin.vec3,c=i.localOrigin?.vec3;if(null==c||!p(a,c))return!1;const l=g(),d=this._computeModelTransformWithLocalOrigin(e,i,l);return n.transform=new le(l,d),this.setNeedsRender(),!0}_discardObjectEntry(e){e&&(e.renderables.length&&(e.renderables.forEach((e=>this._removeRenderable(e))),this.setNeedsRender()),e.loaded=null)}hasObject(e){return this._perObjectData.has(e)}async updateAllComponentOpacities(e,t){const r=await this._updatingHandles.addPromise(this._getObjectEntry(e));if(null==r)return;const s=t instanceof Array?e=>t[e]:()=>t;r.renderables.forEach((e=>{const t=e.components.meta.length;for(let r=0;r<t;r++){const t=s(r),n=e.components.meta[r],o=n.index;n.material.opacity=t,e.components.buffer.textureBuffer.setDataElement(o,1,3,255*t)}this._updateTransparency(e)})),this.setNeedsRender()}async getObjectMemoryUsage(e){const t=await this._getObjectEntry(e);return null!=t?t.renderables.reduce(((e,t)=>e+t.statistics.gpuMemoryUsage),0):0}async updateAllComponentMaterials(e,t,r,s){const n=e instanceof S,o=!!r.hasSlicePlane,i=J(t),a=G.getKey(i,o,n),c=await this._updatingHandles.addPromise(this._getObjectEntry(e));null!=c&&(c.renderables.forEach((e=>{if(a!==e.rendererKey){const t=this._renderers.get(e.rendererKey),r=this._acquireRenderer(i,o,n);t.removeRenderable(e),--t.refCount,e.rendererKey=a,r.addRenderable(e)}for(let r=0;r<t.length;r++)e.components.meta[r].material=t[r];s&&this._updateComponentBuffer(e.components),this._updateTransparency(e)})),this.setNeedsRender())}async updateAllVerticalOffsets(e,t){const r=await this._updatingHandles.addPromise(this._getObjectEntry(e));null!=r&&(r.renderables.forEach((e=>{const r=e.components.meta;for(let s=0;s<r.length;s++)e.components.meta[s].verticalOffset=t?.[s]??0;this._updateComponentBuffer(e.components)})),this.setNeedsRender())}async updateObjectVisibility(e,t){const r=await this._updatingHandles.addPromise(this._getObjectEntry(e));null!=r&&(r.renderables.forEach((e=>e.visible=t)),this.setNeedsRender())}removeObject(e){const t=this._perObjectData.get(e);t&&(this._perObjectData.delete(e),this._discardObjectEntry(t))}async _getObjectEntry(e){const t=this._perObjectData.get(e);if(!t)throw new Error("no object");return await t.loaded,null==t.loaded?null:t}render(e,t){if(null==this._componentColorManager)return;this._localOrigins.updateViewMatrices(e.camera.viewMatrix);const r=e.camera.viewInverseTransposeMatrix,s=j(),n=new T;let o=0,i=0;if(this._renderers.forEach((r=>{if(0===r.refCount)this._renderers.delete(r.key),r.dispose();else{let s=!0,n=!0;r.forEachRenderable((t=>{t.visible&&(o+=t.statistics.averageEdgeLength,i++,s&&t.regular&&(r.updateTechnique(e,!1),s=!1),n&&t.silhouette&&(r.updateTechnique(e,!0),n=!1))}),t)}})),this._componentColorManager.garbageCollect(),this._componentColorManager.updateTextures(),0===i)return;const a=new z(40*o/i,t);f(s,r[3],r[7],r[11]),n.set(s),_(a.transformWorldFromViewTH,n.high),_(a.transformWorldFromViewTL,n.low),d(a.transformViewFromCameraRelativeRS,e.camera.viewMatrix),u(_e,a.transformViewFromCameraRelativeRS),h(a.transformNormalViewFromGlobal,_e),a.transformProjFromView=e.camera.projectionMatrix,this._updateObjectCameraDistances(e),this._renderers.forEach((t=>{this._renderRegularEdges(t,e,a),this._renderSilhouetteEdges(t,e,a)}))}_updateTransparency(e){const t=X(e.components.meta),r=Y(e.components.meta);t===e.edgeTransparency&&r===e.objectTransparency||(e.edgeTransparency=t,e.objectTransparency=r,this._renderers.get(e.rendererKey).setRenderablesDirty())}_computeModelTransformWithLocalOrigin(e,t,r){e.getCombinedShaderTransformation(t,r);const s=null!=t.localOrigin?this._localOrigins.register(t.localOrigin):this._localOrigins.acquire(f(this._tmpModelPosition,r[12],r[13],r[14]));return t.localOrigin=s.origin,D(s.origin.vec3,r),s}_updateComponentBuffer(e){const{meta:t,buffer:r}=e,s=new Uint8Array(4);for(let n=0;n<t.length;n++){const e=t[n].material,i=t[n].index,a=o(Math.round(e.size*W),0,255),c=o(e.extensionLength,-q,255-q)+q,l="solid"===e.type?N.SOLID:N.SKETCH,d=255*e.opacity,u=e.color,h=255*u[0],m=255*u[1],g=255*u[2],p=255*u[3];r.textureBuffer.setData(i,0,h,m,g,p),r.textureBuffer.setData(i,1,a,c,l,d),x(t[n].verticalOffset,s),r.textureBuffer.setData(i,2,s[0],s[1],s[2],s[3])}}_createComponentBuffers(e){if(null==this._componentColorManager)return null;const t=new Array,r=this._componentColorManager.getBuffer(e.length);for(let n=0;n<e.length;n++){const s=e[n],o=r.acquireIndex();t.push({index:o,verticalOffset:0,material:s})}const s=new ae(r,t);return this._updateComponentBuffer(s),s}_extractEdges(e,t,r,s,n,o=n.length){return this._worker.process({data:t,indices:n,indicesLength:o,writerSettings:e,skipDeduplicate:r},this._workerAbort.signal,s)}_createRenderable(e,t,r,s,n){const o=t=>null!=this._verticesBufferObject?new ce(new A(this.rctx,L,{vertices:I,instances:t===ee.REGULAR?H.glLayout:V.glLayout},{vertices:this._verticesBufferObject,instances:te.createVertex(this.rctx,re.STATIC_DRAW,t===ee.REGULAR?e.regular.instancesData.buffer:e.silhouette.instancesData.buffer)}),t===ee.REGULAR?e.regular.lodInfo:e.silhouette.lodInfo):null,i=e.regular.lodInfo.lengths.length>0?o(ee.REGULAR):null,a=e.silhouette.lodInfo.lengths.length>0?o(ee.SILHOUETTE):null,c=(i?.vao.memoryUsage??0)+(a?.vao.memoryUsage??0);return new de(i,a,{gpuMemoryUsage:c,externalMemoryUsage:n,averageEdgeLength:e.averageEdgeLength},r,X(t.meta),Y(t.meta),t,s)}async _addGeometry(e,t,r,s,n,o){const i=r.attributes.get(U.POSITION),a=g(),c=this._computeModelTransformWithLocalOrigin(e,r,a),l=new fe(i,a,c);return this._addPositionData(t,l,r.edgeIndicesLength,s,n,o)}async _addPositionData(e,t,r,s,n,o=!1){if(null==e.loaded)return;const i=this._createComponentBuffers([s]);if(null==i||r<=0)return;const a=this._acquireRenderer(s.type,!!n.hasSlicePlane,!0),{modelTransform:c,origin:l}=t,d=t.position.indices,u=t.position,h=u.data.length/u.size,m=k.createBuffer(h);for(let f=0;f<h;f++)m.position.set(f,0,u.data[f*u.size]),m.position.set(f,1,u.data[f*u.size+1]),m.position.set(f,2,u.data[f*u.size+2]);Z(i.meta,[0,m.componentIndex.count],m.componentIndex);const g=await this._updatingHandles.addPromise(this._extractEdges(a.writerSettings,m,!1,o,d,r));if(null==e.loaded)return;const p=this._createRenderable(g,i,new le(c,l),a.key,!1);e.renderables.push(p),a.addRenderable(p),this._gpuMemoryUsage+=p.statistics.gpuMemoryUsage}async _addComponentGeometry(e,t,r,s,n,o,i){if(null==t.loaded)return 0;const a=this._createComponentBuffers(o);if(null==a)return 0;const c=J(o),l=this._acquireRenderer(c,i.hasSlicePlane||!1,!1),d=k.createBuffer(r.length/3);v(d.position.typedBuffer,r,d.position.typedBufferStride,3),Z(a.meta,n,d.componentIndex,s);const u=!0,h=l.writerSettings,m=await this._updatingHandles.addPromise(this._extractEdges(h,d,u,!1,s));if(null==t.loaded)return 0;const g=this._createRenderable(m,a,e,l.key,!0);return t.renderables.push(g),l.addRenderable(g),g.statistics.gpuMemoryUsage}async _addObjectMergedGeometries(e,t,r,s,n){const o=new Map;let i=0,a=null,c=0;for(let g=0;g<e.geometries.length;g++){const t=e.geometries[g];if(!t.material.supportsEdges)continue;!a&&t.localOrigin&&(a=t);const r=t.attributes.get(U.POSITION);c+=r.data.length/r.size,i+=t.edgeIndicesLength}const l=c>=65536?Uint32Array:Uint16Array,d=i?new l(i):null,u=[];let h=0;for(let g=0;g<e.geometries.length;g++){const t=e.geometries[g];if(!t.material.supportsEdges)continue;const r=t.attributes.get(U.POSITION),s=r.indices;let n=o.get(r.data);if(null==n){n=u.length/3;for(let e=0;e<r.data.length;e+=r.size)u.push(r.data[e]),u.push(r.data[e+1]),u.push(r.data[e+2]);o.set(r.data,n)}if(s)for(let e=0;e<t.edgeIndicesLength;e++)d[h++]=n+s[e]}const m=a||e.geometries[0],p=g(),f=this._computeModelTransformWithLocalOrigin(e,m,p);for(let g=0;g<e.geometries.length;g++)e.geometries[g].localOrigin=f.origin;const _=new fe(new M(u,d,3),p,f);await this._updatingHandles.addPromise(this._addPositionData(t,_,d.length,r[0],s,n))}_acquireRenderer(e,t,r){const s=G.getKey(e,t,r);let n=this._renderers.get(s);return null==this._strokesTexture&&(this._strokesTexture=Q(this.rctx)),n||(n=new G(this.rctx,this.techniqueRepository,{type:e,hasSlicePlane:t,strokesTexture:this._strokesTexture,legacy:r,spherical:this.viewingMode===R.Global}),this._renderers.set(s,n)),++n.refCount,n}_removeRenderable(e){ne(e.regular),ne(e.silhouette);const t=this._renderers.get(e.rendererKey);if(t){t.removeRenderable(e),--t.refCount,"origin"in e.transform&&this._localOrigins.release(e.transform.origin),this._gpuMemoryUsage-=e.statistics.externalMemoryUsage?0:e.statistics.gpuMemoryUsage;for(const t of e.components.meta)e.components.buffer.releaseIndex(t.index)}}_updateObjectCameraDistances(e){const t=e.camera.eye,r=e.camera.viewForward,s=j(),n=e=>{b(s,e.center,t);const n=y(s,r),o=e.radius,i=n<-o?1/0:n<o?0:n-o;e.renderables.forEach((e=>e.distanceToCamera=i))};this._perObjectData.forEach(n),this._perObjectDataEvictionCache.forEach(n)}_renderRegularEdges(e,t,r){const s=e.bindRegularEdges(r,t),n=r.transparency,o=t.camera.perScreenPixelRatio;e.forEachRenderable((n=>{if(!he(n)||!n.visible)return;const i=pe(n.regular.lod.lengths,n.distanceToCamera,o);e.renderRegularEdges(s,n,r,t,i)}),n)}_renderSilhouetteEdges(e,t,r){const s=e.bindSilhouetteEdges(r,t),n=r.transparency,o=t.camera.perScreenPixelRatio;e.forEachRenderable((n=>{if(!ge(n)||!n.visible)return;const i=pe(n.silhouette.lod.lengths,n.distanceToCamera,o);e.renderSilhouetteEdges(s,n,r,t,i)}),n)}get test(){return{hasRenderedPrimitives:e=>{let t=!1;const r=e.perScreenPixelRatio,s=(e,s)=>e.forEachRenderable((e=>{e.visible&&!t&&(he(e)&&(t=pe(e.regular.lod.lengths,e.distanceToCamera,r)>0),!t&&ge(e)&&(t=pe(e.silhouette.lod.lengths,e.distanceToCamera,r)>0))}),s);return this._renderers.forEach((e=>{t||(s(e,F.OPAQUE),s(e,F.TRANSPARENT))})),t},getObjectData:e=>this._perObjectData.get(e)}}};function ne(e){null!=e&&(e.vao.vertexBuffers.instances.dispose(),e.vao.disposeVAOOnly(),e.vao=null)}function oe(e){let t=null,s=null;for(let n=0;n<e.geometries.length;n++){const o=e.geometries[n];if(o.material.supportsEdges){if(t){if(!r(t,o.transformation))return!1}else t=o.transformation;if(s||null==o.localOrigin){if(s&&null!=s.localOrigin&&null!=o.localOrigin&&s.localOrigin.id!==o.localOrigin.id)return!1}else s=o}}return!0}e([c({constructOnly:!0})],se.prototype,"rctx",void 0),e([c({constructOnly:!0})],se.prototype,"renderSR",void 0),e([c({constructOnly:!0})],se.prototype,"viewingMode",void 0),e([c({constructOnly:!0})],se.prototype,"techniqueRepository",void 0),e([c({constructOnly:!0})],se.prototype,"setNeedsRender",void 0),e([c({constructOnly:!0})],se.prototype,"schedule",void 0),e([c({readOnly:!0})],se.prototype,"_updatingHandles",void 0),e([c({readOnly:!0})],se.prototype,"updating",null),se=e([l("esri.views.3d.webgl-engine.lib.edgeRendering.EdgeView")],se);class ie{constructor(e,t,r){this.center=t,this.radius=r,this.renderables=new Array,this.loaded=e,this.loaded.then((()=>{null!=this.loaded&&(this.loaded=!0)}))}}class ae{constructor(e,t){this.buffer=e,this.meta=t}}class ce{constructor(e,t){this.vao=e,this.lod=t}}class le{constructor(e,t){this.modelMatrix=e,this.origin=t}}class de{constructor(e,t,r,s,n,o,i,a){this.regular=e,this.silhouette=t,this.statistics=r,this.transform=s,this.edgeTransparency=n,this.objectTransparency=o,this.components=i,this.rendererKey=a,this.distanceToCamera=0,this.visible=!0}}class ue extends de{}function he(e){return null!=e.regular}class me extends de{}function ge(e){return null!=e.silhouette}function pe(e,t,r){const n=t*r,o=s(e,n,!0);return-1===o?n<e[0]?e.length:0:e.length-o}class fe{constructor(e,t,r){this.position=e,this.modelTransform=t,this.origin=r}}const _e=m(),be=()=>Promise.reject();export{se as EdgeView,le as LegacyTransform,ue as RegularRenderable,de as Renderable,me as SilhouetteRenderable};
@@ -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{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 i}from"../../core/accessorSupport/decorators/subclass.js";import{CodedValue as l}from"../../layers/support/CodedValue.js";import n from"../../layers/support/CodedValueDomain.js";import"../../layers/support/Domain.js";import"../../layers/support/InheritedDomain.js";import"../../layers/support/RangeDomain.js";import{getDomainRange as r,validateDomainValue as s}from"../../layers/support/domainUtils.js";import{isFieldVisibleByDefault as o,getLowerCaseEditTrackingFields as u,isNumericField as a,isStringField as p,isDateField as d,isTimeOnlyField as m,getFieldRange as h,TypeValidationError as y,validateFieldValue as c}from"../../layers/support/fieldUtils.js";import{isRelatableFeatureSupportedLayer as g}from"../Feature/support/featureUtils.js";import f from"./EditableInput.js";import{getNormalizedFeatureTypeInfo as v,isFieldElementWithInputType as E,valueIsInvalidSwitchValue as x,isFieldElementWithTextInput as b,isFieldElementWithShowNoValueOptionInput as _,LengthValidationError as V}from"./featureFormUtils.js";var T;!function(e){e.Text="text",e.Number="number",e.Date="date",e.Unsupported="unsupported"}(T||(T={}));const D="__internal-type-based-coded-value-domain__";let N=class extends f{constructor(e){super(e),this._storedValue=null,this._valueOriginIsExpression=!1,this.error=null,this.preservesValueWhenHidden=!0,this.field=null,this.group=null,this.requiredExpressionExecutor=null,this.type="field",this.valueExpressionExecutor=null}get _dateRange(){const{element:e}=this;if("datetime-picker"===e?.input?.type){const{max:t,min:i}=e.input;return{max:t,min:i}}return{min:null,max:null}}get _configAllowsEdits(){const{element:e,layer:t,name:i}=this;if(null!=e)return e.editableExpression?!!this.evaluatedEditableExpression:!1!==e.editable;if(t?.userHasUpdateItemPrivileges)return!0;const l=t&&"popupTemplate"in t?t?.popupTemplate?.fieldInfos?.find((({fieldName:e})=>e===i)):null;return l?.isEditable??!0}get _layerAndFieldAllowEdits(){return this.layerAllowsEdits&&this.field?.editable}get _isVisibleByDefault(){const{field:e,layer:t}=this;return!!e?.visible&&o(e,t)}get _isEditTrackingField(){return u(this.layer).includes(this.name?.toLowerCase())}get _shouldUseValueExpression(){return this._layerAndFieldAllowEdits&&!this._configAllowsEdits&&null!=this.valueExpressionExecutor}get dataType(){const{field:e}=this;return a(e)?T.Number:p(e)?T.Text:d(e)||m(e)?T.Date:T.Unsupported}get dateDataType(){if(this.dataType===T.Date)return"date"!==this.field.type?"string":"number"}get domain(){const{layer:e}=this,{typeFieldName:t,types:i}=v(e);if(t===this.name&&null==this.field.domain)return new n({name:D,codedValues:i.map((({code:e,name:t})=>new l({code:e,name:t})))});const{feature:r}=this,s=e?.getFieldDomain(this.name,{feature:r}),o=this.element?.domain;return null!=o&&this._isDomainCompatible(o)?o:s}get editable(){return!!this._layerAndFieldAllowEdits&&(this.evaluatedEditableExpression??this._configAllowsEdits)}get evaluatedRequiredExpression(){const{requiredExpressionExecutor:e}=this;return null!=e?!!e.lastEvaluatedValue:null}get evaluatedValueExpression(){const{valueExpressionExecutor:e}=this;return null!=e?e.lastEvaluatedValue:null}get hint(){return this.element?.hint}get includeDate(){return!(this.dataType!==T.Date||"time-only"===this.field.type)}get includeTime(){const{element:e,field:t}=this;if(this.dataType!==T.Date)return!1;if("time-only"===t.type)return!0;if("date-only"===t.type)return!1;const i="datetime-picker"===e?.input?.type?e.input.includeTime:void 0;return void 0===i||i}get includeTimestamp(){return"timestamp-offset"===this.field.type}set initialFeature(e){this._set("initialFeature",e),this.notifyChange("valid")}get inputType(){return this.element?.input?.type}get hasInvalidSwitchValue(){const{element:e}=this,t=E(e,"switch")?e.input:null;return!t||x(this.value,t)}get isRelationshipKeyField(){const{field:e,layer:t}=this;return g(t)&&!!t.relationships?.some((t=>t.keyField===e.name))}get label(){return this.element?.label||this.field.alias||this.field.name}get maxLength(){const e=-1;if(this.dataType===T.Date)return e;const{field:t,element:i}=this,l=t?.length,n=b(i)?i.input.maxLength:NaN;return null!=n&&!isNaN(n)&&n>=e&&(l===e||n<=l)?n:l}get minLength(){const e=-1;if(this.dataType===T.Date)return e;const{field:t,element:i}=this,l=t?.length,n=b(i)?i.input.minLength:NaN;return null!=n&&!isNaN(n)&&n>=e&&(l===e||n<=l)?n:e}get name(){return this.field?.name}get range(){const{_dateRange:e,domain:t,field:i}=this,{max:l,min:n}=e,s=null!=l&&F(l)?l.getTime():null,o=null!=n&&F(n)?n.getTime():null,u=r(t)||h(i);if(!u)return{max:s,min:o};const a=u.max===Number.MAX_VALUE?null:u.max,p=u.min===Number.MIN_VALUE?null:u.min;return{max:null!=s&&(null===a||null!=a&&s<a)?s:a,min:null!=o&&(null===p||null!=p&&o>p)?o:p}}get required(){const{editable:e,evaluatedRequiredExpression:t,field:i,visible:l}=this;return!!e&&(!1===i?.nullable||!(!l||null==t)&&t)}set required(e){this._overrideIfSome("required",e)}get showNoValueOptionEnabled(){const{element:e}=this;return!this.required&&(!_(e)||e.input.showNoValueOption)}get showNoValueLabel(){const{element:e}=this;return _(e)?e.input.noValueOptionLabel:null}get submittable(){const{field:e,required:t,valid:i,value:l}=this;return(!t||null!=l)&&(!!i||this.initialFeature.getAttribute(e.name)===l)}get updating(){const{editableExpressionExecutor:e,valueExpressionExecutor:t,visibilityExpressionExecutor:i,preservesValueWhenHidden:l}=this;return null!=t&&t.updating||null!=e&&e.updating||!1===l&&null!=i&&i.updating}get valid(){const e=this.editable?this._validate():null;return this._set("error",e),null===e}get value(){if(!1===this.preservesValueWhenHidden&&(!1===this.evaluatedVisibilityExpression||!1===this.group?.evaluatedVisibilityExpression)){this._valueOriginIsExpression=!0;const e=this.field.defaultValue??null;return this._storedValue!==e&&this.set("_storedValue",e),e}if(this._shouldUseValueExpression){this._valueOriginIsExpression=!0;const e=this.evaluatedValueExpression;if(this.dataType===T.Date){if(e instanceof Date)return e.getTime();if("number"!=typeof e)return parseInt(e,10)}return null!=e&&"object"==typeof e?e.toString():e}return this._valueOriginIsExpression=!1,this._storedValue}set value(e){this.notifyChange("evaluatedVisibilityExpression"),this.set("_storedValue",e)}get valueOriginIsExpression(){return this._valueOriginIsExpression}get visible(){return!this._isEditTrackingField&&(null!=this.evaluatedVisibilityExpression?this.evaluatedVisibilityExpression:null!=this.element||this._isVisibleByDefault)}_isDomainCompatible(e){const{field:t}=this;if("coded-value"===e?.type){const i=typeof e.codedValues[0].code;if("string"===i&&p(t)||"number"===i&&a(t))return!0}return!!("range"===e?.type&&a(t)||d(t)||m(t))}_validate(){const{dataType:e,domain:t,field:i,initialFeature:l,minLength:n,required:r,valid:o,value:u}=this,a=r&&null==u,p=void 0!==o;return!a&&l.getAttribute(i.name)===u&&p?null:a?y.INVALID_TYPE:"text"===e&&n>-1&&"string"==typeof u&&u.length<n?V.TOO_SHORT:t?null!==u||r?s(t,u):null:c(i,u)}};e([t()],N.prototype,"_storedValue",void 0),e([t()],N.prototype,"_configAllowsEdits",null),e([t()],N.prototype,"_layerAndFieldAllowEdits",null),e([t()],N.prototype,"_isVisibleByDefault",null),e([t()],N.prototype,"_isEditTrackingField",null),e([t()],N.prototype,"_shouldUseValueExpression",null),e([t()],N.prototype,"_valueOriginIsExpression",void 0),e([t()],N.prototype,"dataType",null),e([t()],N.prototype,"dateDataType",null),e([t()],N.prototype,"domain",null),e([t()],N.prototype,"editable",null),e([t({readOnly:!0})],N.prototype,"error",void 0),e([t({constructOnly:!0})],N.prototype,"preservesValueWhenHidden",void 0),e([t()],N.prototype,"evaluatedRequiredExpression",null),e([t()],N.prototype,"evaluatedValueExpression",null),e([t()],N.prototype,"field",void 0),e([t()],N.prototype,"group",void 0),e([t({readOnly:!0})],N.prototype,"hint",null),e([t()],N.prototype,"includeDate",null),e([t()],N.prototype,"includeTime",null),e([t()],N.prototype,"includeTimestamp",null),e([t()],N.prototype,"initialFeature",null),e([t({readOnly:!0})],N.prototype,"inputType",null),e([t()],N.prototype,"hasInvalidSwitchValue",null),e([t()],N.prototype,"isRelationshipKeyField",null),e([t()],N.prototype,"label",null),e([t()],N.prototype,"maxLength",null),e([t()],N.prototype,"minLength",null),e([t({readOnly:!0})],N.prototype,"name",null),e([t()],N.prototype,"range",null),e([t()],N.prototype,"required",null),e([t()],N.prototype,"requiredExpressionExecutor",void 0),e([t()],N.prototype,"showNoValueOptionEnabled",null),e([t()],N.prototype,"submittable",null),e([t({readOnly:!0})],N.prototype,"type",void 0),e([t()],N.prototype,"updating",null),e([t()],N.prototype,"valid",null),e([t({value:null})],N.prototype,"value",null),e([t()],N.prototype,"valueExpressionExecutor",void 0),e([t()],N.prototype,"valueOriginIsExpression",null),e([t()],N.prototype,"visible",null),N=e([i("esri.widgets.FeatureForm.FieldInput")],N);const F=e=>e&&!Number.isNaN(e.valueOf()),O=N;export{O as default};
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 i}from"../../core/accessorSupport/decorators/subclass.js";import{CodedValue as l}from"../../layers/support/CodedValue.js";import n from"../../layers/support/CodedValueDomain.js";import"../../layers/support/Domain.js";import"../../layers/support/InheritedDomain.js";import"../../layers/support/RangeDomain.js";import{getDomainRange as s,validateDomainValue as r}from"../../layers/support/domainUtils.js";import{isFieldVisibleByDefault as o,getLowerCaseEditTrackingFields as u,isNumericField as a,isStringField as p,isDateField as d,isTimeOnlyField as m,getFieldRange as h,TypeValidationError as y,validateFieldValue as c}from"../../layers/support/fieldUtils.js";import{isRelatableFeatureSupportedLayer as g}from"../Feature/support/featureUtils.js";import f from"./EditableInput.js";import{getNormalizedFeatureTypeInfo as v,isFieldElementWithInputType as E,valueIsInvalidSwitchValue as x,isFieldElementWithTextInput as b,isFieldElementWithShowNoValueOptionInput as _,LengthValidationError as V}from"./featureFormUtils.js";var T;!function(e){e.Text="text",e.Number="number",e.Date="date",e.Unsupported="unsupported"}(T||(T={}));const D="__internal-type-based-coded-value-domain__";let I=class extends f{constructor(e){super(e),this._storedValue=null,this._valueOriginIsExpression=!1,this.error=null,this.preservesValueWhenHidden=!0,this.field=null,this.group=null,this.requiredExpressionExecutor=null,this.type="field",this._fieldInputWasVisibleDuringLifetime=!1,this.valueExpressionExecutor=null}get _dateRange(){const{element:e}=this;if("datetime-picker"===e?.input?.type){const{max:t,min:i}=e.input;return{max:t,min:i}}return{min:null,max:null}}get _configAllowsEdits(){const{element:e,layer:t,name:i}=this;if(null!=e)return e.editableExpression?!!this.evaluatedEditableExpression:!1!==e.editable;if(t?.userHasUpdateItemPrivileges)return!0;const l=t&&"popupTemplate"in t?t?.popupTemplate?.fieldInfos?.find((({fieldName:e})=>e===i)):null;return l?.isEditable??!0}get _layerAndFieldAllowEdits(){return this.layerAllowsEdits&&this.field?.editable}get _isVisibleByDefault(){const{field:e,layer:t}=this;return!!e?.visible&&o(e,t)}get _isEditTrackingField(){return u(this.layer).includes(this.name?.toLowerCase())}get _shouldUseValueExpression(){return this._layerAndFieldAllowEdits&&!this._configAllowsEdits&&null!=this.valueExpressionExecutor}get dataType(){const{field:e}=this;return a(e)?T.Number:p(e)?T.Text:d(e)||m(e)?T.Date:T.Unsupported}get dateDataType(){if(this.dataType===T.Date)return"date"!==this.field.type?"string":"number"}get domain(){const{layer:e}=this,{typeFieldName:t,types:i}=v(e);if(t===this.name&&null==this.field.domain)return new n({name:D,codedValues:i.map((({code:e,name:t})=>new l({code:e,name:t})))});const{feature:s}=this,r=e?.getFieldDomain(this.name,{feature:s}),o=this.element?.domain;return null!=o&&this._isDomainCompatible(o)?o:r}get editable(){return!!this._layerAndFieldAllowEdits&&(this.evaluatedEditableExpression??this._configAllowsEdits)}get evaluatedRequiredExpression(){const{requiredExpressionExecutor:e}=this;return null!=e?!!e.lastEvaluatedValue:null}get evaluatedValueExpression(){const{valueExpressionExecutor:e}=this;return null!=e?e.lastEvaluatedValue:null}get hint(){return this.element?.hint}get includeDate(){return!(this.dataType!==T.Date||"time-only"===this.field.type)}get includeTime(){const{element:e,field:t}=this;if(this.dataType!==T.Date)return!1;if("time-only"===t.type)return!0;if("date-only"===t.type)return!1;const i="datetime-picker"===e?.input?.type?e.input.includeTime:void 0;return void 0===i||i}get includeTimestamp(){return"timestamp-offset"===this.field.type}set initialFeature(e){this._set("initialFeature",e),this.notifyChange("valid")}get inputType(){return this.element?.input?.type}get hasInvalidSwitchValue(){const{element:e}=this,t=E(e,"switch")?e.input:null;return!t||x(this.value,t)}get isRelationshipKeyField(){const{field:e,layer:t}=this;return g(t)&&!!t.relationships?.some((t=>t.keyField===e.name))}get label(){return this.element?.label||this.field.alias||this.field.name}get maxLength(){const e=-1;if(this.dataType===T.Date)return e;const{field:t,element:i}=this,l=t?.length,n=b(i)?i.input.maxLength:NaN;return null!=n&&!isNaN(n)&&n>=e&&(l===e||n<=l)?n:l}get minLength(){const e=-1;if(this.dataType===T.Date)return e;const{field:t,element:i}=this,l=t?.length,n=b(i)?i.input.minLength:NaN;return null!=n&&!isNaN(n)&&n>=e&&(l===e||n<=l)?n:e}get name(){return this.field?.name}get range(){const{_dateRange:e,domain:t,field:i}=this,{max:l,min:n}=e,r=null!=l&&N(l)?l.getTime():null,o=null!=n&&N(n)?n.getTime():null,u=s(t)||h(i);if(!u)return{max:r,min:o};const a=u.max===Number.MAX_VALUE?null:u.max,p=u.min===Number.MIN_VALUE?null:u.min;return{max:null!=r&&(null===a||null!=a&&r<a)?r:a,min:null!=o&&(null===p||null!=p&&o>p)?o:p}}get required(){const{editable:e,evaluatedRequiredExpression:t,field:i,visible:l}=this;return!!e&&(!1===i?.nullable||!(!l||null==t)&&t)}set required(e){this._overrideIfSome("required",e)}get showNoValueOptionEnabled(){const{element:e}=this;return!this.required&&(!_(e)||e.input.showNoValueOption)}get showNoValueLabel(){const{element:e}=this;return _(e)?e.input.noValueOptionLabel:null}get submittable(){const{field:e,required:t,valid:i,value:l}=this;return(!t||null!=l)&&(!!i||this.initialFeature.getAttribute(e.name)===l)}get updating(){const{editableExpressionExecutor:e,valueExpressionExecutor:t,visibilityExpressionExecutor:i,preservesValueWhenHidden:l}=this;return null!=t&&t.updating||null!=e&&e.updating||!1===l&&null!=i&&i.updating}get valid(){const e=this.editable?this._validate():null;return this._set("error",e),null===e}get value(){if(this._fieldInputWasVisibleDuringLifetime=this._fieldInputWasVisibleDuringLifetime||this.visible&&!1!==this.group?.visible,!1===this.preservesValueWhenHidden&&this._fieldInputWasVisibleDuringLifetime&&(!1===this.evaluatedVisibilityExpression||!1===this.group?.evaluatedVisibilityExpression))return this._valueOriginIsExpression=!0,null!==this._storedValue&&this.set("_storedValue",null),null;if(this._shouldUseValueExpression){this._valueOriginIsExpression=!0;const e=this.evaluatedValueExpression;if(this.dataType===T.Date){if(e instanceof Date)return e.getTime();if("number"!=typeof e)return parseInt(e,10)}return null!=e&&"object"==typeof e?e.toString():e}return this._valueOriginIsExpression=!1,this._storedValue}set value(e){this.notifyChange("evaluatedVisibilityExpression"),this.set("_storedValue",e)}get valueOriginIsExpression(){return this._valueOriginIsExpression}get visible(){return!this._isEditTrackingField&&(null!=this.evaluatedVisibilityExpression?this.evaluatedVisibilityExpression:null!=this.element||this._isVisibleByDefault)}_isDomainCompatible(e){const{field:t}=this;if("coded-value"===e?.type){const i=typeof e.codedValues[0].code;if("string"===i&&p(t)||"number"===i&&a(t))return!0}return!!("range"===e?.type&&a(t)||d(t)||m(t))}_validate(){const{dataType:e,domain:t,field:i,initialFeature:l,minLength:n,required:s,valid:o,value:u}=this,a=s&&null==u,p=void 0!==o;return!a&&l.getAttribute(i.name)===u&&p?null:a?y.INVALID_TYPE:"text"===e&&n>-1&&"string"==typeof u&&u.length<n?V.TOO_SHORT:t?null!==u||s?r(t,u):null:c(i,u)}};e([t()],I.prototype,"_storedValue",void 0),e([t()],I.prototype,"_configAllowsEdits",null),e([t()],I.prototype,"_layerAndFieldAllowEdits",null),e([t()],I.prototype,"_isVisibleByDefault",null),e([t()],I.prototype,"_isEditTrackingField",null),e([t()],I.prototype,"_shouldUseValueExpression",null),e([t()],I.prototype,"_valueOriginIsExpression",void 0),e([t()],I.prototype,"dataType",null),e([t()],I.prototype,"dateDataType",null),e([t()],I.prototype,"domain",null),e([t()],I.prototype,"editable",null),e([t({readOnly:!0})],I.prototype,"error",void 0),e([t({constructOnly:!0})],I.prototype,"preservesValueWhenHidden",void 0),e([t()],I.prototype,"evaluatedRequiredExpression",null),e([t()],I.prototype,"evaluatedValueExpression",null),e([t()],I.prototype,"field",void 0),e([t()],I.prototype,"group",void 0),e([t({readOnly:!0})],I.prototype,"hint",null),e([t()],I.prototype,"includeDate",null),e([t()],I.prototype,"includeTime",null),e([t()],I.prototype,"includeTimestamp",null),e([t()],I.prototype,"initialFeature",null),e([t({readOnly:!0})],I.prototype,"inputType",null),e([t()],I.prototype,"hasInvalidSwitchValue",null),e([t()],I.prototype,"isRelationshipKeyField",null),e([t()],I.prototype,"label",null),e([t()],I.prototype,"maxLength",null),e([t()],I.prototype,"minLength",null),e([t({readOnly:!0})],I.prototype,"name",null),e([t()],I.prototype,"range",null),e([t()],I.prototype,"required",null),e([t()],I.prototype,"requiredExpressionExecutor",void 0),e([t()],I.prototype,"showNoValueOptionEnabled",null),e([t()],I.prototype,"submittable",null),e([t({readOnly:!0})],I.prototype,"type",void 0),e([t()],I.prototype,"updating",null),e([t()],I.prototype,"valid",null),e([t({value:null})],I.prototype,"value",null),e([t()],I.prototype,"valueExpressionExecutor",void 0),e([t()],I.prototype,"valueOriginIsExpression",null),e([t()],I.prototype,"visible",null),I=e([i("esri.widgets.FeatureForm.FieldInput")],I);const N=e=>e&&!Number.isNaN(e.valueOf()),F=I;export{F 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 t from"../../core/Accessor.js";import{property as s}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 i=class extends t{constructor(e){super(e),this.element=null,this.feature=null,this.layer=null,this.type=null,this.visibilityExpressionExecutor=null}get description(){return this.element?.description}get evaluatedVisibilityExpression(){const{visibilityExpressionExecutor:e}=this;return null!=e&&null!=e.lastEvaluatedValue?!!e.lastEvaluatedValue:null}get label(){return this.element?.label}get visible(){return null!=this.evaluatedVisibilityExpression?this.evaluatedVisibilityExpression:null!=this.element}};e([s({readOnly:!0})],i.prototype,"description",null),e([s({constructOnly:!0})],i.prototype,"element",void 0),e([s()],i.prototype,"evaluatedVisibilityExpression",null),e([s()],i.prototype,"feature",void 0),e([s()],i.prototype,"label",null),e([s()],i.prototype,"layer",void 0),e([s()],i.prototype,"type",void 0),e([s()],i.prototype,"visible",null),e([s()],i.prototype,"visibilityExpressionExecutor",void 0),i=e([r("esri.widgets.FeatureForm.InputBase")],i);const o=i;export{o as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import{property as s}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 i=class extends t{constructor(e){super(e),this.element=null,this.feature=null,this.layer=null,this.type=null,this.visibilityExpressionExecutor=null}get description(){return this.element?.description}get evaluatedVisibilityExpression(){const{visibilityExpressionExecutor:e}=this;return null!=e?!!e.lastEvaluatedValue:null}get label(){return this.element?.label}get visible(){return null!=this.evaluatedVisibilityExpression?this.evaluatedVisibilityExpression:null!=this.element}};e([s({readOnly:!0})],i.prototype,"description",null),e([s({constructOnly:!0})],i.prototype,"element",void 0),e([s()],i.prototype,"evaluatedVisibilityExpression",null),e([s()],i.prototype,"feature",void 0),e([s()],i.prototype,"label",null),e([s()],i.prototype,"layer",void 0),e([s()],i.prototype,"type",void 0),e([s()],i.prototype,"visible",null),e([s()],i.prototype,"visibilityExpressionExecutor",void 0),i=e([r("esri.widgets.FeatureForm.InputBase")],i);const o=i;export{o as default};