@arcgis/core 4.28.6 → 4.28.8

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 (60) hide show
  1. package/README.md +15 -25
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0c08d59c5d65921ba5ae.js +1 -0
  4. package/assets/esri/core/workers/chunks/0dbf3fa096d02d83b222.js +1 -0
  5. package/assets/esri/core/workers/chunks/16453ca31cc3e09fde46.js +1 -0
  6. package/assets/esri/core/workers/chunks/{1da721608993783dc9cf.js → 24d04cca452ba2fec5d4.js} +1 -1
  7. package/assets/esri/core/workers/chunks/2c121541cde5c24b1fbe.js +1 -0
  8. package/assets/esri/core/workers/chunks/2efd2496f7310142f928.js +1 -0
  9. package/assets/esri/core/workers/chunks/42880f0fac5f1606201c.js +1 -0
  10. package/assets/esri/core/workers/chunks/70eba80261d7fdc624ad.js +1 -0
  11. package/assets/esri/core/workers/chunks/{3dcb2a82e1e4b520c9c9.js → 7b901d0b68e5cc17533a.js} +1 -1
  12. package/assets/esri/core/workers/chunks/7f68c2cc1048d136fd1b.js +1 -0
  13. package/assets/esri/core/workers/chunks/85d6dd6703b228248e30.js +1 -0
  14. package/assets/esri/core/workers/chunks/adc138e5d9983a5752d4.js +1 -0
  15. package/assets/esri/core/workers/chunks/b35e87cf2b8244e3584f.js +1 -0
  16. package/assets/esri/core/workers/chunks/b49f830a8d74c4564ed8.js +1 -0
  17. package/assets/esri/core/workers/chunks/b6d77edf9eec757e88da.js +1 -0
  18. package/assets/esri/core/workers/chunks/c9306fb3ec1a2d5e137a.js +1 -0
  19. package/assets/esri/core/workers/chunks/cd201c627e9396edf6b9.js +1 -0
  20. package/assets/esri/core/workers/chunks/ceeaa8d1b0034b59eae7.js +1 -0
  21. package/assets/esri/core/workers/chunks/dc4a71e72e56cbdff49a.js +1 -0
  22. package/assets/esri/core/workers/chunks/{5e8f02da4eae41f57383.js → f4e962ccbec7e3b06067.js} +1 -1
  23. package/assets/esri/core/workers/chunks/f78b1bfacd95a6ccf7b4.js +1 -0
  24. package/assets/esri/themes/base/widgets/_LabeledSwitch.scss +6 -1
  25. package/assets/esri/themes/dark/main.css +1 -1
  26. package/assets/esri/themes/light/main.css +1 -1
  27. package/assets/esri/themes/light/view.css +1 -1
  28. package/core/sql/WhereClause.js +1 -1
  29. package/core/sql/sqlCompareUtils.js +1 -1
  30. package/core/sql/sqlDateParsingUtils.js +1 -1
  31. package/kernel.js +1 -1
  32. package/layers/support/FieldsIndex.js +1 -1
  33. package/package.json +1 -1
  34. package/support/revision.js +1 -1
  35. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  36. package/views/2d/layers/features/processors/SymbolProcessor.js +1 -1
  37. package/views/webgl/FramebufferObject.js +1 -1
  38. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  39. package/widgets/Editor/workflowUtils.js +1 -1
  40. package/widgets/Features.js +1 -1
  41. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  42. package/widgets/support/LabeledSwitch.js +1 -1
  43. package/assets/esri/core/workers/chunks/16b56e541afa438dfb7f.js +0 -1
  44. package/assets/esri/core/workers/chunks/340ab726ba40fe3a99c8.js +0 -1
  45. package/assets/esri/core/workers/chunks/46b4a17ec898ab744861.js +0 -1
  46. package/assets/esri/core/workers/chunks/4f0412b52844aa9c7bd4.js +0 -1
  47. package/assets/esri/core/workers/chunks/5b80ae1eb79f1db75dc6.js +0 -1
  48. package/assets/esri/core/workers/chunks/80fcb63476829b6a48d2.js +0 -1
  49. package/assets/esri/core/workers/chunks/84725021c43f1122056a.js +0 -1
  50. package/assets/esri/core/workers/chunks/8cdece03397d01767593.js +0 -1
  51. package/assets/esri/core/workers/chunks/9607460895182d31aef9.js +0 -1
  52. package/assets/esri/core/workers/chunks/a0a86383e69932a25e50.js +0 -1
  53. package/assets/esri/core/workers/chunks/a3bf50d9e24ad1de9847.js +0 -1
  54. package/assets/esri/core/workers/chunks/a5db3be5eeb3005df3c1.js +0 -1
  55. package/assets/esri/core/workers/chunks/a87ab14d6a6ccc9004a0.js +0 -1
  56. package/assets/esri/core/workers/chunks/a8cf23c3a55c1834178c.js +0 -1
  57. package/assets/esri/core/workers/chunks/ba00df2e707550939a6f.js +0 -1
  58. package/assets/esri/core/workers/chunks/cfa6d1b63b794febe70a.js +0 -1
  59. package/assets/esri/core/workers/chunks/e0382138cf58191a9697.js +0 -1
  60. package/assets/esri/core/workers/chunks/fe0c6814ef56604540b3.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9206,5732],{92835:(e,t,i)=>{i.d(t,{Z:()=>b});var r,o=i(43697),s=i(96674),n=i(35463),l=i(5600),a=(i(75215),i(67676),i(80442),i(71715)),u=i(52011),p=i(30556),d=i(25031);let c=r=class extends s.wq{static get allTime(){return m}static get empty(){return y}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(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,o=e.end?.getTime()??e.end;return t===r&&i===o}expandTo(e,t=d.By){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,n.JE)(i,e,t));let o=this.end;if(o){const i=(0,n.JE)(o,e,t);o=o.getTime()===i.getTime()?i:(0,n.Nm)(i,1,e,t)}return new r({start:i,end:o})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,o=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let n,l;if(o>=t&&o<=i?n=o:t>=o&&t<=s&&(n=t),i>=o&&i<=s?l=i:s>=t&&s<=i&&(l=s),null!=n&&null!=l&&!isNaN(n)&&!isNaN(l)){const e=new r;return e.start=n===-1/0?null:new Date(n),e.end=l===1/0?null:new Date(l),e}return r.empty}offset(e,t,i=d.By){if(this.isEmpty||this.isAllTime)return this.clone();const o=new r,{start:s,end:l}=this;return null!=s&&(o.start=(0,n.Nm)(s,e,t,i)),null!=l&&(o.end=(0,n.Nm)(l,e,t,i)),o}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return m.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,o._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,o._)([(0,a.r)("end")],c.prototype,"readEnd",null),(0,o._)([(0,p.c)("end")],c.prototype,"writeEnd",null),(0,o._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,o._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,o._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,o._)([(0,a.r)("start")],c.prototype,"readStart",null),(0,o._)([(0,p.c)("start")],c.prototype,"writeStart",null),c=r=(0,o._)([(0,u.j)("esri.TimeExtent")],c);const m=new c,y=new c({start:void 0,end:void 0}),b=c},5732:(e,t,i)=>{i.d(t,{c:()=>r,g:()=>o});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},2368:(e,t,i)=>{i.d(t,{J:()=>p,j:()=>d});var r=i(43697),o=i(92036),s=(i(80442),i(22974)),n=(i(92604),i(70586)),l=i(31263),a=i(1153),u=i(52011);const p=e=>{let t=class extends e{clone(){const e=(0,a.vw)(this);(0,n.O3)(e,"unable to clone instance of non-accessor class");const t=e.metadatas,i=e.store,r={},o=new Map;for(const e in t){const n=t[e],a=i?.originOf(e),u=n.clonable;if(n.readOnly||!1===u||a!==l.s3.USER&&a!==l.s3.DEFAULTS&&a!==l.s3.WEB_MAP&&a!==l.s3.WEB_SCENE)continue;const p=this[e];let d=null;d="function"==typeof u?u(p):"reference"===u?p:(0,s.Vo)(p),null!=p&&null==d||(a===l.s3.DEFAULTS?o.set(e,d):r[e]=d)}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(o.size){const e=(0,a.vw)(u)?.store;if(e)for(const[t,i]of o)e.set(t,i,l.s3.DEFAULTS)}return u}};return t=(0,r._)([(0,u.j)("esri.core.Clonable")],t),t};let d=class extends(p(o.Z)){};d=(0,r._)([(0,u.j)("esri.core.Clonable")],d)},13867:(e,t,i)=>{i.d(t,{z:()=>o});var r=i(69801);class o{constructor(e,t){this._storage=new r.WJ,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,i=1){this._storage.put(this,e,t,i,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(){}}},69801:(e,t,i)=>{i.d(t,{WJ:()=>l,Xq:()=>n});var r,o,s=i(44553);(o=r||(r={}))[o.ALL=0]="ALL",o[o.SOME=1]="SOME";class n{constructor(e,t,i){this.name=e,this._storage=t,this.id=a+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),i&&(this._storage.registerRemoveFunc(this.id,i),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 sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,i,r=0){this._storage.put(this,e,t,i,r)}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)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,i){this._storage.updateSize(this,e,t,i)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class l{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 s.Z,this._users=new s.Z}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,0),this._checkSizeLimits()}put(e,t,i,o,s){t=e.id+t;const n=this._db.get(t);if(n&&(this._size-=n.size,e.size-=n.size,this._db.delete(t),n.entry!==i&&this._notifyRemove(t,n.entry,r.ALL)),o>this._maxSize)return void this._notifyRemove(t,i,r.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!o||o<0)return console.warn(`Refusing to cache entry with size ${o} for key ${t}`),void this._notifyRemove(t,i,r.ALL);const l=1+Math.max(s,-3)- -3;this._db.set(t,{entry:i,size:o,lifetime:l,lives:l}),this._size+=o,e.size+=o,this._checkSizeLimits()}updateSize(e,t,i,o){t=e.id+t;const s=this._db.get(t);if(s&&s.entry===i){for(this._size-=s.size,e.size-=s.size;o>this._maxSize;){const e=this._notifyRemove(t,i,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);o=e}s.size=o,this._size+=o,e.size+=o,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.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={},i=new Array;this._db.forEach(((e,r)=>{const o=e.lifetime;i[o]=(i[o]||0)+e.size,this._users.forAll((i=>{const{id:o,name:s}=i;if(r.startsWith(o)){const i=t[s]||0;t[s]=i+e.size}}))}));const r={};this._users.forAll((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const o=t[i]||0;t[i]=o,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"}));const o=Object.keys(t);o.sort(((e,i)=>t[i]-t[e])),o.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]));for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/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,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,r.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i){let r;return this._removeFuncs.some((o=>{if(e.startsWith(o[0])){const e=o[1](t,i);return"number"==typeof e&&(r=e),!0}return!1})),r}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,i]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,i,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,i=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const o=this._notifyRemove(e,t.entry,r.SOME);null!=o&&o>0&&(this._size+=o,i&&(i.size+=o),t.lives=t.lifetime,t.size=o,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let a=0},22862:(e,t,i)=>{i.d(t,{Hg:()=>y,V7:()=>m,uD:()=>c});var r=i(92036),o=i(46791),s=i(1153);const n=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof r.Z}function a(e){return e instanceof o.Z?Object.keys(e.items):l(e)?(0,s.vw)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof o.Z?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function d(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const r=a(e),o=a(t);if(0===r.length&&0===o.length)return;if(!r.length||!o.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=o.filter((e=>!r.includes(e))),c=r.filter((e=>!o.includes(e))),m=r.filter((i=>o.includes(i)&&u(e,i)!==u(t,i))).concat(s,c).sort(),y=p(e);if(y&&n.has(y)&&m.length)return{type:"complete",oldValue:e,newValue:t};let b;const h=l(e)&&l(t);for(const r of m){const o=u(e,r),s=u(t,r);let n;if((h||"function"!=typeof o&&"function"!=typeof s)&&o!==s&&(null!=o||null!=s)){if(i&&i[r]&&"function"==typeof i[r])n=i[r]?.(o,s);else if(o instanceof Date&&s instanceof Date){if(o.getTime()===s.getTime())continue;n={type:"complete",oldValue:o,newValue:s}}else n="object"==typeof o&&"object"==typeof s&&p(o)===p(s)?d(o,s):{type:"complete",oldValue:o,newValue:s};null!=n&&(null!=b?b.diff[r]=n:b={type:"partial",diff:{[r]:n}})}}return b}function c(e,t){if(null==e)return!1;const i=t.split(".");let r=e;for(const e of i){if("complete"===r.type)return!0;if("partial"!==r.type)return!1;{const t=r.diff[e];if(!t)return!1;r=t}}return!0}function m(e,t){for(const i of t)if(c(e,i))return!0;return!1}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},65845:(e,t,i)=>{i.d(t,{D:()=>o});var r=i(81153);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:i})=>{(0,r.l)(e)&&i&&e.originOf(t)!==i&&e.updateOrigin(t,i)}))}},81153:(e,t,i)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{l:()=>r})},17445:(e,t,i)=>{i.d(t,{N1:()=>c,YP:()=>a,Z_:()=>b,gx:()=>u,nn:()=>h,on:()=>d,tX:()=>f}),i(66643),i(46791);var r=i(91460),o=i(50758),s=i(70586),n=i(95330),l=i(26258);function a(e,t,i={}){return p(e,t,i,m)}function u(e,t,i={}){return p(e,t,i,y)}function p(e,t,i={},r){let o=null;const n=i.once?(e,i)=>{r(e)&&((0,s.hw)(o),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(o=(0,l.aQ)(e,n,i.sync,i.equals),i.initial){const t=e();n(t,t)}return o}function d(e,t,i,n={}){let l=null,u=null,p=null;function d(){l&&u&&(u.remove(),n.onListenerRemove?.(l),l=null,u=null)}function c(e){n.once&&n.once&&(0,s.hw)(p),i(e)}const m=a(e,((e,i)=>{d(),(0,r.vT)(e)&&(l=e,u=(0,r.on)(e,t,c),n.onListenerAdd?.(e))}),{sync:n.sync,initial:!0});return p=(0,o.kB)((()=>{m.remove(),d()})),p}function c(e,t){return function(e,t,i){if((0,n.Hc)(i))return Promise.reject((0,n.zE)());const r=e();if(t?.(r))return Promise.resolve(r);let l=null;function a(){l=(0,s.hw)(l)}return new Promise(((r,s)=>{l=(0,o.AL)([(0,n.fu)(i,(()=>{a(),s((0,n.zE)())})),p(e,(e=>{a(),r(e)}),{sync:!1,once:!0},t??m)])}))}(e,y,t)}function m(e){return!0}function y(e){return!!e}i(87538);const b={sync:!0},h={initial:!0},f={sync:!0,initial:!0}},1542:(e,t,i)=>{i.d(t,{A4:()=>s,L9:()=>n,yV:()=>o});var r=i(17126);class o{}function s(e){return e instanceof r.ld?e===o.instance:"unknown"===e?.toString().toLowerCase()}function n(e){return s(e)?o.instance:e}o.instance=new r.vF("Etc/UTC")},60437:(e,t,i)=>{i.d(t,{G_:()=>v,HH:()=>n,JR:()=>y,TC:()=>l,Tn:()=>d,Ue:()=>o,al:()=>s,bZ:()=>b,cS:()=>m,dp:()=>u,fS:()=>f,is:()=>h,op:()=>p,pp:()=>a,t8:()=>c});var r=i(6570);function o(e=g){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,i,r,s,n,l=o()){return l[0]=e,l[1]=t,l[2]=i,l[3]=r,l[4]=s,l[5]=n,l}function n(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new r.Z(i?{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 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[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function p(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function d(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?c(e,v):o(v)}function y(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 b(e,t,i,r,o){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function h(e){return 6===e.length}function f(e,t,i){if(null==e||null==t)return e===t;if(!h(e)||!h(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(24470);const v=[1/0,1/0,1/0,-1/0,-1/0,-1/0],g=[0,0,0,0,0,0];o()},16306:(e,t,i)=>{i.d(t,{aX:()=>_});var r=i(68773),o=i(20102),s=i(92604),n=i(38913),l=i(58901),a=i(73913),u=i(8744),p=i(40488),d=(i(66577),i(3172)),c=i(33955),m=i(11282),y=i(17452);async function b(e,t,i){const r="string"==typeof e?(0,y.mN)(e):e,o=t[0].spatialReference,s=(0,c.Ji)(t[0]),n={...i,query:{...r.query,f:"json",sr:(0,u.B9)(o),geometries:JSON.stringify((a=t,{geometryType:(0,c.Ji)(a[0]),geometries:a.map((e=>e.toJSON()))}))}},{data:l}=await(0,d.Z)(r.path+"/simplify",n);var a;return function(e,t,i){const r=(0,c.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=i,t}))}(l.geometries,s,o)}const h=s.Z.getLogger("esri.geometry.support.normalizeUtils");function f(e){return"polygon"===e[0].type}function v(e){return"polyline"===e[0].type}function g(e,t,i){if(t){const t=function(e,t){if(!(e instanceof l.Z||e instanceof n.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h.error(e),new o.Z(e)}const i=(0,a.x3)(e),r=[];for(const e of i){const i=[];r.push(i),i.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],n=e[r+1][0],l=e[r+1][1],a=Math.sqrt((n-o)*(n-o)+(l-s)*(l-s)),u=(l-s)/a,p=(n-o)/a,d=a/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,n=p*r+o,l=u*r+s;i.push([n,l])}const e=(a+Math.floor(d-1)*t)/2,r=p*e+o,n=u*e+s;i.push([r,n])}i.push([n,l])}}return function(e){return"polygon"===e.type}(e)?new n.Z({rings:r,spatialReference:e.spatialReference}):new l.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.Sx)(t,!0)}return i&&(e=(0,a.Sy)(e,i)),e}function T(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=(0,a.XZ)(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=(0,a.XZ)(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=(0,a.XZ)(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=(0,a.XZ)(r,i);e=e.clone().offset(t*(-2*i),0)}}return e}function w(e,t){let i=-1;for(let r=0;r<t.cutIndexes.length;r++){const o=t.cutIndexes[r],s=t.geometries[r],n=(0,a.x3)(s);for(let e=0;e<n.length;e++){const t=n[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const r=t[e][0];i=r>i?r:i}i=Number(i.toFixed(9));const r=-360*(0,a.XZ)(i,180);for(let i=0;i<t.length;i++){const t=s.getPoint(e,i);s.setPoint(e,i,t.clone().offset(r,0))}return!0}}))}if(o===i){if(f(e))for(const t of(0,a.x3)(s))e[o]=e[o].addRing(t);else if(v(e))for(const t of(0,a.x3)(s))e[o]=e[o].addPath(t)}else i=o,e[o]=s}return e}async function _(e,t,i){if(!Array.isArray(e))return _([e],t);t&&"string"!=typeof t&&h.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??r.default.geometryServiceUrl;let s,y,f,v,S,C,N,O,A=0;const D=[],I=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,y=(0,u.C5)(s),f=s.isWebMercator,C=f?102100:4326,v=a.UZ[C].maxX,S=a.UZ[C].minX,N=a.UZ[C].plus180Line,O=a.UZ[C].minus180Line),y)if("mesh"===t.type)I.push(t);else if("point"===t.type)I.push(T(t.clone(),v,S));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,v,S))),I.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,y);I.push(e.rings?new n.Z(e):e)}else if(t.extent){const e=t.extent,i=(0,a.XZ)(e.xmin,S)*(2*v);let r=0===i?t.clone():(0,a.Sy)(t.clone(),i);e.offset(i,0),e.intersects(N)&&e.xmax!==v?(A=e.xmax>A?e.xmax:A,r=g(r,f),D.push(r),I.push("cut")):e.intersects(O)&&e.xmin!==S?(A=e.xmax*(2*v)>A?e.xmax*(2*v):A,r=g(r,f,360),D.push(r),I.push("cut")):I.push(r)}else I.push(t.clone());else I.push(t);else I.push(t);let F=(0,a.XZ)(A,v),x=-90;const j=F,M=new l.Z;for(;F>0;){const e=360*F-180;M.addPath([[e,x],[e,-1*x]]),x*=-1,F--}if(D.length>0&&j>0){const t=w(D,await async function(e,t,i,r){const o=(0,m.en)(e),s=t[0].spatialReference,n={...r,responseType:"json",query:{...o.query,f:"json",sr:(0,u.B9)(s),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},l=await(0,d.Z)(o.path+"/cut",n),{cutIndexes:a,geometries:p=[]}=l.data;return{cutIndexes:a,geometries:p.map((e=>{const t=(0,c.im)(e);return t.spatialReference=s,t}))}}(o,D,M,i)),r=[],s=[];for(let i=0;i<I.length;i++){const o=I[i];if("cut"!==o)s.push(o);else{const o=t.shift(),n=e[i];null!=n&&"polygon"===n.type&&n.rings&&n.rings.length>1&&o.rings.length>=n.rings.length?(r.push(o),s.push("simplify")):s.push(f?(0,p.$)(o):o)}}if(!r.length)return s;const n=await b(o,r,i),l=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?l.push(t):l.push(f?(0,p.$)(n.shift()):n.shift())}return l}const E=[];for(let e=0;e<I.length;e++){const t=I[e];if("cut"!==t)E.push(t);else{const e=D.shift();E.push(!0===f?(0,p.$)(e):e)}}return E}},73913:(e,t,i)=>{i.d(t,{Sy:()=>a,UZ:()=>n,XZ:()=>l,x3:()=>u});var r=i(58901),o=i(82971),s=i(33955);const n={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator}),minus180Line:new r.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.Z({paths:[[[180,-180],[180,180]]],spatialReference:o.Z.WGS84}),minus180Line:new r.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:o.Z.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,s.oU)(e)?e.rings:e.paths}},40153:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ui});var r=i(43697),o=i(68773),s=i(66577),n=i(38171),l=i(51773),a=(i(16050),i(12501),i(28756),i(92271),i(72529),i(5499),i(84382),i(81571),i(91423)),u=i(92604),p=i(46791),d=i(20102),c=i(16453),m=i(78286),y=i(95330),b=i(17445),h=i(67900),f=i(17452),v=i(5600),g=i(75215),T=i(67676),w=(i(80442),i(71715)),_=i(52011),S=i(30556),C=i(65845),N=i(6570),O=i(73615),A=i(8744),D=i(87085),I=i(71612),F=i(38009),x=i(16859),j=i(72965),M=i(66677),E=i(9790),B=i(96674),R=i(77987);let L=class extends B.wq{constructor(e){super(e),this.break=new R.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new R.Z({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new R.Z({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new R.Z({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new R.Z({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new R.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"break",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"first",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"unlocated",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"last",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"middle",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"waypoint",void 0),L=(0,r._)([(0,_.j)("esri.layers.support.RouteStopSymbols")],L);const P=L;var J=i(4095),U=i(20256);let Z=class extends B.wq{constructor(e){super(e),this.directionLines=new J.Z({color:[0,122,194],width:6}),this.directionPoints=new R.Z({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new R.Z({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new U.Z({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new J.Z({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new J.Z({width:8,color:[20,89,127]}),this.stops=new P}};(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"directionLines",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"directionPoints",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"pointBarriers",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"polygonBarriers",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"polylineBarriers",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"routeInfo",void 0),(0,r._)([(0,v.Cb)({type:P})],Z.prototype,"stops",void 0),Z=(0,r._)([(0,_.j)("esri.layers.support.RouteSymbols")],Z);const k=Z;var V=i(48522),z=i(15235),W=i(14661),q=i(3172),G=i(11282),H=i(36030),K=i(35454);const X=(0,K.w)()({esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"}),$=(0,K.w)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),Y=((0,K.w)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),(0,K.w)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"})),Q=(0,K.w)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),ee=(0,K.w)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),te=((0,K.w)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,K.w)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),ie=((0,K.w)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,K.w)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,K.w)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),re=(0,K.w)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),oe=(0,K.w)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),se=(0,K.w)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),ne=(0,K.w)()({1:"right",2:"left"},{useNumericKeys:!0}),le=(0,K.w)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),ae=(0,K.w)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),ue=(0,K.w)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation"},{useNumericKeys:!0}),pe=(0,K.w)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),de=(0,K.w)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),ce=(0,K.w)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),me=(0,K.w)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),ye=(0,K.w)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),be=(0,K.w)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),he=(0,K.w)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),fe=(0,K.w)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),ve=(0,K.w)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),ge=(0,K.w)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"});let Te=class extends B.wq{constructor(e){super(e),this.dataType=null,this.name=null,this.parameterNames=null,this.restrictionUsageParameterName=null,this.timeNeutralAttributeName=null,this.trafficSupport=null,this.units=null,this.usageType=null}};(0,r._)([(0,v.Cb)({type:String})],Te.prototype,"dataType",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Te.prototype,"name",void 0),(0,r._)([(0,v.Cb)({type:[String]})],Te.prototype,"parameterNames",void 0),(0,r._)([(0,v.Cb)({type:String})],Te.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,H.J)(me,{ignoreUnknown:!1})],Te.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,v.Cb)({type:String})],Te.prototype,"trafficSupport",void 0),(0,r._)([(0,H.J)(Y)],Te.prototype,"units",void 0),(0,r._)([(0,H.J)(ve)],Te.prototype,"usageType",void 0),Te=(0,r._)([(0,_.j)("esri.rest.support.NetworkAttribute")],Te);const we=Te;let _e=class extends B.wq{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,r._)([(0,v.Cb)({type:Number})],_e.prototype,"buildTime",void 0),(0,r._)([(0,v.Cb)({type:String})],_e.prototype,"name",void 0),(0,r._)([(0,v.Cb)({type:[we]})],_e.prototype,"networkAttributes",void 0),(0,r._)([(0,v.Cb)()],_e.prototype,"networkSources",void 0),(0,r._)([(0,v.Cb)({type:String})],_e.prototype,"state",void 0),_e=(0,r._)([(0,_.j)("esri.rest.support.NetworkDataset")],_e);const Se=_e;var Ce=i(2368);let Ne=class extends((0,Ce.J)(B.wq)){constructor(e){super(e),this.attributeParameterValues=null,this.description=null,this.distanceAttributeName=null,this.id=null,this.impedanceAttributeName=null,this.name=null,this.restrictionAttributeNames=null,this.simplificationTolerance=null,this.simplificationToleranceUnits=null,this.timeAttributeName=null,this.type=null,this.useHierarchy=null,this.uturnAtJunctions=null}readId(e,t){return t.id??t.itemId??null}readRestrictionAttributes(e,t){const{restrictionAttributeNames:i}=t;return null==i?null:i.map((e=>be.fromJSON(e)))}writeRestrictionAttributes(e,t,i){null!=e&&(t[i]=e.map((e=>be.toJSON(e))))}};(0,r._)([(0,v.Cb)({type:[Object],json:{write:!0}})],Ne.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Ne.prototype,"description",void 0),(0,r._)([(0,H.J)(ce,{ignoreUnknown:!1})],Ne.prototype,"distanceAttributeName",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Ne.prototype,"id",void 0),(0,r._)([(0,w.r)("id",["id","itemId"])],Ne.prototype,"readId",null),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Ne.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Ne.prototype,"name",void 0),(0,r._)([(0,v.Cb)({type:[String],json:{write:!0}})],Ne.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,w.r)("restrictionAttributeNames")],Ne.prototype,"readRestrictionAttributes",null),(0,r._)([(0,S.c)("restrictionAttributeNames")],Ne.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,v.Cb)({type:Number,json:{write:{allowNull:!0}}})],Ne.prototype,"simplificationTolerance",void 0),(0,r._)([(0,H.J)(X)],Ne.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,H.J)(me,{ignoreUnknown:!1})],Ne.prototype,"timeAttributeName",void 0),(0,r._)([(0,H.J)(ie)],Ne.prototype,"type",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"useHierarchy",void 0),(0,r._)([(0,H.J)(te)],Ne.prototype,"uturnAtJunctions",void 0),Ne=(0,r._)([(0,_.j)("esri.rest.support.TravelMode")],Ne);const Oe=Ne;let Ae=class extends B.wq{constructor(e){super(e),this.accumulateAttributeNames=null,this.attributeParameterValues=null,this.currentVersion=null,this.defaultTravelMode=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsSupportedLanguages=null,this.directionsTimeAttribute=null,this.hasZ=null,this.impedance=null,this.networkDataset=null,this.supportedTravelModes=null}readAccumulateAttributes(e){return null==e?null:e.map((e=>ye.fromJSON(e)))}writeAccumulateAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>ye.toJSON(e))))}readDefaultTravelMode(e,t){const i=t.supportedTravelModes?.find((({id:e})=>e===t.defaultTravelMode))??t.supportedTravelModes?.find((({itemId:e})=>e===t.defaultTravelMode));return i?Oe.fromJSON(i):null}};(0,r._)([(0,v.Cb)()],Ae.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,w.r)("accumulateAttributeNames")],Ae.prototype,"readAccumulateAttributes",null),(0,r._)([(0,S.c)("accumulateAttributeNames")],Ae.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.Cb)()],Ae.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.Cb)()],Ae.prototype,"currentVersion",void 0),(0,r._)([(0,v.Cb)()],Ae.prototype,"defaultTravelMode",void 0),(0,r._)([(0,w.r)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],Ae.prototype,"readDefaultTravelMode",null),(0,r._)([(0,v.Cb)()],Ae.prototype,"directionsLanguage",void 0),(0,r._)([(0,H.J)($)],Ae.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,v.Cb)()],Ae.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,H.J)(me,{ignoreUnknown:!1})],Ae.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,v.Cb)()],Ae.prototype,"hasZ",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Ae.prototype,"impedance",void 0),(0,r._)([(0,v.Cb)({type:Se})],Ae.prototype,"networkDataset",void 0),(0,r._)([(0,v.Cb)({type:[Oe]})],Ae.prototype,"supportedTravelModes",void 0),Ae=(0,r._)([(0,_.j)("esri.rest.support.NetworkServiceDescription")],Ae);const De=Ae,Ie=u.Z.getLogger("esri.rest.networkService");function Fe(e,t,i,r){r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function xe(e,t,i){if(!e)throw new d.Z("network-service:missing-url","Url to Network service is missing");const r=(0,G.lA)({f:"json",token:t},i),{data:o}=await(0,q.Z)(e,r),s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,G.lA)({f:"json",token:t},i),o=(0,f.Qj)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:n}}=await(0,q.Z)(o,r);return{supportedTravelModes:s,defaultTravelMode:n}}catch(e){throw new d.Z("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,i):async function(e,t){const i=(0,G.lA)({f:"json"},t),{data:r}=await(0,q.Z)(e.replace(/\/rest\/.*$/i,"/info"),i);if(!r?.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=r,s=(0,f.Qj)(o)+"/sharing/rest/portals/self",{data:n}=await(0,q.Z)(s,i),l=(0,m.hS)("helperServices.routingUtilities.url",n);if(!l)return{supportedTravelModes:[],defaultTravelMode:null};const a=(0,G.en)(o),u=/\/solve$/i.test(a.path)?"Route":/\/solveclosestfacility$/i.test(a.path)?"ClosestFacility":"ServiceAreas",p=(0,G.lA)({f:"json",serviceName:u},t),d=(0,f.Qj)(l)+"/GetTravelModes/execute",c=await(0,q.Z)(d,p),y=[];let b=null;if(c?.data?.results?.length){const e=c.data.results;for(const t of e)if("supportedTravelModes"===t.paramName){if(t.value?.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);y.push(t)}}else"defaultTravelMode"===t.paramName&&(b=t.value)}return{supportedTravelModes:y,defaultTravelMode:b}}(e,i),{defaultTravelMode:n,supportedTravelModes:l}=await s;return o.defaultTravelMode=n,o.supportedTravelModes=l,De.fromJSON(o)}var je=i(67723),Me=i(16306);function Ee(e,t){if(null==e)return null;const i={},r=new RegExp(`^${t}`,"i");for(const o of Object.keys(e))if(r.test(o)){const r=o.substring(t.length);i[ye.fromJSON(r)]=e[o]}return i}function Be(e,t,i){if(null!=e){t.attributes||(t.attributes={});for(const r in e){const o=ye.toJSON(r);t.attributes[`${i}${o}`]=e[r]}}}function Re(e){const t={};for(const i of Object.keys(e)){const r=i;t[ye.fromJSON(r)]=e[i]}return t}function Le(e){const t={};for(const i of Object.keys(e)){const r=i;t[ye.toJSON(r)]=e[i]}return t}function Pe(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function Je(e){const t=e.toJSON(),i=t;return i.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),i.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),i.barriers&&=JSON.stringify(t.barriers),i.outSR&&=t.outSR?.wkid,i.overrides&&=JSON.stringify(t.overrides),i.polygonBarriers&&=JSON.stringify(t.polygonBarriers),i.polylineBarriers&&=JSON.stringify(t.polylineBarriers),i.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),i.stops&&=JSON.stringify(t.stops),i.travelMode&&=JSON.stringify(t.travelMode),i}var Ue=i(74889);const Ze=new K.X({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let ke=class extends B.wq{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],ke.prototype,"description",void 0),(0,r._)([(0,v.Cb)({type:String,json:{read:Ze.read,write:Ze.write}})],ke.prototype,"type",void 0),ke=(0,r._)([(0,_.j)("esri.rest.support.GPMessage")],ke);const Ve=ke,ze=new K.X({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let We=class extends Ve{constructor(e){super(e),this.type=null}};(0,r._)([(0,v.Cb)({type:String,json:{read:ze.read,write:ze.write}})],We.prototype,"type",void 0),We=(0,r._)([(0,_.j)("esri.rest.support.NAMessage")],We);const qe=We;let Ge=class extends B.wq{constructor(e){super(e)}};(0,r._)([(0,v.Cb)({json:{read:{source:"string"}}})],Ge.prototype,"text",void 0),(0,r._)([(0,H.J)(ge,{name:"stringType"})],Ge.prototype,"type",void 0),Ge=(0,r._)([(0,_.j)("esri.rest.support.DirectionsString")],Ge);const He=Ge;var Ke=i(94139);let Xe=class extends B.wq{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return Pe(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return Ke.Z.fromJSON(t.point)}};(0,r._)([(0,v.Cb)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],Xe.prototype,"arriveTime",void 0),(0,r._)([(0,v.Cb)()],Xe.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["arriveTimeUTC","ETA"])],Xe.prototype,"readArriveTimeOffset",null),(0,r._)([(0,v.Cb)({type:Ke.Z})],Xe.prototype,"geometry",void 0),(0,r._)([(0,w.r)("geometry",["point"])],Xe.prototype,"readGeometry",null),(0,r._)([(0,v.Cb)({type:[He]})],Xe.prototype,"strings",void 0),Xe=(0,r._)([(0,_.j)("esri.rest.support.DirectionsEvent")],Xe);const $e=Xe;var Ye=i(58901);let Qe=class extends n.Z{constructor(e){super(e),this.events=null,this.strings=null}readGeometry(e,t){const i=function(e){if(null==e||""===e)return null;let t=0,i=0,r=0,o=0;const s=[];let n,l,a,u,p,d,c,m,y=0,b=0,h=0;if(p=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),p||(p=[]),0===parseInt(p[y],32)){y=2;const e=parseInt(p[y],32);y++,d=parseInt(p[y],32),y++,1&e&&(b=p.indexOf("|")+1,c=parseInt(p[b],32),b++),2&e&&(h=p.indexOf("|",b)+1,m=parseInt(p[h],32),h++)}else d=parseInt(p[y],32),y++;for(;y<p.length&&"|"!==p[y];){n=parseInt(p[y],32)+t,y++,t=n,l=parseInt(p[y],32)+i,y++,i=l;const e=[n/d,l/d];b&&(u=parseInt(p[b],32)+r,b++,r=u,e.push(u/c)),h&&(a=parseInt(p[h],32)+o,h++,o=a,e.push(a/m)),s.push(e)}return{paths:[s],hasZ:b>0,hasM:h>0}}(t.compressedGeometry);return null!=i?Ye.Z.fromJSON(i):null}};(0,r._)([(0,v.Cb)({type:[$e]})],Qe.prototype,"events",void 0),(0,r._)([(0,w.r)("geometry",["compressedGeometry"])],Qe.prototype,"readGeometry",null),(0,r._)([(0,v.Cb)({type:[He]})],Qe.prototype,"strings",void 0),Qe=(0,r._)([(0,_.j)("esri.rest.support.DirectionsFeature")],Qe);const et=Qe;var tt=i(82971);let it=class extends Ue.Z{constructor(e){super(e),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];const i=t.summary.envelope.spatialReference??t.spatialReference,r=i&&tt.Z.fromJSON(i);return e.map((e=>{const t=et.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=r),null!=t.events)for(const e of t.events)null!=e.geometry&&(e.geometry.spatialReference=r);return t}))}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new Ye.Z({spatialReference:t});const i=[];for(const t of e)for(const e of t.paths)i.push(...e);const r=[];i.forEach(((e,t)=>{0!==t&&e[0]===i[t-1][0]&&e[1]===i[t-1][1]||r.push(e)}));const{hasM:o,hasZ:s}=e[0];return new Ye.Z({hasM:o,hasZ:s,paths:[r],spatialReference:t})}(this.features.map((({geometry:e})=>e)),this.extent.spatialReference):null}get strings(){return this.features.flatMap((({strings:e})=>e)).filter(T.pC)}};(0,r._)([(0,v.Cb)({type:N.Z,json:{read:{source:"summary.envelope"}}})],it.prototype,"extent",void 0),(0,r._)([(0,v.Cb)({nonNullable:!0})],it.prototype,"features",void 0),(0,r._)([(0,w.r)("features")],it.prototype,"readFeatures",null),(0,r._)([(0,v.Cb)()],it.prototype,"geometryType",void 0),(0,r._)([(0,v.Cb)({readOnly:!0})],it.prototype,"mergedGeometry",null),(0,r._)([(0,v.Cb)()],it.prototype,"routeId",void 0),(0,r._)([(0,v.Cb)()],it.prototype,"routeName",void 0),(0,r._)([(0,v.Cb)({value:null,readOnly:!0})],it.prototype,"strings",null),(0,r._)([(0,v.Cb)({json:{read:{source:"summary.totalDriveTime"}}})],it.prototype,"totalDriveTime",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"summary.totalLength"}}})],it.prototype,"totalLength",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"summary.totalTime"}}})],it.prototype,"totalTime",void 0),it=(0,r._)([(0,_.j)("esri.rest.support.DirectionsFeatureSet")],it);const rt=it;let ot=class extends B.wq{constructor(e){super(e),this.directionLines=null,this.directionPoints=null,this.directions=null,this.route=null,this.routeName=null,this.stops=null,this.traversedEdges=null,this.traversedJunctions=null,this.traversedTurns=null}};(0,r._)([(0,v.Cb)({type:Ue.Z,json:{write:!0}})],ot.prototype,"directionLines",void 0),(0,r._)([(0,v.Cb)({type:Ue.Z,json:{write:!0}})],ot.prototype,"directionPoints",void 0),(0,r._)([(0,v.Cb)({type:rt,json:{write:!0}})],ot.prototype,"directions",void 0),(0,r._)([(0,v.Cb)({type:n.Z,json:{write:!0}})],ot.prototype,"route",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],ot.prototype,"routeName",void 0),(0,r._)([(0,v.Cb)({type:[n.Z],json:{write:!0}})],ot.prototype,"stops",void 0),(0,r._)([(0,v.Cb)({type:Ue.Z,json:{write:!0}})],ot.prototype,"traversedEdges",void 0),(0,r._)([(0,v.Cb)({type:Ue.Z,json:{write:!0}})],ot.prototype,"traversedJunctions",void 0),(0,r._)([(0,v.Cb)({type:Ue.Z,json:{write:!0}})],ot.prototype,"traversedTurns",void 0),ot=(0,r._)([(0,_.j)("esri.rest.support.RouteResult")],ot);const st=ot;function nt(e){return e?Ue.Z.fromJSON(e).features.filter(T.pC):[]}let lt=class extends B.wq{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return nt(t.barriers)}readPolylineBarriers(e){return nt(e)}readPolygonBarriers(e){return nt(e)}};(0,r._)([(0,v.Cb)({type:[qe]})],lt.prototype,"messages",void 0),(0,r._)([(0,v.Cb)({type:[n.Z]})],lt.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)("pointBarriers",["barriers"])],lt.prototype,"readPointBarriers",null),(0,r._)([(0,v.Cb)({type:[n.Z]})],lt.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)("polylineBarriers")],lt.prototype,"readPolylineBarriers",null),(0,r._)([(0,v.Cb)({type:[n.Z]})],lt.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)("polygonBarriers")],lt.prototype,"readPolygonBarriers",null),(0,r._)([(0,v.Cb)({type:[st]})],lt.prototype,"routeResults",void 0),lt=(0,r._)([(0,_.j)("esri.rest.support.RouteSolveResult")],lt);const at=lt;function ut(e){return e instanceof Ue.Z}var pt;let dt=pt=class extends((0,Ce.J)(B.wq)){constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.symbol=null,this.toLevel=null,this.type="direction-line"}static fromGraphic(e){return new pt({directionLineType:pe.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:e.attributes.FromLevel??null,geometry:e.geometry,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionLineType:null!=this.directionLineType?pe.toJSON(this.directionLineType):null,DirectionPointID:this.directionPointId,Meters:this.distance,Minutes:this.duration};return null!=this.fromLevel&&(e.FromLevel=this.fromLevel),null!=this.toLevel&&(e.ToLevel=this.toLevel),new n.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};dt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionsLineType",codedValues:[{name:"Unknown",code:0},{name:"Segment",code:1},{name:"Maneuver Segment",code:2},{name:"Restriction violation",code:3},{name:"Scale cost barrier crossing",code:4},{name:"Heavy Traffic",code:5},{name:"Slow Traffic",code:6},{name:"Moderate Traffic",code:7}]}},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"FromLevel",alias:"Start from 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"Meters",alias:"Length in Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"Minutes",alias:"Duration in Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"ToLevel",alias:"End at 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1}],dt.popupInfo={title:"Direction Lines",fieldInfos:[{fieldName:"DirectionLineType",label:"Line Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Meters",label:"Length in Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Minutes",label:"Duration in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DirectionPointID",label:"Direction Point ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"FromLevel",label:"Start from 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ToLevel",label:"End at 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,v.Cb)({type:pe.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:pe.read}}})],dt.prototype,"directionLineType",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.DirectionPointID"}}})],dt.prototype,"directionPointId",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Meters"}}})],dt.prototype,"distance",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Minutes"}}})],dt.prototype,"duration",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.FromLevel"}}})],dt.prototype,"fromLevel",void 0),(0,r._)([(0,v.Cb)({type:Ye.Z})],dt.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ObjectID"}}})],dt.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],dt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],dt.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ToLevel"}}})],dt.prototype,"toLevel",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],dt.prototype,"type",void 0),dt=pt=(0,r._)([(0,_.j)("esri.rest.support.DirectionLine")],dt);const ct=dt;var mt;let yt=mt=class extends((0,Ce.J)(B.wq)){constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.type="direction-point",this.voiceInstruction=null}readArrivalTime(e,t){return null!=t.attributes.ArrivalTime?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new mt({alternateName:e.attributes.AlternateName??null,arrivalTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:ue.fromJSON(e.attributes.DirectionPointType),displayText:e.attributes.DisplayText??null,exitName:e.attributes.ExitName??null,geometry:e.geometry,intersectingName:e.attributes.IntersectingName??null,level:e.attributes.Level??null,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:e.attributes.ShortVoiceInstruction??null,stopId:e.attributes.StopID??null,symbol:e.symbol,towardName:e.attributes.TowardName??null,voiceInstruction:e.attributes.VoiceInstruction??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionPointType:null!=this.directionPointType?ue.toJSON(this.directionPointType):null,Sequence:this.sequence,StopID:this.stopId};return null!=this.alternateName&&(e.AlternateName=this.alternateName),null!=this.arrivalTime&&(e.ArrivalTime=this.arrivalTime.getTime()),null!=this.arrivalTimeOffset&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),null!=this.azimuth&&(e.Azimuth=this.azimuth),null!=this.branchName&&(e.BranchName=this.branchName),null!=this.displayText&&(e.DisplayText=this.displayText),null!=this.exitName&&(e.ExitName=this.exitName),null!=this.intersectingName&&(e.IntersectingName=this.intersectingName),null!=this.level&&(e.Level=this.level),null!=this.name&&(e.Name=this.name),null!=this.shortVoiceInstruction&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),null!=this.towardName&&(e.TowardName=this.towardName),null!=this.voiceInstruction&&(e.VoiceInstruction=this.voiceInstruction),new n.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};yt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AlternateName",alias:"Alternative Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ArrivalTime",alias:"Maneuver Starts at",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"BranchName",alias:"Signpost Branch Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"DirectionPointType",alias:"Directions Item Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionPointType",codedValues:[{name:"Unknown",code:0},{name:"",code:1},{name:"Arrive at stop",code:50},{name:"Depart at stop",code:51},{name:"Go straight",code:52},{name:"Take ferry",code:100},{name:"Take off ferry",code:101},{name:"Keep center at fork",code:102},{name:"Take roundabout",code:103},{name:"Make U-Turn",code:104},{name:"Pass the door",code:150},{name:"Take stairs",code:151},{name:"",code:152},{name:"Take escalator",code:153},{name:"Take pedestrian ramp",code:154},{name:"Keep left at fork",code:200},{name:"Ramp left",code:201},{name:"Take left-handed roundabout",code:202},{name:"Make left-handed U-Turn",code:203},{name:"Bear left",code:204},{name:"Turn left",code:205},{name:"Make sharp left",code:206},{name:"Turn left, followed by turn left",code:207},{name:"Turn left, followed by turn right",code:208},{name:"Keep right at fork",code:300},{name:"Ramp right",code:301},{name:"Take right-handed roundabout",code:302},{name:"Make right-handed U-Turn",code:303},{name:"Bear right",code:304},{name:"Turn right",code:305},{name:"Make sharp right",code:306},{name:"Turn right, followed by turn left",code:307},{name:"Turn right, followed by turn right",code:308},{name:"Indicates up direction of elevator",code:400},{name:"Indicates up direction of escalator",code:401},{name:"Take up-stairs",code:402},{name:"Indicates down direction of elevator",code:500},{name:"Indicates down direction of escalator",code:501},{name:"Take down-stairs",code:502},{name:"General event",code:1e3},{name:"Landmark",code:1001},{name:"Time zone change",code:1002},{name:"Heavy traffic segment",code:1003},{name:"Scale cost barrier crossing",code:1004},{name:"Administrative Border crossing",code:1005},{name:"Restriction violation",code:1006}]}},{name:"DisplayText",alias:"Text to Display",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ExitName",alias:"Highway Exit Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"IntersectingName",alias:"Intersecting Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Level",alias:"3D Logical Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Name",alias:"Primary Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ShortVoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TowardName",alias:"Signpost Toward Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"VoiceInstruction",alias:"Voice Full Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null}],yt.popupInfo={title:"{DisplayText}",fieldInfos:[{fieldName:"DirectionPointType",label:"Directions Item Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"DisplayText",label:"Text to Display",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"StopID",label:"Stop ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Maneuver Starts at",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Azimuth",label:"Azimuth",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Name",label:"Primary Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AlternateName",label:"Alternative Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ExitName",label:"Highway Exit Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"IntersectingName",label:"Intersecting Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BranchName",label:"Signpost Branch Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TowardName",label:"Signpost Toward Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ShortVoiceInstruction",label:"Voice Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"VoiceInstruction",label:"Voice Full Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,v.Cb)()],yt.prototype,"alternateName",void 0),(0,r._)([(0,v.Cb)()],yt.prototype,"arrivalTime",void 0),(0,r._)([(0,w.r)("arrivalTime",["attributes.ArrivalTime"])],yt.prototype,"readArrivalTime",null),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],yt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Azimuth"}}})],yt.prototype,"azimuth",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.BranchName"}}})],yt.prototype,"branchName",void 0),(0,r._)([(0,v.Cb)({type:ue.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:ue.read}}})],yt.prototype,"directionPointType",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.DisplayText"}}})],yt.prototype,"displayText",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ExitName"}}})],yt.prototype,"exitName",void 0),(0,r._)([(0,v.Cb)({type:Ke.Z})],yt.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)()],yt.prototype,"intersectingName",void 0),(0,r._)([(0,v.Cb)()],yt.prototype,"level",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Name"}}})],yt.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ObjectID"}}})],yt.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],yt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Sequence"}}})],yt.prototype,"sequence",void 0),(0,r._)([(0,v.Cb)()],yt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.StopID"}}})],yt.prototype,"stopId",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],yt.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.TowardName"}}})],yt.prototype,"towardName",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],yt.prototype,"type",void 0),(0,r._)([(0,v.Cb)()],yt.prototype,"voiceInstruction",void 0),yt=mt=(0,r._)([(0,_.j)("esri.rest.support.DirectionPoint")],yt);const bt=yt;var ht;let ft=ht=class extends((0,Ce.J)(B.wq)){constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.type="point-barrier"}readCosts(e,t){return Ee(t.attributes,"Attr_")}writeCosts(e,t){Be(e,t,"Attr_")}static fromGraphic(e){return new ht({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?le.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Re(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?re.fromJSON(e.attributes.CurbApproach):null,fullEdge:null!=e.attributes.FullEdge?ae.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:null!=e.attributes.Status?se.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:null!=this.barrierType?le.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Le(this.costs)):null,CurbApproach:null!=this.curbApproach?re.toJSON(this.curbApproach):null,FullEdge:null!=this.fullEdge?ae.toJSON(this.fullEdge):null,Name:this.name,Status:null!=this.status?se.toJSON(this.status):null};return new n.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ft.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAIntYesNo",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}}],ft.popupInfo={title:"Point Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AddedCost",label:"Added Cost",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,v.Cb)()],ft.prototype,"addedCost",void 0),(0,r._)([(0,v.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],ft.prototype,"barrierType",void 0),(0,r._)([(0,v.Cb)()],ft.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],ft.prototype,"readCosts",null),(0,r._)([(0,S.c)("costs")],ft.prototype,"writeCosts",null),(0,r._)([(0,v.Cb)({constructOnly:!0,type:re.apiValues,json:{read:{source:"attributes.CurbApproach",reader:re.read}}})],ft.prototype,"curbApproach",void 0),(0,r._)([(0,v.Cb)({type:ae.apiValues,json:{name:"attributes.FullEdge",read:{reader:ae.read},write:{writer:ae.write}}})],ft.prototype,"fullEdge",void 0),(0,r._)([(0,v.Cb)({type:Ke.Z,json:{write:!0}})],ft.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.Name"}})],ft.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.ObjectID"}})],ft.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],ft.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)({type:ne.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ne.read}}})],ft.prototype,"sideOfEdge",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SourceID"}}})],ft.prototype,"sourceId",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SourceOID"}}})],ft.prototype,"sourceOid",void 0),(0,r._)([(0,v.Cb)({type:se.apiValues,json:{read:{source:"attributes.Status",reader:se.read}}})],ft.prototype,"status",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],ft.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],ft.prototype,"type",void 0),ft=ht=(0,r._)([(0,_.j)("esri.rest.support.PointBarrier")],ft);const vt=ft;var gt,Tt=i(38913);let wt=gt=class extends((0,Ce.J)(B.wq)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polygon-barrier"}readCosts(e,t){return Ee(t.attributes,"Attr_")}writeCosts(e,t){Be(e,t,"Attr_")}static fromGraphic(e){return new gt({barrierType:null!=e.attributes.BarrierType?le.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Re(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?le.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Le(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new n.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};wt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],wt.popupInfo={title:"Polygon Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,v.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],wt.prototype,"barrierType",void 0),(0,r._)([(0,v.Cb)()],wt.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],wt.prototype,"readCosts",null),(0,r._)([(0,S.c)("costs")],wt.prototype,"writeCosts",null),(0,r._)([(0,v.Cb)({type:Tt.Z,json:{write:!0}})],wt.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.Name"}})],wt.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.ObjectID"}})],wt.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],wt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)()],wt.prototype,"scaleFactor",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],wt.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],wt.prototype,"type",void 0),wt=gt=(0,r._)([(0,_.j)("esri.rest.support.PolygonBarrier")],wt);const _t=wt;var St;let Ct=St=class extends((0,Ce.J)(B.wq)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polyline-barrier"}readCosts(e,t){return Ee(t.attributes,"Attr_")}static fromGraphic(e){return new St({barrierType:null!=e.attributes.BarrierType?le.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Re(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?le.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Le(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new n.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Ct.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],Ct.popupInfo={title:"Line Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,v.Cb)({type:le.apiValues,json:{read:{source:"attributes.BarrierType",reader:le.read}}})],Ct.prototype,"barrierType",void 0),(0,r._)([(0,v.Cb)()],Ct.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],Ct.prototype,"readCosts",null),(0,r._)([(0,v.Cb)({type:Ye.Z,json:{write:!0}})],Ct.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.Name"}})],Ct.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.ObjectID"}})],Ct.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],Ct.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)()],Ct.prototype,"scaleFactor",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Ct.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],Ct.prototype,"type",void 0),Ct=St=(0,r._)([(0,_.j)("esri.rest.support.PolylineBarrier")],Ct);const Nt=Ct;let Ot=class extends B.wq{constructor(e){super(e),this.accumulateAttributes=null,this.directionsLanguage=null,this.findBestSequence=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.startTimeIsUTC=null,this.timeWindowsAreUTC=null,this.travelMode=null}readAccumulateAttributes(e){return null==e?null:e.map((e=>ye.fromJSON(e)))}writeAccumulateAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>ye.toJSON(e))))}};(0,r._)([(0,v.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Ot.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],Ot.prototype,"readAccumulateAttributes",null),(0,r._)([(0,S.c)("accumulateAttributes")],Ot.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Ot.prototype,"directionsLanguage",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"findBestSequence",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"preserveFirstStop",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"preserveLastStop",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,v.Cb)({type:Oe,json:{write:!0}})],Ot.prototype,"travelMode",void 0),Ot=(0,r._)([(0,_.j)("esri.layers.support.RouteSettings")],Ot);const At=Ot;var Dt;let It=Dt=class extends((0,Ce.J)(B.wq)){constructor(e){super(e),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.type="route-info",this.version="1.0.0"}readEndTime(e,t){return null!=t.attributes.EndTimeUTC?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return Pe(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Pe(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return Ee(t.attributes,"Total_")}readTotalViolations(e,t){return Ee(t.attributes,"TotalViolation_")}readTotalWait(e,t){return Ee(t.attributes,"TotalWait_")}static fromGraphic(e){return new Dt({analysisSettings:null!=e.attributes.AnalysisSettings?At.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:null!=e.attributes.EndTime?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:null!=e.attributes.Messages?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:null!=e.attributes.StartTime?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:null!=e.attributes.TotalCosts?Re(JSON.parse(e.attributes.TotalCosts)):null,totalDistance:e.attributes.TotalMeters??null,totalDuration:e.attributes.TotalMinutes??null,totalLateDuration:e.attributes.TotalLateMinutes??null,totalWaitDuration:e.attributes.TotalWaitMinutes??null,version:e.attributes.Version})}toGraphic(){const e={ObjectID:this.objectId,AnalysisSettings:null!=this.analysisSettings?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:null!=this.endTime?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:null!=this.messages?JSON.stringify(this.messages):null,RouteName:this.name,StartTime:null!=this.startTime?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:null!=this.totalCosts?JSON.stringify(Le(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new n.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};It.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"EndUTCOffset",alias:"End Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Messages",alias:"Analysis Messages",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:1024,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"StartUTCOffset",alias:"Start Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Version",alias:"Version",type:"esriFieldTypeString",length:16,editable:!0,nullable:!0,visible:!0,domain:null}],It.popupInfo={title:"Route Details",fieldInfos:[{fieldName:"RouteName",label:"Route Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TotalMinutes",label:"Total Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalMeters",label:"Total Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalLateMinutes",label:"Total Late Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalWaitMinutes",label:"Total Wait Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalCosts",label:"Total Costs",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"StartTime",label:"Start Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"StartUTCOffset",label:"Start Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"EndTime",label:"End Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"EndUTCOffset",label:"End Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Messages",label:"Analysis Messages",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"AnalysisSettings",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"Version",label:"Version",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,v.Cb)()],It.prototype,"analysisSettings",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"endTime",void 0),(0,r._)([(0,w.r)("endTime",["attributes.EndTimeUTC"])],It.prototype,"readEndTime",null),(0,r._)([(0,v.Cb)()],It.prototype,"endTimeOffset",void 0),(0,r._)([(0,w.r)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],It.prototype,"readEndTimeOffset",null),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.FirstStopID"}}})],It.prototype,"firstStopId",void 0),(0,r._)([(0,v.Cb)({type:Ye.Z})],It.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.LastStopID"}}})],It.prototype,"lastStopId",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"messages",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Name"}}})],It.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ObjectID"}}})],It.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],It.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime",["attributes.StartTimeUTC"])],It.prototype,"readStartTime",null),(0,r._)([(0,v.Cb)()],It.prototype,"startTimeOffset",void 0),(0,r._)([(0,w.r)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],It.prototype,"readStartTimeOffset",null),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.StopCount"}}})],It.prototype,"stopCount",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],It.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"totalCosts",void 0),(0,r._)([(0,w.r)("totalCosts",["attributes"])],It.prototype,"readTotalCosts",null),(0,r._)([(0,v.Cb)()],It.prototype,"totalDistance",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"totalDuration",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"totalLateDuration",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"totalViolations",void 0),(0,r._)([(0,w.r)("totalViolations",["attributes"])],It.prototype,"readTotalViolations",null),(0,r._)([(0,v.Cb)()],It.prototype,"totalWait",void 0),(0,r._)([(0,w.r)("totalWait",["attributes"])],It.prototype,"readTotalWait",null),(0,r._)([(0,v.Cb)()],It.prototype,"totalWaitDuration",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],It.prototype,"type",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"version",void 0),It=Dt=(0,r._)([(0,_.j)("esri.rest.support.RouteInfo")],It);const Ft=It,xt={type:String,json:{read:{source:"token"},write:{target:"token"}}};var jt=i(33955);let Mt=class extends((0,Ce.J)(B.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,v.Cb)({types:s.qM,json:{read:jt.im,write:!0}})],Mt.prototype,"geometry",void 0),(0,r._)([(0,H.J)(fe)],Mt.prototype,"geometryType",void 0),(0,r._)([(0,v.Cb)({type:String,json:{name:"layerName",write:!0}})],Mt.prototype,"name",void 0),(0,r._)([(0,H.J)(he,{name:"spatialRel"})],Mt.prototype,"spatialRelationship",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Mt.prototype,"type",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Mt.prototype,"where",void 0),Mt=(0,r._)([(0,_.j)("esri.rest.support.DataLayer")],Mt);const Et=Mt;var Bt;let Rt=Bt=class extends Ue.Z{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Bt({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Rt.prototype,"doNotLocateOnRestrictedElements",void 0),Rt=Bt=(0,r._)([(0,_.j)("esri.rest.support.NetworkFeatureSet")],Rt);const Lt=Rt;let Pt=class extends((0,Ce.J)(B.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Pt.prototype,"url",void 0),Pt=(0,r._)([(0,_.j)("esri.rest.support.NetworkUrl")],Pt);const Jt=Pt;var Ut;let Zt=Ut=class extends((0,Ce.J)(B.wq)){constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsOutputType=null,this.directionsStyleName=null,this.directionsTimeAttribute=null,this.findBestSequence=null,this.geometryPrecision=null,this.geometryPrecisionM=null,this.geometryPrecisionZ=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.overrides=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.preserveObjectID=null,this.restrictionAttributes=null,this.restrictUTurns=null,this.returnBarriers=!1,this.returnDirections=!1,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(e){return(0,g.TJ)(Ut,e)}readAccumulateAttributes(e){return null==e?null:e.map((e=>ye.fromJSON(e)))}writeAccumulateAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>ye.toJSON(e))))}writePointBarriers(e,t,i){Vt(e,t,i)}writePolygonBarrier(e,t,i){Vt(e,t,i)}writePolylineBarrier(e,t,i){Vt(e,t,i)}readRestrictionAttributes(e){return null==e?null:e.map((e=>be.fromJSON(e)))}writeRestrictionAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>be.toJSON(e))))}readStartTime(e,t){const{startTime:i}=t;return null==i?null:"now"===i?"now":new Date(i)}writeStartTime(e,t){null!=e&&(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?Et.fromJSON(e):function(e){return e&&"url"in e}(e)?Jt.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Lt.fromJSON(e):function(e){return e&&"features"in e}(e)?Ue.Z.fromJSON(e):null}(t.stops)}writeStops(e,t,i){Vt(e,t,i)}};(0,r._)([(0,v.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Zt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],Zt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,S.c)("accumulateAttributes")],Zt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.Cb)(xt)],Zt.prototype,"apiKey",void 0),(0,r._)([(0,v.Cb)({json:{write:!0}})],Zt.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Zt.prototype,"directionsLanguage",void 0),(0,r._)([(0,H.J)($)],Zt.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,H.J)(Q)],Zt.prototype,"directionsOutputType",void 0),(0,r._)([(0,H.J)(de)],Zt.prototype,"directionsStyleName",void 0),(0,r._)([(0,H.J)(me,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],Zt.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"findBestSequence",void 0),(0,r._)([(0,v.Cb)({type:Number,json:{write:!0}})],Zt.prototype,"geometryPrecision",void 0),(0,r._)([(0,v.Cb)({type:Number,json:{write:!0}})],Zt.prototype,"geometryPrecisionM",void 0),(0,r._)([(0,v.Cb)({type:Number,json:{write:!0}})],Zt.prototype,"geometryPrecisionZ",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,H.J)(ye,{name:"impedanceAttributeName",ignoreUnknown:!1})],Zt.prototype,"impedanceAttribute",void 0),(0,r._)([(0,v.Cb)({type:Number,json:{write:!0}})],Zt.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,H.J)(X)],Zt.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,H.J)(ee)],Zt.prototype,"outputLines",void 0),(0,r._)([(0,v.Cb)({type:tt.Z,json:{name:"outSR",write:!0}})],Zt.prototype,"outSpatialReference",void 0),(0,r._)([(0,v.Cb)({json:{write:!0}})],Zt.prototype,"overrides",void 0),(0,r._)([(0,v.Cb)({json:{name:"barriers",write:!0}})],Zt.prototype,"pointBarriers",void 0),(0,r._)([(0,S.c)("pointBarriers")],Zt.prototype,"writePointBarriers",null),(0,r._)([(0,v.Cb)({json:{write:!0}})],Zt.prototype,"polygonBarriers",void 0),(0,r._)([(0,S.c)("polygonBarriers")],Zt.prototype,"writePolygonBarrier",null),(0,r._)([(0,v.Cb)({json:{write:!0}})],Zt.prototype,"polylineBarriers",void 0),(0,r._)([(0,S.c)("polylineBarriers")],Zt.prototype,"writePolylineBarrier",null),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"preserveLastStop",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"preserveObjectID",void 0),(0,r._)([(0,v.Cb)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],Zt.prototype,"restrictionAttributes",void 0),(0,r._)([(0,w.r)("restrictionAttributes")],Zt.prototype,"readRestrictionAttributes",null),(0,r._)([(0,S.c)("restrictionAttributes")],Zt.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,H.J)(te)],Zt.prototype,"restrictUTurns",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnBarriers",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnDirections",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnRoutes",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnStops",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnTraversedEdges",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnTraversedJunctions",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnTraversedTurns",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnZ",void 0),(0,r._)([(0,v.Cb)({type:Date,json:{type:Number,write:!0}})],Zt.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime")],Zt.prototype,"readStartTime",null),(0,r._)([(0,S.c)("startTime")],Zt.prototype,"writeStartTime",null),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,v.Cb)({json:{write:!0}})],Zt.prototype,"stops",void 0),(0,r._)([(0,w.r)("stops")],Zt.prototype,"readStops",null),(0,r._)([(0,S.c)("stops")],Zt.prototype,"writeStops",null),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,v.Cb)({type:Oe,json:{write:!0}})],Zt.prototype,"travelMode",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"useHierarchy",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"useTimeWindows",void 0),Zt=Ut=(0,r._)([(0,_.j)("esri.rest.support.RouteParameters")],Zt);const kt=Zt;function Vt(e,t,i){null!=e&&(t[i]=p.Z.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}var zt;let Wt=zt=class extends((0,Ce.J)(B.wq)){constructor(e){super(e),this.arriveCurbApproach=null,this.arriveTime=null,this.arriveTimeOffset=null,this.bearing=null,this.bearingTol=null,this.cumulativeCosts=null,this.cumulativeDistance=null,this.cumulativeDuration=null,this.curbApproach=null,this.departCurbApproach=null,this.departTime=null,this.departTimeOffset=null,this.distanceToNetworkInMeters=null,this.geometry=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.posAlong=null,this.routeName=null,this.serviceCosts=null,this.serviceDistance=null,this.serviceDuration=null,this.sequence=null,this.sideOfEdge=null,this.snapX=null,this.snapY=null,this.snapZ=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.timeWindowEnd=null,this.timeWindowEndOffset=null,this.timeWindowStart=null,this.timeWindowStartOffset=null,this.type="stop",this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return Pe(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return Ee(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Pe(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Ee(t.attributes,"Attr_")}writeServiceCosts(e,t){Be(e,t,"Attr_")}writeTimeWindowEnd(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return Ee(t.attributes,"Violation_")}readWait(e,t){return Ee(t.attributes,"Wait_")}static fromGraphic(e){return new zt({arriveCurbApproach:null!=e.attributes.ArrivalCurbApproach?re.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:null!=e.attributes.CumulativeCosts?Re(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null!=e.attributes.CurbApproach?re.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?re.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:null!=e.attributes.DepartureTime?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:null!=e.attributes.LocationType?oe.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:null!=e.attributes.ServiceCosts?Re(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null!=e.attributes.Status?se.fromJSON(e.attributes.Status):null,symbol:e.symbol,timeWindowEnd:null!=e.attributes.TimeWindowEnd?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:null!=e.attributes.TimeWindowStart?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={ObjectID:this.objectId,ArrivalCurbApproach:null!=this.arriveCurbApproach?re.toJSON(this.arriveCurbApproach):null,ArrivalTime:null!=this.arriveTime?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:null!=this.cumulativeCosts?JSON.stringify(Le(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:null!=this.curbApproach?re.toJSON(this.curbApproach):null,DepartureCurbApproach:null!=this.departCurbApproach?re.toJSON(this.departCurbApproach):null,DepartureTime:null!=this.departTime?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:null!=this.locationType?oe.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:null!=this.serviceCosts?JSON.stringify(Le(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:null!=this.status?se.toJSON(this.status):null,TimeWindowEnd:null!=this.timeWindowEnd?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:null!=this.timeWindowStart?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:this.timeWindowStartOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new n.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Wt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Arrival Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"DepartureUTCOffset",alias:"Departure Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNALocationType",codedValues:[{name:"Stop",code:0},{name:"Waypoint",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowEndUTCOffset",alias:"Time Window End: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"WaitMinutes",alias:"Minutes Early",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1}],Wt.popupInfo={title:"{Name}",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"RouteName",label:"Route Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Arrival Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Arrival Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureTime",label:"Departure Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"DepartureUTCOffset",label:"Departure Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CurbApproach",label:"Curb Approach",isEditable:!0,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalCurbApproach",label:"Arrival Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureCurbApproach",label:"Departure Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Status",label:"Status",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"LocationType",label:"Location Type",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowStart",label:"Time Window Start",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowStartUTCOffset",label:"Time Window Start: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowEnd",label:"Time Window End",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowEndUTCOffset",label:"Time Window End: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMinutes",label:"Service Minutes",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMeters",label:"Service Meters",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceCosts",label:"Service Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"CumulativeMinutes",label:"Cumulative Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeMeters",label:"Cumulative Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeCosts",label:"Cumulative Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"LateMinutes",label:"Minutes Late",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"WaitMinutes",label:"Minutes Early",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,v.Cb)({type:re.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:re.read}}})],Wt.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,v.Cb)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],Wt.prototype,"arriveTime",void 0),(0,r._)([(0,v.Cb)()],Wt.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],Wt.prototype,"readArriveTimeOffset",null),(0,r._)([(0,v.Cb)({json:{name:"attributes.Bearing",read:!1,write:!0}})],Wt.prototype,"bearing",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],Wt.prototype,"bearingTol",void 0),(0,r._)([(0,v.Cb)()],Wt.prototype,"cumulativeCosts",void 0),(0,r._)([(0,w.r)("cumulativeCosts",["attributes"])],Wt.prototype,"readCumulativeCosts",null),(0,r._)([(0,v.Cb)()],Wt.prototype,"cumulativeDistance",void 0),(0,r._)([(0,v.Cb)()],Wt.prototype,"cumulativeDuration",void 0),(0,r._)([(0,v.Cb)({type:re.apiValues,json:{name:"attributes.CurbApproach",read:{reader:re.read},write:{writer:re.write}}})],Wt.prototype,"curbApproach",void 0),(0,r._)([(0,v.Cb)({type:re.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:re.read}}})],Wt.prototype,"departCurbApproach",void 0),(0,r._)([(0,v.Cb)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],Wt.prototype,"departTime",void 0),(0,r._)([(0,v.Cb)()],Wt.prototype,"departTimeOffset",void 0),(0,r._)([(0,w.r)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],Wt.prototype,"readDepartTimeOffset",null),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],Wt.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,v.Cb)({type:Ke.Z,json:{write:!0}})],Wt.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)()],Wt.prototype,"lateDuration",void 0),(0,r._)([(0,v.Cb)({type:oe.apiValues,json:{name:"attributes.LocationType",read:{reader:oe.read},write:{writer:oe.write}}})],Wt.prototype,"locationType",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.Name"}})],Wt.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],Wt.prototype,"navLatency",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.ObjectID"}})],Wt.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],Wt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.PosAlong"}}})],Wt.prototype,"posAlong",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.RouteName"}})],Wt.prototype,"routeName",void 0),(0,r._)([(0,v.Cb)()],Wt.prototype,"serviceCosts",void 0),(0,r._)([(0,w.r)("serviceCosts",["attributes"])],Wt.prototype,"readServiceCosts",null),(0,r._)([(0,S.c)("serviceCosts")],Wt.prototype,"writeServiceCosts",null),(0,r._)([(0,v.Cb)()],Wt.prototype,"serviceDistance",void 0),(0,r._)([(0,v.Cb)()],Wt.prototype,"serviceDuration",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.Sequence"}})],Wt.prototype,"sequence",void 0),(0,r._)([(0,v.Cb)({type:ne.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ne.read}}})],Wt.prototype,"sideOfEdge",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SnapX"}}})],Wt.prototype,"snapX",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SnapY"}}})],Wt.prototype,"snapY",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SnapZ"}}})],Wt.prototype,"snapZ",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SourceID"}}})],Wt.prototype,"sourceId",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SourceOID"}}})],Wt.prototype,"sourceOid",void 0),(0,r._)([(0,v.Cb)({type:se.apiValues,json:{read:{source:"attributes.Status",reader:se.read}}})],Wt.prototype,"status",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Wt.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],Wt.prototype,"timeWindowEnd",void 0),(0,r._)([(0,S.c)("timeWindowEnd")],Wt.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,v.Cb)()],Wt.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,v.Cb)({type:Date,json:{name:"attributes.TimeWindowStart"}})],Wt.prototype,"timeWindowStart",void 0),(0,r._)([(0,S.c)("timeWindowStart")],Wt.prototype,"writeTimeWindowStart",null),(0,r._)([(0,v.Cb)()],Wt.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],Wt.prototype,"type",void 0),(0,r._)([(0,v.Cb)()],Wt.prototype,"violations",void 0),(0,r._)([(0,w.r)("violations",["attributes"])],Wt.prototype,"readViolations",null),(0,r._)([(0,v.Cb)()],Wt.prototype,"waitDuration",void 0),(0,r._)([(0,v.Cb)()],Wt.prototype,"wait",void 0),(0,r._)([(0,w.r)("wait",["attributes"])],Wt.prototype,"readWait",null),Wt=zt=(0,r._)([(0,_.j)("esri.rest.support.Stop")],Wt);const qt=Wt;var Gt=i(65091);function Ht(e){return e.length?e:null}function Kt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Kt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Kt("esriGeometryPolyline")}}}function Xt(e){return"layers"in e}async function $t(e){const t=tt.Z.WGS84;return await(0,O.initializeProjection)(e.spatialReference,t),(0,O.project)(e,t)}function Yt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Qt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,h.En)(e,t,"meters")}const ei=p.Z.ofType(ct),ti=p.Z.ofType(bt),ii=p.Z.ofType(vt),ri=p.Z.ofType(_t),oi=p.Z.ofType(Nt),si=p.Z.ofType(qt),ni="esri.layers.RouteLayer",li=u.Z.getLogger(ni);let ai=class extends((0,I.h)((0,j.M)((0,F.q)((0,x.I)((0,c.R)(D.Z)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new k,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new ii,this.polygonBarriers=new ri,this.polylineBarriers=new oi,this.routeInfo=null,this.spatialReference=tt.Z.WGS84,this.stops=new si,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,b.on)((()=>this.stops),"change",t,{sync:!0,onListenerAdd:t}))}writeFeatureCollectionWebmap(e,t,i,r){const o=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter((e=>!!e)),s=o.map(((e,t)=>t)),n="web-map"===r.origin?"featureCollection.layers":"layers";(0,m.RB)(n,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>ct.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>bt.fromGraphic(e)))}get fullExtent(){const e=new N.Z({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:tt.Z.WGS84});if(null!=this.routeInfo?.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;const t=this.stops.filter((e=>null!=e.geometry));if(t.length<2)return e;const{spatialReference:i}=t.at(0).geometry;if(null==i)return e;const r=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new Gt.Z({points:r,spatialReference:i}).extent}readMaxScale(e,t){const i=Xt(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.maxScale));return r?.layerDefinition.maxScale??0}readMinScale(e,t){const i=Xt(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.minScale));return r?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>vt.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>_t.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>Nt.fromGraphic(e)))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",(e=>Ft.fromGraphic(e)));return i.length>0?i.at(0):null}readSpatialReference(e,t){const i=Xt(t)?t.layers:t.featureCollection?.layers;if(!i?.length)return tt.Z.WGS84;const{layerDefinition:r,featureSet:o}=i[0],s=o.features[0],n=s?.geometry?.spatialReference??o.spatialReference??r.spatialReference??r.extent.spatialReference??A.Zn;return tt.Z.fromJSON(n)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>qt.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return null!=this.routeInfo?.name?this.routeInfo.name:"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.default.routeServiceUrl}set url(e){null!=e?this._set("url",(0,M.Nm)(e,li)):this._set("url",o.default.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){null!=this.directionLines&&(this.directionLines.removeAll(),this._set("directionLines",null)),null!=this.directionPoints&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),null!=this.routeInfo&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new d.Z("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new d.Z("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new d.Z("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(null==this.routeInfo)throw new d.Z("routelayer:route-unsolved","save() requires a solved route");const{portal:i}=t;await i.signIn(),i.user||await t.reload();const{itemUrl:r,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new d.Z("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const s={messages:[],origin:"portal-item",portal:i,url:r?(0,f.mN)(r):void 0,writtenProperties:[]},n=this.write(void 0,s);return t.extent=await $t(e),t.title=this.title,await t.update({data:n}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new d.Z("routelayer:route-unsolved","saveAs() requires a solved route");const i=z.default.from(e).clone();i.extent??=await $t(this.fullExtent),i.id=null,i.portal??=V.Z.getDefault(),i.title??=this.title,i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection",W.Kz.MULTI_LAYER,"Route Layer"];const{portal:r}=i,o={messages:[],origin:"portal-item",portal:r,url:null,writtenProperties:[]};await r.signIn();const s=t?.folder,n=this.write(void 0,o);return await(r.user?.addItem({item:i,folder:s,data:n})),this.portalItem=i,(0,C.D)(o),o.portalItem=i,i}async solve(e,t){const i=e?.stops??this.stops,r=e?.pointBarriers??Ht(this.pointBarriers),o=e?.polylineBarriers??Ht(this.polylineBarriers),s=e?.polygonBarriers??Ht(this.polygonBarriers);if(null==i)throw new d.Z("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(i)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(i))&&i.features.length<2||p.Z.isCollection(i)&&i.length<2)throw new d.Z("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(p.Z.isCollection(i))for(const e of i)e.routeName=null;const n=e?.apiKey,l=this.url,a=await this._getServiceDescription(l,n,t),u=e?.travelMode??a.defaultTravelMode,c=e?.accumulateAttributes??[];null!=u&&(c.push(u.distanceAttributeName),u.timeAttributeName&&c.push(u.timeAttributeName));const m={startTime:new Date},b={accumulateAttributes:c,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:r,polylineBarriers:o,polygonBarriers:s,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!r,returnDirections:!0,returnPolygonBarriers:!!s,returnPolylineBarriers:!!o,returnRoutes:!0,returnStops:!0,stops:i},h=e?kt.from(e):new kt;for(const e in m)null==h[e]&&(h[e]=m[e]);let f;h.set(b);try{f=await async function(e,t,i){const r=[],o=[],s={},n={},l=(0,G.en)(e),{path:a}=l;ut(t.stops)&&Fe(t.stops.features,o,"stops.features",s),ut(t.pointBarriers)&&Fe(t.pointBarriers.features,o,"pointBarriers.features",s),ut(t.polylineBarriers)&&Fe(t.polylineBarriers.features,o,"polylineBarriers.features",s),ut(t.polygonBarriers)&&Fe(t.polygonBarriers.features,o,"polygonBarriers.features",s);const u=await(0,Me.aX)(o);for(const e in s){const t=s[e];r.push(e),n[e]=u.slice(t[0],t[1])}if(function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)if(null!=e&&e.hasZ)return!0}return!1}(n,r)){let e=null;try{e=await xe(a,t.apiKey,i)}catch{}e&&!e.hasZ&&function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)e.z=void 0}Ie.warnOnce("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(n,r)}for(const e in n)n[e].forEach(((i,r)=>{(0,je.U2)(t,e)[r].geometry=i}));const p={...i,query:{...l.query,...Je(t),f:"json"}},d=a.endsWith("/solve")?a:`${a}/solve`,{data:c}=await(0,q.Z)(d,p);return function(e){const{barriers:t,directionLines:i,directionPoints:r,directions:o,messages:s,polygonBarriers:n,polylineBarriers:l,routes:a,stops:u,traversedEdges:p,traversedJunctions:d,traversedTurns:c}=e,m=e=>{const t=b.find((t=>t.routeName===e));if(null!=t)return t;const i={routeId:b.length+1,routeName:e};return b.push(i),i},y=e=>{const t=b.find((t=>t.routeId===e));if(null!=t)return t;const i={routeId:e,routeName:null};return b.push(i),i},b=[];a?.features.forEach(((e,t)=>{e.geometry.spatialReference=a.spatialReference??void 0;const i=e.attributes.Name,r=t+1;b.push({routeId:r,routeName:i,route:e})})),o?.forEach((e=>{const{routeName:t}=e;m(t).directions=e}));const h=u?.features.every((e=>null==e.attributes.RouteName))&&b.length>0?b[0].routeName:null;return u?.features.forEach((e=>{e.geometry&&(e.geometry.spatialReference??=u.spatialReference??void 0);const t=h??e.attributes.RouteName,i=m(t);i.stops??=[],i.stops.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=y(t),{geometryType:o,spatialReference:s}=i;r.directionLines??={features:[],geometryType:o,spatialReference:s},r.directionLines.features.push(e)})),r?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:o,spatialReference:s}=r;i.directionPoints??={features:[],geometryType:o,spatialReference:s},i.directionPoints.features.push(e)})),p?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=p;i.traversedEdges??={features:[],geometryType:r,spatialReference:o},i.traversedEdges.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=d;i.traversedJunctions??={features:[],geometryType:r,spatialReference:o},i.traversedJunctions.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t);i.traversedTurns??={features:[]},i.traversedTurns.features.push(e)})),at.fromJSON({routeResults:b,barriers:t,polygonBarriers:n,polylineBarriers:l,messages:s})}(c)}(l,h,t)}catch(e){throw(0,y.D_)(e)?e:new d.Z("routelayer:failed-route-request","the routing request failed",{error:e})}const v=this._toRouteLayerSolution(f);return this._isOverridden("title")||(this.title=v.routeInfo.name??"Route"),function(e,t,i){const r=t.networkDataset?.networkAttributes,o=r?.filter((({usageType:e})=>"cost"===e))??[],s=i.travelMode??t.defaultTravelMode;if(null==s)return void li.warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");const{timeAttributeName:n,distanceAttributeName:l}=s,a=o.find((({name:e})=>e===n)),u=o.find((({name:e})=>e===l)),p=i.travelMode?.impedanceAttributeName??i.impedanceAttribute??t.impedance,c=a?.units,m=u?.units;if(!c||!m)throw new d.Z("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const y=i.directionsLanguage??t.directionsLanguage,b=i.accumulateAttributes??t.accumulateAttributeNames??[],h=new Set(o.filter((({name:e})=>e===n||e===l||e===p||null!=e&&b.includes(e))).map((({name:e})=>e))),f=e=>{for(const t in e)h.has(t)||delete e[t]};for(const t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[p]??0,f(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,f(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,f(t.costs));const{routeInfo:v}=e,{findBestSequence:g,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:_,timeWindowsAreUTC:S}=i;v.analysisSettings=new At({accumulateAttributes:b,directionsLanguage:y,findBestSequence:g,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:_,timeWindowsAreUTC:S,travelMode:s}),v.totalDuration=Yt(v.totalCosts?.[n]??0,c),v.totalDistance=Qt(v.totalCosts?.[l]??0,m),v.totalLateDuration=Yt(v.totalViolations?.[n]??0,c),v.totalWaitDuration=Yt(v.totalWait?.[n]??0,c),null!=v.totalCosts&&f(v.totalCosts),null!=v.totalViolations&&f(v.totalViolations),null!=v.totalWait&&f(v.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Yt(t.serviceCosts[n]??0,c),t.serviceDistance=Qt(t.serviceCosts[l]??0,m),f(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Yt(t.cumulativeCosts[n]??0,c),t.cumulativeDistance=Qt(t.cumulativeCosts[l]??0,m),f(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Yt(t.violations[n]??0,c),f(t.violations)),null!=t.wait&&(t.waitDuration=Yt(t.wait[n]??0,c),f(t.wait))}(v,a,h),v}update(e){const{stops:t,directionLines:i,directionPoints:r,pointBarriers:o,polylineBarriers:s,polygonBarriers:n,routeInfo:l}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:n}),this._set("directionLines",i),this._set("directionPoints",r),this._set("routeInfo",l),null!=l.geometry&&(this.spatialReference=l.geometry.spatialReference)}_getNetworkFeatures(e,t,i,r){const o=Xt(e)?e.layers:e.featureCollection?.layers,s=o?.find((e=>e.layerDefinition.name===t));if(null==s)return new p.Z;const{layerDefinition:u,popupInfo:d,featureSet:c}=s,m=u.drawingInfo.renderer,{features:y}=c,b=c.spatialReference??u.spatialReference??u.extent.spatialReference??A.Zn,h=m&&(0,a.a)(m),f=tt.Z.fromJSON(b),v=y.map((e=>{const r=n.Z.fromJSON(e);null!=r.geometry&&null!=e.geometry&&null==e.geometry.spatialReference&&(r.geometry.spatialReference=f);const o=i(r);return o.symbol??=h?.getSymbol(r)??this._getNetworkSymbol(t),o.popupTemplate??=d&&l.Z.fromJSON(d),o}));return r&&v.some((e=>!e.symbol))&&r(v),new p.Z(v)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}async _getServiceDescription(e,t,i){if(null!=this._cachedServiceDescription&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const r=await xe(e,t,i);return this._cachedServiceDescription={serviceDescription:r,url:e},r}_setStopSymbol(e){if(!e||0===e.length)return;if(null==this.defaultSymbols.stops)return;if(e.every((({symbol:e})=>null!=e)))return;const{first:t,last:i,middle:r,unlocated:o,waypoint:s,break:n}=this.defaultSymbols.stops;if(null==this.routeInfo||1===e.length)return void e.forEach(((o,s)=>{switch(s){case 0:o.symbol=t;break;case e.length-1:o.symbol=i;break;default:o.symbol=r}}));const l=e.map((({sequence:e})=>e)).filter((e=>null!=e)),a=Math.min(...l),u=Math.max(...l);for(const l of e)l.sequence!==a?l.sequence!==u?"ok"===l.status||"not-located-on-closest"===l.status?"waypoint"!==l.locationType?"break"!==l.locationType?l.symbol=r:l.symbol=n:l.symbol=s:l.symbol=o:l.symbol=i:l.symbol=t}_toRouteLayerSolution(e){const t=e.routeResults[0].stops?.map((e=>qt.fromJSON(e.toJSON())));this._setStopSymbol(t);const i=new si(t),r=new ri(e.polygonBarriers?.map((e=>{const t=_t.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),o=new oi(e.polylineBarriers?.map((e=>{const t=Nt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),s=new ii(e.pointBarriers?.map((e=>{const t=vt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),n=e.routeResults[0].route?.toJSON(),l=Ft.fromJSON(n);l.symbol=this.defaultSymbols.routeInfo;const a=new ti(e.routeResults[0].directionPoints?.features.map((e=>{const t=bt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new ei(e.routeResults[0].directionLines?.features.map((e=>{const t=ct.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:a,pointBarriers:s,polygonBarriers:r,polylineBarriers:o,routeInfo:l,stops:i}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",ct.fields,ct.popupInfo,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",bt.fields,bt.popupInfo,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,i,r,o,s,n){if(!e?.length)return null;const l=this.spatialReference.toJSON(),{fullExtent:a,maxScale:u,minScale:p}=this;return{featureSet:{features:e.toArray().map((e=>function(e){const{attributes:t,geometry:i,popupTemplate:r,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:i,popupInfo:r,symbol:o}}(e))),geometryType:i,spatialReference:l},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:null!=t?t.toJSON():Kt(i)}},extent:a.toJSON(),fields:r,geometryType:i,hasM:!1,hasZ:!1,maxScale:u,minScale:p,name:s,objectIdField:"ObjectID",spatialReference:l,title:n,type:"Feature Layer",typeIdField:""},popupInfo:o}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",vt.fields,vt.popupInfo,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",_t.fields,_t.popupInfo,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",Nt.fields,Nt.popupInfo,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new p.Z([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",Ft.fields,Ft.popupInfo,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",qt.fields,qt.popupInfo,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,i=t?.first?.toJSON(),r=t?.middle?.toJSON(),o=t?.last?.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:r,uniqueValueInfos:[{value:"1",symbol:i,label:"First Stop"},{value:`${this.stops.length}`,symbol:o,label:"Last Stop"}]},e}};(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],ai.prototype,"_featureCollection",void 0),(0,r._)([(0,S.c)(["web-map","portal-item"],"_featureCollection")],ai.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],ai.prototype,"_type",void 0),(0,r._)([(0,v.Cb)({nonNullable:!0,type:k})],ai.prototype,"defaultSymbols",void 0),(0,r._)([(0,v.Cb)({readOnly:!0})],ai.prototype,"directionLines",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],ai.prototype,"readDirectionLines",null),(0,r._)([(0,v.Cb)({readOnly:!0})],ai.prototype,"directionPoints",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],ai.prototype,"readDirectionPoints",null),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],ai.prototype,"featureCollectionType",void 0),(0,r._)([(0,v.Cb)({readOnly:!0})],ai.prototype,"fullExtent",null),(0,r._)([(0,v.Cb)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],ai.prototype,"legendEnabled",void 0),(0,r._)([(0,v.Cb)({type:["show","hide"]})],ai.prototype,"listMode",void 0),(0,r._)([(0,v.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ai.prototype,"maxScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],ai.prototype,"readMaxScale",null),(0,r._)([(0,v.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ai.prototype,"minScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],ai.prototype,"readMinScale",null),(0,r._)([(0,v.Cb)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],ai.prototype,"operationalLayerType",void 0),(0,r._)([(0,v.Cb)({nonNullable:!0,type:p.Z.ofType(vt)})],ai.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],ai.prototype,"readPointBarriers",null),(0,r._)([(0,v.Cb)({nonNullable:!0,type:p.Z.ofType(_t)})],ai.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],ai.prototype,"readPolygonBarriers",null),(0,r._)([(0,v.Cb)({nonNullable:!0,type:p.Z.ofType(Nt)})],ai.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],ai.prototype,"readPolylineBarriers",null),(0,r._)([(0,v.Cb)({readOnly:!0})],ai.prototype,"routeInfo",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],ai.prototype,"readRouteInfo",null),(0,r._)([(0,v.Cb)({type:tt.Z})],ai.prototype,"spatialReference",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],ai.prototype,"readSpatialReference",null),(0,r._)([(0,v.Cb)({nonNullable:!0,type:p.Z.ofType(qt)})],ai.prototype,"stops",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],ai.prototype,"readStops",null),(0,r._)([(0,v.Cb)()],ai.prototype,"title",null),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],ai.prototype,"type",void 0),(0,r._)([(0,v.Cb)()],ai.prototype,"url",null),ai=(0,r._)([(0,_.j)(ni)],ai);const ui=ai},16859:(e,t,i)=>{i.d(t,{I:()=>_});var r=i(43697),o=i(68773),s=i(40330),n=i(3172),l=i(66643),a=i(20102),u=i(92604),p=i(70586),d=i(95330),c=i(17452),m=i(5600),y=(i(75215),i(67676),i(80442),i(71715)),b=i(52011),h=i(30556),f=i(84230),v=i(48522),g=i(15235),T=i(86082),w=i(14661);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(8062).then(i.bind(i,18062));return(0,d.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.r9)(e),!0))))}async setUserPrivileges(e,t){if(!o.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,d.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,w.Ss)(i);let o,n;if(r)o=i.portal.url;else try{o=await(0,f.oP)(this.url,t)}catch(e){(0,d.r9)(e)}if(!o||!(0,c.Zo)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.r9)(e)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await i.reload():(i=new g.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return(0,w.Ss)(i)}catch(e){(0,d.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,o=v.Z.getDefault();if(o&&o.loaded&&(0,c.Fv)(o.restUrl)===(0,c.Fv)(r))return o.user;const a=`${r}/community/self`,u=null!=e?e.signal:null,p=await(0,l.q6)((0,n.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?T.Z.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||v.Z.getDefault());return i&&r&&!(0,c.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,m.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,h.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,b.j)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},1231:(e,t,i)=>{i.d(t,{Z:()=>h});var r,o=i(43697),s=i(35454),n=i(96674),l=i(5600),a=i(75215),u=(i(67676),i(80442),i(36030)),p=i(71715),d=i(52011),c=i(72729),m=i(86719);const y=new s.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let b=r=class extends n.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?y.fromJSON(i.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],b.prototype,"alias",void 0),(0,o._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],b.prototype,"defaultValue",void 0),(0,o._)([(0,l.Cb)()],b.prototype,"description",void 0),(0,o._)([(0,p.r)("description")],b.prototype,"readDescription",null),(0,o._)([(0,l.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],b.prototype,"domain",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],b.prototype,"editable",void 0),(0,o._)([(0,l.Cb)({type:a.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],b.prototype,"length",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],b.prototype,"name",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],b.prototype,"nullable",void 0),(0,o._)([(0,u.J)(m.v)],b.prototype,"type",void 0),(0,o._)([(0,l.Cb)()],b.prototype,"valueType",void 0),(0,o._)([(0,p.r)("valueType",["description"])],b.prototype,"readValueType",null),(0,o._)([(0,l.Cb)({type:Boolean,json:{read:!1}})],b.prototype,"visible",void 0),b=r=(0,o._)([(0,d.j)("esri.layers.support.Field")],b);const h=b},99514:(e,t,i)=>{i.d(t,{Z:()=>c});var r=i(20102),o=i(96674),s=i(92604),n=i(30175),l=i(1542),a=i(69165),u=i(25031),p=i(17126);const d=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],h(e))}static fromLayerJSON(e){return new c(e.fields??[],h(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 i=[];for(const e of this.fields){const t=e?.name,r=y(t);if(t&&r){const o=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(o,e),this._normalizedFieldsMap.set(r,e),i.push(`${o}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.Dl)(e)||(0,a.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.Dl)(e)||(0,a.Se)(e)||e.nullable||void 0!==(0,a.os)(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(m(e))??this._normalizedFieldsMap.get(y(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?(s.Z.getLogger("esri.layers.support.FieldsIndex").error(new r.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.pt):b.has(t.type)?u._4:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u._4?l.yV.instance:t===u.pt?p.Qf.utcInstance:(0,n.s1)(d,t,(()=>p.vF.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.sX)(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,o.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function y(e){return(0,a.q6)(e)?.toLowerCase()??""}const b=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function h(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:o}=e,s=(r?"startField"in r?r.startField:r.startTimeField:"")??"",n=(r?"endField"in r?r.endField:r.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.Jv)(e.dateFieldsTimeReference):null,a=o?function(e){return"timeZone"in e}(o)?o.timeZone??l:o.dateFieldsTimeReference?(0,u.Jv)(o.dateFieldsTimeReference):l??u.pt:null,p=r?function(e){return"timeZone"in e}(r)?r.timeZone??l:r.timeReference?(0,u.Jv)(r.timeReference):l:null,d=new Map([[m(o?.creationDateField??""),a],[m(o?.editDateField??""),a],[m(s),p],[m(n),p]]);for(const{name:r,type:o}of e.fields)if(b.has(o))t.set(r,u._4);else if("date"!==o&&"esriFieldTypeDate"!==o)t.set(r,null);else if(i)t.set(r,u._4);else{const e=d.get(m(r??""))??l;t.set(r,e)}return t}},72729:(e,t,i)=>{i.d(t,{im:()=>C,V5:()=>S}),i(80442);var r,o=i(43697),s=i(22974),n=i(5600),l=(i(75215),i(36030)),a=i(52011),u=i(96674);i(67676);let p=r=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,o._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,o._)([(0,n.Cb)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=r=(0,o._)([(0,a.j)("esri.layers.support.CodedValue")],p);const d=new(i(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,n.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,l.J)(d)],c.prototype,"type",void 0),c=(0,o._)([(0,a.j)("esri.layers.support.Domain")],c);const m=c;var y;let b=y=class extends m{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,s.d9)(this.codedValues),name:this.name})}};(0,o._)([(0,n.Cb)({type:[p],json:{write:!0}})],b.prototype,"codedValues",void 0),(0,o._)([(0,l.J)({codedValue:"coded-value"})],b.prototype,"type",void 0),b=y=(0,o._)([(0,a.j)("esri.layers.support.CodedValueDomain")],b);const h=b;var f;i(92604),i(20102);let v=f=class extends m{constructor(e){super(e),this.type="inherited"}clone(){return new f}};(0,o._)([(0,l.J)({inherited:"inherited"})],v.prototype,"type",void 0),v=f=(0,o._)([(0,a.j)("esri.layers.support.InheritedDomain")],v);const g=v;var T;let w=T=class extends m{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new T({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,n.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,o._)([(0,n.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,o._)([(0,l.J)({range:"range"})],w.prototype,"type",void 0),w=T=(0,o._)([(0,a.j)("esri.layers.support.RangeDomain")],w);const _=w,S={key:"type",base:m,typeMap:{range:w,"coded-value":h,inherited:g}};function C(e){if(!e?.type)return null;switch(e.type){case"range":return _.fromJSON(e);case"codedValue":return h.fromJSON(e);case"inherited":return g.fromJSON(e)}return null}},86719:(e,t,i)=>{i.d(t,{v:()=>r});const r=new(i(35454).X)({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"})},74889:(e,t,i)=>{i.d(t,{Z:()=>g});var r,o=i(43697),s=i(66577),n=i(38171),l=i(35454),a=i(96674),u=i(22974),p=i(5600),d=(i(75215),i(71715)),c=i(52011),m=i(30556),y=i(82971),b=i(33955),h=i(1231);const f=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=r=class extends a.wq{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 i=y.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=n.Z.fromJSON(o),l=o.geometry?.spatialReference;null==s.geometry||l||(s.geometry.spatialReference=i);const a=o.aggregateGeometries,u=s.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],o=r?.spatialReference;null==t||o||(t.spatialReference=i)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void f.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void f.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,b.im)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=y.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)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,u.d9)({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 i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,s=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/i)));for(let e=0,t=s.length;e<t;e++)n?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,o],scale:[s,n]}=i;let l=null,a=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;a=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*n),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,o;const s=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=i(l[1]);e===r&&n===o||(s.push([e-r,n-o]),r=e,o=n)}else r=t(l[0]),o=i(l[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,b.oU)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],n=this._quantizePoints(s,t,i);n&&o.push(n)}return o.length>0?((0,b.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,b.oU)(e)?e.rings:e.paths;let n,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?(n+=o[0],l+=o[1]):(n=o[0],l=o[1]),o[0]=t(n),o[1]=i(l)}}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=o(i[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=o(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(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 n,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(n+=r[0],l+=r[1]):(n=r[0],l=r[1]),r[0]=t(n),r[1]=i(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,p.Cb)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.Cb)({type:[n.Z],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,d.r)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,p.Cb)({type:[h.Z],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,m.c)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,p.Cb)({types:s.qM,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,d.r)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,p.Cb)({type:y.Z,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,m.c)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,p.Cb)({json:{write:!0}})],v.prototype,"transform",void 0),v=r=(0,o._)([(0,c.j)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const g=v},11282:(e,t,i)=>{i.d(t,{cv:()=>l,en:()=>n,lA:()=>s}),i(68773),i(40330);var r=i(22974),o=i(17452);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function n(e){return"string"==typeof e?(0,o.mN)(e):(0,r.d9)(e)}function l(e,t,i){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]=[];for(let e=0;e<s.length;e++)r[o][e]=l(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(i?.[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}i(71058)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6413,5732],{92835:(e,t,i)=>{i.d(t,{Z:()=>y});var r,s=i(43697),n=i(96674),o=i(35463),l=i(5600),a=(i(75215),i(67676),i(80442),i(71715)),u=i(52011),d=i(30556),h=i(25031);let c=r=class extends n.wq{static get allTime(){return p}static get empty(){return f}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(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===r&&i===s}expandTo(e,t=h.By){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.JE)(i,e,t));let s=this.end;if(s){const i=(0,o.JE)(s,e,t);s=s.getTime()===i.getTime()?i:(0,o.Nm)(i,1,e,t)}return new r({start:i,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,l;if(s>=t&&s<=i?o=s:t>=s&&t<=n&&(o=t),i>=s&&i<=n?l=i:n>=t&&n<=i&&(l=n),null!=o&&null!=l&&!isNaN(o)&&!isNaN(l)){const e=new r;return e.start=o===-1/0?null:new Date(o),e.end=l===1/0?null:new Date(l),e}return r.empty}offset(e,t,i=h.By){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:n,end:l}=this;return null!=n&&(s.start=(0,o.Nm)(n,e,t,i)),null!=l&&(s.end=(0,o.Nm)(l,e,t,i)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s._)([(0,a.r)("end")],c.prototype,"readEnd",null),(0,s._)([(0,d.c)("end")],c.prototype,"writeEnd",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s._)([(0,a.r)("start")],c.prototype,"readStart",null),(0,s._)([(0,d.c)("start")],c.prototype,"writeStart",null),c=r=(0,s._)([(0,u.j)("esri.TimeExtent")],c);const p=new c,f=new c({start:void 0,end:void 0}),y=c},5732:(e,t,i)=>{i.d(t,{c:()=>r,g:()=>s});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},2368:(e,t,i)=>{i.d(t,{J:()=>d,j:()=>h});var r=i(43697),s=i(92036),n=(i(80442),i(22974)),o=(i(92604),i(70586)),l=i(31263),a=i(1153),u=i(52011);const d=e=>{let t=class extends e{clone(){const e=(0,a.vw)(this);(0,o.O3)(e,"unable to clone instance of non-accessor class");const t=e.metadatas,i=e.store,r={},s=new Map;for(const e in t){const o=t[e],a=i?.originOf(e),u=o.clonable;if(o.readOnly||!1===u||a!==l.s3.USER&&a!==l.s3.DEFAULTS&&a!==l.s3.WEB_MAP&&a!==l.s3.WEB_SCENE)continue;const d=this[e];let h=null;h="function"==typeof u?u(d):"reference"===u?d:(0,n.Vo)(d),null!=d&&null==h||(a===l.s3.DEFAULTS?s.set(e,h):r[e]=h)}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(s.size){const e=(0,a.vw)(u)?.store;if(e)for(const[t,i]of s)e.set(t,i,l.s3.DEFAULTS)}return u}};return t=(0,r._)([(0,u.j)("esri.core.Clonable")],t),t};let h=class extends(d(s.Z)){};h=(0,r._)([(0,u.j)("esri.core.Clonable")],h)},57435:(e,t,i)=>{i.d(t,{Z:()=>u});var r=i(43697),s=i(46791),n=(i(66643),i(20102),i(92604),i(26258),i(87538)),o=i(5600),l=i(52011);let a=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,n.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const i of e)null!=i&&(t=this._processCollection(t,i));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const i=this.itemFilterFunction??(e=>!!e);for(const r of t)if(r){if(i(r)){const t=this.indexOf(r,e);t>=0?t!==e&&this.reorder(r,e):this.add(r,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(r);if(Array.isArray(t))for(const i of t)e=this._processCollection(e,i);else e=this._processCollection(e,t)}}return e}};(0,r._)([(0,o.Cb)()],a.prototype,"getCollections",void 0),(0,r._)([(0,o.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,r._)([(0,o.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,r._)([(0,l.j)("esri.core.CollectionFlattener")],a);const u=a},13867:(e,t,i)=>{i.d(t,{z:()=>s});var r=i(69801);class s{constructor(e,t){this._storage=new r.WJ,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,i=1){this._storage.put(this,e,t,i,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(){}}},69801:(e,t,i)=>{i.d(t,{WJ:()=>l,Xq:()=>o});var r,s,n=i(44553);(s=r||(r={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class o{constructor(e,t,i){this.name=e,this._storage=t,this.id=a+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),i&&(this._storage.registerRemoveFunc(this.id,i),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 sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,i,r=0){this._storage.put(this,e,t,i,r)}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)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,i){this._storage.updateSize(this,e,t,i)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class l{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 n.Z,this._users=new n.Z}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,0),this._checkSizeLimits()}put(e,t,i,s,n){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!==i&&this._notifyRemove(t,o.entry,r.ALL)),s>this._maxSize)return void this._notifyRemove(t,i,r.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,r.ALL);const l=1+Math.max(n,-3)- -3;this._db.set(t,{entry:i,size:s,lifetime:l,lives:l}),this._size+=s,e.size+=s,this._checkSizeLimits()}updateSize(e,t,i,s){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===i){for(this._size-=n.size,e.size-=n.size;s>this._maxSize;){const e=this._notifyRemove(t,i,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}n.size=s,this._size+=s,e.size+=s,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.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={},i=new Array;this._db.forEach(((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forAll((i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}}))}));const r={};this._users.forAll((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"}));const s=Object.keys(t);s.sort(((e,i)=>t[i]-t[e])),s.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]));for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/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,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,r.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i){let r;return this._removeFuncs.some((s=>{if(e.startsWith(s[0])){const e=s[1](t,i);return"number"==typeof e&&(r=e),!0}return!1})),r}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,i]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,i,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,i=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,r.SOME);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let a=0},22862:(e,t,i)=>{i.d(t,{Hg:()=>f,V7:()=>p,uD:()=>c});var r=i(92036),s=i(46791),n=i(1153);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof r.Z}function a(e){return e instanceof s.Z?Object.keys(e.items):l(e)?(0,n.vw)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.Z?e.items[t]:e[t]}function d(e){return e?e.declaredClass:null}function h(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const r=a(e),s=a(t);if(0===r.length&&0===s.length)return;if(!r.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=s.filter((e=>!r.includes(e))),c=r.filter((e=>!s.includes(e))),p=r.filter((i=>s.includes(i)&&u(e,i)!==u(t,i))).concat(n,c).sort(),f=d(e);if(f&&o.has(f)&&p.length)return{type:"complete",oldValue:e,newValue:t};let y;const m=l(e)&&l(t);for(const r of p){const s=u(e,r),n=u(t,r);let o;if((m||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(i&&i[r]&&"function"==typeof i[r])o=i[r]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;o={type:"complete",oldValue:s,newValue:n}}else o="object"==typeof s&&"object"==typeof n&&d(s)===d(n)?h(s,n):{type:"complete",oldValue:s,newValue:n};null!=o&&(null!=y?y.diff[r]=o:y={type:"partial",diff:{[r]:o}})}}return y}function c(e,t){if(null==e)return!1;const i=t.split(".");let r=e;for(const e of i){if("complete"===r.type)return!0;if("partial"!==r.type)return!1;{const t=r.diff[e];if(!t)return!1;r=t}}return!0}function p(e,t){for(const i of t)if(c(e,i))return!0;return!1}function f(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&d(e)!==d(t)?{type:"complete",oldValue:e,newValue:t}:h(e,t)}},17445:(e,t,i)=>{i.d(t,{N1:()=>c,YP:()=>a,Z_:()=>y,gx:()=>u,nn:()=>m,on:()=>h,tX:()=>g}),i(66643),i(46791);var r=i(91460),s=i(50758),n=i(70586),o=i(95330),l=i(26258);function a(e,t,i={}){return d(e,t,i,p)}function u(e,t,i={}){return d(e,t,i,f)}function d(e,t,i={},r){let s=null;const o=i.once?(e,i)=>{r(e)&&((0,n.hw)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,l.aQ)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return s}function h(e,t,i,o={}){let l=null,u=null,d=null;function h(){l&&u&&(u.remove(),o.onListenerRemove?.(l),l=null,u=null)}function c(e){o.once&&o.once&&(0,n.hw)(d),i(e)}const p=a(e,((e,i)=>{h(),(0,r.vT)(e)&&(l=e,u=(0,r.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return d=(0,s.kB)((()=>{p.remove(),h()})),d}function c(e,t){return function(e,t,i){if((0,o.Hc)(i))return Promise.reject((0,o.zE)());const r=e();if(t?.(r))return Promise.resolve(r);let l=null;function a(){l=(0,n.hw)(l)}return new Promise(((r,n)=>{l=(0,s.AL)([(0,o.fu)(i,(()=>{a(),n((0,o.zE)())})),d(e,(e=>{a(),r(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}i(87538);const y={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},1542:(e,t,i)=>{i.d(t,{A4:()=>n,L9:()=>o,yV:()=>s});var r=i(17126);class s{}function n(e){return e instanceof r.ld?e===s.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return n(e)?s.instance:e}s.instance=new r.vF("Etc/UTC")},60437:(e,t,i)=>{i.d(t,{G_:()=>_,HH:()=>o,JR:()=>f,TC:()=>l,Tn:()=>h,Ue:()=>s,al:()=>n,bZ:()=>y,cS:()=>p,dp:()=>u,fS:()=>g,is:()=>m,op:()=>d,pp:()=>a,t8:()=>c});var r=i(6570);function s(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,i,r,n,o,l=s()){return l[0]=e,l[1]=t,l[2]=i,l[3]=r,l[4]=n,l[5]=o,l}function o(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new r.Z(i?{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 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[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function h(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function c(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 p(e){return e?c(e,_):s(_)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function y(e,t,i,r,s){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function m(e){return 6===e.length}function g(e,t,i){if(null==e||null==t)return e===t;if(!m(e)||!m(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(24470);const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];s()},42756:(e,t,i)=>{i.r(t),i.d(t,{default:()=>U});var r=i(43697),s=(i(66577),i(46791)),n=i(57435),o=i(16453),l=i(95330),a=i(17445),u=i(17452),d=i(5600),h=i(75215),c=(i(67676),i(80442),i(71715)),p=i(52011),f=i(30556),y=i(82971),m=i(87085),g=i(71612),_=i(38009),b=i(16859),v=i(34760),w=i(72965),S=i(21506),F=i(32448),T=i(96674),C=i(83379),x=i(19153),I=i(68773),z=i(40330),E=(i(51773),i(3172)),P=i(22974),M=i(60437),N=i(20322);i(91423),i(74889);const R={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function O(e){const t=e.folders||[],i=t.slice(),r=new Map,s=new Map,n=new Map,o=new Map,l=new Map,a={esriGeometryPoint:s,esriGeometryPolyline:n,esriGeometryPolygon:o};(e.featureCollection?.layers||[]).forEach((e=>{const t=(0,P.d9)(e);t.featureSet.features=[];const i=e.featureSet.geometryType;r.set(i,t);const l=e.layerDefinition.objectIdField;"esriGeometryPoint"===i?L(s,l,e.featureSet.features):"esriGeometryPolyline"===i?L(n,l,e.featureSet.features):"esriGeometryPolygon"===i&&L(o,l,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((e=>{l.set(e.id,e)})),t.forEach((t=>{t.networkLinkIds.forEach((r=>{const s=function(e,t,i){const r=function(e,t){let i;return t.some((t=>t.id===e&&(i=t,!0))),i}(e,i);return r&&(r.parentFolderId=t,r.networkLink=r),r}(r,t.id,e.networkLinks);s&&i.push(s)}))})),i.forEach((e=>{if(e.featureInfos){e.points=(0,P.d9)(r.get("esriGeometryPoint")),e.polylines=(0,P.d9)(r.get("esriGeometryPolyline")),e.polygons=(0,P.d9)(r.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const i=a[t.type].get(t.id);i&&e[R[t.type]]?.featureSet.features.push(i);break}case"GroundOverlay":{const i=l.get(t.id);i&&e.mapImages.push(i);break}}e.fullExtent=k([e])}}));const u=k(i);return{folders:t,sublayers:i,extent:u}}function Z(e,t,i,r){const s=z.id?.findCredential(e);e=(0,u.fl)(e,{token:s?.token});const n=I.default.kmlServiceUrl;return(0,E.Z)(n,{query:{url:e,model:"simple",folders:"",refresh:0!==i||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:r})}function j(e,t,i=null,r=[]){const s=[],n={},o=t.sublayers,l=new Set(t.folders.map((e=>e.id)));return o.forEach((t=>{const o=new e;if(i?o.read(t,i):o.read(t),r.length&&l.has(o.id)&&(o.visible=r.includes(o.id)),n[t.id]=o,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=n[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(o)}else s.unshift(o)})),s}function L(e,t,i){i.forEach((i=>{e.set(i.attributes[t],i)}))}function k(e){const t=(0,M.Ue)(M.G_),i=(0,M.Ue)(M.G_);for(const r of e){if(r.polygons?.featureSet?.features)for(const e of r.polygons.featureSet.features)(0,N.Yg)(t,e.geometry),(0,M.TC)(i,t);if(r.polylines?.featureSet?.features)for(const e of r.polylines.featureSet.features)(0,N.Yg)(t,e.geometry),(0,M.TC)(i,t);if(r.points?.featureSet?.features)for(const e of r.points.featureSet.features)(0,N.Yg)(t,e.geometry),(0,M.TC)(i,t);if(r.mapImages)for(const e of r.mapImages)(0,N.Yg)(t,e.extent),(0,M.TC)(i,t)}return(0,M.fS)(i,M.G_)?void 0:{xmin:i[0],ymin:i[1],zmin:i[2],xmax:i[3],ymax:i[4],zmax:i[5],spatialReference:y.Z.WGS84}}var A,D=i(6570);let V=A=class extends(F.Z.EventedMixin((0,T.eC)(C.Z))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([(0,a.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),a.Z_),(0,a.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),a.Z_),(0,a.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),a.Z_),(0,a.YP)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),a.Z_)])}initialize(){(0,a.N1)((()=>this.networkLink)).then((()=>(0,a.N1)((()=>!0===this.visible)))).then((()=>this.load()))}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,i=this._fetchService(this._get("networkLink")?.href??"",t).then((e=>{const t=k(e.sublayers);this.fullExtent=D.Z.fromJSON(t),this.sourceJSON=e;const i=(0,h.se)(s.Z.ofType(A),j(A,e));this.sublayers?this.sublayers.addMany(i):this.sublayers=i,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")}));return this.addResolvingPromise(i),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}_fetchService(e,t){return Z(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then((e=>O(e.data)))}};(0,r._)([(0,d.Cb)()],V.prototype,"description",void 0),(0,r._)([(0,d.Cb)({type:D.Z})],V.prototype,"fullExtent",void 0),(0,r._)([(0,d.Cb)()],V.prototype,"id",void 0),(0,r._)([(0,d.Cb)({readOnly:!0,value:null})],V.prototype,"networkLink",void 0),(0,r._)([(0,d.Cb)({json:{write:{allowNull:!0}}})],V.prototype,"parent",void 0),(0,r._)([(0,d.Cb)({type:s.Z.ofType(V),json:{write:{allowNull:!0}}})],V.prototype,"sublayers",void 0),(0,r._)([(0,d.Cb)({value:null,json:{read:{source:"name",reader:e=>(0,x.Cb)(e)}}})],V.prototype,"title",void 0),(0,r._)([(0,d.Cb)({value:!0})],V.prototype,"visible",null),(0,r._)([(0,c.r)("visible",["visibility"])],V.prototype,"readVisible",null),(0,r._)([(0,d.Cb)()],V.prototype,"sourceJSON",void 0),(0,r._)([(0,d.Cb)()],V.prototype,"layer",void 0),V=A=(0,r._)([(0,p.j)("esri.layers.support.KMLSublayer")],V);const G=V,J=["kml","xml"];let q=class extends((0,g.h)((0,v.Q)((0,w.M)((0,_.q)((0,b.I)((0,o.R)(m.Z))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new n.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=y.Z.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.YP)((()=>this.sublayers),((e,t)=>{t&&t.forEach((e=>{e.parent=null,e.layer=null})),e&&e.forEach((e=>{e.parent=this,e.layer=this}))}),a.Z_),this.on("sublayer-update",(()=>this.notifyChange("fullExtent")))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,i){return j(G,t,i,this._visibleFolders)}writeSublayers(e,t){const i=[],r=e.toArray();for(;r.length;){const e=r[0];e.networkLink||(e.visible&&i.push(e.id),e.sublayers&&r.push(...e.sublayers.toArray())),r.shift()}t.visibleFolders=i}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.vt)(this.url,J)||"KML":e||""}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],i=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(i))};return e&&e.forEach(i),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(l.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=O((await Promise.resolve().then((()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:Z(this.url??"",this.outSpatialReference,this.refreshInterval,e)))).data);t&&this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=i=>{if(i.sublayers)for(const r of i.sublayers.items)t(r),r.visible&&r.fullExtent&&(null!=e?e.union(r.fullExtent):e=r.fullExtent.clone())};return t(this),e}};(0,r._)([(0,d.Cb)({readOnly:!0})],q.prototype,"allSublayers",void 0),(0,r._)([(0,d.Cb)({type:y.Z})],q.prototype,"outSpatialReference",void 0),(0,r._)([(0,d.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],q.prototype,"path",void 0),(0,r._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!1}})],q.prototype,"legendEnabled",void 0),(0,r._)([(0,d.Cb)({type:["show","hide","hide-children"]})],q.prototype,"listMode",void 0),(0,r._)([(0,d.Cb)({type:["KML"]})],q.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.Cb)({})],q.prototype,"resourceInfo",void 0),(0,r._)([(0,d.Cb)({type:s.Z.ofType(G),json:{write:{ignoreOrigin:!0}}})],q.prototype,"sublayers",void 0),(0,r._)([(0,c.r)(["web-map","portal-item"],"sublayers",["visibleFolders"])],q.prototype,"readSublayersFromItemOrWebMap",null),(0,r._)([(0,c.r)("service","sublayers",["sublayers"])],q.prototype,"readSublayers",null),(0,r._)([(0,f.c)("sublayers")],q.prototype,"writeSublayers",null),(0,r._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],q.prototype,"type",void 0),(0,r._)([(0,d.Cb)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],q.prototype,"title",null),(0,r._)([(0,d.Cb)(S.HQ)],q.prototype,"url",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],q.prototype,"visibleSublayers",null),(0,r._)([(0,d.Cb)({type:D.Z})],q.prototype,"extent",void 0),(0,r._)([(0,d.Cb)()],q.prototype,"fullExtent",null),q=(0,r._)([(0,p.j)("esri.layers.KMLLayer")],q);const U=q},16859:(e,t,i)=>{i.d(t,{I:()=>S});var r=i(43697),s=i(68773),n=i(40330),o=i(3172),l=i(66643),a=i(20102),u=i(92604),d=i(70586),h=i(95330),c=i(17452),p=i(5600),f=(i(75215),i(67676),i(80442),i(71715)),y=i(52011),m=i(30556),g=i(84230),_=i(48522),b=i(15235),v=i(86082),w=i(14661);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,d.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new b.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(8062).then(i.bind(i,18062));return(0,h.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,h.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,h.r9)(e),!0))))}async setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,h.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,w.Ss)(i);let s,o;if(r)s=i.portal.url;else try{s=await(0,g.oP)(this.url,t)}catch(e){(0,h.r9)(e)}if(!s||!(0,c.Zo)(s,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await i.reload():(i=new b.default({id:e,portal:{url:s}}),await i.load(t)),i.portal.user)return(0,w.Ss)(i)}catch(e){(0,h.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=F.credential===t?F.user:await this._fetchEditingUser(e);return F.credential=t,F.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=_.Z.getDefault();if(s&&s.loaded&&(0,c.Fv)(s.restUrl)===(0,c.Fv)(r))return s.user;const a=`${r}/community/self`,u=null!=e?e.signal:null,d=await(0,l.q6)((0,o.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return d.ok?v.Z.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||_.Z.getDefault());return i&&r&&!(0,c.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,p.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,r._)([(0,f.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,p.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},F={credential:null,user:null}},34760:(e,t,i)=>{i.d(t,{Q:()=>b});var r=i(43697),s=i(92604),n=i(95330),o=i(5600),l=i(90578),a=(i(67676),i(80442),i(52011)),u=i(82960),d=i(46791),h=(i(66643),i(20102),i(26258),i(87538));const c=new d.Z,p=new WeakMap;function f(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function y(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:y(t,e%t):0}let m=0,g=0;function _(){const e=Date.now();let t=!1;for(const i of c){const r=i.deref();r?r.refreshInterval&&e-(p.get(r)??0)+5>=6e4*r.refreshInterval&&(p.set(r,e),r.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,h.EH)((()=>{const e=Date.now();let t=0;for(const i of c){const r=i.deref();r&&(t=y(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?p.get(r)||p.set(r,e):p.delete(r))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(_,g)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||f(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,r._)([(0,o.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"refreshInterval",void 0),(0,r._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,r._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,r._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,r._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},1231:(e,t,i)=>{i.d(t,{Z:()=>m});var r,s=i(43697),n=i(35454),o=i(96674),l=i(5600),a=i(75215),u=(i(67676),i(80442),i(36030)),d=i(71715),h=i(52011),c=i(72729),p=i(86719);const f=new n.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let y=r=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?f.fromJSON(i.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"alias",void 0),(0,s._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],y.prototype,"defaultValue",void 0),(0,s._)([(0,l.Cb)()],y.prototype,"description",void 0),(0,s._)([(0,d.r)("description")],y.prototype,"readDescription",null),(0,s._)([(0,l.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],y.prototype,"domain",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"editable",void 0),(0,s._)([(0,l.Cb)({type:a.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],y.prototype,"length",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"nullable",void 0),(0,s._)([(0,u.J)(p.v)],y.prototype,"type",void 0),(0,s._)([(0,l.Cb)()],y.prototype,"valueType",void 0),(0,s._)([(0,d.r)("valueType",["description"])],y.prototype,"readValueType",null),(0,s._)([(0,l.Cb)({type:Boolean,json:{read:!1}})],y.prototype,"visible",void 0),y=r=(0,s._)([(0,h.j)("esri.layers.support.Field")],y);const m=y},99514:(e,t,i)=>{i.d(t,{Z:()=>c});var r=i(20102),s=i(96674),n=i(92604),o=i(30175),l=i(1542),a=i(69165),u=i(25031),d=i(17126);const h=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],m(e))}static fromLayerJSON(e){return new c(e.fields??[],m(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 i=[];for(const e of this.fields){const t=e?.name,r=f(t);if(t&&r){const s=p(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(r,e),i.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.Dl)(e)||(0,a.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.Dl)(e)||(0,a.Se)(e)||e.nullable||void 0!==(0,a.os)(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(p(e))??this._normalizedFieldsMap.get(f(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.Z.getLogger("esri.layers.support.FieldsIndex").error(new r.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.pt):y.has(t.type)?u._4:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u._4?l.yV.instance:t===u.pt?d.Qf.utcInstance:(0,o.s1)(h,t,(()=>d.vF.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.sX)(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.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function p(e){return e.trim().toLowerCase()}function f(e){return(0,a.q6)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function m(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:s}=e,n=(r?"startField"in r?r.startField:r.startTimeField:"")??"",o=(r?"endField"in r?r.endField:r.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.Jv)(e.dateFieldsTimeReference):null,a=s?function(e){return"timeZone"in e}(s)?s.timeZone??l:s.dateFieldsTimeReference?(0,u.Jv)(s.dateFieldsTimeReference):l??u.pt:null,d=r?function(e){return"timeZone"in e}(r)?r.timeZone??l:r.timeReference?(0,u.Jv)(r.timeReference):l:null,h=new Map([[p(s?.creationDateField??""),a],[p(s?.editDateField??""),a],[p(n),d],[p(o),d]]);for(const{name:r,type:s}of e.fields)if(y.has(s))t.set(r,u._4);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(r,null);else if(i)t.set(r,u._4);else{const e=h.get(p(r??""))??l;t.set(r,e)}return t}},72729:(e,t,i)=>{i.d(t,{im:()=>T,V5:()=>F}),i(80442);var r,s=i(43697),n=i(22974),o=i(5600),l=(i(75215),i(36030)),a=i(52011),u=i(96674);i(67676);let d=r=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],d.prototype,"code",void 0),d=r=(0,s._)([(0,a.j)("esri.layers.support.CodedValue")],d);const h=new(i(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,l.J)(h)],c.prototype,"type",void 0),c=(0,s._)([(0,a.j)("esri.layers.support.Domain")],c);const p=c;var f;let y=f=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,s._)([(0,o.Cb)({type:[d],json:{write:!0}})],y.prototype,"codedValues",void 0),(0,s._)([(0,l.J)({codedValue:"coded-value"})],y.prototype,"type",void 0),y=f=(0,s._)([(0,a.j)("esri.layers.support.CodedValueDomain")],y);const m=y;var g;i(92604),i(20102);let _=g=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,s._)([(0,l.J)({inherited:"inherited"})],_.prototype,"type",void 0),_=g=(0,s._)([(0,a.j)("esri.layers.support.InheritedDomain")],_);const b=_;var v;let w=v=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new v({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,s._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,s._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,s._)([(0,l.J)({range:"range"})],w.prototype,"type",void 0),w=v=(0,s._)([(0,a.j)("esri.layers.support.RangeDomain")],w);const S=w,F={key:"type",base:p,typeMap:{range:w,"coded-value":m,inherited:b}};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 b.fromJSON(e)}return null}},86719:(e,t,i)=>{i.d(t,{v:()=>r});const r=new(i(35454).X)({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"})},74889:(e,t,i)=>{i.d(t,{Z:()=>b});var r,s=i(43697),n=i(66577),o=i(38171),l=i(35454),a=i(96674),u=i(22974),d=i(5600),h=(i(75215),i(71715)),c=i(52011),p=i(30556),f=i(82971),y=i(33955),m=i(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=r=class extends a.wq{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 i=f.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const s=e[t],n=o.Z.fromJSON(s),l=s.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=i);const a=s.aggregateGeometries,u=n.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],s=r?.spatialReference;null==t||s||(t.spatialReference=i)}r.push(n)}return r}writeGeometryType(e,t,i,r){if(e)return void g.write(e,t,i,r);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,y.im)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=f.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)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,u.d9)({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 i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,s]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((s-e)/i)));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:i}=this;if(!i)return this;const{translate:[r,s],scale:[n,o]}=i;let l=null,a=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;a=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,(e=>e*n+r),(e=>s-e*o),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,s;const n=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=i(l[1]);e===r&&o===s||(n.push([e-r,o-s]),r=e,s=o)}else r=t(l[0]),s=i(l[1]),n.push([r,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,y.oU)(e)?e.rings:e.paths,s=[];for(let e=0,n=r.length;e<n;e++){const n=r[e],o=this._quantizePoints(n,t,i);o&&s.push(o)}return s.length>0?((0,y.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,s){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,y.oU)(e)?e.rings:e.paths;let o,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];for(let e=0,s=r.length;e<s;e++){const s=r[e];e>0?(o+=s[0],l+=s[1]):(o=s[0],l=s[1]),s[0]=t(o),s[1]=i(l)}}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=s(i[3])}}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=s(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(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,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];e>0?(o+=r[0],l+=r[1]):(o=r[0],l=r[1]),r[0]=t(o),r[1]=i(l)}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2]),t[3]=s(t[3])}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(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,d.Cb)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,d.Cb)({type:[o.Z],json:{write:!0}})],_.prototype,"features",void 0),(0,s._)([(0,h.r)("features")],_.prototype,"readFeatures",null),(0,s._)([(0,d.Cb)({type:[m.Z],json:{write:!0}})],_.prototype,"fields",void 0),(0,s._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,s._)([(0,p.c)("geometryType")],_.prototype,"writeGeometryType",null),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,s._)([(0,d.Cb)({types:n.qM,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,s._)([(0,h.r)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,s._)([(0,d.Cb)({type:f.Z,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,s._)([(0,p.c)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,s._)([(0,d.Cb)({json:{write:!0}})],_.prototype,"transform",void 0),_=r=(0,s._)([(0,c.j)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const b=_}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7021,5732,5935],{5732:(e,t,i)=>{i.d(t,{c:()=>n,g:()=>r});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},1542:(e,t,i)=>{i.d(t,{A4:()=>o,L9:()=>s,yV:()=>r});var n=i(17126);class r{}function o(e){return e instanceof n.ld?e===r.instance:"unknown"===e?.toString().toLowerCase()}function s(e){return o(e)?r.instance:e}r.instance=new n.vF("Etc/UTC")},60437:(e,t,i)=>{i.d(t,{G_:()=>w,HH:()=>s,JR:()=>h,TC:()=>a,Tn:()=>c,Ue:()=>r,al:()=>o,bZ:()=>m,cS:()=>y,dp:()=>u,fS:()=>b,is:()=>f,op:()=>d,pp:()=>l,t8:()=>p});var n=i(6570);function r(e=g){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,i,n,o,s,a=r()){return a[0]=e,a[1]=t,a[2]=i,a[3]=n,a[4]=o,a[5]=s,a}function s(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new n.Z(i?{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=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function c(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function p(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 y(e){return e?p(e,w):r(w)}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function m(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=r,e[5]=Number.POSITIVE_INFINITY,e}function f(e){return 6===e.length}function b(e,t,i){if(null==e||null==t)return e===t;if(!f(e)||!f(t))return!1;if(i){for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(24470);const w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],g=[0,0,0,0,0,0];r()},1231:(e,t,i)=>{i.d(t,{Z:()=>f});var n,r=i(43697),o=i(35454),s=i(96674),a=i(5600),l=i(75215),u=(i(67676),i(80442),i(36030)),d=i(71715),c=i(52011),p=i(72729),y=i(86719);const h=new o.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=n=class extends s.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?h.fromJSON(i.fieldValueType):null}clone(){return new n({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,r._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,r._)([(0,a.Cb)()],m.prototype,"description",void 0),(0,r._)([(0,d.r)("description")],m.prototype,"readDescription",null),(0,r._)([(0,a.Cb)({types:p.V5,json:{read:{reader:p.im},write:!0}})],m.prototype,"domain",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,r._)([(0,a.Cb)({type:l.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,r._)([(0,u.J)(y.v)],m.prototype,"type",void 0),(0,r._)([(0,a.Cb)()],m.prototype,"valueType",void 0),(0,r._)([(0,d.r)("valueType",["description"])],m.prototype,"readValueType",null),(0,r._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=n=(0,r._)([(0,c.j)("esri.layers.support.Field")],m);const f=m},99514:(e,t,i)=>{i.d(t,{Z:()=>p});var n=i(20102),r=i(96674),o=i(92604),s=i(30175),a=i(1542),l=i(69165),u=i(25031),d=i(17126);const c=new Map;class p{static fromJSON(e){return new p(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new p(e.fields??[],f(e))}static fromLayerJSON(e){return new p(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 i=[];for(const e of this.fields){const t=e?.name,n=h(t);if(t&&n){const r=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(n,e),i.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.Dl)(e)||(0,l.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.Dl)(e)||(0,l.Se)(e)||e.nullable||void 0!==(0,l.os)(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(h(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?(o.Z.getLogger("esri.layers.support.FieldsIndex").error(new n.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.pt):m.has(t.type)?u._4:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u._4?a.yV.instance:t===u.pt?d.Qf.utcInstance:(0,s.s1)(c,t,(()=>d.vF.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.sX)(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,r.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function h(e){return(0,l.q6)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:r}=e,o=(n?"startField"in n?n.startField:n.startTimeField:"")??"",s=(n?"endField"in n?n.endField:n.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.Jv)(e.dateFieldsTimeReference):null,l=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.dateFieldsTimeReference?(0,u.Jv)(r.dateFieldsTimeReference):a??u.pt:null,d=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.timeReference?(0,u.Jv)(n.timeReference):a:null,c=new Map([[y(r?.creationDateField??""),l],[y(r?.editDateField??""),l],[y(o),d],[y(s),d]]);for(const{name:n,type:r}of e.fields)if(m.has(r))t.set(n,u._4);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(n,null);else if(i)t.set(n,u._4);else{const e=c.get(y(n??""))??a;t.set(n,e)}return t}},72729:(e,t,i)=>{i.d(t,{im:()=>T,V5:()=>I}),i(80442);var n,r=i(43697),o=i(22974),s=i(5600),a=(i(75215),i(36030)),l=i(52011),u=i(96674);i(67676);let d=n=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,r._)([(0,s.Cb)({type:[String,Number],json:{write:!0}})],d.prototype,"code",void 0),d=n=(0,r._)([(0,l.j)("esri.layers.support.CodedValue")],d);const c=new(i(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let p=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,r._)([(0,a.J)(c)],p.prototype,"type",void 0),p=(0,r._)([(0,l.j)("esri.layers.support.Domain")],p);const y=p;var h;let m=h=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new h({codedValues:(0,o.d9)(this.codedValues),name:this.name})}};(0,r._)([(0,s.Cb)({type:[d],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,r._)([(0,a.J)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=h=(0,r._)([(0,l.j)("esri.layers.support.CodedValueDomain")],m);const f=m;var b;i(92604),i(20102);let w=b=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new b}};(0,r._)([(0,a.J)({inherited:"inherited"})],w.prototype,"type",void 0),w=b=(0,r._)([(0,l.j)("esri.layers.support.InheritedDomain")],w);const g=w;var F;let v=F=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new F({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r._)([(0,s.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],v.prototype,"maxValue",void 0),(0,r._)([(0,s.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],v.prototype,"minValue",void 0),(0,r._)([(0,a.J)({range:"range"})],v.prototype,"type",void 0),v=F=(0,r._)([(0,l.j)("esri.layers.support.RangeDomain")],v);const _=v,I={key:"type",base:y,typeMap:{range:v,"coded-value":f,inherited:g}};function T(e){if(!e?.type)return null;switch(e.type){case"range":return _.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return g.fromJSON(e)}return null}},45574:(e,t,i)=>{i.d(t,{JD:()=>g,Jj:()=>_,sX:()=>P,Ob:()=>L,rP:()=>V,FV:()=>T,nU:()=>E,Ci:()=>S,Fr:()=>w,HW:()=>B,gG:()=>N,uA:()=>G,SU:()=>j,KE:()=>O,VG:()=>Z,tD:()=>C,kp:()=>x,C9:()=>M,rk:()=>q,kZ:()=>R,JY:()=>A,Y5:()=>v,uj:()=>I});var n=i(40330),r=i(9790),o=i(66643),s=i(20102),a=i(35454),l=i(42033),u=i(63213),d=i(14165);async function c(e,t,i){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=p(e));const n=function(e){return p(e)*function(e){return e.capabilities.query.maxRecordCount||2e3}(e)}(e),r=e.capabilities.query.supportsPagination;t.start=0,t.num=n;let o=null;for(;;){const s=await e.source.queryFeaturesJSON(t,i);if(null==o?o=s:o.features=o.features.concat(s.features),o.exceededTransferLimit=s.exceededTransferLimit,!r||!s.exceededTransferLimit)break;t.start+=n}return o}function p(e){return e.capabilities.query.supportsMaxRecordCountFactor?d.Z.MAX_MAX_RECORD_COUNT_FACTOR:1}var y=i(84230),h=i(84382),m=i(81571),f=i(56545),b=i(75935);const w=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function g(e,t,i,n){const r=await D(e);if(await F(e,t,n),!r.addAttachment)throw new s.Z(n,"Layer source does not support addAttachment capability");return r.addAttachment(t,i)}function F(e,t,i){const{attributes:n}=t,{objectIdField:r}=e;return e.capabilities?.data?.supportsAttachment?t?n?r&&n[r]?Promise.resolve():Promise.reject(new s.Z(i,`feature is missing the identifying attribute ${r}`)):Promise.reject(new s.Z(i,"'attributes' are required on a feature to query attachments")):Promise.reject(new s.Z(i,"A feature is required to add/delete/update attachments")):Promise.reject(new s.Z(i,"this layer doesn't support attachments"))}async function v(e,t,i,n,r){const o=await D(e);if(await F(e,t,r),!o.updateAttachment)throw new s.Z(r,"Layer source does not support updateAttachment capability");return o.updateAttachment(t,i,n)}async function _(e,t,n){const{applyEdits:r}=await i.e(4720).then(i.bind(i,14720)),o=await e.load(),{source:s,globalIdField:a}=o;let l=n;return("feature"===o.type?o.infoFor3D:null)&&null!=t.deleteFeatures&&null!=a&&(l={...l,globalIdToObjectId:await B(e,t.deleteFeatures,a)}),r(o,s,t,n)}async function I(e,t,n){const{uploadAssets:r}=await i.e(4720).then(i.bind(i,14720)),o=await e.load();return r(o,o.source,t,n)}async function T(e,t,i,n){const r=await D(e);if(await F(e,t,n),!r.deleteAttachments)throw new s.Z(n,"Layer source does not support deleteAttachments capability");return r.deleteAttachments(t,i)}async function S(e,t,i){const n=(await e.load({signal:t?.signal})).source;if(!n.fetchRecomputedExtents)throw new s.Z(i,"Layer source does not support fetchUpdates capability");return n.fetchRecomputedExtents(t)}async function j(e,t,i,n){t=f.Z.from(t),await e.load();const r=e.source,o=e.capabilities;if(!o?.data?.supportsAttachment)throw new s.Z(n,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:l,globalIds:u,num:d,size:c,start:p,where:y}=t;if(!o?.operations?.supportsQueryAttachments&&(a?.length>0||u?.length>0||c?.length>0||d||p||y))throw new s.Z(n,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(l?.length||u?.length||y))throw new s.Z(n,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!r.queryAttachments)throw new s.Z(n,"Layer source does not support queryAttachments capability",t);return r.queryAttachments(t)}async function C(e,t,i,n){const r=await D(e);if(!r.queryObjectIds)throw new s.Z(n,"Layer source does not support queryObjectIds capability");return r.queryObjectIds(d.Z.from(t)??e.createQuery(),i)}async function Z(e,t,i,n){const r=await D(e);if(!r.queryFeatureCount)throw new s.Z(n,"Layer source does not support queryFeatureCount capability");return r.queryFeatureCount(d.Z.from(t)??e.createQuery(),i)}async function O(e,t,i,n){const r=await D(e);if(!r.queryExtent)throw new s.Z(n,"Layer source does not support queryExtent capability");return r.queryExtent(d.Z.from(t)??e.createQuery(),i)}async function x(e,t,i,n){const r=await D(e);if(!r.queryRelatedFeatures)throw new s.Z(n,"Layer source does not support queryRelatedFeatures capability");return r.queryRelatedFeatures(b.default.from(t),i)}async function M(e,t,i,n){const r=await D(e);if(!r.queryRelatedFeaturesCount)throw new s.Z(n,"Layer source does not support queryRelatedFeaturesCount capability");return r.queryRelatedFeaturesCount(b.default.from(t),i)}async function N(e){const t=e.source;if(t?.refresh)try{const{dataChanged:i,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),i)return!0}catch{}if(e.definitionExpression)try{return(await(0,l.E)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function V(e){const t=new d.Z,i=e.capabilities?.data,n=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,n&&(t.compactGeometryEnabled=n.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=n.supportsDefaultSpatialReference),i&&(i.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),i.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:r,timeExtent:o}=e;return t.timeExtent=null!=r&&null!=o?o.offset(-r.value,r.unit):o||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function q(e){const{globalIdField:t,fields:i}=e;if(t)return t;if(i)for(const e of i)if("esriFieldTypeGlobalID"===e.type)return e.name}function R(e){const{objectIdField:t,fields:i}=e;if(t)return t;if(i)for(const e of i)if("esriFieldTypeOID"===e.type)return e.name}function A(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}async function D(e){return(await e.load()).source}async function E(e,t,i){const r=e.parsedUrl?.path;r&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!n.id)return;if(n.id.findCredential(e))return;let i;try{const r=await(0,y.oP)(e,t);r&&(i=await n.id.checkSignInStatus(`${r}/sharing`))}catch(e){}if(i)try{const i=null!=t?t.signal:null;await n.id.getCredential(e,{signal:i})}catch(e){}}(r,i)}function P(e){return!e.sourceJSON?.isMultiServicesView&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const J=(0,u.d)({types:r.QT});function L(e,t){if(e.defaultSymbol)return e.types?.length?new m.Z({defaultSymbol:J(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:J(e.symbol,e,t)})))}):new h.Z({symbol:J(e.defaultSymbol,e,t)})}function G(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const i=e.editingInfo?.lastEditDate?.getTime();return null==i||(t*=1e3,Date.now()-i<t)}async function B(e,t,i){if(null==t)return null;const n=[],{objectIdField:r}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:n}=e;t={globalId:n[i],objectId:null!=n[r]&&-1!==n[r]?n[r]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||n.push(t.globalId))})),0===n.length)return null;const s=e.createQuery();s.where=n.map((e=>`${i}='${e}'`)).join(" OR "),s.returnGeometry=!1,s.outFields=[r,i],s.cacheHint=!1;const a=await(0,o.mt)(c(e,s));if(!a.ok)return null;const l=new Map,u=a.value.features;for(const e of u){const t=e.attributes[i],n=e.attributes[r];null!=t&&null!=n&&-1!==n&&l.set(t,n)}return l}},53518:(e,t,i)=>{i.d(t,{v:()=>l});var n=i(80442),r=i(92604),o=i(1231),s=i(99514),a=i(69165);function l(){return{fields:{type:[o.Z],value:null,set:function(e){if(e&&(0,n.Z)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");r.Z.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return s.Z.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const i=this.fieldsIndex?.has(t);i||r.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.Q0)(this.fieldsIndex,e)}}}}},86719:(e,t,i)=>{i.d(t,{v:()=>n});const n=new(i(35454).X)({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"})},75935:(e,t,i)=>{i.r(t),i.d(t,{default:()=>h});var n,r=i(43697),o=(i(66577),i(96674)),s=i(22974),a=i(5600),l=i(75215),u=i(52011),d=i(30556),c=i(10158),p=i(82971);let y=n=class extends o.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new n((0,s.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,r._)([(0,a.Cb)({type:c.n,json:{write:!0}})],y.prototype,"dynamicDataSource",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"gdbVersion",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],y.prototype,"geometryPrecision",void 0),(0,r._)([(0,a.Cb)({type:Date})],y.prototype,"historicMoment",void 0),(0,r._)([(0,d.c)("historicMoment")],y.prototype,"_writeHistoricMoment",null),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],y.prototype,"maxAllowableOffset",void 0),(0,r._)([(0,a.Cb)({type:[Number],json:{write:!0}})],y.prototype,"objectIds",void 0),(0,r._)([(0,a.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),(0,r._)([(0,a.Cb)({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),(0,r._)([(0,a.Cb)({type:p.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],y.prototype,"outSpatialReference",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],y.prototype,"relationshipId",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,r._)([(0,d.c)("start"),(0,d.c)("num")],y.prototype,"writeStart",null),(0,r._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],y.prototype,"returnGeometry",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnM",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnZ",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=n=(0,r._)([(0,u.j)("esri.rest.support.RelationshipQuery")],y),y.from=(0,l.se)(y);const h=y}}]);