@arcgis/core 4.27.0-next.20230419 → 4.27.0-next.20230421

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 (203) hide show
  1. package/WebMap.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/arcade/arcadeAsyncRuntime.js +1 -1
  4. package/arcade/arcadeCompiler.js +1 -1
  5. package/arcade/arcadeRuntime.js +1 -1
  6. package/arcade/executionError.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/{f64f95623d9296a91f95.js → 059ec6fd9b971de4b4c1.js} +1 -1
  9. package/assets/esri/core/workers/chunks/0d805fd9cd9ff3a636ca.js +1 -0
  10. package/assets/esri/core/workers/chunks/{1fe31a412479815e5e2d.js → 10770939900946feb20d.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{5252f3cc244204edc299.js → 1216e939d363f96b6cc6.js} +1 -1
  12. package/assets/esri/core/workers/chunks/156dad2b7fed6749bae7.js +1 -0
  13. package/assets/esri/core/workers/chunks/15a97d3e42b00ac42984.js +1 -0
  14. package/assets/esri/core/workers/chunks/{d72c0c97cc4e30f1e4f2.js → 18704903814b9d73c708.js} +1 -1
  15. package/assets/esri/core/workers/chunks/1db5e4c8244dbc21590c.js +1 -0
  16. package/assets/esri/core/workers/chunks/2a1a5a1969e80a10dcca.js +1 -0
  17. package/assets/esri/core/workers/chunks/33b735faa582e6f39e9a.js +1 -0
  18. package/assets/esri/core/workers/chunks/34025ac04ca02531923a.js +1 -0
  19. package/assets/esri/core/workers/chunks/3e9f3479fd8558d9e3e3.js +1 -0
  20. package/assets/esri/core/workers/chunks/{d59274ac695dfcff1143.js → 46090b69e9161bc05141.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{f7aa972cb3903847b3bf.js → 47bf38d910e71ac39bb8.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{3978f4f68ada540ee3a3.js → 4f8a09b61267e5e26712.js} +1 -1
  23. package/assets/esri/core/workers/chunks/5183ecab7eddae7b70e8.js +1 -0
  24. package/assets/esri/core/workers/chunks/{a5c33b24b7ee042cb473.js → 51a0d1dabe7415515c77.js} +2 -2
  25. package/assets/esri/core/workers/chunks/541e6efc3b491e507410.js +1 -0
  26. package/assets/esri/core/workers/chunks/588256e65685ff21d2e9.js +1 -0
  27. package/assets/esri/core/workers/chunks/5c64fd3bf057a1a5527f.js +1 -0
  28. package/assets/esri/core/workers/chunks/6047bdaf4855506f8fdb.js +1 -0
  29. package/assets/esri/core/workers/chunks/6adb58f1bffc5d1c03bd.js +1 -0
  30. package/assets/esri/core/workers/chunks/770940417e6ddbdbb9d6.js +1 -0
  31. package/assets/esri/core/workers/chunks/{1c1d8be85297c483a606.js → 77c98121223a144170e3.js} +1 -1
  32. package/assets/esri/core/workers/chunks/80117007d86be4eb3bc3.js +1 -0
  33. package/assets/esri/core/workers/chunks/812cba53143565a825f1.js +1 -0
  34. package/assets/esri/core/workers/chunks/838849b751805615833a.js +1 -0
  35. package/assets/esri/core/workers/chunks/{9ca395f7bc8d397b5240.js → 88197520501fcc20b6e8.js} +1 -1
  36. package/assets/esri/core/workers/chunks/88f9dededcf60fd011ef.js +1 -0
  37. package/assets/esri/core/workers/chunks/88fdd288ef799a7ac48a.js +1 -0
  38. package/assets/esri/core/workers/chunks/8ae7fea9f7fda38dd207.js +1 -0
  39. package/assets/esri/core/workers/chunks/{0d080dd1ca6a71597409.js → 9265d4e9cfab2c7bbce5.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{8d41305509fedb3603ac.js → 94041a9ced04aa281d40.js} +1 -1
  41. package/assets/esri/core/workers/chunks/98540791fcef86069e44.js +1 -0
  42. package/assets/esri/core/workers/chunks/9c1b2f82877ff79969f5.js +1 -0
  43. package/assets/esri/core/workers/chunks/a7b3cd537c9127b5e65e.js +1 -0
  44. package/assets/esri/core/workers/chunks/{3d1c697182237807ab49.js → abea316f2eac0f3086ab.js} +1 -1
  45. package/assets/esri/core/workers/chunks/ad85ade6a2cfb56cf328.js +1 -0
  46. package/assets/esri/core/workers/chunks/b833b4ea2973bb16792e.js +1 -0
  47. package/assets/esri/core/workers/chunks/be4aa835a7abfc809126.js +1 -0
  48. package/assets/esri/core/workers/chunks/c2ec6e904f96173a7b83.js +1 -0
  49. package/assets/esri/core/workers/chunks/{c25aa08b869f2777dc26.js → c4488a8d857c765da30e.js} +1 -1
  50. package/assets/esri/core/workers/chunks/c5c56b6d99db96a6755a.js +2 -0
  51. package/assets/esri/core/workers/chunks/{7f3b0856f594df2b044e.js → c727d38f71e52bee17e1.js} +1 -1
  52. package/assets/esri/core/workers/chunks/cf315d255f0dc8d50f21.js +1 -0
  53. package/assets/esri/core/workers/chunks/cf7676fdc09ad4835680.js +1 -0
  54. package/assets/esri/core/workers/chunks/cfad34c949cbe8a31ef8.js +1 -0
  55. package/assets/esri/core/workers/chunks/{edb4568fe281b5609092.js → d244e50c981146f018d2.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{a2c9cb23f3e35e88da1d.js → d399b1b9cbf0737d1735.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{df7dcd035997881cf2ef.js → d5c8119d6d34628d3126.js} +1 -1
  58. package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +1 -0
  59. package/assets/esri/core/workers/chunks/{8dfa32cc8453f85faab0.js → dd1f8bade9c5c3b7929b.js} +1 -1
  60. package/assets/esri/core/workers/chunks/e11e60759821746259c6.js +1 -0
  61. package/assets/esri/core/workers/chunks/{e4b65c5a4575a5c1c49f.js → e356c576f9a7521a49b3.js} +1 -1
  62. package/assets/esri/core/workers/chunks/f02edf71645eb33bf92f.js +1 -0
  63. package/assets/esri/core/workers/chunks/f1a4165c2710ca90e5ea.js +1 -0
  64. package/assets/esri/core/workers/chunks/f57a3ee17869ced3dd33.js +1 -0
  65. package/assets/esri/core/workers/chunks/fc07f6e103d7f69a9909.js +1 -0
  66. package/chunks/WaterSurface.glsl.js +35 -20
  67. package/chunks/index.js +1 -1
  68. package/core/Loadable.js +1 -1
  69. package/core/Promise.js +1 -1
  70. package/core/accessorSupport/ensureType.js +1 -1
  71. package/core/accessorSupport/watch.js +1 -1
  72. package/core/accessorSupport/write.js +1 -1
  73. package/core/promiseUtils.js +1 -1
  74. package/core/watchUtils.js +1 -1
  75. package/core/workers/Connection.js +1 -1
  76. package/core/workers/RemoteClient.js +1 -1
  77. package/core/workers/workerFactory.js +1 -1
  78. package/geometry/support/geodesicUtils.js +1 -1
  79. package/geometry/support/meshUtils/External.js +1 -1
  80. package/geometry/support/meshUtils/Metadata.js +1 -1
  81. package/intl/messages.js +1 -1
  82. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  83. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  84. package/layers/graphics/data/attributeSupport.js +1 -1
  85. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  86. package/layers/mixins/ArcGISMapService.js +1 -1
  87. package/layers/support/PromiseQueue.js +1 -1
  88. package/layers/support/Sublayer.js +1 -1
  89. package/layers/support/TileKey.js +1 -1
  90. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  91. package/networks/Network.js +1 -1
  92. package/package.json +1 -1
  93. package/portal/schemas/definitions.js +1 -1
  94. package/renderers/support/RasterSymbolizer.js +1 -1
  95. package/renderers/support/rasterRendererChecks.js +5 -0
  96. package/renderers/support/rasterRendererHelper.js +1 -1
  97. package/request.js +1 -1
  98. package/rest/query/operations/query.js +1 -1
  99. package/smartMapping/raster/renderers/uniqueValue.js +1 -1
  100. package/support/featureFlags.js +1 -1
  101. package/support/revision.js +1 -1
  102. package/symbols/support/previewSymbol3D.js +1 -1
  103. package/symbols/support/styleUtils.js +1 -1
  104. package/symbols/support/symbolLayerUtils.js +1 -1
  105. package/symbols/support/utils.js +1 -1
  106. package/symbols/support/webStyleSymbolUtils.js +1 -1
  107. package/views/2d/engine/webgl/TextureManager.js +1 -1
  108. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  109. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  110. package/views/2d/layers/features/sources/DataTileSource.js +1 -1
  111. package/views/2d/layers/features/sources/DataTileSubscription.js +1 -1
  112. package/views/2d/layers/features/sources/DrillDownFeatureSource.js +1 -1
  113. package/views/2d/layers/features/sources/PagedFeatureSource.js +1 -1
  114. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  115. package/views/2d/layers/features/tileRenderers/HeatmapTileRenderer.js +1 -1
  116. package/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js +1 -1
  117. package/views/2d/layers/features/tileRenderers.js +1 -1
  118. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  119. package/views/2d/layers/support/webStyleUtils.js +1 -1
  120. package/views/3d/input/SceneInputManager.js +1 -1
  121. package/views/3d/interactive/manipulatorUtils.js +1 -1
  122. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  123. package/views/3d/layers/GraphicsView3D.js +1 -1
  124. package/views/3d/layers/I3SMeshView3D.js +1 -1
  125. package/views/3d/layers/graphics/ElevationQuery.js +1 -1
  126. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  127. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  128. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  129. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  130. package/views/3d/layers/graphics/symbolComplexity.js +1 -1
  131. package/views/3d/layers/graphics/webStyleUtils.js +5 -0
  132. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  133. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  134. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  135. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  136. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  137. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  138. package/views/LayerViewManager.js +1 -1
  139. package/views/PopupView.js +1 -1
  140. package/views/SceneView.js +1 -1
  141. package/views/ViewAnimation.js +1 -1
  142. package/views/input/BrowserEventSource.js +1 -1
  143. package/views/input/InputManager.js +1 -1
  144. package/views/interactive/coordinateHelper.js +1 -1
  145. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  146. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  147. package/views/support/QueueProcessor.js +1 -1
  148. package/views/ui/DefaultUI.js +1 -1
  149. package/views/ui/UI.js +1 -1
  150. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  151. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  152. package/widgets/Editor/Upload.js +1 -1
  153. package/widgets/Editor/deprecationUtils.js +1 -1
  154. package/widgets/Editor/modelUploadUtils.js +1 -1
  155. package/widgets/Editor.js +1 -1
  156. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  157. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  158. package/widgets/Feature/FeatureViewModel.js +1 -1
  159. package/widgets/Feature/support/featureUtils.js +1 -1
  160. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  161. package/widgets/Popup.js +1 -1
  162. package/widgets/support/decorators/accessibleHandler.js +1 -1
  163. package/assets/esri/core/workers/chunks/0948a40569b2408edefb.js +0 -1
  164. package/assets/esri/core/workers/chunks/192e3eeed50768c77c65.js +0 -1
  165. package/assets/esri/core/workers/chunks/1d1b9856f2f44d0c2144.js +0 -1
  166. package/assets/esri/core/workers/chunks/203115cc836e7b364eec.js +0 -1
  167. package/assets/esri/core/workers/chunks/20ad44b1a7adfed4c6c4.js +0 -1
  168. package/assets/esri/core/workers/chunks/27353056c3e4e8d8b8d3.js +0 -1
  169. package/assets/esri/core/workers/chunks/41ae9037c70461d5fdc7.js +0 -1
  170. package/assets/esri/core/workers/chunks/4b6a903d4aeeb4eeb615.js +0 -1
  171. package/assets/esri/core/workers/chunks/4bf9bc8b52d618f395c5.js +0 -1
  172. package/assets/esri/core/workers/chunks/5ec4fedbbcbb0053cf74.js +0 -2
  173. package/assets/esri/core/workers/chunks/60e29d172a2dcf45e8d0.js +0 -1
  174. package/assets/esri/core/workers/chunks/68a15cc7c51645d31572.js +0 -1
  175. package/assets/esri/core/workers/chunks/6b065e581bcf743079cf.js +0 -1
  176. package/assets/esri/core/workers/chunks/6c54579981a7bd483f1a.js +0 -1
  177. package/assets/esri/core/workers/chunks/778ecf61f07dafc51bbc.js +0 -1
  178. package/assets/esri/core/workers/chunks/7da1fd3629362b81b43c.js +0 -1
  179. package/assets/esri/core/workers/chunks/80d335bec34d60b7bbdc.js +0 -1
  180. package/assets/esri/core/workers/chunks/810da30f13151b72a293.js +0 -1
  181. package/assets/esri/core/workers/chunks/81485a5056aed94b3d8d.js +0 -1
  182. package/assets/esri/core/workers/chunks/8374d89e995f0d15c042.js +0 -1
  183. package/assets/esri/core/workers/chunks/8ebda132068f6b962dd9.js +0 -1
  184. package/assets/esri/core/workers/chunks/8f553ae2f1aba4e0371f.js +0 -1
  185. package/assets/esri/core/workers/chunks/8fec9979ae2b0e3a878f.js +0 -1
  186. package/assets/esri/core/workers/chunks/979ea2e3b1b164334634.js +0 -1
  187. package/assets/esri/core/workers/chunks/a0e92dd27c8f6b642dbf.js +0 -1
  188. package/assets/esri/core/workers/chunks/a6240bf258b3886a6661.js +0 -1
  189. package/assets/esri/core/workers/chunks/b059cd03f31ead61abb4.js +0 -1
  190. package/assets/esri/core/workers/chunks/b1a8024bf8cdd0cd3884.js +0 -1
  191. package/assets/esri/core/workers/chunks/b366e0db9b5f27dd53a3.js +0 -1
  192. package/assets/esri/core/workers/chunks/b976d5599672665561ec.js +0 -1
  193. package/assets/esri/core/workers/chunks/c260ac058e63a5c0cf60.js +0 -1
  194. package/assets/esri/core/workers/chunks/c646dc9da08b509e39d6.js +0 -1
  195. package/assets/esri/core/workers/chunks/db5598944b691e43f13e.js +0 -1
  196. package/assets/esri/core/workers/chunks/eb163a2ddeb27c690308.js +0 -1
  197. package/assets/esri/core/workers/chunks/eec12b5666819bf2119d.js +0 -1
  198. package/assets/esri/core/workers/chunks/ef05496c1faf08d247f1.js +0 -1
  199. package/assets/esri/core/workers/chunks/f05634909c9449533193.js +0 -1
  200. package/assets/esri/core/workers/chunks/fcebd70b089dea833c75.js +0 -1
  201. package/views/layers/GraphicsView.js +0 -5
  202. /package/assets/esri/core/workers/chunks/{a5c33b24b7ee042cb473.js.LICENSE.txt → 51a0d1dabe7415515c77.js.LICENSE.txt} +0 -0
  203. /package/assets/esri/core/workers/chunks/{5ec4fedbbcbb0053cf74.js.LICENSE.txt → c5c56b6d99db96a6755a.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3172],{3172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>p});var s=r(68773),o=r(40330),n=r(20102),a=r(80442),i=r(22974),l=r(95330),c=r(17452),u=r(19745),d=r(71058),h=r(85958);async function p(e,t){const i=(0,c.HK)(e),u=(0,c.jc)(e);u||i||(e=(0,c.Fv)(e));const y={url:e,requestOptions:{...t}};let g=(0,c.oh)(e);if(g){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,s;try{s=await e.before(t)}catch(e){r=v("request:interceptor",e,t)}if((s instanceof Error||s instanceof n.Z)&&(r=v("request:interceptor",s,t)),r)throw e.error&&e.error(r),r;return s}}(g,y);if(null!=e)return{data:e,getHeader:q,httpStatus:200,requestOptions:y.requestOptions,url:y.url};g.after||g.error||(g=null)}if(e=y.url,"image"===(t=y.requestOptions).responseType&&((0,a.Z)("host-webworker")||(0,a.Z)("host-node")))throw v("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),y);if("head"===t.method){if(t.body)throw v("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),y);if(i||u)throw v("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),y)}if(await async function(){(0,a.Z)("host-webworker")?f||(f=await r.e(9884).then(r.bind(r,29884))):p._abortableFetch||(p._abortableFetch=globalThis.fetch.bind(globalThis))}(),f)return f.execute(e,t);const b=new AbortController;(0,l.fu)(t,(()=>b.abort()));const T={controller:b,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:g,params:y,redoRequest:!1,useIdentity:m.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},k=await async function(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,n=e.controller.signal,a=r.body;let i=null,c=null;if(w&&"HTMLFormElement"in globalThis&&(a instanceof FormData?i=a:a instanceof HTMLFormElement&&(i=new FormData(a))),"string"==typeof a&&(c=a),e.fetchOptions={cache:r.cacheBust&&!p._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:m.priority,redirect:"follow",signal:n},(i||c)&&(e.fetchOptions.body=i||c),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||i?.get("token")),!e.hasToken&&s.default.apiKey&&(0,d.r)(t)&&(r.query||(r.query={}),r.query.token=s.default.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!O(t)&&!(0,l.Hc)(n)){let s;"immediate"===r.authMode?(await C(),s=await o.id.getCredential(t,{signal:n}),e.credential=s):"no-prompt"===r.authMode?(await C(),s=await o.id.getCredential(t,{prompt:!1,signal:n}).catch((()=>{})),e.credential=s):o.id&&(s=o.id.findCredential(t)),s&&(e.credentialToken=s.token,e.useSSL=!!s.ssl)}}(e);try{do{[t,r]=await E(e)}while(!await L(e,t,r))}catch(r){const s=v("request:server",r,e.params,t);throw s.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(s),s}const n=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(n)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,c.kl)(n)){const e=(0,c.P$)(n,!0);e&&m.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,h.Hu)(r.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&o.id){const e=o.id.findServerInfo(a.server);let t=e&&e.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=o.id.findCredential(t,a.userId);e&&-1===o.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getHeader:t?e=>t?.headers.get(e):q,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(T);return g?.after?.(k),k}let f;const m=s.default.request,w="FormData"in globalThis,y=[499,498,403,401],g=["COM_0056","COM_0057","SB_0008"],b=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],q=()=>null,T=Symbol();function k(e){const t=(0,c.P$)(e);return!t||t.endsWith(".arcgis.com")||p._corsServers.includes(t)||(0,c.kl)(t)}function v(e,t,r,s){let o="Error";const a={url:r.url,requestOptions:r.requestOptions,getHeader:q,ssl:!1};if(t instanceof n.Z)return t.details?(t.details=(0,i.d9)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=a,t;if(t){const e=s&&(e=>s.headers.get(e)),r=s&&s.status,n=t.message;n&&(o=n),e&&(a.getHeader=e),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=T in t?t[T]:t}return(0,l.D_)(t)?(0,l.zE)():new n.Z(e,o,a)}async function C(){o.id||await Promise.all([r.e(7126),r.e(6261),r.e(1400),r.e(450)]).then(r.bind(r,73660))}function O(e){return b.some((t=>t.test(e)))}async function E(e){let t=e.params.url;const r=e.params.requestOptions,s=e.fetchOptions??{},n=(0,c.jc)(t)||(0,c.HK)(t),i=r.responseType||"json",d=n?0:null!=r.timeout?r.timeout:m.timeout;let f=!1;if(!n){e.useSSL&&(t=(0,c.hO)(t)),r.cacheBust&&"default"===s.cache&&(t=(0,c.ZN)(t,"request.preventCache",Date.now()));let n={...r.query};e.credentialToken&&(n.token=e.credentialToken);let i=(0,c.B7)(n);(0,a.Z)("esri-url-encodes-apostrophe")&&(i=i.replace(/'/g,"%27"));const l=t.length+1+i.length;let d;f="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||l>m.maxUrlLength;const p=r.useProxy||!!(0,c.ed)(t);if(p){const e=(0,c.b7)(t);d=e.path,!f&&d.length+1+l>m.maxUrlLength&&(f=!0),e.query&&(n={...e.query,...n})}if("HEAD"===s.method&&(f||p)){if(f){if(l>m.maxUrlLength)throw v("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw v("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(p)throw v("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(f?(s.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,c.fl)(t,n):(s.body=(0,c.B7)(n),s.headers||(s.headers={}),s.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,c.fl)(t,n),p&&(e.useProxy=!0,t=`${d}?${t}`),n.token&&w&&s.body instanceof FormData&&!(0,u.P)(t)&&s.body.set("token",n.token),r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,c.D6)(t,(0,c.TI)()))if((0,c.kl)(t))e.withCredentials=!0;else if(o.id){const r=o.id.findServerInfo(t);r&&r.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(s.credentials="include",(0,h.jH)(t)&&await(0,h.jz)(f?(0,c.fl)(t,n):t))}let y,g,b=0,q=!1;d>0&&(b=setTimeout((()=>{q=!0,e.controller.abort()}),d));try{if("native-request-init"===r.responseType)g=s,g.url=t;else if("image"!==r.responseType||"default"!==s.cache||"GET"!==s.method||f||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!n&&!e.useProxy&&m.proxyUrl&&!k(t)){if(y=await p._abortableFetch(t,s),e.useProxy||function(e){const t=(0,c.P$)(e);t&&!p._corsServers.includes(t)&&p._corsServers.push(t)}(t),"native"===r.responseType)g=y;else if("HEAD"!==s.method)if(y.ok){switch(i){case"array-buffer":g=await y.arrayBuffer();break;case"blob":case"image":g=await y.blob();break;default:g=await y.text()}if(b&&(clearTimeout(b),b=0),"json"===i||"xml"===i||"document"===i)if(g)switch(i){case"json":g=JSON.parse(g);break;case"xml":g=S(g,"application/xml");break;case"document":g=S(g,"text/html")}else g=null;if(g){if("array-buffer"===i||"blob"===i){const e=y.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&g["blob"===i?"size":"byteLength"]<=750)try{const e=await new Response(g).json();e.error&&(g=e)}catch{}}"image"===i&&g instanceof Blob&&(g=await x(URL.createObjectURL(g),e,!0))}}else g=await y.text()}else g=await x(t,e)}catch(s){if("AbortError"===s.name){if(q)throw new Error("Timeout exceeded");throw(0,l.zE)("Request canceled")}if(!(!y&&s instanceof TypeError&&m.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||k(t))throw s;e.redoRequest=!0,(0,c.tD)({proxyUrl:m.proxyUrl,urlPrefix:(0,c.P$)(t)??""})}finally{b&&clearTimeout(b)}return[y,g]}function S(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function L(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const s=e.params.requestOptions;if(!t||"native"===s.responseType||"native-request-init"===s.responseType)return!0;let n,a;if(!t.ok)throw n=new Error(`Unable to load ${t.url} status: ${t.status}`),n[T]=r,n;r&&(r.error?n=r.error:"error"===r.status&&Array.isArray(r.messages)&&(n={...r},n[T]=r,n.details=r.messages));let i,l=null;n&&(a=Number(n.code),l=n.hasOwnProperty("subcode")?Number(n.subcode):null,i=n.messageCode,i=i&&i.toUpperCase());const c=s.authMode;if(403===a&&(4===l||n.message&&n.message.toLowerCase().includes("ssl")&&!n.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===a)&&void 0!==a&&y.includes(a)&&!O(e.params.url)&&(403!==a||i&&!g.includes(i)&&(null==l||2===l&&e.credentialToken))){await C();try{const t=await o.id.getCredential(e.params.url,{error:v("request:server",n,e.params),prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===c)return e.credential=void 0,e.credentialToken=void 0,!1;n=t}}if(n)throw n;return!0}function x(e,t,r=!1){const s=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=m.priority,o.src=e,(0,h.fY)(o,e,r,s)}p._abortableFetch=null,p._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,r)=>{r.d(t,{r:()=>n});var s=r(17452);const o=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function n(e){const t=(0,s.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!o.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,r)=>{r.d(t,{Hu:()=>c,fY:()=>i,jH:()=>u,jz:()=>d});var s=r(68773),o=r(80442),n=r(95330),a=r(17452);function i(e,t,r=!1,s){return new Promise(((a,i)=>{if((0,n.Hc)(s))return void i(l());let c=()=>{h(),i(new Error(`Unable to load ${t}`))},u=()=>{const t=e;h(),a(t)},d=()=>{if(!e)return;const t=e;h(),t.src="",i(l())};const h=()=>{(0,o.Z)("esri-image-decode")||(e.removeEventListener("error",c),e.removeEventListener("load",u)),c=null,u=null,e=null,null!=s&&s.removeEventListener("abort",d),d=null,r&&URL.revokeObjectURL(t)};null!=s&&s.addEventListener("abort",d),(0,o.Z)("esri-image-decode")?e.decode().then(u,c):(e.addEventListener("error",c),e.addEventListener("load",u))}))}function l(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}function c(e){s.default.request.crossOriginNoCorsDomains||(s.default.request.crossOriginNoCorsDomains={});const t=s.default.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,a.P$)(r)??""]=0:(t[(0,a.P$)("http://"+r)??""]=0,t[(0,a.P$)("https://"+r)??""]=0)}function u(e){const t=s.default.request.crossOriginNoCorsDomains;if(t){let r=(0,a.P$)(e);if(r)return r=r.toLowerCase(),!(0,a.D6)(r,(0,a.TI)())&&t[r]<Date.now()-36e5}return!1}async function d(e){const t=s.default.request.crossOriginNoCorsDomains,r=(0,a.P$)(e);t&&r&&(t[r.toLowerCase()]=Date.now());const o=(0,a.mN)(e);e=o.path,"json"===o.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3298,3172,9880],{27535:(e,t,s)=>{var r;s.d(t,{Hy:()=>d,OF:()=>u,TD:()=>f,Tu:()=>m,VO:()=>h,aV:()=>o,kq:()=>c,rH:()=>r}),function(e){e.AsyncNotEnabled="AsyncNotEnabled",e.ModulesNotSupported="ModulesNotSupported",e.CircularModules="CircularModules",e.NeverReach="NeverReach",e.UnsupportedHashType="UnsupportedHashType",e.InvalidParameter="InvalidParameter",e.UnexpectedToken="UnexpectedToken",e.Unrecognised="Unrecognised",e.UnrecognisedType="UnrecognisedType",e.MaximumCallDepth="MaximumCallDepth",e.BooleanConditionRequired="BooleanConditionRequired",e.TypeNotAllowedInFeature="TypeNotAllowedInFeature",e.KeyMustBeString="KeyMustBeString",e.WrongNumberOfParameters="WrongNumberOfParameters",e.CallNonFunction="CallNonFunction",e.NoFunctionInTemplateLiteral="NoFunctionInTemplateLiteral",e.NoFunctionInDictionary="NoFunctionInDictionary",e.NoFunctionInArray="NoFunctionInArray",e.AssignModuleFunction="AssignModuleFunction",e.LogicExpressionOrAnd="LogicExpressionOrAnd",e.LogicalExpressionOnlyBoolean="LogicalExpressionOnlyBoolean",e.FuncionNotFound="FunctionNotFound",e.InvalidMemberAccessKey="InvalidMemberAccessKey",e.UnsupportedUnaryOperator="UnsupportUnaryOperator",e.InvalidIdentifier="InvalidIdentifier",e.MemberOfNull="MemberOfNull",e.UnsupportedOperator="UnsupportedOperator",e.Cancelled="Cancelled",e.ModuleAccessorMustBeString="ModuleAccessorMustBeString",e.ModuleExportNotFound="ModuleExportNotFound",e.Immutable="Immutable",e.OutOfBounds="OutOfBounds",e.IllegalResult="IllegalResult",e.FieldNotFound="FieldNotFound",e.PortalRequired="PortalRequired",e.LogicError="LogicError",e.ArrayAccessorMustBeNumber="ArrayAccessMustBeNumber",e.KeyAccessorMustBeString="KeyAccessorMustBeString",e.WrongSpatialReference="WrongSpatialReference"}(r||(r={}));const i={[r.TypeNotAllowedInFeature]:"Feature attributes only support dates, numbers, strings, guids.",[r.LogicError]:"Logic error - {reason}",[r.NeverReach]:"Encountered unreachable logic",[r.AsyncNotEnabled]:"Async Arcade must be enabled for this script",[r.ModuleAccessorMustBeString]:"Module accessor must be a string",[r.ModuleExportNotFound]:"Module has no export with provided identifier",[r.ModulesNotSupported]:"Current profile does not support modules",[r.ArrayAccessorMustBeNumber]:"Array accessor must be a number",[r.FuncionNotFound]:"Function not found",[r.FieldNotFound]:"Key not found - {key}",[r.CircularModules]:"Circular module dependencies are not allowed",[r.Cancelled]:"Execution cancelled",[r.UnsupportedHashType]:"Type not supported in hash function",[r.IllegalResult]:"Value is not a supported return type",[r.PortalRequired]:"Portal is required",[r.InvalidParameter]:"Invalid parameter",[r.WrongNumberOfParameters]:"Call with wrong number of parameters",[r.Unrecognised]:"Unrecognised code structure",[r.UnrecognisedType]:"Unrecognised type",[r.WrongSpatialReference]:"Cannot work with geometry in this spatial reference. It is different to the execution spatial reference",[r.BooleanConditionRequired]:"Conditions must use booleans",[r.NoFunctionInDictionary]:"Dictionaries cannot contain functions.",[r.NoFunctionInArray]:"Arrays cannot contain functions.",[r.NoFunctionInTemplateLiteral]:"Template Literals do not expect functions by value.",[r.KeyAccessorMustBeString]:"Accessor must be a string",[r.KeyMustBeString]:"Object keys must be a string",[r.Immutable]:"Object is immutable",[r.InvalidParameter]:"Invalid parameter",[r.UnexpectedToken]:"Unexpected token",[r.MemberOfNull]:"Cannot access property of null object",[r.MaximumCallDepth]:"Exceeded maximum function depth",[r.OutOfBounds]:"Out of bounds",[r.InvalidIdentifier]:"Identifier not recognised",[r.FuncionNotFound]:"Function not found",[r.CallNonFunction]:"Expression is not a function",[r.InvalidMemberAccessKey]:"Cannot access value using a key of this type",[r.AssignModuleFunction]:"Cannot assign function to module variable",[r.UnsupportedUnaryOperator]:"Unsupported unary operator",[r.UnsupportedOperator]:"Unsupported operator",[r.LogicalExpressionOnlyBoolean]:"Logical expressions must be boolean",[r.LogicExpressionOrAnd]:"Logical expression can only be combined with || or &&"};class n extends Error{constructor(...e){super(...e)}}class a extends n{constructor(e,t){super(l(t)+e.message,{cause:e}),this.loc=null,Error.captureStackTrace&&Error.captureStackTrace(this,a),t&&t.loc&&(this.loc=t.loc)}}class o extends Error{constructor(e,t,s,r){super("Execution error - "+l(s)+d(i[t],r)),this.loc=null,this.declaredRootClass="esri.arcade.arcadeexecutionerror",Error.captureStackTrace&&Error.captureStackTrace(this,o),s&&s.loc&&(this.loc=s.loc)}}function l(e){return e&&e.loc?`Line : ${e.loc.start?.line}, ${e.loc.start?.column}: `:""}class u extends Error{constructor(e,t,s,r){super("Compilation error - "+l(s)+d(i[t],r)),this.loc=null,this.declaredRootClass="esri.arcade.arcadecompilationerror",Error.captureStackTrace&&Error.captureStackTrace(this,u),s&&s.loc&&(this.loc=s.loc)}}class c extends Error{constructor(){super("Uncompilable code structures"),this.declaredRootClass="esri.arcade.arcadeuncompilableerror",Error.captureStackTrace&&Error.captureStackTrace(this,c)}}function d(e,t){try{if(!t)return e;for(const s in t){let r=t[s];r||(r=""),e=e.replace("{"+s+"}",t[s])}}catch(e){}return e}function h(e,t,s){return"esri.arcade.arcadeexecutionerror"===s.declaredRootClass||"esri.arcade.arcadecompilationerror"===s.declaredRootClass?null===s.loc&&t&&t.loc?new a(s,{cause:s}):s:("esri.arcade.featureset.support.featureseterror"===s.declaredRootClass||"esri.arcade.featureset.support.sqlerror"===s.declaredRootClass||s.declaredRootClass,t&&t.loc?new a(s,{cause:s}):s)}var f;!function(e){e.UnrecognisedUri="UnrecognisedUri",e.UnsupportedUriProtocol="UnsupportedUriProtocol"}(f||(f={}));const p={[f.UnrecognisedUri]:"Unrecognised uri - {uri}",[f.UnsupportedUriProtocol]:"Unrecognised uri protocol"};class m extends Error{constructor(e,t){super(d(p[e],t)),this.declaredRootClass="esri.arcade.arcademoduleerror",Error.captureStackTrace&&Error.captureStackTrace(this,m)}}},99880:(e,t,s)=>{s.d(t,{V:()=>l});var r=s(68773),i=(s(3172),s(20102)),n=s(92604),a=s(17452);const o=n.Z.getLogger("esri.assets");function l(e){if(!r.default.assetsPath)throw o.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new i.Z("assets:path-not-set","config.assetsPath is not set");return(0,a.v_)(r.default.assetsPath,e)}},74669:(e,t,s)=>{s.d(t,{Z:()=>i});var r=s(69801);class i{constructor(e,t){this._storage=new r.WJ,this._storage.maxSize=e,t&&this._storage.registerRemoveFunc("",t)}put(e,t){this._storage.put(e,t,1,1)}pop(e){return this._storage.pop(e)}get(e){return this._storage.get(e)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}}},10661:(e,t,s)=>{s.d(t,{s:()=>i});var r=s(42100);class i extends r.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},37455:(e,t,s)=>{s.d(t,{N:()=>r});const r={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const r=new i(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(r.z=e.getPointZ(t)),a&&(r.m=e.getPointM(t)),r},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const r=e.hasZ(t),i=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(r){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(i){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class i{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,r){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),r&&(this.hasM=r)}}class a{constructor(e,t,s,r){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),r&&(this.hasM=r)}}class o{constructor(e,t,s,r){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),r&&(this.hasM=r)}}class l{constructor(e,t,s,r,i){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=r,this.spatialReference=i,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},26993:(e,t,s)=>{s.d(t,{y:()=>x,r:()=>f});var r=s(35308),i=s(49600),n=s(82397),a=s(8744),o=s(62432),l=s(24452);class u{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=s,this.featureAdapter=t;const r=e.outFields;if(r&&!r.includes("*")){this.outFields=r;let e=0;for(const t of r){const r=(0,o.hr)(t),i=this.fieldsIndex.get(r),n=i?null:(0,o.Jc)(r,s),a=i?i.name:(0,o.nu)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const r=s?s.name:t;let i=null;return this._fieldDataCache.has(r)?i=this._fieldDataCache.get(r)?.clause:s||(i=(0,o.Jc)(t,this.fieldsIndex),this._fieldDataCache.set(r,{alias:r,clause:i})),s?this.featureAdapter.getAttribute(e,r):i?.calculateValue(e,this.featureAdapter)}getDataValue(e,t){const s=t.normalizationType,r=t.normalizationTotal;let i=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2&&(i=`${(0,l.wk)(i)}${t.fieldDelimiter}${(0,l.wk)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(i=`${i}${t.fieldDelimiter}${(0,l.wk)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)),s&&Number.isFinite(i)){const n="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;i=(0,l.fk)(i,s,n,r)}return i}getExpressionValue(e,t,s,r){const i={attributes:this.featureAdapter.getAttributes(e),layer:{fields:this.fieldsIndex.fields}},n=r.createExecContext(i,s);return r.executeFunction(t,n)}getExpressionValues(e,t,s,r){const i={fields:this.fieldsIndex.fields};return e.map((e=>{const n={attributes:this.featureAdapter.getAttributes(e),layer:i},a=r.createExecContext(n,s);return r.executeFunction(t,a)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,o.Jc)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,o.Jc)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t||!t.length)return this.featureAdapter.getAttributes(e);const s={};for(const r of t){const{alias:t,clause:i}=this._fieldDataCache.get(r);s[t]=i?i.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const r of t){const{alias:t}=this._fieldDataCache.get(r);s.push(e[t])}else for(const t in e)s.push(e[t]);const r=`${(t||["*"]).join(",")}=${s.join(",")}`;let i=this._returnDistinctMap.get(r)||0;return this._returnDistinctMap.set(r,++i),i>1?null:e}}var c=s(37427);function d(e,t,s){return{objectId:e,target:t,distance:s,type:"vertex"}}function h(e,t,s,r,i,n=!1){return{objectId:e,target:t,distance:s,type:"edge",start:r,end:i,draped:n}}var f,p,m=s(11490),g=s(35671),y=s(59266);class x{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.fieldsIndex=s.fieldsIndex,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new u(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:r}=this.query,i=t?.length;if(!i)return 1;const n=new Map,a=new Map,o=new Set;for(const i of r){const{statisticType:r}=i,l="exceedslimit"!==r?i.onStatisticField:void 0;if(!a.has(l)){const s=[];for(const r of t){const t=this._getAttributeValues(e,r,n);s.push(t)}a.set(l,this._calculateUniqueValues(s,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:r,items:i}=u[t],n=r.join(",");s&&!e.validateItems(i,s)||o.add(n)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(this.query):await this._createStatisticsQueryResponse(this.query):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,a.JY)(this.query.outSR)&&!(0,a.fS)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,m.S2)({spatialReference:this.query.outSR,...(0,c.iV)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,m.S2)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t){const s=this.featureAdapter,r=b(this.hasZ,this.hasM),{point:i,mode:n}=e,a="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y,l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c=this._getPointCreator(n,this.spatialReference,t),p=new v(null,0),m=new v(null,0),g={x:0,y:0,z:0};for(const t of this.items){const n=s.getGeometry(t);if(null==n)continue;const{coords:y,lengths:x}=n;if(p.coords=y,m.coords=y,e.types&f.EDGE){let e=0;for(let n=0;n<x.length;n++){const u=x[n];for(let n=0;n<u;n++,e+=r){const d=p;if(d.coordsIndex=e,n!==u-1){const n=m;n.coordsIndex=e+r;const u=g;w(g,i,d,n);const f=(i.x-u.x)/a,p=(i.y-u.y)/o,y=f*f+p*p;y<=1&&l.candidates.push(h(s.getObjectId(t),c(u),Math.sqrt(y),c(d),c(n)))}}}}if(e.types&f.VERTEX){const e=u?y.length-r:y.length;for(let n=0;n<e;n+=r){const e=p;e.coordsIndex=n;const r=(i.x-e.x)/a,u=(i.y-e.y)/o,h=r*r+u*u;h<=1&&l.candidates.push(d(s.getObjectId(t),c(e),Math.sqrt(h)))}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,s){const r=null==s||(0,a.fS)(t,s)?e=>e:e=>(0,c.iV)(e,t,s),{hasZ:i}=this;return"3d"===e?i?({x:e,y:t,z:s})=>r({x:e,y:t,z:s}):({x:e,y:t})=>r({x:e,y:t,z:0}):({x:e,y:t})=>r({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:r,normalizationType:i,normalizationTotal:n,minValue:a,maxValue:o,scale:u}=e,c=this.fieldsIndex.isDateField(t),d=await this._getDataValues({field:t,valueExpression:s,normalizationField:r,normalizationType:i,normalizationTotal:n,scale:u}),h=(0,l.S5)({normalizationType:i,normalizationField:r,minValue:a,maxValue:o}),f=this.fieldsIndex.get(t),p={value:.5,fieldType:f?.type},m=(0,g.qN)(f)?(0,l.H0)({values:d,supportsNullCount:h,percentileParams:p}):(0,l.i5)({values:d,minValue:a,maxValue:o,useSampleStdDev:!i,supportsNullCount:h,percentileParams:p});return(0,l.F_)(m,c)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:r,returnAllCodedValues:i,scale:n}=e,a=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:n}),o=(0,l.eT)(a);return(0,l.Qm)(o,r,i,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:r,normalizationType:i,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:u,maxValue:c,numClasses:d,scale:h}=e,f=await this._getDataValues({field:t,valueExpression:s,normalizationField:r,normalizationType:i,normalizationTotal:n,scale:h}),p=(0,l.G2)(f,{field:t,normalizationField:r,normalizationType:i,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:u,maxValue:c,numClasses:d});return(0,l.DL)(p,a)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:r,normalizationType:i,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:u,maxValue:c,numBins:d,scale:h}=e,f=await this._getDataValues({field:t,valueExpression:s,normalizationField:r,normalizationType:i,normalizationTotal:n,scale:h});return(0,l.oF)(f,{field:t,normalizationField:r,normalizationType:i,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:u,maxValue:c,numBins:d})}_sortFeatures(e,t,s){if(e.length>1&&t&&t.length)for(const r of t.reverse()){const t=r.split(" "),i=t[0],n=this.fieldsIndex.get(i),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,l.Lq)(n?.type,a);e.sort(((e,t)=>{const r=s(e,i,n),a=s(t,i,n);return o(r,a)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:s,hasM:r,hasZ:i,objectIdField:a,spatialReference:o}=this,{outFields:l,outSR:u,quantizationParameters:c,resultRecordCount:d,resultOffset:h,returnZ:f,returnM:p}=e,g=null!=d&&t.length>(h||0)+d,y=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:g,features:this._createFeatures(e,t),fields:y,geometryType:s,hasM:r&&p,hasZ:i&&f,objectIdFieldName:a,spatialReference:(0,m.S2)(u||o),transform:c&&(0,n.vY)(c)||null}}_createFeatures(e,t){const s=new u(e,this.featureAdapter,this.fieldsIndex),{hasM:r,hasZ:i}=this,{orderByFields:a,quantizationParameters:o,returnGeometry:l,returnCentroid:c,maxAllowableOffset:d,resultOffset:h,resultRecordCount:f,returnZ:p=!1,returnM:g=!1}=e,y=i&&p,x=r&&g;let w=[],b=0;const v=[...t];if(this._sortFeatures(v,a,((e,t,r)=>s.getFieldValue(e,t,r))),l||c){const e=(0,n.vY)(o)??void 0;if(l&&!c)for(const t of v)w[b++]={attributes:s.getAttributes(t),geometry:(0,m.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),d,e,y,x)};else if(!l&&c)for(const t of v)w[b++]={attributes:s.getAttributes(t),centroid:(0,m.EG)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of v)w[b++]={attributes:s.getAttributes(t),centroid:(0,m.EG)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,m.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),d,e,y,x)}}else for(const e of v){const t=s.getAttributes(e);t&&(w[b++]={attributes:t})}const S=h||0;if(null!=f){const e=S+f;w=w.slice(S,Math.min(w.length,e))}return w}_createExceedsLimitQueryResponse(e){let t=!1,s=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;for(const t of e.outStatistics??[])if("exceedslimit"===t.statisticType){s=null!=t.maxPointCount?t.maxPointCount:Number.POSITIVE_INFINITY,r=null!=t.maxRecordCount?t.maxRecordCount:Number.POSITIVE_INFINITY,i=null!=t.maxVertexCount?t.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>s;else if(this.items.length>r)t=!0;else{const e=b(this.hasZ,this.hasM),s=this.featureAdapter;t=this.items.reduce(((e,t)=>{const r=s.getGeometry(t);return e+(null!=r&&r.coords.length||0)}),0)/e>i}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}async _createStatisticsQueryResponse(e){const t={attributes:{}},s=[],r=new Map,i=new Map,n=new Map,a=new Map,o=new u(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:h}=e,f=c&&c.length,p=!!f,m=p?c[0]:null,g=p&&!this.fieldsIndex.get(m);for(const e of l??[]){const{outStatisticFieldName:l,statisticType:u}=e,h=e,y="exceedslimit"!==u?e.onStatisticField:void 0,x="percentile_disc"===u||"percentile_cont"===u,w="EnvelopeAggregate"===u||"CentroidAggregate"===u||"ConvexHullAggregate"===u,b=p&&1===f&&(y===m||g)&&"count"===u;if(p){if(!n.has(y)){const e=[];for(const t of c){const s=this._getAttributeValues(o,t,r);e.push(s)}n.set(y,this._calculateUniqueValues(e,!w&&o.returnDistinctValues))}const e=n.get(y);for(const t in e){const{count:s,data:i,items:n,itemPositions:u}=e[t],f=i.join(",");if(!d||o.validateItems(n,d)){const e=a.get(f)||{attributes:{}};if(w){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:s}=await this._getAggregateGeometry(h,n);e.aggregateGeometries[s]=t}else{let t=null;if(b)t=s;else{const e=this._getAttributeValues(o,y,r),s=u.map((t=>e[t]));t=x&&"statisticParameters"in h?this._getPercentileValue(h,s):this._getStatisticValue(h,s,null,o.returnDistinctValues)}e.attributes[l]=t}let t=0;c.forEach(((s,r)=>e.attributes[this.fieldsIndex.get(s)?s:"EXPR_"+ ++t]=i[r])),a.set(f,e)}}}else if(w){t.aggregateGeometries||(t.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(h,this.items);t.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(o,y,r);t.attributes[l]=x&&"statisticParameters"in h?this._getPercentileValue(h,e):this._getStatisticValue(h,e,i,o.returnDistinctValues)}s.push({name:l,alias:l,type:"esriFieldTypeDouble"})}const y=p?Array.from(a.values()):[t];return this._sortFeatures(y,h,((e,t)=>e.attributes[t])),{fields:s,features:y}}async _getAggregateGeometry(e,t){const n=await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)),{statisticType:a,outStatisticFieldName:o}=e,{featureAdapter:l,spatialReference:u,geometryType:c,hasZ:d,hasM:h}=this,f=t.map((e=>(0,m.Op)(c,d,h,l.getGeometry(e)))),p=n.convexHull(u,f,!0)[0],g={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===a){const e=p?(0,i._w)(p):(0,i.aO)(n.union(u,f));g.aggregateGeometries={...e,spatialReference:u},g.outStatisticFieldName=o||"extent"}else if("CentroidAggregate"===a){const e=p?(0,r.tO)(p):(0,r.$G)((0,i.aO)(n.union(u,f)));g.aggregateGeometries={x:e[0],y:e[1],spatialReference:u},g.outStatisticFieldName=o||"centroid"}else"ConvexHullAggregate"===a&&(g.aggregateGeometries=p,g.outStatisticFieldName=o||"convexHull");return g}_getStatisticValue(e,t,s,r){const{onStatisticField:i,statisticType:n}=e;let a=null;return a=s?.has(i)?s.get(i):(0,g.qN)(this.fieldsIndex.get(i))?(0,l.H0)({values:t,returnDistinct:r}):(0,l.i5)({values:r?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(i,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:r,statisticType:i}=e,{value:n,orderBy:a}=r,o=this.fieldsIndex.get(s);return(0,l.XL)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===i})}_getAttributeValues(e,t,s){if(s.has(t))return s.get(t);const r=this.fieldsIndex.get(t),i=this.items.map((s=>e.getFieldValue(s,t,r)));return s.set(t,i),i}_getAttributeDataValues(e,t){return this.items.map((s=>e.getDataValue(s,{field:t.field,field2:t.field2,field3:t.field3,fieldDelimiter:t.fieldDelimiter,normalizationField:t.normalizationField,normalizationType:t.normalizationType,normalizationTotal:t.normalizationTotal})))}async _getAttributeExpressionValues(e,t,s){const{arcadeUtils:r}=await(0,y.LC)(),i=r.createFunction(t),n=s&&r.getViewInfo(s);return e.getExpressionValues(this.items,i,n,r)}_calculateUniqueValues(e,t){const s={},r=this.items,i=r.length;for(let n=0;n<i;n++){const i=r[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[i],itemPositions:[n]}:(t||s[o].count++,s[o].items.push(i),s[o].itemPositions.push(n))}return s}async _getDataValues(e){const t=new u(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:s,field:r,normalizationField:i,normalizationType:n,normalizationTotal:a,scale:o}=e,l=s?{viewingMode:"map",scale:o,spatialReference:this.query.outSR||this.spatialReference}:null;return s?this._getAttributeExpressionValues(t,s,l):this._getAttributeDataValues(t,{field:r,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,normalizationField:i,normalizationType:n,normalizationTotal:a})}}function w(e,t,s,r){const i=r.x-s.x,n=r.y-s.y,a=i*i+n*n,o=(t.x-s.x)*i+(t.y-s.y)*n,l=Math.min(1,Math.max(0,o/a));e.x=s.x+i*l,e.y=s.y+n*l}function b(e,t){return e?t?4:3:t?3:2}(p=f||(f={}))[p.NONE=0]="NONE",p[p.EDGE=1]="EDGE",p[p.VERTEX=2]="VERTEX";class v{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}},62432:(e,t,s)=>{s.d(t,{nu:()=>m,hr:()=>p,Jc:()=>h,G3:()=>g,Of:()=>f,z4:()=>d,hO:()=>c});var r=s(20102),i=s(74669),n=s(41534);const a=new class{constructor(e,t){this._cache=new i.Z(e),this._invalidCache=new i.Z(t)}get(e,t){const s=`${t.uid}:${e}`,r=this._cache.get(s);if(r)return r;if(void 0!==this._invalidCache.get(s))return null;try{const r=n.WhereClause.create(e,t);return this._cache.put(s,r),r}catch{return this._invalidCache.put(s,null),null}}}(50,500),o="feature-store:unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeDate"]);function c(e,t){if(!t)return!0;const s=a.get(t,e);if(!s)throw new r.Z(o,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new r.Z(o,"where clause is not standard",{where:t});return f(e,s.fieldNames,"where clause contains missing fields"),!0}function d(e,t,s){if(!t)return!0;const i=a.get(t,e);if(!i)throw new r.Z(o,"invalid SQL expression",{having:t});if(!i.isAggregate)throw new r.Z(o,"having does not contain a valid aggregate function",{having:t});const n=i.fieldNames;if(f(e,n,"having contains missing fields"),!i.getExpressions().every((t=>{const{aggregateType:r,field:i}=t,n=e.get(i)?.name;return s.some((t=>{const{onStatisticField:s,statisticType:i}=t,a=e.get(s)?.name;return a===n&&i.toLowerCase().trim()===r}))})))throw new r.Z(o,"expressions in having should also exist in outStatistics",{having:t});return!0}function h(e,t){return e?a.get(e,t):null}function f(e,t,s,i=!0){const n=[];for(const s of t)if("*"!==s&&!e.has(s))if(i){const t=p(s);try{const s=h(t,e);if(!s)throw new r.Z(o,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new r.Z(o,"expression is not standard",{clause:s});f(e,s.fieldNames,"expression contains missing fields")}catch(e){const t=e&&e.details;if(t&&(t.clause||t.where))throw e;t&&t.missingFields?n.push(...t.missingFields):n.push(s)}}else n.push(s);if(n.length)throw new r.Z(o,s,{missingFields:n})}function p(e){return e.split(l)[0]}function m(e){return e.split(l)[1]}function g(e,t){const s=t.get(e);return!!s&&!u.has(s.type)}},37427:(e,t,s)=>{s.d(t,{_W:()=>h,iV:()=>m,oj:()=>y});var r=s(67676),i=s(44547),n=s(37455),a=s(8744),o=s(40488);const l=[0,0];function u(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,l),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,l),[s.xmax,s.ymax]=e(t.xmax,t.ymax,l),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:c(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:c(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function c(e,t){const s=[];for(const r of e)s.push(d(r,t));return s}function d(e,t){const s=[];for(const r of e){const e=t(r[0],r[1],[0,0]);s.push(e),r.length>2&&e.push(r[2]),r.length>3&&e.push(r[3])}return s}async function h(e,t){if(!e||!t)return;const s=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(r.pC):[e];await(0,i.iQ)(s.map((e=>({source:e,dest:t}))))}const f=u.bind(null,o.hG),p=u.bind(null,o.R6);function m(e,t,s,r){if(!e)return e;if(s||(s=t,t=e.spatialReference),!(0,a.JY)(t)||!(0,a.JY)(s)||(0,a.fS)(t,s))return e;if((0,o.Q8)(t,s)){const t=(0,a.sS)(s)?f(e):p(e);return t.spatialReference=s,t}return(0,i.oj)(n.N,[e],t,s,null,r)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s){if(!e||!e.length||!t||!s||(0,a.fS)(t,s))return e;const r={geometries:e,inSpatialReference:t,outSpatialReference:s,resolve:null};return this._jobs.push(r),new Promise((e=>{r.resolve=e,null===this._timer&&(this._timer=setTimeout(this._process,10))}))}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:r,resolve:l}=e;(0,o.Q8)(s,r)?(0,a.sS)(r)?l(t.map(f)):l(t.map(p)):l((0,i.oj)(n.N,t,s,r,null,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function y(e,t,s){return g.push(e,t,s)}},11490:(e,t,s)=>{s.d(t,{EG:()=>w,Op:()=>b,S2:()=>F,Up:()=>v,j6:()=>S,vF:()=>p});var r=s(35454),i=s(67900),n=s(44547),a=s(49600),o=s(33955),l=s(16306),u=s(8744),c=s(98732),d=s(5428),h=s(37427);const f=new r.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),m=new d.Z,g=new d.Z,y=new d.Z,x={esriGeometryPoint:c.fQ,esriGeometryPolyline:c.J6,esriGeometryPolygon:c.eG,esriGeometryMultipoint:c.Iv};function w(e,t,s,r=e.hasZ,i=e.hasM){if(null==t)return null;const n=e.hasZ&&r,a=e.hasM&&i;if(s){const o=(0,c.Nh)(y,t,e.hasZ,e.hasM,"esriGeometryPoint",s,r,i);return(0,c.fQ)(o,n,a)}return(0,c.fQ)(t,n,a)}function b(e,t,s,r,i,n,a=t,o=s){const l=t&&a,u=s&&o,d=null!=r?"coords"in r?r:r.geometry:null;if(null==d)return null;if(i){let r=(0,c.zj)(g,d,t,s,e,i,a,o);return n&&(r=(0,c.Nh)(y,r,l,u,e,n)),x[e]?.(r,l,u)??null}if(n){const r=(0,c.Nh)(y,d,t,s,e,n,a,o);return x[e]?.(r,l,u)??null}return(0,c.hY)(m,d,t,s,a,o),x[e]?.(m,l,u)??null}async function v(e,t,s){const{outFields:r,orderByFields:i,groupByFieldsForStatistics:n,outStatistics:a}=e;if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),S(e,t,s)}async function S(e,t,r){if(!e)return null;let{where:n}=e;if(e.where=n=n&&n.trim(),(!n||/^1 *= *1$/.test(n)||t&&t===n)&&(e.where=null),!e.geometry)return e;let c=await async function(e){const{distance:t,units:r}=e,n=e.geometry;if(null==t||"vertexAttributes"in n)return n;const a=n.spatialReference,o=r?f.fromJSON(r):(0,i.qE)(a),l=a&&((0,u.sT)(a)||(0,u.sS)(a))?n:await(0,h._W)(a,u.Zn).then((()=>(0,h.iV)(n,u.Zn)));return(await async function(){return(await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247))).geodesicBuffer}())(l.spatialReference,l,t,o)}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;c=(0,a.aO)(c),c.spatialReference=t}if(c){await(0,h._W)(c.spatialReference,r),c=function(e,t){const s=e.spatialReference;return T(e,t)&&(0,o.YX)(e)?{spatialReference:s,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(c,r);const t=(await(0,l.aX)((0,o.im)(c)))[0];if(null==t)throw p;const s="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,i=s&&T(c,r)?{densificationStep:8*s}:void 0,n=t.toJSON(),a=await(0,h.iV)(n,n.spatialReference,r,i);if(!a)throw p;a.spatialReference=r,e.geometry=a}return e}function T(e,t){if(!e)return!1;const s=e.spatialReference;return((0,o.YX)(e)||(0,o.oU)(e)||(0,o.l9)(e))&&!(0,u.fS)(s,t)&&!(0,n.Up)(s,t)}function F(e){return e&&I in e?JSON.parse(JSON.stringify(e,_)):e}const I="_geVersion",_=(e,t)=>e!==I?t:void 0},3172:(e,t,s)=>{s.r(t),s.d(t,{default:()=>f});var r=s(68773),i=s(40330),n=s(20102),a=s(80442),o=s(22974),l=s(95330),u=s(17452),c=s(19745),d=s(71058),h=s(85958);async function f(e,t){const o=(0,u.HK)(e),c=(0,u.jc)(e);c||o||(e=(0,u.Fv)(e));const y={url:e,requestOptions:{...t}};let x=(0,u.oh)(e);if(x){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let s,r;try{r=await e.before(t)}catch(e){s=T("request:interceptor",e,t)}if((r instanceof Error||r instanceof n.Z)&&(s=T("request:interceptor",r,t)),s)throw e.error&&e.error(s),s;return r}}(x,y);if(null!=e)return{data:e,getHeader:b,httpStatus:200,requestOptions:y.requestOptions,url:y.url};x.after||x.error||(x=null)}if(e=y.url,"image"===(t=y.requestOptions).responseType&&((0,a.Z)("host-webworker")||(0,a.Z)("host-node")))throw T("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),y);if("head"===t.method){if(t.body)throw T("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),y);if(o||c)throw T("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),y)}if(await async function(){(0,a.Z)("host-webworker")?p||(p=await s.e(9884).then(s.bind(s,29884))):f._abortableFetch||(f._abortableFetch=globalThis.fetch.bind(globalThis))}(),p)return p.execute(e,t);const w=new AbortController;(0,l.fu)(t,(()=>w.abort()));const v={controller:w,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:x,params:y,redoRequest:!1,useIdentity:m.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},S=await async function(e){let t,s;await async function(e){const t=e.params.url,s=e.params.requestOptions,n=e.controller.signal,a=s.body;let o=null,u=null;if(g&&"HTMLFormElement"in globalThis&&(a instanceof FormData?o=a:a instanceof HTMLFormElement&&(o=new FormData(a))),"string"==typeof a&&(u=a),e.fetchOptions={cache:s.cacheBust&&!f._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:s.headers||{},method:"head"===s.method?"HEAD":"GET",mode:"cors",priority:m.priority,redirect:"follow",signal:n},(o||u)&&(e.fetchOptions.body=o||u),"anonymous"===s.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||s.query?.token||o?.get("token")),!e.hasToken&&r.default.apiKey&&(0,d.r)(t)&&(s.query||(s.query={}),s.query.token=r.default.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!I(t)&&!(0,l.Hc)(n)){let r;"immediate"===s.authMode?(await F(),r=await i.id.getCredential(t,{signal:n}),e.credential=r):"no-prompt"===s.authMode?(await F(),r=await i.id.getCredential(t,{prompt:!1,signal:n}).catch((()=>{})),e.credential=r):i.id&&(r=i.id.findCredential(t)),r&&(e.credentialToken=r.token,e.useSSL=!!r.ssl)}}(e);try{do{[t,s]=await _(e)}while(!await C(e,t,s))}catch(s){const r=T("request:server",s,e.params,t);throw r.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(r),r}const n=e.params.url;if(s&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(n)){if(!e.hasToken&&!e.credentialToken&&s.user?.username&&!(0,u.kl)(n)){const e=(0,u.P$)(n,!0);e&&m.trustedServers.push(e)}Array.isArray(s.authorizedCrossOriginNoCorsDomains)&&(0,h.Hu)(s.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&i.id){const e=i.id.findServerInfo(a.server);let t=e&&e.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=i.id.findCredential(t,a.userId);e&&-1===i.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:s,getHeader:t?e=>t?.headers.get(e):b,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(v);return x?.after?.(S),S}let p;const m=r.default.request,g="FormData"in globalThis,y=[499,498,403,401],x=["COM_0056","COM_0057","SB_0008"],w=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],b=()=>null,v=Symbol();function S(e){const t=(0,u.P$)(e);return!t||t.endsWith(".arcgis.com")||f._corsServers.includes(t)||(0,u.kl)(t)}function T(e,t,s,r){let i="Error";const a={url:s.url,requestOptions:s.requestOptions,getHeader:b,ssl:!1};if(t instanceof n.Z)return t.details?(t.details=(0,o.d9)(t.details),t.details.url=s.url,t.details.requestOptions=s.requestOptions):t.details=a,t;if(t){const e=r&&(e=>r.headers.get(e)),s=r&&r.status,n=t.message;n&&(i=n),e&&(a.getHeader=e),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||s||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=v in t?t[v]:t}return(0,l.D_)(t)?(0,l.zE)():new n.Z(e,i,a)}async function F(){i.id||await Promise.all([s.e(7126),s.e(6261),s.e(1400),s.e(450)]).then(s.bind(s,73660))}function I(e){return w.some((t=>t.test(e)))}async function _(e){let t=e.params.url;const s=e.params.requestOptions,r=e.fetchOptions??{},n=(0,u.jc)(t)||(0,u.HK)(t),o=s.responseType||"json",d=n?0:null!=s.timeout?s.timeout:m.timeout;let p=!1;if(!n){e.useSSL&&(t=(0,u.hO)(t)),s.cacheBust&&"default"===r.cache&&(t=(0,u.ZN)(t,"request.preventCache",Date.now()));let n={...s.query};e.credentialToken&&(n.token=e.credentialToken);let o=(0,u.B7)(n);(0,a.Z)("esri-url-encodes-apostrophe")&&(o=o.replace(/'/g,"%27"));const l=t.length+1+o.length;let d;p="delete"===s.method||"post"===s.method||"put"===s.method||!!s.body||l>m.maxUrlLength;const f=s.useProxy||!!(0,u.ed)(t);if(f){const e=(0,u.b7)(t);d=e.path,!p&&d.length+1+l>m.maxUrlLength&&(p=!0),e.query&&(n={...e.query,...n})}if("HEAD"===r.method&&(p||f)){if(p){if(l>m.maxUrlLength)throw T("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw T("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(f)throw T("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(p?(r.method="delete"===s.method?"DELETE":"put"===s.method?"PUT":"POST",s.body?t=(0,u.fl)(t,n):(r.body=(0,u.B7)(n),r.headers||(r.headers={}),r.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,u.fl)(t,n),f&&(e.useProxy=!0,t=`${d}?${t}`),n.token&&g&&r.body instanceof FormData&&!(0,c.P)(t)&&r.body.set("token",n.token),s.hasOwnProperty("withCredentials"))e.withCredentials=s.withCredentials;else if(!(0,u.D6)(t,(0,u.TI)()))if((0,u.kl)(t))e.withCredentials=!0;else if(i.id){const s=i.id.findServerInfo(t);s&&s.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(r.credentials="include",(0,h.jH)(t)&&await(0,h.jz)(p?(0,u.fl)(t,n):t))}let y,x,w=0,b=!1;d>0&&(w=setTimeout((()=>{b=!0,e.controller.abort()}),d));try{if("native-request-init"===s.responseType)x=r,x.url=t;else if("image"!==s.responseType||"default"!==r.cache||"GET"!==r.method||p||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(s.headers)||!n&&!e.useProxy&&m.proxyUrl&&!S(t)){if(y=await f._abortableFetch(t,r),e.useProxy||function(e){const t=(0,u.P$)(e);t&&!f._corsServers.includes(t)&&f._corsServers.push(t)}(t),"native"===s.responseType)x=y;else if("HEAD"!==r.method)if(y.ok){switch(o){case"array-buffer":x=await y.arrayBuffer();break;case"blob":case"image":x=await y.blob();break;default:x=await y.text()}if(w&&(clearTimeout(w),w=0),"json"===o||"xml"===o||"document"===o)if(x)switch(o){case"json":x=JSON.parse(x);break;case"xml":x=E(x,"application/xml");break;case"document":x=E(x,"text/html")}else x=null;if(x){if("array-buffer"===o||"blob"===o){const e=y.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&x["blob"===o?"size":"byteLength"]<=750)try{const e=await new Response(x).json();e.error&&(x=e)}catch{}}"image"===o&&x instanceof Blob&&(x=await M(URL.createObjectURL(x),e,!0))}}else x=await y.text()}else x=await M(t,e)}catch(r){if("AbortError"===r.name){if(b)throw new Error("Timeout exceeded");throw(0,l.zE)("Request canceled")}if(!(!y&&r instanceof TypeError&&m.proxyUrl)||s.body||"delete"===s.method||"head"===s.method||"post"===s.method||"put"===s.method||e.useProxy||S(t))throw r;e.redoRequest=!0,(0,u.tD)({proxyUrl:m.proxyUrl,urlPrefix:(0,u.P$)(t)??""})}finally{w&&clearTimeout(w)}return[y,x]}function E(e,t){let s;try{s=(new DOMParser).parseFromString(e,t)}catch{}if(!s||s.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return s}async function C(e,t,s){if(e.redoRequest)return e.redoRequest=!1,!1;const r=e.params.requestOptions;if(!t||"native"===r.responseType||"native-request-init"===r.responseType)return!0;let n,a;if(!t.ok)throw n=new Error(`Unable to load ${t.url} status: ${t.status}`),n[v]=s,n;s&&(s.error?n=s.error:"error"===s.status&&Array.isArray(s.messages)&&(n={...s},n[v]=s,n.details=s.messages));let o,l=null;n&&(a=Number(n.code),l=n.hasOwnProperty("subcode")?Number(n.subcode):null,o=n.messageCode,o=o&&o.toUpperCase());const u=r.authMode;if(403===a&&(4===l||n.message&&n.message.toLowerCase().includes("ssl")&&!n.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===a)&&void 0!==a&&y.includes(a)&&!I(e.params.url)&&(403!==a||o&&!x.includes(o)&&(null==l||2===l&&e.credentialToken))){await F();try{const t=await i.id.getCredential(e.params.url,{error:T("request:server",n,e.params),prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===u)return e.credential=void 0,e.credentialToken=void 0,!1;n=t}}if(n)throw n;return!0}function M(e,t,s=!1){const r=t.controller.signal,i=new Image;return t.withCredentials?i.crossOrigin="use-credentials":i.crossOrigin="anonymous",i.alt="",i.fetchPriority=m.priority,i.src=e,(0,h.fY)(i,e,s,r)}f._abortableFetch=null,f._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,s)=>{s.d(t,{r:()=>n});var r=s(17452);const i=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function n(e){const t=(0,r.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!i.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,s)=>{s.d(t,{Hu:()=>u,fY:()=>o,jH:()=>c,jz:()=>d});var r=s(68773),i=s(80442),n=s(95330),a=s(17452);function o(e,t,s=!1,r){return new Promise(((a,o)=>{if((0,n.Hc)(r))return void o(l());let u=()=>{h(),o(new Error(`Unable to load ${t}`))},c=()=>{const t=e;h(),a(t)},d=()=>{if(!e)return;const t=e;h(),t.src="",o(l())};const h=()=>{(0,i.Z)("esri-image-decode")||(e.removeEventListener("error",u),e.removeEventListener("load",c)),u=null,c=null,e=null,null!=r&&r.removeEventListener("abort",d),d=null,s&&URL.revokeObjectURL(t)};null!=r&&r.addEventListener("abort",d),(0,i.Z)("esri-image-decode")?e.decode().then(c,u):(e.addEventListener("error",u),e.addEventListener("load",c))}))}function l(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}function u(e){r.default.request.crossOriginNoCorsDomains||(r.default.request.crossOriginNoCorsDomains={});const t=r.default.request.crossOriginNoCorsDomains;for(let s of e)s=s.toLowerCase(),/^https?:\/\//.test(s)?t[(0,a.P$)(s)??""]=0:(t[(0,a.P$)("http://"+s)??""]=0,t[(0,a.P$)("https://"+s)??""]=0)}function c(e){const t=r.default.request.crossOriginNoCorsDomains;if(t){let s=(0,a.P$)(e);if(s)return s=s.toLowerCase(),!(0,a.D6)(s,(0,a.TI)())&&t[s]<Date.now()-36e5}return!1}async function d(e){const t=r.default.request.crossOriginNoCorsDomains,s=(0,a.P$)(e);t&&s&&(t[s.toLowerCase()]=Date.now());const i=(0,a.mN)(e);e=i.path,"json"===i.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6695,5732],{27535:(e,r,o)=>{var n;o.d(r,{Hy:()=>d,OF:()=>u,TD:()=>m,Tu:()=>f,VO:()=>p,aV:()=>c,kq:()=>l,rH:()=>n}),function(e){e.AsyncNotEnabled="AsyncNotEnabled",e.ModulesNotSupported="ModulesNotSupported",e.CircularModules="CircularModules",e.NeverReach="NeverReach",e.UnsupportedHashType="UnsupportedHashType",e.InvalidParameter="InvalidParameter",e.UnexpectedToken="UnexpectedToken",e.Unrecognised="Unrecognised",e.UnrecognisedType="UnrecognisedType",e.MaximumCallDepth="MaximumCallDepth",e.BooleanConditionRequired="BooleanConditionRequired",e.TypeNotAllowedInFeature="TypeNotAllowedInFeature",e.KeyMustBeString="KeyMustBeString",e.WrongNumberOfParameters="WrongNumberOfParameters",e.CallNonFunction="CallNonFunction",e.NoFunctionInTemplateLiteral="NoFunctionInTemplateLiteral",e.NoFunctionInDictionary="NoFunctionInDictionary",e.NoFunctionInArray="NoFunctionInArray",e.AssignModuleFunction="AssignModuleFunction",e.LogicExpressionOrAnd="LogicExpressionOrAnd",e.LogicalExpressionOnlyBoolean="LogicalExpressionOnlyBoolean",e.FuncionNotFound="FunctionNotFound",e.InvalidMemberAccessKey="InvalidMemberAccessKey",e.UnsupportedUnaryOperator="UnsupportUnaryOperator",e.InvalidIdentifier="InvalidIdentifier",e.MemberOfNull="MemberOfNull",e.UnsupportedOperator="UnsupportedOperator",e.Cancelled="Cancelled",e.ModuleAccessorMustBeString="ModuleAccessorMustBeString",e.ModuleExportNotFound="ModuleExportNotFound",e.Immutable="Immutable",e.OutOfBounds="OutOfBounds",e.IllegalResult="IllegalResult",e.FieldNotFound="FieldNotFound",e.PortalRequired="PortalRequired",e.LogicError="LogicError",e.ArrayAccessorMustBeNumber="ArrayAccessMustBeNumber",e.KeyAccessorMustBeString="KeyAccessorMustBeString",e.WrongSpatialReference="WrongSpatialReference"}(n||(n={}));const t={[n.TypeNotAllowedInFeature]:"Feature attributes only support dates, numbers, strings, guids.",[n.LogicError]:"Logic error - {reason}",[n.NeverReach]:"Encountered unreachable logic",[n.AsyncNotEnabled]:"Async Arcade must be enabled for this script",[n.ModuleAccessorMustBeString]:"Module accessor must be a string",[n.ModuleExportNotFound]:"Module has no export with provided identifier",[n.ModulesNotSupported]:"Current profile does not support modules",[n.ArrayAccessorMustBeNumber]:"Array accessor must be a number",[n.FuncionNotFound]:"Function not found",[n.FieldNotFound]:"Key not found - {key}",[n.CircularModules]:"Circular module dependencies are not allowed",[n.Cancelled]:"Execution cancelled",[n.UnsupportedHashType]:"Type not supported in hash function",[n.IllegalResult]:"Value is not a supported return type",[n.PortalRequired]:"Portal is required",[n.InvalidParameter]:"Invalid parameter",[n.WrongNumberOfParameters]:"Call with wrong number of parameters",[n.Unrecognised]:"Unrecognised code structure",[n.UnrecognisedType]:"Unrecognised type",[n.WrongSpatialReference]:"Cannot work with geometry in this spatial reference. It is different to the execution spatial reference",[n.BooleanConditionRequired]:"Conditions must use booleans",[n.NoFunctionInDictionary]:"Dictionaries cannot contain functions.",[n.NoFunctionInArray]:"Arrays cannot contain functions.",[n.NoFunctionInTemplateLiteral]:"Template Literals do not expect functions by value.",[n.KeyAccessorMustBeString]:"Accessor must be a string",[n.KeyMustBeString]:"Object keys must be a string",[n.Immutable]:"Object is immutable",[n.InvalidParameter]:"Invalid parameter",[n.UnexpectedToken]:"Unexpected token",[n.MemberOfNull]:"Cannot access property of null object",[n.MaximumCallDepth]:"Exceeded maximum function depth",[n.OutOfBounds]:"Out of bounds",[n.InvalidIdentifier]:"Identifier not recognised",[n.FuncionNotFound]:"Function not found",[n.CallNonFunction]:"Expression is not a function",[n.InvalidMemberAccessKey]:"Cannot access value using a key of this type",[n.AssignModuleFunction]:"Cannot assign function to module variable",[n.UnsupportedUnaryOperator]:"Unsupported unary operator",[n.UnsupportedOperator]:"Unsupported operator",[n.LogicalExpressionOnlyBoolean]:"Logical expressions must be boolean",[n.LogicExpressionOrAnd]:"Logical expression can only be combined with || or &&"};class a extends Error{constructor(...e){super(...e)}}class s extends a{constructor(e,r){super(i(r)+e.message,{cause:e}),this.loc=null,Error.captureStackTrace&&Error.captureStackTrace(this,s),r&&r.loc&&(this.loc=r.loc)}}class c extends Error{constructor(e,r,o,n){super("Execution error - "+i(o)+d(t[r],n)),this.loc=null,this.declaredRootClass="esri.arcade.arcadeexecutionerror",Error.captureStackTrace&&Error.captureStackTrace(this,c),o&&o.loc&&(this.loc=o.loc)}}function i(e){return e&&e.loc?`Line : ${e.loc.start?.line}, ${e.loc.start?.column}: `:""}class u extends Error{constructor(e,r,o,n){super("Compilation error - "+i(o)+d(t[r],n)),this.loc=null,this.declaredRootClass="esri.arcade.arcadecompilationerror",Error.captureStackTrace&&Error.captureStackTrace(this,u),o&&o.loc&&(this.loc=o.loc)}}class l extends Error{constructor(){super("Uncompilable code structures"),this.declaredRootClass="esri.arcade.arcadeuncompilableerror",Error.captureStackTrace&&Error.captureStackTrace(this,l)}}function d(e,r){try{if(!r)return e;for(const o in r){let n=r[o];n||(n=""),e=e.replace("{"+o+"}",r[o])}}catch(e){}return e}function p(e,r,o){return"esri.arcade.arcadeexecutionerror"===o.declaredRootClass||"esri.arcade.arcadecompilationerror"===o.declaredRootClass?null===o.loc&&r&&r.loc?new s(o,{cause:o}):o:("esri.arcade.featureset.support.featureseterror"===o.declaredRootClass||"esri.arcade.featureset.support.sqlerror"===o.declaredRootClass||o.declaredRootClass,r&&r.loc?new s(o,{cause:o}):o)}var m;!function(e){e.UnrecognisedUri="UnrecognisedUri",e.UnsupportedUriProtocol="UnsupportedUriProtocol"}(m||(m={}));const g={[m.UnrecognisedUri]:"Unrecognised uri - {uri}",[m.UnsupportedUriProtocol]:"Unrecognised uri protocol"};class f extends Error{constructor(e,r){super(d(g[e],r)),this.declaredRootClass="esri.arcade.arcademoduleerror",Error.captureStackTrace&&Error.captureStackTrace(this,f)}}},5732:(e,r,o)=>{o.d(r,{c:()=>n,g:()=>t});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4475],{84475:(e,t,i)=>{i.r(t),i.d(t,{DictionaryLoader:()=>f});var s=i(22303),o=i(3172),r=i(20102),n=(i(80442),i(92604)),l=i(13867),a=i(95330),c=i(19153),y=i(99514),u=i(59266),h=i(17386);const m="esri.renderers.support.DictionaryLoader",d={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",width:.5,color:[0,0,0,255]}]}};class f{constructor(e,t,i){this.config=null,this.fieldMap=null,this.url=null,this._ongoingRequests=new Map,this._symbolCache=new l.Z(100),this._fieldIndex=null,this._dictionaryPromise=null,this.url=e,this.config=t,this.fieldMap=i}getSymbolFields(){return this._symbolFields}async getSymbolAsync(e,t){let i;this._dictionaryPromise||(this._dictionaryPromise=this.fetchResources(t));try{i=await this._dictionaryPromise}catch(e){if((0,a.D_)(e))return this._dictionaryPromise=null,null}const o={};if(this.fieldMap)for(const t of this._symbolFields){const i=this._getFieldName(this.fieldMap[t]);o[t]=i?""+e.attributes[i]:""}let r=null;try{r=i?.(o,t)}catch(e){return null}if(!r||"string"!=typeof r)return null;const n=(0,c.hP)(r).toString(),l=this._symbolCache.get(n);if(l)return l.catch((()=>{this._symbolCache.pop(n)})),l;const y=r.split(";"),u=[],h=[];for(const e of y)if(e)if(e.includes("po:")){const t=e.substr(3).split("|");if(3===t.length){const e=t[0],i=t[1];let o=t[2];if("DashTemplate"===i)o=o.split(" ").map((e=>Number(e)));else if("Color"===i){const e=new s.Z(o).toRgba();o=[e[0],e[1],e[2],255*e[3]]}else o=Number(o);h.push({primitiveName:e,propertyName:i,value:o})}}else if(e.includes("|")){for(const t of e.split("|"))if(this._itemNames.has(t)){u.push(t);break}}else this._itemNames.has(e)&&u.push(e);const m=null==e.geometry||!e.geometry.hasZ&&"point"===e.geometry.type,d=this._cimPartsToCIMSymbol(u,h,m,t);return this._symbolCache.put(n,d,1),d}async fetchResources(e){if(this._dictionaryPromise)return this._dictionaryPromise;if(!this.url)return void n.Z.getLogger(m).error("no valid URL!");const t=(0,o.default)(this.url+"/resources/styles/dictionary-info.json",{responseType:"json",query:{f:"json"},signal:null!=e?e.signal:null}),[{data:i}]=await Promise.all([t,(0,u.LC)()]);if(!i)throw this._dictionaryPromise=null,new r.Z("esri.renderers.DictionaryRenderer","Bad dictionary data!");const s=i.expression,l=i.authoringInfo;this._refSymbolUrlTemplate=this.url+"/"+i.cimRefTemplateUrl,this._itemNames=new Set(i.itemsNames),this._symbolFields=l.symbol;const a={};if(this.config){const e=this.config;for(const t in e)a[t]=e[t]}if(l.configuration)for(const e of l.configuration)a.hasOwnProperty(e.name)||(a[e.name]=e.value);const c=[];if(null!=e&&e.fields&&this.fieldMap)for(const t of this._symbolFields){const i=this.fieldMap[t],s=e.fields.filter((e=>e.name.toLowerCase()===i?.toLowerCase()));s.length>0&&c.push({...s[0],type:"esriFieldTypeString"})}c.length>0&&(this._fieldIndex=new y.Z(c));const h=(0,u.pp)(s,null!=e?e.spatialReference:null,c,a).then((e=>{const t={scale:0};return(i,s)=>{if(null==e)return null;const o=e.repurposeFeature({geometry:null,attributes:i});return t.scale=null!=s?s.scale??void 0:void 0,e.evaluate({$feature:o,$view:t})}})).catch((e=>(n.Z.getLogger(m).error("Creating dictinoary expression failed:",e),null)));return this._dictionaryPromise=h,h}async _cimPartsToCIMSymbol(e,t,i,s){const o=new Array(e.length);for(let t=0;t<e.length;t++)o[t]=this._getSymbolPart(e[t],s);const r=await Promise.all(o),n=this.fieldMap;if(n)for(const e of r)p(e,n);return new h.Z({data:this._combineSymbolParts(r,t,i)})}async _getSymbolPart(e,t){if(this._ongoingRequests.has(e))return this._ongoingRequests.get(e).then((e=>e.data));const i=this._refSymbolUrlTemplate.replace(/\{itemName\}/gi,e),s=(0,o.default)(i,{responseType:"json",query:{f:"json"},...t});this._ongoingRequests.set(e,s);try{return(await s).data}catch(t){throw this._ongoingRequests.delete(e),t}}_combineSymbolParts(e,t,i){if(!e||0===e.length)return null;const s={...e[0]};if(e.length>1){s.symbolLayers=[];for(const t of e){const e=t;s.symbolLayers.unshift(...e.symbolLayers)}}return i&&(s.callout=d),{type:"CIMSymbolReference",symbol:s,primitiveOverrides:t}}_getFieldName(e){if(null!==this._fieldIndex){const t=this._fieldIndex.get(e);return t?t.name:e}return e}}function p(e,t){if(!e)return;const i=e.symbolLayers;if(!i)return;let s=i.length;for(;s--;){const e=i[s];e&&!1!==e.enable&&"CIMVectorMarker"===e.type&&b(e,t)}}function b(e,t){const i=e.markerGraphics;if(i)for(const e of i){if(!e)continue;const i=e.symbol;if(i)switch(i.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":p(i,t);break;case"CIMTextSymbol":i.fieldMap=t}}}},17386:(e,t,i)=>{i.d(t,{Z:()=>f});var s,o=i(43697),r=i(22974),n=i(19153),l=i(5600),a=(i(75215),i(36030)),c=i(71715),y=i(52011),u=i(30556),h=i(35671),m=i(89164);let d=s=class extends m.Z{constructor(e){super(e),this.data=null,this.type="cim"}readData(e,t){return t}writeData(e,t){Object.assign(t,e)}async collectRequiredFields(e,t){if("CIMSymbolReference"===this.data?.type){const i=this.data.primitiveOverrides;if(i){const s=i.map((i=>{const s=i.valueExpressionInfo;return(0,h.io)(e,t,s.expression)}));await Promise.all(s)}}}clone(){return new s({data:(0,r.d9)(this.data)})}hash(){return(0,n.hP)(JSON.stringify(this.data)).toString()}};(0,o._)([(0,l.Cb)({json:{write:!1}})],d.prototype,"color",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],d.prototype,"data",void 0),(0,o._)([(0,c.r)("data",["symbol"])],d.prototype,"readData",null),(0,o._)([(0,u.c)("data",{})],d.prototype,"writeData",null),(0,o._)([(0,a.J)({CIMSymbolReference:"cim"},{readOnly:!0})],d.prototype,"type",void 0),d=s=(0,o._)([(0,y.j)("esri.symbols.CIMSymbol")],d);const f=d},89164:(e,t,i)=>{i.d(t,{Z:()=>m});var s=i(43697),o=i(22303),r=i(35454),n=i(96674),l=i(5600),a=(i(75215),i(67676),i(80442),i(71715)),c=i(52011);const y=new r.X({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",WebStyleSymbol:"web-style",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d",CIMSymbolReference:"cim"});let u=0,h=class extends n.wq{constructor(e){super(e),this.id="sym"+u++,this.type=null,this.color=new o.Z([0,0,0,1])}readColor(e){return e&&null!=e[0]?[e[0],e[1],e[2],e[3]/255]:e}async collectRequiredFields(e,t){}hash(){return JSON.stringify(this.toJSON())}clone(){}};(0,s._)([(0,l.Cb)({type:y.apiValues,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:y.write}}})],h.prototype,"type",void 0),(0,s._)([(0,l.Cb)({type:o.Z,json:{write:{allowNull:!0}}})],h.prototype,"color",void 0),(0,s._)([(0,a.r)("color")],h.prototype,"readColor",null),h=(0,s._)([(0,c.j)("esri.symbols.Symbol")],h);const m=h}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7697],{95401:(e,t,n)=>{n.d(t,{e:()=>l});var r,o,i,s=n(5732),a={exports:{}};r=a,o=function(){function e(e,n,o){o=o||2;var i,s,a,c,u,p,h,f=n&&n.length,g=f?n[0]*o:e.length,d=t(e,0,g,o,!0),m=[];if(!d||d.next===d.prev)return m;if(f&&(d=l(e,n,d,o)),e.length>80*o){i=a=e[0],s=c=e[1];for(var x=o;x<g;x+=o)(u=e[x])<i&&(i=u),(p=e[x+1])<s&&(s=p),u>a&&(a=u),p>c&&(c=p);h=0!==(h=Math.max(a-i,c-s))?1/h:0}return r(d,m,o,i,s,h),m}function t(e,t,n,r,o){var i,s;if(o===S(e,t,n,r)>0)for(i=t;i<n;i+=r)s=Z(i,e[i],e[i+1],s);else for(i=n-r;i>=t;i-=r)s=Z(i,e[i],e[i+1],s);if(s&&v(s,s.next)){var a=s.next;_(s),s=a}return s}function n(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==y(r.prev,r,r.next))r=r.next;else{var o=r.prev;if(_(r),(r=t=o)===r.next)break;n=!0}}while(n||r!==t);return t}function r(e,t,l,c,u,p,h){if(e){!h&&p&&f(e,c,u,p);for(var g,d,m=e;e.prev!==e.next;)if(g=e.prev,d=e.next,p?i(e,c,u,p):o(e))t.push(g.i/l),t.push(e.i/l),t.push(d.i/l),_(e),e=d.next,m=d.next;else if((e=d)===m){h?1===h?r(e=s(n(e),t,l),t,l,c,u,p,2):2===h&&a(e,t,l,c,u,p):r(n(e),t,l,c,u,p,1);break}}}function o(e){var t=e.prev,n=e,r=e.next;if(y(t,n,r)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(m(t.x,t.y,n.x,n.y,r.x,r.y,o.x,o.y)&&y(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(e,t,n,r){var o=e.prev,i=e,s=e.next;if(y(o,i,s)>=0)return!1;for(var a=o.x<i.x?o.x<s.x?o.x:s.x:i.x<s.x?i.x:s.x,l=o.y<i.y?o.y<s.y?o.y:s.y:i.y<s.y?i.y:s.y,c=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,u=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,p=g(a,l,t,n,r),h=g(c,u,t,n,r),f=e.prevZ,d=e.nextZ;f&&f.z>=p&&d&&d.z<=h;){if(f!==e.prev&&f!==e.next&&m(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,d!==e.prev&&d!==e.next&&m(o.x,o.y,i.x,i.y,s.x,s.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;f&&f.z>=p;){if(f!==e.prev&&f!==e.next&&m(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;d&&d.z<=h;){if(d!==e.prev&&d!==e.next&&m(o.x,o.y,i.x,i.y,s.x,s.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function s(e,t,r){var o=e;do{var i=o.prev,s=o.next.next;!v(i,s)&&w(i,o,o.next,s)&&C(i,s)&&C(s,i)&&(t.push(i.i/r),t.push(o.i/r),t.push(s.i/r),_(o),_(o.next),o=e=s),o=o.next}while(o!==e);return n(o)}function a(e,t,o,i,s,a){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&x(l,c)){var u=T(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,t,o,i,s,a),void r(u,t,o,i,s,a)}c=c.next}l=l.next}while(l!==e)}function l(e,r,o,i){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=t(e,r[s]*i,s<a-1?r[s+1]*i:e.length,i,!1))===l.next&&(l.steiner=!0),u.push(d(l));for(u.sort(c),s=0;s<u.length;s++)o=n(o=p(u[s],o),o.next);return o}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function p(e,t){var r=function(e,t){var n,r=t,o=e.x,i=e.y,s=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=o&&a>s){if(s=a,a===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(o===s)return n;var l,c=n,u=n.x,p=n.y,f=1/0;r=n;do{o>=r.x&&r.x>=u&&o!==r.x&&m(i<p?o:s,i,u,p,i<p?s:o,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(o-r.x),C(r,e)&&(l<f||l===f&&(r.x>n.x||r.x===n.x&&h(n,r)))&&(n=r,f=l)),r=r.next}while(r!==c);return n}(e,t);if(!r)return t;var o=T(r,e),i=n(r,r.next);let s=u(o);return n(s,s.next),i=u(i),u(t===r?i:t)}function h(e,t){return y(e.prev,e,t.prev)<0&&y(t.next,e,e.next)<0}function f(e,t,n,r){var o=e;do{null===o.z&&(o.z=g(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,i,s,a,l,c=1;do{for(n=e,e=null,i=null,s=0;n;){for(s++,r=n,a=0,t=0;t<c&&(a++,r=r.nextZ);t++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(o=n,n=n.nextZ,a--):(o=r,r=r.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;n=r}i.nextZ=null,c*=2}while(s>1)}(o)}function g(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function d(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function m(e,t,n,r,o,i,s,a){return(o-s)*(t-a)-(e-s)*(i-a)>=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(i-a)-(o-s)*(r-a)>=0}function x(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&w(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(C(e,t)&&C(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(y(e.prev,e,t.prev)||y(e,t.prev,t))||v(e,t)&&y(e.prev,e,e.next)>0&&y(t.prev,t,t.next)>0)}function y(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,n,r){var o=A(y(e,t,n)),i=A(y(e,t,r)),s=A(y(n,r,e)),a=A(y(n,r,t));return o!==i&&s!==a||!(0!==o||!b(e,n,t))||!(0!==i||!b(e,r,t))||!(0!==s||!b(n,e,r))||!(0!==a||!b(n,t,r))}function b(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function A(e){return e>0?1:e<0?-1:0}function C(e,t){return y(e.prev,e,e.next)<0?y(e,t,e.next)>=0&&y(e,e.prev,t)>=0:y(e,t,e.prev)<0||y(e,e.next,t)<0}function T(e,t){var n=new M(e.i,e.x,e.y),r=new M(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function Z(e,t,n,r){var o=new M(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function _(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function M(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(e,t,n,r){for(var o=0,i=t,s=n-r;i<n;i+=r)o+=(e[s]-e[i])*(e[i+1]+e[s+1]),s=i;return o}return e.deviation=function(e,t,n,r){var o=t&&t.length,i=o?t[0]*n:e.length,s=Math.abs(S(e,0,i,n));if(o)for(var a=0,l=t.length;a<l;a++){var c=t[a]*n,u=a<l-1?t[a+1]*n:e.length;s-=Math.abs(S(e,c,u,n))}var p=0;for(a=0;a<r.length;a+=3){var h=r[a]*n,f=r[a+1]*n,g=r[a+2]*n;p+=Math.abs((e[h]-e[g])*(e[f+1]-e[h+1])-(e[h]-e[f])*(e[g+1]-e[h+1]))}return 0===s&&0===p?0:Math.abs((p-s)/s)},e.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var s=0;s<t;s++)n.vertices.push(e[o][i][s]);o>0&&(r+=e[o-1].length,n.holes.push(r))}return n},e},void 0!==(i=o())&&(r.exports=i);const l=(0,s.g)(a.exports)},24882:(e,t,n)=>{n.d(t,{$z:()=>s,KF:()=>u,mi:()=>o});var r=n(1533);function o(e){return(0,r.kJ)(e)?e.length<r.DB?e:i(e):e.length<r.DB?Array.from(e):e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:i(e)}function i(e){let t=!0;for(const n of e){if(n>=65536)return(0,r.kJ)(e)?new Uint32Array(e):e;n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}function s(e){return e<=r.DB?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=(()=>{const e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})();const l=[0],c=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){if(1===e)return l;if(e<r.DB)return Array.from(new Uint16Array(c.buffer,0,e));if(e<c.length)return new Uint16Array(c.buffer,0,e);if(e>a.length){const t=Math.max(2*a.length,e);a=new Uint32Array(t);for(let e=0;e<a.length;e++)a[e]=e}return new Uint32Array(a.buffer,0,e)}new Uint8Array(65536)},62540:(e,t,n)=>{n.d(t,{Z:()=>y});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011),p=n(75215),h=n(65542),f=n(60746),g=n(71630);const d="esri.geometry.support.MeshComponent",m=a.Z.getLogger(d);let x=r=class extends i.wq{static from(e){return(0,p.TJ)(r,e)}constructor(e){super(e),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,g.X)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},m)}castMaterial(e){return(0,p.TJ)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?f.Z:h.Z,e)}clone(){return new r({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(e,t){const n={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals};return new r(n)}};(0,o._)([(0,l.Cb)({json:{write:!0}})],x.prototype,"faces",void 0),(0,o._)([(0,c.p)("faces")],x.prototype,"castFaces",null),(0,o._)([(0,l.Cb)({type:h.Z,json:{write:!0}})],x.prototype,"material",void 0),(0,o._)([(0,c.p)("material")],x.prototype,"castMaterial",null),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],x.prototype,"shading",void 0),(0,o._)([(0,l.Cb)({type:Boolean})],x.prototype,"trustSourceNormals",void 0),x=r=(0,o._)([(0,u.j)(d)],x);const y=x},65542:(e,t,n)=>{n.d(t,{Z:()=>p});var r,o=n(43697),i=n(22303),s=n(96674),a=n(5600),l=(n(75215),n(67676),n(80442),n(52011)),c=n(91024);let u=r=class extends s.wq{constructor(e){super(e),this.color=null,this.colorTexture=null,this.normalTexture=null,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:null!=this.colorTexture?this.colorTexture.cloneWithDeduplication(e):null,normalTexture:null!=this.normalTexture?this.normalTexture.cloneWithDeduplication(e):null,alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:null!=this.colorTextureTransform?this.colorTextureTransform:null,normalTextureTransform:null!=this.normalTextureTransform?this.normalTextureTransform:null}}};(0,o._)([(0,a.Cb)({type:i.Z,json:{write:!0}})],u.prototype,"color",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],u.prototype,"colorTexture",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],u.prototype,"normalTexture",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],u.prototype,"alphaMode",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],u.prototype,"alphaCutoff",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],u.prototype,"doubleSided",void 0),(0,o._)([(0,a.Cb)()],u.prototype,"colorTextureTransform",void 0),(0,o._)([(0,a.Cb)()],u.prototype,"normalTextureTransform",void 0),u=r=(0,o._)([(0,l.j)("esri.geometry.support.MeshMaterial")],u);const p=u},60746:(e,t,n)=>{n.d(t,{Z:()=>p});var r,o=n(43697),i=n(22303),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011)),l=n(65542),c=n(91024);let u=r=class extends l.Z{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.occlusionTexture=null,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:null!=this.emissiveColor?this.emissiveColor.clone():null,emissiveTexture:null!=this.emissiveTexture?this.emissiveTexture.cloneWithDeduplication(e):null,occlusionTexture:null!=this.occlusionTexture?this.occlusionTexture.cloneWithDeduplication(e):null,metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:null!=this.metallicRoughnessTexture?this.metallicRoughnessTexture.cloneWithDeduplication(e):null,occlusionTextureTransform:null!=this.occlusionTextureTransform?this.occlusionTextureTransform:null,emissiveTextureTransform:null!=this.emissiveTextureTransform?this.emissiveTextureTransform:null,metallicRoughnessTextureTransform:null!=this.metallicRoughnessTextureTransform?this.metallicRoughnessTextureTransform:null}}};(0,o._)([(0,s.Cb)({type:i.Z,json:{write:!0}})],u.prototype,"emissiveColor",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],u.prototype,"emissiveTexture",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],u.prototype,"occlusionTexture",void 0),(0,o._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"metallic",void 0),(0,o._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"roughness",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],u.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,s.Cb)()],u.prototype,"occlusionTextureTransform",void 0),(0,o._)([(0,s.Cb)()],u.prototype,"emissiveTextureTransform",void 0),(0,o._)([(0,s.Cb)()],u.prototype,"metallicRoughnessTextureTransform",void 0),u=r=(0,o._)([(0,a.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],u);const p=u},91024:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(43697);n(80442);let o=null,i=!0;function s(){return o||(o=document.createElement("canvas"),o.width=1,o.height=1),o}function a(e,t,n){return n||(n=s()),n.getContext("2d").createImageData(e,t)}var l,c=n(96674),u=n(5600),p=n(75215),h=(n(67676),n(71715)),f=n(52011),g=n(30556),d=n(25929);const m=new WeakMap;let x=0,y=l=class extends c.wq{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){if(e instanceof HTMLImageElement){const o={type:"image-element",src:(0,d.t)(e.src,r),crossOrigin:e.crossOrigin};t[n]=o}else if(e instanceof HTMLCanvasElement){const r=e.getContext("2d").getImageData(0,0,e.width,e.height),o={type:"canvas-element",imageData:this._encodeImageData(r)};t[n]=o}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,d.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[n]=o}else if(e instanceof ImageData){const r={type:"image-data",imageData:this._encodeImageData(e)};t[n]=r}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),n=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===n)return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(m.has(this.data)||m.set(this.data,++x),t(m.get(this.data))):t()}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new l(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const n=this.clone();return e.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return function(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(i)try{return new ImageData(e,t,n)}catch(e){i=!1}const o=a(t,n,void 0);return o.data.set(e,0),o}(n,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new l({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new l({data:e}):(0,p.TJ)(l,e)}};(0,r._)([(0,u.Cb)({type:String,json:{write:d.w}})],y.prototype,"url",null),(0,r._)([(0,u.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,u.Cb)()],y.prototype,"data",null),(0,r._)([(0,g.c)("data")],y.prototype,"writeData",null),(0,r._)([(0,h.r)("data")],y.prototype,"readData",null),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],y.prototype,"transparent",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],y.prototype,"wrap",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],y.prototype,"contentHash",null),y=l=(0,r._)([(0,f.j)("esri.geometry.support.MeshTexture")],y);const v=y},71630:(e,t,n)=>{n.d(t,{Q:()=>f,X:()=>d});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011);const p="esri.geometry.support.MeshVertexAttributes",h=a.Z.getLogger(p);let f=r=class extends i.wq{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return d(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},h)}castPosition(e){return e&&e instanceof Float32Array&&h.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),d(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},h)}castUv(e){return d(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},h)}castNormal(e){return d(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},h)}castTangent(e){return d(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},h)}clone(){const e={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new r(e)}clonePositional(){const e={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new r(e)}};function g(e,t,n,r){const{loggerTag:o,stride:i}=t;return e.length%i!=0?(r.error(o,`Invalid array length, expected a multiple of ${i}`),new n([])):e}function d(e,t,n,r,o){if(!e)return e;if(e instanceof t)return g(e,r,t,o);for(const i of n)if(e instanceof i)return g(new t(e),r,t,o);if(Array.isArray(e))return g(new t(e),r,t,o);{const r=n.map((e=>`'${e.name}'`));return o.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function m(e,t,n){t[n]=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}(0,o._)([(0,l.Cb)({json:{write:m}})],f.prototype,"color",void 0),(0,o._)([(0,c.p)("color")],f.prototype,"castColor",null),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:m}})],f.prototype,"position",void 0),(0,o._)([(0,c.p)("position")],f.prototype,"castPosition",null),(0,o._)([(0,l.Cb)({json:{write:m}})],f.prototype,"uv",void 0),(0,o._)([(0,c.p)("uv")],f.prototype,"castUv",null),(0,o._)([(0,l.Cb)({json:{write:m}})],f.prototype,"normal",void 0),(0,o._)([(0,c.p)("normal")],f.prototype,"castNormal",null),(0,o._)([(0,l.Cb)({json:{write:m}})],f.prototype,"tangent",void 0),(0,o._)([(0,c.p)("tangent")],f.prototype,"castTangent",null),f=r=(0,o._)([(0,u.j)(p)],f)},84470:(e,t,n)=>{n.d(t,{JG:()=>l,NZ:()=>o,vj:()=>u});var r=n(2981);function o(e){const t=e?.source;return!!t&&(Array.isArray(t)?t.some((e=>a(e))):a(t))}const i=/^(model\/gltf\+json)|(model\/gltf-binary)$/,s=/\.(gltf|glb)/i;function a(e){if(e instanceof File){const{type:t,name:n}=e;return i.test(t)||s.test(n)}return i.test(e.assetMimeType)||s.test(e.assetName)||s.test(e.assetUrl)}function l(e,t){if(!e)return!1;const{source:n}=e;return Array.isArray(n)?function(e,t){return e.every((e=>c(e,t)))}(n,t):c(n,t)}function c(e,t){return!(e instanceof File)&&e.assetUrl.startsWith(`${t.path}/assets/`)}function u(e,t){return e instanceof File?(0,r.Es)(e.name,t)??(0,r.PM)(e.type,t):(0,r.PM)(e.assetMimeType,t)??(0,r.Es)(e.assetName,t)}},47545:(e,t,n)=>{n.d(t,{d:()=>i});var r=n(22021),o=n(24882);function i(e,t,n){const i=Array.isArray(e),u=i?e.length/t:e.byteLength/(4*t),p=i?e:new Uint32Array(e,0,u*t),h=n?.minReduction??0,f=n?.originalIndices||null,g=f?f.length:0,d=n?.componentOffsets||null;let m=0;if(d)for(let e=0;e<d.length-1;e++){const t=d[e+1]-d[e];t>m&&(m=t)}else m=u;const x=Math.floor(1.1*m)+1;(null==c||c.length<2*x)&&(c=new Uint32Array((0,r.Sf)(2*x)));for(let e=0;e<2*x;e++)c[e]=0;let y=0;const v=!!d&&!!f,w=v?g:u;let b=(0,o.$z)(u);const A=new Uint32Array(g),C=1.96;let T=0!==h?Math.ceil(4*C*C/(h*h)*h*(1-h)):w,Z=1,_=d?d[1]:w;for(let e=0;e<w;e++){if(e===T){const t=1-y/e;if(t+C*Math.sqrt(t*(1-t)/e)<h)return null;T*=2}if(e===_){for(let e=0;e<2*x;e++)c[e]=0;if(f)for(let e=d[Z-1];e<d[Z];e++)A[e]=b[f[e]];_=d[++Z]}const n=v?f[e]:e,r=n*t,o=l(p,r,t);let i=o%x,a=y;for(;0!==c[2*i+1];){if(c[2*i]===o){const e=c[2*i+1]-1;if(s(p,r,e*t,t)){a=b[e];break}}i++,i>=x&&(i-=x)}a===y&&(c[2*i]=o,c[2*i+1]=n+1,y++),b[n]=a}if(0!==h&&1-y/u<h)return null;if(v){for(let e=d[Z-1];e<A.length;e++)A[e]=b[f[e]];b=(0,o.mi)(A)}const M=i?new Array(y):new Uint32Array(y*t);y=0;for(let e=0;e<w;e++)b[e]===y&&(a(p,(v?f[e]:e)*t,M,y*t,t),y++);if(f&&!v){const e=new Uint32Array(g);for(let t=0;t<e.length;t++)e[t]=b[f[t]];b=(0,o.mi)(e)}return{buffer:Array.isArray(M)?M:M.buffer,indices:b,uniqueCount:y}}function s(e,t,n,r){for(let o=0;o<r;o++)if(e[t+o]!==e[n+o])return!1;return!0}function a(e,t,n,r,o){for(let i=0;i<o;i++)n[r+i]=e[t+i]}function l(e,t,n){let r=0;for(let o=0;o<n;o++)r=e[t+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let c=null},87697:(e,t,n)=>{n.r(t),n.d(t,{assetMapFromAssetMapsJSON:()=>ze,extractMesh:()=>Ne,meshFeatureSetFromJSON:()=>Ue});var r,o,i=n(38171),s=n(92604),a=n(6570),l=n(43697),c=n(20102),u=n(3920),p=n(83379),h=n(609),f=n(95330),g=n(17445),d=n(5600),m=(n(75215),n(67676),n(80442),n(52011)),x=n(65617),y=n(9361),v=n(94139),w=n(38913),b=n(3709),A=n(62540),C=n(2674),T=n(71630),Z=n(95401),_=n(86662),M=n(83025),S=n(24882),F=n(47545);function R(e,t,n){const o=e.length,i=new Array(o),s=new Array(o),a=new Array(o);let l=0,c=0,u=0,p=0;for(let t=0;t<o;++t)p+=e[t].length;const h=(0,M.bg)(3*p);let f=0;for(let p=o-1;p>=0;p--){const g=e[p],d=n===r.CCW_IS_HOLE&&L(g);if(d&&1!==o)i[l++]=g;else{let e=g.length;for(let t=0;t<l;++t)e+=i[t].length;const n={index:f,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};n.pathLengths[0]=g.length,g.length>0&&(a[u++]={index:f,count:g.length}),f=d?D(g,g.length-1,-1,h,f,g.length,t):D(g,0,1,h,f,g.length,t);for(let e=0;e<l;++e){const r=i[e];n.holeIndices[e]=f,n.pathLengths[e+1]=r.length,r.length>0&&(a[u++]={index:f,count:r.length}),f=D(r,0,1,h,f,r.length,t)}l=0,n.count>0&&(s[c++]=n)}}for(let e=0;e<l;++e){const n=i[e];n.length>0&&(a[u++]={index:f,count:n.length}),f=D(n,0,1,h,f,n.length,t)}return s.length=c,a.length=u,{position:h,polygons:s,outlines:a}}function D(e,t,n,r,o,i,s){o*=3;for(let a=0;a<i;++a){const i=e[t];r[o++]=i[0],r[o++]=i[1],r[o++]=s?i[2]:0,t+=n}return o/3}function L(e){return!(0,_.bu)(e,!1,!1)}(o=r||(r={}))[o.NONE=0]="NONE",o[o.CCW_IS_HOLE=1]="CCW_IS_HOLE";var I=n(44547),E=n(13442),O=n(66459);const j=s.Z.getLogger("esri.geometry.support.meshUtils.centerAt");const P=(0,x.c)(),U=(0,x.c)();var N=n(17452);function z(e){const t=(0,N.Yd)(e.url);return n=>{const r=(0,N.PF)(n,t,t),o=r?r.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??n}}function k(e){const{assetUrl:t}=e;return new G(t)}function $(e){return G.fromBlob(e)}const W=/^(model\/gltf\+json)|(model\/gltf-binary)$/,H=/\.(gltf|glb)/i;function B(e){const t=new Map;let n=null;for(const{name:r,mimeType:o,source:i}of e)(null==n||W.test(o)||H.test(r))&&(n=i.url),t.set(r,i.url),i.files.forEach(((e,n)=>t.set(n,e)));if(null==n)throw new c.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new G(n,(()=>e.forEach((({source:e})=>e.dispose()))),t)}class G{constructor(e,t=(()=>{}),n=new Map){this.url=e,this.dispose=t,this.files=n}static fromBlob(e){const t=URL.createObjectURL(e);return new G(t,(()=>URL.revokeObjectURL(t)))}}var J=n(2368),V=n(46791),Y=n(84470);let q=class extends J.j{constructor(){super(),this.externalSources=new V.Z,this._explicitDisplaySource=null}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,Y.NZ)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&!this.externalSources.includes(e)&&this.externalSources.add(e)}clearSources(){this.displaySource=null,this.externalSources.removeAll()}get _implicitDisplaySource(){return this.externalSources.find(Y.NZ)}};(0,l._)([(0,d.Cb)()],q.prototype,"externalSources",void 0),(0,l._)([(0,d.Cb)()],q.prototype,"displaySource",null),(0,l._)([(0,d.Cb)()],q.prototype,"_implicitDisplaySource",null),(0,l._)([(0,d.Cb)()],q.prototype,"_explicitDisplaySource",void 0),q=(0,l._)([(0,m.j)("esri.geometry.support.meshUtils.Metadata")],q);var K=n(21787),X=n(46521),Q=n(13598),ee=n(17896),te=n(58995),ne=n(56493);function re(e,t){if(e)for(let n=0;n<e.length;n+=3)for(let r=0;r<3;r++)e[n+r]+=t[r]}const oe=(0,x.c)(),ie=(0,Q.c)(),se=(0,X.c)(),ae={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function le(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null==t)return;const n="number"==typeof t?[t,t,t]:[null!=t.width?t.width:1,null!=t.depth?t.depth:1,null!=t.height?t.height:1];he[0]=n[0],he[4]=n[1],he[8]=n[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)pe[n]=e.position[t+n];(0,ee.t)(pe,pe,he);for(let n=0;n<3;n++)e.position[t+n]=pe[n]}if(n[0]!==n[1]||n[1]!==n[2]){he[0]=1/n[0],he[4]=1/n[1],he[8]=1/n[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)pe[n]=e.normal[t+n];(0,ee.t)(pe,pe,he),(0,ee.n)(pe,pe);for(let n=0;n<3;n++)e.normal[t+n]=pe[n]}}}(e,n?.size);const{vertexAttributes:r,transform:o}=(0,O.w1)(e,t,n);return{vertexAttributes:new T.Q({...r,uv:e.uv}),transform:o,components:[new A.Z({faces:e.faces,material:n&&n.material||null})],spatialReference:t.spatialReference}}const ce={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},ue={south:0,east:1,north:2,west:3,up:4,down:5},pe=(0,x.c)(),he=(0,X.c)();var fe=n(52138);const ge=s.Z.getLogger("esri.geometry.support.meshUtils.rotate");function de(e,t,n,r=x.Z){if(null!=e){(0,fe.d)(ve,(0,b.WH)(t),(0,b.ZZ)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)me[n]=e[t+n]-r[n];(0,ee.m)(me,me,ve);for(let n=0;n<3;n++)e[t+n]=me[n]+r[n]}}}const me=(0,x.c)(),xe=(0,x.c)(),ye=(0,b.Ue)(),ve=(0,Q.c)(),we=(0,X.c)(),be=(0,x.c)(),Ae=s.Z.getLogger("esri.geometry.support.meshUtils.scale");function Ce(e,t,n=x.Z){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)Te[t]=e[r+t]-n[t];(0,ee.g)(Te,Te,t);for(let t=0;t<3;t++)e[r+t]=Te[t]+n[t]}}const Te=(0,x.c)(),Ze=(0,x.c)(),_e=(0,x.c)();var Me;const Se="esri.geometry.Mesh";let Fe=Me=class extends((0,u.p)(p.Z.LoadableMixin((0,h.v)(y.Z)))){constructor(e){super(e),this.components=null,this.transform=null,this.metadata=new q,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new T.Q,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.handles.add((0,g.YP)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _boundingInfo(){const e=this.vertexAttributes.position,t=this.spatialReference;if(0===e.length||this.components&&0===this.components.length)return{extent:new a.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t}),center:new v.Z({x:0,y:0,z:0,spatialReference:t})};const n=null!=this.transform?this.transform.project(e,t):e;let r=1/0,o=1/0,i=1/0,s=-1/0,l=-1/0,c=-1/0,u=0,p=0,h=0;const f=n.length,g=1/(f/3);let d=0;for(;d<f;){const e=n[d++],t=n[d++],a=n[d++];r=Math.min(r,e),o=Math.min(o,t),i=Math.min(i,a),s=Math.max(s,e),l=Math.max(l,t),c=Math.max(c,a),u+=g*e,p+=g*t,h+=g*a}return{extent:new a.Z({xmin:r,ymin:o,zmin:i,xmax:s,ymax:l,zmax:c,spatialReference:t}),center:new v.Z({x:u,y:p,z:h,spatialReference:t})}}get anchor(){if(null!=this.transform)return this.transform.getOriginPoint(this.spatialReference);const e=this._boundingInfo;return new v.Z({x:e.center.x,y:e.center.y,z:e.extent.zmin,spatialReference:this.spatialReference})}get origin(){return null!=this.transform?this.transform.getOriginPoint(this.spatialReference):this._boundingInfo.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._boundingInfo.extent:this.metadata.displaySource.extent.clone()}addComponent(e){this.loaded?(this.components||(this.components=[]),this.components.push(A.Z.from(e)),this.notifyChange("components")):s.Z.getLogger(this.declaredClass).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(e){if(this.loaded){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.Z.getLogger(this.declaredClass).error("removeComponent()","Provided component is not part of the list of components")}else s.Z.getLogger(this.declaredClass).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(e,t,n,r){return(0,b.qw)(e,t,n,De),function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position||0===t[3])return;const r=e.spatialReference;if(null!=e.transform){null!=n?.geographic&&n.geographic!==e.transform.geographic&&ge.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${e.transform.geographic}) is not supported`);const o=n?.origin??e.transform.getOriginPoint(r);!function(e,t,n){const r=(0,ee.s)(me,n.x,n.y,n.z),o=(0,ee.b)(me,r,e.origin);e.applyLocalInverse(o,xe),e.rotation=(0,b.qC)(e.rotation,t,(0,b.Ue)()),e.applyLocalInverse(o,o),(0,ee.b)(o,o,xe),e.translation=(0,ee.a)((0,x.c)(),e.translation,o)}(e.transform,t,o)}else{const r=n?.origin??e.origin;(0,E.h)(e.spatialReference,n)?function(e,t,n){const r=e.spatialReference,o=(0,te.rS)(r),i=be;(0,I.KC)(n,i,o)||(0,I.KC)(e.origin,i,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,p=null!=l?new Float32Array(l.length):null;(0,I.Bm)(o,i,ve,o),(0,K.f)(we,ve);const h=ye;(0,ee.t)((0,b.ZZ)(ye),(0,b.ZZ)(t),we),h[3]=t[3],(0,ne.XO)(s,r,c),null!=a&&null!=u&&(0,ne.Iz)(a,s,c,r,u),null!=l&&null!=p&&(0,ne.wi)(l,s,c,r,p),de(c,h,3,i),(0,ne.To)(c,s,r),null!=a&&null!=u&&(de(u,h,3),(0,ne.Yk)(u,s,c,r,a)),null!=l&&null!=p&&(de(p,h,4),(0,ne.M2)(p,s,c,r,l)),e.vertexAttributesChanged()}(e,t,r):function(e,t,n){const r=be;if(!(0,I.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,ge.error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}).`)}de(e.vertexAttributes.position,t,3,r),de(e.vertexAttributes.normal,t,3),de(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,r)}}(this,De,r),this}offset(e,t,n,r){return this.loaded?(Re[0]=e,Re[1]=t,Re[2]=n,function(e,t,n){e.vertexAttributes&&e.vertexAttributes.position&&(null!=e.transform?(null!=n?.geographic&&n.geographic!==e.transform.geographic&&s.Z.getLogger("esri.geometry.support.meshUtils.offset").warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${e.transform.geographic}) is not supported`),function(e,t){const n=e.origin;e.origin=(0,ee.a)((0,x.c)(),n,t)}(e.transform,t)):(0,E.h)(e.spatialReference,n)?function(e,t){const n=e.spatialReference,r=e.vertexAttributes.position,o=e.vertexAttributes.normal,i=e.vertexAttributes.tangent,s=new Float64Array(r.length),a=null!=o?new Float32Array(o.length):null,l=null!=i?new Float32Array(i.length):null,c=e.extent.center,u=oe;(0,I.Bm)(n,[c.x,c.y,c.z],ie,(0,te.rS)(n)),(0,K.f)(se,ie),(0,ee.t)(u,t,se),(0,ne.XO)(r,n,s),null!=o&&null!=a&&(0,ne.Iz)(o,r,s,n,a),null!=i&&null!=l&&(0,ne.wi)(i,r,s,n,l),re(s,u),(0,ne.To)(s,r,n),null!=o&&null!=a&&(0,ne.Yk)(a,r,s,n,o),null!=i&&null!=l&&(0,ne.M2)(l,r,s,n,i),e.vertexAttributesChanged()}(e,t):function(e,t){re(e.vertexAttributes.position,t),e.vertexAttributesChanged()}(e,t))}(this,Re,r),this):(s.Z.getLogger(this.declaredClass).error("offset()","Mesh must be loaded before applying operations"),this)}scale(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const r=e.spatialReference;if(null!=e.transform){null!=n?.geographic&&n.geographic!==e.transform.geographic&&Ae.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${e.transform.geographic}) is not supported`);const o=n?.origin??e.transform.getOriginPoint(r);!function(e,t,n){const r=(0,ee.s)(Te,n.x,n.y,n.z),o=(0,ee.b)(Te,r,e.origin);e.applyLocalInverse(o,Ze);const i=(0,ee.g)((0,x.c)(),e.scale,t);e.scale=i,e.applyLocalInverse(o,o),(0,ee.b)(o,o,Ze),e.translation=(0,ee.a)((0,x.c)(),e.translation,o)}(e.transform,t,o)}else{const r=(0,E.h)(e.spatialReference,n),o=n&&n.origin||e.origin;r?function(e,t,n){const r=e.spatialReference,o=(0,te.rS)(r),i=_e;(0,I.KC)(n,i,o)||(0,I.KC)(e.origin,i,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,p=null!=l?new Float32Array(l.length):null;(0,ne.XO)(s,r,c),null!=a&&null!=u&&(0,ne.Iz)(a,s,c,r,u),null!=l&&null!=p&&(0,ne.wi)(l,s,c,r,p),Ce(c,t,i),(0,ne.To)(c,s,r),null!=a&&null!=u&&(0,ne.Yk)(u,s,c,r,a),null!=l&&null!=p&&(0,ne.M2)(p,s,c,r,l),e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=_e;if(!(0,I.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,Ae.error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}).`)}Ce(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,o)}}(this,e,t),this):(s.Z.getLogger(this.declaredClass).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const r=n?.origin??e.origin;null!=e.transform?(null!=n?.geographic&&n.geographic!==e.transform.geographic&&j.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${e.transform.geographic}) is not supported`),function(e,t,n){const r=t.x-n.x,o=t.y-n.y,i=t.hasZ&&n.hasZ?t.z-n.z:0,s=e.origin;e.origin=[s[0]+r,s[1]+o,s[2]+i]}(e.transform,t,r)):(0,E.h)(e.spatialReference,n)?function(e,t,n){const r=(0,O.FF)(e.vertexAttributes,n,{geographic:!0}),{position:o,normal:i,tangent:s}=(0,O.iv)(r,t,{geographic:!0});e.vertexAttributes.position=o,e.vertexAttributes.normal=i,e.vertexAttributes.tangent=s,e.vertexAttributesChanged()}(e,t,r):function(e,t,n){const r=U,o=P;if((0,I.KC)(t,o,e.spatialReference)){if(!(0,I.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,j.error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}).`)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let o=0;o<3;o++)e[r+o]+=t[o]-n[o]})(e.vertexAttributes.position,o,r),e.vertexAttributesChanged()}else j.error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid})`)}(e,t,r)}(this,e,t),this):(s.Z.getLogger(this.declaredClass).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){const{source:o}=t,{loadGLTFMesh:i}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r),s=function(e){if(Array.isArray(e)){if(!e.length)throw new c.Z("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?B(e.map((e=>({name:e.name,mimeType:e.type,source:$(e)})))):function(e){return B(e.map((e=>({name:e.assetName,mimeType:e.assetMimeType,source:k(e)}))))}(e)}return e instanceof File?$(e):k(e)}(o),a=i(new v.Z({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:z(s),useTransform:!0,signal:r?.signal});a.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:l,components:u}=await a;e.vertexAttributes=l,e.components=u}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){let e=null;if(this.components){const t=new Map,n=new Map;e=this.components.map((e=>e.cloneWithDeduplication(t,n)))}const t={components:e,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),transform:null!=this.transform?this.transform.clone():null,metadata:this.metadata.clone()};return new Me(t)}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=n.e(7277).then(n.bind(n,7277)),r=this.load(),o=await Promise.all([t,r]),{toBinaryGLTF:i}=o[0];return i(this,e)}_clearSources(){this.metadata.clearSources()}static createBox(e,t){if(!(e instanceof v.Z))return s.Z.getLogger(Se).error(".createBox()","expected location to be a Point instance"),null;const n=new Me(le(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=ce,r=4*e.length,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,p=0;for(let r=0;r<e.length;r++){const h=e[r],f=l/3;for(const e of t)a[p++]=f+e;const g=h.corners;for(let e=0;e<4;e++){const t=g[e];let r=0;s[u++]=.25*n[e][0]+h.uvOrigin[0],s[u++]=h.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0!==h.axis[e]?(o[l++]=.5*h.axis[e],i[c++]=h.axis[e]):(o[l++]=.5*t[r++],i[c++]=0)}}return{position:o,normal:i,uv:s,faces:a}}(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?function(e,t){const n=e.components[0],r=n.faces,o=ue[t],i=6*o,s=new Array(6),a=new Array(r.length-6);let l=0,c=0;for(let e=0;e<r.length;e++)e>=i&&e<i+6?s[l++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),n=4*o*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new A.Z({faces:s,material:n.material}),new A.Z({faces:a})],e}(n,t.imageFace):n}static createSphere(e,t){return e instanceof v.Z?new Me(le(function(e=0){const t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((t-1)*n*2*3);let l=0,c=0,u=0,p=0;for(let e=0;e<=t;e++){const r=e/t*Math.PI+.5*Math.PI,h=Math.cos(r),f=Math.sin(r);pe[2]=f;const g=0===e||e===t,d=g?n-1:n;for(let r=0;r<=d;r++){const f=r/d*2*Math.PI;pe[0]=-Math.sin(f)*h,pe[1]=Math.cos(f)*h;for(let e=0;e<3;e++)o[l]=.5*pe[e],i[l]=pe[e],++l;s[c++]=(r+(g?.5:0))/n,s[c++]=e/t,0!==e&&r!==n&&(e!==t&&(a[u++]=p,a[u++]=p+1,a[u++]=p-n),1!==e&&(a[u++]=p,a[u++]=p-n,a[u++]=p-n-1)),p++}}return{position:o,normal:i,uv:s,faces:a}}(t&&t.densificationFactor||0),e,t)):(s.Z.getLogger(Se).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(e,t){return e instanceof v.Z?new Me(le(function(e=0){const t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),o=new Float32Array(3*n),i=new Float32Array(2*n),s=new Uint32Array(4*t*3);let a=0,l=0,c=0,u=0,p=0;for(let e=0;e<=5;e++){const n=0===e||5===e,h=e<=1||e>=4,f=2===e||4===e,g=n?t-1:t;for(let d=0;d<=g;d++){const m=d/g*2*Math.PI,x=n?0:.5;pe[0]=x*Math.sin(m),pe[1]=x*-Math.cos(m),pe[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[a++]=pe[t],o[l++]=h?2===t?e<=1?1:-1:0:2===t?0:pe[t]/x;i[c++]=(d+(n?.5:0))/t,i[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,f||0===e||d===t||(5!==e&&(s[u++]=p,s[u++]=p+1,s[u++]=p-t),1!==e&&(s[u++]=p,s[u++]=p-t,s[u++]=p-t-1)),p++}}return{position:r,normal:o,uv:i,faces:s}}(t&&t.densificationFactor||0),e,t)):(s.Z.getLogger(Se).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(e,t){if(!(e instanceof v.Z))return s.Z.getLogger(Se).error(".createPlane()","expected location to be a Point instance"),null;const n=t?.facing??"up",r=function(e,t){const n="number"==typeof t?t:null!=t?t.width:1,r="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,t?.size);return new Me(le(function(e){const t=ae.facingAxisOrderSwap[e],n=ae.position,r=ae.normal,o=new Float64Array(n.length),i=new Float32Array(r.length);let s=0;for(let e=0;e<4;e++){const e=s;for(let a=0;a<3;a++){const l=t[a],c=Math.abs(l)-1,u=l>=0?1:-1;o[s]=n[e+c]*u,i[s]=r[e+c]*u,s++}}return{position:o,normal:i,uv:new Float32Array(ae.uv),faces:new Uint32Array(ae.faces),isPlane:!0}}(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof w.Z))return s.Z.getLogger(Se).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const n=function(e){const t=R(e.rings,e.hasZ,r.CCW_IS_HOLE),n=new Array;let o=0,i=0;for(const e of t.polygons){const r=e.count,s=e.index,a=(0,M.Rq)(t.position,3*s,3*r),l=e.holeIndices.map((e=>e-s)),c=(0,S.mi)((0,Z.e)(a,l,3));n.push({position:a,faces:c}),o+=a.length,i+=c.length}const s=function(e,t,n){if(1===e.length)return e[0];const r=(0,M.bg)(t),o=new Array(n);let i=0,s=0,a=0;for(const t of e){for(let e=0;e<t.position.length;e++)r[i++]=t.position[e];for(const e of t.faces)o[s++]=e+a;a=i/3}return{position:r,faces:(0,S.mi)(o)}}(n,o,i),a=Array.isArray(s.position)?(0,F.d)(s.position,3,{originalIndices:s.faces}):(0,F.d)(s.position.buffer,6,{originalIndices:s.faces});return s.position=(0,M.QZ)(new Float64Array(a.buffer)),s.faces=a.indices,s}(e);return new Me({vertexAttributes:new T.Q({position:n.position}),components:[new A.Z({faces:n.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference})}static async createFromGLTF(e,t,r){if(!(e instanceof v.Z))throw s.Z.getLogger(Se).error(".createfromGLTF()","expected location to be a Point instance"),new c.Z("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:o}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r);return new Me(await o(e,t,r))}static createWithExternalSource(e,t,n){const r=n?.extent??null,o=n?.transform?.clone()??new C.Z;o.origin=[e.x,e.y,e.z??0];const i=e.spatialReference,s={source:t,extent:r},a=new q;return a.externalSources.push(s),new Me({metadata:a,transform:o,spatialReference:i})}static createIncomplete(e,t){const n=t?.transform?.clone()??new C.Z;n.origin=[e.x,e.y,e.z??0];const r=e.spatialReference,o=new Me({transform:n,spatialReference:r});return o.addResolvingPromise(Promise.reject(new c.Z("mesh-incomplete","Mesh resources are not complete"))),o}};(0,l._)([(0,d.Cb)({type:[A.Z],json:{write:!0}})],Fe.prototype,"components",void 0),(0,l._)([(0,d.Cb)({type:C.Z,json:{write:!0}})],Fe.prototype,"transform",void 0),(0,l._)([(0,d.Cb)({constructOnly:!0})],Fe.prototype,"metadata",void 0),(0,l._)([(0,d.Cb)({readOnly:!0})],Fe.prototype,"hasExtent",null),(0,l._)([(0,d.Cb)({readOnly:!0})],Fe.prototype,"_boundingInfo",null),(0,l._)([(0,d.Cb)({readOnly:!0})],Fe.prototype,"anchor",null),(0,l._)([(0,d.Cb)({readOnly:!0})],Fe.prototype,"origin",null),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],Fe.prototype,"extent",null),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Fe.prototype,"hasZ",void 0),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Fe.prototype,"hasM",void 0),(0,l._)([(0,d.Cb)({type:T.Q,nonNullable:!0,json:{write:!0}})],Fe.prototype,"vertexAttributes",void 0),Fe=Me=(0,l._)([(0,m.j)(Se)],Fe);const Re=(0,x.c)(),De=(0,b.Ue)(),Le=Fe;var Ie,Ee,Oe=n(82971),je=n(2981),Pe=n(74889);function Ue(e,t,n){const r=n.features;n.features=[],delete n.geometryType;const o=Pe.Z.fromJSON(n);if(o.geometryType="mesh",!n.assetMaps)return o;const s=ze(t,n.assetMaps),a=o.spatialReference??Oe.Z.WGS84,l=n.globalIdFieldName,{outFields:c}=e,u=null!=c&&c.length>0?(p=c.includes("*")?null:new Set(c),({attributes:e})=>{if(!e)return{};if(!p)return e;for(const t in e)p.has(t)||delete e[t];return e}):()=>({});var p;for(const e of r){const n=Ne(e,l,a,t,s);null!=n&&o.features.push(new i.Z({geometry:n,attributes:u(e)}))}return o}function Ne(e,t,n,r,o){const i=e.attributes[t],s=o.get(i);if(null==s||s.status===Ie.FAILED||null==s.url)return null;const l=function({attributes:e},t,{transformFieldRoles:n}){return new v.Z({x:e[n.originX],y:e[n.originY],z:e[n.originZ],spatialReference:t})}(e,n,r),c=a.Z.fromJSON(e.geometry);c.spatialReference=n;const u=function(e,{transformFieldRoles:t},n){return new C.Z({translation:[e[t.translationX],-e[t.translationZ],e[t.translationY]],rotation:(0,b.uT)([e[t.rotationX],e[t.rotationZ],e[t.rotationY]],e[t.rotationDeg]),scale:[e[t.scaleX],e[t.scaleY],e[t.scaleZ]],geographic:n})}(e.attributes,r,s.projectVertices);return s.status===Ie.PENDING?Le.createIncomplete(l,{extent:c,transform:u}):Le.createWithExternalSource(l,function(e){return{assetUrl:e.url,assetName:e.name,assetHash:e.hash,assetMimeType:e.mimeType}}(s),{extent:c,transform:u})}function ze(e,t){const n=new Map;for(const r of t){const t=r.parentGlobalId;if(null==t)continue;const o=r.assetName,i=r.assetType,a=r.assetHash,l=r.assetURL,c=r.conversionStatus,u=(0,je.rm)(i,e.supportedFormats);if(!u){s.Z.getLogger("esri.rest.support.meshFeatureSet").error("mesh-feature-set:unknown-format",`Service returned an asset of type ${i}, but it does not list it as a supported type`);continue}let p=n.get(t);if(null==p)switch(p={name:o,type:i,mimeType:u,hash:a,status:Ie.FAILED,url:l,projectVertices:ke(r.flags).projectVertices},n.set(t,p),c){case"COMPLETED":case"SUBMITTED":p.status=Ie.COMPLETED;break;case"INPROGRESS":p.status=Ie.PENDING;break;default:p.status=Ie.FAILED}else console.warn(`Multiple asset parts not expected. Ignoring additional parts. conflicting assetname: ${r.assetName}`)}return n}function ke(e){return{projectVertices:e.includes("PROJECT_VERTICES")}}(Ee=Ie||(Ie={}))[Ee.FAILED=0]="FAILED",Ee[Ee.PENDING=1]="PENDING",Ee[Ee.COMPLETED=2]="COMPLETED"}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2134],{42134:(e,r,t)=>{t.r(r),t.d(r,{clearBoundingBoxCache:()=>y,computeIconLayerResourceSize:()=>p,computeLayerResourceSize:()=>f,computeLayerSize:()=>m,computeObjectLayerResourceSize:()=>h});var n=t(3172),o=t(20102),i=t(74669),u=t(70586),s=t(60437),c=t(45119);let a=l();function l(){return new i.Z(50)}function y(){a=l()}function f(e,r){if("icon"===e.type)return p(e,r);if("object"===e.type)return h(e,r);throw new o.Z("symbol3d:unsupported-symbol-layer","computeLayerSize only works with symbol layers of type Icon and Object")}async function m(e,r){if("icon"===e.type)return function(e,r){return p(e,r).then((r=>{if(null==e.size)return r;const t=r[0]/r[1];return t>1?[e.size,e.size/t]:[e.size*t,e.size]}))}(e,r);if("object"===e.type)return async function(e,r){const t=await h(e,r);return(0,c.$K)(t,e)}(e,r);throw new o.Z("symbol3d:unsupported-symbol-layer","computeLayerSize only works with symbol layers of type Icon and Object")}async function p(e,r){if(e.resource?.href)return(t=e.resource.href,(0,n.default)(t,{responseType:"image"}).then((e=>e.data))).then((e=>[e.width,e.height]));var t;if(e.resource?.primitive)return null!=r?[r,r]:[256,256];throw new o.Z("symbol3d:invalid-symbol-layer","symbol layers of type Icon must have either an href or a primitive resource")}function h(e,r){return async function(e,r){if(!e.isPrimitive){const r=(0,u.s3)(e.resource?.href),n=a.get(r);if(void 0!==n)return n;const o=await Promise.all([t.e(6481),t.e(5590),t.e(7681),t.e(8598),t.e(723)]).then(t.bind(t,70723)),i=await o.fetch(r,{disableTextures:!0});return a.put(r,i.referenceBoundingBox),i.referenceBoundingBox}let n=null;if(e.resource&&e.resource.primitive&&(n=(0,s.Ue)((0,c.Uz)(e.resource.primitive)),null!=r))for(let e=0;e<n.length;e++)n[e]*=r;return n?Promise.resolve(n):Promise.reject(new o.Z("symbol:invalid-resource","The symbol does not have a valid resource"))}(e,r).then((e=>(0,s.dp)(e)))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6188,3172,9880],{99880:(e,t,n)=>{n.d(t,{V:()=>l});var r=n(68773),s=(n(3172),n(20102)),i=n(92604),a=n(17452);const o=i.Z.getLogger("esri.assets");function l(e){if(!r.default.assetsPath)throw o.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new s.Z("assets:path-not-set","config.assetsPath is not set");return(0,a.v_)(r.default.assetsPath,e)}},46851:(e,t,n)=>{n.d(t,{R:()=>i,a:()=>c,g:()=>s,t:()=>l});let r=1e-6;function s(){return r}const i=Math.random,a=Math.PI/180,o=180/Math.PI;function l(e){return e*a}function c(e){return e*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(e,t){return Math.abs(e-t)<=r*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:s,setEpsilon:function(e){r=e},toDegree:c,toRadian:l},Symbol.toStringTag,{value:"Module"}))},17896:(e,t,n)=>{n.d(t,{A:()=>d,C:()=>h,D:()=>u,a:()=>l,b:()=>c,c:()=>a,d:()=>y,e:()=>_,f:()=>m,g:()=>f,h:()=>b,i:()=>p,j:()=>A,k:()=>v,l:()=>i,m:()=>I,n:()=>x,p:()=>g,q:()=>M,r:()=>P,s:()=>o,t:()=>w,u:()=>S});var r=n(65617),s=n(46851);function i(e){const t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function o(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function l(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function c(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function h(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function u(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function f(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function d(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}function p(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2];return Math.sqrt(n*n+r*r+s*s)}function y(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2];return n*n+r*r+s*s}function g(e){const t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}function x(e,t){const n=t[0],r=t[1],s=t[2];let i=n*n+r*r+s*s;return i>0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i),e}function _(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function m(e,t,n){const r=t[0],s=t[1],i=t[2],a=n[0],o=n[1],l=n[2];return e[0]=s*l-i*o,e[1]=i*a-r*l,e[2]=r*o-s*a,e}function b(e,t,n,r){const s=t[0],i=t[1],a=t[2];return e[0]=s+r*(n[0]-s),e[1]=i+r*(n[1]-i),e[2]=a+r*(n[2]-a),e}function I(e,t,n){const r=t[0],s=t[1],i=t[2];return e[0]=n[0]*r+n[4]*s+n[8]*i+n[12],e[1]=n[1]*r+n[5]*s+n[9]*i+n[13],e[2]=n[2]*r+n[6]*s+n[10]*i+n[14],e}function w(e,t,n){const r=t[0],s=t[1],i=t[2];return e[0]=r*n[0]+s*n[3]+i*n[6],e[1]=r*n[1]+s*n[4]+i*n[7],e[2]=r*n[2]+s*n[5]+i*n[8],e}function M(e,t,n){const r=n[0],s=n[1],i=n[2],a=n[3],o=t[0],l=t[1],c=t[2];let h=s*c-i*l,u=i*o-r*c,f=r*l-s*o,d=s*f-i*u,p=i*h-r*f,y=r*u-s*h;const g=2*a;return h*=g,u*=g,f*=g,d*=2,p*=2,y*=2,e[0]=o+h+d,e[1]=l+u+p,e[2]=c+f+y,e}const T=(0,r.c)(),k=(0,r.c)();function v(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function P(e,t,n){const r=n[0]-t[0],s=n[1]-t[1],i=n[2]-t[2];let a=r*r+s*s+i*i;return a>0?(a=1/Math.sqrt(a),e[0]=r*a,e[1]=s*a,e[2]=i*a,e):(e[0]=0,e[1]=0,e[2]=0,e)}const L=c,E=h,D=u,A=p,B=y,S=i,V=g;Object.freeze(Object.defineProperty({__proto__:null,abs:function(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e},add:l,angle:function(e,t){a(T,e),a(k,t),x(T,T),x(k,k);const n=_(T,k);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(e,t,n,r,s,i){const a=1-i,o=a*a,l=i*i,c=o*a,h=3*i*o,u=3*l*a,f=l*i;return e[0]=t[0]*c+n[0]*h+r[0]*u+s[0]*f,e[1]=t[1]*c+n[1]*h+r[1]*u+s[1]*f,e[2]=t[2]*c+n[2]*h+r[2]*u+s[2]*f,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},copy:a,cross:m,direction:P,dist:A,distance:p,div:D,divide:u,dot:_,equals:function(e,t){if(e===t)return!0;const n=e[0],r=e[1],i=e[2],a=t[0],o=t[1],l=t[2],c=(0,s.g)();return Math.abs(n-a)<=c*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-o)<=c*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-l)<=c*Math.max(1,Math.abs(i),Math.abs(l))},exactEquals:v,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,n,r,s,i){const a=i*i,o=a*(2*i-3)+1,l=a*(i-2)+i,c=a*(i-1),h=a*(3-2*i);return e[0]=t[0]*o+n[0]*l+r[0]*c+s[0]*h,e[1]=t[1]*o+n[1]*l+r[1]*c+s[1]*h,e[2]=t[2]*o+n[2]*l+r[2]*c+s[2]*h,e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e},len:S,length:i,lerp:b,max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e},mul:E,multiply:h,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e},normalize:x,random:function(e,t){t=t||1;const n=s.R,r=2*n()*Math.PI,i=2*n()-1,a=Math.sqrt(1-i*i)*t;return e[0]=Math.cos(r)*a,e[1]=Math.sin(r)*a,e[2]=i*t,e},rotateX:function(e,t,n,r){const s=[],i=[];return s[0]=t[0]-n[0],s[1]=t[1]-n[1],s[2]=t[2]-n[2],i[0]=s[0],i[1]=s[1]*Math.cos(r)-s[2]*Math.sin(r),i[2]=s[1]*Math.sin(r)+s[2]*Math.cos(r),e[0]=i[0]+n[0],e[1]=i[1]+n[1],e[2]=i[2]+n[2],e},rotateY:function(e,t,n,r){const s=[],i=[];return s[0]=t[0]-n[0],s[1]=t[1]-n[1],s[2]=t[2]-n[2],i[0]=s[2]*Math.sin(r)+s[0]*Math.cos(r),i[1]=s[1],i[2]=s[2]*Math.cos(r)-s[0]*Math.sin(r),e[0]=i[0]+n[0],e[1]=i[1]+n[1],e[2]=i[2]+n[2],e},rotateZ:function(e,t,n,r){const s=[],i=[];return s[0]=t[0]-n[0],s[1]=t[1]-n[1],s[2]=t[2]-n[2],i[0]=s[0]*Math.cos(r)-s[1]*Math.sin(r),i[1]=s[0]*Math.sin(r)+s[1]*Math.cos(r),i[2]=s[2],e[0]=i[0]+n[0],e[1]=i[1]+n[1],e[2]=i[2]+n[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:f,scaleAndAdd:d,set:o,sign:function(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e},sqrDist:B,sqrLen:V,squaredDistance:y,squaredLength:g,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:L,subtract:c,transformMat3:w,transformMat4:I,transformQuat:M},Symbol.toStringTag,{value:"Module"}))},65617:(e,t,n)=>{function r(){return[0,0,0]}function s(e){return[e[0],e[1],e[2]]}function i(e,t,n){return[e,t,n]}function a(e){const t=[0,0,0],n=Math.min(3,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t}function o(e,t){return new Float64Array(e,t,3)}function l(){return i(1,1,1)}function c(){return i(1,0,0)}function h(){return i(0,1,0)}function u(){return i(0,0,1)}n.d(t,{O:()=>d,U:()=>g,Z:()=>f,a:()=>s,b:()=>o,c:()=>r,d:()=>p,e:()=>y,f:()=>i,g:()=>a});const f=[0,0,0],d=l(),p=c(),y=h(),g=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:p,UNIT_Y:y,UNIT_Z:g,ZEROS:f,clone:s,create:r,createView:o,fromArray:a,fromValues:i,ones:l,unitX:c,unitY:h,unitZ:u,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},98766:(e,t,n)=>{n.d(t,{a:()=>a,b:()=>h,c:()=>s,d:()=>g,e:()=>d,f:()=>p,g:()=>_,h:()=>m,l:()=>x,n:()=>y,s:()=>i});var r=n(46851);function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function i(e,t,n,r,s){return e[0]=t,e[1]=n,e[2]=r,e[3]=s,e}function a(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function o(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}function l(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e}function c(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e[3]=t[3]/n[3],e}function h(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function u(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return Math.sqrt(n*n+r*r+s*s+i*i)}function f(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return n*n+r*r+s*s+i*i}function d(e){const t=e[0],n=e[1],r=e[2],s=e[3];return Math.sqrt(t*t+n*n+r*r+s*s)}function p(e){const t=e[0],n=e[1],r=e[2],s=e[3];return t*t+n*n+r*r+s*s}function y(e,t){const n=t[0],r=t[1],s=t[2],i=t[3];let a=n*n+r*r+s*s+i*i;return a>0&&(a=1/Math.sqrt(a),e[0]=n*a,e[1]=r*a,e[2]=s*a,e[3]=i*a),e}function g(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function x(e,t,n,r){const s=t[0],i=t[1],a=t[2],o=t[3];return e[0]=s+r*(n[0]-s),e[1]=i+r*(n[1]-i),e[2]=a+r*(n[2]-a),e[3]=o+r*(n[3]-o),e}function _(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function m(e,t){const n=e[0],s=e[1],i=e[2],a=e[3],o=t[0],l=t[1],c=t[2],h=t[3],u=(0,r.g)();return Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))&&Math.abs(i-c)<=u*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(a-h)<=u*Math.max(1,Math.abs(a),Math.abs(h))}const b=o,I=l,w=c,M=u,T=f,k=d,v=p;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:s,dist:M,distance:u,div:w,divide:c,dot:g,equals:m,exactEquals:_,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:k,length:d,lerp:x,max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.min(t[3],n[3]),e},mul:I,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:y,random:function(e,t){const n=r.R;let s,i,a,o,l,c;t=t||1;do{s=2*n()-1,i=2*n()-1,l=s*s+i*i}while(l>=1);do{a=2*n()-1,o=2*n()-1,c=a*a+o*o}while(c>=1);const h=Math.sqrt((1-l)/c);return e[0]=t*s,e[1]=t*i,e[2]=t*a*h,e[3]=t*o*h,e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e},scale:h,scaleAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e},set:i,sqrDist:T,sqrLen:v,squaredDistance:f,squaredLength:p,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:b,subtract:o,transformMat4:function(e,t,n){const r=t[0],s=t[1],i=t[2],a=t[3];return e[0]=n[0]*r+n[4]*s+n[8]*i+n[12]*a,e[1]=n[1]*r+n[5]*s+n[9]*i+n[13]*a,e[2]=n[2]*r+n[6]*s+n[10]*i+n[14]*a,e[3]=n[3]*r+n[7]*s+n[11]*i+n[15]*a,e},transformQuat:function(e,t,n){const r=t[0],s=t[1],i=t[2],a=n[0],o=n[1],l=n[2],c=n[3],h=c*r+o*i-l*s,u=c*s+l*r-a*i,f=c*i+a*s-o*r,d=-a*r-o*s-l*i;return e[0]=h*c+d*-a+u*-l-f*-o,e[1]=u*c+d*-o+f*-a-h*-l,e[2]=f*c+d*-l+h*-o-u*-a,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},3894:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(71143);function s(e){e.length=0}class i{constructor(e=50,t=50){this._pool=new r.Z(Array,void 0,s,t,e)}acquire(){return this._pool.acquire()}release(e){this._pool.release(e)}prune(){this._pool.prune(0)}static acquire(){return a.acquire()}static release(e){return a.release(e)}static prune(){a.prune()}}const a=new i(100)},30175:(e,t,n)=>{function r(e,t,n){const r=e.get(t);if(void 0!==r)return r;const s=n();return e.set(t,s),s}n.d(t,{s1:()=>r})},71143:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t,n,r=1,s=0){if(this._ctor=e,this._acquireFunction=t,this._releaseFunction=n,this.allocationSize=r,this._pool=new Array(s),this._initialSize=s,this._ctor)for(let e=0;e<s;e++)this._pool[e]=new this._ctor;this.allocationSize=Math.max(r,1)}destroy(){this.prune(0)}acquire(...e){let t;if(r.test.disabled)t=new this._ctor;else{if(0===this._pool.length){const e=this.allocationSize;for(let t=0;t<e;t++)this._pool[t]=new this._ctor}t=this._pool.pop()}return this._acquireFunction?this._acquireFunction(t,...e):function(e){return e&&e.acquire&&"function"==typeof e.acquire}(t)&&t.acquire(...e),t}release(e){var t;e&&!r.test.disabled&&(this._releaseFunction?this._releaseFunction(e):(t=e)&&t.release&&"function"==typeof t.release&&e.release(),this._pool.push(e))}prune(e=this._initialSize){if(!(e>=this._pool.length)){for(let t=e;t<this._pool.length;++t){const e=this._pool[t];this._dispose(e)}this._pool.length=e}}_dispose(e){e.dispose&&"function"==typeof e.dispose&&e.dispose()}}r.test={disabled:!1}},75215:(e,t,n)=>{n.d(t,{AY:()=>D,Iu:()=>M,Ls:()=>b,N7:()=>P,TJ:()=>g,V5:()=>E,Zs:()=>l,di:()=>T,gB:()=>k,i$:()=>v,q9:()=>c,rY:()=>I,sY:()=>A,se:()=>m,vU:()=>h,z8:()=>L}),n(80442);var r=n(92604),s=n(30175);const i=r.Z.getLogger("esri.core.accessorSupport.ensureTypes");function a(e){return null==e?e:new Date(e)}function o(e){return null==e?e:!!e}function l(e){return null==e?e:e.toString()}function c(e){return null==e?e:(e=parseFloat(e),isNaN(e)?0:e)}function h(e){return null==e?e:Math.round(parseFloat(e))}function u(e){return e&&e.constructor&&void 0!==e.constructor.__accessorMetadata__}function f(e,t){return null!=t&&e&&!(t instanceof e)}function d(e){return e&&"isCollection"in e}function p(e){return e&&e.Type?"function"==typeof e.Type?e.Type:e.Type.base:null}function y(e,t){return!!u(t)&&(i.error("Accessor#set","Assigning an instance of '"+(t.declaredClass||"unknown")+"' which is not a subclass of '"+x(e)+"'"),!0)}function g(e,t){return null==t?t:d(e)?function(e,t){if(!t||!t.constructor||!d(t.constructor))return y(e,t)?t:new e(t);const n=p(e.prototype.itemType),r=p(t.constructor.prototype.itemType);return n?r?n===r?t:n.prototype.isPrototypeOf(r.prototype)?new e(t):(y(e,t),t):new e(t):t}(e,t):f(e,t)?y(e,t)?t:new e(t):t}function x(e){return e&&e.prototype&&e.prototype.declaredClass||"unknown"}const _=new WeakMap;function m(e,t){const n=function(e){switch(e){case Number:return c;case L:return h;case Boolean:return o;case String:return l;case Date:return a;default:return(0,s.s1)(_,e,(()=>g.bind(null,e)))}}(e);return 1===arguments.length?n:n(t)}function b(e,t,n){return 1===arguments.length?b.bind(null,e):t?Array.isArray(t)?t.map((t=>e(t,n))):[e(t,n)]:t}function I(e,t){return 1===arguments.length?b(m.bind(null,e)):b(m.bind(null,e),t)}function w(e,t,n){return 0!==t&&Array.isArray(n)?n.map((n=>w(e,t-1,n))):e(n)}function M(e,t,n){if(2===arguments.length)return M.bind(null,e,t);if(!n)return n;let r=t,s=n=w(e,t,n);for(;r>0&&Array.isArray(s);)r--,s=s[0];if(void 0!==s)for(let e=0;e<r;e++)n=[n];return n}function T(e,t,n){return 2===arguments.length?M(m.bind(null,e),t):M(m.bind(null,e),t,n)}function k(e){return!!Array.isArray(e)&&!e.some((t=>{const n=typeof t;return!("string"===n||"number"===n||"function"===n&&e.length>1)}))}function v(e,t){if(2===arguments.length)return v(e).call(null,t);const n=new Set,r=e.filter((e=>"function"!=typeof e)),s=e.filter((e=>"function"==typeof e));for(const t of e)"string"!=typeof t&&"number"!=typeof t||n.add(t);let a=null,o=null;return(e,t)=>{if(null==e)return e;const l=typeof e,c="string"===l||"number"===l;return c&&(n.has(e)||s.some((e=>"string"===l&&e===String||"number"===l&&e===Number)))||"object"===l&&s.some((t=>!f(e,t)))?e:(c&&r.length?(a||(a=r.map((e=>"string"==typeof e?`'${e}'`:`${e}`)).join(", ")),i.error("Accessor#set",`'${e}' is not a valid value for this property, only the following values are valid: ${a}`)):"object"==typeof e&&s.length?(o||(o=s.map((e=>x(e))).join(", ")),i.error("Accessor#set",`'${e}' is not a valid value for this property, value must be one of ${o}`)):i.error("Accessor#set",`'${e}' is not a valid value for this property`),t&&(t.valid=!1),null)}}function P(e,t){if(2===arguments.length)return P(e).call(null,t);const n={},r=[],s=[];for(const t in e.typeMap){const i=e.typeMap[t];n[t]=m(i),r.push(x(i)),s.push(t)}const a=()=>`'${r.join("', '")}'`,o=()=>`'${s.join("', '")}'`,l="string"==typeof e.key?t=>t[e.key]:e.key;return t=>{if(e.base&&!f(e.base,t))return t;if(null==t)return t;const r=l(t)||e.defaultKeyValue,s=n[r];if(!s)return i.error("Accessor#set",`Invalid property value, value needs to be one of ${a()}, or a plain object that can autocast (having .type = ${o()})`),null;if(!f(e.typeMap[r],t))return t;if("string"==typeof e.key&&!u(t)){const n={};for(const r in t)r!==e.key&&(n[r]=t[r]);return s(n)}return s(t)}}class L{}const E={native:e=>({type:"native",value:e}),array:e=>({type:"array",value:e}),oneOf:e=>({type:"one-of",values:e})};function D(e){if(!e||!("type"in e))return!1;switch(e.type){case"native":case"array":case"one-of":return!0}return!1}function A(e){switch(e.type){case"native":return m(e.value);case"array":return b(A(e.value));case"one-of":return function(e){let t=null;return(n,r)=>S(n,e)?n:(null==t&&(t=B(e)),i.error("Accessor#set",`Invalid property value, value needs to be of type ${t}`),r&&(r.valid=!1),null)}(e);default:return null}}function B(e){switch(e.type){case"native":switch(e.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case L:return"integer";case Date:return"date";default:return x(e.value)}case"array":return`array of ${B(e.value)}`;case"one-of":{const t=e.values.map((e=>B(e)));return`one of ${t.slice(0,t.length-1)} or ${t[t.length-1]}`}}return"unknown"}function S(e,t){if(null==e)return!0;switch(t.type){case"native":switch(t.value){case Number:case L:return"number"==typeof e;case Boolean:return"boolean"==typeof e;case String:return"string"==typeof e}return e instanceof t.value;case"array":return!!Array.isArray(e)&&!e.some((e=>!S(e,t.value)));case"one-of":return t.values.some((t=>S(e,t)))}}},22021:(e,t,n)=>{n.d(t,{BV:()=>h,Kt:()=>f,Sf:()=>i,Vl:()=>c,ZF:()=>u,_3:()=>b,jE:()=>_,oK:()=>g,oc:()=>m,t7:()=>l,uZ:()=>a,wt:()=>o});var r=n(17896);n(98766);const s=new Float32Array(1);function i(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}function a(e,t,n){return Math.min(Math.max(e,t),n)}function o(e){return 0==(e&e-1)}function l(e,t,n){return e+(t-e)*n}function c(e){return e*Math.PI/180}function h(e){return 180*e/Math.PI}function u(e){return Math.acos(a(e,-1,1))}function f(e){return Math.asin(a(e,-1,1))}function d(e,t,n=1e-6){return e===t||!(!Number.isFinite(e)||!Number.isFinite(t))&&(e>t?e-t:t-e)<=n}const p=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));const y=BigInt("1000000");function g(e){return x(Math.max(-b,Math.min(e,b)))}function x(e){return s[0]=e,s[0]}function _(e,t){const n=(0,r.l)(e),s=f(e[2]/n),i=Math.atan2(e[1]/n,e[0]/n);return(0,r.s)(t,n,s,i),t}function m(e){const t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[3]*e[3]+e[4]*e[4]+e[5]*e[5],r=e[6]*e[6]+e[7]*e[7]+e[8]*e[8];return!(d(t,1)&&d(n,1)&&d(r,1))}!function(e){const t=function(e){return p.setFloat64(0,e),p.getBigInt64(0)}(e=Math.abs(e)),n=function(e){return p.setBigInt64(0,e),p.getFloat64(0)}(t<=y?y:t-y);Math.abs(e-n)}(1);const b=x(34028234663852886e22)},45091:(e,t,n)=>{n.d(t,{Z:()=>h});var r,s,i=n(80442),a=n(71143);(s=r||(r={}))[s.varint=0]="varint",s[s.fixed64=1]="fixed64",s[s.delimited=2]="delimited",s[s.fixed32=5]="fixed32",s[s.unknown=99]="unknown";const o=4294967296,l=new TextDecoder("utf-8"),c=(0,i.Z)("safari")||(0,i.Z)("ios")?6:(0,i.Z)("ff")?12:32;class h{constructor(e,t,n=0,s=(e?e.byteLength:0)){this._tag=0,this._dataType=r.unknown,this._init(e,t,n,s)}_init(e,t,n,r){this._data=e,this._dataView=t,this._pos=n,this._end=r}asUnsafe(){return this}clone(){return new h(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();if(void 0!==e)return e>>>1^-(1&e)|0}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,n=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),n}getSFixed64(){const e=this._dataView,t=this._pos,n=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),n}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,n=this._toString(this._data,t,t+e);return this._skip(e),n}getBytes(){const e=this._getLength(),t=this._pos,n=this._toBytes(this._data,t,t+e);return this._skip(e),n}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,n,r){const s=this.getMessage(),i=e(s,t,n,r);return s.release(),i}processMessage(e){const t=this.getMessage(),n=e(t);return t.release(),n}getMessage(){const e=this._getLength(),t=h.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){h.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case r.varint:this._decodeVarint();break;case r.fixed64:this._skip(8);break;case r.delimited:this._skip(this._getLength());break;case r.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,n=0,r=0;if(this._end-t>=10)do{if(r=e[t++],n|=127&r,0==(128&r))break;if(r=e[t++],n|=(127&r)<<7,0==(128&r))break;if(r=e[t++],n|=(127&r)<<14,0==(128&r))break;if(r=e[t++],n|=(127&r)<<21,0==(128&r))break;if(r=e[t++],n+=268435456*(127&r),0==(128&r))break;if(r=e[t++],n+=34359738368*(127&r),0==(128&r))break;if(r=e[t++],n+=4398046511104*(127&r),0==(128&r))break;if(r=e[t++],n+=562949953421312*(127&r),0==(128&r))break;if(r=e[t++],n+=72057594037927940*(127&r),0==(128&r))break;if(r=e[t++],n+=0x8000000000000000*(127&r),0==(128&r))break;throw new Error("Varint too long!")}while(0);else{let s=1;for(;t!==this._end&&(r=e[t],0!=(128&r));)++t,n+=(127&r)*s,s*=128;if(t===this._end)throw new Error("Varint overrun!");++t,n+=r*s}return this._pos=t,n}_decodeSVarint(){const e=this._data;let t=this._pos,n=0,r=0;const s=1&e[t];if(this._end-t>=10)do{if(r=e[t++],n|=127&r,0==(128&r))break;if(r=e[t++],n|=(127&r)<<7,0==(128&r))break;if(r=e[t++],n|=(127&r)<<14,0==(128&r))break;if(r=e[t++],n|=(127&r)<<21,0==(128&r))break;if(r=e[t++],n+=268435456*(127&r),0==(128&r))break;if(r=e[t++],n+=34359738368*(127&r),0==(128&r))break;if(r=e[t++],n+=4398046511104*(127&r),0==(128&r))break;if(r=e[t++],n+=562949953421312*(127&r),0==(128&r))break;if(r=e[t++],n+=72057594037927940*(127&r),0==(128&r))break;if(r=e[t++],n+=0x8000000000000000*(127&r),0==(128&r))break;throw new Error("Varint too long!")}while(0);else{let s=1;for(;t!==this._end&&(r=e[t],0!=(128&r));)++t,n+=(127&r)*s,s*=128;if(t===this._end)throw new Error("Varint overrun!");++t,n+=r*s}return this._pos=t,s?-(n+1)/2:n/2}_getLength(){if(this._dataType!==r.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,n){if((n=Math.min(this._end,n))-t>c){const r=e.subarray(t,n);return l.decode(r)}let r="",s="";for(let i=t;i<n;++i){const t=e[i];128&t?s+="%"+t.toString(16):(r+=decodeURIComponent(s)+String.fromCharCode(t),s="")}return s.length&&(r+=decodeURIComponent(s)),r}_toBytes(e,t,n){return n=Math.min(this._end,n),new Uint8Array(e.buffer,t,n-t)}}h.pool=new a.Z(h,void 0,(e=>{e._data=null,e._dataView=null}))},3172:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(68773),s=n(40330),i=n(20102),a=n(80442),o=n(22974),l=n(95330),c=n(17452),h=n(19745),u=n(71058),f=n(85958);async function d(e,t){const o=(0,c.HK)(e),h=(0,c.jc)(e);h||o||(e=(0,c.Fv)(e));const x={url:e,requestOptions:{...t}};let _=(0,c.oh)(e);if(_){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let n,r;try{r=await e.before(t)}catch(e){n=M("request:interceptor",e,t)}if((r instanceof Error||r instanceof i.Z)&&(n=M("request:interceptor",r,t)),n)throw e.error&&e.error(n),n;return r}}(_,x);if(null!=e)return{data:e,getHeader:b,httpStatus:200,requestOptions:x.requestOptions,url:x.url};_.after||_.error||(_=null)}if(e=x.url,"image"===(t=x.requestOptions).responseType&&((0,a.Z)("host-webworker")||(0,a.Z)("host-node")))throw M("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),x);if("head"===t.method){if(t.body)throw M("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),x);if(o||h)throw M("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),x)}if(await async function(){(0,a.Z)("host-webworker")?p||(p=await n.e(9884).then(n.bind(n,29884))):d._abortableFetch||(d._abortableFetch=globalThis.fetch.bind(globalThis))}(),p)return p.execute(e,t);const m=new AbortController;(0,l.fu)(t,(()=>m.abort()));const I={controller:m,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:_,params:x,redoRequest:!1,useIdentity:y.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},w=await async function(e){let t,n;await async function(e){const t=e.params.url,n=e.params.requestOptions,i=e.controller.signal,a=n.body;let o=null,c=null;if(g&&"HTMLFormElement"in globalThis&&(a instanceof FormData?o=a:a instanceof HTMLFormElement&&(o=new FormData(a))),"string"==typeof a&&(c=a),e.fetchOptions={cache:n.cacheBust&&!d._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:n.headers||{},method:"head"===n.method?"HEAD":"GET",mode:"cors",priority:y.priority,redirect:"follow",signal:i},(o||c)&&(e.fetchOptions.body=o||c),"anonymous"===n.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||n.query?.token||o?.get("token")),!e.hasToken&&r.default.apiKey&&(0,u.r)(t)&&(n.query||(n.query={}),n.query.token=r.default.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!k(t)&&!(0,l.Hc)(i)){let r;"immediate"===n.authMode?(await T(),r=await s.id.getCredential(t,{signal:i}),e.credential=r):"no-prompt"===n.authMode?(await T(),r=await s.id.getCredential(t,{prompt:!1,signal:i}).catch((()=>{})),e.credential=r):s.id&&(r=s.id.findCredential(t)),r&&(e.credentialToken=r.token,e.useSSL=!!r.ssl)}}(e);try{do{[t,n]=await v(e)}while(!await L(e,t,n))}catch(n){const r=M("request:server",n,e.params,t);throw r.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(r),r}const i=e.params.url;if(n&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(i)){if(!e.hasToken&&!e.credentialToken&&n.user?.username&&!(0,c.kl)(i)){const e=(0,c.P$)(i,!0);e&&y.trustedServers.push(e)}Array.isArray(n.authorizedCrossOriginNoCorsDomains)&&(0,f.Hu)(n.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&s.id){const e=s.id.findServerInfo(a.server);let t=e&&e.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=s.id.findCredential(t,a.userId);e&&-1===s.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:n,getHeader:t?e=>t?.headers.get(e):b,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(I);return _?.after?.(w),w}let p;const y=r.default.request,g="FormData"in globalThis,x=[499,498,403,401],_=["COM_0056","COM_0057","SB_0008"],m=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],b=()=>null,I=Symbol();function w(e){const t=(0,c.P$)(e);return!t||t.endsWith(".arcgis.com")||d._corsServers.includes(t)||(0,c.kl)(t)}function M(e,t,n,r){let s="Error";const a={url:n.url,requestOptions:n.requestOptions,getHeader:b,ssl:!1};if(t instanceof i.Z)return t.details?(t.details=(0,o.d9)(t.details),t.details.url=n.url,t.details.requestOptions=n.requestOptions):t.details=a,t;if(t){const e=r&&(e=>r.headers.get(e)),n=r&&r.status,i=t.message;i&&(s=i),e&&(a.getHeader=e),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||n||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=I in t?t[I]:t}return(0,l.D_)(t)?(0,l.zE)():new i.Z(e,s,a)}async function T(){s.id||await Promise.all([n.e(7126),n.e(6261),n.e(1400),n.e(450)]).then(n.bind(n,73660))}function k(e){return m.some((t=>t.test(e)))}async function v(e){let t=e.params.url;const n=e.params.requestOptions,r=e.fetchOptions??{},i=(0,c.jc)(t)||(0,c.HK)(t),o=n.responseType||"json",u=i?0:null!=n.timeout?n.timeout:y.timeout;let p=!1;if(!i){e.useSSL&&(t=(0,c.hO)(t)),n.cacheBust&&"default"===r.cache&&(t=(0,c.ZN)(t,"request.preventCache",Date.now()));let i={...n.query};e.credentialToken&&(i.token=e.credentialToken);let o=(0,c.B7)(i);(0,a.Z)("esri-url-encodes-apostrophe")&&(o=o.replace(/'/g,"%27"));const l=t.length+1+o.length;let u;p="delete"===n.method||"post"===n.method||"put"===n.method||!!n.body||l>y.maxUrlLength;const d=n.useProxy||!!(0,c.ed)(t);if(d){const e=(0,c.b7)(t);u=e.path,!p&&u.length+1+l>y.maxUrlLength&&(p=!0),e.query&&(i={...e.query,...i})}if("HEAD"===r.method&&(p||d)){if(p){if(l>y.maxUrlLength)throw M("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw M("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(d)throw M("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(p?(r.method="delete"===n.method?"DELETE":"put"===n.method?"PUT":"POST",n.body?t=(0,c.fl)(t,i):(r.body=(0,c.B7)(i),r.headers||(r.headers={}),r.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,c.fl)(t,i),d&&(e.useProxy=!0,t=`${u}?${t}`),i.token&&g&&r.body instanceof FormData&&!(0,h.P)(t)&&r.body.set("token",i.token),n.hasOwnProperty("withCredentials"))e.withCredentials=n.withCredentials;else if(!(0,c.D6)(t,(0,c.TI)()))if((0,c.kl)(t))e.withCredentials=!0;else if(s.id){const n=s.id.findServerInfo(t);n&&n.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(r.credentials="include",(0,f.jH)(t)&&await(0,f.jz)(p?(0,c.fl)(t,i):t))}let x,_,m=0,b=!1;u>0&&(m=setTimeout((()=>{b=!0,e.controller.abort()}),u));try{if("native-request-init"===n.responseType)_=r,_.url=t;else if("image"!==n.responseType||"default"!==r.cache||"GET"!==r.method||p||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(n.headers)||!i&&!e.useProxy&&y.proxyUrl&&!w(t)){if(x=await d._abortableFetch(t,r),e.useProxy||function(e){const t=(0,c.P$)(e);t&&!d._corsServers.includes(t)&&d._corsServers.push(t)}(t),"native"===n.responseType)_=x;else if("HEAD"!==r.method)if(x.ok){switch(o){case"array-buffer":_=await x.arrayBuffer();break;case"blob":case"image":_=await x.blob();break;default:_=await x.text()}if(m&&(clearTimeout(m),m=0),"json"===o||"xml"===o||"document"===o)if(_)switch(o){case"json":_=JSON.parse(_);break;case"xml":_=P(_,"application/xml");break;case"document":_=P(_,"text/html")}else _=null;if(_){if("array-buffer"===o||"blob"===o){const e=x.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&_["blob"===o?"size":"byteLength"]<=750)try{const e=await new Response(_).json();e.error&&(_=e)}catch{}}"image"===o&&_ instanceof Blob&&(_=await E(URL.createObjectURL(_),e,!0))}}else _=await x.text()}else _=await E(t,e)}catch(r){if("AbortError"===r.name){if(b)throw new Error("Timeout exceeded");throw(0,l.zE)("Request canceled")}if(!(!x&&r instanceof TypeError&&y.proxyUrl)||n.body||"delete"===n.method||"head"===n.method||"post"===n.method||"put"===n.method||e.useProxy||w(t))throw r;e.redoRequest=!0,(0,c.tD)({proxyUrl:y.proxyUrl,urlPrefix:(0,c.P$)(t)??""})}finally{m&&clearTimeout(m)}return[x,_]}function P(e,t){let n;try{n=(new DOMParser).parseFromString(e,t)}catch{}if(!n||n.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return n}async function L(e,t,n){if(e.redoRequest)return e.redoRequest=!1,!1;const r=e.params.requestOptions;if(!t||"native"===r.responseType||"native-request-init"===r.responseType)return!0;let i,a;if(!t.ok)throw i=new Error(`Unable to load ${t.url} status: ${t.status}`),i[I]=n,i;n&&(n.error?i=n.error:"error"===n.status&&Array.isArray(n.messages)&&(i={...n},i[I]=n,i.details=n.messages));let o,l=null;i&&(a=Number(i.code),l=i.hasOwnProperty("subcode")?Number(i.subcode):null,o=i.messageCode,o=o&&o.toUpperCase());const c=r.authMode;if(403===a&&(4===l||i.message&&i.message.toLowerCase().includes("ssl")&&!i.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===a)&&void 0!==a&&x.includes(a)&&!k(e.params.url)&&(403!==a||o&&!_.includes(o)&&(null==l||2===l&&e.credentialToken))){await T();try{const t=await s.id.getCredential(e.params.url,{error:M("request:server",i,e.params),prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===c)return e.credential=void 0,e.credentialToken=void 0,!1;i=t}}if(i)throw i;return!0}function E(e,t,n=!1){const r=t.controller.signal,s=new Image;return t.withCredentials?s.crossOrigin="use-credentials":s.crossOrigin="anonymous",s.alt="",s.fetchPriority=y.priority,s.src=e,(0,f.fY)(s,e,n,r)}d._abortableFetch=null,d._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,n)=>{n.d(t,{r:()=>i});var r=n(17452);const s=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function i(e){const t=(0,r.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!s.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,n)=>{n.d(t,{Hu:()=>c,fY:()=>o,jH:()=>h,jz:()=>u});var r=n(68773),s=n(80442),i=n(95330),a=n(17452);function o(e,t,n=!1,r){return new Promise(((a,o)=>{if((0,i.Hc)(r))return void o(l());let c=()=>{f(),o(new Error(`Unable to load ${t}`))},h=()=>{const t=e;f(),a(t)},u=()=>{if(!e)return;const t=e;f(),t.src="",o(l())};const f=()=>{(0,s.Z)("esri-image-decode")||(e.removeEventListener("error",c),e.removeEventListener("load",h)),c=null,h=null,e=null,null!=r&&r.removeEventListener("abort",u),u=null,n&&URL.revokeObjectURL(t)};null!=r&&r.addEventListener("abort",u),(0,s.Z)("esri-image-decode")?e.decode().then(h,c):(e.addEventListener("error",c),e.addEventListener("load",h))}))}function l(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}function c(e){r.default.request.crossOriginNoCorsDomains||(r.default.request.crossOriginNoCorsDomains={});const t=r.default.request.crossOriginNoCorsDomains;for(let n of e)n=n.toLowerCase(),/^https?:\/\//.test(n)?t[(0,a.P$)(n)??""]=0:(t[(0,a.P$)("http://"+n)??""]=0,t[(0,a.P$)("https://"+n)??""]=0)}function h(e){const t=r.default.request.crossOriginNoCorsDomains;if(t){let n=(0,a.P$)(e);if(n)return n=n.toLowerCase(),!(0,a.D6)(n,(0,a.TI)())&&t[n]<Date.now()-36e5}return!1}async function u(e){const t=r.default.request.crossOriginNoCorsDomains,n=(0,a.P$)(e);t&&n&&(t[n.toLowerCase()]=Date.now());const s=(0,a.mN)(e);e=s.path,"json"===s.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}},56456:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Q});var r=n(95330),s=n(4215),i=n(59255),a=n(31363);function o(e){return 746===e||747===e||!(e<4352)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103&&!(e>=65097&&e<=65103)||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351&&!(e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=12592&&e<=12687||e>=43360&&e<=43391||e>=55216&&e<=55295||e>=4352&&e<=4607||e>=44032&&e<=55215||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12688&&e<=12703||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543&&12540!==e||e>=65280&&e<=65519&&!(65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||e>=65104&&e<=65135&&!(e>=65112&&e<=65118||e>=65123&&e<=65126)||e>=5120&&e<=5759||e>=6320&&e<=6399||e>=65040&&e<=65055||e>=19904&&e<=19967||e>=40960&&e<=42127||e>=42128&&e<=42191)}function l(e){return!(e<11904)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=65280&&e<=65519||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543||e>=65040&&e<=65055||e>=42128&&e<=42191||e>=40960&&e<=42127)}function c(e){switch(e){case 10:case 32:case 38:case 40:case 41:case 43:case 45:case 47:case 173:case 183:case 8203:case 8208:case 8211:case 8231:return!0}return!1}function h(e){switch(e){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var u=n(87893);const f=24;class d{constructor(e,t,n,r,s,i,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=n,this._letterSpacing=r,this._hAnchor=s,this._vAnchor=i,this._justify=a}getShaping(e,t,n){const r=this._letterSpacing,s=this._lineHeight,i=this._justify,a=this._maxWidth,u=[];let f=0,d=0;const p=e.length;for(let t=0;t<p;t++){const s=e.charCodeAt(t),i=n&&o(s);let a;for(const e of this._glyphItems)if(a=e[s],a)break;u.push({codePoint:s,x:f,y:d,vertical:i,glyphMosaicItem:a}),a&&(f+=a.metrics.advance+r)}let y=f;a>0&&(y=f/Math.max(1,Math.ceil(f/a)));const g=e.includes("​"),x=[];for(let e=0;e<p-1;e++){const t=u[e].codePoint,n=l(t);if(c(t)||n){let r=0;if(10===t)r-=1e4;else if(n&&g)r+=150;else{40!==t&&65288!==t||(r+=50);const n=u[e+1].codePoint;41!==n&&65289!==n||(r+=50)}x.push(this._buildBreak(e+1,u[e].x,y,x,r,!1))}}const _=this._optimalBreaks(this._buildBreak(p,f,y,x,0,!0));let m=0;const b=t?-s:s;let I=0;for(let e=0;e<_.length;e++){const t=_[e];let n=I;for(;n<t&&h(u[n].codePoint);)u[n].glyphMosaicItem=null,++n;let r=t-1;for(;r>n&&h(u[r].codePoint);)u[r].glyphMosaicItem=null,--r;if(n<=r){const e=u[n].x;for(let t=n;t<=r;t++)u[t].x-=e,u[t].y=d;let t=u[r].x;u[r].glyphMosaicItem&&(t+=u[r].glyphMosaicItem.metrics.advance),m=Math.max(t,m),i&&this._applyJustification(u,n,r)}I=t,d+=b}if(u.length>0){const e=_.length-1,n=(i-this._hAnchor)*m;let r=(-this._vAnchor*(e+1)+.5)*s;t&&e&&(r+=e*s);for(const e of u)e.x+=n,e.y+=r}return u.filter((e=>e.glyphMosaicItem))}static getTextBox(e,t){if(!e.length)return null;let n=1/0,r=1/0,s=0,i=0;for(const a of e){const e=a.glyphMosaicItem.metrics.advance,o=a.x,l=a.y-17,c=o+e,h=l+t;n=Math.min(n,o),s=Math.max(s,c),r=Math.min(r,l),i=Math.max(i,h)}return{x:n,y:r,width:s-n,height:i-r}}static getBox(e){if(!e.length)return null;let t=1/0,n=1/0,r=0,s=0;for(const i of e){const{height:e,left:a,top:o,width:l}=i.glyphMosaicItem.metrics,c=i.x,h=i.y-(e-Math.abs(o)),u=c+l+a,f=h+e;t=Math.min(t,c),r=Math.max(r,u),n=Math.min(n,h),s=Math.max(s,f)}return{x:t,y:n,width:r-t,height:s-n}}static addDecoration(e,t){const n=e.length;if(0===n)return;let r=e[0].x+e[0].glyphMosaicItem.metrics.left,s=e[0].y;for(let i=1;i<n;i++){const n=e[i];if(n.y!==s){const a=e[i-1].x+e[i-1].glyphMosaicItem.metrics.left+e[i-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:r,y:s+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.Z(4,0,4,8),metrics:{width:a-r,height:8,left:0,top:0,advance:0},page:0,code:0}}),s=n.y,r=n.x+n.glyphMosaicItem.metrics.left}}const i=e[n-1].x+e[n-1].glyphMosaicItem.metrics.left+e[n-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:r,y:s+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.Z(4,0,4,8),metrics:{width:i-r,height:8,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(e,t,n,r){const s=(e-t)*(e-t);return r?e<t?s/2:2*s:s+Math.abs(n)*n}_buildBreak(e,t,n,r,s,i){let a=null,o=this._breakScore(t,n,s,i);for(const e of r){const r=t-e.x,l=this._breakScore(r,n,s,i)+e.score;l<=o&&(a=e,o=l)}return{index:e,x:t,score:o,previousBreak:a}}_optimalBreaks(e){return e?this._optimalBreaks(e.previousBreak).concat(e.index):[]}_applyJustification(e,t,n){const r=e[n],s=r.vertical?f:r.glyphMosaicItem?r.glyphMosaicItem.metrics.advance:0,i=(r.x+s)*this._justify;for(let r=t;r<=n;r++)e[r].x-=i}}var p=n(21315);const y=.5;class g{constructor(e,t,n=0,r=-1,s=y){this.x=e,this.y=t,this.angle=n,this.segment=r,this.minzoom=s}}class x{constructor(e,t,n,r,s,i=y,o=a.B1){this.anchor=e,this.labelAngle=t,this.glyphAngle=n,this.page=r,this.alternateVerticalGlyph=s,this.minzoom=i,this.maxzoom=o}}class _{constructor(e,t,n,r,s,i,a,o,l,c,h,u){this.tl=e,this.tr=t,this.bl=n,this.br=r,this.mosaicRect=s,this.labelAngle=i,this.minAngle=a,this.maxAngle=o,this.anchor=l,this.minzoom=c,this.maxzoom=h,this.page=u}}class m{constructor(e){this.shapes=e}}class b{getIconPlacement(e,t,n){const r=new i.E9(e.x,e.y),s=n.rotationAlignment===p.aF.MAP,o=n.keepUpright;let l=n.rotate*a.DT;s&&(l+=e.angle);const c=new m([]);return n.allowOverlap&&n.ignorePlacement||(c.iconColliders=[]),this._addIconPlacement(c,r,t,n,l),s&&o&&this._addIconPlacement(c,r,t,n,l+a.JJ),c}_addIconPlacement(e,t,n,r,s){const o=n.pixelRatio,l=n.width/o,c=n.height/o,h=r.offset;let u=h[0],f=h[1];switch(r.anchor){case p.nR.CENTER:u-=l/2,f-=c/2;break;case p.nR.LEFT:f-=c/2;break;case p.nR.RIGHT:u-=l,f-=c/2;break;case p.nR.TOP:u-=l/2;break;case p.nR.BOTTOM:u-=l/2,f-=c;break;case p.nR.TOP_LEFT:break;case p.nR.BOTTOM_LEFT:f-=c;break;case p.nR.TOP_RIGHT:u-=l;break;case p.nR.BOTTOM_RIGHT:u-=l,f-=c}const d=n.rect,g=2/o,x=u-g,m=f-g,b=x+d.width/o,I=m+d.height/o,w=new i.E9(x,m),M=new i.E9(b,I),T=new i.E9(x,I),k=new i.E9(b,m);if(0!==s){const e=Math.cos(s),t=Math.sin(s);w.rotate(e,t),M.rotate(e,t),T.rotate(e,t),k.rotate(e,t)}const v=new _(w,k,T,M,d,s,0,256,t,y,a.B1,0);if(e.shapes.push(v),!r.allowOverlap||!r.ignorePlacement){const n=r.size,i=r.padding,o={xTile:t.x,yTile:t.y,dxPixels:u*n-i,dyPixels:f*n-i,hard:!r.optional,partIndex:0,width:l*n+2*i,height:c*n+2*i,angle:s,minLod:y,maxLod:a.B1};e.iconColliders.push(o)}}getTextPlacement(e,t,n,r){const s=new i.E9(e.x,e.y),o=r.rotate*a.DT,l=r.rotationAlignment===p.aF.MAP,c=r.keepUpright,h=r.padding;let u=y;const g=l?e.angle:0,b=e.segment>=0&&l,I=r.allowOverlap&&r.ignorePlacement?null:[],w=[],M=!b;let T=Number.POSITIVE_INFINITY,k=Number.NEGATIVE_INFINITY,v=T,P=k;const L=(b||l)&&c,E=r.size/f;let D=!1;for(const e of t)if(e.vertical){D=!0;break}let A,B=0,S=0;if(!b&&D){const e=d.getTextBox(t,r.lineHeight*f);switch(r.anchor){case p.nR.LEFT:B=e.height/2,S=-e.width/2;break;case p.nR.RIGHT:B=-e.height/2,S=e.width/2;break;case p.nR.TOP:B=e.height/2,S=e.width/2;break;case p.nR.BOTTOM:B=-e.height/2,S=-e.width/2;break;case p.nR.TOP_LEFT:B=e.height;break;case p.nR.BOTTOM_LEFT:S=-e.width;break;case p.nR.TOP_RIGHT:S=e.width;break;case p.nR.BOTTOM_RIGHT:B=-e.height}}B+=r.offset[0]*f,S+=r.offset[1]*f;for(const f of t){const t=f.glyphMosaicItem;if(!t||t.rect.isEmpty)continue;const d=t.rect,p=t.metrics,m=t.page;if(I&&M){if(void 0!==A&&A!==f.y){let t,n,s,i;D?(t=-P+B,n=T+S,s=P-v,i=k-T):(t=T+B,n=v+S,s=k-T,i=P-v);const l={xTile:e.x,yTile:e.y,dxPixels:t*E-h,dyPixels:n*E-h,hard:!r.optional,partIndex:1,width:s*E+2*h,height:i*E+2*h,angle:o,minLod:y,maxLod:a.B1};I.push(l),T=Number.POSITIVE_INFINITY,k=Number.NEGATIVE_INFINITY,v=T,P=k}A=f.y}const V=[];if(b){const r=.5*t.metrics.width,s=(f.x+p.left-4+r)*E*8;if(u=this._placeGlyph(e,u,s,n,e.segment,1,f.vertical,m,V),c&&(u=this._placeGlyph(e,u,s,n,e.segment,-1,f.vertical,m,V)),u>=2)break}else V.push(new x(s,g,g,m,!1)),l&&c&&V.push(new x(s,g+a.JJ,g+a.JJ,m,!1));const C=f.x+p.left,R=f.y-17-p.top,O=C+p.width,F=R+p.height;let q,U,N,z,Z,j,G,H;if(!b&&D)if(f.vertical){const e=(C+O)/2-p.height/2,t=(R+F)/2+p.width/2;q=new i.E9(-t-4+B,e-4+S),U=new i.E9(q.x+d.width,q.y+d.height),N=new i.E9(q.x,U.y),z=new i.E9(U.x,q.y)}else q=new i.E9(4-R+B,C-4+S),U=new i.E9(q.x-d.height,q.y+d.width),N=new i.E9(U.x,q.y),z=new i.E9(q.x,U.y);else q=new i.E9(C-4+B,R-4+S),U=new i.E9(q.x+d.width,q.y+d.height),N=new i.E9(q.x,U.y),z=new i.E9(U.x,q.y);for(const t of V){let n,s,a,l;if(t.alternateVerticalGlyph){if(!Z){const e=(R+F)/2+S;Z=new i.E9((C+O)/2+B-p.height/2-4,e+p.width/2+4),j=new i.E9(Z.x+d.height,Z.y-d.width),G=new i.E9(j.x,Z.y),H=new i.E9(Z.x,j.y)}n=Z,s=G,a=H,l=j}else n=q,s=N,a=z,l=U;const c=R,u=F,y=t.glyphAngle+o;if(0!==y){const e=Math.cos(y),t=Math.sin(y);n=n.clone(),s=s?.clone(),a=a?.clone(),l=l?.clone(),n.rotate(e,t),l?.rotate(e,t),s?.rotate(e,t),a?.rotate(e,t)}let g=0,x=256;if(b&&D?f.vertical?t.alternateVerticalGlyph?(g=32,x=96):(g=224,x=32):(g=224,x=96):(g=192,x=64),w.push(new _(n,a,s,l,d,t.labelAngle,g,x,t.anchor,t.minzoom,t.maxzoom,t.page)),I&&(!L||this._legible(t.labelAngle)))if(M)C<T&&(T=C),c<v&&(v=c),O>k&&(k=O),u>P&&(P=u);else if(t.minzoom<2){const n={xTile:e.x,yTile:e.y,dxPixels:(C+B)*E-h,dyPixels:(c+B)*E-h,hard:!r.optional,partIndex:1,width:(O-C)*E+2*h,height:(u-c)*E+2*h,angle:y,minLod:t.minzoom,maxLod:t.maxzoom};I.push(n)}}}if(u>=2)return null;if(I&&M){let t,n,s,i;D?(t=-P+B,n=T+S,s=P-v,i=k-T):(t=T+B,n=v+S,s=k-T,i=P-v);const l={xTile:e.x,yTile:e.y,dxPixels:t*E-h,dyPixels:n*E-h,hard:!r.optional,partIndex:1,width:s*E+2*h,height:i*E+2*h,angle:o,minLod:y,maxLod:a.B1};I.push(l)}const V=new m(w);return I&&I.length>0&&(V.textColliders=I),V}_legible(e){const t=(0,a.Or)(e);return t<65||t>=193}_placeGlyph(e,t,n,r,s,o,l,c,h){let u=o;const f=u<0?(0,a.DQ)(e.angle+a.JJ,a._U):e.angle;let d=0;n<0&&(u*=-1,n*=-1,d=a.JJ),u>0&&++s;let p=new i.E9(e.x,e.y),y=r[s],g=a.B1;if(r.length<=s)return g;for(;;){const e=y.x-p.x,i=y.y-p.y,o=Math.sqrt(e*e+i*i),_=Math.max(n/o,t),m=e/o,b=i/o,I=(0,a.DQ)(Math.atan2(b,m)+d,a._U);if(h.push(new x(p,f,I,c,!1,_,g)),l&&h.push(new x(p,f,I,c,!0,_,g)),_<=t)return _;p=y.clone();do{if(s+=u,r.length<=s||s<0)return _;y=r[s]}while(p.isEqual(y));let w=y.x-p.x,M=y.y-p.y;const T=Math.sqrt(w*w+M*M);w*=o/T,M*=o/T,p.x-=w,p.y-=M,g=_}}}var I,w,M=n(45091),T=n(65390);(w=I||(I={}))[w.moveTo=1]="moveTo",w[w.lineTo=2]="lineTo",w[w.close=7]="close";class k{constructor(e,t){this.values={},this._geometry=void 0,this._pbfGeometry=null;const n=t.keys,r=t.values,s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:this.id=s.getUInt64();break;case 2:{const e=s.getMessage().asUnsafe(),t=this.values;for(;!e.empty();){const s=e.getUInt32(),i=e.getUInt32();t[n[s]]=r[i]}e.release();break}case 3:this.type=s.getUInt32();break;case 4:this._pbfGeometry=s.getMessage();break;default:s.skip()}}getGeometry(e){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const t=this._pbfGeometry.asUnsafe();let n,r;this._pbfGeometry=null,e?e.reset(this.type):n=[];let s,a=I.moveTo,o=0,l=0,c=0;for(;!t.empty();){if(0===o){const e=t.getUInt32();a=7&e,o=e>>3}switch(o--,a){case I.moveTo:l+=t.getSInt32(),c+=t.getSInt32(),e?e.moveTo(l,c):n&&(r&&n.push(r),r=[],r.push(new i.E9(l,c)));break;case I.lineTo:l+=t.getSInt32(),c+=t.getSInt32(),e?e.lineTo(l,c):r&&r.push(new i.E9(l,c));break;case I.close:e?e.close():r&&!r[0].equals(l,c)&&r.push(r[0].clone());break;default:throw t.release(),new Error("Invalid path operation")}}return e?s=e.result():n&&(r&&n.push(r),s=n),t.release(),this._geometry=s,s}}var v=n(26084);class P extends v.Z{constructor(){super(12)}add(e,t,n){const r=this.array;r.push(e),r.push(t),r.push(n)}}class L{constructor(e){this.extent=4096,this.keys=[],this.values=[],this._pbfLayer=e.clone();const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:this.name=t.getString();break;case 3:this.keys.push(t.getString());break;case 4:this.values.push(t.processMessage(L._parseValue));break;case 5:this.extent=t.getUInt32();break;default:t.skip()}}getData(){return this._pbfLayer}static _parseValue(e){for(;e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getInt64();case 5:return e.getUInt64();case 6:return e.getSInt64();case 7:return e.getBool();default:e.skip()}return null}}class E extends v.Z{constructor(e){super(e)}add(e,t,n,r,s,i,a,o,l,c,h,u){const f=this.array;let d=v.Z.i1616to32(e,t);f.push(d);const p=31;d=v.Z.i8888to32(Math.round(p*n),Math.round(p*r),Math.round(p*s),Math.round(p*i)),f.push(d),d=v.Z.i8888to32(Math.round(p*a),Math.round(p*o),Math.round(p*l),Math.round(p*c)),f.push(d),d=v.Z.i1616to32(h,0),f.push(d),u&&f.push(...u)}}class D extends v.Z{constructor(e){super(e)}add(e,t,n){const r=this.array;r.push(v.Z.i1616to32(e,t)),n&&r.push(...n)}}class A extends v.Z{constructor(e){super(e)}add(e,t,n,r,s,i,a){const o=this.array,l=this.index;let c=v.Z.i1616to32(e,t);return o.push(c),c=v.Z.i8888to32(Math.round(15*n),Math.round(15*r),s,i),o.push(c),a&&o.push(...a),l}}class B extends v.Z{constructor(e){super(e)}add(e,t,n,r,s,i,o,l,c,h,u,f){const d=this.array;let p=v.Z.i1616to32(e,t);d.push(p),p=v.Z.i1616to32(Math.round(8*n),Math.round(8*r)),d.push(p),p=v.Z.i8888to32(s/4,i/4,l,c),d.push(p),p=v.Z.i8888to32(0,(0,a.Or)(o),10*h,Math.min(10*u,255)),d.push(p),f&&d.push(...f)}}class S extends v.Z{constructor(e){super(e)}add(e,t,n,r,s){const i=this.array,a=v.Z.i1616to32(2*e+n,2*t+r);i.push(a),s&&i.push(...s)}}class V{constructor(e,t,n){this.layerExtent=4096,this._features=[],this.layer=e,this.zoom=t,this._spriteInfo=n,this._filter=e.getFeatureFilter()}pushFeature(e){this._filter&&!this._filter.filter(e,this.zoom)||this._features.push(e)}hasFeatures(){return this._features.length>0}getResources(e,t,n){}}class C extends V{constructor(e,t,n,r,i){super(e,t,n),this.type=s.al.CIRCLE,this._circleVertexBuffer=r,this._circleIndexBuffer=i}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(e){const t=this._circleVertexBuffer,n=this._circleIndexBuffer;this._circleIndexStart=3*n.index,this._circleIndexCount=0;const r=this.layer,s=this.zoom;e&&e.setExtent(this.layerExtent);for(const i of this._features){const a=i.getGeometry(e);if(!a)continue;const o=r.circleMaterial.encodeAttributes(i,s,r);for(const e of a)if(e)for(const r of e){const e=t.index;t.add(r.x,r.y,0,0,o),t.add(r.x,r.y,0,1,o),t.add(r.x,r.y,1,0,o),t.add(r.x,r.y,1,1,o),n.add(e,e+1,e+2),n.add(e+1,e+2,e+3),this._circleIndexCount+=6}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this._circleVertexBuffer.array.length,e+=this._circleIndexBuffer.array.length;const t=new Uint32Array(e),n=new Int32Array(t.buffer);let r=0;t[r++]=this.type,t[r++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[r++]=this.layerUIDs[e];t[r++]=this._circleIndexStart,t[r++]=this._circleIndexCount,t[r++]=this._circleVertexBuffer.array.length;for(let e=0;e<this._circleVertexBuffer.array.length;e++)n[r++]=this._circleVertexBuffer.array[e];t[r++]=this._circleIndexBuffer.array.length;for(let e=0;e<this._circleIndexBuffer.array.length;e++)t[r++]=this._circleIndexBuffer.array[e];return t.buffer}}var R=n(3894),O=n(95401);class F extends V{constructor(e,t,n,r,i,a,o){super(e,t,n),this.type=s.al.FILL,this._patternMap=new Map,this._fillVertexBuffer=r,this._fillIndexBuffer=i,this._outlineVertexBuffer=a,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(e,t,n){const r=this.layer,s=this.zoom,i=r.getPaintProperty("fill-pattern");if(i)if(i.isDataDriven)for(const e of this._features)t(i.getValue(s,e),!0);else t(i.getValue(s),!0)}processFeatures(e){this._fillIndexStart=3*this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=3*this._outlineIndexBuffer.index,this._outlineIndexCount=0;const t=this.layer,n=this.zoom,{fillMaterial:r,outlineMaterial:s,hasDataDrivenFill:i,hasDataDrivenOutline:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("fill-pattern"),l=o?.isDataDriven;let c=!o&&t.getPaintValue("fill-antialias",n);if(t.outlineUsesFillColor){if(c&&!t.hasDataDrivenOpacity){const e=t.getPaintValue("fill-opacity",n),r=t.getPaintValue("fill-opacity",n+1);e<1&&r<1&&(c=!1)}if(c&&!t.hasDataDrivenColor){const e=t.getPaintValue("fill-color",n),r=t.getPaintValue("fill-color",n+1);e[3]<1&&r[3]<1&&(c=!1)}}const h=this._features,u=e?.validateTessellation;if(l){const i=[];for(const l of h){const h=o.getValue(n,l),f=this._spriteInfo[h];if(!f||!f.rect)continue;const d=r.encodeAttributes(l,n,t,f),p=c&&a?s.encodeAttributes(l,n,t):[],y=l.getGeometry(e);i.push({ddFillAttributes:d,ddOutlineAttributes:p,page:f.page,geometry:y}),i.sort(((e,t)=>e.page-t.page));for(const{ddFillAttributes:e,ddOutlineAttributes:n,page:r,geometry:s}of i)this._processFeature(s,c,t.outlineUsesFillColor,e,n,u,r)}}else for(const o of h){const l=i?r.encodeAttributes(o,n,t):null,h=c&&a?s.encodeAttributes(o,n,t):null,f=o.getGeometry(e);this._processFeature(f,c,t.outlineUsesFillColor,l,h,u)}}serialize(){let e=10;e+=this.layerUIDs.length,e+=this._fillVertexBuffer.array.length,e+=this._fillIndexBuffer.array.length,e+=this._outlineVertexBuffer.array.length,e+=this._outlineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),n=new Int32Array(t.buffer);let r=0;t[r++]=this.type,t[r++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[r++]=this.layerUIDs[e];t[r++]=this._fillIndexStart,t[r++]=this._fillIndexCount,t[r++]=this._outlineIndexStart,t[r++]=this._outlineIndexCount;const s=this._patternMap,i=s.size;if(t[r++]=i,i>0)for(const[e,[n,i]]of s)t[r++]=e,t[r++]=n,t[r++]=i;t[r++]=this._fillVertexBuffer.array.length;for(let e=0;e<this._fillVertexBuffer.array.length;e++)n[r++]=this._fillVertexBuffer.array[e];t[r++]=this._fillIndexBuffer.array.length;for(let e=0;e<this._fillIndexBuffer.array.length;e++)t[r++]=this._fillIndexBuffer.array[e];t[r++]=this._outlineVertexBuffer.array.length;for(let e=0;e<this._outlineVertexBuffer.array.length;e++)n[r++]=this._outlineVertexBuffer.array[e];t[r++]=this._outlineIndexBuffer.array.length;for(let e=0;e<this._outlineIndexBuffer.array.length;e++)t[r++]=this._outlineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,n,r,s,i,a){if(!e)return;const o=e.length,l=!s||0===s.length;if(t&&(!n||l))for(let t=0;t<o;t++)this._processOutline(e[t],s);let c;for(let t=0;t<o;t++){const n=F._area(e[t]);n>32?(void 0!==c&&this._processFill(e,c,r,i,a),c=[t]):n<-32&&void 0!==c&&c.push(t)}void 0!==c&&this._processFill(e,c,r,i,a)}_processOutline(e,t){const n=this._outlineVertexBuffer,r=this._outlineIndexBuffer,s=r.index;let a,o,l;const c=new i.E9(0,0),h=new i.E9(0,0),u=new i.E9(0,0);let f=-1,d=-1,p=-1,y=-1,g=-1,x=!1,_=e.length;if(_<2)return;const m=e[0];let b=e[_-1];for(;_&&b.isEqual(m);)--_,b=e[_-1];if(!(_-0<2)){for(let s=0;s<_;++s){0===s?(a=e[_-1],o=e[0],l=e[1],c.assignSub(o,a),c.normalize(),c.rightPerpendicular()):(a=o,o=l,l=s!==_-1?e[s+1]:e[0],c.assign(h));const i=this._isClipEdge(a,o);-1===y&&(x=i),h.assignSub(l,o),h.normalize(),h.rightPerpendicular();const m=c.x*h.y-c.y*h.x;u.assignAdd(c,h),u.normalize();const b=-u.x*-c.x+-u.y*-c.y;let I=Math.abs(0!==b?1/b:1);I>8&&(I=8),m>=0?(p=n.add(o.x,o.y,c.x,c.y,0,1,t),-1===y&&(y=p),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p),d=n.add(o.x,o.y,I*-u.x,I*-u.y,0,-1,t),-1===g&&(g=d),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p),f=d,d=p,p=n.add(o.x,o.y,u.x,u.y,0,1,t),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p),d=n.add(o.x,o.y,h.x,h.y,0,1,t),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p)):(p=n.add(o.x,o.y,I*u.x,I*u.y,0,1,t),-1===y&&(y=p),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p),d=n.add(o.x,o.y,-c.x,-c.y,0,-1,t),-1===g&&(g=d),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p),f=d,d=p,p=n.add(o.x,o.y,-u.x,-u.y,0,-1,t),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p),f=n.add(o.x,o.y,-h.x,-h.y,0,-1,t),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p))}f>=0&&d>=0&&y>=0&&!x&&r.add(f,d,y),f>=0&&y>=0&&g>=0&&!x&&r.add(f,g,y),this._outlineIndexCount+=3*(r.index-s)}}_processFill(e,t,n,r,s){let i;t.length>1&&(i=[]);let a=0;for(const n of t)0!==a&&i.push(a),a+=e[n].length;const o=2*a,l=R.Z.acquire();for(const n of t){const t=e[n],r=t.length;for(let e=0;e<r;++e)l.push(t[e].x,t[e].y)}const c=(0,O.e)(l,i,2);if(O.e.deviation(l,i,2,c)>0){const r=t.map((t=>e[t].length)),{buffer:i,vertexCount:a}=(0,T.b)(l,r);if(a>0){const e=this._fillVertexBuffer.index;for(let e=0;e<a;e++)this._fillVertexBuffer.add(i[2*e],i[2*e+1],n);for(let t=0;t<a;t+=3){const n=e+t;this._fillIndexBuffer.add(n,n+1,n+2)}if(void 0!==s){const e=this._patternMap,t=e.get(s);t?t[1]+=a:e.set(s,[this._fillIndexStart+this._fillIndexCount,a])}this._fillIndexCount+=a}}else{const e=c.length;if(e>0){const t=this._fillVertexBuffer.index;let r=0;for(;r<o;)this._fillVertexBuffer.add(l[r++],l[r++],n);let i=0;for(;i<e;)this._fillIndexBuffer.add(t+c[i++],t+c[i++],t+c[i++]);if(void 0!==s){const t=this._patternMap,n=t.get(s);n?n[1]+=e:t.set(s,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}R.Z.release(l)}_isClipEdge(e,t){return e.x===t.x?e.x<=-64||e.x>=4160:e.y===t.y&&(e.y<=-64||e.y>=4160)}static _area(e){let t=0;const n=e.length-1;for(let r=0;r<n;r++)t+=(e[r].x-e[r+1].x)*(e[r].y+e[r+1].y);return t+=(e[n].x-e[0].x)*(e[n].y+e[0].y),.5*t}}var q=n(67327);class U extends V{constructor(e,t,n,r,i){super(e,t,n),this.type=s.al.LINE,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=r,this.tessellationProperties._lineIndexBuffer=i,this._lineTessellator=new q.z(N(this.tessellationProperties),z(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,n){const r=this.layer,s=this.zoom,i=r.getPaintProperty("line-pattern"),a=r.getPaintProperty("line-dasharray"),o=r.getLayoutProperty("line-cap");if(!i&&!a)return;const l=o?.getValue(s)||0,c=o?.isDataDriven,h=i?.isDataDriven,u=a?.isDataDriven;if(h||u)for(const e of this._features)t(h?i.getValue(s,e):this._getDashArrayKey(e,s,r,a,c,o,l));else if(i)t(i.getValue(s));else if(a){const e=a.getValue(s);t(r.getDashKey(e,l))}}processFeatures(e){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const t=this.layer,n=this.zoom,r=this._features,s=this._tessellationOptions,{hasDataDrivenLine:i,lineMaterial:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("line-pattern"),l=t.getPaintProperty("line-dasharray"),c=o?.isDataDriven,h=l?.isDataDriven;let u;u=t.getLayoutProperty("line-cap");const f=u?.isDataDriven?u:null,d=f?null:t.getLayoutValue("line-cap",n),p=d||0,y=!!f;u=t.getLayoutProperty("line-join");const g=u?.isDataDriven?u:null,x=g?null:t.getLayoutValue("line-join",n);u=t.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:t.getLayoutValue("line-miter-limit",n);u=t.getLayoutProperty("line-round-limit");const b=u?.isDataDriven?u:null,I=b?null:t.getLayoutValue("line-round-limit",n);u=t.getPaintProperty("line-width");const w=u?.isDataDriven?u:null,M=w?null:t.getPaintValue("line-width",n);u=t.getPaintProperty("line-offset");const T=u?.isDataDriven?u:null,k=T?null:t.getPaintValue("line-offset",n);if(c||h){const i=[];for(const s of r){const r=c?o.getValue(n,s):this._getDashArrayKey(s,n,t,l,y,f,p),h=this._spriteInfo[r];if(!h||!h.rect)continue;const u=a.encodeAttributes(s,n,t,h),v=s.getGeometry(e);i.push({ddAttributes:u,page:h.page,cap:f?f.getValue(n,s):d,join:g?g.getValue(n,s):x,miterLimit:_?_.getValue(n,s):m,roundLimit:b?b.getValue(n,s):I,halfWidth:.5*(w?w.getValue(n,s):M),offset:T?T.getValue(n,s):k,geometry:v})}i.sort(((e,t)=>e.page-t.page)),s.textured=!0;for(const{ddAttributes:e,page:t,cap:n,join:r,miterLimit:a,roundLimit:o,halfWidth:l,offset:c,geometry:h}of i)s.capType=n,s.joinType=r,s.miterLimit=a,s.roundLimit=o,s.halfWidth=l,s.offset=c,this._processFeature(h,e,t)}else{if(o){const e=o.getValue(n),t=this._spriteInfo[e];if(!t||!t.rect)return}s.textured=!(!o&&!l),s.capType=d,s.joinType=x,s.miterLimit=m,s.roundLimit=I,s.halfWidth=.5*M,s.offset=k;for(const o of r){const r=i?a.encodeAttributes(o,n,t):null;f&&(s.capType=f.getValue(n,o)),g&&(s.joinType=g.getValue(n,o)),_&&(s.miterLimit=_.getValue(n,o)),b&&(s.roundLimit=b.getValue(n,o)),w&&(s.halfWidth=.5*w.getValue(n,o)),T&&(s.offset=T.getValue(n,o));const l=o.getGeometry(e);this._processFeature(l,r)}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this.tessellationProperties._lineVertexBuffer.array.length,e+=this.tessellationProperties._lineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),n=new Int32Array(t.buffer);let r=0;t[r++]=this.type,t[r++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[r++]=this.layerUIDs[e];t[r++]=this._lineIndexStart,t[r++]=this._lineIndexCount;const s=this._patternMap,i=s.size;if(t[r++]=i,i>0)for(const[e,[n,i]]of s)t[r++]=e,t[r++]=n,t[r++]=i;t[r++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineVertexBuffer.array.length;e++)n[r++]=this.tessellationProperties._lineVertexBuffer.array[e];t[r++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineIndexBuffer.array.length;e++)t[r++]=this.tessellationProperties._lineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,n){if(!e)return;const r=e.length;for(let s=0;s<r;s++)this._processGeometry(e[s],t,n)}_processGeometry(e,t,n){if(e.length<2)return;let r,s,i=e[0],a=1;for(;a<e.length;)r=e[a].x-i.x,s=e[a].y-i.y,r*r+s*s<1e-6?e.splice(a,1):(i=e[a],++a);if(e.length<2)return;const o=this.tessellationProperties._lineIndexBuffer,l=3*o.index;this._tessellationOptions.initialDistance=0,this._tessellationOptions.wrapDistance=65535,this.tessellationProperties._ddValues=t,this._lineTessellator.tessellate(e,this._tessellationOptions);const c=3*o.index-l;if(void 0!==n){const e=this._patternMap,t=e.get(n);t?t[1]+=c:e.set(n,[l+this._lineIndexCount,c])}this._lineIndexCount+=c}_getDashArrayKey(e,t,n,r,s,i,a){const o=s?i.getValue(t,e):a,l=r.getValue(t,e);return n.getDashKey(l,o)}}const N=e=>(t,n,r,s,i,a,o,l,c,h,u)=>(e._lineVertexBuffer.add(t,n,o,l,r,s,i,a,c,h,u,e._ddValues),e._lineVertexBuffer.index-1),z=e=>(t,n,r)=>{e._lineIndexBuffer.add(t,n,r)};var Z,j=n(79087),G=n(70586),H=n(19153),$=n(7333);function K(e,t){return e.iconMosaicItem&&t.iconMosaicItem?e.iconMosaicItem.page===t.iconMosaicItem.page?0:e.iconMosaicItem.page-t.iconMosaicItem.page:e.iconMosaicItem&&!t.iconMosaicItem?1:!e.iconMosaicItem&&t.iconMosaicItem?-1:0}class W extends V{constructor(e,t,n,r,i,a,o,l){super(e,t,l.getSpriteItems()),this.type=s.al.SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._iconVertexBuffer=n,this._iconIndexBuffer=r,this._textVertexBuffer=i,this._textIndexBuffer=a,this._placementEngine=o,this._workerTileHandler=l}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}getResources(e,t,n){const r=this.layer,s=this.zoom;e&&e.setExtent(this.layerExtent);const i=r.getLayoutProperty("icon-image"),a=r.getLayoutProperty("text-field");let o=r.getLayoutProperty("text-transform"),l=r.getLayoutProperty("text-font");const c=[];let h,u,f,d;i&&!i.isDataDriven&&(h=i.getValue(s)),a&&!a.isDataDriven&&(u=a.getValue(s)),o&&o.isDataDriven||(f=r.getLayoutValue("text-transform",s),o=null),l&&l.isDataDriven||(d=r.getLayoutValue("text-font",s),l=null);for(const y of this._features){const g=y.getGeometry(e);if(!g||0===g.length)continue;let x,_;i&&(x=i.isDataDriven?i.getValue(s,y):this._replaceKeys(h,y.values),x&&t(x));let m=!1;if(a&&(_=a.isDataDriven?a.getValue(s,y):this._replaceKeys(u,y.values),_)){switch(_=_.replace(/\\n/g,"\n"),o&&(f=o.getValue(s,y)),f){case p._5.LOWERCASE:_=_.toLowerCase();break;case p._5.UPPERCASE:_=_.toUpperCase()}if(W._bidiEngine.hasBidiChar(_)){let e;e="rtl"===W._bidiEngine.checkContextual(_)?"IDNNN":"ICNNN",_=W._bidiEngine.bidiTransform(_,e,"VLYSN"),m=!0}const e=_.length;if(e>0){l&&(d=l.getValue(s,y));for(const t of d){let r=n[t];r||(r=n[t]=new Set);for(let t=0;t<e;t++){const e=_.charCodeAt(t);r.add(e)}}}}if(!x&&!_)continue;const b=r.getLayoutValue("symbol-sort-key",s,y),I={feature:y,sprite:x,label:_,rtl:m,geometry:g,hash:(_?(0,H.hP)(_):0)^(x?(0,H.hP)(x):0),priority:b,textFont:d};c.push(I)}this._symbolFeatures=c}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,n=this.zoom,r=t.getLayoutValue("symbol-placement",n),s=r!==p.R.POINT,o=8*t.getLayoutValue("symbol-spacing",n),l=t.getLayoutProperty("icon-image"),c=t.getLayoutProperty("text-field"),h=l?new $._L(t,n,s):null,u=c?new $.nj(t,n,s):null,y=this._workerTileHandler;let x;l&&(x=y.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const _=[];let m=1;u&&u.size&&(m=u.size/f);const b=u?u.maxAngle*a.DT:0,I=u?8*u.size:0;for(const e of this._symbolFeatures){let t,a;h&&x&&e.sprite&&(t=x[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&h.update(n,e.feature);let l=0;const c=e.label;if(c){(0,G.O3)(u),u.update(n,e.feature);const t=s&&u.rotationAlignment===p.aF.MAP?u.keepUpright:u.writingMode&&u.writingMode.includes(p.r1.VERTICAL);let r=.5;switch(u.anchor){case p.nR.TOP_LEFT:case p.nR.LEFT:case p.nR.BOTTOM_LEFT:r=0;break;case p.nR.TOP_RIGHT:case p.nR.RIGHT:case p.nR.BOTTOM_RIGHT:r=1}let i=.5;switch(u.anchor){case p.nR.TOP_LEFT:case p.nR.TOP:case p.nR.TOP_RIGHT:i=0;break;case p.nR.BOTTOM_LEFT:case p.nR.BOTTOM:case p.nR.BOTTOM_RIGHT:i=1}let o=.5;switch(u.justify){case p.vL.AUTO:o=r;break;case p.vL.LEFT:o=0;break;case p.vL.RIGHT:o=1}const h=u.letterSpacing*f,g=s?0:u.maxWidth*f,x=u.lineHeight*f,_=e.textFont.map((e=>y.getGlyphItems(e)));if(a=new d(_,g,x,h,r,i,o).getShaping(c,e.rtl,t),a&&a.length>0){let e=1e30,t=-1e30;for(const n of a)e=Math.min(e,n.x),t=Math.max(t,n.x);l=(t-e+48)*m*8}}for(let n of e.geometry){const c=[];if(r===p.R.LINE){if(a?.length&&u?.size){const e=8*u.size*(2+Math.min(2,4*Math.abs(u.offset[1])));n=W._smoothVertices(n,e)}W._pushAnchors(c,n,o,l)}else r===p.R.LINE_CENTER?W._pushCenterAnchor(c,n):e.feature.type===i.Vl.Polygon?W._pushCentroid(c,n):c.push(new g(n[0].x,n[0].y));for(const r of c){if(r.x<0||r.x>4096||r.y<0||r.y>4096)continue;if(s&&l>0&&u?.rotationAlignment===p.aF.MAP&&!W._honorsTextMaxAngle(n,r,l,b,I))continue;const i={shaping:a,line:n,iconMosaicItem:t,anchor:r,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};_.push(i),this._processFeature(i,h,u)}}}_.sort(K),this._addPlacedGlyphs(),this._symbolInstances=_}serialize(){let e=11;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=W._symbolsSerializationLength(this._symbolInstances),e+=this._iconVertexBuffer.array.length,e+=this._iconIndexBuffer.array.length,e+=this._textVertexBuffer.array.length,e+=this._textIndexBuffer.array.length;const t=new Uint32Array(e),n=new Int32Array(t.buffer),r=new Float32Array(t.buffer);let s=0;t[s++]=this.type,t[s++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[s++]=this.layerUIDs[e];t[s++]=this._isIconSDF?1:0,t[s++]=this.markerPageMap.size;for(const[e,[n,r]]of this.markerPageMap)t[s++]=e,t[s++]=n,t[s++]=r;t[s++]=this.glyphsPageMap.size;for(const[e,[n,r]]of this.glyphsPageMap)t[s++]=e,t[s++]=n,t[s++]=r;t[s++]=this._iconVertexBuffer.index/4,t[s++]=this._textVertexBuffer.index/4,s=W.serializeSymbols(t,n,r,s,this._symbolInstances),t[s++]=this._iconVertexBuffer.array.length;for(let e=0;e<this._iconVertexBuffer.array.length;e++)n[s++]=this._iconVertexBuffer.array[e];t[s++]=this._iconIndexBuffer.array.length;for(let e=0;e<this._iconIndexBuffer.array.length;e++)t[s++]=this._iconIndexBuffer.array[e];t[s++]=this._textVertexBuffer.array.length;for(let e=0;e<this._textVertexBuffer.array.length;e++)n[s++]=this._textVertexBuffer.array[e];t[s++]=this._textIndexBuffer.array.length;for(let e=0;e<this._textIndexBuffer.array.length;e++)t[s++]=this._textIndexBuffer.array[e];return t.buffer}static _symbolsSerializationLength(e){let t=0;t+=1;for(const n of e||[]){t+=4,t+=1;for(const e of n.textColliders)t+=10;for(const e of n.iconColliders)t+=10;t+=1,t+=2*n.textVertexRanges.length,t+=1,t+=2*n.iconVertexRanges.length}return t}static serializeSymbols(e,t,n,r,s){s=s||[],t[r++]=s.length;for(const e of s){t[r++]=e.anchor.x,t[r++]=e.anchor.y,t[r++]=e.symbolFeature.hash,t[r++]=e.symbolFeature.priority,t[r++]=e.textColliders.length+e.iconColliders.length;for(const s of e.textColliders)t[r++]=s.xTile,t[r++]=s.yTile,t[r++]=s.dxPixels,t[r++]=s.dyPixels,t[r++]=s.hard?1:0,t[r++]=s.partIndex,n[r++]=s.minLod,n[r++]=s.maxLod,t[r++]=s.width,t[r++]=s.height;for(const s of e.iconColliders)t[r++]=s.xTile,t[r++]=s.yTile,t[r++]=s.dxPixels,t[r++]=s.dyPixels,t[r++]=s.hard?1:0,t[r++]=s.partIndex,n[r++]=s.minLod,n[r++]=s.maxLod,t[r++]=s.width,t[r++]=s.height;t[r++]=e.textVertexRanges.length;for(const[n,s]of e.textVertexRanges)t[r++]=n,t[r++]=s;t[r++]=e.iconVertexRanges.length;for(const[n,s]of e.iconVertexRanges)t[r++]=n,t[r++]=s}return r}_replaceKeys(e,t){return e.replace(/{([^{}]+)}/g,((e,n)=>n in t?t[n]:""))}_processFeature(e,t,n){const{line:r,iconMosaicItem:s,shaping:i,anchor:o}=e,l=this.zoom,c=this.layer,h=!!s;let u=!0;h&&(u=t?.optional||!s);const f=i&&i.length>0,d=!f||n?.optional;let y,g;if(h&&(y=this._placementEngine.getIconPlacement(o,s,t)),(y||u)&&(f&&(g=this._placementEngine.getTextPlacement(o,i,r,n)),g||d)){if(y&&g||(d||u?d||g?u||y||(g=null):y=null:(y=null,g=null)),g){const t=c.hasDataDrivenText?c.textMaterial.encodeAttributes(e.symbolFeature.feature,l,c):null;if(this._storePlacedGlyphs(e,g.shapes,l,n.rotationAlignment,t),g.textColliders){e.textColliders=g.textColliders;for(const e of g.textColliders){e.minLod=Math.max(l+(0,a.k3)(e.minLod),0),e.maxLod=Math.min(l+(0,a.k3)(e.maxLod),25);const t=e.angle;if(t){const n=Math.cos(t),r=Math.sin(t),s=e.dxPixels*n-e.dyPixels*r,i=e.dxPixels*r+e.dyPixels*n,a=(e.dxPixels+e.width)*n-e.dyPixels*r,o=(e.dxPixels+e.width)*r+e.dyPixels*n,l=e.dxPixels*n-(e.dyPixels+e.height)*r,c=e.dxPixels*r+(e.dyPixels+e.height)*n,h=(e.dxPixels+e.width)*n-(e.dyPixels+e.height)*r,u=(e.dxPixels+e.width)*r+(e.dyPixels+e.height)*n,f=Math.min(s,a,l,h),d=Math.max(s,a,l,h),p=Math.min(i,o,c,u),y=Math.max(i,o,c,u);e.dxPixels=f,e.dyPixels=p,e.width=d-f,e.height=y-p}}}}if(y){const n=c.hasDataDrivenIcon?c.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,c):null;if(this._addPlacedIcons(e,y.shapes,l,s.page,t.rotationAlignment===p.aF.VIEWPORT,n),y.iconColliders){e.iconColliders=y.iconColliders;for(const e of y.iconColliders){e.minLod=Math.max(l+(0,a.k3)(e.minLod),0),e.maxLod=Math.min(l+(0,a.k3)(e.maxLod),25);const t=e.angle;if(t){const n=Math.cos(t),r=Math.sin(t),s=e.dxPixels*n-e.dyPixels*r,i=e.dxPixels*r+e.dyPixels*n,a=(e.dxPixels+e.width)*n-e.dyPixels*r,o=(e.dxPixels+e.width)*r+e.dyPixels*n,l=e.dxPixels*n-(e.dyPixels+e.height)*r,c=e.dxPixels*r+(e.dyPixels+e.height)*n,h=(e.dxPixels+e.width)*n-(e.dyPixels+e.height)*r,u=(e.dxPixels+e.width)*r+(e.dyPixels+e.height)*n,f=Math.min(s,a,l,h),d=Math.max(s,a,l,h),p=Math.min(i,o,c,u),y=Math.max(i,o,c,u);e.dxPixels=f,e.dyPixels=p,e.width=d-f,e.height=y-p}}}}}}_addPlacedIcons(e,t,n,r,s,i){const o=Math.max(n-1,0),l=this._iconVertexBuffer,c=this._iconIndexBuffer,h=this._markerMap;for(const u of t){const t=s?0:Math.max(n+(0,a.k3)(u.minzoom),o),f=s?25:Math.min(n+(0,a.k3)(u.maxzoom),25);if(f<=t)continue;const d=u.tl,p=u.tr,y=u.bl,g=u.br,x=u.mosaicRect,_=u.labelAngle,m=u.minAngle,b=u.maxAngle,I=u.anchor,w=l.index,M=x.x,T=x.y,k=M+x.width,v=T+x.height,P=l.index;l.add(I.x,I.y,d.x,d.y,M,T,_,m,b,t,f,i),l.add(I.x,I.y,p.x,p.y,k,T,_,m,b,t,f,i),l.add(I.x,I.y,y.x,y.y,M,v,_,m,b,t,f,i),l.add(I.x,I.y,g.x,g.y,k,v,_,m,b,t,f,i),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===P?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([P,4]),c.add(w,w+1,w+2),c.add(w+1,w+2,w+3),h.has(r)?h.get(r)[1]+=6:h.set(r,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,n=this._glyphMap;for(const[r,s]of this._glyphBufferDataStorage)for(const i of s){const s=e.index,a=i.symbolInstance,o=i.ddAttributes,l=e.index;e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tl[0],i.tl[1],i.xmin,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tr[0],i.tr[1],i.xmax,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.bl[0],i.bl[1],i.xmin,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.br[0],i.br[1],i.xmax,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),a.textVertexRanges.length>0&&a.textVertexRanges[0][0]+a.textVertexRanges[0][1]===l?a.textVertexRanges[0][1]+=4:a.textVertexRanges.push([l,4]),t.add(s,s+1,s+2),t.add(s+1,s+2,s+3),n.has(r)?n.get(r)[1]+=6:n.set(r,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,n,r,s){const i=Math.max(n-1,0),o=r===p.aF.VIEWPORT;let l,c,h,u,f,d,y,g,x,_,m;for(const r of t)l=o?0:Math.max(n+(0,a.k3)(r.minzoom),i),c=o?25:Math.min(n+(0,a.k3)(r.maxzoom),25),c<=l||(h=r.tl,u=r.tr,f=r.bl,d=r.br,y=r.labelAngle,g=r.minAngle,x=r.maxAngle,_=r.anchor,m=r.mosaicRect,this._glyphBufferDataStorage.has(r.page)||this._glyphBufferDataStorage.set(r.page,[]),this._glyphBufferDataStorage.get(r.page).push({glyphAnchor:[_.x,_.y],tl:[h.x,h.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:m.x,ymin:m.y,xmax:m.x+m.width,ymax:m.y+m.height,labelAngle:y,minAngle:g,maxAngle:x,minLod:l,maxLod:c,placementLod:i,symbolInstance:e,ddAttributes:s}))}static _pushAnchors(e,t,n,r){n+=r;let s=0;const o=t.length-1;for(let e=0;e<o;e++)s+=i.E9.distance(t[e],t[e+1]);let l=r||n;if(l*=.5,s<=l)return;const c=l/s;let h=0,u=-(n=s/Math.max(Math.round(s/n),1))/2;const f=t.length-1;for(let r=0;r<f;r++){const s=t[r],i=t[r+1],o=i.x-s.x,l=i.y-s.y,f=Math.sqrt(o*o+l*l);let d;for(;u+n<h+f;){u+=n;const t=(u-h)/f,p=(0,a.sX)(s.x,i.x,t),y=(0,a.sX)(s.y,i.y,t);void 0===d&&(d=Math.atan2(l,o)),e.push(new g(p,y,d,r,c))}h+=f}}static _pushCenterAnchor(e,t){let n=0;const r=t.length-1;for(let e=0;e<r;e++)n+=i.E9.distance(t[e],t[e+1]);const s=n/2;let o=0;const l=t.length-1;for(let n=0;n<l;n++){const r=t[n],i=t[n+1],l=i.x-r.x,c=i.y-r.y,h=Math.sqrt(l*l+c*c);if(s<o+h){const t=(s-o)/h,u=(0,a.sX)(r.x,i.x,t),f=(0,a.sX)(r.y,i.y,t),d=Math.atan2(c,l);return void e.push(new g(u,f,d,n,0))}o+=h}}static _deviation(e,t,n){const r=(t.x-e.x)*(n.x-t.x)+(t.y-e.y)*(n.y-t.y),s=(t.x-e.x)*(n.y-t.y)-(t.y-e.y)*(n.x-t.x);return Math.atan2(s,r)}static _honorsTextMaxAngle(e,t,n,r,s){let a=0;const o=n/2;let l=new i.E9(t.x,t.y),c=t.segment+1;for(;a>-o;){if(--c,c<0)return!1;a-=i.E9.distance(e[c],l),l=e[c]}a+=i.E9.distance(e[c],e[c+1]);const h=[];let u=0;const f=e.length;for(;a<o;){const t=e[c];let n,o=c;do{if(++o,o===f)return!1;n=e[o]}while(n.isEqual(t));let l,d=o;do{if(++d,d===f)return!1;l=e[d]}while(l.isEqual(n));const p=this._deviation(t,n,l);for(h.push({deviation:p,distToAnchor:a}),u+=p;a-h[0].distToAnchor>s;)u-=h.shift().deviation;if(Math.abs(u)>r)return!1;a+=i.E9.distance(n,l),c=o}return!0}static _smoothVertices(e,t){if(t<=0)return e;let n=e.length;if(n<3)return e;const r=[];let s=0,a=0;r.push(0);for(let t=1;t<n;t++){const n=i.E9.distance(e[t],e[t-1]);n>0&&(s+=n,r.push(s),a++,a!==t&&(e[a]=e[t]))}if(n=a+1,n<3)return e;t=Math.min(t,.2*s);const o=e[0].x,l=e[0].y,c=e[n-1].x,h=e[n-1].y,u=i.E9.sub(e[0],e[1]);u.normalize(),e[0].x+=t*u.x,e[0].y+=t*u.y,u.assignSub(e[n-1],e[n-2]),u.normalize(),e[n-1].x+=t*u.x,e[n-1].y+=t*u.y,r[0]-=t,r[n-1]+=t;const f=[];f.push(new i.E9(o,l));const d=1e-6,p=.5*t;for(let s=1;s<n-1;s++){let a=0,o=0,l=0;for(let n=s-1;n>=0;n--){const i=p+r[n+1]-r[s];if(i<0)break;const c=r[n+1]-r[n],h=r[s]-r[n]<p?1:i/c;if(h<d)break;const u=h*h,f=h*i-.5*u*c,y=h*c/t,g=e[n+1],x=e[n].x-g.x,_=e[n].y-g.y;a+=y/f*(g.x*h*i+.5*u*(i*x-c*g.x)-u*h*c*x/3),o+=y/f*(g.y*h*i+.5*u*(i*_-c*g.y)-u*h*c*_/3),l+=y}for(let i=s+1;i<n;i++){const n=p-r[i-1]+r[s];if(n<0)break;const c=r[i]-r[i-1],h=r[i]-r[s]<p?1:n/c;if(h<d)break;const u=h*h,f=h*n-.5*u*c,y=h*c/t,g=e[i-1],x=e[i].x-g.x,_=e[i].y-g.y;a+=y/f*(g.x*h*n+.5*u*(n*x-c*g.x)-u*h*c*x/3),o+=y/f*(g.y*h*n+.5*u*(n*_-c*g.y)-u*h*c*_/3),l+=y}f.push(new i.E9(a/l,o/l))}return f.push(new i.E9(c,h)),e[0].x=o,e[0].y=l,e[n-1].x=c,e[n-1].y=h,f}static _pushCentroid(e,t){const n=4096,r=4096,s=t.length-1;let i=0,a=0,o=0,l=t[0].x,c=t[0].y;l>n&&(l=n),l<0&&(l=0),c>r&&(c=r),c<0&&(c=0);for(let e=1;e<s;e++){let s=t[e].x,h=t[e].y,u=t[e+1].x,f=t[e+1].y;s>n&&(s=n),s<0&&(s=0),h>r&&(h=r),h<0&&(h=0),u>n&&(u=n),u<0&&(u=0),f>r&&(f=r),f<0&&(f=0);const d=(s-l)*(f-c)-(u-l)*(h-c);i+=d*(l+s+u),a+=d*(c+h+f),o+=d}i/=3*o,a/=3*o,isNaN(i)||isNaN(a)||e.push(new g(i,a))}}W._bidiEngine=new j.Z,function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.NO_DATA=1]="NO_DATA",e[e.READY=2]="READY",e[e.MODIFIED=3]="MODIFIED",e[e.INVALID=4]="INVALID"}(Z||(Z={}));class Y{constructor(e,t,n,r,s){if(this._pbfTiles={},this._tileClippers={},this._client=n,this._tile=t,s){this._styleLayerUIDs=new Set;for(const e of s)this._styleLayerUIDs.add(e)}this._styleRepository=r,this._layers=this._styleRepository?.layers??[];const[a,o,l]=t.tileKey.split("/").map(parseFloat);this._level=a;const c=8+Math.max(5*(this._level-14),0);for(const t of Object.keys(e)){const n=e[t];if(this._pbfTiles[t]=new M.Z(new Uint8Array(n.protobuff),new DataView(n.protobuff)),n.refKey){const[e]=n.refKey.split("/").map(parseFloat),r=a-e;if(r>0){const e=(1<<r)-1,n=o&e,s=l&e;this._tileClippers[t]=new i.bN(r,n,s,8,c)}}this._tileClippers[t]||(this._tileClippers[t]=new i.I6)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,T.j)(),n=this._initialize(e),{returnedBuckets:r}=n;this._processLayers(n),this._linkReferences(n),this._filterFeatures(n);const s=[],i=new Set,a=(e,t)=>{i.has(e)||(s.push({name:e,repeat:t}),i.add(e))},o={};for(const e of r)e.getResources(e.tileClipper,a,o);if(this._tile.status===Z.INVALID)return[];const l=this._fetchResources(s,o,e);return Promise.all([...l,t]).then((()=>this._processFeatures(n.returnedBuckets)))}_initialize(e){return{signal:e&&e.signal,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(e){const{sourceNameToTileData:t,layers:n,zoom:r,sourceNameToTileClipper:s,sourceNameToUniqueSourceLayerBuckets:i,sourceNameToUniqueSourceLayers:a,returnedBuckets:o,layerIdToBucket:l,referencerUIDToReferencedId:c}=e;for(let e=n.length-1;e>=0;e--){const h=n[e];if(!this._canParseStyleLayer(h.uid)||h.minzoom&&r<Math.floor(h.minzoom)||h.maxzoom&&r>=h.maxzoom||h.type===p.fR.BACKGROUND)continue;if(!t[h.source]||!s[h.source])continue;const u=t[h.source],f=s[h.source],d=h.sourceLayer,y=u[d];if(y){let e=a[h.source];if(e||(e=a[h.source]=new Set),e.add(h.sourceLayer),h.refLayerId)c.set(h.uid,h.refLayerId);else{const e=this._createBucket(h);if(e){e.layerUIDs=[h.uid],e.layerExtent=y.extent,e.tileClipper=f;let t=i[h.source];t||(t=i[h.source]={});let n=t[d];n||(n=t[d]=[]),n.push(e),o.push(e),l[h.id]=e}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:n}=e;n.forEach(((e,n)=>{t[e]&&t[e].layerUIDs.push(n)}))}_filterFeatures(e){const{signal:t,sourceNameToTileData:n,sourceNameToUniqueSourceLayerBuckets:s,sourceNameToUniqueSourceLayers:i}=e,a=10*this._level,o=10*(this._level+1),l=[],c=[];for(const e of Object.keys(i))i[e].forEach((t=>{l.push(t),c.push(e)}));for(let e=0;e<l.length;e++){const i=c[e],h=l[e];if(!n[i]||!s[i])continue;const u=n[i][h],f=s[i][h];if(!f||0===f.length)continue;if((0,r.Hc)(t))return;const d=u.getData();for(;d.nextTag(2);){const e=d.getMessage(),t=new k(e,u);e.release();const n=t.values;if(n){const e=n._minzoom;if(e&&e>=o)continue;const t=n._maxzoom;if(t&&t<=a)continue}for(const e of f)e.pushFeature(t)}}}_fetchResources(e,t,n){const r=[],s=this._tile.getWorkerTileHandler();let i,a;e.length>0&&(i=s.fetchSprites(e,this._client,n),r.push(i));for(const e in t){const i=t[e];i.size>0&&(a=s.fetchGlyphs(this._tile.tileKey,e,i,this._client,n),r.push(a))}return r}_processFeatures(e){const t=e.filter((e=>e.hasFeatures()||this._canParseStyleLayer(e.layer.uid)));for(const e of t)e.processFeatures(e.tileClipper);return t}_parseTileData(e){const t={};for(const n of Object.keys(e)){const r=e[n],s={};for(;r.next();)switch(r.tag()){case 3:{const e=r.getMessage(),t=new L(e);e.release(),s[t.name]=t;break}default:r.skip()}t[n]=s}return t}_createBucket(e){switch(e.type){case p.fR.BACKGROUND:return null;case p.fR.FILL:return this._createFillBucket(e);case p.fR.LINE:return this._createLineBucket(e);case p.fR.CIRCLE:return this._createCircleBucket(e);case p.fR.SYMBOL:return this._createSymbolBucket(e)}}_createFillBucket(e){return new F(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new D(e.fillMaterial.getStride()),new P,new A(e.outlineMaterial.getStride()),new P)}_createLineBucket(e){return new U(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new E(e.lineMaterial.getStride()),new P)}_createCircleBucket(e){return new C(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new S(e.circleMaterial.getStride()),new P)}_createSymbolBucket(e){const t=this._tile;return new W(e,this._level,new B(e.iconMaterial.getStride()),new P,new B(e.textMaterial.getStride()),new P,t.placementEngine,t.getWorkerTileHandler())}}class J{constructor(e,t,n,r){this.status=Z.INITIALIZED,this.placementEngine=new b,this.tileKey=e,this.refKeys=t,this._workerTileHandler=n,this._styleRepository=r}release(){this.tileKey="",this.refKeys=null,this.status=Z.INITIALIZED,this._workerTileHandler=null}async parse(e,t){const n=t&&t.signal;if(null!=n){const e=()=>{n.removeEventListener("abort",e),this.status=Z.INVALID};n.addEventListener("abort",e)}let s;const i={bucketsWithData:[],emptyBuckets:null};try{s=await this._parse(e,t)}catch(e){if((0,r.D_)(e))throw e;return{result:i,transferList:[]}}this.status=Z.READY;const a=i.bucketsWithData,o=[];for(const e of s)if(e.hasFeatures()){const t=e.serialize();a.push(t)}else o.push(e.layer.uid);const l=[...a];let c=null;return o.length>0&&(c=Uint32Array.from(o),l.push(c.buffer)),i.emptyBuckets=c,{result:i,transferList:l}}setObsolete(){this.status=Z.INVALID}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(e,t){const n=e.sourceName2DataAndRefKey;return 0===Object.keys(n).length?[]:(this.status=Z.MODIFIED,new Y(n,this,t.client,this._styleRepository,e.styleLayerUIDs).parse(t))}}var X=n(51785);class Q{constructor(){this._spriteInfo={},this._glyphInfo={}}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){return this._styleRepository?.layers??[]}async createTileAndParse(e,t){const{key:n}=e,s={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const n=e.sourceName2DataAndRefKey[t];s[t]=n.refKey}const i=new J(n,s,this,this._styleRepository);try{return await i.parse(e,t)}catch(e){if(i.setObsolete(),i.release(),!(0,r.D_)(e))throw e;return null}}updateStyle(e){if(!e||0===e.length||!this._styleRepository)return;const t=this._styleRepository;for(const n of e){const e=n.type,r=n.data;switch(e){case s.Fr.PAINTER_CHANGED:t.setPaintProperties(r.layer,r.paint);break;case s.Fr.LAYOUT_CHANGED:t.setLayoutProperties(r.layer,r.layout);break;case s.Fr.LAYER_REMOVED:t.deleteStyleLayer(r.layer);break;case s.Fr.LAYER_CHANGED:t.setStyleLayer(r.layer,r.index);break;case s.Fr.SPRITES_CHANGED:this._spriteInfo={}}}}setStyle(e){this._styleRepository=new X.Z(e),this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,n){const r=[],s=this._spriteInfo;for(const t of e)void 0===s[t.name]&&r.push(t);return 0===r.length?Promise.resolve():t.invoke("getSprites",r,{signal:n&&n.signal}).then((e=>{for(const t in e){const n=e[t];s[t]=n}}))}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,n,r,s){const i=[];let a=this._glyphInfo[t];return a?n.forEach((e=>{a[e]||i.push(e)})):(a=this._glyphInfo[t]=[],n.forEach((e=>i.push(e)))),0===i.length?Promise.resolve():r.invoke("getGlyphs",{tileID:e,font:t,codePoints:i},s).then((e=>{for(let t=0;t<e.length;t++)e[t]&&(a[t]=e[t])}))}getGlyphItems(e){return this._glyphInfo[e]}}}}]);