@arcgis/core 4.31.0-next.20240921 → 4.31.0-next.20240923

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 (55) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/1810cb638ca1d52de7b2.js +1 -0
  3. package/assets/esri/core/workers/chunks/{69f6f35b04c722aba8cf.js → 238897e72fedd6754af7.js} +1 -1
  4. package/assets/esri/core/workers/chunks/2807eb7bfe4868fe840f.js +1 -0
  5. package/assets/esri/core/workers/chunks/{6c07116c8f7361780803.js → 2b04d2f8466d16a24a80.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{83649583139b818d4dfa.js → 356f6cc122287412b888.js} +1 -1
  7. package/assets/esri/core/workers/chunks/36a1de3752ff13d77b4d.js +1 -0
  8. package/assets/esri/core/workers/chunks/{bf406a46515d5dfebe06.js → 3d207d1c6effda13b448.js} +1 -1
  9. package/assets/esri/core/workers/chunks/460ae228640fd5e545ad.js +1 -0
  10. package/assets/esri/core/workers/chunks/{f14cefc311a21116d21b.js → 4c0d37b799edae391ab2.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{16eda85f728423c4ed02.js → 4ea08495271f6d291b05.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{cf147f34032a8d07f322.js → 53becb5fe10f7f38311f.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{24d45530fe47b3114daf.js → 5652ff08dcc5afd3d739.js} +1 -1
  14. package/assets/esri/core/workers/chunks/5fe1f8881959df0e61ce.js +1 -0
  15. package/assets/esri/core/workers/chunks/62f4eda8a9f4de481dcb.js +1 -0
  16. package/assets/esri/core/workers/chunks/{3fa3e1e6595668ca0e18.js → 686613864dd54d1cae3c.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{5d0d36230a5b8309c9e4.js → 75bf6dff29056a5a1242.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{a7bd5bb21a7f3030ee13.js → 783d66397f16899dd0e9.js} +1 -1
  19. package/assets/esri/core/workers/chunks/7bc57e2a3836ddc8f121.js +1 -0
  20. package/assets/esri/core/workers/chunks/{2658205b1ab2502c0bc7.js → 856c82a20027435fd306.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{99944b05d3142903511c.js → 93fb720bbfb3628f9c71.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{14f77efbfba0ca9efb6c.js → 9dce33a9bcfb852a74d3.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{de7e197223471c7b66a7.js → afb35deb035c9c9225c9.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{5f9beed2a9599b9ce649.js → bc37c0dc14ea54f1b9e8.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{35f92652df2561845d47.js → c9aa8df2f62e6d40b771.js} +1 -1
  26. package/assets/esri/core/workers/chunks/d8435cc010bd2260feec.js +1 -0
  27. package/assets/esri/core/workers/chunks/e5a8ab8d02a616469f1d.js +1 -0
  28. package/assets/esri/core/workers/chunks/f1446e56c35e59b904e1.js +1 -0
  29. package/assets/esri/core/workers/chunks/{6508ff21b0a5725629eb.js → fa3f9691a9bd1bbb25d3.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{008f290833724454160d.js → fab59ee41f96b2378768.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{67ea066a903f5ad31155.js → fe709db8238127f91e59.js} +1 -1
  32. package/layers/FeatureLayer.js +1 -1
  33. package/layers/SubtypeGroupLayer.js +1 -1
  34. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  35. package/layers/orientedImagery/core/utils.js +1 -1
  36. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  37. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  38. package/layers/orientedImagery/transformations/utils.js +1 -1
  39. package/layers/support/SubtypeSublayer.js +1 -1
  40. package/layers/support/featureLayerUtils.js +1 -1
  41. package/package.json +1 -1
  42. package/support/revision.js +1 -1
  43. package/views/interactive/sketch/constraintUtils.js +1 -1
  44. package/views/interactive/sketch/constraints.js +1 -1
  45. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  46. package/assets/esri/core/workers/chunks/0eb789af3c26fecdf3be.js +0 -1
  47. package/assets/esri/core/workers/chunks/41a3c7d286a050002d20.js +0 -1
  48. package/assets/esri/core/workers/chunks/59e4731d246203e94a96.js +0 -1
  49. package/assets/esri/core/workers/chunks/69c09478c899cd5e5013.js +0 -1
  50. package/assets/esri/core/workers/chunks/7088f771163fda53d196.js +0 -1
  51. package/assets/esri/core/workers/chunks/79ed119c70ce6ea02f71.js +0 -1
  52. package/assets/esri/core/workers/chunks/b5c02dbf540ededb863c.js +0 -1
  53. package/assets/esri/core/workers/chunks/eeacd5fa9fb9b1dee5f7.js +0 -1
  54. package/assets/esri/core/workers/chunks/f7c96d34c70ed36da7c2.js +0 -1
  55. package/assets/esri/core/workers/chunks/f9e90a2fda559ca68848.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1834],{71903:(e,t,s)=>{var i;s.d(t,{u:()=>i}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(i||(i={}))},69540:(e,t,s)=>{s.d(t,{O:()=>u,P:()=>c});var i=s(90237),n=s(69622),r=(s(44208),s(4718)),o=(s(53966),s(97768)),a=s(35666),l=s(88620),h=s(40608);const u=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,s=e.store,i={},n=new Map;for(const e in t){const o=t[e],l=s?.originOf(e),h=o.clonable;if(o.readOnly||!1===h||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const u=this[e];let c=null;c="function"==typeof h?h(u):"reference"===h?u:(0,r.TU)(u),null!=u&&null==c||(l===a.Gr.DEFAULTS?n.set(e,c):i[e]=c)}const h=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){const e=(0,l.oY)(h)?.store;if(e)for(const[t,s]of n)e.set(t,s,a.Gr.DEFAULTS)}return h}};return t=(0,i._)([(0,h.$)("esri.core.Clonable")],t),t};let c=class extends(u(n.A)){};c=(0,i._)([(0,h.$)("esri.core.Clonable")],c)},55359:(e,t,s)=>{s.d(t,{q:()=>n});var i=s(57219);class n{constructor(e,t){this._storage=new i.F,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},57219:(e,t,s)=>{s.d(t,{F:()=>a,Mn:()=>o});var i,n,r=s(3694);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.A,this._users=new r.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new h(s,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0;class h{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},75503:(e,t,s)=>{s.d(t,{E:()=>T,w:()=>o});var i=s(4576),n=(s(44208),s(3694)),r=s(11006);class o{constructor(e=9,t){this._compareMinX=c,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),x.prune(),S.prune(),b.prune()}all(e){a(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(y(e,s))for(w.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;y(e,o)&&(s.leaf?t(r):g(e,o)?a(r,t):w.push(r))}s=w.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!y(e,t))return!1;for(w.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(y(e,r)){if(t.leaf||g(e,r))return!0;w.push(n)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(S.clear(),b.clear();s||S.length>0;){if(s||(s=S.pop(),n=S.data[S.length-1],r=b.pop()??0,o=!0),s.leaf&&(t=(0,i.qh)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),S.push(s),this._condense(S),this;o||s.leaf||!g(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(S.push(s),b.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new F(e.slice(t,s+1));return l(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new I([]);o.height=i;const a=Math.ceil(n/r),h=a*Math.ceil(Math.sqrt(r));v(e,t,s,h,this._compareMinX);for(let n=t;n<=s;n+=h){const t=Math.min(n+h-1,s);v(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,i-1))}}return l(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);S.clear();const r=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),l=_(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(n,this._data,t,S);for(r.children.push(e),u(r,n);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)u(t.data[i],e)}(n,S,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return;const o=s.children.splice(r,s.children.length-r),a=s.leaf?new F(o):new I(o);a.height=s.height,l(s,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new I([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,s,this._toBBox),l=m(t,a),u=p(t)+p(a);l<i?(i=l,r=o,n=u<n?u:n):l===i&&u<n&&(n=u,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:c,n=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=h(e,0,t,n),o=h(e,s-t,s,n);let a=f(r)+f(o);for(let i=t;i<s-t;i++){const t=e.children[i];u(r,e.leaf?n(t):t),a+=f(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?n(t):t),a+=f(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.qh)(r,s,r.length,n.indexHint),1)}else this.clear();else l(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let s=e;for(x.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else x.pushArray(s.children);s=x.pop()??null}}function l(e,t){h(e,0,e.children.length,t,e)}function h(e,t,s,i,n){n||(n=new F([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],u(n,e.leaf?i(r):r);return n}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function _(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function m(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const w=new n.A,x=new n.A,S=new n.A,b=new n.A({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class E extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class F extends E{constructor(e){super(),this.children=e,this.leaf=!0}}class I extends E{constructor(e){super(),this.children=e,this.leaf=!1}}},36708:(e,t,s)=>{s.d(t,{C_:()=>d,OH:()=>_,Vh:()=>m,on:()=>c,pc:()=>g,wB:()=>l,z7:()=>h}),s(60999),s(5503);var i=s(37955),n=s(36563),r=s(97768),o=s(74887),a=s(14012);function l(e,t,s={}){return u(e,t,s,p)}function h(e,t,s={}){return u(e,t,s,f)}function u(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.xt)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,h=null,u=null;function c(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(e){o.once&&o.once&&(0,r.xt)(u),s(e)}const p=l(e,((e,s)=>{c(),(0,i.wb)(e)&&(a=e,h=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,n.hA)((()=>{p.remove(),c()})),u}function d(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.xt)(a)}return new Promise(((i,r)=>{a=(0,n.vE)([(0,o.u7)(s,(()=>{l(),r((0,o.NK)())})),u(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}s(80559);const _={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},79897:(e,t,s)=>{s.d(t,{U:()=>u});var i=s(90237),n=s(69622),r=s(36563),o=s(36708),a=s(11932),l=s(10107),h=s(40608);let u=class extends n.A{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll()}add(e,t,s={}){return this._installWatch(e,t,s,o.wB)}addWhen(e,t,s={}){return this._installWatch(e,t,s,o.z7)}addOnCollectionChange(e,t,{initial:s=!1,final:i=!1}={}){const n=++this._handleId;return this.addHandles([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.OH),(0,o.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],n),(0,r.hA)((()=>this.removeHandles(n)))}addPromise(e){if(null==e)return e;const t=++this._handleId;this.addHandles((0,r.hA)((()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this.hasHandles(c)||this._set("updating",!1))})),t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this.removeHandles(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this.removeAllHandles(),this._set("updating",!1)}_installWatch(e,t,s={},i){const n=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,n);const o=i(e,t,s);return this.addHandles(o,n),(0,r.hA)((()=>this.removeHandles(n)))}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),i=(0,o.wB)(e,s,{sync:!0,equals:()=>!1});return this.addHandles(i,t),i}_createSyncUpdatingCallback(){return()=>{this.removeHandles(c),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this.addHandles((0,a._)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this.removeHandles(c))})),c)}}};(0,i._)([(0,l.M)({readOnly:!0})],u.prototype,"updating",void 0),u=(0,i._)([(0,h.$)("esri.core.support.UpdatingHandles")],u);const c=-42},6518:(e,t,s)=>{s.d(t,{F:()=>a});var i=s(44208),n=s(75503),r=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,s)=>{s.d(t,{A:()=>f});var i=s(4576),n=s(49186),r=s(65529),o=s(53966),a=s(70328),l=s(19419),h=s(90708),u=s(6518),c=s(51441),d=s(37730);const p=(0,a.vt)();class f{constructor(e){this.geometryInfo=e,this._boundsStore=new u.F,this._featuresById=new Map,this.events=new r.A,this.featureAdapter=d.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,c.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Jt)(p,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,h.jQ)(null!=i?i:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,h.jQ)((0,l.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),e}}},37730:(e,t,s)=>{s.d(t,{T:()=>o});var i=s(27647),n=s(43334),r=s(92722);const o={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new n.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,i.Q)(new r.A,e.geometry,t.hasZ,t.hasM)),e.centroid)}},20437:(e,t,s)=>{s.d(t,{A:()=>m});var i,n=s(90237),r=s(66552),o=s(25482),a=s(10107),l=s(56507),h=(s(87811),s(44208),s(93223)),u=s(36005),c=s(40608),d=s(72088),p=s(98453);const f=new r.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let _=i=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?.value??null}readValueType(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?f.fromJSON(s.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,a.M)({type:String,json:{write:!0}})],_.prototype,"alias",void 0),(0,n._)([(0,a.M)({type:[String,Number],json:{write:{allowNull:!0}}})],_.prototype,"defaultValue",void 0),(0,n._)([(0,a.M)()],_.prototype,"description",void 0),(0,n._)([(0,u.w)("description")],_.prototype,"readDescription",null),(0,n._)([(0,a.M)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],_.prototype,"domain",void 0),(0,n._)([(0,a.M)({type:Boolean,json:{write:!0}})],_.prototype,"editable",void 0),(0,n._)([(0,a.M)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],_.prototype,"length",void 0),(0,n._)([(0,a.M)({type:String,json:{write:!0}})],_.prototype,"name",void 0),(0,n._)([(0,a.M)({type:Boolean,json:{write:!0}})],_.prototype,"nullable",void 0),(0,n._)([(0,h.e)(p.m)],_.prototype,"type",void 0),(0,n._)([(0,a.M)()],_.prototype,"valueType",void 0),(0,n._)([(0,u.w)("valueType",["description"])],_.prototype,"readValueType",null),(0,n._)([(0,a.M)({type:Boolean,json:{read:!1}})],_.prototype,"visible",void 0),_=i=(0,n._)([(0,c.$)("esri.layers.support.Field")],_);const m=_},91806:(e,t,s)=>{s.d(t,{A:()=>u});var i,n=s(90237),r=s(25482),o=s(10107),a=s(56507),l=(s(87811),s(44208),s(40608));let h=i=class extends r.oY{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n._)([(0,o.M)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"cols",void 0),(0,n._)([(0,o.M)({type:a.jz,json:{write:!0}})],h.prototype,"level",void 0),(0,n._)([(0,o.M)({type:String,json:{write:!0}})],h.prototype,"levelValue",void 0),(0,n._)([(0,o.M)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"origin",void 0),(0,n._)([(0,o.M)({type:Number,json:{write:!0}})],h.prototype,"resolution",void 0),(0,n._)([(0,o.M)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"rows",void 0),(0,n._)([(0,o.M)({type:Number,json:{write:!0}})],h.prototype,"scale",void 0),h=i=(0,n._)([(0,l.$)("esri.layers.support.LOD")],h);const u=h},87045:(e,t,s)=>{s.d(t,{A:()=>T});var i,n=s(90237),r=s(66552),o=s(25482),a=s(83047),l=s(10107),h=s(56507),u=(s(87811),s(44208),s(36005)),c=s(40608),d=s(43937),p=s(86738),f=s(16930),_=s(19419),m=s(21325),g=s(28735),y=s(91806),v=s(72802);const w=new r.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let x=i=class extends o.oY{static create(e={}){const{resolutionFactor:t=1,scales:s,size:n=256,spatialReference:r=f.A.WebMercator,numLODs:o=24}=e;if(!(0,m.fn)(r)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new y.A({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=o-1;s>=0;s--)e.unshift(new y.A({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new p.A(0,0,r),size:[n,n],spatialReference:r})}const l=(0,m.Vp)(r),h=e.origin?new p.A({x:e.origin.x,y:e.origin.y,spatialReference:r}):new p.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),u=1/(39.37*(0,a.GA)(r)*96),c=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*u;c.push(new y.A({level:e,scale:t,resolution:i}))}else{let e=(0,m.EA)(r)?512/n*591657527.5917094:256/n*591657527.591555;const s=Math.ceil(o/t);c.push(new y.A({level:0,scale:e,resolution:e*u}));for(let i=1;i<s;i++){const s=e/2**t,n=s*u;c.push(new y.A({level:i,scale:s,resolution:n})),e=s}}return new i({dpi:96,lods:c,origin:h,size:[n,n],spatialReference:r})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,m.Vp)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return p.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],n=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach((e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,n[e.level]=e}))),this._set("scales",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],n=t[i+1];if(s<=e)return i;if(n===e)return i+1;if(s>e&&n<e)return i+Math.log(s/e)/Math.log(s/n)}return i}tileAt(e,t,s,i){const n=this.lodAt(e);if(!n)return null;let r,o;if("number"==typeof t)r=t,o=s;else if((0,m.aI)(t.spatialReference,this.spatialReference))r=t.x,o=t.y,i=s;else{const e=(0,g.Cv)(t,this.spatialReference);if(null==e)return null;r=e.x,o=e.y,i=s}const a=n.resolution*this.size[0],l=n.resolution*this.size[1];return i||(i=new v.U(null,0,0,0,(0,_.vt)())),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((r-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=i.ExtrapolateOptions.NONE){let s=this.lodAt(e.level);if(!s&&t===i.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return;const n=e.level-s.level,r=s.resolution*this.size[0]/2**n,o=s.resolution*this.size[1]/2**n;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,_.vt)()),e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,n=i*this.size[0],r=i*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+n,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const s=[],n=this.lods.length-t;for(let e=0;e<n;e++){const i=e+t,{scale:n,resolution:r}=i>=0?this.lods[i]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};s.push(new y.A({level:e,scale:n,resolution:r}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};var S,b;(0,n._)([(0,l.M)({type:Number,json:{write:!0}})],x.prototype,"compressionQuality",void 0),(0,n._)([(0,l.M)({type:Number,json:{write:!0}})],x.prototype,"dpi",void 0),(0,n._)([(0,l.M)({type:String,json:{read:w.read,write:w.write,origins:{"web-scene":{read:!1,write:!1}}}})],x.prototype,"format",void 0),(0,n._)([(0,l.M)({readOnly:!0})],x.prototype,"isWrappable",null),(0,n._)([(0,l.M)({type:p.A,json:{write:!0}})],x.prototype,"origin",void 0),(0,n._)([(0,u.w)("origin")],x.prototype,"readOrigin",null),(0,n._)([(0,l.M)({type:[y.A],value:null,json:{write:!0}})],x.prototype,"lods",null),(0,n._)([(0,l.M)({readOnly:!0})],x.prototype,"scales",void 0),(0,n._)([(0,l.M)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],x.prototype,"size",void 0),(0,n._)([(0,u.w)("size",["rows","cols"])],x.prototype,"readSize",null),(0,n._)([(0,d.K)("size",{cols:{type:h.jz},rows:{type:h.jz}})],x.prototype,"writeSize",null),(0,n._)([(0,l.M)({type:f.A,json:{write:!0}})],x.prototype,"spatialReference",void 0),x=i=(0,n._)([(0,c.$)("esri.layers.support.TileInfo")],x),S=x||(x={}),(b=S.ExtrapolateOptions||(S.ExtrapolateOptions={}))[b.NONE=0]="NONE",b[b.POWER_OF_TWO=1]="POWER_OF_TWO";const T=x},72802:(e,t,s)=>{s.d(t,{U:()=>i});class i{constructor(e,t,s,i,n=void 0){this.id=e,this.level=t,this.row=s,this.col=i,this.extent=n}}},60694:(e,t,s)=>{s.d(t,{Fi:()=>u,HZ:()=>g,Jf:()=>m,LS:()=>y,Wo:()=>_,bd:()=>v,cr:()=>p,iz:()=>d,qg:()=>c,yG:()=>f});var i=s(84952),n=s(97159);const r={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",knowledgegraphserver:"KnowledgeGraphServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer",videoserver:"VideoServer"},o=Object.values(r),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),h=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function u(e){return a.test(e)}function c(e){if(null==e)return null;const t=(0,i.An)(e),s=t?.path.match(a)||t?.path.match(l);if(!s)return null;const[,n,o,h,u]=s,c=o.indexOf("/");return{title:p(-1!==c?o.slice(c+1):o),serverType:r[h.toLowerCase()],sublayer:null!=u&&""!==u?parseInt(u,10):null,url:{path:n}}}function d(e){const t=(0,i.An)(e).path.match(h);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function p(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function f(e,t){const s=[];if(e){const t=c(e);null!=t&&t.title&&s.push(t.title)}if(t){const e=p(t);s.push(e)}if(2===s.length){if(s[0].toLowerCase().includes(s[1].toLowerCase()))return s[0];if(s[1].toLowerCase().includes(s[0].toLowerCase()))return s[1]}return s.join(" - ")}function _(e){let t=(0,i.$z)(e,!0);return!!t&&(t=t.toLowerCase(),t.endsWith(".arcgis.com")&&(t.startsWith("services")||t.startsWith("tiles")||t.startsWith("features")))}function m(e,t){return e?(0,i.UC)((0,i.zi)(e,t)):e}function g(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.zi)(t,e.logger);const s=(0,i.An)(t),n=c(s.path);let r;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(r=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=d(s.path);null!=e&&(t=e.serviceUrl,r=e.sublayerId)}return{url:(0,i.UC)(t),layerId:r}}function y(e,t,s,r,o){(0,n.w)(t,r,"url",o),r.url&&null!=e.layerId&&(r.url=(0,i.fj)(r.url,s,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),s=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),r=t.includes("/wmsserver");return s&&(i||n||r)}},72088:(e,t,s)=>{s.d(t,{rS:()=>T,gK:()=>b}),s(44208);var i,n=s(90237),r=s(4718),o=s(10107),a=(s(53966),s(93223)),l=s(40608),h=s(25482);s(87811);let u=i=class extends h.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,o.M)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,n._)([(0,o.M)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=i=(0,n._)([(0,l.$)("esri.layers.support.CodedValue")],u);const c=new(s(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends h.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,o.M)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,a.e)(c)],d.prototype,"type",void 0),d=(0,n._)([(0,l.$)("esri.layers.support.Domain")],d);const p=d;var f;let _=f=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some((e=>(String(e.code)===s&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,r.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,o.M)({type:[u],json:{write:!0}})],_.prototype,"codedValues",void 0),(0,n._)([(0,a.e)({codedValue:"coded-value"})],_.prototype,"type",void 0),_=f=(0,n._)([(0,l.$)("esri.layers.support.CodedValueDomain")],_);const m=_;var g;s(49186);let y=g=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,n._)([(0,a.e)({inherited:"inherited"})],y.prototype,"type",void 0),y=g=(0,n._)([(0,l.$)("esri.layers.support.InheritedDomain")],y);const v=y;var w;let x=w=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new w({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,o.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]}}}})],x.prototype,"maxValue",void 0),(0,n._)([(0,o.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]}}}})],x.prototype,"minValue",void 0),(0,n._)([(0,a.e)({range:"range"})],x.prototype,"type",void 0),x=w=(0,n._)([(0,l.$)("esri.layers.support.RangeDomain")],x);const S=x,b={key:"type",base:p,typeMap:{range:x,"coded-value":m,inherited:v}};function T(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},31756:(e,t,s)=>{s.d(t,{j:()=>r});var i=s(83047),n=s(79258);const r={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",n.$O.radius)}},58501:(e,t,s)=>{s.d(t,{q:()=>n});var i=s(62815);function n(e,t,s){if(!s?.features||!s.hasZ)return;const n=(0,i.N)(s.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of s.features)n(e.geometry)}},88625:(e,t,s)=>{s.d(t,{A:()=>w});var i,n=s(90237),r=s(66552),o=s(25482),a=s(97768),l=s(10107),h=(s(44208),s(53966),s(87811),s(36005)),u=s(40608),c=s(43937),d=s(30524);let p=i=class extends o.oY{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,d.Dx)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,n._)([(0,l.M)({type:String,json:{write:!0}})],p.prototype,"expression",void 0),(0,n._)([(0,l.M)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=(0,n._)([(0,u.$)("esri.symbols.support.FeatureExpressionInfo")],p);const f=p;var _,m=s(16271);const g=(0,r.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new r.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let v=_=class extends o.oY{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new _({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,n._)([(0,l.M)({type:f,json:{write:!0}})],v.prototype,"featureExpressionInfo",void 0),(0,n._)([(0,h.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],v.prototype,"readFeatureExpressionInfo",null),(0,n._)([(0,c.K)("featureExpressionInfo",{featureExpressionInfo:{type:f},"featureExpression.value":{type:[0]}})],v.prototype,"writeFeatureExpressionInfo",null),(0,n._)([(0,l.M)({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],v.prototype,"mode",null),(0,n._)([(0,l.M)({type:Number,json:{write:!0}})],v.prototype,"offset",void 0),(0,n._)([(0,l.M)({type:m.KQ,json:{type:String,read:y.read,write:y.write}})],v.prototype,"unit",null),v=_=(0,n._)([(0,u.$)("esri.symbols.support.ElevationInfo")],v);const w=v},16271:(e,t,s)=>{s.d(t,{Ao:()=>r,KQ:()=>o});var i=s(4576),n=s(31756);function r(e){return 1/(n.j[e]||1)}const o=function(){const e=Object.keys(n.j);return(0,i.TF)(e,"decimal-degrees"),e.sort(),e}()},79677:(e,t,s)=>{s.d(t,{A:()=>p});var i,n=s(90237),r=s(25482),o=s(88930),a=s(10107),l=(s(44208),s(53966),s(87811),s(36005)),h=s(40608),u=s(43937),c=s(56400);let d=i=class extends r.oY{static get allTime(){return f}static get empty(){return _}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,s=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&s===n}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let s=this.start;s&&(s=(0,o.lL)(s,e,t));let n=this.end;if(n){const s=(0,o.lL)(n,e,t);n=n.getTime()===s.getTime()?s:(0,o.S1)(s,1,e,t)}return new i({start:s,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let o,a;return n>=t&&n<=s?o=n:t>=n&&t<=r&&(o=t),s>=n&&s<=r?a=s:r>=t&&r<=s&&(a=r),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,s=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:r,end:a}=this;return null!=r&&(n.start=(0,o.S1)(r,e,t,s)),null!=a&&(n.end=(0,o.S1)(a,e,t,s)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return f.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,n._)([(0,a.M)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n._)([(0,l.w)("end")],d.prototype,"readEnd",null),(0,n._)([(0,u.K)("end")],d.prototype,"writeEnd",null),(0,n._)([(0,a.M)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n._)([(0,a.M)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n._)([(0,a.M)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n._)([(0,l.w)("start")],d.prototype,"readStart",null),(0,n._)([(0,u.K)("start")],d.prototype,"writeStart",null),d=i=(0,n._)([(0,h.$)("esri.time.TimeExtent")],d);const p=d,f=new d,_=new d({start:void 0,end:void 0})},12543:(e,t,s)=>{s.r(t),s.d(t,{default:()=>ve});var i=s(90237),n=(s(59456),s(65529)),r=s(74887),o=s(36708),a=s(10107),l=(s(44208),s(53966)),h=(s(87811),s(40608)),u=s(79897),c=s(16930),d=s(83221),p=s(52158),f=s(87045),_=s(61956),m=s(88625),g=s(55359),y=s(91869),v=s(83047),w=s(16271);function x(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new b(e,s)}return new S}class S{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}class b{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new g.q(1024),this._cacheVersion=0}async alignCandidates(e,t,s){const i=this._elevationInfo;return null==i||"absolute-height"!==i.mode||i.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(function(e,t,s){const{offset:i,unit:n}=s;if(null==i)return;const r=(0,v.G9)(t),o=i*((0,w.Ao)(n??"meters")/r);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o;continue;case"vertex":t.target.z+=o;continue}}(e,t,i),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,s){const i=new Map;for(const t of e)(0,y.tE)(i,t.objectId,F).push(t);const[n,o,a]=this._prepareQuery(i,t),l=await this._alignPointsInFeatures(n,s);if((0,r.Te)(s),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,s);this._applyCacheAndResponse(n,l,o);const{drapedObjectIds:h,failedObjectIds:u}=l,c=[];for(const t of e){const{objectId:e}=t;h.has(e)&&"edge"===t.type&&(t.draped=!0),u.has(e)||c.push(t)}return c}_prepareQuery(e,t){const s=[],i=[];for(const[t,n]of e){const e=[];for(const s of n)this._addToQueriesOrCachedResult(t,s.target,e,i),"edge"===s.type&&(this._addToQueriesOrCachedResult(t,s.start,e,i),this._addToQueriesOrCachedResult(t,s.end,e,i));0!==e.length&&s.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:s},i,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const n=E(e,t),r=this._alignmentsCache.get(n);null==r?s.push(t):i.push(new T(t,r))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},n){for(const e of n)e.apply();let r=0;const o=this._alignmentsCache;for(const{objectId:n,points:a}of e.pointsInFeatures){if(i.has(n)){r+=a.length;continue}const e=!s.has(n);for(const s of a){const i=E(n,s),a=t[r++];s.z=a,e&&o.put(i,a,1)}}}}class T{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function E(e,{x:t,y:s,z:i,spatialReference:n}){return`${e}-${t}-${s}-${i??0}}-wkid:${n?.wkid}`}function F(){return[]}class I{filter(e,t){return t}notifyElevationSourceChange(){}}class C{filter(e,t){const{point:s,distance:i}=e,{z:n}=s;if(null==n)return t;if(0===t.length)return t;const r=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,r).filter(M);return o.sort(R),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":z(i,t,s);continue;case"vertex":O(i,t,s);continue}return e}}function M(e){return e.distance<=1}function A(e=!1){return e?new C:new I}function z(e,t,{x:s,y:i,z:n}){const{start:r,end:o,target:a}=e;e.draped||function(e,t,s,i){const n=i.x-s.x,r=i.y-s.y,o=i.z-s.z,a=n*n+r*r+o*o,l=(t.x-s.x)*n+(t.y-s.y)*r+o*(t.z-s.z),h=Math.min(1,Math.max(0,l/a)),u=s.x+n*h,c=s.y+r*h,d=s.z+o*h;e.x=u,e.y=c,e.z=d}(a,t,r,o);const l=(t.x-a.x)/s,h=(t.y-a.y)/i,u=(t.z-a.z)/n;e.distance=Math.sqrt(l*l+h*h+u*u)}function O(e,t,{x:s,y:i,z:n}){const{target:r}=e,o=(t.x-r.x)/s,a=(t.y-r.y)/i,l=(t.z-r.z)/n,h=Math.sqrt(o*o+a*a+l*l);e.distance=h}function R(e,t){return e.distance-t.distance}var B=s(4718),j=s(799);function H(e=!1,t){return e?new P(t):new N}class N{async fetch(){return[]}notifySymbologyChange(){}}class P{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new g.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],n=this._candidatesCache;for(const t of e){const e=D(t),r=n.get(e);if(r)for(const e of r)i.push((0,B.o8)(e));else s.push(t),n.put(e,[],1)}if(0===s.length)return i;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,r.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const h=[],{length:u}=a;for(let e=0;e<u;++e){const t=a[e],i=D(s[l[e]]),r=n.get(i);r.push(t),n.put(i,r,r.length),h.push((0,B.o8)(t))}return i.concat(h)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function D(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,j.Wm)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,n=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,j.Wm)(n).toString()}default:return""}}var U,L=s(69622),Y=s(4576),V=s(60999),q=s(3483),k=s(5443),W=s(19419),X=s(90708),$=s(60694),G=s(69418),J=s(80893);class Q{constructor(e,t){this.data=e,this.resolution=t,this.state={type:U.CREATED},this.alive=!0}process(e){switch(this.state.type){case U.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case U.FETCH_COUNT:break;case U.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case U.FETCH_FEATURES:break;case U.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case U.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case U.CREATED:case U.FETCH_COUNT:return 0;case U.FETCHED_COUNT:return this.state.featureCount;case U.FETCH_FEATURES:return this.state.previous.featureCount;case U.FETCHED_FEATURES:return this.state.features.length;case U.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case U.CREATED:return"created";case U.FETCH_COUNT:return"fetch-count";case U.FETCHED_COUNT:return"fetched-count";case U.FETCH_FEATURES:return"fetch-features";case U.FETCHED_FEATURES:return"fetched-features";case U.DONE:return"done"}}_gotoFetchCount(e,t){return{type:U.FETCH_COUNT,previous:e,task:(0,V.UT)((async e=>{const s=await(0,V.DZ)(t.fetchCount(this,e));this.state.type===U.FETCH_COUNT&&(this.state=function(e,t){return{type:U.FETCHED_COUNT,featureCount:t,previous:e}}(this.state,s.ok?s.value:1/0))}))}}_gotoFetchFeatures(e,t){return{type:U.FETCH_FEATURES,previous:e,task:(0,V.UT)((async s=>{const i=await(0,V.DZ)(t.fetchFeatures(this,e.featureCount,s));this.state.type===U.FETCH_FEATURES&&(this.state=function(e,t){return{type:U.FETCHED_FEATURES,previous:e,features:t}}(this.state,i.ok?i.value:[]))}))}}_goToDone(e,t){return t.finish(this,e.features),{type:U.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:U.CREATED},e.type){case U.CREATED:case U.FETCHED_COUNT:case U.FETCHED_FEATURES:case U.DONE:break;case U.FETCH_COUNT:case U.FETCH_FEATURES:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,W.VY)(e,Z),(0,W.HY)(this.data.extent,Z))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(U||(U={}));const Z=(0,W.vt)();let K=class extends L.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),s=(0,q.KC)(e,this._mandatoryOutFields);(0,q.aI)(s,t)||(this._set("outFields",s),(0,q.Yy)(s,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new u.U}initialize(){this._initializeFetchExtent(),this._updatingHandles.add((()=>this._configuration),(()=>this.refresh())),this._updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,Y.aI)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),o.OH),this.addHandles((0,o.z7)((()=>!this.suspended),(()=>this._process())))}destroy(){this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const e of this._pendingTiles.values())e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))},s=(0,V.UT)((async e=>{try{await this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),e),this._processPendingTiles()}catch(e){(0,r.QP)(e),l.A.getLogger(this).warn("Failed to apply edits",e)}}));this.addHandles(s),await this._updatingHandles.addPromise(s.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,$.Wo)(this.url))return;const e=(0,V.UT)((async e=>{try{const t=await(0,J.Jf)(this.url,new _.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=k.A.fromJSON(t.data?.extent)}catch(e){(0,r.QP)(e),l.A.getLogger(this).warn("Failed to fetch data extent",e)}}));this._updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const s=this.tilesOfInterest[t],i=this.store.process(s,((e,t)=>this._verifyTileComplexity(e,t)),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<se}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(ie/(s*s))<ne}_ensureFetchAllCounts(e){let t=!0;for(const s of this._pendingTiles.values())s.state.type<U.FETCHED_COUNT&&this._updatingHandles.addPromise(s.process(e)),s.state.type<=U.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new Q(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:te,signal:t})}async _fetchFeatures(e,t,s){let i=0;const n=[];let r=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:h,exceededTransferLimit:u}=await this._queryFeatures(a,s);l&&(i+=a.num),r+=h.length;for(const e of h)n.push(e);if(o=t-r,!l||!u||o<=0)return n}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;if(this.store.featureStore.forEach((n=>{e===n.attributes[t]&&(i=n.objectId??n.attributes[s])})),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,J.IJ)(this.url,e,new G.S({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:te,signal:t});return(0,X.eY)(i)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,J.eW)(this.url,e,s,{query:this._configuration.customParameters,timeout:te,signal:t});return(0,X.q3)(i,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),s=null!=e?.data?this.store.getAttributesForTile(e?.data?.id):null,i=(0,q.KC)((0,q.iv)(this.outFields,s??new Set),this._mandatoryOutFields);return t.outFields=Array.from(i),t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new _.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,W.w1)(e.data.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:n,tileMaxRecordCount:r,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?_.A.MAX_MAX_RECORD_COUNT_FACTOR:1,h=l*((a||n)&&r?r:o||ee);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/h)),e.num=Math.min(s,e.maxRecordCountFactor*h)):e.num=Math.min(s,h),!0}};(0,i._)([(0,a.M)({constructOnly:!0})],K.prototype,"url",void 0),(0,i._)([(0,a.M)({constructOnly:!0})],K.prototype,"objectIdField",void 0),(0,i._)([(0,a.M)({constructOnly:!0})],K.prototype,"globalIdField",void 0),(0,i._)([(0,a.M)({constructOnly:!0})],K.prototype,"capabilities",void 0),(0,i._)([(0,a.M)({constructOnly:!0})],K.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,a.M)({constructOnly:!0})],K.prototype,"spatialReference",void 0),(0,i._)([(0,a.M)({constructOnly:!0})],K.prototype,"store",void 0),(0,i._)([(0,a.M)({readOnly:!0})],K.prototype,"_minimumVerticesPerFeature",null),(0,i._)([(0,a.M)()],K.prototype,"_mandatoryOutFields",null),(0,i._)([(0,a.M)()],K.prototype,"outFields",null),(0,i._)([(0,a.M)()],K.prototype,"suspended",void 0),(0,i._)([(0,a.M)()],K.prototype,"_historicMoment",void 0),(0,i._)([(0,a.M)()],K.prototype,"filter",null),(0,i._)([(0,a.M)()],K.prototype,"customParameters",null),(0,i._)([(0,a.M)({readOnly:!0})],K.prototype,"_configuration",null),(0,i._)([(0,a.M)()],K.prototype,"tileInfo",null),(0,i._)([(0,a.M)()],K.prototype,"tileSize",null),(0,i._)([(0,a.M)()],K.prototype,"tilesOfInterest",void 0),(0,i._)([(0,a.M)({readOnly:!0})],K.prototype,"updating",null),(0,i._)([(0,a.M)({readOnly:!0})],K.prototype,"availability",void 0),(0,i._)([(0,a.M)()],K.prototype,"hasZ",null),K=(0,i._)([(0,h.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],K);const ee=2e3,te=6e5,se=1e6,ie=25,ne=1;var re=s(86805),oe=s(71903),ae=s(6518),le=s(72802);class he{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(null!=t&&(this._byteSize-=t.byteSize),!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[s,i]of this._store){if(this._byteSize<=e)break;this.delete(s),t(i)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let ue=class extends L.A{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*oe.u.MEGABYTES,this._tileBounds=new ae.F,this._tiles=new he,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,W.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const s=this.featureStore.upsertMany(t),i=s.map((e=>new Set(Object.keys(e.attributes)))).reduce(((e,t)=>(0,q.E$)(e,t)),new Set(Object.keys(s[0]?.attributes??[])));this._addTileStorage(e,new Set(s.map((e=>e.objectId))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if(null==e)return 0;const t=(0,re.zd)(e.lengths,4);return 32+(0,re.zd)(e.coords,8)+t}(e.geometry)+(0,re.eY)(e.attributes)}(t)),0)}(s),i),this._tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s,i){const n=e.id;this._tiles.set(n,new ce(e,t,s,i)),this._tileBounds.set(n,e.extent),this._tileFeatureCounts.set(n,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)this._unreferenceFeature(s)===me.REMOVED&&t.push(s);this.featureStore.removeManyById(t);const s=e.data.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){if(!e.length)return;const i=(await t(e,s)).features,{hasZ:n,hasM:r}=this.featureStore;for(const e of i){const t=(0,X.jQ)(this._tmpBoundingRect,e.geometry,n,r);null!=t&&this._tileBounds.forEachInBounds(t,(t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.data.id,s.objectIds.size))}))}}process(e,t=()=>!0,s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,W.HY)((0,W.VY)(this.extent,this._tmpBoundingRect),e.extent))return new pe(e);const i=this.getAttributesForTile(e.id);if((0,q.Yy)(s,i))return new pe(e);const n=this._createTileTree(e,this.tileInfo);return this._simplify(n,t,null,0,1),this._collectMissingTiles(e,n,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map((({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const n=this._tileFeatureCounts.get(e.id);if(null!=n)return n;const r=await(0,J.gW)(t,s,i);return this._tileFeatureCounts.set(e.id,r.data.count),r.data.count}_createTileTree(e,t){const s=new de(e.level,e.row,e.col);return t.updateTileInfo(s,f.A.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,(i=>{const n=this._tiles.get(i)?.data;n&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,n=s?t:e,r=1<<n.level-i.level;return Math.floor(n.row/r)===i.row&&Math.floor(n.col/r)===i.col}(e,n)&&this._populateChildren(s,n,t,this._tileFeatureCounts.get(n.id)||0)})),s}_populateChildren(e,t,s,i){const n=t.level-e.level-1;if(n<0)return void(e.isLeaf=!0);const r=t.row>>n,o=t.col>>n,a=e.row<<1,l=o-(e.col<<1)+(r-a<<1),h=e.children[l];if(null!=h)this._populateChildren(h,t,s,i);else{const n=new de(e.level+1,r,o);s.updateTileInfo(n,f.A.ExtrapolateOptions.POWER_OF_TWO),e.children[l]=n,this._populateChildren(n,t,s,i)}}_simplify(e,t,s,i,n){const r=n*n;if(e.isLeaf)return t(this.getFeatureCount(e),n)?0:(this._remove(e),null!=s&&(s.children[i]=null),r);const o=n/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/r<_e&&(this._purge(e),null!=s&&(s.children[i]=null),l=r),l}_mergeChildren(e){const t=new Set;let s,i=0;this._forEachLeaf(e,(e=>{const n=this._tiles.get(e.id);if(n){s=s?(0,q.E$)(s,n.attributeKeys):new Set(n.attributeKeys),i+=n.byteSize;for(const e of n.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,i,s??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const n=new fe(s,e,this.extent);return this._collectMissingTilesRecurse(t,n,1,i),n.info}_collectMissingTilesRecurse(e,t,s,i){const n=this.getAttributesForTile(e.id),r=n&&!(0,q.Yy)(i,n);if(r&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,s));const o=s/2;for(let s=0;s<e.children.length;s++){const n=e.children[s];null==n?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),o):this._collectMissingTilesRecurse(n,t,o,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?me.ADDED:me.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),me.REMOVED):(t>0&&this._refCounts.set(e,t),me.UNCHANGED)}get test(){}};(0,i._)([(0,a.M)({constructOnly:!0})],ue.prototype,"featureStore",void 0),(0,i._)([(0,a.M)()],ue.prototype,"tileInfo",void 0),(0,i._)([(0,a.M)()],ue.prototype,"extent",void 0),(0,i._)([(0,a.M)()],ue.prototype,"maximumByteSize",void 0),ue=(0,i._)([(0,h.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],ue);class ce{constructor(e,t,s,i){this.data=e,this.objectIds=t,this.byteSize=s,this.attributeKeys=i}}class de{constructor(e,t,s){this.level=e,this.row=t,this.col=s,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class pe{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,W.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class fe{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new pe(t),null!=s&&(this._extent=(0,W.VY)(s))}addMissing(e,t,s,i){const n=new le.U(null,e,t,s);this._tileInfo.updateTileInfo(n,f.A.ExtrapolateOptions.POWER_OF_TWO),null==n.extent||null!=this._extent&&!(0,W.HY)(this._extent,n.extent)||(this.info.missingTiles.push({data:n,resolution:i}),this.info.coveredArea-=(0,W.Wc)(n.extent))}}const _e=.18751;var me;!function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.UNCHANGED=2]="UNCHANGED"}(me||(me={}));var ge=s(65864);let ye=class extends n.A.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,r.Tw)(),this._elevationAligner=x(),this._elevationFilter=A(),this._symbologyCandidatesFetcher=H(),this._updatingHandles=new u.U,this._alignPointsInFeatures=async(e,t)=>{const s={query:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,r.Te)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,r.Te)(t),i}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fieldsIndex:n}=e.serviceInfo,{hasZ:r}=e,a=c.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new d.A({...e.serviceInfo,hasZ:r,hasM:!1}),this._queryEngine=new p.d({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:n,hasZ:r,hasM:!1,objectIdField:s,timeInfo:i}),this._featureFetcher=new K({store:new ue({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:c.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=x(l,{elevationInfo:null!=e.elevationInfo?m.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=A(l),this.addHandles([(0,o.wB)((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),o.OH),(0,o.wB)((()=>this.updating),(()=>this._notifyUpdating()))]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),we}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.suspended=e,we}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.outFields=new Set(e??[]),we}async fetchCandidates(e,t){await this._whenSetup.promise,(0,r.Te)(t);const s=function(e){if(!e.filter)return{...e,query:{where:"1=1"}};const{distance:t,units:s,spatialRel:i,where:n,timeExtent:r,objectIds:o}=e.filter,a={geometry:e.filter.geometry?(0,ge.rS)(e.filter.geometry):void 0,distance:t,units:s,spatialRel:i,timeExtent:r,objectIds:o,where:n??"1=1"};return{...e,query:a}}(e),i=t?.signal,n=await this._queryEngine.executeQueryForSnapping(s,i);(0,r.Te)(i);const o=await this._elevationAligner.alignCandidates(n.candidates,c.A.fromJSON(e.point.spatialReference)??c.A.WGS84,i);(0,r.Te)(i);const a=await this._symbologyCandidatesFetcher.fetch(o,i);(0,r.Te)(i);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?f.A.fromJSON(e.tileInfo):null,we}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.refresh(),we}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),await(0,o.C_)((()=>!this.updating),t),(0,r.Te)(t),we}async getDebugInfo(e,t){return(0,r.Te)(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),(0,r.Te)(t),we}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),we}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),we}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),we}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=H(e,this._getSymbologyCandidates),we}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?_.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i._)([(0,a.M)({readOnly:!0})],ye.prototype,"updating",null),(0,i._)([(0,a.M)()],ye.prototype,"_isInitializing",void 0),ye=(0,i._)([(0,h.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],ye);const ve=ye,we={result:{}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6493,7136],{39516:(e,t,n)=>{async function r(e,t){const{WhereClause:r}=await Promise.all([n.e(835),n.e(4800)]).then(n.bind(n,50835));return r.create(e,{fieldsIndex:t})}function o(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}n.d(t,{G:()=>r,m:()=>o})},17136:(e,t,n)=>{n.d(t,{el:()=>A});var r=n(92602),o=n(49186),s=n(53966),i=n(39829),l=n(82799),a=n(80754),p=n(21325),u=n(28735),c=(n(59456),n(78888)),y=n(65864),h=n(2272),f=n(84952),d=n(92300);const m=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function v(e){return"polyline"===e[0].type}function w(e,t,n){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof i.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m().error(e),new o.A(e)}const n=(0,a.r8)(e),r=[];for(const e of n){const n=[];r.push(n),n.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const o=e[r][0],s=e[r][1],i=e[r+1][0],l=e[r+1][1],a=Math.sqrt((i-o)*(i-o)+(l-s)*(l-s)),p=(l-s)/a,u=(i-o)/a,c=a/t;if(c>1){for(let e=1;e<=c-1;e++){const r=e*t,i=u*r+o,l=p*r+s;n.push([i,l])}const e=(a+Math.floor(c-1)*t)/2,r=u*e+o,i=p*e+s;n.push([r,i])}n.push([i,l])}}return function(e){return"polygon"===e.type}(e)?new i.A({rings:r,spatialReference:e.spatialReference}):new l.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.ci)(t,!0)}return n&&(e=(0,a.kS)(e,n)),e}function x(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,a.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,a.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,a.kd)(r,t);e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=(0,a.kd)(r,n);e=e.clone().offset(t*(-2*n),0)}}return e}function _(e,t){let n=-1;for(let r=0;r<t.cutIndexes.length;r++){const o=t.cutIndexes[r],s=t.geometries[r],i=(0,a.r8)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const r=t[e][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*(0,a.kd)(n,180);for(let n=0;n<t.length;n++){const t=s.getPoint(e,n);s.setPoint(e,n,t.clone().offset(r,0))}return!0}}))}if(o===n){if(g(e))for(const t of(0,a.r8)(s))e[o]=e[o].addRing(t);else if(v(e))for(const t of(0,a.r8)(s))e[o]=e[o].addPath(t)}else n=o,e[o]=s}return e}async function A(e,t,n){if(!Array.isArray(e))return A([e],t);t&&"string"!=typeof t&&m().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let s,g,v,M,b,R,S,N,j=0;const T=[],V=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,g=(0,p.Vp)(s),v=s.isWebMercator,R=v?102100:4326,M=a.j7[R].maxX,b=a.j7[R].minX,S=a.j7[R].plus180Line,N=a.j7[R].minus180Line),g)if("mesh"===t.type)V.push(t);else if("point"===t.type)V.push(x(t.clone(),M,b));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>x(e,M,b))),V.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);V.push(e.rings?new i.A(e):e)}else if(t.extent){const e=t.extent,n=(0,a.kd)(e.xmin,b)*(2*M);let r=0===n?t.clone():(0,a.kS)(t.clone(),n);e.offset(n,0);let{xmin:o,xmax:s}=e;o=Number(o.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(S)&&s!==M?(j=s>j?s:j,r=w(r,v),T.push(r),V.push("cut")):e.intersects(N)&&o!==b?(j=s*(2*M)>j?s*(2*M):j,r=w(r,v,360),T.push(r),V.push("cut")):V.push(r)}else V.push(t.clone());else V.push(t);else V.push(t);let O=(0,a.kd)(j,M),J=-90;const $=O,G=new l.A;for(;O>0;){const e=360*O-180;G.addPath([[e,J],[e,-1*J]]),J*=-1,O--}if(T.length>0&&$>0){const t=_(T,await async function(e,t,n,r){const o=(0,h.Dl)(e),s=t[0].spatialReference,i={...r,responseType:"json",query:{...o.query,f:"json",sr:(0,p.YX)(s),target:JSON.stringify({geometryType:(0,y.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},l=await(0,c.A)(o.path+"/cut",i),{cutIndexes:a,geometries:u=[]}=l.data;return{cutIndexes:a,geometries:u.map((e=>{const t=(0,y.rS)(e);return t.spatialReference=s,t}))}}(o,T,G,n)),r=[],s=[];for(let n=0;n<V.length;n++){const o=V[n];if("cut"!==o)s.push(o);else{const o=t.shift(),i=e[n];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&o.rings.length>=i.rings.length?(r.push(o),s.push("simplify")):s.push(v?(0,u.Gh)(o):o)}}if(!r.length)return s;const i=await async function(e,t,n){const r="string"==typeof e?(0,f.An)(e):e,o=t[0].spatialReference,s=(0,y.$B)(t[0]),i={...n,query:{...r.query,f:"json",sr:(0,p.YX)(o),geometries:JSON.stringify((0,d.X)(t))}},{data:l}=await(0,c.A)(r.path+"/simplify",i);return(0,d.V)(l.geometries,s,o)}(o,r,n),l=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?l.push(t):l.push(v?(0,u.Gh)(i.shift()):i.shift())}return l}const z=[];for(let e=0;e<V.length;e++){const t=V[e];if("cut"!==t)z.push(t);else{const e=T.shift();z.push(!0===v?(0,u.Gh)(e):e)}}return z}},80754:(e,t,n)=>{n.d(t,{j7:()=>i,kS:()=>a,kd:()=>l,r8:()=>p});var r=n(82799),o=n(16930),s=n(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const n=p(e);for(const e of n)for(const n of e)n[0]+=t;return e}function p(e){return(0,s.Bi)(e)?e.rings:e.paths}},94194:(e,t,n)=>{n.d(t,{A:()=>x});var r=n(90237),o=n(10107),s=(n(44208),n(53966),n(87811),n(40608)),i=n(5503),l=n(62885);let a=class extends i.A{constructor(e){super(e),this.addHandles([this.on("before-add",(e=>{null==e.item&&e.preventDefault()})),this.on("after-add",(e=>this._own(e.item))),this.on("after-remove",(e=>this._release(e.item)))])}get owner(){return this._get("owner")}set owner(e){e!==this._get("owner")&&(this._releaseAll(),this._set("owner",e),this._ownAll())}_ownAll(){for(const e of this.items)this._own(e)}_releaseAll(){for(const e of this.items)this._release(e)}_createNewInstance(e){return this.itemType?new(i.A.ofType(this.itemType.Type))(e):new i.A(e)}};(0,r._)([(0,o.M)()],a.prototype,"owner",null),a=(0,r._)([(0,s.$)("esri.core.support.OwningCollection")],a);var p=n(4146),u=n(63074),c=n(25036),y=n(52106),h=n(56507),f=(n(49186),n(7695));let d=class extends a{_own(e){e.layer&&"remove"in e.layer&&e.layer!==this.owner&&e.layer.remove(e),e.layer=this.owner}_release(e){e.layer===this.owner&&(e.layer=null)}};(0,r._)([(0,f.u)({Type:y.A,ensureType:(0,h.dp)(y.A)})],d.prototype,"itemType",void 0),d=(0,r._)([(0,s.$)("esri.support.GraphicsCollection")],d);var m=n(88625);let g=class extends((0,u.dM)((0,c.j)(p.A))){constructor(e){super(e),this.elevationInfo=null,this.graphics=new d,this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}on(e,t){return super.on(e,t)}graphicChanged(e){this.emit("graphic-update",e)}};var v,w;(0,r._)([(0,o.M)({type:m.A})],g.prototype,"elevationInfo",void 0),(0,r._)([(0,o.M)((v=d,w="graphics",{type:v,cast:l.H,set(e){const t=(0,l.V)(e,this._get(w),v);t.owner=this,this._set(w,t)}}))],g.prototype,"graphics",void 0),(0,r._)([(0,o.M)({type:["show","hide"]})],g.prototype,"listMode",void 0),(0,r._)([(0,o.M)()],g.prototype,"screenSizePerspectiveEnabled",void 0),(0,r._)([(0,o.M)({readOnly:!0})],g.prototype,"type",void 0),(0,r._)([(0,o.M)({constructOnly:!0})],g.prototype,"internal",void 0),g=(0,r._)([(0,s.$)("esri.layers.GraphicsLayer")],g);const x=g},20437:(e,t,n)=>{n.d(t,{A:()=>m});var r,o=n(90237),s=n(66552),i=n(25482),l=n(10107),a=n(56507),p=(n(87811),n(44208),n(93223)),u=n(36005),c=n(40608),y=n(72088),h=n(98453);const f=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let d=r=class extends i.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?f.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,l.M)({type:String,json:{write:!0}})],d.prototype,"alias",void 0),(0,o._)([(0,l.M)({type:[String,Number],json:{write:{allowNull:!0}}})],d.prototype,"defaultValue",void 0),(0,o._)([(0,l.M)()],d.prototype,"description",void 0),(0,o._)([(0,u.w)("description")],d.prototype,"readDescription",null),(0,o._)([(0,l.M)({types:y.gK,json:{read:{reader:y.rS},write:!0}})],d.prototype,"domain",void 0),(0,o._)([(0,l.M)({type:Boolean,json:{write:!0}})],d.prototype,"editable",void 0),(0,o._)([(0,l.M)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],d.prototype,"length",void 0),(0,o._)([(0,l.M)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,o._)([(0,l.M)({type:Boolean,json:{write:!0}})],d.prototype,"nullable",void 0),(0,o._)([(0,p.e)(h.m)],d.prototype,"type",void 0),(0,o._)([(0,l.M)()],d.prototype,"valueType",void 0),(0,o._)([(0,u.w)("valueType",["description"])],d.prototype,"readValueType",null),(0,o._)([(0,l.M)({type:Boolean,json:{read:!1}})],d.prototype,"visible",void 0),d=r=(0,o._)([(0,c.$)("esri.layers.support.Field")],d);const m=d},72088:(e,t,n)=>{n.d(t,{rS:()=>b,gK:()=>M}),n(44208);var r,o=n(90237),s=n(4718),i=n(10107),l=(n(53966),n(93223)),a=n(40608),p=n(25482);n(87811);let u=r=class extends p.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,o._)([(0,i.M)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,o._)([(0,i.M)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=r=(0,o._)([(0,a.$)("esri.layers.support.CodedValue")],u);const c=new(n(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let y=class extends p.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,i.M)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,o._)([(0,l.e)(c)],y.prototype,"type",void 0),y=(0,o._)([(0,a.$)("esri.layers.support.Domain")],y);const h=y;var f;let d=f=class extends h{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,o._)([(0,i.M)({type:[u],json:{write:!0}})],d.prototype,"codedValues",void 0),(0,o._)([(0,l.e)({codedValue:"coded-value"})],d.prototype,"type",void 0),d=f=(0,o._)([(0,a.$)("esri.layers.support.CodedValueDomain")],d);const m=d;var g;n(49186);let v=g=class extends h{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,o._)([(0,l.e)({inherited:"inherited"})],v.prototype,"type",void 0),v=g=(0,o._)([(0,a.$)("esri.layers.support.InheritedDomain")],v);const w=v;var x;let _=x=class extends h{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new x({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,i.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],_.prototype,"maxValue",void 0),(0,o._)([(0,i.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],_.prototype,"minValue",void 0),(0,o._)([(0,l.e)({range:"range"})],_.prototype,"type",void 0),_=x=(0,o._)([(0,a.$)("esri.layers.support.RangeDomain")],_);const A=_,M={key:"type",base:h,typeMap:{range:_,"coded-value":m,inherited:w}};function b(e){if(!e?.type)return null;switch(e.type){case"range":return A.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},32730:(e,t,n)=>{n.d(t,{BI:()=>m,D3:()=>f,XJ:()=>d,lc:()=>h,mX:()=>v,rU:()=>g,tH:()=>M});var r=n(799);const o="__begin__",s="__end__",i=new RegExp(o,"ig"),l=new RegExp(s,"ig"),a=new RegExp("^"+o,"i"),p=new RegExp(s+"$","i"),u='"',c=u+" + ",y=" + "+u;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function f(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function d(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function m(e){const t=d(e);if(!t)return null;switch(t.type){case"conventional":return v(t.expression);case"arcade":return t.expression}return null}function g(e){const t=d(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return M(t.expression)}return null}function v(e){let t;return e?(t=(0,r.HC)(e,(e=>o+'$feature["'+e+'"]'+s)),t=a.test(t)?t.replace(a,""):u+t,t=p.test(t)?t.replace(p,""):t+u,t=t.replaceAll(i,c).replaceAll(l,y)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,x=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,A=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function M(e){if(!e)return null;let t=x.exec(e)||_.exec(e);return t?t[1]||t[3]:(t=A.exec(e),t?t[2]:null)}},92300:(e,t,n)=>{n.d(t,{V:()=>s,X:()=>o});var r=n(65864);function o(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function s(e,t,n){const o=(0,r.xD)(t);return e.map((e=>{const t=o.fromJSON(e);return t.spatialReference=n,t}))}},22671:(e,t,n)=>{n.d(t,{A:()=>w});var r,o=n(90237),s=n(59456),i=n(52106),l=n(66552),a=n(25482),p=n(4718),u=n(10107),c=(n(44208),n(53966),n(36005)),y=n(40608),h=n(43937),f=n(16930),d=n(65864),m=n(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=r=class extends a.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const n=f.A.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=i.A.fromJSON(o),l=o.geometry?.spatialReference;null==s.geometry||l||(s.geometry.spatialReference=n);const a=o.aggregateGeometries,p=s.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[e],r=a[e],o=r?.spatialReference;null==t||o||(t.spatialReference=n)}r.push(s)}return r}writeGeometryType(e,t,n,r){if(e)return void g.write(e,t,n,r);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,n,r)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,r=(0,d.rS)(e);return r&&!n&&t.spatialReference&&(r.spatialReference=f.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,p.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let n=0;n<t.features.length;n++){const r=t.features[n];if(r.geometry){const t=e?.[n];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,n],translate:[r,o]}=e,s=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/n)));for(let e=0,t=s.length;e<t;e++)i?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[r,o],scale:[s,i]}=n;let l=null,a=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;l=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;a=n=>null==n?n:n*t+e}const p=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*i),l,a);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,n){let r,o;const s=[];for(let i=0,l=e.length;i<l;i++){const l=e[i];if(i>0){const e=t(l[0]),i=n(l[1]);e===r&&i===o||(s.push([e-r,i-o]),r=e,o=i)}else r=t(l[0]),o=n(l[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,d.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],i=this._quantizePoints(s,t,n);i&&o.push(i)}return o.length>0?((0,d.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,n);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,d.Bi)(e)?e.rings:e.paths;let i,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(i+=o[0],l+=o[1]):(i=o[0],l=o[1]),o[0]=t(i),o[1]=n(l)}}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2]),n[3]=o(n[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=o(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let i,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(i+=r[0],l+=r[1]):(i=r[0],l=r[1]),r[0]=t(i),r[1]=n(l)}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,u.M)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,u.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,u.M)({type:[i.A],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,c.w)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,u.M)({type:[m.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,u.M)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,h.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,u.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,u.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,u.M)({types:s.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,c.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,u.M)({type:f.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,h.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,u.M)({json:{write:!0}})],v.prototype,"transform",void 0),v=r=(0,o._)([(0,y.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const w=v},2272:(e,t,n)=>{n.d(t,{Dl:()=>i,jV:()=>s,lF:()=>l}),n(92602),n(70333);var r=n(4718),o=n(84952);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function l(e,t,n){const r={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))r[o]=s.map((e=>l(e)));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(n?.[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}n(926)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4174,9377,3069],{39516:(e,t,r)=>{async function i(e,t){const{WhereClause:i}=await Promise.all([r.e(835),r.e(4800)]).then(r.bind(r,50835));return i.create(e,{fieldsIndex:t})}function s(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>i,m:()=>s})},3330:(e,t,r)=>{r.d(t,{GB:()=>s,Qo:()=>o,Y4:()=>n});var i=r(96285);class s{}function n(e){return e instanceof i.bo?e===s.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return n(e)?s.instance:e}s.instance=new i.oh("Etc/UTC")},13069:(e,t,r)=>{r.d(t,{lk:()=>s,vD:()=>o,yS:()=>n});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${s().toUpperCase()}}`}function o(){return`{${s()}}`}},70328:(e,t,r)=>{r.d(t,{BI:()=>w,Ej:()=>h,Hq:()=>u,Ie:()=>F,Jt:()=>_,Ne:()=>f,RF:()=>a,_F:()=>y,aI:()=>x,fA:()=>n,gX:()=>m,hZ:()=>v,iT:()=>l,is:()=>S,qv:()=>M,vI:()=>g,v_:()=>T,vt:()=>s,w1:()=>o});var i=r(5443);function s(e=T){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,i,n,o,a=s()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=n,a[5]=o,a}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,i=t.length/3){let s=e[0],n=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)s=Math.min(s,t[r+3*e]),n=Math.min(n,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=s,e[1]=n,e[2]=o,e[3]=a,e[4]=l,e[5]=u}function p(e){return e[0]>=e[3]?0:e[3]-e[0]}function d(e){return e[1]>=e[4]?0:e[4]-e[1]}function c(e){return e[2]>=e[5]?0:e[5]-e[2]}function y(e){const t=p(e),r=c(e),i=d(e);return Math.sqrt(t*t+r*r+i*i)}function m(e,t=[0,0,0]){return t[0]=e[0]+p(e)/2,t[1]=e[1]+d(e)/2,t[2]=e[2]+c(e)/2,t}function h(e,t=[0,0,0]){return t[0]=p(e),t[1]=d(e),t[2]=c(e),t}function f(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function g(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function v(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function F(e){return e?v(e,M):s(M)}function _(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function w(e,t,r,i,s){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function S(e){return 6===e.length}function x(e,t,r){if(null==e||null==t)return e===t;if(!S(e)||!S(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const M=[1/0,1/0,1/0,-1/0,-1/0,-1/0],T=[0,0,0,0,0,0];s()},72256:(e,t,r)=>{r.r(t),r.d(t,{default:()=>x});var i=r(90237),s=(r(59456),r(49186)),n=r(74887),o=r(84952),a=r(10107),l=r(44208),u=(r(53966),r(87811),r(36005)),p=r(40608),d=r(13600),c=r(92474),y=r(29953),m=r(22671),h=r(5443);let f=class extends c.A{constructor(e){super(e),this.type="csv",this.refresh=(0,n.sg)((async e=>{await this.load();const{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return t&&(this.sourceJSON.extent=t),r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return m.A.fromJSON(r)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._connection.invoke("queryFeatures",e?e.toJSON():null,t)}async queryFeatureCount(e,t={}){return await this.load(t),this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)}async queryObjectIds(e,t={}){return await this.load(t),this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)}async queryExtent(e,t={}){await this.load(t);const r=await this._connection.invoke("queryExtent",e?e.toJSON():null,t);return{count:r.count,extent:h.A.fromJSON(r.extent)}}async querySnapping(e,t={}){return await this.load(t),this._connection.invoke("querySnapping",e,t)}async _startWorker(e){this._connection=await(0,y.ho)("CSVSourceWorker",{strategy:(0,l.A)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{url:t,delimiter:r,fields:i,latitudeField:s,longitudeField:n,spatialReference:o,timeInfo:a}=this.loadOptions,u=await this._connection.invoke("load",{url:t,customParameters:this.customParameters,parsingOptions:{delimiter:r,fields:i?.map((e=>e.toJSON())),latitudeField:s,longitudeField:n,spatialReference:o?.toJSON(),timeInfo:a?.toJSON()}},{signal:e});this.locationInfo=u.locationInfo,this.sourceJSON=u.layerDefinition,this.delimiter=u.delimiter}};(0,i._)([(0,a.M)()],f.prototype,"type",void 0),(0,i._)([(0,a.M)()],f.prototype,"loadOptions",void 0),(0,i._)([(0,a.M)()],f.prototype,"customParameters",void 0),(0,i._)([(0,a.M)()],f.prototype,"locationInfo",void 0),(0,i._)([(0,a.M)()],f.prototype,"sourceJSON",void 0),(0,i._)([(0,a.M)()],f.prototype,"delimiter",void 0),f=(0,i._)([(0,p.$)("esri.layers.graphics.sources.CSVSource")],f);var g=r(64714),v=r(61956),F=r(97159),_=r(16930);function w(e,t){throw new s.A(t,`CSVLayer (title: ${e.title}, id: ${e.id}) cannot be saved to a portal item`)}let S=class extends d.default{constructor(...e){super(...e),this.geometryType="point",this.capabilities=(0,g.f)(!1,!1),this.delimiter=null,this.editingEnabled=!1,this.fields=null,this.latitudeField=null,this.locationType="coordinates",this.longitudeField=null,this.operationalLayerType="CSV",this.outFields=["*"],this.path=null,this.spatialReference=_.A.WGS84,this.source=null,this.type="csv"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["CSV"],supportsData:!1},e).catch(n.QP).then((async()=>this.initLayerProperties(await this.createGraphicsSource(t))));return this.addResolvingPromise(r),Promise.resolve(this)}get isTable(){return this.loaded&&null==this.geometryType}readWebMapLabelsVisible(e,t){return null!=t.showLabels?t.showLabels:!!t.layerDefinition?.drawingInfo?.labelingInfo}set url(e){if(!e)return void this._set("url",e);const t=(0,o.An)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async createGraphicsSource(e){const t=new f({loadOptions:{delimiter:this.delimiter,fields:this.fields,latitudeField:this.latitudeField??void 0,longitudeField:this.longitudeField??void 0,spatialReference:this.spatialReference??void 0,timeInfo:this.timeInfo??void 0,url:this.url},customParameters:this.customParameters??void 0});return this._set("source",t),await t.load({signal:e}),this.read({locationInfo:t.locationInfo,columnDelimiter:t.delimiter},{origin:"service",url:this.parsedUrl}),t}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(v.A.from(e)||this.createQuery()))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(v.A.from(e)||this.createQuery())))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(v.A.from(e)||this.createQuery())))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(v.A.from(e)||this.createQuery())))}read(e,t){super.read(e,t),t&&"service"===t.origin&&this.revert(["latitudeField","longitudeField"],"service")}write(e,t){return super.write(e,{...t,writeLayerSchema:!0})}clone(){throw new s.A("csv-layer:clone",`CSVLayer (title: ${this.title}, id: ${this.id}) cannot be cloned`)}async save(e){return w(this,"csv-layer:save")}async saveAs(e,t){return w(this,"csv-layer:save-as")}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}_verifyFields(){}_verifySource(){}_hasMemorySource(){return!1}};(0,i._)([(0,a.M)({readOnly:!0,json:{read:!1,write:!1}})],S.prototype,"capabilities",void 0),(0,i._)([(0,a.M)({type:[","," ",";","|","\t"],json:{read:{source:"columnDelimiter"},write:{target:"columnDelimiter",ignoreOrigin:!0}}})],S.prototype,"delimiter",void 0),(0,i._)([(0,a.M)({readOnly:!0,type:Boolean,json:{origins:{"web-scene":{read:!1,write:!1}}}})],S.prototype,"editingEnabled",void 0),(0,i._)([(0,a.M)({json:{read:{source:"layerDefinition.fields"},write:{target:"layerDefinition.fields"}}})],S.prototype,"fields",void 0),(0,i._)([(0,a.M)({type:Boolean,readOnly:!0})],S.prototype,"isTable",null),(0,i._)([(0,u.w)("web-map","labelsVisible",["layerDefinition.drawingInfo.labelingInfo","showLabels"])],S.prototype,"readWebMapLabelsVisible",null),(0,i._)([(0,a.M)({type:String,json:{read:{source:"locationInfo.latitudeFieldName"},write:{target:"locationInfo.latitudeFieldName",ignoreOrigin:!0}}})],S.prototype,"latitudeField",void 0),(0,i._)([(0,a.M)({type:["show","hide"]})],S.prototype,"listMode",void 0),(0,i._)([(0,a.M)({type:["coordinates"],json:{read:{source:"locationInfo.locationType"},write:{target:"locationInfo.locationType",ignoreOrigin:!0,isRequired:!0}}})],S.prototype,"locationType",void 0),(0,i._)([(0,a.M)({type:String,json:{read:{source:"locationInfo.longitudeFieldName"},write:{target:"locationInfo.longitudeFieldName",ignoreOrigin:!0}}})],S.prototype,"longitudeField",void 0),(0,i._)([(0,a.M)({type:["CSV"]})],S.prototype,"operationalLayerType",void 0),(0,i._)([(0,a.M)()],S.prototype,"outFields",void 0),(0,i._)([(0,a.M)({type:String,json:{origins:{"web-scene":{read:!1,write:!1}},read:!1,write:!1}})],S.prototype,"path",void 0),(0,i._)([(0,a.M)({json:{read:!1},cast:null,type:f,readOnly:!0})],S.prototype,"source",void 0),(0,i._)([(0,a.M)({json:{read:!1},value:"csv",readOnly:!0})],S.prototype,"type",void 0),(0,i._)([(0,a.M)({json:{read:F.r,write:{isRequired:!0,ignoreOrigin:!0,writer:F.w}}})],S.prototype,"url",null),S=(0,i._)([(0,p.$)("esri.layers.CSVLayer")],S);const x=S},99352:(e,t,r)=>{r.d(t,{F:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},64714:(e,t,r)=>{r.d(t,{F0:()=>l,Vx:()=>d,e2:()=>y,f:()=>m});var i=r(44208),s=r(4718),n=r(99352),o=r(4071),a=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function d(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${c(t)} = null;`;for(const t in e)r+=`this${c(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch(r){return()=>({[t]:null,...e})}}function c(e){return u.test(e)?`.${e}`:`["${e}"]`}function y(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.o8)(e)}}]}function m(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},33143:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),s=r(69540),n=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(72088),d=r(29005);let c=class extends((0,s.O)(n.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,o.M)({json:{write:!0}})],c.prototype,"id",void 0),(0,i._)([(0,o.M)({json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,o.M)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i._)([(0,a.w)("domains")],c.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],c.prototype,"writeDomains",null),(0,i._)([(0,o.M)({type:[d.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i._)([(0,l.$)("esri.layers.support.FeatureType")],c);const y=c},20437:(e,t,r)=>{r.d(t,{A:()=>f});var i,s=r(90237),n=r(66552),o=r(25482),a=r(10107),l=r(56507),u=(r(87811),r(44208),r(93223)),p=r(36005),d=r(40608),c=r(72088),y=r(98453);const m=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=i=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?m.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,s._)([(0,a.M)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,s._)([(0,a.M)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,s._)([(0,a.M)()],h.prototype,"description",void 0),(0,s._)([(0,p.w)("description")],h.prototype,"readDescription",null),(0,s._)([(0,a.M)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],h.prototype,"domain",void 0),(0,s._)([(0,a.M)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,s._)([(0,a.M)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],h.prototype,"length",void 0),(0,s._)([(0,a.M)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,s._)([(0,a.M)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,s._)([(0,u.e)(y.m)],h.prototype,"type",void 0),(0,s._)([(0,a.M)()],h.prototype,"valueType",void 0),(0,s._)([(0,p.w)("valueType",["description"])],h.prototype,"readValueType",null),(0,s._)([(0,a.M)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=i=(0,s._)([(0,d.$)("esri.layers.support.Field")],h);const f=h},95466:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(49186),s=r(25482),n=r(53966),o=r(91869),a=r(3330),l=r(30524),u=r(56400),p=r(96285);const d=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],f(e))}static fromLayerJSON(e){return new c(e.fields??[],f(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=m(t);if(t&&i){const s=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(i,e),r.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):h.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?p.mQ.utcInstance:(0,o.tE)(d,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,s.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function m(e){return(0,l.rS)(e)?.toLowerCase()??""}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:s}=e,n=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.dateFieldsTimeReference?(0,u.ZS)(s.dateFieldsTimeReference):a??u.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,u.ZS)(i.timeReference):a:null,d=new Map([[y(s?.creationDateField??""),l],[y(s?.editDateField??""),l],[y(n),p],[y(o),p]]);for(const{name:i,type:s}of e.fields)if(h.has(s))t.set(i,u.L5);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=d.get(y(i??""))??a;t.set(i,e)}return t}},4071:(e,t,r)=>{r.d(t,{$:()=>i,P:()=>s});const i={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},s={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:i,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},72088:(e,t,r)=>{r.d(t,{rS:()=>M,gK:()=>x}),r(44208);var i,s=r(90237),n=r(4718),o=r(10107),a=(r(53966),r(93223)),l=r(40608),u=r(25482);r(87811);let p=i=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,s._)([(0,o.M)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,s._)([(0,o.M)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=i=(0,s._)([(0,l.$)("esri.layers.support.CodedValue")],p);const d=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,s._)([(0,o.M)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,a.e)(d)],c.prototype,"type",void 0),c=(0,s._)([(0,l.$)("esri.layers.support.Domain")],c);const y=c;var m;let h=m=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new m({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,s._)([(0,o.M)({type:[p],json:{write:!0}})],h.prototype,"codedValues",void 0),(0,s._)([(0,a.e)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=m=(0,s._)([(0,l.$)("esri.layers.support.CodedValueDomain")],h);const f=h;var g;r(49186);let v=g=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,s._)([(0,a.e)({inherited:"inherited"})],v.prototype,"type",void 0),v=g=(0,s._)([(0,l.$)("esri.layers.support.InheritedDomain")],v);const F=v;var _;let w=_=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new _({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,s._)([(0,o.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,s._)([(0,o.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,s._)([(0,a.e)({range:"range"})],w.prototype,"type",void 0),w=_=(0,s._)([(0,l.$)("esri.layers.support.RangeDomain")],w);const S=w,x={key:"type",base:y,typeMap:{range:w,"coded-value":f,inherited:F}};function M(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return F.fromJSON(e)}return null}},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},32730:(e,t,r)=>{r.d(t,{BI:()=>f,D3:()=>m,XJ:()=>h,lc:()=>y,mX:()=>v,rU:()=>g,tH:()=>x});var i=r(799);const s="__begin__",n="__end__",o=new RegExp(s,"ig"),a=new RegExp(n,"ig"),l=new RegExp("^"+s,"i"),u=new RegExp(n+"$","i"),p='"',d=p+" + ",c=" + "+p;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function m(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function h(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function f(e){const t=h(e);if(!t)return null;switch(t.type){case"conventional":return v(t.expression);case"arcade":return t.expression}return null}function g(e){const t=h(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(F);return t?.[1].trim()||null}(t.expression);case"arcade":return x(t.expression)}return null}function v(e){let t;return e?(t=(0,i.HC)(e,(e=>s+'$feature["'+e+'"]'+n)),t=l.test(t)?t.replace(l,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(o,d).replaceAll(a,c)):t='""',t}const F=/^\s*\{([^}]+)\}\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,S=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function x(e){if(!e)return null;let t=_.exec(e)||w.exec(e);return t?t[1]||t[3]:(t=S.exec(e),t?t[2]:null)}},58501:(e,t,r)=>{r.d(t,{q:()=>s});var i=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},22671:(e,t,r)=>{r.d(t,{A:()=>F});var i,s=r(90237),n=r(59456),o=r(52106),a=r(66552),l=r(25482),u=r(4718),p=r(10107),d=(r(44208),r(53966),r(36005)),c=r(40608),y=r(43937),m=r(16930),h=r(65864),f=r(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=m.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],n=o.A.fromJSON(s),a=s.geometry?.spatialReference;null==n.geometry||a||(n.geometry.spatialReference=r);const l=s.aggregateGeometries,u=n.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}i.push(n)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,h.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=m.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[n,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+i),(e=>s-e*o),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const n=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===i&&o===s||(n.push([e-i,o-s]),i=e,s=o)}else i=t(a[0]),s=r(a[1]),n.push([i,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,h.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],o=this._quantizePoints(n,t,r);o&&s.push(o)}return s.length>0?((0,h.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,h.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,i=n.length;e<i;e++){const i=n[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(o+=s[0],a+=s[1]):(o=s[0],a=s[1]),s[0]=t(o),s[1]=r(a)}}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,a;for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,p.M)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,s._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,p.M)({type:[o.A],json:{write:!0}})],v.prototype,"features",void 0),(0,s._)([(0,d.w)("features")],v.prototype,"readFeatures",null),(0,s._)([(0,p.M)({type:[f.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,s._)([(0,p.M)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,s._)([(0,y.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,s._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,s._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,s._)([(0,p.M)({types:n.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,s._)([(0,d.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,s._)([(0,p.M)({type:m.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,s._)([(0,y.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,s._)([(0,p.M)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,s._)([(0,c.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const F=v}}]);