@arcgis/core 4.30.0-next.20240520 → 4.30.0-next.20240521

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/applications/Components/drawUtils.d.ts +4 -0
  2. package/applications/Components/getContrastingBackgroundTheme.d.ts +4 -0
  3. package/applications/Components/gfxUtils.d.ts +4 -0
  4. package/applications/Components/gfxUtils.js +1 -1
  5. package/applications/Components/layerOriginUtils.d.ts +4 -0
  6. package/applications/Components/styleUtils.d.ts +4 -0
  7. package/applications/Components/svgUtils.d.ts +4 -0
  8. package/applications/Components/webStyleSymbolUtils.d.ts +4 -0
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/{9bf758be13aaa5ebba64.js → 1b4c91833fb7b99c6cfe.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{1476f4b9ed8a7d3330ce.js → 2f8a51d6b8229a90c240.js} +1 -1
  12. package/assets/esri/core/workers/chunks/3ad5de35a52b16be8dd5.js +1 -0
  13. package/assets/esri/core/workers/chunks/{c8628b5e9472e72a9cb3.js → 6d409cb694daa5002747.js} +1 -1
  14. package/assets/esri/core/workers/chunks/ba988cd3a49987a0fb83.js +1 -0
  15. package/assets/esri/themes/base/widgets/_FeatureTable.scss +1 -0
  16. package/assets/esri/themes/base/widgets/_Grid.scss +4 -0
  17. package/assets/esri/themes/base/widgets/_Widget.scss +1 -0
  18. package/assets/esri/themes/dark/main.css +1 -1
  19. package/assets/esri/themes/light/main.css +1 -1
  20. package/assets/esri/themes/light/view.css +1 -1
  21. package/core/Accessor.js +1 -1
  22. package/core/Collection.js +1 -1
  23. package/core/Handles.js +1 -1
  24. package/interfaces.d.ts +203 -29
  25. package/layers/CatalogLayer.js +1 -1
  26. package/layers/MapImageLayer.js +1 -1
  27. package/layers/catalog/CatalogDynamicGroupLayer.js +1 -1
  28. package/package.json +1 -1
  29. package/rest/support/RelationshipQuery.js +1 -1
  30. package/support/revision.js +1 -1
  31. package/views/2d/AnimationManager.js +1 -1
  32. package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
  33. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  34. package/views/2d/layers/features/RenderState.js +1 -1
  35. package/views/SelectionManager.js +1 -1
  36. package/views/ui/UI.js +1 -1
  37. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  38. package/widgets/FeatureTable/Grid/Column.js +1 -1
  39. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  40. package/widgets/FeatureTable.js +1 -1
  41. package/widgets/Print/PrintViewModel.js +1 -1
  42. package/widgets/Print.js +1 -1
  43. package/assets/esri/core/workers/chunks/92979bf325405d87c090.js +0 -1
  44. package/assets/esri/core/workers/chunks/ed24ad7c7fbb02c307aa.js +0 -1
package/core/Accessor.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
4
  */
5
- import{deprecatedFunction as e}from"./deprecate.js";import t from"./Handles.js";import r from"./Logger.js";import{destroyMaybe as s}from"./maybe.js";import{beforeDestroySymbol as o}from"./accessorSupport/beforeDestroy.js";import{get as i}from"./accessorSupport/get.js";import{Lifecycle as c}from"./accessorSupport/interfaces.js";import{getPropertiesMetadata as n}from"./accessorSupport/metadata.js";import a from"./accessorSupport/Properties.js";import{set as l}from"./accessorSupport/set.js";import{getAccessorInterceptor as p}from"./accessorSupport/testSupport.js";import{removeTarget as _,watch as h}from"./accessorSupport/watch.js";import{property as u}from"./accessorSupport/decorators/property.js";import{subclass as d}from"./accessorSupport/decorators/subclass.js";var y,f;function m(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 v=Symbol("Accessor-Handles"),g=Symbol("Accessor-Initialized");class S{static createSubclass(e={}){if(Array.isArray(e))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:t,declaredClass:r,constructor:s}=e;delete e.declaredClass,delete e.properties,delete e.constructor;const o=this;class i extends o{constructor(...e){super(...e),this.inherited=null,s&&s.apply(this,e)}}n(i.prototype);for(const c in e){const t=e[c];i.prototype[c]="function"==typeof t?function(...e){const r=this.inherited;let s;this.inherited=function(...e){if(o.prototype[c])return o.prototype[c].apply(this,e)};try{s=t.apply(this,e)}catch(i){throw this.inherited=r,i}return this.inherited=r,s}:e[c]}for(const c in t){const e=m(t[c]);u(e)(i.prototype,c)}return d(r)(i)}constructor(...e){if(this[y]=null,this[f]=!1,this.constructor===S)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const t=new a(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:t}),e.length>0&&(t.ctorArgs=this.normalizeCtorArgs?.apply(this,e)??e[0]),p()?.onInstanceConstruct(this)}postscript(){const e=this.__accessor__,t=e.ctorArgs;e.initialize(),t&&(this.set(t),e.ctorArgs=null),e.constructed(),this.initialize(),this[g]=!0}initialize(){}[o](){this[v]=s(this[v])}destroy(){this.destroyed||(_(this),this.__accessor__.destroy(),p()?.onInstanceDestroy(this))}[Symbol.dispose](){this.destroy()}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[g]}get destroyed(){return this.__accessor__?.lifecycle===c.DESTROYED||!1}commitProperty(e){i(this,e)}get(t){return e(r.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"}),i(this,t)}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 l(this,e,t),this}watch(e,t,r){return h(this,e,t,r)}addHandles(e,r){if(this.destroyed){const t=Array.isArray(e)?e:[e];for(const e of t)e.remove();return}let s=this[v];null==s&&(s=this[v]=new t),s.add(e,r)}removeHandles(e){const t=this[v];null!=t&&t.remove(e)}removeAllHandles(){const e=this[v];null!=e&&e.removeAll()}hasHandles(e){const t=this[v];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}}y=v,f=g;export{S as default};
5
+ import{deprecatedFunction as e}from"./deprecate.js";import r from"./Handles.js";import t from"./Logger.js";import{destroyMaybe as s}from"./maybe.js";import{beforeDestroySymbol as o}from"./accessorSupport/beforeDestroy.js";import{get as i}from"./accessorSupport/get.js";import{Lifecycle as c}from"./accessorSupport/interfaces.js";import{getPropertiesMetadata as n}from"./accessorSupport/metadata.js";import a from"./accessorSupport/Properties.js";import{set as p}from"./accessorSupport/set.js";import{getAccessorInterceptor as _}from"./accessorSupport/testSupport.js";import{removeTarget as h,watch as l}from"./accessorSupport/watch.js";import{property as u}from"./accessorSupport/decorators/property.js";import{subclass as d}from"./accessorSupport/decorators/subclass.js";var f,m;function y(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 v=Symbol("Accessor-Handles"),g=Symbol("Accessor-Initialized");class S{static createSubclass(e={}){if(Array.isArray(e))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:r,declaredClass:t,constructor:s}=e;delete e.declaredClass,delete e.properties,delete e.constructor;const o=this;class i extends o{constructor(...e){super(...e),this.inherited=null,s&&s.apply(this,e)}}n(i.prototype);for(const c in e){const r=e[c];i.prototype[c]="function"==typeof r?function(...e){const t=this.inherited;let s;this.inherited=function(...e){if(o.prototype[c])return o.prototype[c].apply(this,e)};try{s=r.apply(this,e)}catch(i){throw this.inherited=t,i}return this.inherited=t,s}:e[c]}for(const c in r){const e=y(r[c]);u(e)(i.prototype,c)}return d(t)(i)}constructor(...e){if(this[f]=null,this[m]=!1,this.constructor===S)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const r=new a(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:r}),e.length>0&&(r.ctorArgs=this.normalizeCtorArgs?.apply(this,e)??e[0]),_()?.onInstanceConstruct(this)}postscript(){const e=this.__accessor__,r=e.ctorArgs;e.initialize(),r&&(this.set(r),e.ctorArgs=null),e.constructed(),this.initialize(),this[g]=!0}initialize(){}[o](){this[v]=s(this[v])}destroy(){this.destroyed||(h(this),this.__accessor__.destroy(),_()?.onInstanceDestroy(this))}[Symbol.dispose](){this.destroy()}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[g]}get destroyed(){return this.__accessor__?.lifecycle===c.DESTROYED||!1}commitProperty(e){i(this,e)}get(r){return e(t.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"}),i(this,r)}hasOwnProperty(e){return this.__accessor__?this.__accessor__.has(e):Object.prototype.hasOwnProperty.call(this,e)}keys(){return this.__accessor__?this.__accessor__.keys():[]}set(e,r){return p(this,e,r),this}watch(e,r,t){return l(this,e,r,t)}addHandles(e,t){if(this.destroyed){const r=Array.isArray(e)?e:[e];for(const e of r)e.remove();return}(this[v]??=new r).add(e,t)}removeHandles(e){this[v]?.remove(e)}removeAllHandles(){this[v]?.removeAll()}removeHandlesReference(e){this[v]?.removeReference(e)}hasHandles(e){return!0===this[v]?.has(e)}_override(e,r){void 0===r?this.__accessor__.clearOverride(e):this.__accessor__.override(e,r)}_clearOverride(e){return this.__accessor__.clearOverride(e)}_overrideIfSome(e,r){null==r?this.__accessor__.clearOverride(e):this.__accessor__.override(e,r)}_isOverridden(e){return this.__accessor__.isOverridden(e)}notifyChange(e){this.__accessor__.notifyChange(e)}_get(e){return this.__accessor__.internalGet(e)}_set(e,r){return this.__accessor__.internalSet(e,r),this}}f=v,m=g;export{S 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.30/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"./ArrayPool.js";import s from"./Evented.js";import{makeHandle as i}from"./handleUtils.js";import{clone as r}from"./lang.js";import n from"./ObjectPool.js";import{ObservableChangesType as h}from"./ObservableChangesType.js";import{schedule as o}from"./scheduling.js";import{ensureType as l,ensureOneOfType as a}from"./accessorSupport/ensureType.js";import{trackAccess as c}from"./accessorSupport/tracking.js";import{property as f}from"./accessorSupport/decorators/property.js";import{shared as _}from"./accessorSupport/decorators/shared.js";import{subclass as m}from"./accessorSupport/decorators/subclass.js";import{SimpleObservable as u}from"./accessorSupport/tracking/SimpleObservable.js";var g;class d{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class p{constructor(e,t,s,i,r){this.target=e,this.added=t,this.removed=s,this.start=i,this.deleteCount=r}}const b=new n(d,void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1}));function v(e){return e?e instanceof R?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function E(e){if(e?.length)return e[0]}function y(e,t,s,i){const r=Math.min(e.length-s,t.length-i);let n=0;for(;n<r&&e[s+n]===t[i+n];)n++;return n}function C(e,t,s,i){t&&t.forEach(((t,r,n)=>{e.push(t),C(e,s.call(i,t,r,n),s,i)}))}const A=new Set,O=new Set,M=new Set,D=new Map;let x=0,R=g=class extends s.EventedAccessor{static isCollection(e){return null!=e&&e instanceof g}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new u,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:x++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof g?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove()}*[Symbol.iterator](){yield*this.items}get items(){return c(this._observable),this._items}set items(e){this._emitBeforeChanges(h.ADD)||(this._splice(0,this.length,v(e)),this._emitAfterChanges(h.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,s={removed:!1,callback:t};return e.push(s),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),i((()=>{s.removed=!0,e.splice(e.indexOf(s),1)}))}return this._emitter.on(e,t)}once(e,t){const s="deref"in t?()=>t.deref():()=>t,i=this.on(e,(e=>{s()?.call(null,e),i.remove()}));return i}add(e,t){if(c(this._observable),this._emitBeforeChanges(h.ADD))return this;const s=this.getNextIndex(t??null);return this._splice(s,0,[e]),this._emitAfterChanges(h.ADD),this}addMany(e,t=this._items.length){if(c(this._observable),!e?.length)return this;if(this._emitBeforeChanges(h.ADD))return this;const s=this.getNextIndex(t);return this._splice(s,0,v(e)),this._emitAfterChanges(h.ADD),this}at(e){if(c(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(h.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return c(this._observable),this._createNewInstance({items:this._items.map(r)})}concat(...e){c(this._observable);const t=e.map(v);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const s=this._splice(0,this.length),i=s.length;for(let r=0;r<i;r++)e.call(t,s[r],r,s);this._emitAfterChanges(h.REMOVE)}every(e,t){return c(this._observable),this._items.every(e,t)}filter(e,t){let s;return c(this._observable),s=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:s})}find(e,t){return c(this._observable),this._items.find(e,t)}findIndex(e,t){return c(this._observable),this._items.findIndex(e,t)}flatten(e,t){c(this._observable);const s=[];return C(s,this,e,t),new g(s)}forEach(e,t){return c(this._observable),this._items.forEach(e,t)}getItemAt(e){return c(this._observable),this._items[e]}getNextIndex(e){c(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return c(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return c(this._observable),this._items.indexOf(e,t)}join(e=","){return c(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return c(this._observable),this._items.lastIndexOf(e,t)}map(e,t){c(this._observable);const s=this._items.map(e,t);return new g({items:s})}reorder(e,t=this.length-1){c(this._observable);const s=this.indexOf(e);if(-1!==s){if(t<0?t=0:t>=this.length&&(t=this.length-1),s!==t){if(this._emitBeforeChanges(h.MOVE))return e;this._splice(s,1),this._splice(t,0,[e]),this._emitAfterChanges(h.MOVE)}return e}}pop(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const e=E(this._splice(this.length-1,1));return this._emitAfterChanges(h.REMOVE),e}push(...e){return c(this._observable),this._emitBeforeChanges(h.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(h.ADD)),this.length}reduce(e,t){c(this._observable);const s=this._items;return 2===arguments.length?s.reduce(e,t):s.reduce(e)}reduceRight(e,t){c(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(e,t):s.reduceRight(e)}remove(e){return c(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if(c(this._observable),e<0||e>=this.length||this._emitBeforeChanges(h.REMOVE))return;const t=E(this._splice(e,1));return this._emitAfterChanges(h.REMOVE),t}removeMany(e){if(c(this._observable),!e?.length||this._emitBeforeChanges(h.REMOVE))return[];const t=e instanceof g?e.toArray():e,s=this._items,i=[],r=t.length;for(let n=0;n<r;n++){const e=t[n],r=s.indexOf(e);if(r>-1){const e=1+y(t,s,n+1,r+1),h=this._splice(r,e);h&&h.length>0&&i.push.apply(i,h),n+=e-1}}return this._emitAfterChanges(h.REMOVE),i}reverse(){if(c(this._observable),this._emitBeforeChanges(h.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(h.MOVE),this}shift(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const e=E(this._splice(0,1));return this._emitAfterChanges(h.REMOVE),e}slice(e=0,t=this.length){return c(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return c(this._observable),this._items.some(e,t)}sort(e){if(c(this._observable),!this.length||this._emitBeforeChanges(h.MOVE))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(h.MOVE),this}splice(e,t,...s){c(this._observable);const i=(t?h.REMOVE:0)|(s.length?h.ADD:0);if(this._emitBeforeChanges(i))return[];const r=this._splice(e,t,s)||[];return this._emitAfterChanges(i),r}toArray(){return c(this._observable),this._items.slice()}toJSON(){return c(this._observable),this.toArray()}toLocaleString(){return c(this._observable),this._items.toLocaleString()}toString(){return c(this._observable),this._items.toString()}unshift(...e){return c(this._observable),!e.length||this._emitBeforeChanges(h.ADD)||(this._splice(0,0,e),this._emitAfterChanges(h.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,s){const i=this._items,r=this.itemType;let n,h;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=o((()=>this._dispatchChange()))),e<0&&(e+=this.length),t){if(h=i.splice(e,t),this.hasEventListener("before-remove")){const t=b.acquire();t.target=this,t.cancellable=!0;for(let s=0,r=h.length;s<r;s++)n=h[s],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(h.splice(s,1),i.splice(e,0,n),e+=1,s-=1,r-=1);b.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=b.acquire();e.target=this,e.cancellable=!1;const t=h.length;for(let s=0;s<t;s++)e.reset(h[s]),this.emit("after-remove",e);b.release(e)}}if(s?.length){if(r){const e=[];for(const t of s){const s=r.ensureType(t);null==s&&null!=t||e.push(s)}s=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),h=e===this.length;if(t||n){const r=b.acquire();r.target=this,r.cancellable=!0;const o=b.acquire();o.target=this,o.cancellable=!1;for(const l of s)t?(r.reset(l),this.emit("before-add",r),r.defaultPrevented||(h?i.push(l):i.splice(e++,0,l),this._set("length",i.length),n&&(o.reset(l),this.emit("after-add",o)))):(h?i.push(l):i.splice(e++,0,l),this._set("length",i.length),o.reset(l),this.emit("after-add",o));b.release(o),b.release(r)}else{if(h)for(const e of s)i.push(e);else i.splice(e,0,...s);this._set("length",i.length)}}if((s?.length||h?.length)&&this._notifyChangeEvent(s,h),this.hasEventListener("after-splice")){const i=new p(this,s,h,e,t);this.emit("after-splice",i)}return h}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const s=b.acquire();s.target=this,s.cancellable=!0,s.type=e,this.emit("before-changes",s),t=s.defaultPrevented,b.release(s)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=b.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),b.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const s of e){const e=s.changes;A.clear(),O.clear(),M.clear();for(const{added:t,removed:s}of e){if(t)if(0===M.size&&0===O.size)for(const e of t)A.add(e);else for(const e of t)O.has(e)?(M.add(e),O.delete(e)):M.has(e)||A.add(e);if(s)if(0===M.size&&0===A.size)for(const e of s)O.add(e);else for(const e of s)A.has(e)?A.delete(e):(M.delete(e),O.add(e))}const i=t.acquire();A.forEach((e=>{i.push(e)}));const r=t.acquire();O.forEach((e=>{r.push(e)}));const n=this._items,h=s.items,o=t.acquire();if(M.forEach((e=>{h.indexOf(e)!==n.indexOf(e)&&o.push(e)})),s.listeners&&(i.length||r.length||o.length)){const e={target:this,added:i,removed:r,moved:o},t=s.listeners.length;for(let i=0;i<t;i++){const t=s.listeners[i];t.removed||t.callback.call(this,e)}}t.release(i),t.release(r),t.release(o)}A.clear(),O.clear(),M.clear()}};R.ofType=t=>{if(!t)return g;if(D.has(t))return D.get(t);let s=null;if("function"==typeof t)s=t.prototype.declaredClass;else if(t.base)s=t.base.prototype.declaredClass;else for(const e in t.typeMap){const i=t.typeMap[e].prototype.declaredClass;s?s+=` | ${i}`:s=i}let i=class extends g{};return e([_({Type:t,ensureType:"function"==typeof t?l(t):a(t)})],i.prototype,"itemType",void 0),i=e([m(`esri.core.Collection<${s}>`)],i),D.set(t,i),i},e([f()],R.prototype,"_updating",void 0),e([f()],R.prototype,"length",void 0),e([f()],R.prototype,"items",null),e([f({readOnly:!0})],R.prototype,"updating",null),R=g=e([m("esri.core.Collection")],R);const V=R;export{V as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"./ArrayPool.js";import s from"./Evented.js";import{makeHandle as i}from"./handleUtils.js";import{clone as r}from"./lang.js";import n from"./ObjectPool.js";import{ObservableChangesType as h}from"./ObservableChangesType.js";import{schedule as o}from"./scheduling.js";import{ensureType as l,ensureOneOfType as a}from"./accessorSupport/ensureType.js";import{trackAccess as c}from"./accessorSupport/tracking.js";import{property as f}from"./accessorSupport/decorators/property.js";import{shared as _}from"./accessorSupport/decorators/shared.js";import{subclass as m}from"./accessorSupport/decorators/subclass.js";import{SimpleObservable as u}from"./accessorSupport/tracking/SimpleObservable.js";var g;class d{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class p{constructor(e,t,s,i,r){this.target=e,this.added=t,this.removed=s,this.start=i,this.deleteCount=r}}const b=new n(d,void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1}));function v(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function y(e){return e?e instanceof R?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function E(e){if(e?.length)return e[0]}function A(e,t,s,i){const r=Math.min(e.length-s,t.length-i);let n=0;for(;n<r&&e[s+n]===t[i+n];)n++;return n}function C(e,t,s,i){t&&t.forEach(((t,r,n)=>{e.push(t),C(e,s.call(i,t,r,n),s,i)}))}const O=new Set,M=new Set,D=new Set,x=new Map;let j=0,R=g=class extends s.EventedAccessor{static isCollection(e){return null!=e&&e instanceof g}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new u,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:j++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof g?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove()}*[Symbol.iterator](){yield*this.items}get items(){return c(this._observable),this._items}set items(e){this._emitBeforeChanges(h.ADD)||(this._splice(0,this.length,y(e)),this._emitAfterChanges(h.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,s={removed:!1,callback:t};return e.push(s),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),i((()=>{s.removed=!0,e.splice(e.indexOf(s),1)}))}return this._emitter.on(e,t)}once(e,t){const s="deref"in t?()=>t.deref():()=>t,i=this.on(e,(e=>{s()?.call(null,e),i.remove()}));return i}add(e,t){if(c(this._observable),this._emitBeforeChanges(h.ADD))return this;const s=this.getNextIndex(t??null);return this._splice(s,0,[e]),this._emitAfterChanges(h.ADD),this}addMany(e,t=this._items.length){if(c(this._observable),!e?.length)return this;if(this._emitBeforeChanges(h.ADD))return this;const s=this.getNextIndex(t);return this._splice(s,0,y(e)),this._emitAfterChanges(h.ADD),this}at(e){if(c(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(h.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return c(this._observable),this._createNewInstance({items:this._items.map(r)})}concat(...e){c(this._observable);const t=e.map(y);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const s=this._splice(0,this.length),i=s.length;for(let r=0;r<i;r++)e.call(t,s[r],r,s);this._emitAfterChanges(h.REMOVE)}destroyAll(){this.drain(v)}destroyMany(e){const t=this.removeMany(e);return t.forEach(v),t}every(e,t){return c(this._observable),this._items.every(e,t)}filter(e,t){let s;return c(this._observable),s=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:s})}find(e,t){return c(this._observable),this._items.find(e,t)}findIndex(e,t){return c(this._observable),this._items.findIndex(e,t)}flatten(e,t){c(this._observable);const s=[];return C(s,this,e,t),new g(s)}forEach(e,t){return c(this._observable),this._items.forEach(e,t)}getItemAt(e){return c(this._observable),this._items[e]}getNextIndex(e){c(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return c(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return c(this._observable),this._items.indexOf(e,t)}join(e=","){return c(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return c(this._observable),this._items.lastIndexOf(e,t)}map(e,t){c(this._observable);const s=this._items.map(e,t);return new g({items:s})}reorder(e,t=this.length-1){c(this._observable);const s=this.indexOf(e);if(-1!==s){if(t<0?t=0:t>=this.length&&(t=this.length-1),s!==t){if(this._emitBeforeChanges(h.MOVE))return e;this._splice(s,1),this._splice(t,0,[e]),this._emitAfterChanges(h.MOVE)}return e}}pop(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const e=E(this._splice(this.length-1,1));return this._emitAfterChanges(h.REMOVE),e}push(...e){return c(this._observable),this._emitBeforeChanges(h.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(h.ADD)),this.length}reduce(e,t){c(this._observable);const s=this._items;return 2===arguments.length?s.reduce(e,t):s.reduce(e)}reduceRight(e,t){c(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(e,t):s.reduceRight(e)}remove(e){return c(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if(c(this._observable),e<0||e>=this.length||this._emitBeforeChanges(h.REMOVE))return;const t=E(this._splice(e,1));return this._emitAfterChanges(h.REMOVE),t}removeMany(e){if(c(this._observable),!e?.length||this._emitBeforeChanges(h.REMOVE))return[];const t=e instanceof g?e.toArray():e,s=this._items,i=[],r=t.length;for(let n=0;n<r;n++){const e=t[n],r=s.indexOf(e);if(r>-1){const e=1+A(t,s,n+1,r+1),h=this._splice(r,e);h&&h.length>0&&i.push.apply(i,h),n+=e-1}}return this._emitAfterChanges(h.REMOVE),i}reverse(){if(c(this._observable),this._emitBeforeChanges(h.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(h.MOVE),this}shift(){if(c(this._observable),!this.length||this._emitBeforeChanges(h.REMOVE))return;const e=E(this._splice(0,1));return this._emitAfterChanges(h.REMOVE),e}slice(e=0,t=this.length){return c(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return c(this._observable),this._items.some(e,t)}sort(e){if(c(this._observable),!this.length||this._emitBeforeChanges(h.MOVE))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(h.MOVE),this}splice(e,t,...s){c(this._observable);const i=(t?h.REMOVE:0)|(s.length?h.ADD:0);if(this._emitBeforeChanges(i))return[];const r=this._splice(e,t,s)||[];return this._emitAfterChanges(i),r}toArray(){return c(this._observable),this._items.slice()}toJSON(){return c(this._observable),this.toArray()}toLocaleString(){return c(this._observable),this._items.toLocaleString()}toString(){return c(this._observable),this._items.toString()}unshift(...e){return c(this._observable),!e.length||this._emitBeforeChanges(h.ADD)||(this._splice(0,0,e),this._emitAfterChanges(h.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,s){const i=this._items,r=this.itemType;let n,h;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=o((()=>this._dispatchChange()))),e<0&&(e+=this.length),t){if(h=i.splice(e,t),this.hasEventListener("before-remove")){const t=b.acquire();t.target=this,t.cancellable=!0;for(let s=0,r=h.length;s<r;s++)n=h[s],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(h.splice(s,1),i.splice(e,0,n),e+=1,s-=1,r-=1);b.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=b.acquire();e.target=this,e.cancellable=!1;const t=h.length;for(let s=0;s<t;s++)e.reset(h[s]),this.emit("after-remove",e);b.release(e)}}if(s?.length){if(r){const e=[];for(const t of s){const s=r.ensureType(t);null==s&&null!=t||e.push(s)}s=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),h=e===this.length;if(t||n){const r=b.acquire();r.target=this,r.cancellable=!0;const o=b.acquire();o.target=this,o.cancellable=!1;for(const l of s)t?(r.reset(l),this.emit("before-add",r),r.defaultPrevented||(h?i.push(l):i.splice(e++,0,l),this._set("length",i.length),n&&(o.reset(l),this.emit("after-add",o)))):(h?i.push(l):i.splice(e++,0,l),this._set("length",i.length),o.reset(l),this.emit("after-add",o));b.release(o),b.release(r)}else{if(h)for(const e of s)i.push(e);else i.splice(e,0,...s);this._set("length",i.length)}}if((s?.length||h?.length)&&this._notifyChangeEvent(s,h),this.hasEventListener("after-splice")){const i=new p(this,s,h,e,t);this.emit("after-splice",i)}return h}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const s=b.acquire();s.target=this,s.cancellable=!0,s.type=e,this.emit("before-changes",s),t=s.defaultPrevented,b.release(s)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=b.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),b.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const s of e){const e=s.changes;O.clear(),M.clear(),D.clear();for(const{added:t,removed:s}of e){if(t)if(0===D.size&&0===M.size)for(const e of t)O.add(e);else for(const e of t)M.has(e)?(D.add(e),M.delete(e)):D.has(e)||O.add(e);if(s)if(0===D.size&&0===O.size)for(const e of s)M.add(e);else for(const e of s)O.has(e)?O.delete(e):(D.delete(e),M.add(e))}const i=t.acquire();O.forEach((e=>{i.push(e)}));const r=t.acquire();M.forEach((e=>{r.push(e)}));const n=this._items,h=s.items,o=t.acquire();if(D.forEach((e=>{h.indexOf(e)!==n.indexOf(e)&&o.push(e)})),s.listeners&&(i.length||r.length||o.length)){const e={target:this,added:i,removed:r,moved:o},t=s.listeners.length;for(let i=0;i<t;i++){const t=s.listeners[i];t.removed||t.callback.call(this,e)}}t.release(i),t.release(r),t.release(o)}O.clear(),M.clear(),D.clear()}};R.ofType=t=>{if(!t)return g;if(x.has(t))return x.get(t);let s=null;if("function"==typeof t)s=t.prototype.declaredClass;else if(t.base)s=t.base.prototype.declaredClass;else for(const e in t.typeMap){const i=t.typeMap[e].prototype.declaredClass;s?s+=` | ${i}`:s=i}let i=class extends g{};return e([_({Type:t,ensureType:"function"==typeof t?l(t):a(t)})],i.prototype,"itemType",void 0),i=e([m(`esri.core.Collection<${s}>`)],i),x.set(t,i),i},e([f()],R.prototype,"_updating",void 0),e([f()],R.prototype,"length",void 0),e([f()],R.prototype,"items",null),e([f({readOnly:!0})],R.prototype,"updating",null),R=g=e([m("esri.core.Collection")],R);const V=R;export{V as default};
package/core/Handles.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
4
  */
5
- import{isIterable as t}from"./iteratorUtils.js";class r{constructor(){this._groups=new Map}destroy(){this.removeAll()}get size(){let t=0;return this._groups.forEach((r=>{t+=r.length})),t}add(r,e){if(t(r)){const t=this._getOrCreateGroup(e);for(const e of r)o(e)&&t.push(e)}else if(o(r)){this._getOrCreateGroup(e).push(r)}return this}forEach(t,r){if("function"==typeof t)this._groups.forEach((r=>r.forEach(t)));else{const e=this._getGroup(t);e&&r&&e.forEach(r)}}has(t){return this._groups.has(e(t))}remove(r){if("string"!=typeof r&&t(r)){for(const t of r)this.remove(t);return this}return this.has(r)?(s(this._getGroup(r)),this._groups.delete(e(r)),this):this}removeAll(){return this._groups.forEach(s),this._groups.clear(),this}_getOrCreateGroup(t){if(this.has(t))return this._getGroup(t);const r=[];return this._groups.set(e(t),r),r}_getGroup(t){return this._groups.get(e(t))}}function e(t){return t||"_default_"}function s(t){for(const e of t)e instanceof r?e.removeAll():e.remove()}function o(t){return null!=t&&(!!t.remove||t instanceof r)}export{r as default};
5
+ import{isIterable as t}from"./iteratorUtils.js";class r{constructor(){this._groups=new Map}destroy(){this.removeAll()}get size(){let t=0;return this._groups.forEach((r=>{t+=r.length})),t}add(r,e){if(t(r)){const t=this._getOrCreateGroup(e);for(const e of r)o(e)&&t.push(e)}else if(o(r)){this._getOrCreateGroup(e).push(r)}return this}forEach(t,r){if("function"==typeof t)this._groups.forEach((r=>r.forEach(t)));else{const e=this._getGroup(t);e&&r&&e.forEach(r)}}has(t){return this._groups.has(e(t))}remove(r){if("string"!=typeof r&&t(r)){for(const t of r)this.remove(t);return this}return this.has(r)?(s(this._getGroup(r)),this._groups.delete(e(r)),this):this}removeAll(){return this._groups.forEach(s),this._groups.clear(),this}removeReference(t){return this._groups.delete(t),this}_getOrCreateGroup(t){if(this.has(t))return this._getGroup(t);const r=[];return this._groups.set(e(t),r),r}_getGroup(t){return this._groups.get(e(t))}}function e(t){return t||"_default_"}function s(t){for(const e of t)e instanceof r?e.removeAll():e.remove()}function o(t){return null!=t&&(!!t.remove||t instanceof r)}export{r as default};
package/interfaces.d.ts CHANGED
@@ -1076,6 +1076,143 @@ declare namespace __esri {
1076
1076
  viewsheds?: CollectionProperties<ViewshedProperties>;
1077
1077
  }
1078
1078
 
1079
+ /**
1080
+ * Note: reserved for internal use only, this is not part of the stable public API.
1081
+ *
1082
+ * Draw utils for Components.
1083
+ */
1084
+ interface drawUtils {
1085
+ /**
1086
+ * Note: reserved for internal use only, this is not part of the stable public API.
1087
+ *
1088
+ * performs translation of given geometry dx, dy: how much to translate the geometry in x and y direction.
1089
+ */
1090
+ move(geometry: any): any;
1091
+ }
1092
+
1093
+ export const drawUtils: drawUtils;
1094
+
1095
+ /**
1096
+ * Note: reserved for internal use only, this is not part of the stable public API.
1097
+ *
1098
+ * Background theme utils for Components.
1099
+ */
1100
+ interface getContrastingBackgroundTheme {
1101
+ /**
1102
+ * Note: reserved for internal use only, this is not part of the stable public API.
1103
+ *
1104
+ * Determines the contrasting background theme ("light", "dark", or null) for a given symbol based on color luminance and a threshold.
1105
+ */
1106
+ getContrastingBackgroundTheme(symbol: any, threshold?: number): string;
1107
+ }
1108
+
1109
+ export const getContrastingBackgroundTheme: getContrastingBackgroundTheme;
1110
+
1111
+ /**
1112
+ * Note: reserved for internal use only, this is not part of the stable public API.
1113
+ *
1114
+ * Background theme utils for Components.
1115
+ */
1116
+ interface gfxUtils {
1117
+ defaultThematicColor: Color;
1118
+ }
1119
+
1120
+ export const gfxUtils: gfxUtils;
1121
+
1122
+ /**
1123
+ * Note: reserved for internal use only, this is not part of the stable public API.
1124
+ *
1125
+ * Layer origin utils for Components.
1126
+ */
1127
+ interface layerOriginUtils {
1128
+ /**
1129
+ * Note: reserved for internal use only, this is not part of the stable public API.
1130
+ *
1131
+ * Clears property overrides in the given layer.
1132
+ */
1133
+ clearOverrides(layer: any, origin: any): void;
1134
+ /**
1135
+ * Note: reserved for internal use only, this is not part of the stable public API.
1136
+ *
1137
+ * Disconnects the given layer from its source.
1138
+ */
1139
+ disconnectFromSource(layer: any, origin: any): void;
1140
+ /**
1141
+ * Note: reserved for internal use only, this is not part of the stable public API.
1142
+ *
1143
+ * Returns origin information for properties of the given layer and overall status of the layer.
1144
+ */
1145
+ getLayerOriginInfo(layer: any, origin: any): any;
1146
+ /**
1147
+ * Note: reserved for internal use only, this is not part of the stable public API.
1148
+ *
1149
+ * Indicates whether origin info can be returned for the given layer and its properties.
1150
+ */
1151
+ isSupportedLayer(layer: any): boolean;
1152
+ }
1153
+
1154
+ export const layerOriginUtils: layerOriginUtils;
1155
+
1156
+ /**
1157
+ * Note: reserved for internal use only, this is not part of the stable public API.
1158
+ *
1159
+ * Style utils for Components.
1160
+ */
1161
+ interface styleUtils {
1162
+ /**
1163
+ * Note: reserved for internal use only, this is not part of the stable public API.
1164
+ *
1165
+ * Return the symbol URL for a given style item in the preferred format.
1166
+ */
1167
+ isSupportedLayer(item: any, type: any, typePriorities: string[]): string;
1168
+ }
1169
+
1170
+ export const styleUtils: styleUtils;
1171
+
1172
+ /**
1173
+ * Note: reserved for internal use only, this is not part of the stable public API.
1174
+ *
1175
+ * SVG utils for Components.
1176
+ */
1177
+ interface svgUtils {
1178
+ /**
1179
+ * Note: reserved for internal use only, this is not part of the stable public API.
1180
+ *
1181
+ * Computes and returns the bounding box that encompasses all given bounding boxes.
1182
+ */
1183
+ computeBBox(bboxes: any[]): any;
1184
+ /**
1185
+ * Note: reserved for internal use only, this is not part of the stable public API.
1186
+ *
1187
+ * Calculates and returns the bounding box for a given shape.
1188
+ */
1189
+ getBoundingBox(shape: any): any;
1190
+ /**
1191
+ * Note: reserved for internal use only, this is not part of the stable public API.
1192
+ *
1193
+ * Computes and returns a transformation matrix string for a given bounding box, considering scaling, rotation, and other transformations.
1194
+ */
1195
+ getTransformMatrix(bbox: any, width: number, height: number, overallStrokeWidth: number, scale: boolean, rotation: number, useRotationSize: boolean, offset?: number[], bloomSize?: number[]): string;
1196
+ }
1197
+
1198
+ export const svgUtils: svgUtils;
1199
+
1200
+ /**
1201
+ * Note: reserved for internal use only, this is not part of the stable public API.
1202
+ *
1203
+ * Web Style Symbol utils for Components.
1204
+ */
1205
+ interface webStyleSymbolUtils {
1206
+ /**
1207
+ * Note: reserved for internal use only, this is not part of the stable public API.
1208
+ *
1209
+ * Fetch the symbol from a style by name:
1210
+ */
1211
+ fetchSymbolFromStyle(styleResponse: any, symbolName: string, context: any, type: any, styleItemRead: Function, options?: any): Promise<any>;
1212
+ }
1213
+
1214
+ export const webStyleSymbolUtils: webStyleSymbolUtils;
1215
+
1079
1216
  /**
1080
1217
  * Note: reserved for internal use only, this is not part of the stable public API.
1081
1218
  *
@@ -1218,6 +1355,12 @@ declare namespace __esri {
1218
1355
  * Development environment utilities used in the SceneViewer.
1219
1356
  */
1220
1357
  interface devEnvironmentUtils {
1358
+ /**
1359
+ * Note: reserved for internal use only, this is not part of the stable public API.
1360
+ *
1361
+ * Adjusts the "static.arcgis.com" part of an URL to point to the corresponding development hostname.
1362
+ */
1363
+ adjustStaticAGOUrl(url?: string, hostname?: string): string;
1221
1364
  /**
1222
1365
  * Note: reserved for internal use only, this is not part of the stable public API.
1223
1366
  *
@@ -62923,7 +63066,7 @@ declare namespace __esri {
62923
63066
  *
62924
63067
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RelationshipQuery.html#objectIds)
62925
63068
  */
62926
- objectIds: number[];
63069
+ objectIds: number[] | string[];
62927
63070
  /**
62928
63071
  * One or more field names used to order the query results.
62929
63072
  *
@@ -63039,7 +63182,7 @@ declare namespace __esri {
63039
63182
  *
63040
63183
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RelationshipQuery.html#objectIds)
63041
63184
  */
63042
- objectIds?: number[];
63185
+ objectIds?: number[] | string[];
63043
63186
  /**
63044
63187
  * One or more field names used to order the query results.
63045
63188
  *
@@ -67711,7 +67854,8 @@ declare namespace __esri {
67711
67854
  | WFSLayer
67712
67855
  | OGCFeatureLayer
67713
67856
  | StreamLayer
67714
- | OrientedImageryLayer;
67857
+ | OrientedImageryLayer
67858
+ | CatalogFootprintLayer;
67715
67859
  /**
67716
67860
  * The view where the input layer is rendered.
67717
67861
  *
@@ -67846,7 +67990,8 @@ declare namespace __esri {
67846
67990
  | WFSLayer
67847
67991
  | OGCFeatureLayer
67848
67992
  | StreamLayer
67849
- | OrientedImageryLayer;
67993
+ | OrientedImageryLayer
67994
+ | CatalogFootprintLayer;
67850
67995
  /**
67851
67996
  * The view where the input layer is rendered.
67852
67997
  *
@@ -68015,7 +68160,8 @@ declare namespace __esri {
68015
68160
  | WFSLayer
68016
68161
  | OGCFeatureLayer
68017
68162
  | StreamLayer
68018
- | OrientedImageryLayer;
68163
+ | OrientedImageryLayer
68164
+ | CatalogFootprintLayer;
68019
68165
  /**
68020
68166
  * The view where the input layer is rendered.
68021
68167
  *
@@ -68262,7 +68408,8 @@ declare namespace __esri {
68262
68408
  | WFSLayer
68263
68409
  | OGCFeatureLayer
68264
68410
  | StreamLayer
68265
- | OrientedImageryLayer;
68411
+ | OrientedImageryLayer
68412
+ | CatalogFootprintLayer;
68266
68413
  /**
68267
68414
  * The view where the input layer is rendered.
68268
68415
  *
@@ -68558,7 +68705,7 @@ declare namespace __esri {
68558
68705
  *
68559
68706
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-dotDensity.html#createRenderer)
68560
68707
  */
68561
- layer: FeatureLayer | GeoJSONLayer | WFSLayer | OGCFeatureLayer;
68708
+ layer: FeatureLayer | GeoJSONLayer | WFSLayer | OGCFeatureLayer | CatalogFootprintLayer;
68562
68709
  /**
68563
68710
  * The MapView instance in which the visualization will be rendered.
68564
68711
  *
@@ -68876,7 +69023,8 @@ declare namespace __esri {
68876
69023
  | WFSLayer
68877
69024
  | OGCFeatureLayer
68878
69025
  | StreamLayer
68879
- | OrientedImageryLayer;
69026
+ | OrientedImageryLayer
69027
+ | CatalogFootprintLayer;
68880
69028
  /**
68881
69029
  * The view where the input layer is rendered.
68882
69030
  *
@@ -68992,7 +69140,8 @@ declare namespace __esri {
68992
69140
  | WFSLayer
68993
69141
  | OGCFeatureLayer
68994
69142
  | StreamLayer
68995
- | OrientedImageryLayer;
69143
+ | OrientedImageryLayer
69144
+ | CatalogFootprintLayer;
68996
69145
  /**
68997
69146
  * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization.
68998
69147
  *
@@ -69208,7 +69357,14 @@ declare namespace __esri {
69208
69357
  *
69209
69358
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-pieChart.html#createRenderer)
69210
69359
  */
69211
- layer: FeatureLayer | CSVLayer | GeoJSONLayer | WFSLayer | OGCFeatureLayer | StreamLayer | OrientedImageryLayer;
69360
+ layer: | FeatureLayer
69361
+ | CSVLayer
69362
+ | GeoJSONLayer
69363
+ | WFSLayer
69364
+ | OGCFeatureLayer
69365
+ | StreamLayer
69366
+ | OrientedImageryLayer
69367
+ | CatalogFootprintLayer;
69212
69368
  /**
69213
69369
  * The view instance in which the visualization will be rendered.
69214
69370
  *
@@ -69382,7 +69538,8 @@ declare namespace __esri {
69382
69538
  | WFSLayer
69383
69539
  | OGCFeatureLayer
69384
69540
  | StreamLayer
69385
- | OrientedImageryLayer;
69541
+ | OrientedImageryLayer
69542
+ | CatalogFootprintLayer;
69386
69543
  /**
69387
69544
  * The view instance in which the visualization will be rendered.
69388
69545
  *
@@ -69604,7 +69761,8 @@ declare namespace __esri {
69604
69761
  | WFSLayer
69605
69762
  | OGCFeatureLayer
69606
69763
  | StreamLayer
69607
- | OrientedImageryLayer;
69764
+ | OrientedImageryLayer
69765
+ | CatalogFootprintLayer;
69608
69766
  /**
69609
69767
  * The view instance in which the visualization will be rendered.
69610
69768
  *
@@ -70149,7 +70307,8 @@ declare namespace __esri {
70149
70307
  | WFSLayer
70150
70308
  | OGCFeatureLayer
70151
70309
  | StreamLayer
70152
- | OrientedImageryLayer;
70310
+ | OrientedImageryLayer
70311
+ | CatalogFootprintLayer;
70153
70312
  /**
70154
70313
  * The view where the input layer is rendered.
70155
70314
  *
@@ -70276,7 +70435,8 @@ declare namespace __esri {
70276
70435
  | WFSLayer
70277
70436
  | OGCFeatureLayer
70278
70437
  | StreamLayer
70279
- | OrientedImageryLayer;
70438
+ | OrientedImageryLayer
70439
+ | CatalogFootprintLayer;
70280
70440
  /**
70281
70441
  * The view where the input layer is rendered.
70282
70442
  *
@@ -70437,7 +70597,8 @@ declare namespace __esri {
70437
70597
  | WFSLayer
70438
70598
  | OGCFeatureLayer
70439
70599
  | StreamLayer
70440
- | OrientedImageryLayer;
70600
+ | OrientedImageryLayer
70601
+ | CatalogFootprintLayer;
70441
70602
  /**
70442
70603
  * The view where the input layer is rendered.
70443
70604
  *
@@ -70603,7 +70764,8 @@ declare namespace __esri {
70603
70764
  | WFSLayer
70604
70765
  | OGCFeatureLayer
70605
70766
  | StreamLayer
70606
- | OrientedImageryLayer;
70767
+ | OrientedImageryLayer
70768
+ | CatalogFootprintLayer;
70607
70769
  /**
70608
70770
  * The view where the input layer is rendered.
70609
70771
  *
@@ -70761,7 +70923,8 @@ declare namespace __esri {
70761
70923
  | WFSLayer
70762
70924
  | OGCFeatureLayer
70763
70925
  | StreamLayer
70764
- | OrientedImageryLayer;
70926
+ | OrientedImageryLayer
70927
+ | CatalogFootprintLayer;
70765
70928
  /**
70766
70929
  * The renderer instance to update if not already set on the `layer`.
70767
70930
  *
@@ -70779,7 +70942,7 @@ declare namespace __esri {
70779
70942
  *
70780
70943
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-size.html#updateRendererWithReferenceSize)
70781
70944
  */
70782
- field: string;
70945
+ field?: string;
70783
70946
  /**
70784
70947
  * The name of a numeric field use to normalize the data in the input `field`.
70785
70948
  *
@@ -71031,7 +71194,8 @@ declare namespace __esri {
71031
71194
  | WFSLayer
71032
71195
  | OGCFeatureLayer
71033
71196
  | StreamLayer
71034
- | OrientedImageryLayer;
71197
+ | OrientedImageryLayer
71198
+ | CatalogFootprintLayer;
71035
71199
  /**
71036
71200
  * The view where the input layer is rendered.
71037
71201
  *
@@ -71282,7 +71446,8 @@ declare namespace __esri {
71282
71446
  | WFSLayer
71283
71447
  | OGCFeatureLayer
71284
71448
  | StreamLayer
71285
- | OrientedImageryLayer;
71449
+ | OrientedImageryLayer
71450
+ | CatalogFootprintLayer;
71286
71451
  /**
71287
71452
  * The view where the input layer is rendered.
71288
71453
  *
@@ -71501,7 +71666,8 @@ declare namespace __esri {
71501
71666
  | WFSLayer
71502
71667
  | OGCFeatureLayer
71503
71668
  | StreamLayer
71504
- | OrientedImageryLayer;
71669
+ | OrientedImageryLayer
71670
+ | CatalogFootprintLayer;
71505
71671
  /**
71506
71672
  * The view where the input layer is rendered.
71507
71673
  *
@@ -71841,7 +72007,8 @@ declare namespace __esri {
71841
72007
  | WFSLayer
71842
72008
  | OGCFeatureLayer
71843
72009
  | StreamLayer
71844
- | OrientedImageryLayer;
72010
+ | OrientedImageryLayer
72011
+ | CatalogFootprintLayer;
71845
72012
  /**
71846
72013
  * The class breaks will be generated based on values of this field.
71847
72014
  *
@@ -72073,7 +72240,8 @@ declare namespace __esri {
72073
72240
  | WFSLayer
72074
72241
  | OGCFeatureLayer
72075
72242
  | StreamLayer
72076
- | OrientedImageryLayer;
72243
+ | OrientedImageryLayer
72244
+ | CatalogFootprintLayer;
72077
72245
  /**
72078
72246
  * The name of the numeric field for which the histogram will be generated.
72079
72247
  *
@@ -72248,7 +72416,8 @@ declare namespace __esri {
72248
72416
  | WFSLayer
72249
72417
  | OGCFeatureLayer
72250
72418
  | StreamLayer
72251
- | OrientedImageryLayer;
72419
+ | OrientedImageryLayer
72420
+ | CatalogFootprintLayer;
72252
72421
  /**
72253
72422
  * An array of numeric fields from which to determine predominant categories.
72254
72423
  *
@@ -72403,7 +72572,8 @@ declare namespace __esri {
72403
72572
  | WFSLayer
72404
72573
  | OGCFeatureLayer
72405
72574
  | StreamLayer
72406
- | OrientedImageryLayer;
72575
+ | OrientedImageryLayer
72576
+ | CatalogFootprintLayer;
72407
72577
  /**
72408
72578
  * The name of the numeric or string field for which the summary statistics will be generated.
72409
72579
  *
@@ -72526,7 +72696,8 @@ declare namespace __esri {
72526
72696
  | WFSLayer
72527
72697
  | OGCFeatureLayer
72528
72698
  | StreamLayer
72529
- | OrientedImageryLayer;
72699
+ | OrientedImageryLayer
72700
+ | CatalogFootprintLayer;
72530
72701
  /**
72531
72702
  * The start time for the age calculation.
72532
72703
  *
@@ -72614,7 +72785,8 @@ declare namespace __esri {
72614
72785
  | WFSLayer
72615
72786
  | OGCFeatureLayer
72616
72787
  | StreamLayer
72617
- | OrientedImageryLayer;
72788
+ | OrientedImageryLayer
72789
+ | CatalogFootprintLayer;
72618
72790
  /**
72619
72791
  * The start time for the age calculation.
72620
72792
  *
@@ -72653,7 +72825,8 @@ declare namespace __esri {
72653
72825
  | WFSLayer
72654
72826
  | OGCFeatureLayer
72655
72827
  | StreamLayer
72656
- | OrientedImageryLayer, fieldNames: string[]): PredominantExpressions;
72828
+ | OrientedImageryLayer
72829
+ | CatalogFootprintLayer, fieldNames: string[]): PredominantExpressions;
72657
72830
  }
72658
72831
 
72659
72832
  export const predominanceUtils: predominanceUtils;
@@ -72810,7 +72983,8 @@ declare namespace __esri {
72810
72983
  | WFSLayer
72811
72984
  | OGCFeatureLayer
72812
72985
  | StreamLayer
72813
- | OrientedImageryLayer;
72986
+ | OrientedImageryLayer
72987
+ | CatalogFootprintLayer;
72814
72988
  /**
72815
72989
  * The name of the numeric or string field from which the unique values will be obtained.
72816
72990
  *
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../request.js";import r from"../core/Collection.js";import i from"../core/Error.js";import{getOrCreateMapValue as o}from"../core/MapUtils.js";import{MultiOriginJSONMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a}from"../core/promiseUtils.js";import{urlToObject as n,join as l}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as y}from"../core/accessorSupport/decorators/subclass.js";import d from"./Layer.js";import u from"./catalog/CatalogDynamicGroupLayer.js";import m from"./catalog/CatalogFootprintLayer.js";import c from"./graphics/sources/FeatureLayerSource.js";import{APIKeyMixin as h}from"./mixins/APIKeyMixin.js";import{ArcGISService as f}from"./mixins/ArcGISService.js";import{BlendLayer as g}from"./mixins/BlendLayer.js";import{CustomParametersMixin as j}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as F}from"./mixins/EditBusLayer.js";import{FeatureLayerBase as L}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as w}from"./mixins/OperationalLayer.js";import{OrderedLayer as v}from"./mixins/OrderedLayer.js";import{PortalLayer as S}from"./mixins/PortalLayer.js";import{RefreshableLayer as x}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as O}from"./mixins/TemporalLayer.js";import{id as b}from"./support/commonProperties.js";import{ensureLayerCredential as E,applyEdits as _,getFeatureType as T,hasDataChanged as P}from"./support/featureLayerUtils.js";import C from"./support/FeatureType.js";import{defineFieldProperties as G}from"./support/fieldProperties.js";import{layerLookupMap as U}from"./support/lazyLayerLoader.js";import{serviceSupportsSpatialReference as q}from"./support/versionUtils.js";import A from"../portal/Portal.js";import Q from"../portal/PortalItem.js";import D from"../rest/support/Query.js";const M=G();function N(e){return"object"==typeof e&&null!=e&&"itemId"in e&&"portalUrl"in e}function R(e){return"object"==typeof e&&null!=e&&"url"in e}function B(e){if(null==e)return!0;const t=Object.keys(e);return!t.length||1===t.length&&"id"===t[0]}function V(e,t,r,i){const o=e.write({},i);B(o)||(t[r]=o)}let k=class extends(L(F(g(v(O(I(x(f(w(S(s(j(h(d)))))))))))))){constructor(e){super(e),this._portals=new Map,this._layerToFootprint=new WeakMap,this.drawOrderField="cd_draworder",this.dynamicGroupLayer=new u({parent:this}),this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.footprintLayer=new m({parent:this}),this.itemNameField="cd_itemname",this.itemSourceField="cd_itemsource",this.itemTypeField="cd_itemtype",this.layers=new r([this.dynamicGroupLayer,this.footprintLayer]),this.maxScaleField="cd_maxscale",this.minScaleField="cd_minscale",this.orderBy=null,this.outFields=null,this.supportedSourceTypes=new Set(["Catalog Layer"]),this.source=new c({layer:this,supportedSourceTypes:this.supportedSourceTypes}),this.type="catalog",this.typeIdField=null,this.types=null}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(a).then((async()=>{const{url:e,source:r,portalItem:o}=this;if(!e)throw new i("catalog-layer:missing-url","Catalog layer must be created with a url");if(null==this.layerId){const r=await this._fetchFirstValidLayerId(t);if(null==r)throw new i("catalog-layer:missing-layerId","There is no Catalog Layer in the service",{service:e});this.layerId=r}await r.load({signal:t});const{sourceJSON:s}=r;s&&(this.sourceJSON=s,this.read(s,{origin:"service",portalItem:o,portal:o?.portal,url:this.parsedUrl}))})).then((()=>E(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}destroy(){this.footprintLayer.destroy(),this.dynamicGroupLayer.destroy();for(const e of this._portals.values())e.destroy();this._portals.clear()}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return!1}get parsedUrl(){const e=n(this.url);return null!=e&&null!=this.layerId&&(e.path=l(e.path,this.layerId.toString())),e}async applyEdits(e,t){return _(this,e,t)}on(e,t){return super.on(e,t)}async createLayerFromFootprint(e){const t=await this._createLayer(e);return this._configureLayer(t,e),this._layerToFootprint.set(t,e),t}createFootprintFromLayer(e){return this._layerToFootprint.get(e)?.clone()}createQuery(){const e=new D,t=this.capabilities?.query;e.returnGeometry=!0,t&&(e.compactGeometryEnabled=t.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=t.supportsDefaultSpatialReference),e.outFields=["*"];const{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e.where=this.definitionExpression||"1=1",e}getFeatureType(e){return T(this.types,this.typeIdField,e)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this.getField(e)?.domain}async hasDataChanged(){return P(this)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(D.from(e)??r.createQuery(),t);if(i?.features)for(const o of i.features)o.layer=o.sourceLayer=r.footprintLayer;return i}async queryObjectIds(e,t){return(await this.load()).source.queryObjectIds(D.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){return(await this.load()).source.queryFeatureCount(D.from(e)??this.createQuery(),t)}async queryExtent(e,t){return(await this.load()).source.queryExtent(D.from(e)??this.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&q(this,e)}read(e,t){if(super.read(e,t),e){const{footprintLayer:r,dynamicGroupLayer:i}=e;r&&this.footprintLayer.read(r,t),i&&this.dynamicGroupLayer.read(i,t)}}async _fetchFirstValidLayerId(e){const{data:r}=await t(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(Array.isArray(r?.layers))return r.layers.find((({type:e})=>this.supportedSourceTypes.has(e)))?.id}async _createLayer(e){const t=e.getAttribute(this.itemSourceField);if(!t)throw new i("catalog-layer:item-source-missing",`The footprint is missing the "${this.itemSourceField}" attribute`);const r=JSON.parse(t);if(N(r)){const{itemId:e,portalUrl:t}=r,i=o(this._portals,t,(()=>new A({url:t})));return d.fromPortalItem(new Q({id:e,portal:i}))}if(R(r))return d.fromArcGISServerUrl({url:r.url});return new(await U.UnsupportedLayer())}_configureLayer(e,t){e.persistenceEnabled=!1;const r=t.getAttribute(this.itemNameField);r&&(e.title=r);const i=t.getAttribute(this.maxScaleField);null!=i&&"maxScale"in e&&(e.maxScale=i);const o=t.getAttribute(this.minScaleField);null!=o&&"minScale"in e&&(e.minScale=o)}};e([p({readOnly:!0})],k.prototype,"createQueryVersion",null),e([p({readOnly:!0})],k.prototype,"drawOrderField",void 0),e([p({type:u,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:V}}})],k.prototype,"dynamicGroupLayer",void 0),e([p({readOnly:!0})],k.prototype,"editingEnabled",null),e([p({readOnly:!0})],k.prototype,"effectiveEditingEnabled",null),e([p({json:{origins:{"web-scene":{name:"layerDefinition.elevationInfo",read:!1,write:!1}}}})],k.prototype,"elevationInfo",void 0),e([p({...M.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],k.prototype,"fields",void 0),e([p(M.fieldsIndex)],k.prototype,"fieldsIndex",void 0),e([p({json:{origins:{"web-scene":{name:"layerDefinition.floorInfo",read:!1,write:!1}}}})],k.prototype,"floorInfo",void 0),e([p({type:m,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:V}}})],k.prototype,"footprintLayer",void 0),e([p(b)],k.prototype,"id",void 0),e([p({readOnly:!0})],k.prototype,"itemNameField",void 0),e([p({readOnly:!0})],k.prototype,"itemSourceField",void 0),e([p({readOnly:!0})],k.prototype,"itemTypeField",void 0),e([p({readOnly:!0})],k.prototype,"layers",void 0),e([p({type:["show","hide","hide-children"]})],k.prototype,"listMode",void 0),e([p({readOnly:!0})],k.prototype,"maxScaleField",void 0),e([p({readOnly:!0})],k.prototype,"minScaleField",void 0),e([p({value:"CatalogLayer",type:["CatalogLayer"]})],k.prototype,"operationalLayerType",void 0),e([p({json:{origins:{"web-scene":{name:"layerDefinition.orderBy",write:!0,read:!0}}}})],k.prototype,"orderBy",void 0),e([p(M.outFields)],k.prototype,"outFields",void 0),e([p({readOnly:!0})],k.prototype,"parsedUrl",null),e([p({readOnly:!0})],k.prototype,"source",void 0),e([p({json:{read:!1}})],k.prototype,"type",void 0),e([p({type:String})],k.prototype,"typeIdField",void 0),e([p({type:[C]})],k.prototype,"types",void 0),k=e([y("esri.layers.CatalogLayer")],k);const J=k;export{J as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../request.js";import r from"../core/Collection.js";import i from"../core/Error.js";import{getOrCreateMapValue as o}from"../core/MapUtils.js";import{MultiOriginJSONMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a}from"../core/promiseUtils.js";import{urlToObject as n,join as l}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as y}from"../core/accessorSupport/decorators/subclass.js";import d from"./Layer.js";import u from"./catalog/CatalogDynamicGroupLayer.js";import m from"./catalog/CatalogFootprintLayer.js";import c from"./graphics/sources/FeatureLayerSource.js";import{APIKeyMixin as h}from"./mixins/APIKeyMixin.js";import{ArcGISService as f}from"./mixins/ArcGISService.js";import{BlendLayer as g}from"./mixins/BlendLayer.js";import{CustomParametersMixin as j}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as F}from"./mixins/EditBusLayer.js";import{FeatureLayerBase as L}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as w}from"./mixins/OperationalLayer.js";import{OrderedLayer as v}from"./mixins/OrderedLayer.js";import{PortalLayer as S}from"./mixins/PortalLayer.js";import{RefreshableLayer as x}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as O}from"./mixins/TemporalLayer.js";import{id as b}from"./support/commonProperties.js";import{ensureLayerCredential as _,applyEdits as E,getFeatureType as T,hasDataChanged as P}from"./support/featureLayerUtils.js";import C from"./support/FeatureType.js";import{defineFieldProperties as G}from"./support/fieldProperties.js";import{layerLookupMap as U}from"./support/lazyLayerLoader.js";import{serviceSupportsSpatialReference as q}from"./support/versionUtils.js";import A from"../portal/Portal.js";import Q from"../portal/PortalItem.js";import D from"../rest/support/Query.js";const M=G();function N(e){return"object"==typeof e&&null!=e&&"itemId"in e&&"portalUrl"in e}function R(e){return"object"==typeof e&&null!=e&&"url"in e}function B(e){if(null==e)return!0;const t=Object.keys(e);return!t.length||1===t.length&&"id"===t[0]}function V(e,t,r,i){const o=e.write({},i);B(o)||(t[r]=o)}let k=class extends(L(F(g(v(O(I(x(f(w(S(s(j(h(d)))))))))))))){constructor(e){super(e),this._portals=new Map,this._layerToFootprint=new WeakMap,this.drawOrderField="cd_draworder",this.dynamicGroupLayer=new u({parent:this}),this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.footprintLayer=new m({parent:this}),this.itemNameField="cd_itemname",this.itemSourceField="cd_itemsource",this.itemTypeField="cd_itemtype",this.layers=new r([this.dynamicGroupLayer,this.footprintLayer]),this.maxScaleField="cd_maxscale",this.minScaleField="cd_minscale",this.orderBy=null,this.outFields=null,this.supportedSourceTypes=new Set(["Catalog Layer"]),this.source=new c({layer:this,supportedSourceTypes:this.supportedSourceTypes}),this.type="catalog",this.typeIdField=null,this.types=null}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(a).then((async()=>{const{url:e,source:r,portalItem:o}=this;if(!e)throw new i("catalog-layer:missing-url","Catalog layer must be created with a url");if(null==this.layerId){const r=await this._fetchFirstValidLayerId(t);if(null==r)throw new i("catalog-layer:missing-layerId","There is no Catalog Layer in the service",{service:e});this.layerId=r}await r.load({signal:t});const{sourceJSON:s}=r;s&&(this.sourceJSON=s,this.read(s,{origin:"service",portalItem:o,portal:o?.portal,url:this.parsedUrl}))})).then((()=>_(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}destroy(){this.footprintLayer.destroy(),this.dynamicGroupLayer.destroy();for(const e of this._portals.values())e.destroy();this._portals.clear()}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return!1}get parsedUrl(){const e=n(this.url);return null!=e&&null!=this.layerId&&(e.path=l(e.path,this.layerId.toString())),e}async applyEdits(e,t){return E(this,e,t)}on(e,t){return super.on(e,t)}async createLayerFromFootprint(e){const t=await this._createLayer(e);return this._configureLayer(t,e),this._layerToFootprint.set(t,e),t}createFootprintFromLayer(e){return this._layerToFootprint.get(e)?.clone()}createQuery(){const e=new D,t=this.capabilities?.query;e.returnGeometry=!0,t&&(e.compactGeometryEnabled=t.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=t.supportsDefaultSpatialReference),e.outFields=["*"];const{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e.where=this.definitionExpression||"1=1",e}getFeatureType(e){return T(this.types,this.typeIdField,e)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this.getField(e)?.domain}async hasDataChanged(){return P(this)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(D.from(e)??r.createQuery(),t);if(i?.features)for(const o of i.features)o.layer=o.sourceLayer=r.footprintLayer;return i}async queryObjectIds(e,t){return(await this.load()).source.queryObjectIds(D.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){return(await this.load()).source.queryFeatureCount(D.from(e)??this.createQuery(),t)}async queryExtent(e,t){return(await this.load()).source.queryExtent(D.from(e)??this.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&q(this,e)}read(e,t){if(super.read(e,t),e){const{footprintLayer:r,dynamicGroupLayer:i}=e;r&&this.footprintLayer.read(r,t),i&&this.dynamicGroupLayer.read(i,t)}}async _fetchFirstValidLayerId(e){const{data:r}=await t(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(Array.isArray(r?.layers))return r.layers.find((({type:e})=>this.supportedSourceTypes.has(e)))?.id}async _createLayer(e){const t=e.getAttribute(this.itemSourceField);if(!t)throw new i("catalog-layer:item-source-missing",`The footprint is missing the "${this.itemSourceField}" attribute`);const r=JSON.parse(t);if(N(r)){const{itemId:e,portalUrl:t}=r,i=o(this._portals,t,(()=>new A({url:t})));return d.fromPortalItem(new Q({id:e,portal:i}))}if(R(r))return d.fromArcGISServerUrl({url:r.url});return new(await U.UnsupportedLayer())}_configureLayer(e,t){const r=t.getAttribute(this.itemNameField);r&&(e.title=r);const i=t.getAttribute(this.maxScaleField);null!=i&&"maxScale"in e&&(e.maxScale=i);const o=t.getAttribute(this.minScaleField);null!=o&&"minScale"in e&&(e.minScale=o)}};e([p({readOnly:!0})],k.prototype,"createQueryVersion",null),e([p({readOnly:!0})],k.prototype,"drawOrderField",void 0),e([p({type:u,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:V}}})],k.prototype,"dynamicGroupLayer",void 0),e([p({readOnly:!0})],k.prototype,"editingEnabled",null),e([p({readOnly:!0})],k.prototype,"effectiveEditingEnabled",null),e([p({json:{origins:{"web-scene":{name:"layerDefinition.elevationInfo",read:!1,write:!1}}}})],k.prototype,"elevationInfo",void 0),e([p({...M.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],k.prototype,"fields",void 0),e([p(M.fieldsIndex)],k.prototype,"fieldsIndex",void 0),e([p({json:{origins:{"web-scene":{name:"layerDefinition.floorInfo",read:!1,write:!1}}}})],k.prototype,"floorInfo",void 0),e([p({type:m,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:V}}})],k.prototype,"footprintLayer",void 0),e([p(b)],k.prototype,"id",void 0),e([p({readOnly:!0})],k.prototype,"itemNameField",void 0),e([p({readOnly:!0})],k.prototype,"itemSourceField",void 0),e([p({readOnly:!0})],k.prototype,"itemTypeField",void 0),e([p({readOnly:!0})],k.prototype,"layers",void 0),e([p({type:["show","hide","hide-children"]})],k.prototype,"listMode",void 0),e([p({readOnly:!0})],k.prototype,"maxScaleField",void 0),e([p({readOnly:!0})],k.prototype,"minScaleField",void 0),e([p({value:"CatalogLayer",type:["CatalogLayer"]})],k.prototype,"operationalLayerType",void 0),e([p({json:{origins:{"web-scene":{name:"layerDefinition.orderBy",write:!0,read:!0}}}})],k.prototype,"orderBy",void 0),e([p(M.outFields)],k.prototype,"outFields",void 0),e([p({readOnly:!0})],k.prototype,"parsedUrl",null),e([p({readOnly:!0})],k.prototype,"source",void 0),e([p({json:{read:!1}})],k.prototype,"type",void 0),e([p({type:String})],k.prototype,"typeIdField",void 0),e([p({type:[C]})],k.prototype,"types",void 0),k=e([y("esri.layers.CatalogLayer")],k);const J=k;export{J as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import r from"../request.js";import t from"../TimeExtent.js";import o from"../core/Error.js";import{loadAll as i}from"../core/loadAll.js";import{MultiOriginJSONMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a,isAbortError as p}from"../core/promiseUtils.js";import{property as m}from"../core/accessorSupport/decorators/property.js";import{Integer as n}from"../core/accessorSupport/ensureType.js";import"../core/RandomLCG.js";import"../core/has.js";import{reader as l}from"../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{writer as u}from"../core/accessorSupport/decorators/writer.js";import{nameToId as y,OriginId as d}from"../core/accessorSupport/PropertyOrigin.js";import h from"../geometry/Extent.js";import{getScale as f}from"../geometry/support/scaleUtils.js";import{srToRESTValue as g}from"../geometry/support/spatialReferenceUtils.js";import x from"./Layer.js";import{APIKeyMixin as j}from"./mixins/APIKeyMixin.js";import{ArcGISMapService as v}from"./mixins/ArcGISMapService.js";import{ArcGISService as b}from"./mixins/ArcGISService.js";import{BlendLayer as S}from"./mixins/BlendLayer.js";import{CustomParametersMixin as I}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as w}from"./mixins/OperationalLayer.js";import{PortalLayer as P}from"./mixins/PortalLayer.js";import{RefreshableLayer as T}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as O}from"./mixins/ScaleRangeLayer.js";import{SublayersOwner as L}from"./mixins/SublayersOwner.js";import{TemporalLayer as E}from"./mixins/TemporalLayer.js";import{url as M}from"./support/commonProperties.js";import{ExportImageParameters as R}from"./support/ExportImageParameters.js";import{createBitmap as U}from"./support/imageBitmapUtils.js";import F from"./support/Sublayer.js";import{shouldWriteSublayerStructure as _}from"./support/sublayerUtils.js";import{serviceSupportsSpatialReference as A}from"./support/versionUtils.js";import{timeZoneProperty as N}from"../time/timeZoneUtils.js";let q=class extends(S(E(O(L(v(b(w(P(s(T(j(I(x))))))))))))){constructor(...e){super(...e),this._exportImageParameters=new R({layer:this}),this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.dpi=96,this.gdbVersion=null,this.imageFormat="png24",this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.isReference=null,this.labelsVisible=!1,this.operationalLayerType="ArcGISMapServiceLayer",this.preferredTimeZone=null,this.sourceJSON=null,this.sublayers=null,this.type="map-image",this.url=null}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(a).then((()=>this._fetchService(r)))),Promise.resolve(this)}destroy(){this._exportImageParameters.destroy()}readImageFormat(e,r){const t=r.supportedImageFormatTypes;return t&&t.includes("PNG32")?"png32":"png24"}writeSublayers(e,r,t,o){if(!this.loaded||!e)return;const i=e.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).toArray();let s=!1;if(this.capabilities?.operations.supportsExportMap&&this.capabilities?.exportMap?.supportsDynamicLayers){const e=y(o.origin);if(e===d.PORTAL_ITEM){const e=this.createSublayersForOrigin("service").sublayers;s=_(i,e,d.SERVICE)}else if(e>d.PORTAL_ITEM){const e=this.createSublayersForOrigin("portal-item");s=_(i,e.sublayers,y(e.origin))}}const a=[],p={writeSublayerStructure:s,...o};let m=s;i.forEach((e=>{const r=e.write({},p);a.push(r),m=m||"user"===e.originOf("visible")}));a.some((e=>Object.keys(e).length>1))&&(r.layers=a),m&&(r.visibleLayers=i.filter((e=>e.visible)).map((e=>e.id)))}createExportImageParameters(e,r,t,o){const i=o?.pixelRatio||1;e&&this.version>=10&&(e=e.clone().shiftCentralMeridian()),this._exportImageParameters.floors=o?.floors??null,this._exportImageParameters.scale=f({extent:e,width:r})*i;const s=this._exportImageParameters.toJSON(),a=!o?.rotation||this.version<10.3?{}:{rotation:-o.rotation},p=e?.spatialReference,m=g(p);s.dpi*=i;const n={};if(o?.timeExtent){const{start:e,end:r}=o.timeExtent.toJSON();n.time=e&&r&&e===r?""+e:`${e??"null"},${r??"null"}`}else this.timeInfo&&!this.timeInfo.hasLiveData&&(n.time="null,null");return{bbox:e&&e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:m,imageSR:m,size:r+","+t,...s,...a,...n}}async fetchImage(e,r,t,o){const{data:i}=await this._fetchImage("image",e,r,t,o);return i}async fetchImageBitmap(e,r,t,o){const{data:i,url:s}=await this._fetchImage("blob",e,r,t,o);return U(i,s,o?.signal)}async fetchRecomputedExtents(e={}){const o={...e,query:{returnUpdates:!0,f:"json",...this.customParameters,token:this.apiKey}},{data:i}=await r(this.url,o),{extent:s,fullExtent:a,timeExtent:p}=i,m=s||a;return{fullExtent:m&&h.fromJSON(m),timeExtent:p&&t.fromJSON({start:p[0],end:p[1]})}}loadAll(){return i(this,(e=>{e(this.allSublayers)}))}serviceSupportsSpatialReference(e){return A(this,e)}async _fetchImage(e,t,i,s,a){const m={responseType:e,signal:a?.signal??null,query:{...this.parsedUrl.query,...this.createExportImageParameters(t,i,s,a),f:"image",...this.refreshParameters,...this.customParameters,token:this.apiKey}},n=this.parsedUrl.path+"/export";if(null!=m.query?.dynamicLayers&&!this.capabilities?.exportMap?.supportsDynamicLayers)throw new o("mapimagelayer:dynamiclayer-not-supported",`service ${this.url} doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source.`,{query:m.query});try{const{data:e}=await r(n,m);return{data:e,url:n}}catch(l){if(p(l))throw l;throw new o("mapimagelayer:image-fetch-error",`Unable to load image: ${n}`,{error:l})}}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:o}=await r(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},signal:e});o&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})}};e([m(N("dateFieldsTimeReference"))],q.prototype,"dateFieldsTimeZone",void 0),e([m({type:Boolean})],q.prototype,"datesInUnknownTimezone",void 0),e([m()],q.prototype,"dpi",void 0),e([m()],q.prototype,"gdbVersion",void 0),e([m()],q.prototype,"imageFormat",void 0),e([l("imageFormat",["supportedImageFormatTypes"])],q.prototype,"readImageFormat",null),e([m({json:{origins:{service:{read:{source:"maxImageHeight"}}}}})],q.prototype,"imageMaxHeight",void 0),e([m({json:{origins:{service:{read:{source:"maxImageWidth"}}}}})],q.prototype,"imageMaxWidth",void 0),e([m()],q.prototype,"imageTransparency",void 0),e([m({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],q.prototype,"isReference",void 0),e([m({json:{read:!1,write:!1}})],q.prototype,"labelsVisible",void 0),e([m({type:["ArcGISMapServiceLayer"]})],q.prototype,"operationalLayerType",void 0),e([m({json:{read:!1,write:!1}})],q.prototype,"popupEnabled",void 0),e([m(N("preferredTimeReference"))],q.prototype,"preferredTimeZone",void 0),e([m()],q.prototype,"sourceJSON",void 0),e([m({json:{write:{ignoreOrigin:!0}}})],q.prototype,"sublayers",void 0),e([u("sublayers",{layers:{type:[F]},visibleLayers:{type:[n]}})],q.prototype,"writeSublayers",null),e([m({type:["show","hide","hide-children"]})],q.prototype,"listMode",void 0),e([m({json:{read:!1},readOnly:!0,value:"map-image"})],q.prototype,"type",void 0),e([m(M)],q.prototype,"url",void 0),q=e([c("esri.layers.MapImageLayer")],q);const J=q;export{J as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import r from"../request.js";import t from"../TimeExtent.js";import i from"../core/Error.js";import{loadAll as s}from"../core/loadAll.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a,isAbortError as p}from"../core/promiseUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import{Integer as m}from"../core/accessorSupport/ensureType.js";import"../core/RandomLCG.js";import"../core/has.js";import{reader as l}from"../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{writer as u}from"../core/accessorSupport/decorators/writer.js";import{nameToId as y,OriginId as h}from"../core/accessorSupport/PropertyOrigin.js";import d from"../geometry/Extent.js";import{getScale as f}from"../geometry/support/scaleUtils.js";import{srToRESTValue as g}from"../geometry/support/spatialReferenceUtils.js";import x from"./Layer.js";import{APIKeyMixin as b}from"./mixins/APIKeyMixin.js";import{ArcGISMapService as v}from"./mixins/ArcGISMapService.js";import{ArcGISService as j}from"./mixins/ArcGISService.js";import{BlendLayer as S}from"./mixins/BlendLayer.js";import{CustomParametersMixin as I}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as w}from"./mixins/OperationalLayer.js";import{PortalLayer as O}from"./mixins/PortalLayer.js";import{RefreshableLayer as L}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as P}from"./mixins/ScaleRangeLayer.js";import{SublayersOwner as T}from"./mixins/SublayersOwner.js";import{TemporalLayer as E}from"./mixins/TemporalLayer.js";import{url as M}from"./support/commonProperties.js";import{ExportImageParameters as R}from"./support/ExportImageParameters.js";import{createBitmap as U}from"./support/imageBitmapUtils.js";import F from"./support/Sublayer.js";import{shouldWriteSublayerStructure as _}from"./support/sublayerUtils.js";import{serviceSupportsSpatialReference as A}from"./support/versionUtils.js";import{timeZoneProperty as N}from"../time/timeZoneUtils.js";let J=class extends(S(E(P(T(v(j(w(O(o(L(b(I(x))))))))))))){constructor(...e){super(...e),this._exportImageParameters=new R({layer:this}),this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.dpi=96,this.gdbVersion=null,this.imageFormat="png24",this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.isReference=null,this.labelsVisible=!1,this.operationalLayerType="ArcGISMapServiceLayer",this.preferredTimeZone=null,this.sourceJSON=null,this.sublayers=null,this.type="map-image",this.url=null}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(a).then((()=>this._fetchService(r)))),Promise.resolve(this)}destroy(){this._exportImageParameters.destroy()}readImageFormat(e,r){const t=r.supportedImageFormatTypes;return t&&t.includes("PNG32")?"png32":"png24"}writeSublayers(e,r,t,i){if(!this.loaded||!e)return;const s=e.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).toArray();let o=!1;const a=y(i.origin);if(this.capabilities?.operations.supportsExportMap&&this.capabilities?.exportMap?.supportsDynamicLayers)if(a===h.PORTAL_ITEM){const e=this.createSublayersForOrigin("service").sublayers;o=_(s,e,h.SERVICE)}else if(a>h.PORTAL_ITEM){const e=this.createSublayersForOrigin("portal-item");o=_(s,e.sublayers,y(e.origin))}const p=[],n={writeSublayerStructure:o,...i};let m=o||this.hasVisibleLayersForOrigin(a);s.forEach((e=>{const r=e.write({},n);p.push(r),m=m||"user"===e.originOf("visible")}));p.some((e=>Object.keys(e).length>1))&&(r.layers=p),m&&(r.visibleLayers=s.filter((e=>e.visible)).map((e=>e.id)))}createExportImageParameters(e,r,t,i){const s=i?.pixelRatio||1;e&&this.version>=10&&(e=e.clone().shiftCentralMeridian()),this._exportImageParameters.floors=i?.floors??null,this._exportImageParameters.scale=f({extent:e,width:r})*s;const o=this._exportImageParameters.toJSON(),a=!i?.rotation||this.version<10.3?{}:{rotation:-i.rotation},p=e?.spatialReference,n=g(p);o.dpi*=s;const m={};if(i?.timeExtent){const{start:e,end:r}=i.timeExtent.toJSON();m.time=e&&r&&e===r?""+e:`${e??"null"},${r??"null"}`}else this.timeInfo&&!this.timeInfo.hasLiveData&&(m.time="null,null");return{bbox:e&&e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:r+","+t,...o,...a,...m}}async fetchImage(e,r,t,i){const{data:s}=await this._fetchImage("image",e,r,t,i);return s}async fetchImageBitmap(e,r,t,i){const{data:s,url:o}=await this._fetchImage("blob",e,r,t,i);return U(s,o,i?.signal)}async fetchRecomputedExtents(e={}){const i={...e,query:{returnUpdates:!0,f:"json",...this.customParameters,token:this.apiKey}},{data:s}=await r(this.url,i),{extent:o,fullExtent:a,timeExtent:p}=s,n=o||a;return{fullExtent:n&&d.fromJSON(n),timeExtent:p&&t.fromJSON({start:p[0],end:p[1]})}}loadAll(){return s(this,(e=>{e(this.allSublayers)}))}serviceSupportsSpatialReference(e){return A(this,e)}async _fetchImage(e,t,s,o,a){const n={responseType:e,signal:a?.signal??null,query:{...this.parsedUrl.query,...this.createExportImageParameters(t,s,o,a),f:"image",...this.refreshParameters,...this.customParameters,token:this.apiKey}},m=this.parsedUrl.path+"/export";if(null!=n.query?.dynamicLayers&&!this.capabilities?.exportMap?.supportsDynamicLayers)throw new i("mapimagelayer:dynamiclayer-not-supported",`service ${this.url} doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source.`,{query:n.query});try{const{data:e}=await r(m,n);return{data:e,url:m}}catch(l){if(p(l))throw l;throw new i("mapimagelayer:image-fetch-error",`Unable to load image: ${m}`,{error:l})}}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:i}=await r(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},signal:e});i&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})}hasVisibleLayersForOrigin(e){return!(null==e||!this.sublayersSourceJSON[e]?.visibleLayers)}};e([n(N("dateFieldsTimeReference"))],J.prototype,"dateFieldsTimeZone",void 0),e([n({type:Boolean})],J.prototype,"datesInUnknownTimezone",void 0),e([n()],J.prototype,"dpi",void 0),e([n()],J.prototype,"gdbVersion",void 0),e([n()],J.prototype,"imageFormat",void 0),e([l("imageFormat",["supportedImageFormatTypes"])],J.prototype,"readImageFormat",null),e([n({json:{origins:{service:{read:{source:"maxImageHeight"}}}}})],J.prototype,"imageMaxHeight",void 0),e([n({json:{origins:{service:{read:{source:"maxImageWidth"}}}}})],J.prototype,"imageMaxWidth",void 0),e([n()],J.prototype,"imageTransparency",void 0),e([n({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],J.prototype,"isReference",void 0),e([n({json:{read:!1,write:!1}})],J.prototype,"labelsVisible",void 0),e([n({type:["ArcGISMapServiceLayer"]})],J.prototype,"operationalLayerType",void 0),e([n({json:{read:!1,write:!1}})],J.prototype,"popupEnabled",void 0),e([n(N("preferredTimeReference"))],J.prototype,"preferredTimeZone",void 0),e([n()],J.prototype,"sourceJSON",void 0),e([n({json:{write:{ignoreOrigin:!0}}})],J.prototype,"sublayers",void 0),e([u("sublayers",{layers:{type:[F]},visibleLayers:{type:[m]}})],J.prototype,"writeSublayers",null),e([n({type:["show","hide","hide-children"]})],J.prototype,"listMode",void 0),e([n({json:{read:!1},readOnly:!0,value:"map-image"})],J.prototype,"type",void 0),e([n(M)],J.prototype,"url",void 0),J=e([c("esri.layers.MapImageLayer")],J);const q=J;export{q as default};