@arcgis/core 4.28.3 → 4.28.5

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 (84) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{15852a47129b9e0d04c6.js → 023fc8504d032762ad82.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{80d9bb9f247ecdfa266f.js → 0695fcdc01f195c5ae8d.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{4363f2cc3909c9258064.js → 076ac767b5148357f1b5.js} +1 -1
  5. package/assets/esri/core/workers/chunks/07cb7d142205f2eccc83.js +1 -0
  6. package/assets/esri/core/workers/chunks/0f6b766f08c648fd7b99.js +1 -0
  7. package/assets/esri/core/workers/chunks/16b56e541afa438dfb7f.js +1 -0
  8. package/assets/esri/core/workers/chunks/1c855f091d1305b82594.js +1 -0
  9. package/assets/esri/core/workers/chunks/28c4a21cdddf2602ab97.js +1 -0
  10. package/assets/esri/core/workers/chunks/2cf2340ad817f3c27802.js +1 -0
  11. package/assets/esri/core/workers/chunks/319c222ce72254934060.js +1 -0
  12. package/assets/esri/core/workers/chunks/340ab726ba40fe3a99c8.js +1 -0
  13. package/assets/esri/core/workers/chunks/46b4a17ec898ab744861.js +1 -0
  14. package/assets/esri/core/workers/chunks/4a5d0b49a641d182b5ea.js +1 -0
  15. package/assets/esri/core/workers/chunks/{7f3bc7a2de59e485f22f.js → 4f0412b52844aa9c7bd4.js} +1 -1
  16. package/assets/esri/core/workers/chunks/54867a094fb740a6f4d9.js +1 -0
  17. package/assets/esri/core/workers/chunks/5b80ae1eb79f1db75dc6.js +1 -0
  18. package/assets/esri/core/workers/chunks/80fcb63476829b6a48d2.js +1 -0
  19. package/assets/esri/core/workers/chunks/84725021c43f1122056a.js +1 -0
  20. package/assets/esri/core/workers/chunks/{9f0e8dd5c9bacfc0f03c.js → 908a5326b61843d6d2b3.js} +1 -1
  21. package/assets/esri/core/workers/chunks/9607460895182d31aef9.js +1 -0
  22. package/assets/esri/core/workers/chunks/9ef3746c545296565ef6.js +1 -0
  23. package/assets/esri/core/workers/chunks/{77f557359a5033d7e429.js → a0a86383e69932a25e50.js} +1 -1
  24. package/assets/esri/core/workers/chunks/a3bf50d9e24ad1de9847.js +1 -0
  25. package/assets/esri/core/workers/chunks/a5db3be5eeb3005df3c1.js +1 -0
  26. package/assets/esri/core/workers/chunks/a87ab14d6a6ccc9004a0.js +1 -0
  27. package/assets/esri/core/workers/chunks/af13150c711ba7b7f3ac.js +1 -0
  28. package/assets/esri/core/workers/chunks/ba00df2e707550939a6f.js +1 -0
  29. package/assets/esri/core/workers/chunks/ca43955065012d4b22e9.js +1 -0
  30. package/assets/esri/core/workers/chunks/cfa6d1b63b794febe70a.js +1 -0
  31. package/assets/esri/core/workers/chunks/e0382138cf58191a9697.js +1 -0
  32. package/assets/esri/core/workers/chunks/e076c5523dfb6c53a825.js +1 -0
  33. package/assets/esri/core/workers/chunks/{e3950975030412ff6e20.js → f343db8dad71f3840610.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{46ddc52fe9cdd573a614.js → fa5c69a0cdd78aa34ad7.js} +1 -1
  35. package/assets/esri/core/workers/chunks/fe0c6814ef56604540b3.js +1 -0
  36. package/core/date.js +1 -1
  37. package/core/sql/WhereClause.js +1 -1
  38. package/kernel.js +1 -1
  39. package/layers/graphics/data/QueryEngineResult.js +1 -1
  40. package/layers/graphics/sources/geojson/geojson.js +1 -1
  41. package/layers/save/featureLayerUtils.js +1 -1
  42. package/layers/support/fetchService.js +1 -1
  43. package/layers/support/vectorTileLayerLoader.js +1 -1
  44. package/package.json +1 -1
  45. package/support/revision.js +1 -1
  46. package/views/2d/engine/webgl/Painter.js +1 -1
  47. package/views/2d/layers/features/sources/DataTileSubscription.js +1 -1
  48. package/views/3d/layers/graphics/elevationAlignPointsInFeatures.js +1 -1
  49. package/views/PopupView.js +1 -1
  50. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  51. package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
  52. package/widgets/FeatureForm/FieldInput.js +1 -1
  53. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  54. package/widgets/FeatureForm.js +1 -1
  55. package/widgets/Features.js +1 -1
  56. package/widgets/Legend/LegendViewModel.js +1 -1
  57. package/widgets/Popup.js +1 -1
  58. package/assets/esri/core/workers/chunks/32fbd4355a4a649623a7.js +0 -1
  59. package/assets/esri/core/workers/chunks/41306b698f78001dda55.js +0 -1
  60. package/assets/esri/core/workers/chunks/423672fe765083e1a0ec.js +0 -1
  61. package/assets/esri/core/workers/chunks/49d958631bcd93f6333a.js +0 -1
  62. package/assets/esri/core/workers/chunks/49faa024bab1ba6e2bf0.js +0 -1
  63. package/assets/esri/core/workers/chunks/534726130ef1698ec89e.js +0 -1
  64. package/assets/esri/core/workers/chunks/7beae29abdfae23b15cc.js +0 -1
  65. package/assets/esri/core/workers/chunks/846e5e51dc278bc3f80f.js +0 -1
  66. package/assets/esri/core/workers/chunks/8b541cbf82a5ba0317ee.js +0 -1
  67. package/assets/esri/core/workers/chunks/8e91be2e38010391e351.js +0 -1
  68. package/assets/esri/core/workers/chunks/90f96a2ddfb25d851d4d.js +0 -1
  69. package/assets/esri/core/workers/chunks/91a3181071874525ed44.js +0 -1
  70. package/assets/esri/core/workers/chunks/97fd7b82eec26449977e.js +0 -1
  71. package/assets/esri/core/workers/chunks/9d97a20f69047d0c47cc.js +0 -1
  72. package/assets/esri/core/workers/chunks/ac4636e82a103e2c27ca.js +0 -1
  73. package/assets/esri/core/workers/chunks/ae7ba94af6d4fd97dd8b.js +0 -1
  74. package/assets/esri/core/workers/chunks/b0653f63745e756f55fe.js +0 -1
  75. package/assets/esri/core/workers/chunks/c2199fb8f7a54a0ef18a.js +0 -1
  76. package/assets/esri/core/workers/chunks/c3f462d11ed570482e7a.js +0 -1
  77. package/assets/esri/core/workers/chunks/c8cb5fe1d23145c4842b.js +0 -1
  78. package/assets/esri/core/workers/chunks/ce409944221a784ddb61.js +0 -1
  79. package/assets/esri/core/workers/chunks/e8b7d1c586aff229484c.js +0 -1
  80. package/assets/esri/core/workers/chunks/eb5213ffb83d83a4dd05.js +0 -1
  81. package/assets/esri/core/workers/chunks/f037e4f9877ea08ced9d.js +0 -1
  82. package/assets/esri/core/workers/chunks/f520f093aa81d8ee1790.js +0 -1
  83. package/assets/esri/core/workers/chunks/f7ccc6c681fc9218555c.js +0 -1
  84. package/assets/esri/core/workers/chunks/fab4ee57b7c5376c9ccd.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5481],{92835:(t,e,r)=>{r.d(e,{Z:()=>f});var i,s=r(43697),l=r(96674),o=r(35463),n=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),h=r(30556),c=r(25031);let p=i=class extends l.wq{static get allTime(){return d}static get empty(){return y}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=t.start?.getTime()??t.start,s=t.end?.getTime()??t.end;return e===i&&r===s}expandTo(t,e=c.By){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.JE)(r,t,e));let s=this.end;if(s){const r=(0,o.JE)(s,t,e);s=s.getTime()===r.getTime()?r:(0,o.Nm)(r,1,t,e)}return new i({start:r,end:s})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return i.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=t.start?.getTime()??-1/0,l=t.end?.getTime()??1/0;let o,n;if(s>=e&&s<=r?o=s:e>=s&&e<=l&&(o=e),r>=s&&r<=l?n=r:l>=e&&l<=r&&(n=l),null!=o&&null!=n&&!isNaN(o)&&!isNaN(n)){const t=new i;return t.start=o===-1/0?null:new Date(o),t.end=n===1/0?null:new Date(n),t}return i.empty}offset(t,e,r=c.By){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:l,end:n}=this;return null!=l&&(s.start=(0,o.Nm)(l,t,e,r)),null!=n&&(s.end=(0,o.Nm)(n,t,e,r)),s}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new i({start:e,end:r})}};(0,s._)([(0,n.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,s._)([(0,a.r)("end")],p.prototype,"readEnd",null),(0,s._)([(0,h.c)("end")],p.prototype,"writeEnd",null),(0,s._)([(0,n.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,s._)([(0,n.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,s._)([(0,n.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,s._)([(0,a.r)("start")],p.prototype,"readStart",null),(0,s._)([(0,h.c)("start")],p.prototype,"writeStart",null),p=i=(0,s._)([(0,u.j)("esri.TimeExtent")],p);const d=new p,y=new p({start:void 0,end:void 0}),f=p},10699:(t,e,r)=>{r.d(e,{IG:()=>o,iv:()=>n});var i=r(43697),s=r(52011);let l=0;const o=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+l++})}};return e=(0,i._)([(0,s.j)("esri.core.Identifiable")],e),e},n=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:l++})}};return e=(0,i._)([(0,s.j)("esri.core.NumericIdentifiable")],e),e};let a=class extends(o(class{})){};a=(0,i._)([(0,s.j)("esri.core.Identifiable")],a)},13867:(t,e,r)=>{r.d(e,{z:()=>s});var i=r(69801);class s{constructor(t,e){this._storage=new i.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,r=1){this._storage.put(this,t,e,r,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69801:(t,e,r)=>{r.d(e,{WJ:()=>n,Xq:()=>o});var i,s,l=r(44553);(s=i||(i={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class o{constructor(t,e,r){this.name=t,this._storage=e,this.id=a+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),r&&(this._storage.registerRemoveFunc(this.id,r),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(t,e,r,i=0){this._storage.put(this,t,e,r,i)}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}peek(t){return this._storage.peek(this,t)}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}updateSize(t,e,r){this._storage.updateSize(this,t,e,r)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class n{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new l.Z,this._users=new l.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,0),this._checkSizeLimits()}put(t,e,r,s,l){e=t.id+e;const o=this._db.get(e);if(o&&(this._size-=o.size,t.size-=o.size,this._db.delete(e),o.entry!==r&&this._notifyRemove(e,o.entry,i.ALL)),s>this._maxSize)return void this._notifyRemove(e,r,i.ALL);if(void 0===r)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 ${e}`),void this._notifyRemove(e,r,i.ALL);const n=1+Math.max(l,-3)- -3;this._db.set(e,{entry:r,size:s,lifetime:n,lives:n}),this._size+=s,t.size+=s,this._checkSizeLimits()}updateSize(t,e,r,s){e=t.id+e;const l=this._db.get(e);if(l&&l.entry===r){for(this._size-=l.size,t.size-=l.size;s>this._maxSize;){const t=this._notifyRemove(e,r,i.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);s=t}l.size=s,this._size+=s,t.size+=s,this._checkSizeLimits()}}pop(t,e){e=t.id+e;const r=this._db.get(e);if(r)return this._size-=r.size,t.size-=r.size,this._db.delete(e),++this._hit,r.entry;++this._miss}get(t,e){e=t.id+e;const r=this._db.get(e);if(void 0!==r)return this._db.delete(e),r.lives=r.lifetime,this._db.set(e,r),++this._hit,r.entry;++this._miss}peek(t,e){const r=this._db.get(t.id+e);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},r=new Array;this._db.forEach(((t,i)=>{const s=t.lifetime;r[s]=(r[s]||0)+t.size,this._users.forAll((r=>{const{id:s,name:l}=r;if(i.startsWith(s)){const r=e[l]||0;e[l]=r+t.size}}))}));const i={};this._users.forAll((t=>{const r=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const s=e[r]||0;e[r]=s,i[r]=Math.round(100*t.hitRate)+"%"}else i[r]="0%"}));const s=Object.keys(e);s.sort(((t,r)=>e[r]-e[t])),s.forEach((r=>t[r]=Math.round(e[r]/2**20)+"MB / "+i[r]));for(let e=r.length-1;e>=0;--e){const i=r[e];i&&(t["Priority "+(e+-3-1)]=Math.round(i/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,r)=>{r.startsWith(e)&&(this._size-=t.size,this._db.delete(r),this._notifyRemove(r,t.entry,i.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,i.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,r){let i;return this._removeFuncs.some((s=>{if(t.startsWith(s[0])){const t=s[1](e,r);return"number"==typeof t&&(i=t),!0}return!1})),i}_checkSizeLimits(){if(this._size>this._maxSize)for(const[t,e]of this._db)if(this._purgeItem(t,e),this._size<=.9*this.maxSize)return;this._users.forEach((t=>{if(t.maxSize>0&&t.size>t.maxSize)for(const[e,r]of this._db)if(e.startsWith(t.id)&&(this._purgeItem(e,r,t),t.size<=.9*t.maxSize))return}))}_purgeItem(t,e,r=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,r&&(r.size-=e.size);const s=this._notifyRemove(t,e.entry,i.SOME);null!=s&&s>0&&(this._size+=s,r&&(r.size+=s),e.lives=e.lifetime,e.size=s,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let a=0},17445:(t,e,r)=>{r.d(e,{N1:()=>p,YP:()=>a,Z_:()=>f,gx:()=>u,nn:()=>m,on:()=>c,tX:()=>g}),r(66643),r(46791);var i=r(91460),s=r(50758),l=r(70586),o=r(95330),n=r(26258);function a(t,e,r={}){return h(t,e,r,d)}function u(t,e,r={}){return h(t,e,r,y)}function h(t,e,r={},i){let s=null;const o=r.once?(t,r)=>{i(t)&&((0,l.hw)(s),e(t,r))}:(t,r)=>{i(t)&&e(t,r)};if(s=(0,n.aQ)(t,o,r.sync,r.equals),r.initial){const e=t();o(e,e)}return s}function c(t,e,r,o={}){let n=null,u=null,h=null;function c(){n&&u&&(u.remove(),o.onListenerRemove?.(n),n=null,u=null)}function p(t){o.once&&o.once&&(0,l.hw)(h),r(t)}const d=a(t,((t,r)=>{c(),(0,i.vT)(t)&&(n=t,u=(0,i.on)(t,e,p),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return h=(0,s.kB)((()=>{d.remove(),c()})),h}function p(t,e){return function(t,e,r){if((0,o.Hc)(r))return Promise.reject((0,o.zE)());const i=t();if(e?.(i))return Promise.resolve(i);let n=null;function a(){n=(0,l.hw)(n)}return new Promise(((i,l)=>{n=(0,s.AL)([(0,o.fu)(r,(()=>{a(),l((0,o.zE)())})),h(t,(t=>{a(),i(t)}),{sync:!1,once:!0},e??d)])}))}(t,y,e)}function d(t){return!0}function y(t){return!!t}r(87538);const f={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},87085:(t,e,r)=>{r.d(e,{Z:()=>v});var i=r(43697),s=(r(66577),r(3172)),l=r(20102),o=r(32448),n=r(10699),a=r(83379),u=r(92604),h=r(95330),c=r(17452),p=r(5600),d=(r(75215),r(67676),r(80442),r(52011)),y=r(68773),f=r(6570),m=r(82971);let g=0,_=class extends(o.Z.EventedMixin((0,n.IG)(a.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.Z(-180,-90,180,90,m.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await r.e(3529).then(r.bind(r,63529))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:i}=await r.e(8008).then(r.bind(r,28008));try{return await i(e)}catch(t){const r=e&&e.portalItem,i=r?.id||"unset",s=r&&r.portal&&r.portal.url||y.default.portalUrl;throw u.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,h.D_)(t)||u.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.mN)(this.url)}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,s.Z)(t,{query:{f:"json"},responseType:"json"})).data;throw new l.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,p.Cb)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,i._)([(0,p.Cb)({type:f.Z})],_.prototype,"fullExtent",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,i._)([(0,p.Cb)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,i._)([(0,p.Cb)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({clonable:!1})],_.prototype,"parent",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,i._)([(0,p.Cb)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,i._)([(0,p.Cb)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,i._)([(0,p.Cb)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,i._)([(0,p.Cb)({type:m.Z})],_.prototype,"spatialReference",void 0),(0,i._)([(0,p.Cb)({type:String})],_.prototype,"title",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,i._)([(0,p.Cb)()],_.prototype,"url",void 0),(0,i._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,i._)([(0,d.j)("esri.layers.Layer")],_);const v=_},94756:(t,e,r)=>{r.r(e),r.d(e,{default:()=>yt});var i=r(43697),s=r(3172),l=r(66643),o=r(20102),n=r(22974),a=r(16453),u=r(95330),h=r(17452),c=r(5600),p=(r(75215),r(71715)),d=r(52011),y=r(30556),f=r(6570),m=r(82971),g=r(87085),_=r(54295),v=r(46486),w=r(17287),b=r(71612),S=r(17017),A=r(38009),x=r(16859),E=r(72965);let I=null;var R=r(92604),T=r(1533);class U{constructor(t,e){this._spriteSource=t,this._maxTextureSize=e,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===t.type&&t.spriteFormat&&(this._spriteImageFormat=t.spriteFormat),t.pixelRatio&&(this.devicePixelRatio=t.pixelRatio),this.baseURL=t.spriteUrl}get spriteNames(){const t=[];for(const e in this._spritesData)t.push(e);return t.sort(),t}getSpriteInfo(t){return this._spritesData?this._spritesData[t]:null}async load(t){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(t),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(t){this._isRetina=this.devicePixelRatio>1.15;const{width:e,height:r,data:i,json:s}=await this._getSpriteData(this._spriteSource,t),l=Object.keys(s);if(!l||0===l.length||!i)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=s,this.width=e,this.height=r;const n=Math.max(this._maxTextureSize,4096);if(e>n||r>n){const t=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw R.Z.getLogger("esri.layers.support.SpriteSource").error(t),new o.Z("SpriteSource",t)}let a;for(let t=0;t<i.length;t+=4)a=i[t+3]/255,i[t]=i[t]*a,i[t+1]=i[t+1]*a,i[t+2]=i[t+2]*a;this.image=i}async _getSpriteData(t,e){if("image"===t.type){let e,r;if(this.devicePixelRatio<1.15){if(!t.spriteSource1x)throw new o.Z("SpriteSource","no image data provided for low resolution sprites!");e=t.spriteSource1x.image,r=t.spriteSource1x.json}else{if(!t.spriteSource2x)throw new o.Z("SpriteSource","no image data provided for high resolution sprites!");e=t.spriteSource2x.image,r=t.spriteSource2x.json}return"width"in e&&"height"in e&&"data"in e&&((0,T.eP)(e.data)||(0,T.KZ)(e.data))?{width:e.width,height:e.height,data:new Uint8Array(e.data),json:r}:{...P(e),json:r}}const r=(0,h.mN)(this.baseURL),i=r.query?"?"+(0,h.B7)(r.query):"",l=this._isRetina?"@2x":"",n=`${r.path}${l}.${this._spriteImageFormat}${i}`,a=`${r.path}${l}.json${i}`,[u,c]=await Promise.all([(0,s.Z)(a,e),(0,s.Z)(n,{responseType:"image",...e})]);return{...P(c.data),json:u.data}}}function P(t){const e=document.createElement("canvas"),r=e.getContext("2d");e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height);const i=r.getImageData(0,0,t.width,t.height);return{width:t.width,height:t.height,data:new Uint8Array(i.data)}}var C=r(11145),L=r(28589),z=r(8744),O=r(40488),B=r(55415);class D{constructor(t){this.url=t}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.Z)(this.url).then((t=>t.data.index))),this._tileIndexPromise}async dataKey(t,e){const r=await this.fetchTileIndex();return(0,u.k_)(e),this._getIndexedDataKey(r,t)}_getIndexedDataKey(t,e){const r=[e];if(e.level<0||e.row<0||e.col<0||e.row>>e.level>0||e.col>>e.level>0)return null;let i=e;for(;0!==i.level;)i=new B.Z(i.level-1,i.row>>1,i.col>>1,i.world),r.push(i);let s,l,o=t,n=r.pop();if(1===o)return n;for(;r.length;)if(s=r.pop(),l=(1&s.col)+((1&s.row)<<1),o){if(0===o[l]){n=null;break}if(1===o[l]){n=s;break}n=s,o=o[l]}return n}}var F=r(70586);class M{constructor(t,e){this._tilemap=t,this._tileIndexUrl=e}destroy(){this._tilemap=(0,F.SC)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(t){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.Z)(this._tileIndexUrl,{query:{...t?.query}}).then((t=>t.data.index))),this._tileIndexPromise}dataKey(t,e){const{level:r,row:i,col:s}=t,l=new B.Z(t);return this._tilemap.fetchAvailabilityUpsample(r,i,s,l,e).then((()=>(l.world=t.world,l))).catch((t=>{if((0,u.D_)(t))throw t;return null}))}}var j=r(30175);class Z{constructor(t){this._tileUrl=t,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(t){null===this._promise&&(this._abortController=new AbortController,this._promise=this._makeRequest(this._tileUrl,this._abortController.signal));const e=this._abortOptions;return e.push(t),(0,u.fu)(t,(()=>{e.every((t=>(0,u.Hc)(t)))&&this._abortController.abort()})),this._promise.then((t=>(0,n.d9)(t)))}async _makeRequest(t,e){const{data:r}=await(0,s.Z)(t,{responseType:"array-buffer",signal:e});return r}}const N=new Map;function k(t,e){return(0,j.s1)(N,t,(()=>new Z(t))).getData(e).then((e=>(N.delete(t),e))).catch((e=>{throw N.delete(t),e}))}class W{constructor(t,e,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=t,this.sourceUrl=e;const i=(0,h.mN)(this.sourceUrl),s=(0,n.d9)(r),l=s.tiles;if(i)for(let t=0;t<l.length;t++){const e=(0,h.mN)(l[t]);e&&((0,h.YP)(e.path)||(e.path=(0,h.v_)(i.path,e.path)),l[t]=(0,h.fl)(e.path,{...i.query,...e.query}))}this.tileServers=l;const o=r.capabilities&&r.capabilities.split(",").map((t=>t.toLowerCase().trim())),a=!0===r?.exportTilesAllowed,u=!0===o?.includes("tilemap"),c=a&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=C.Z.fromJSON(s.tileInfo);const p=r.tileMap?(0,h.fl)((0,h.v_)(i.path,r.tileMap),i.query??{}):null;u?(this.type="vector-tile",this.tilemap=new M(new L.y({layer:{parsedUrl:i,tileInfo:this.tileInfo},minLOD:s.minLOD??this.tileInfo.lods[0].level,maxLOD:s.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new D(p)),this.fullExtent=f.Z.fromJSON(r.fullExtent),this.initialExtent=f.Z.fromJSON(r.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(t,e){return await(this.tilemap?.dataKey(t,e))??t}requestTile(t,e,r,i){return function(t,e,r,i,s){const l=(0,h.mN)(t),o=l.query;if(o)for(const[t,s]of Object.entries(o))switch(s){case"{x}":o[t]=i.toString();break;case"{y}":o[t]=r.toString();break;case"{z}":o[t]=e.toString()}const n=l.path;return k((0,h.fl)(n.replaceAll(/\{z\}/gi,e.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,i.toString()),{...l.query}),s)}(this.tileServers[e%this.tileServers.length],t,e,r,i)}isCompatibleWith(t){const e=this.tileInfo,r=t.tileInfo;if(!e.spatialReference.equals(r.spatialReference))return!1;if(!e.origin.equals(r.origin))return!1;if(Math.round(e.dpi)!==Math.round(r.dpi))return!1;const i=e.lods,s=r.lods,l=Math.min(i.length,s.length);for(let t=0;t<l;t++){const e=i[t],r=s[t];if(e.level!==r.level||Math.round(e.scale)!==Math.round(r.scale))return!1}return!0}}function G(...t){let e;for(const r of t)if(null!=r)if((0,h.oC)(r)){if(e){const t=e.split("://")[0];e=t+":"+r.trim()}}else e=(0,h.YP)(r)?r:(0,h.v_)(e,r);return e?(0,h.Qj)(e):void 0}async function $(t,e,r,i,l){let o,n,a;if((0,u.k_)(l),"string"==typeof r){const t=(0,h.Fv)(r);a=await(0,s.Z)(t,{...l,responseType:"json",query:{f:"json",...l?.query}}),a.ssl&&(o&&(o=o.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),o=t,n=t}else null!=r&&(a={data:r},o=r.jsonUrl||null,n=i);const c=a?.data;if(H(c))return t.styleUrl=o||null,async function(t,e,r,i){const s=r?(0,h.Yd)(r):(0,h.L)();t.styleBase=s,t.style=e,e["sprite-format"]&&"webp"===e["sprite-format"].toLowerCase()&&(t.spriteFormat="webp");const l=[];if(e.sources&&e.sources.esri){const r=e.sources.esri;r.url?await $(t,"esri",G(s,r.url),void 0,i):l.push($(t,"esri",r,s,i))}for(const r of Object.keys(e.sources))"esri"!==r&&"vector"===e.sources[r].type&&(e.sources[r].url?l.push($(t,r,G(s,e.sources[r].url),void 0,i)):e.sources[r].tiles&&l.push($(t,r,e.sources[r],s,i)));await Promise.all(l)}(t,c,n,l);if(!H(c))return t.sourceUrl?K(t,c,n,!1,e,l):(t.sourceUrl=o||null,K(t,c,n,!0,e,l));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function q(t){return"object"==typeof t&&!!t&&"tilejson"in t&&null!=t.tilejson}function H(t){return!!t&&"sources"in t&&!!t.sources}async function K(t,e,r,i,s,l){const o=r?(0,h.Qj)(r)+"/":(0,h.L)(),a=function(t){if(t.hasOwnProperty("tileInfo"))return t;const e={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let r=null;if(q(t)){const{bounds:e}=t;if(e){const t=(0,O.$)({x:e[0],y:e[1],spatialReference:(0,n.d9)(z.Zn)}),i=(0,O.$)({x:e[2],y:e[3],spatialReference:(0,n.d9)(z.Zn)});r={xmin:t.x,ymin:t.y,xmax:i.x,ymax:i.y,spatialReference:(0,n.d9)(z.R_)}}}null===r&&(r=e);let i=78271.51696400007,s=295828763.7957775;const l=[],o=t.hasOwnProperty("maxzoom")&&null!=t.maxzoom?+t.maxzoom:22;for(let t=0;t<=o;t++)l.push({level:t,scale:s,resolution:i}),i/=2,s/=2;return{capabilities:"TilesOnly",initialExtent:r,fullExtent:e,minScale:0,maxScale:0,tiles:t.tiles,tileInfo:{rows:512,cols:512,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:l,spatialReference:(0,n.d9)(z.R_)}}}(e),u=new W(s,(0,h.fl)(o,l?.query??{}),a);if(!i&&t.primarySourceName in t.sourceNameToSource){const e=t.sourceNameToSource[t.primarySourceName];if(!e.isCompatibleWith(u))return;null!=u.fullExtent&&(null!=e.fullExtent?e.fullExtent.union(u.fullExtent):e.fullExtent=u.fullExtent.clone()),e.tileInfo&&u.tileInfo&&e.tileInfo.lods.length<u.tileInfo.lods.length&&(e.tileInfo=u.tileInfo)}if(i&&(t.sourceBase=o,t.source=e,t.validatedSource=a,t.primarySourceName=s),t.sourceNameToSource[s]=u,!q(t)&&"defaultStyles"in e&&!t.style){if(null==e.defaultStyles)throw new Error;return"string"==typeof e.defaultStyles?$(t,"",G(o,e.defaultStyles,"root.json"),void 0,l):$(t,"",e.defaultStyles,G(o,"root.json"),l)}}var V=r(33516),Q=r(19745),J=r(25929),X=r(94139),Y=r(39450);const tt=1e-6;function et(t,e){if(t===e)return!0;if(null==t&&null!=e)return!1;if(null!=t&&null==e)return!1;if(null==t||null==e)return!1;if(!t.spatialReference.equals(e.spatialReference)||t.dpi!==e.dpi)return!1;const r=t.origin,i=e.origin;if(Math.abs(r.x-i.x)>=tt||Math.abs(r.y-i.y)>=tt)return!1;let s,l;t.lods[0].scale>e.lods[0].scale?(s=t,l=e):(l=t,s=e);for(let t=s.lods[0].scale;t>=l.lods[l.lods.length-1].scale-tt;t/=2)if(Math.abs(t-l.lods[0].scale)<tt)return!0;return!1}function rt(t,e){if(t===e)return t;if(null==t&&null!=e)return e;if(null!=t&&null==e)return t;if(null==t||null==e)return null;const r=t.size[0],i=t.format,s=t.dpi,l=new X.Z({x:t.origin.x,y:t.origin.y}),o=t.spatialReference,n=t.lods[0].scale>e.lods[0].scale?t.lods[0]:e.lods[0],a=t.lods[t.lods.length-1].scale<=e.lods[e.lods.length-1].scale?t.lods[t.lods.length-1]:e.lods[e.lods.length-1],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,f=0;for(;d>c;)p.push(new Y.Z({level:f,resolution:y,scale:d})),f++,d/=2,y/=2;return new C.Z({size:[r,r],dpi:s,format:i||"pbf",origin:l,lods:p,spatialReference:o})}var it=r(51785),st=r(7575);let lt,ot;function nt(t){const e=(0,st.Sh)(t);for(;e.length>1;){const t=at(e.shift());if(t.available)return t}return at(e.shift())}function at(t){switch(t){case st.zO.WEBGL1:return lt||(lt=function(){const t=new ht,e=pt(st.zO.WEBGL1,t);return null==e||(t.supportsElementIndexUint=null!==e.getExtension("OES_element_index_uint"),t.supportsStandardDerivatives=null!==e.getExtension("OES_standard_derivatives"),t.supportsInstancedArrays=null!==e.getExtension("ANGLE_instanced_arrays"),t.supportsTextureFloat=null!==e.getExtension("OES_texture_float"),t.supportsTextureHalfFloat=null!==e.getExtension("OES_texture_half_float"),t.supportsColorBufferFloat=null!==e.getExtension("WEBGL_color_buffer_float"),t.supportsColorBufferFloatBlend=null!==e.getExtension("EXT_float_blend"),t.supportsColorBufferHalfFloat=null!==e.getExtension("EXT_color_buffer_half_float")),t}()),lt;case st.zO.WEBGL2:return ot||(ot=function(){const t=new ct,e=pt(st.zO.WEBGL2,t);return null==e||(t.supportsColorBufferFloat=null!==e.getExtension("EXT_color_buffer_float"),t.supportsColorBufferFloatBlend=null!==e.getExtension("EXT_float_blend"),t.supportsColorBufferHalfFloat=t.supportsColorBufferFloat||null!==e.getExtension("EXT_color_buffer_half_float")),t}()),ot}}class ut{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsElementIndexUint=!1,this.supportsStandardDerivatives=!1,this.supportsInstancedArrays=!1,this.supportsTextureFloat=!1,this.supportsTextureHalfFloat=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1}}class ht extends ut{constructor(){super(...arguments),this.type=st.zO.WEBGL1}}class ct extends ut{constructor(){super(...arguments),this.type=st.zO.WEBGL2,this.supportsElementIndexUint=!0,this.supportsStandardDerivatives=!0,this.supportsInstancedArrays=!0,this.supportsTextureFloat=!0,this.supportsTextureHalfFloat=!0}}function pt(t,e){if(t===st.zO.WEBGL1&&"undefined"==typeof WebGLRenderingContext||t===st.zO.WEBGL2&&"undefined"==typeof WebGL2RenderingContext)return null;const r=document.createElement("canvas");if(!r)return null;let i=(0,st.kr)(r,t,{failIfMajorPerformanceCaveat:!0});if(null==i&&(i=(0,st.kr)(r,t),null!=i&&(e.majorPerformanceCaveat=!0)),null==i)return i;if(t===st.zO.WEBGL1){const t=i.getParameter(i.VERSION),r=t?.match(/^WebGL\s+([\d.]*)/);if(r){const t=parseFloat(r[1]);e.available=t>=.94}}else e.available=!0;e.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),e.supportsVertexShaderSamplers=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const s=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT);return s&&(e.supportsHighPrecisionFragment=s.precision>0),i}let dt=class extends((0,b.h)((0,E.M)((0,v.Z)((0,w.Y)((0,A.q)((0,x.I)((0,S.N)((0,_.V)((0,a.R)(g.Z)))))))))){constructor(...t){super(...t),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.style=null,this.tilemapCache=null,this.type="vector-tile",this.url=null,this.path=null}normalizeCtorArgs(t,e){return"string"==typeof t?{url:t,...e}:t}destroy(){if(this.sourceNameToSource)for(const t of Object.values(this.sourceNameToSource))t?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(t){await this.loadSpriteSource(globalThis.devicePixelRatio||1,t)}load(t){const e=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},t).catch(u.r9).then((async()=>{if(!this.portalItem?.id)return;const e=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,s.Z)(e,{...t,query:{f:"json",...this.customParameters,token:this.apiKey}})).data&&this.read({url:e},(0,V.ht)(this.portalItem))})).catch(u.r9).then((()=>this._loadStyle(t)));return this.addResolvingPromise(e),Promise.resolve(this)}get attributionDataUrl(){const t=this.currentStyleInfo,e=t?.serviceUrl&&(0,h.mN)(t.serviceUrl);if(!e)return null;const r=this._getDefaultAttribution(e.path);return r?(0,h.fl)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const t=this.primarySource;return t?t.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.mN)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(t,e){t&&(0,h.oC)(t)&&(t=`https:${t}`);const r=(0,Q.a)(t);e.styleUrl=(0,J.e)(t,r)}get tileInfo(){const t=[];for(const e in this.sourceNameToSource)t.push(this.sourceNameToSource[e]);let e=this.primarySource?.tileInfo||new C.Z;if(t.length>1)for(let r=0;r<t.length;r++)et(e,t[r].tileInfo)&&(e=rt(e,t[r].tileInfo));return e}readTilemapCache(t,e){const r=e.capabilities?.includes("Tilemap");return r?new L.y({layer:this}):null}readVersion(t,e){return e.version?parseFloat(e.version):parseFloat(e.currentVersion)}async loadSpriteSource(t=1,e){if(!this._spriteSourceMap.has(t)){const r=nt("2d").maxTextureSize,i=this.currentStyleInfo?.spriteUrl?(0,h.fl)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,s=new U({type:"url",spriteUrl:i,pixelRatio:t,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await s.load(e),this._spriteSourceMap.set(t,s)}return this._spriteSourceMap.get(t)}async setSpriteSource(t,e){if(!t)return null;const r=nt("2d").maxTextureSize,i=t.spriteUrl,s=i?(0,h.fl)(i,{...this.customParameters,token:this.apiKey}):null;if(!s&&"url"===t.type)return null;const l=new U(t,r);try{await l.load(e);const r=t.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,l),s&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=s),this.emit("spriteSource-change",{spriteSource:l}),l}catch(t){(0,u.r9)(t)}return null}async loadStyle(t,e){const r=t||this.style||this.url;return this._loadingTask&&"string"==typeof r&&this.url===r||(this._loadingTask?.abort(),this._loadingTask=(0,l.vr)((t=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:t}))),e)),this._loadingTask.promise}getStyleLayerId(t){return this.styleRepository.getStyleLayerId(t)}getStyleLayerIndex(t){return this.styleRepository.getStyleLayerIndex(t)}getPaintProperties(t){return(0,n.d9)(this.styleRepository?.getPaintProperties(t))}setPaintProperties(t,e){const r=this.styleRepository.isPainterDataDriven(t);this.styleRepository.setPaintProperties(t,e);const i=this.styleRepository.isPainterDataDriven(t);this.emit("paint-change",{layer:t,paint:e,isDataDriven:r||i})}getStyleLayer(t){return(0,n.d9)(this.styleRepository.getStyleLayer(t))}setStyleLayer(t,e){this.styleRepository.setStyleLayer(t,e),this.emit("style-layer-change",{layer:t,index:e})}deleteStyleLayer(t){this.styleRepository.deleteStyleLayer(t),this.emit("delete-style-layer",{layer:t})}getLayoutProperties(t){return(0,n.d9)(this.styleRepository.getLayoutProperties(t))}setLayoutProperties(t,e){this.styleRepository.setLayoutProperties(t,e),this.emit("layout-change",{layer:t,layout:e})}setStyleLayerVisibility(t,e){this.styleRepository.setStyleLayerVisibility(t,e),this.emit("style-layer-visibility-change",{layer:t,visibility:e})}getStyleLayerVisibility(t){return this.styleRepository.getStyleLayerVisibility(t)}write(t,e){return e?.origin&&!this.styleUrl?(e.messages&&e.messages.push(new o.Z("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(t,e)}getTileUrl(t,e,r){return null}async _getSourceAndStyle(t,e){if(!t)throw new Error("invalid style!");const r=await async function(t,e){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[i,s]="string"==typeof t?[t,null]:[null,t.jsonUrl];return await $(r,"esri",t,s,e),{layerDefinition:r.validatedSource,url:i,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style.sprite&&G(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style.glyphs&&G(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName}}(t,{...e,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(t){if(I)return I;const e={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return I=new Promise((t=>{const r=new Image;r.onload=()=>{r.onload=r.onerror=null,t(r.width>0&&r.height>0)},r.onerror=()=>{r.onload=r.onerror=null,t(!1)},r.src="data:image/webp;base64,"+e.lossy})),I}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof t?(this.url=t,this.style=null):(this.url=null,this.style=t),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new it.Z(r.style)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(t){const e=t.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i),r=["OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2"];if(!e)return;const i=e[2]&&e[2].toLowerCase();if(!i)return;const s=e[1]||"";for(const t of r)if(t.toLowerCase().includes(i))return(0,h.Fv)(`//static.arcgis.com/attribution/Vector${s}/${t}`)}async _loadStyle(t){return this._loadingTask?.promise??this.loadStyle(null,t)}};(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"attributionDataUrl",null),(0,i._)([(0,c.Cb)({type:["show","hide"]})],dt.prototype,"listMode",void 0),(0,i._)([(0,c.Cb)({json:{read:!0,write:!0}})],dt.prototype,"blendMode",void 0),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],dt.prototype,"capabilities",null),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"currentStyleInfo",void 0),(0,i._)([(0,c.Cb)({json:{read:!1},readOnly:!0,type:f.Z})],dt.prototype,"fullExtent",null),(0,i._)([(0,c.Cb)({json:{read:!1},readOnly:!0,type:f.Z})],dt.prototype,"initialExtent",null),(0,i._)([(0,c.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],dt.prototype,"isReference",void 0),(0,i._)([(0,c.Cb)({type:["VectorTileLayer"]})],dt.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"parsedUrl",null),(0,i._)([(0,c.Cb)()],dt.prototype,"style",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"serviceUrl",null),(0,i._)([(0,c.Cb)({type:m.Z,readOnly:!0})],dt.prototype,"spatialReference",null),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"styleRepository",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"sourceNameToSource",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"primarySource",void 0),(0,i._)([(0,c.Cb)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],dt.prototype,"styleUrl",null),(0,i._)([(0,y.c)(["portal-item","web-document"],"styleUrl")],dt.prototype,"writeStyleUrl",null),(0,i._)([(0,c.Cb)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:C.Z})],dt.prototype,"tileInfo",null),(0,i._)([(0,c.Cb)()],dt.prototype,"tilemapCache",void 0),(0,i._)([(0,p.r)("service","tilemapCache",["capabilities","tileInfo"])],dt.prototype,"readTilemapCache",null),(0,i._)([(0,c.Cb)({json:{read:!1},readOnly:!0,value:"vector-tile"})],dt.prototype,"type",void 0),(0,i._)([(0,c.Cb)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],dt.prototype,"url",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"version",void 0),(0,i._)([(0,p.r)("version",["version","currentVersion"])],dt.prototype,"readVersion",null),(0,i._)([(0,c.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],dt.prototype,"path",void 0),dt=(0,i._)([(0,d.j)("esri.layers.VectorTileLayer")],dt);const yt=dt},54295:(t,e,r)=>{r.d(e,{V:()=>o});var i=r(43697),s=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const o=t=>{let e=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(t){null!=t?this._override("apiKey",t):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.Cb)({type:String})],e.prototype,"apiKey",null),e=(0,i._)([(0,l.j)("esri.layers.mixins.APIKeyMixin")],e),e}},17017:(t,e,r)=>{r.d(e,{N:()=>o});var i=r(43697),s=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const o=t=>{let e=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.Cb)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],e.prototype,"customParameters",void 0),e=(0,i._)([(0,l.j)("esri.layers.mixins.CustomParametersMixin")],e),e}},16859:(t,e,r)=>{r.d(e,{I:()=>S});var i=r(43697),s=r(68773),l=r(40330),o=r(3172),n=r(66643),a=r(20102),u=r(92604),h=r(70586),c=r(95330),p=r(17452),d=r(5600),y=(r(75215),r(67676),r(80442),r(71715)),f=r(52011),m=r(30556),g=r(84230),_=r(48522),v=r(15235),w=r(86082),b=r(14661);const S=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new v.default({id:e.itemId,portal:r?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(e),await i({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap},e)}catch(t){throw(0,c.D_)(t)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch((t=>((0,c.r9)(t),!0))))}async setUserPrivileges(t,e){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(t){(0,c.r9)(t)}}async _fetchUserPrivileges(t,e){let r=this.portalItem;if(!t||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(e);const i=t===r.id;if(i&&r.portal.user)return(0,b.Ss)(r);let s,o;if(i)s=r.portal.url;else try{s=await(0,g.oP)(this.url,e)}catch(t){(0,c.r9)(t)}if(!s||!(0,p.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;o=await(l.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,c.r9)(t)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new v.default({id:t,portal:{url:s}}),await r.load(e)),r.portal.user)return(0,b.Ss)(r)}catch(t){(0,c.r9)(t)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,c.r9)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?l.id?.findCredential(this.url):null;if(!e)return!0;const r=A.credential===e?A.user:await this._fetchEditingUser(t);return A.credential=e,A.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const r=l.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=_.Z.getDefault();if(s&&s.loaded&&(0,p.Fv)(s.restUrl)===(0,p.Fv)(i))return s.user;const a=`${i}/community/self`,u=null!=t?t.signal:null,h=await(0,n.q6)((0,o.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?w.Z.fromJSON(h.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const r=e?.portal,i=this.portalItem?.id&&(this.portalItem.portal||_.Z.getDefault());return r&&i&&!(0,p.tm)(i.restUrl,r.restUrl)?(e.messages&&e.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(t,{...e,layer:this})}};return(0,i._)([(0,d.Cb)({type:v.default})],e.prototype,"portalItem",null),(0,i._)([(0,y.r)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),(0,i._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),(0,i._)([(0,d.Cb)({clonable:!1})],e.prototype,"resourceReferences",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasUpdateItemPrivileges",void 0),e=(0,i._)([(0,f.j)("esri.layers.mixins.PortalLayer")],e),e},A={credential:null,user:null}},33516:(t,e,r)=>{r.d(e,{M4:()=>a,Yv:()=>o,ht:()=>l,wk:()=>n});var i=r(17452),s=r(48522);function l(t){return{origin:"portal-item",url:(0,i.mN)(t.itemUrl),portal:t.portal||s.Z.getDefault(),portalItem:t,readResourcePaths:[]}}function o(t){const e=(0,i.mN)(t.itemUrl);return{origin:"portal-item",messages:[],writtenProperties:[],url:e,portal:t.portal||s.Z.getDefault(),portalItem:t,verifyItemRelativeUrls:e?{rootPath:e.path,writtenUrls:[]}:null,blockedRelativeUrls:[]}}function n(t){return{origin:"web-map",url:(0,i.mN)(t.itemUrl),portal:t.portal||s.Z.getDefault(),portalItem:t,readResourcePaths:[]}}function a(t,e){const r=(0,i.mN)(t.itemUrl);return{origin:"web-map",messages:[],writtenProperties:[],url:r,portal:t.portal||s.Z.getDefault(),portalItem:t,initiator:e,verifyItemRelativeUrls:r?{rootPath:r.path,writtenUrls:[]}:null,blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}}}},55415:(t,e,r)=>{r.d(e,{Z:()=>s});var i=r(71143);class s{static getId(t,e,r,i){return"object"==typeof t?`${t.level}/${t.row}/${t.col}/${t.world}`:`${t}/${e}/${r}/${i}`}constructor(t,e,r,i){this.set(t,e,r,i)}get key(){return this}get id(){return this.toString()}set id(t){this.set(t)}get hash(){const t=4095&this.row,e=4095&this.col,r=63&this.level;return(3&this.world)<<30|e<<22|t<<8|r}acquire(t,e,r,i){this.set(t,e,r,i)}contains(t){const e=t.level-this.level;return e>=0&&this.row===t.row>>e&&this.col===t.col>>e&&this.world===t.world}equals(t){return this.level===t.level&&this.row===t.row&&this.col===t.col&&this.world===t.world}clone(){return new s(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(t,e,r,i){if(null==t)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof t)this.level=t.level||0,this.row=t.row||0,this.col=t.col||0,this.world=t.world||0;else if("string"==typeof t){const[e,r,i,s]=t.split("/");this.level=parseFloat(e),this.row=parseFloat(r),this.col=parseFloat(i),this.world=parseFloat(s)}else this.level=+t,this.row=+e,this.col=+r,this.world=+i||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new s(this.level-1,this.row>>1,this.col>>1,this.world)}getChildKeys(){const t=this.level+1,e=this.row<<1,r=this.col<<1,i=this.world;return[new s(t,e,r,i),new s(t,e,r+1,i),new s(t,e+1,r,i),new s(t,e+1,r+1,i)]}compareRowMajor(t){return this.row<t.row?-1:this.row>t.row?1:this.col<t.col?-1:this.col>t.col?1:0}}s.pool=new i.Z(s,null,null,25,50)},7575:(t,e,r)=>{r.d(e,{Sh:()=>o,kr:()=>l,zO:()=>i});var i,s=r(80442);function l(t,e,r={}){const s=e===i.WEBGL1?"webgl":"webgl2";return t.getContext(s,r)||null}function o(t){if("3d"===t)return[i.WEBGL2];const e=(0,s.Z)("esri-force-webgl");return e===i.WEBGL1||e===i.WEBGL2?[e]:(0,s.Z)("mac")&&(0,s.Z)("chrome")?[i.WEBGL1,i.WEBGL2]:[i.WEBGL2,i.WEBGL1]}!function(t){t[t.WEBGL1=1]="WEBGL1",t[t.WEBGL2=2]="WEBGL2"}(i||(i={}))}}]);
@@ -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}},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 B=[];for(let e=0;e<I.length;e++){const t=I[e];if("cut"!==t)B.push(t);else{const e=D.shift();B.push(!0===f?(0,p.$)(e):e)}}return B}},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),B=i(9790),E=i(96674),R=i(77987);let L=class extends E.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:B.LB})],L.prototype,"break",void 0),(0,r._)([(0,v.Cb)({types:B.LB})],L.prototype,"first",void 0),(0,r._)([(0,v.Cb)({types:B.LB})],L.prototype,"unlocated",void 0),(0,r._)([(0,v.Cb)({types:B.LB})],L.prototype,"last",void 0),(0,r._)([(0,v.Cb)({types:B.LB})],L.prototype,"middle",void 0),(0,r._)([(0,v.Cb)({types:B.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 E.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:B.LB})],Z.prototype,"directionLines",void 0),(0,r._)([(0,v.Cb)({types:B.LB})],Z.prototype,"directionPoints",void 0),(0,r._)([(0,v.Cb)({types:B.LB})],Z.prototype,"pointBarriers",void 0),(0,r._)([(0,v.Cb)({types:B.LB})],Z.prototype,"polygonBarriers",void 0),(0,r._)([(0,v.Cb)({types:B.LB})],Z.prototype,"polylineBarriers",void 0),(0,r._)([(0,v.Cb)({types:B.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 E.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 E.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)(E.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 E.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 Be(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 Ee(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 E.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 E.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 E.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 E.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 E.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)(E.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:B.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)(E.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:B.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)(E.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 Be(t.attributes,"Attr_")}writeCosts(e,t){Ee(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:B.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)(E.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 Be(t.attributes,"Attr_")}writeCosts(e,t){Ee(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:B.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)(E.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 Be(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:B.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 E.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)(E.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 Be(t.attributes,"Total_")}readTotalViolations(e,t){return Be(t.attributes,"TotalViolation_")}readTotalWait(e,t){return Be(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:B.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)(E.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 Bt=Mt;var Et;let Rt=Et=class extends Ue.Z{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Et({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Rt.prototype,"doNotLocateOnRestrictedElements",void 0),Rt=Et=(0,r._)([(0,_.j)("esri.rest.support.NetworkFeatureSet")],Rt);const Lt=Rt;let Pt=class extends((0,Ce.J)(E.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)(E.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)?Bt.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)(E.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 Be(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Pe(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Be(t.attributes,"Attr_")}writeServiceCosts(e,t){Ee(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 Be(t.attributes,"Violation_")}readWait(e,t){return Be(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:B.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:()=>a});var r=i(20102),o=i(96674),s=i(92604),n=i(69165),l=i(25031);class a{static fromJSON(e){return new a(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new a(e.fields??[],c(e))}static fromLayerJSON(e){return new a(e.fields??[],c(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=p(t);if(t&&r){const o=u(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,n.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,n.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,n.Dl)(e)||(0,n.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,n.Dl)(e)||(0,n.Se)(e)||e.nullable||void 0!==(0,n.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(u(e))??this._normalizedFieldsMap.get(p(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}'`)),l.pt):d.has(t.type)?l._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,n.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 u(e){return e.trim().toLowerCase()}function p(e){return(0,n.q6)(e)?.toLowerCase()??""}const d=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function c(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:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,l.Jv)(e.dateFieldsTimeReference):null,p=o?function(e){return"timeZone"in e}(o)?o.timeZone??a:o.dateFieldsTimeReference?(0,l.Jv)(o.dateFieldsTimeReference):a??l.pt:null,c=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.timeReference?(0,l.Jv)(r.timeReference):a:null,m=new Map([[u(o?.creationDateField??""),p],[u(o?.editDateField??""),p],[u(s),c],[u(n),c]]);for(const{name:r,type:o}of e.fields)if(d.has(o))t.set(r,l._4);else if("date"!==o&&"esriFieldTypeDate"!==o)t.set(r,null);else if(i)t.set(r,l._4);else{const e=m.get(u(r??""))??a;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)}}]);