@arcgis/core 5.2.0-next.82 → 5.2.0-next.83

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 (126) hide show
  1. package/assets/components/assets/icon/deleteAndReplaceFeatures16.json +1 -0
  2. package/assets/components/assets/icon/deleteAndReplaceFeatures24.json +1 -0
  3. package/assets/components/assets/icon/deleteAndReplaceFeatures32.json +1 -0
  4. package/assets/components/assets/icon/moveAndRotate16.json +1 -0
  5. package/assets/components/assets/icon/moveAndRotate24.json +1 -0
  6. package/assets/components/assets/icon/moveAndRotate32.json +1 -0
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/028bee58f7bc19e5e39e.js +1 -0
  9. package/assets/esri/core/workers/chunks/{a2fd945659ce052f99d2.js → 03895d49fbd34ccb3ead.js} +1 -1
  10. package/assets/esri/core/workers/chunks/0775d1e3034d5e7ef7bc.js +1 -0
  11. package/assets/esri/core/workers/chunks/{95ff342e5c29bf91a765.js → 13a43c87d7952facbed4.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{e59101f1d060d0a30a65.js → 14def8f47ae7265dd71b.js} +1 -1
  13. package/assets/esri/core/workers/chunks/1b00789511c9b27da4a7.js +1 -0
  14. package/assets/esri/core/workers/chunks/1b277311a4beb4243bf8.js +2 -0
  15. package/assets/esri/core/workers/chunks/1d03db4df18524cf391c.js +1 -0
  16. package/assets/esri/core/workers/chunks/24bfe759c8848143361e.js +1 -0
  17. package/assets/esri/core/workers/chunks/30dade7bf6032be32599.js +2 -0
  18. package/assets/esri/core/workers/chunks/{865f9adc591056458b6b.js → 33dc93d82407052fafe1.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{0d982abff7c9496f7890.js → 3a6990058f1003bd2812.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{0fd7590e545864f5fff4.js → 3ca0d503ce733088a6c2.js} +1 -1
  21. package/assets/esri/core/workers/chunks/46b3d6814ba4c0a71111.js +1 -0
  22. package/assets/esri/core/workers/chunks/49784f8e8e5fac0cc5a9.js +1 -0
  23. package/assets/esri/core/workers/chunks/{563a4d6788ad66b676e4.js → 5156d94f01b4fbbf8cde.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{cdd4aeaa3f30bc4ea93a.js → 5568448e7f51508ffdf5.js} +1 -1
  25. package/assets/esri/core/workers/chunks/58e4aecabca047f1d229.js +1 -0
  26. package/assets/esri/core/workers/chunks/{218ddad849745d652a28.js → 5a3c1fe24814a345ab39.js} +1 -1
  27. package/assets/esri/core/workers/chunks/5b292831127bf981c1c5.js +1 -0
  28. package/assets/esri/core/workers/chunks/{bd1c870694edd25bf8aa.js → 5f13ade03500b39c1720.js} +1 -1
  29. package/assets/esri/core/workers/chunks/6154f4d39f9e53fe56cc.js +1 -0
  30. package/assets/esri/core/workers/chunks/62b116307483d5f0e37d.js +2 -0
  31. package/assets/esri/core/workers/chunks/6433a623af765b7e53ab.js +1 -0
  32. package/assets/esri/core/workers/chunks/65eff0ae773505495f21.js +1 -0
  33. package/assets/esri/core/workers/chunks/6d11b922898a8039dbe7.js +1 -0
  34. package/assets/esri/core/workers/chunks/7188559a685e0ba30c4f.js +1 -0
  35. package/assets/esri/core/workers/chunks/{faf14281a74a06fa1f30.js → 724b2631c9ced80a1661.js} +1 -1
  36. package/assets/esri/core/workers/chunks/7493ce5d02224c07a6d5.js +1 -0
  37. package/assets/esri/core/workers/chunks/7ad70c8a56f2481adc82.js +1 -0
  38. package/assets/esri/core/workers/chunks/7ca188f824956a5cac35.js +2 -0
  39. package/assets/esri/core/workers/chunks/852649460d664b0a1a1d.js +1 -0
  40. package/assets/esri/core/workers/chunks/{ab10388dcc17a665ac3b.js → 8e1b913067b8e88ff365.js} +2 -2
  41. package/assets/esri/core/workers/chunks/{e3eab61815ef1c521a6c.js → 9568932bafe689c38f63.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{c8d83f71326222b98608.js → 996ac351e2322298a17d.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{34f6093d2c00e3584037.js → 9be05d32528b395a7d34.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{552d6aecc7d88d16227b.js → 9d41c02601d0bb75b525.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{64a1ffc221e5b63b43fb.js → a4bb0951e1389e7b803c.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{b09e9ac5fd928e69b053.js → aabffe53508730e504ec.js} +1 -1
  47. package/assets/esri/core/workers/chunks/b61c30cdf698b4d1573a.js +1 -0
  48. package/assets/esri/core/workers/chunks/bbb97c38d8670329d07e.js +2 -0
  49. package/assets/esri/core/workers/chunks/bd8b483e70acf0fc601e.js +1 -0
  50. package/assets/esri/core/workers/chunks/bef32acf368b4d5aba37.js +1 -0
  51. package/assets/esri/core/workers/chunks/c90dfdf2302b7db1f6f7.js +1 -0
  52. package/assets/esri/core/workers/chunks/{8a36b999cbd65dd2f16c.js → d8c3bdc3c6be8ba7c5e6.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{40b842d055b87e442156.js → f20b88f5a6d3b988a055.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{f248131df4eaa5291623.js → f6ae0c483579e227a2f2.js} +1 -1
  55. package/config.js +1 -1
  56. package/geometry/support/spatialReferenceUtils.js +1 -1
  57. package/kernel.js +1 -1
  58. package/package.json +2 -2
  59. package/renderers/UniqueValueRenderer.js +1 -1
  60. package/support/revision.js +1 -1
  61. package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
  62. package/views/2d/engine/vectorTiles/style/GeoJSONLabelUtils.js +2 -0
  63. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  64. package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
  65. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  66. package/views/3d/GroundView3D.js +1 -1
  67. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
  68. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  69. package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
  70. package/views/3d/analysis/LineOfSight/LineOfSightPlacementLeafPlugin.js +1 -1
  71. package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
  72. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  73. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  74. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
  75. package/views/3d/input/SceneInputManager.js +1 -1
  76. package/views/3d/input/handlers/PinchAndPanNavigation.js +1 -1
  77. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  78. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  79. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  80. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  81. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  82. package/views/3d/state/utils/navigationUtils.js +1 -1
  83. package/views/3d/support/GroundAndIMSurface.js +2 -0
  84. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  85. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  86. package/views/3d/support/pointsOfInterest/PointOfInterest.js +1 -1
  87. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  88. package/views/3d/terrain/OverlayManager.js +1 -1
  89. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  90. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  91. package/views/SceneView.js +1 -1
  92. package/views/draw/support/PluginContext.js +1 -1
  93. package/views/draw/support/types.d.ts +6 -0
  94. package/views/interactive/interactiveToolUtils.js +1 -1
  95. package/widgets/Widget.js +1 -1
  96. package/widgets/support/jsxWidgetSupport.js +1 -1
  97. package/assets/esri/core/workers/chunks/0dcfd82a2669df6eb5a0.js +0 -1
  98. package/assets/esri/core/workers/chunks/1352b5c6767e5421bc02.js +0 -1
  99. package/assets/esri/core/workers/chunks/14469f664fd5ede469fc.js +0 -1
  100. package/assets/esri/core/workers/chunks/177c3b23c1cbd4737049.js +0 -1
  101. package/assets/esri/core/workers/chunks/21f763694a41968ac21a.js +0 -1
  102. package/assets/esri/core/workers/chunks/230925079cee040a8d77.js +0 -1
  103. package/assets/esri/core/workers/chunks/25696c194457e42b3bdc.js +0 -1
  104. package/assets/esri/core/workers/chunks/469e72ab6cd44272f474.js +0 -1
  105. package/assets/esri/core/workers/chunks/4f36596280142be1c666.js +0 -1
  106. package/assets/esri/core/workers/chunks/53d80202b5f43542d45b.js +0 -1
  107. package/assets/esri/core/workers/chunks/6c389e9646a48c26da20.js +0 -2
  108. package/assets/esri/core/workers/chunks/6f08c8a1e8e3ffd0a96a.js +0 -1
  109. package/assets/esri/core/workers/chunks/71ee7c51d2c60a180f1e.js +0 -1
  110. package/assets/esri/core/workers/chunks/927582ec15bff2acbb49.js +0 -1
  111. package/assets/esri/core/workers/chunks/98739b6e7904045edbab.js +0 -1
  112. package/assets/esri/core/workers/chunks/a69c10bfd632a5546b34.js +0 -1
  113. package/assets/esri/core/workers/chunks/ac9a3dfd02160e43fc8a.js +0 -2
  114. package/assets/esri/core/workers/chunks/c456abf5ee2a1ad5cc5b.js +0 -1
  115. package/assets/esri/core/workers/chunks/c61e94806b37ca3dd549.js +0 -2
  116. package/assets/esri/core/workers/chunks/c899457f19b749516275.js +0 -1
  117. package/assets/esri/core/workers/chunks/d0c8630177d3a4e316f1.js +0 -2
  118. package/assets/esri/core/workers/chunks/da0ef984509057ec8507.js +0 -1
  119. package/assets/esri/core/workers/chunks/ead4143d811aab610e00.js +0 -2
  120. package/assets/esri/core/workers/chunks/ffe2cbfea38b92a231d6.js +0 -1
  121. /package/assets/esri/core/workers/chunks/{d0c8630177d3a4e316f1.js.LICENSE.txt → 1b277311a4beb4243bf8.js.LICENSE.txt} +0 -0
  122. /package/assets/esri/core/workers/chunks/{ead4143d811aab610e00.js.LICENSE.txt → 30dade7bf6032be32599.js.LICENSE.txt} +0 -0
  123. /package/assets/esri/core/workers/chunks/{ac9a3dfd02160e43fc8a.js.LICENSE.txt → 62b116307483d5f0e37d.js.LICENSE.txt} +0 -0
  124. /package/assets/esri/core/workers/chunks/{6c389e9646a48c26da20.js.LICENSE.txt → 7ca188f824956a5cac35.js.LICENSE.txt} +0 -0
  125. /package/assets/esri/core/workers/chunks/{ab10388dcc17a665ac3b.js.LICENSE.txt → 8e1b913067b8e88ff365.js.LICENSE.txt} +0 -0
  126. /package/assets/esri/core/workers/chunks/{c61e94806b37ca3dd549.js.LICENSE.txt → bbb97c38d8670329d07e.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3996],{60999(t,e,i){i.d(e,{DZ:()=>d,Ke:()=>y,Tj:()=>u,UT:()=>m,aD:()=>_,jJ:()=>h});var s=i(5482),r=i(69622),l=i(97768),n=i(17676),o=i(10107),a=i(64108);function h(t,e,i){return(0,n.Lx)(t.map((t,s)=>e.apply(i,[t,s])))}async function u(t,e,i){return(await(0,n.Lx)(t.map((t,s)=>e.apply(i,[t,s])))).map(t=>t.value)}function c(t){return{ok:!0,value:t}}function p(t){return{ok:!1,error:t}}async function y(t){if(null==t)return{ok:!1,error:new Error("no promise provided")};try{return c(await t)}catch(t){return p(t)}}async function d(t){try{return c(await t)}catch(t){return(0,n.QP)(t),p(t)}}function m(t,e){return new f(t,e)}let f=class extends r.A{get value(){return null!=(t=this._result)&&!0===t.ok?t.value:null;var t}get error(){return null!=(t=this._result)&&!1===t.ok?t.error:null;var t}get finished(){return null!=this._result}constructor(t,e){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,l.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=t(i),this.promise.then(t=>{this._result=c(t),this._cleanup()},t=>{this._result=p(t),this._cleanup()}),this._abortHandle=(0,n.u7)(e,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,l.xt)(this._abortHandle),this._abortController=null}};(0,s.Cg)([(0,o.MZ)()],f.prototype,"value",null),(0,s.Cg)([(0,o.MZ)()],f.prototype,"error",null),(0,s.Cg)([(0,o.MZ)()],f.prototype,"finished",null),(0,s.Cg)([(0,o.MZ)()],f.prototype,"promise",void 0),(0,s.Cg)([(0,o.MZ)()],f.prototype,"_result",void 0),f=(0,s.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],f);class _{constructor(){this._sequence=Promise.resolve()}async acquire(){let t;this._sequence=new Promise(e=>{t=this._sequence.then(()=>e,()=>e)});const e=await t;return{[Symbol.dispose]:e}}async run(t){const e={stack:[],error:void 0,hasError:!1};try{return(0,s.mS)(e,await this.acquire(),!1),await t()}catch(t){e.error=t,e.hasError=!0}finally{(0,s.hk)(e)}}}},69397(t,e,i){i.d(e,{Qf:()=>o,Qh:()=>l,lM:()=>r});var s=i(34275);function r(t){if(!t)return 0;let e=h;for(const i in t)t.hasOwnProperty(i)&&(e+=n(t[i],!1));return e}function l(t){if(!t)return 0;if("number"==typeof t[0])return o(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return a(t,8);let i=u;for(let s=0;s<e;s++)i+=n(t[s]);return i}(t);let e=h;for(const i in t)t.hasOwnProperty(i)&&(e+=n(t[i]));return e}function n(t,e=!0){switch(typeof t){case"object":return e?l(t):h;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...t){return t.reduce((t,e)=>t+(e?(0,s.iu)(e)?e.byteLength+c:Array.isArray(e)?a(e,16):0:0),0)}function a(t,e){return u+t.length*e}const h=32,u=16,c=145},90629(t,e,i){i.d(e,{Lz:()=>r,PN:()=>l,cr:()=>n,gs:()=>a,r_:()=>h,tc:()=>o}),i(39829);const s=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function r(t){return t?t/72*96:0}function l(t){return t?72*t/96:0}function n(t){if("string"==typeof t){const e=t.match(s);if(e){const i=Number(e[1]),s=e[3]&&e[3].toLowerCase(),r=t.startsWith("-"),n="px"===s?l(i):i;return r?-n:n}return console.warn("screenUtils.toPt: input not recognized!"),null}return t}function o(t=0,e=0){return{x:t,y:e}}function a(t=0,e=0){return[t,e]}function h(t=0,e=0,i=0){return[t,e,i]}},83027(t,e,i){const s=i(29953).ho;i.d(e,["h",0,s])},6774(t,e,i){i.d(e,{O3:()=>l,Ox:()=>n,bR:()=>s});class s{constructor(t,e){this.x=t,this.y=e}static fromArray(t){return new s(t[0],t[1])}clone(){return new s(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){return this.x=t,this.y=e,this}normalize(){const t=this.x,e=this.y,i=Math.sqrt(t*t+e*e);return this.x/=i,this.y/=i,this}rightPerpendicular(){const t=this.x;return this.x=this.y,this.y=-t,this}leftPerpendicular(){const t=this.x;return this.x=-this.y,this.y=t,this}move(t,e){return this.x+=t,this.y+=e,this}assign(t){return this.x=t.x,this.y=t.y,this}assignAdd(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}assignSub(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}rotate(t,e){const i=this.x,s=this.y;return this.x=i*t-s*e,this.y=i*e+s*t,this}rotateReverse(t,e){const i=this.x,s=this.y;return this.x=i*t+s*e,this.y=-i*e+s*t,this}scale(t){return this.x*=t,this.y*=t,this}length(){const t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}sub(t){return this.x-=t.x,this.y-=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}static distance(t,e){const i=e.x-t.x,s=e.y-t.y;return Math.sqrt(i*i+s*s)}static add(t,e){return new s(t.x+e.x,t.y+e.y)}static sub(t,e){return new s(t.x-e.x,t.y-e.y)}}class r{constructor(t,e,i){this.ratio=t,this.x=e,this.y=i}}class l{constructor(t,e,i,s=8,r=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=s,this._pixelMargin=r,this._tileSize=512*s,this._dz=t,this._yPos=e,this._xPos=i}setPixelMargin(t){t!==this._pixelMargin&&(this._pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this._finalRatio=this._tileSize/t*(1<<this._dz);let e=this._pixelRatio*this._pixelMargin;e/=this._finalRatio;const i=t>>this._dz;e>i&&(e=i),this._margin=e,this._xmin=i*this._xPos-e,this._ymin=i*this._yPos-e,this._xmax=this._xmin+i+2*e,this._ymax=this._ymin+i+2*e}reset(t){this._type=t,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(t,e){this._pushLine(),this._prevIsIn=this._isIn(t,e),this._moveTo(t,e,this._prevIsIn),this._prevPt=new s(t,e),this._firstPt=new s(t,e),this._dist=0}lineTo(t,e){const i=this._isIn(t,e),l=new s(t,e),n=s.distance(this._prevPt,l);let o,a,h,u,c,p,y,d;if(i)this._prevIsIn?this._lineTo(t,e,!0):(o=this._prevPt,a=l,h=this._intersect(a,o),this._start=this._dist+n*(1-this._r),this._lineTo(h.x,h.y,!0),this._lineTo(a.x,a.y,!0));else if(this._prevIsIn)a=this._prevPt,o=l,h=this._intersect(a,o),this._lineTo(h.x,h.y,!0),this._lineTo(o.x,o.y,!1);else{const t=this._prevPt,e=l;if(t.x<=this._xmin&&e.x<=this._xmin||t.x>=this._xmax&&e.x>=this._xmax||t.y<=this._ymin&&e.y<=this._ymin||t.y>=this._ymax&&e.y>=this._ymax)this._lineTo(e.x,e.y,!1);else{const i=[];if((t.x<this._xmin&&e.x>this._xmin||t.x>this._xmin&&e.x<this._xmin)&&(u=(this._xmin-t.x)/(e.x-t.x),d=t.y+u*(e.y-t.y),d<=this._ymin?p=!1:d>=this._ymax?p=!0:i.push(new r(u,this._xmin,d))),(t.x<this._xmax&&e.x>this._xmax||t.x>this._xmax&&e.x<this._xmax)&&(u=(this._xmax-t.x)/(e.x-t.x),d=t.y+u*(e.y-t.y),d<=this._ymin?p=!1:d>=this._ymax?p=!0:i.push(new r(u,this._xmax,d))),(t.y<this._ymin&&e.y>this._ymin||t.y>this._ymin&&e.y<this._ymin)&&(u=(this._ymin-t.y)/(e.y-t.y),y=t.x+u*(e.x-t.x),y<=this._xmin?c=!1:y>=this._xmax?c=!0:i.push(new r(u,y,this._ymin))),(t.y<this._ymax&&e.y>this._ymax||t.y>this._ymax&&e.y<this._ymax)&&(u=(this._ymax-t.y)/(e.y-t.y),y=t.x+u*(e.x-t.x),y<=this._xmin?c=!1:y>=this._xmax?c=!0:i.push(new r(u,y,this._ymax))),0===i.length)c?p?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):p?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(i.length>1&&i[0].ratio>i[1].ratio)this._start=this._dist+n*i[1].ratio,this._lineTo(i[1].x,i[1].y,!0),this._lineTo(i[0].x,i[0].y,!0);else{this._start=this._dist+n*i[0].ratio;for(let t=0;t<i.length;t++)this._lineTo(i[t].x,i[t].y,!0)}this._lineTo(e.x,e.y,!1)}}this._dist+=n,this._prevIsIn=i,this._prevPt=l}close(){if(this._line.length>2){const t=this._firstPt,e=this._prevPt;t.x===e.x&&t.y===e.y||this.lineTo(t.x,t.y);const i=this._line;let s=i.length;for(;s>=4&&(i[0].x===i[1].x&&i[0].x===i[s-2].x||i[0].y===i[1].y&&i[0].y===i[s-2].y);)i.pop(),i[0].x=i[s-2].x,i[0].y=i[s-2].y,--s}}result(t=!0){return this._pushLine(),0===this._lines.length?null:(3===this._type&&t&&o.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(2!==this._type)throw new Error("Only valid for lines");this._pushLine();const t=this._lines,e=t.length;if(0===e)return null;const i=[];for(let s=0;s<e;s++)i.push({line:t[s],start:this._starts[s]||0});return i}_isIn(t,e){return t>=this._xmin&&t<=this._xmax&&e>=this._ymin&&e<=this._ymax}_intersect(t,e){let i,r,l;if(e.x>=this._xmin&&e.x<=this._xmax)r=e.y<=this._ymin?this._ymin:this._ymax,l=(r-t.y)/(e.y-t.y),i=t.x+l*(e.x-t.x);else if(e.y>=this._ymin&&e.y<=this._ymax)i=e.x<=this._xmin?this._xmin:this._xmax,l=(i-t.x)/(e.x-t.x),r=t.y+l*(e.y-t.y);else{r=e.y<=this._ymin?this._ymin:this._ymax,i=e.x<=this._xmin?this._xmin:this._xmax;const s=(i-t.x)/(e.x-t.x),n=(r-t.y)/(e.y-t.y);s<n?(l=s,r=t.y+s*(e.y-t.y)):(l=n,i=t.x+n*(e.x-t.x))}return this._r=l,new s(i,r)}_pushLine(){this._line&&(1===this._type?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):2===this._type?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):3===this._type&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(t,e,i){3!==this._type?i&&(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new s(t,e))):(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new s(t,e)),this._isH=!1,this._isV=!1)}_lineTo(t,e,i){let r,l;if(3!==this._type)if(i){if(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(r=this._line[this._line.length-1],r.equals(t,e)))return;this._line.push(new s(t,e))}else this._line&&this._line.length>0&&this._pushLine();else if(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){r=this._line[this._line.length-1];const i=r.x===t,n=r.y===e;if(i&&n)return;this._isH&&i||this._isV&&n?(r.x=t,r.y=e,l=this._line[this._line.length-2],l.x===t&&l.y===e?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(l=this._line[this._line.length-2],this._isH=l.x===t,this._isV=l.y===e)):(this._isH=l.x===t,this._isV=l.y===e)):(this._line.push(new s(t,e)),this._isH=i,this._isV=n)}else this._line.push(new s(t,e))}}class n{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this._lines=[],this._line=null}moveTo(t,e){this._line&&this._lines.push(this._line),this._line=[];const i=this._ratio;this._line.push(new s(t*i,e*i))}lineTo(t,e){const i=this._ratio;this._line.push(new s(t*i,e*i))}close(){const t=this._line;t&&!t[0].isEqual(t[t.length-1])&&t.push(t[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}class o{static simplify(t,e,i){if(!i)return;const s=-e,r=t+e,l=-e,n=t+e,a=[],h=[],u=i.length;for(let t=0;t<u;++t){const e=i[t];if(!e||e.length<2)continue;let o,u=e[0];const c=e.length;for(let i=1;i<c;++i)o=e[i],u.x===o.x&&(u.x<=s&&(u.y>o.y?(a.push(t),a.push(i),a.push(0),a.push(-1)):(h.push(t),h.push(i),h.push(0),h.push(-1))),u.x>=r&&(u.y<o.y?(a.push(t),a.push(i),a.push(1),a.push(-1)):(h.push(t),h.push(i),h.push(1),h.push(-1)))),u.y===o.y&&(u.y<=l&&(u.x<o.x?(a.push(t),a.push(i),a.push(2),a.push(-1)):(h.push(t),h.push(i),h.push(2),h.push(-1))),u.y>=n&&(u.x>o.x?(a.push(t),a.push(i),a.push(3),a.push(-1)):(h.push(t),h.push(i),h.push(3),h.push(-1)))),u=o}if(0===a.length||0===h.length)return;o.fillParent(i,h,a),o.fillParent(i,a,h);const c=[];o.calcDeltas(c,h,a),o.calcDeltas(c,a,h),o.addDeltas(c,i)}static fillParent(t,e,i){const s=i.length,r=e.length;for(let l=0;l<r;l+=4){const r=e[l],n=e[l+1],o=e[l+2],h=t[r][n-1],u=t[r][n];let c=8092,p=-1;for(let e=0;e<s;e+=4){if(i[e+2]!==o)continue;const s=i[e],r=i[e+1],l=t[s][r-1],n=t[s][r];switch(o){case 0:case 1:if(a(h.y,l.y,n.y)&&a(u.y,l.y,n.y)){const t=Math.abs(n.y-l.y);t<c&&(c=t,p=e)}break;case 2:case 3:if(a(h.x,l.x,n.x)&&a(u.x,l.x,n.x)){const t=Math.abs(n.x-l.x);t<c&&(c=t,p=e)}}}e[l+3]=p}}static calcDeltas(t,e,i){const s=e.length;for(let r=0;r<s;r+=4){const s=[],l=o.calcDelta(r,e,i,s);t.push(e[r]),t.push(e[r+1]),t.push(e[r+2]),t.push(l)}}static calcDelta(t,e,i,s){const r=e[t+3];if(-1===r)return 0;const l=s.length;return l>1&&s[l-2]===r?0:(s.push(r),o.calcDelta(r,i,e,s)+1)}static addDeltas(t,e){const i=t.length;let s=0;for(let e=0;e<i;e+=4){const i=t[e+3];i>s&&(s=i)}for(let r=0;r<i;r+=4){const i=e[t[r]],l=t[r+1],n=s-t[r+3];switch(t[r+2]){case 0:i[l-1].x-=n,i[l].x-=n,1===l&&(i[i.length-1].x-=n),l===i.length-1&&(i[0].x-=n);break;case 1:i[l-1].x+=n,i[l].x+=n,1===l&&(i[i.length-1].x+=n),l===i.length-1&&(i[0].x+=n);break;case 2:i[l-1].y-=n,i[l].y-=n,1===l&&(i[i.length-1].y-=n),l===i.length-1&&(i[0].y-=n);break;case 3:i[l-1].y+=n,i[l].y+=n,1===l&&(i[i.length-1].y+=n),l===i.length-1&&(i[0].y+=n)}}}}const a=(t,e,i)=>t>=e&&t<=i||t>=i&&t<=e},50638(t,e,i){i.r(e),i.d(e,{default:()=>St});var s=i(5482),r=i(11254),l=i(60999),n=i(4718),o=i(25728),a=i(17676),h=i(84952),u=i(91429),c=i(5443),p=i(16930),y=i(4146),d=i(52136),m=i(89186),f=i(18768),_=i(63074),g=i(69208),x=i(34287),w=i(8303),v=i(54310),A=i(25036),S=i(10873);let I=null;var b=i(49186),P=i(53966),M=i(34275);class T{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:i,data:s,json:r}=await this._getSpriteData(this._spriteSource,t),l=Object.keys(r);if(!l||0===l.length||!s)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=r,this.width=e,this.height=i;const n=Math.max(this._maxTextureSize,4096);if(e>n||i>n){const t=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw P.A.getLogger("esri.layers.support.SpriteSource").error(t),new b.A("SpriteSource",t)}let o;for(let t=0;t<s.length;t+=4)o=s[t+3]/255,s[t]=s[t]*o,s[t+1]=s[t+1]*o,s[t+2]=s[t+2]*o;this.image=s}async _getSpriteData(t,e){if("image"===t.type){let e,i;if(this.devicePixelRatio<1.15){if(!t.spriteSource1x)throw new b.A("SpriteSource","no image data provided for low resolution sprites!");e=t.spriteSource1x.image,i=t.spriteSource1x.json}else{if(!t.spriteSource2x)throw new b.A("SpriteSource","no image data provided for high resolution sprites!");e=t.spriteSource2x.image,i=t.spriteSource2x.json}return"width"in e&&"height"in e&&"data"in e&&((0,M.mw)(e.data)||(0,M.UR)(e.data))?{width:e.width,height:e.height,data:new Uint8Array(e.data),json:i}:{...C(e),json:i}}const i=(0,h.An)(this.baseURL),s=i.query?"?"+(0,h.x0)(i.query):"",l=this._isRetina?"@2x":"",n=`${i.path}${l}.${this._spriteImageFormat}${s}`,o=`${i.path}${l}.json${s}`,[a,u]=await Promise.all([(0,r.A)(o,e),(0,r.A)(n,{responseType:"image",...e})]);return{...C(u.data),json:a.data}}}function C(t){const e=document.createElement("canvas"),i=e.getContext("2d");e.width=t.width,e.height=t.height,i.drawImage(t,0,0,t.width,t.height);const s=i.getImageData(0,0,t.width,t.height);return{width:t.width,height:t.height,data:new Uint8Array(s.data)}}var R=i(87045),E=i(25943),U=i(21325),L=i(28735),O=i(83027);class D{constructor(t,e,i){this.tileServers=[],this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=t,this.sourceUrl=e;const s=(0,n.o8)(i),r=i.capabilities&&i.capabilities.split(",").map(t=>t.toLowerCase().trim()),l=!0===i?.exportTilesAllowed,o=!0===r?.includes("tilemap"),a=l&&i.hasOwnProperty("maxExportTilesCount")?i.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:l,supportsTileMap:o},exportTiles:l?{maxExportTilesCount:+a}:null},this.tileInfo=R.A.fromJSON(s.tileInfo),this.fullExtent=c.A.fromJSON(i.fullExtent),this.initialExtent=c.A.fromJSON(i.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(t,e){return this.tilemap?this.tilemap.dataKey(t,e):t}isCompatibleWith(t){const e=this.tileInfo,i=t.tileInfo;if(!e.spatialReference.equals(i.spatialReference))return!1;if(!e.origin.equals(i.origin))return!1;if(Math.round(e.dpi)!==Math.round(i.dpi))return!1;const s=e.lods,r=i.lods,l=Math.min(s.length,r.length);for(let t=0;t<l;t++){const e=s[t],i=r[t];if(e.level!==i.level||Math.round(e.scale)!==Math.round(i.scale))return!1}return!0}}var j=i(44159);class k extends D{static async create(t,e,i,s,r){if(!0===s.cluster)throw new Error("Clustered GeoJSON vector tile sources are not supported.");if(null==s.data)throw new Error(`GeoJSON source '${t}' must define a data property.`);const l=s.maxzoom??18,n=await(0,O.h)("GeoJSONVectorTileSourceWorker",{signal:r?.signal,strategy:"dedicated"});let o;try{o=await n.invoke("initialize",{definition:s,name:t,requestOptions:N(r)},{signal:r?.signal}),(0,a.Te)(r)}catch(t){throw n.close(),t}return new k(t,e,i,n,s.minzoom??0,l,o.geometryTypes)}constructor(t,e,i,s,r,l,n){super(t,e,i),this._connection=s,this._minZoom=r,this._maxZoom=l,this.geometryTypes=n}destroy(){super.destroy(),this._connection?.close(),this._connection=null}async getRefKey(t,e){if((0,a.Te)(e),t.level<this._minZoom)return null;if(t.level<=this._maxZoom)return t;const i=t.level-this._maxZoom;return new j.A(this._maxZoom,t.row>>i,t.col>>i,t.world)}requestTile(t,e,i,s){return(0,a.Te)(s),this._connection?this._connection.invoke("requestTile",{col:i,level:t,row:e},s):Promise.reject((0,a.NK)())}}function N(t){if(!t)return{};const{signal:e,...i}=t;return i}class ${constructor(t){this.url=t}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,r.A)(this.url).then(t=>t.data.index)),this._tileIndexPromise}async dataKey(t,e){const i=await this.fetchTileIndex();return(0,a.Te)(e),this._getIndexedDataKey(i,t)}_getIndexedDataKey(t,e){const i=[e];if(e.level<0||e.row<0||e.col<0||e.row>>e.level>0||e.col>>e.level>0)return null;let s=e;for(;0!==s.level;)s=new j.A(s.level-1,s.row>>1,s.col>>1,s.world),i.push(s);let r,l,n=t,o=i.pop();if(1===n)return o;for(;i.length;)if(r=i.pop(),l=(1&r.col)+((1&r.row)<<1),n){if(0===n[l]){o=null;break}if(1===n[l]){o=r;break}o=r,n=n[l]}return o}}var Z=i(97768);class B{constructor(t,e){this._tilemap=t,this._tileIndexUrl=e}destroy(){this._tilemap=(0,Z.pR)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(t){return this._tileIndexPromise||(this._tileIndexPromise=(0,r.A)(this._tileIndexUrl,{query:{...t?.query}}).then(t=>t.data.index)),this._tileIndexPromise}dataKey(t,e){const{level:i,row:s,col:r}=t,l=new j.A(t);return this._tilemap.fetchAvailabilityUpsample(i,s,r,l,e).then(()=>(l.world=t.world,l)).catch(t=>{if((0,a.zf)(t))throw t;return null})}}var K=i(91869);class F{constructor(t){this._tileUrl=t,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(t){(null==this._promise||(0,a.G4)(this._abortController?.signal))&&(this._promise=this._makeRequest(this._tileUrl));const e=this._abortOptions;return e.push(t),(0,a.u7)(t,()=>{e.every(t=>(0,a.G4)(t))&&this._abortController.abort()}),this._promise.then(t=>(0,n.o8)(t))}async _makeRequest(t){this._abortController=new AbortController;const{data:e}=await(0,r.A)(t,{responseType:"array-buffer",signal:this._abortController.signal});return e}}const z=new Map;function G(t,e){return(0,K.tE)(z,t,()=>new F(t)).getData(e).finally(()=>z.delete(t))}class q extends D{constructor(t,e,i){super(t,e,i);const s=(0,h.An)(this.sourceUrl),r=(0,n.o8)(i),l=r.tiles;if(s)for(let t=0;t<l.length;t++){const e=(0,h.An)(l[t]);e&&((0,h.oP)(e.path)||(e.path=(0,h.fj)(s.path,e.path)),l[t]=(0,h.a6)(e.path,{...s.query,...e.query}))}this.tileServers=l;const o=i.tileMap&&s?(0,h.a6)((0,h.fj)(s.path,i.tileMap),s.query??{}):null;this.capabilities.operations.supportsTileMap?(this.type="vector-tile",this.tilemap=new B(new E.d({layer:{parsedUrl:s,tileInfo:this.tileInfo},minLOD:r.minLOD??this.tileInfo.lods[0].level,maxLOD:r.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),o)):o&&(this.tilemap=new $(o))}requestTile(t,e,i,s){return function(t,e,i,s,r){const l=(0,h.An)(t),n=l.query;if(n)for(const[t,r]of Object.entries(n))switch(r){case"{x}":n[t]=s.toString();break;case"{y}":n[t]=i.toString();break;case"{z}":n[t]=e.toString()}const o=l.path;return G((0,h.a6)(o.replaceAll(/\{z\}/gi,e.toString()).replaceAll(/\{y\}/gi,i.toString()).replaceAll(/\{x\}/gi,s.toString()),{...l.query}),r)}(this.tileServers[e%this.tileServers.length],t,e,i,s)}}function H(...t){let e;for(const i of t)if(null!=i)if((0,h.BQ)(i)){if(e){const t=e.split("://")[0];e=t+":"+i.trim()}}else e=(0,h.oP)(i)?i:(0,h.fj)(e,i);return e?(0,h.UC)(e):void 0}async function V(t,e,i,s,l){let n,o,u;if((0,a.Te)(l),"string"==typeof i){const t=(0,h.S8)(i);u=await(0,r.A)(t,{...l,responseType:"json",query:{f:"json",...l?.query}}),u.ssl&&(n&&(n=n.replace(/^http:/i,"https:")),o&&(o=o.replace(/^http:/i,"https:"))),n=t,o=t}else null!=i&&(u={data:i},n=i.jsonUrl||null,o=s);const c=u?.data;switch(c?.type){case"Feature":case"FeatureCollection":return t.sourceUrl=n||null,J(t,function(t){return{version:8,sprite:"",glyphs:"",sources:{geojson:{type:"geojson",data:t}},layers:[]}}(c),o,l)}if(W(c))return t.styleUrl=n||null,J(t,c,o,l);if(function(t){return!!t&&!W(t)}(c))return t.primarySourceName?tt(t,c,o,!1,e,l):(t.sourceUrl=n||null,Q(c)&&null==t.style&&(e="tilejson"),tt(t,c,o,!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 W(t){return!!t&&"sources"in t&&!!t.sources}async function J(t,e,i,s){const r=i?(0,h.nM)(i):(0,h.gd)(),l=null==e.layers||0===e.layers.length,n=l?{...e,layers:[]}:e;t.styleBase=r,t.style=n,"webp"===n["sprite-format"]?.toLowerCase()&&(t.spriteFormat="webp");const o=[];if(n.sources&&n.sources.esri&&"geojson"!==n.sources.esri.type){const e=n.sources.esri;e.url?await V(t,"esri",H(r,e.url),void 0,s):o.push(V(t,"esri",e,r,s))}for(const e of Object.keys(n.sources))"esri"!==e&&"tilejson"!==e&&"vector"===n.sources[e].type&&(n.sources[e].url?o.push(V(t,e,H(r,n.sources[e].url),void 0,s)):n.sources[e].tiles&&o.push(V(t,e,n.sources[e],r,s)));await Promise.all(o);for(const e of Object.keys(n.sources)){const i=n.sources[e];if("geojson"===i.type){const o=await Y(t,e,i,r,s);l&&n.layers.push(...X(e,o.geometryTypes))}}}async function Y(t,e,i,s,r){if(null==i.data)throw new Error(`GeoJSON source '${e}' must define a data property.`);const l={...i,type:"geojson",data:"string"==typeof i.data?H(s,i.data):i.data},n=it({maxzoom:l.maxzoom,minzoom:l.minzoom},t),o=await k.create(e,s,n,l,r);return et(t,e,i,n,o,!t.primarySourceName,s),o}function X(t,e){return e.map(e=>{switch(e){case"polygon":return{id:`${t}_polygon`,type:"fill",source:t,filter:["==","$type","Polygon"],paint:{"fill-color":"#808080"}};case"line":return{id:`${t}_line`,type:"line",source:t,filter:["==","$type","LineString"],paint:{"line-color":"#808080","line-width":1}};case"point":return{id:`${t}_point`,type:"circle",source:t,filter:["==","$type","Point"],paint:{"circle-color":"#808080","circle-radius":3}}}})}async function tt(t,e,i,s,r,l){const n=i?(0,h.UC)(i)+"/":(0,h.gd)(),o=it(e,t);if(et(t,r,e,o,new q(r,(0,h.a6)(n,l?.query??{}),o),s,n),!Q(t)&&"defaultStyles"in e&&!t.style){if(null==e.defaultStyles)throw new Error;return"string"==typeof e.defaultStyles?V(t,"",H(n,e.defaultStyles,"root.json"),void 0,l):V(t,"",e.defaultStyles,H(n,"root.json"),l)}if(Q(e)&&null==t.style&&o.defaultStyles)return V(t,"",o.defaultStyles,H(n,"root.json"),l)}function et(t,e,i,s,r,l,n){if(!l&&t.primarySourceName in t.sourceNameToSource){const i=t.sourceNameToSource[t.primarySourceName];if(!i.isCompatibleWith(r))return P.A.getLogger("esri.layers.support.vectorTileLayerLoader").warn(`Ignoring source '${e}' because its tiling scheme is incompatible with the primary source '${t.primarySourceName}'.`),void r.destroy();null!=r.fullExtent&&(null!=i.fullExtent?i.fullExtent.union(r.fullExtent):i.fullExtent=r.fullExtent.clone()),i.tileInfo&&r.tileInfo&&i.tileInfo.lods.length<r.tileInfo.lods.length&&(i.tileInfo=r.tileInfo)}l&&(t.sourceBase=n,t.source=i,t.validatedSource=s,t.primarySourceName=e),t.sourceNameToSource[e]=r}function it(t,e){const i=512;if(function(t){return t.hasOwnProperty("tileInfo")}(t)){const e=t?.tileInfo;return null!=e&&(null==e.rows&&(e.rows=i),null==e.cols&&(e.cols=i)),t}const s={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let r,l=null;if(Q(t)){const{bounds:i,vector_layers:s}=t;if(i){const t=(0,L.Gh)({x:i[0],y:i[1],spatialReference:(0,n.o8)(U.KK)}),e=(0,L.Gh)({x:i[2],y:i[3],spatialReference:(0,n.o8)(U.KK)});l={xmin:t.x,ymin:t.y,xmax:e.x,ymax:e.y,spatialReference:(0,n.o8)(U.ch)}}if(s&&s.length>0)r={version:8,sprite:"",glyphs:"",sources:{tilejson:{type:"vector",url:t.tilejson}},layers:st(s)};else if(null==e.style)throw new Error("The TileJSON source does not contain any vector_layers. This VectorTileLayer cannot be loaded.")}null===l&&(l=s);let o=78271.51696400007,a=295828763.7957775;const h=[],u=t.hasOwnProperty("maxzoom")&&null!=t.maxzoom?Math.abs(+t.maxzoom):22;for(let t=0;t<=u;t++)h.push({level:t,scale:a,resolution:o}),o/=2,a/=2;return{capabilities:"TilesOnly",initialExtent:l,fullExtent:s,minScale:0,maxScale:0,tiles:t.tiles,tileInfo:{rows:i,cols:i,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:h,spatialReference:(0,n.o8)(U.ch)},defaultStyles:r}}function st(t){const e=[];for(const i of t)i.geometry_type?e.push(rt(i.geometry_type.toLowerCase(),i,!1)):(e.push(rt("polygon",i,!0)),e.push(rt("line",i,!0)),e.push(rt("circle",i,!0)));return e}function rt(t,e,i){const{id:s,minzoom:r,maxzoom:l}=e,n={type:"polygon"===t||"polygons"===t?"fill":"line"===t||"lines"===t?"line":"circle",id:s,source:"tilejson","source-layer":s,minzoom:r,maxzoom:l};switch(t){case"fill":i&&(n.id+="_polygon",n.filter='(["==", "$type", "Polygon"])'),n.paint={"fill-color":"#808080"};break;case"line":i&&(n.id+="_line",n.filter='(["==", "$type", "LineString"])');break;case"circle":i&&(n.id+="_point",n.filter='(["==", "$type", "Point"])')}return n}var lt=i(88788),nt=i(39131),ot=i(97159),at=i(86738),ht=i(91806);const ut=1e-6;function ct(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 i=t.origin,s=e.origin;if(Math.abs(i.x-s.x)>=ut||Math.abs(i.y-s.y)>=ut)return!1;let r,l;t.lods[0].scale>e.lods[0].scale?(r=t,l=e):(l=t,r=e);for(let t=r.lods[0].scale;t>=l.lods[l.lods.length-1].scale-ut;t/=2)if(Math.abs(t-l.lods[0].scale)<ut)return!0;return!1}function pt(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 i=t.size[0],s=t.format,r=t.dpi,l=new at.A({x:t.origin.x,y:t.origin.y}),n=t.spatialReference,o=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],h=o.scale,u=o.resolution,c=a.scale,p=[];let y=h,d=u,m=0;for(;y>=c;)p.push(new ht.A({level:m,resolution:d,scale:y})),m++,y/=2,d/=2;return new R.A({size:[i,i],dpi:r,format:s||"pbf",origin:l,lods:p,spatialReference:n})}var yt=i(45013);class dt{constructor(t){this.getUnmaskedRenderer=t}}function mt(t){const e=t.getExtension("WEBGL_debug_renderer_info");return e?new dt(()=>t.getParameter(e.UNMASKED_RENDERER_WEBGL)):null}let ft;function _t(){return ft??=function(){const t=new gt,e=function(t){if("undefined"==typeof WebGL2RenderingContext)return null;const e=document.createElement("canvas");if(!e)return null;let i=e.getContext("webgl2",{failIfMajorPerformanceCaveat:!0});if(null==i&&(i=e.getContext("webgl2"),null!=i&&(t.majorPerformanceCaveat=!0,t.unmaskedRenderer=mt(i)?.getUnmaskedRenderer()??"unknown")),null==i)return i;t.available=!0,t.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),t.supportsVertexShaderSamplers=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const s=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT);return s&&(t.supportsHighPrecisionFragment=s.precision>0),i}(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}(),ft}class gt{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1,this.unmaskedRenderer="unloaded"}}var xt=i(59923),wt=i(43937),vt=i(36005);let At=class extends((0,_.dM)((0,A.j)((0,v.J)((0,m.f)((0,f.b)((0,x.q)((0,w.A)((0,g.d)((0,d.p)((0,o.M)(y.A))))))))))){constructor(...t){super(...t),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.path=null,this.refreshInterval=0,this.style=null,this.tilemapCache=null,this.type="vector-tile"}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(a.QP).then(async()=>{if(!this.portalItem?.id)return;const e=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,r.A)(e,{...t,query:{f:"json",...this.customParameters,token:this.apiKey},authMode:this.portalItem.portal.authMode})).data&&this.read({url:e},(0,lt.v)(this.portalItem,"portal-item"))}).catch(a.QP).then(()=>this._loadStyle(t));return this.addResolvingPromise(e),Promise.resolve(this)}get apiKey(){return super.apiKey}set apiKey(t){super.apiKey=t}get portalItem(){return super.portalItem}set portalItem(t){super.portalItem=t}get attributionDataUrl(){const t=this.currentStyleInfo,e=t?.serviceUrl&&(0,h.An)(t.serviceUrl);if(!e)return null;const i=this._getDefaultAttribution(e.path);return i?(0,h.a6)(i,{...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.An)(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.BQ)(t)&&(t=`https:${t}`);const i=(0,nt.py)(t);e.styleUrl=(0,ot.e)(t,i)}get tileInfo(){const t=[];for(const e in this.sourceNameToSource)t.push(this.sourceNameToSource[e]);let e=this.primarySource?.tileInfo||new R.A;if(t.length>1)for(let i=0;i<t.length;i++)ct(e,t[i].tileInfo)&&(e=pt(e,t[i].tileInfo));return e}readTilemapCache(t,e){const i=e.capabilities?.includes("Tilemap");return i?new E.d({layer:this}):null}set url(t){if(!t)return void this._set("url",t);const e=(0,h.An)(t);this._set("url",e.path),e.query&&(this.customParameters={...this.customParameters,...e.query})}readVersion(t,e){return e.version?parseFloat(e.version):parseFloat(e.currentVersion)}async loadSpriteSource(t=1,e){if(!this._spriteSourceMap.has(t)){const i=_t().maxTextureSize,s=this.currentStyleInfo?.spriteUrl?(0,h.a6)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,r=new T({type:"url",spriteUrl:s,pixelRatio:t,spriteFormat:this.currentStyleInfo?.spriteFormat},i);await r.load(e),this._spriteSourceMap.set(t,r)}return this._spriteSourceMap.get(t)}async setSpriteSource(t,e){if(!t)return null;const i=_t().maxTextureSize,s=t.spriteUrl,r=s?(0,h.a6)(s,{...this.customParameters,token:this.apiKey}):null;if(!r&&"url"===t.type)return null;const l=new T(t,i);try{await l.load(e);const i=t.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(i,l),r&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=r),this.emit("spriteSource-change",{spriteSource:l}),l}catch(t){(0,a.QP)(t)}return null}async loadStyle(t,e){const i=t||this.style||this.url;return this._loadingTask&&"string"==typeof i&&this.url===i||(this._loadingTask?.abort(),this._loadingTask=(0,l.UT)(t=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(i,{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.o8)(this.styleRepository?.getPaintProperties(t))}setPaintProperties(t,e){const i=this.styleRepository.isPainterDataDriven(t);this.styleRepository.setPaintProperties(t,e);const s=this.styleRepository.isPainterDataDriven(t);this.emit("paint-change",{layer:t,paint:e,isDataDriven:i||s})}getStyleLayer(t){return(0,n.o8)(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.o8)(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)?"visible":"none"}write(t,e){return e?.origin&&!this.styleUrl?((0,xt.U4)(e,this,"style defined by JSON only are not supported"),null):super.write(t,e)}getTileUrl(t,e,i){return null}async _getSourceAndStyle(t,e){if(!t)throw new Error("invalid style!");const i=await async function(t,e){const i={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[s,r]="string"==typeof t?[t,null]:[null,t.jsonUrl];return await V(i,"esri",t,r,e),{layerDefinition:i.validatedSource,url:s,serviceUrl:i.sourceUrl,style:i.style,styleUrl:i.styleUrl,spriteUrl:i.style&&i.style.sprite&&H(i.styleBase,i.style.sprite),spriteFormat:i.spriteFormat,glyphsUrl:i.style&&i.style.glyphs&&H(i.styleBase,i.style.glyphs),sourceNameToSource:i.sourceNameToSource,primarySourceName:i.primarySourceName}}(t,{...e,query:{...this.customParameters,token:this.apiKey}});"webp"===i.spriteFormat&&(await function(){if(I)return I;const t={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return I=new Promise(e=>{const i=new Image;i.onload=()=>{i.onload=i.onerror=null,e(i.width>0&&i.height>0)},i.onerror=()=>{i.onload=i.onerror=null,e(!1)},i.src="data:image/webp;base64,"+t.lossy}),I}()||(i.spriteFormat="png")),this._set("currentStyleInfo",{...i}),"string"==typeof t?(this.url=t,this.style=null):(this.url=null,this.style=t),this._set("sourceNameToSource",i.sourceNameToSource),this._set("primarySource",i.sourceNameToSource[i.primarySourceName]),this._set("styleRepository",new yt.A(i.style,!1)),this.read(i.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),i=["OpenBasemap_v2","OpenBasemap_GCS_v2","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","World_Hillshade_v2"];if(!e)return;const s=e[2]&&e[2].toLowerCase();if(!s)return;const r=e[1]||"";for(const t of i)if(t.toLowerCase().includes(s))return(0,h.S8)(`//static.arcgis.com/attribution/Vector${r}/${t}`)}async _loadStyle(t){return this._loadingTask?.promise??this.loadStyle(null,t)}};(0,s.Cg)([(0,u.MZ)({readOnly:!0})],At.prototype,"attributionDataUrl",null),(0,s.Cg)([(0,u.MZ)({type:["show","hide"]})],At.prototype,"listMode",void 0),(0,s.Cg)([(0,u.MZ)({json:{read:!0,write:!0}})],At.prototype,"blendMode",void 0),(0,s.Cg)([(0,u.MZ)({readOnly:!0,json:{read:!1}})],At.prototype,"capabilities",null),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],At.prototype,"currentStyleInfo",void 0),(0,s.Cg)([(0,u.MZ)({json:{read:!1},readOnly:!0,type:c.A})],At.prototype,"fullExtent",null),(0,s.Cg)([(0,u.MZ)({json:{read:!1},readOnly:!0,type:c.A})],At.prototype,"initialExtent",null),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],At.prototype,"isReference",void 0),(0,s.Cg)([(0,u.MZ)({type:["VectorTileLayer"]})],At.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],At.prototype,"parsedUrl",null),(0,s.Cg)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],At.prototype,"path",void 0),(0,s.Cg)([(0,u.MZ)({type:Number,json:{write:!1,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],At.prototype,"refreshInterval",void 0),(0,s.Cg)([(0,u.MZ)()],At.prototype,"style",void 0),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],At.prototype,"serviceUrl",null),(0,s.Cg)([(0,u.MZ)({type:p.A,readOnly:!0})],At.prototype,"spatialReference",null),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],At.prototype,"styleRepository",void 0),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],At.prototype,"sourceNameToSource",void 0),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],At.prototype,"primarySource",void 0),(0,s.Cg)([(0,u.MZ)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],At.prototype,"styleUrl",null),(0,s.Cg)([(0,wt.K)(["portal-item","web-document"],"styleUrl")],At.prototype,"writeStyleUrl",null),(0,s.Cg)([(0,u.MZ)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:R.A})],At.prototype,"tileInfo",null),(0,s.Cg)([(0,u.MZ)()],At.prototype,"tilemapCache",void 0),(0,s.Cg)([(0,vt.w)("service","tilemapCache",["capabilities","tileInfo"])],At.prototype,"readTilemapCache",null),(0,s.Cg)([(0,u.MZ)({json:{read:!1},readOnly:!0,value:"vector-tile"})],At.prototype,"type",void 0),(0,s.Cg)([(0,u.MZ)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}}),(0,u.MZ)(S.OZ)],At.prototype,"url",null),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],At.prototype,"version",void 0),(0,s.Cg)([(0,vt.w)("version",["version","currentVersion"])],At.prototype,"readVersion",null),At=(0,s.Cg)([(0,u.$K)("esri.layers.VectorTileLayer")],At);const St=At},52136(t,e,i){var s=i(5482),r=i(91429);i.d(e,["p",0,t=>{const e=t;let i=class extends e{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,s.Cg)([(0,r.MZ)({type:String})],i.prototype,"apiKey",null),i=(0,s.Cg)([(0,r.$K)("esri.layers.mixins.APIKeyMixin")],i),i}])},89186(t,e,i){var s=i(5482),r=i(91429),l=i(16930),n=i(87045),o=i(65509),a=i(25943),h=i(36005);i.d(e,["f",0,t=>{const e=t;let i=class extends e{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(t,e){return null!=e.minLOD&&null!=e.maxLOD?t:0}readMaxScale(t,e){return null!=e.minLOD&&null!=e.maxLOD?t:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(t,e,i){const s=e.capabilities?.toLowerCase().includes("tilemap");let{minLOD:r,maxLOD:l,minScale:h,maxScale:u}=e;if(null==r&&null==l&&(0!==h||0!==u)){const t=t=>Math.round(1e4*t)/1e4;h=t(h||e.tileInfo.lods[0].scale),u=t(u||e.tileInfo.lods[e.tileInfo.lods.length-1].scale);for(const i of e.tileInfo.lods){const e=t(i.scale);r=e>=h?i.level:r,l=e>=u?i.level:l}}if(s)return new a.d({layer:this,minLOD:r,maxLOD:l});if(e.tileInfo){const t=new n.A;return t.read(e.tileInfo,i),new o.A(t,r,l)}return null}};return(0,s.Cg)([(0,r.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,s.Cg)([(0,r.MZ)()],i.prototype,"minScale",void 0),(0,s.Cg)([(0,h.w)("service","minScale")],i.prototype,"readMinScale",null),(0,s.Cg)([(0,r.MZ)()],i.prototype,"maxScale",void 0),(0,s.Cg)([(0,h.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,s.Cg)([(0,r.MZ)({type:l.A})],i.prototype,"spatialReference",void 0),(0,s.Cg)([(0,r.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,s.Cg)([(0,r.MZ)({type:n.A})],i.prototype,"tileInfo",void 0),(0,s.Cg)([(0,r.MZ)()],i.prototype,"tilemapCache",void 0),(0,s.Cg)([(0,h.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,s.Cg)([(0,r.MZ)()],i.prototype,"version",void 0),i=(0,s.Cg)([(0,r.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}])},18768(t,e,i){var s=i(5482),r=i(53966),l=i(91429),n=i(60694);i.d(e,["b",0,t=>{const e=t;let i=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const t=(0,n.qg)(this.url);if(t?.title)return t.title}return this._get("title")||""}set title(t){this._set("title",t)}set url(t){this._set("url",(0,n.Jf)(t,r.A.getLogger(this)))}};return(0,s.Cg)([(0,l.MZ)()],i.prototype,"title",null),(0,s.Cg)([(0,l.MZ)({type:String})],i.prototype,"url",null),i=(0,s.Cg)([(0,l.$K)("esri.layers.mixins.ArcGISService")],i),i}])},69208(t,e,i){var s=i(5482),r=i(91429);i.d(e,["d",0,t=>{const e=t;let i=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s.Cg)([(0,r.MZ)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],i.prototype,"customParameters",void 0),i=(0,s.Cg)([(0,r.$K)("esri.layers.mixins.CustomParametersMixin")],i),i}])},8303(t,e,i){var s=i(5482),r=i(92602),l=i(70333),n=i(11254),o=i(60999),a=i(49186),h=i(36563),u=i(53966),c=i(97768),p=i(17676),y=i(84952),d=i(91429),m=i(77548),f=i(20655),_=i(80812),g=i(41318),x=i(10407),w=i(36005),v=i(43937);const A={credential:null,user:null};i.d(e,["A",0,t=>{const e=t;let S=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,i){if(e.itemId)return new _.default({id:e.itemId,portal:i?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:s}=await i.e(1204).then(i.bind(i,41204));return(0,p.Te)(e),await s({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},e)}catch(t){throw(0,p.zf)(t)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async reloadFromPortal(t){if(!this.loaded||!this.portalItem?.id)return!1;try{const{reload:e}=await i.e(1204).then(i.bind(i,41204)),s=new AbortController,r=(0,h.rE)(s);return this.addHandles(r,"reloadFromPortal"),await e({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},{signal:s.signal})}catch(t){throw(0,p.zf)(t)||u.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}finally{this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch(t=>((0,p.QP)(t),!0)))}async setUserPrivileges(t,e){if(!r.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:i,fullEdit:s},content:{updateItem:r}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",r)}catch(t){(0,p.QP)(t)}}async _fetchUserPrivileges(t,e){let i=this.portalItem;if(!t||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(e);const s=!l.id?.findCredential(this.url),r=t===i.id;if(r&&i.portal.user)return this._getUserPrivileges(i,s);let n,o;if(r)n=i.portal.url;else try{n=await(0,m.wI)(this.url,e)}catch(t){(0,p.QP)(t)}if(!n||!(0,y.b8)(n,i.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;o=await(l.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,p.QP)(t)}const a=!0,h=!1,u=!1;if(!o)return{features:{edit:a,fullEdit:h},content:{updateItem:u}};try{if(r?await i.reload():(i=new _.default({id:t,portal:{url:n}}),await i.load(e)),i.portal.user)return this._getUserPrivileges(i,s)}catch(t){(0,p.QP)(t)}return{features:{edit:a,fullEdit:h},content:{updateItem:u}}}_getUserPrivileges(t,e){const i=(0,x.It)(t);return e&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,p.QP)(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 i=A.credential===e?A.user:await this._fetchEditingUser(t);return A.credential=e,A.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const i=l.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const s=`${i.owningSystemUrl}/sharing/rest`,r=f.A.getDefault();if(r&&r.loaded&&(0,y.S8)(r.restUrl)===(0,y.S8)(s))return r.user;const a=`${s}/community/self`,h=null!=t?t.signal:null,u=await(0,o.Ke)((0,n.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?g.A.fromJSON(u.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const i=e?.portal,s=this.portalItem?.id&&(this.portalItem.portal||f.A.getDefault());return i&&s&&!(0,y.ut)(s.restUrl,i.restUrl)?(e.messages&&e.messages.push(new a.A("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,s.Cg)([(0,d.MZ)({type:_.default})],S.prototype,"portalItem",null),(0,s.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],S.prototype,"readPortalItem",null),(0,s.Cg)([(0,v.K)("web-document","portalItem",{itemId:{type:String}})],S.prototype,"writePortalItem",null),(0,s.Cg)([(0,d.MZ)({clonable:!1})],S.prototype,"resourceReferences",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasEditingPrivileges",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasFullEditingPrivileges",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasUpdateItemPrivileges",void 0),S=(0,s.Cg)([(0,d.$K)("esri.layers.mixins.PortalLayer")],S),S}])},65509(t,e,i){i.d(e,{A:()=>l});var s=i(49186),r=i(17676);class l{constructor(t,e=0,i=t.lods[t.lods.length-1].level){this.tileInfo=t,this.minLOD=e,this.maxLOD=i,t.lodAt(e)||(this.minLOD=t.lods[0].level),t.lodAt(i)||(this.maxLOD=t.lods[t.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(t,e,i){const s=this.tileInfo?.lodAt(t);return!s||t<this.minLOD||t>this.maxLOD?"unavailable":s.cols&&s.rows?i>=s.cols[0]&&i<=s.cols[1]&&e>=s.rows[0]&&e<=s.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(t,e,i,l){await(0,r.NO)(l);const n=this.getAvailability(t,e,i);if("unavailable"===n)throw new s.A("tile-map:tile-unavailable","Tile is not available",{level:t,row:e,col:i});return n}async fetchAvailabilityUpsample(t,e,i,s,l){await(0,r.NO)(l),s.level=t,s.row=e,s.col=i;const n=this.tileInfo;return n.updateTileInfo(s),this.fetchAvailability(t,e,i,l).catch(t=>{if((0,r.zf)(t))throw t;if(n.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,l);throw t})}}},88788(t,e,i){i.d(e,{m:()=>n,v:()=>l});var s=i(84952),r=i(20655);function l(t,e){return{...o(t,e),readResourcePaths:[]}}function n(t,e,i){const r=(0,s.An)(i?.forceNewItemContext?null:t.itemUrl);return{...o(t,e,i),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:r?{rootPath:r.path,writtenUrls:[]}:null,resources:i?.withResources?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function o(t,e,i){return{origin:e,url:(0,s.An)(i?.forceNewItemContext?null:t.itemUrl),portal:t.portal||r.A.getDefault(),portalItem:t}}},10407(t,e,i){i.d(e,{It:()=>y,LG:()=>n,OM:()=>h,Sm:()=>u,Y:()=>o,bK:()=>a,sQ:()=>c});var s=i(99917),r=i(16930),l=i(28735);function n(t,e){if(!o(t,e)){const i=t.typeKeywords;i?i.push(e):t.typeKeywords=[e]}}function o(t,e){return!!t.typeKeywords?.includes(e)}function a(t){return o(t,p.HOSTED_SERVICE)}function h(t,e){const i=t.typeKeywords;if(i){const t=i.indexOf(e);t>-1&&i.splice(t,1)}}function u(t,e,i){i?n(t,e):h(t,e)}async function c(t){const e=t.clone().normalize();let i;if(e.length>1)for(const t of e)i?t.width>i.width&&(i=t):i=t;else i=e[0];return async function(t){const e=t.spatialReference;if(e.isWGS84)return t.clone();if(e.isWebMercator)return(0,l.ci)(t);const i=r.A.WGS84;return await(0,s.initializeProjection)(e,i),(0,s.project)(t,i)}(i)}const p={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function y(t){const{portal:e,isOrgItem:i,itemControl:s}=t,r=e.user?.privileges;let l=!r||r.includes("features:user:edit"),n=!!i&&!!r?.includes("features:user:fullEdit");const o="update"===s||"admin"===s;return o?n=l=!0:n&&(l=!0),{features:{edit:l,fullEdit:n},content:{updateItem:o}}}i.d(e,["mm",0,p])},13195(t,e,i){i.d(e,{GW:()=>f,IU:()=>_,Wh:()=>p,cP:()=>w,p6:()=>m,ru:()=>x,s3:()=>g,wV:()=>d,yM:()=>v,z0:()=>y});var s=i(95108),r=i(6774);const l=Number.POSITIVE_INFINITY,n=Math.PI,o=2*n,a=128/n,h=256/360,u=n/180,c=1/Math.LN2;function p(t,e){return(t%=e)>=0?t:t+e}function y(t){return p(t*a,256)}function d(t){return p(t*h,256)}function m(t){return Math.log(t)*c}function f(t,e,i){return t*(1-i)+e*i}function _(t){return 8+Math.max(16*(t-14),0)}function g(t,e,i){let s,r,l,n=0;for(const o of i){s=o.length;for(let i=1;i<s;++i)r=o[i-1],l=o[i],r.y>e!=l.y>e&&((l.x-r.x)*(e-r.y)-(l.y-r.y)*(t-r.x)>0?n++:n--)}return 0!==n}function x(t,e,i,r){let l,n,o,a;const h=r*r;for(const r of i){const i=r.length;if(!(i<2)){l=r[0].x,n=r[0].y;for(let u=1;u<i;++u){if(o=r[u].x,a=r[u].y,(0,s.Ng)(t,e,l,n,o,a)<h)return!0;l=o,n=a}}}return!1}function w(t,e){if(0===e||Number.isNaN(e))return t;const i=[],s=new r.bR(0,0),l=new r.bR(0,0),n=new r.bR(0,0);for(let o=0;o<t.length;o++){const a=t[o],h=[];for(let t=0;t<a.length;t++){const i=a[t-1],o=a[t],u=a[t+1];0===t?s.setCoords(0,0):s.assignSub(o,i).normalize().rightPerpendicular(),t===a.length-1?l.setCoords(0,0):l.assignSub(u,o).normalize().rightPerpendicular(),n.assignAdd(s,l).normalize();const c=n.x*l.x+n.y*l.y;0!==c&&n.scale(1/c),h.push(r.bR.add(o,n.scale(e)))}i.push(h)}return i}function v(t,e,i,s){const l=new r.bR(t[0],t[1]);if(l.scale(s),"viewport"===e){const t=-i*(Math.PI/180),e=Math.cos(t),s=Math.sin(t);l.rotate(e,s)}return l}i.d(e,["Jo",0,n,"MG",0,l,"aA",0,h,"os",0,u,"pJ",0,o])},44159(t,e,i){i.d(e,{A:()=>r});var s=i(93687);class r{static{this.pool=new s.A(()=>new r(""),null,null,25,50)}static getId(t,e,i,s){return"object"==typeof t?`${t.level}/${t.row}/${t.col}/${t.world}`:`${t}/${e}/${i}/${s}`}constructor(t,e,i,s){this.set(t,e,i,s)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(t){this.set(t)}get hash(){const t=4095&this.row,e=4095&this.col,i=63&this.level;return(3&this.world)<<30|e<<22|t<<8|i}acquire(t,e,i,s){this.set(t,e,i,s)}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}containsChild(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 r(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(t,e,i,s){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,i,s,r]=t.split("/");this.level=parseFloat(e),this.row=parseFloat(i),this.col=parseFloat(s),this.world=parseFloat(r)}else this.level=+t,this.row=+e,this.col=+i,this.world=+s||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new r(this.level-1,this.row>>1,this.col>>1,this.world)}getNormalizedNeighbor(t,e,i){const s=this.clone();return s.col+=t,s.row+=e,i.normalizeKey(s),s}getChildKeys(){const t=this.level+1,e=this.row<<1,i=this.col<<1,s=this.world;return[new r(t,e,i,s),new r(t,e,i+1,s),new r(t,e+1,i,s),new r(t,e+1,i+1,s)]}compareRowMajor(t){return this.row<t.row?-1:this.row>t.row?1:this.col<t.col?-1:this.col>t.col?1:0}}},78553(t,e,i){i.d(e,{D:()=>l,p:()=>r});var s=i(56507);function r(t){const e=(0,s.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function l(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}}}]);