@arcgis/core 4.24.0-next.20220511 → 4.24.0-next.20220512
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.
- package/assets/components/assets/icon/compactness16.json +1 -0
- package/assets/components/assets/icon/compactness24.json +1 -0
- package/assets/components/assets/icon/compactness32.json +1 -0
- package/assets/components/assets/icon/configure16.json +1 -0
- package/assets/components/assets/icon/configure24.json +1 -0
- package/assets/components/assets/icon/configure32.json +1 -0
- package/assets/components/assets/icon/debugScript16.json +1 -0
- package/assets/components/assets/icon/debugScript24.json +1 -0
- package/assets/components/assets/icon/debugScript32.json +1 -0
- package/assets/components/assets/icon/dissolveFeatures16.json +1 -0
- package/assets/components/assets/icon/dissolveFeatures24.json +1 -0
- package/assets/components/assets/icon/dissolveFeatures32.json +1 -0
- package/assets/components/assets/icon/distanceType16.json +1 -0
- package/assets/components/assets/icon/distanceType24.json +1 -0
- package/assets/components/assets/icon/distanceType32.json +1 -0
- package/assets/components/assets/icon/gridDiamond16.json +1 -0
- package/assets/components/assets/icon/gridDiamond24.json +1 -0
- package/assets/components/assets/icon/gridDiamond32.json +1 -0
- package/assets/components/assets/icon/gridHexagon16.json +1 -0
- package/assets/components/assets/icon/gridHexagon24.json +1 -0
- package/assets/components/assets/icon/gridHexagon32.json +1 -0
- package/assets/components/assets/icon/gridTriangle16.json +1 -0
- package/assets/components/assets/icon/gridTriangle24.json +1 -0
- package/assets/components/assets/icon/gridTriangle32.json +1 -0
- package/assets/components/assets/icon/insets16.json +1 -0
- package/assets/components/assets/icon/insets24.json +1 -0
- package/assets/components/assets/icon/insets32.json +1 -0
- package/assets/components/assets/icon/maximumTerritoryDistance16.json +1 -0
- package/assets/components/assets/icon/maximumTerritoryDistance24.json +1 -0
- package/assets/components/assets/icon/maximumTerritoryDistance32.json +1 -0
- package/assets/components/assets/icon/minDistanceBetweenCenters16.json +1 -0
- package/assets/components/assets/icon/minDistanceBetweenCenters24.json +1 -0
- package/assets/components/assets/icon/minDistanceBetweenCenters32.json +1 -0
- package/assets/components/assets/icon/numberOfTerritories16.json +1 -0
- package/assets/components/assets/icon/numberOfTerritories24.json +1 -0
- package/assets/components/assets/icon/numberOfTerritories32.json +1 -0
- package/assets/components/assets/icon/overlapFeatures16.json +1 -0
- package/assets/components/assets/icon/overlapFeatures24.json +1 -0
- package/assets/components/assets/icon/overlapFeatures32.json +1 -0
- package/assets/components/assets/icon/profileVariables16.json +1 -0
- package/assets/components/assets/icon/profileVariables24.json +1 -0
- package/assets/components/assets/icon/profileVariables32.json +1 -0
- package/assets/components/assets/icon/rasterAnalysis16.json +1 -0
- package/assets/components/assets/icon/rasterAnalysis24.json +1 -0
- package/assets/components/assets/icon/rasterAnalysis32.json +1 -0
- package/assets/components/assets/icon/recurrence16.json +1 -0
- package/assets/components/assets/icon/recurrence24.json +1 -0
- package/assets/components/assets/icon/recurrence32.json +1 -0
- package/assets/components/assets/icon/splitFeatures16.json +1 -0
- package/assets/components/assets/icon/splitFeatures24.json +1 -0
- package/assets/components/assets/icon/splitFeatures32.json +1 -0
- package/assets/components/assets/icon/territoryBufferDistance16.json +1 -0
- package/assets/components/assets/icon/territoryBufferDistance24.json +1 -0
- package/assets/components/assets/icon/territoryBufferDistance32.json +1 -0
- package/assets/components/assets/icon/testData16.json +1 -0
- package/assets/components/assets/icon/testData24.json +1 -0
- package/assets/components/assets/icon/testData32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/07eda3e958d29f86b37e.js +1 -0
- package/assets/esri/core/workers/chunks/0ecaa28b8bff1d779d66.js +1 -0
- package/assets/esri/core/workers/chunks/{adae54f116f311d72d97.js → 1aba8c73c62a64e0658c.js} +1 -1
- package/assets/esri/core/workers/chunks/1d109cd048170e2d529a.js +1 -0
- package/assets/esri/core/workers/chunks/366e5c1abd1ab6d3e548.js +1 -0
- package/assets/esri/core/workers/chunks/3e94e35f44aadbb332ff.js +1 -0
- package/assets/esri/core/workers/chunks/46411f32b29a0e783105.js +1 -0
- package/assets/esri/core/workers/chunks/4d1c87e3e0a02efcc082.js +1 -0
- package/assets/esri/core/workers/chunks/{b089058b64db3912478f.js → 5e46e60fab93ad034d3a.js} +1 -1
- package/assets/esri/core/workers/chunks/6281b15009712a5dee3c.js +1 -0
- package/assets/esri/core/workers/chunks/66f627d68dbb0fdb725f.js +1 -0
- package/assets/esri/core/workers/chunks/672da24bbf86718bf48d.js +1 -0
- package/assets/esri/core/workers/chunks/733625d85602127d62cd.js +1 -0
- package/assets/esri/core/workers/chunks/{c51c9b5da855f84b9a48.js → 7391422fc51acb96a25d.js} +1 -1
- package/assets/esri/core/workers/chunks/{f435dc615fdc8917f6ca.js → 7cf3cff7b28ff007dbad.js} +1 -1
- package/assets/esri/core/workers/chunks/7ea06c86adfc827fda08.js +1 -0
- package/assets/esri/core/workers/chunks/{a054a52712a118c6d505.js → 82bc24bdc9c6ebaf58c0.js} +1 -1
- package/assets/esri/core/workers/chunks/8965ab74e03506e3475e.js +1 -0
- package/assets/esri/core/workers/chunks/{5405f478af3563580926.js → 8b497d9c37a8f577a467.js} +1 -1
- package/assets/esri/core/workers/chunks/919d0d8b1c2176760973.js +1 -0
- package/assets/esri/core/workers/chunks/ab2a0480dc2b608deda3.js +1 -0
- package/assets/esri/core/workers/chunks/ab97a35f7a7d5cf1da19.js +2 -0
- package/assets/esri/core/workers/chunks/{dcd0653191cd4a1ccaae.js.LICENSE.txt → ab97a35f7a7d5cf1da19.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/ae554c88e862a5761f2e.js +1 -0
- package/assets/esri/core/workers/chunks/ae5ce55cd1a32525f101.js +1 -0
- package/assets/esri/core/workers/chunks/b597c04a4abb98e29d1c.js +1 -0
- package/assets/esri/core/workers/chunks/{287c484fd40eee643f3a.js → b78c3e9d31c4a562cdf0.js} +1 -1
- package/assets/esri/core/workers/chunks/be4bf1e4cbe2a593f8b3.js +1 -0
- package/assets/esri/core/workers/chunks/{b7572b0921b23aef8b9d.js → c40d9caf5189be2c698e.js} +1 -1
- package/assets/esri/core/workers/chunks/{b28539c5a6bedb71b038.js → d63f736b3560c577a8a4.js} +1 -1
- package/assets/esri/core/workers/chunks/d869dabe937d3b60504e.js +1 -0
- package/assets/esri/core/workers/chunks/dd6c9a114ad38cf622ba.js +1 -0
- package/assets/esri/core/workers/chunks/e6b0f74226b9394bfa7a.js +1 -0
- package/assets/esri/themes/base/widgets/_Editor.scss +3 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip.json +1 -0
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_en.json +1 -0
- package/chunks/EdgeShader.glsl.js +3 -4
- package/interfaces.d.ts +463 -30
- package/layers/FeatureLayer.js +1 -1
- package/layers/GeoJSONLayer.js +1 -1
- package/layers/OGCFeatureLayer.js +1 -1
- package/layers/RouteLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/WFSLayer.js +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/support/AggregateField.d.ts +4 -0
- package/layers/support/AggregateField.js +1 -1
- package/layers/support/FeatureReductionBinning.d.ts +4 -0
- package/layers/support/FeatureReductionBinning.js +1 -1
- package/layers/support/OutStatistic.d.ts +4 -0
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
- package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
- package/layers/support/rasterFormats/TiffDecoder.js +1 -1
- package/package.json +3 -3
- package/portal/support/portalItemUtils.js +1 -1
- package/renderers/PieChartRenderer.d.ts +4 -0
- package/renderers/PieChartRenderer.js +5 -0
- package/renderers/Renderer.js +1 -1
- package/renderers/support/AuthoringInfo.js +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/clickToleranceUtils.js +1 -1
- package/renderers/support/rasterRendererHelper.js +1 -1
- package/renderers/support/types.js +1 -1
- package/renderers/support/utils.js +1 -1
- package/renderers.js +1 -1
- package/request.js +1 -1
- package/rest/imageService/fetchRasterInfo.js +5 -0
- package/rest/imageService/getCatalogItemRasterInfo.js +5 -0
- package/rest/print.js +1 -1
- package/smartMapping/renderers/color.js +1 -1
- package/smartMapping/renderers/dotDensity.js +1 -1
- package/smartMapping/renderers/heatmap.js +1 -1
- package/smartMapping/renderers/location.js +1 -1
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/type.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/CurveHelper.js +1 -1
- package/symbols/cim/ExpandedCIM.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
- package/views/2d/engine/brushes.js +1 -1
- package/views/2d/engine/vectorTiles/GlyphSource.js +1 -1
- package/views/2d/engine/vectorTiles/style/Filter.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/Utils.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushPieChart.js +5 -0
- package/views/2d/engine/webgl/brushes/WGLGeometryBrush.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLGeometryBrushFill.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLGeometryBrushMarker.js +1 -1
- package/views/2d/engine/webgl/color.js +1 -1
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/enums.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLBaseFillTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLBaseLineTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLDynamicFillTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLMarkerTemplate.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/techniques/dotDensity/TechniqueDotDensity.js +1 -1
- package/views/2d/engine/webgl/techniques/pieChart/TechniquePieChart.js +5 -0
- package/views/2d/engine/webgl/techniques/utils.js +1 -1
- package/views/2d/engine/webgl/util/Matcher.js +1 -1
- package/views/2d/layers/features/schemaUtils.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js +1 -1
- package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/3d/analysis/Dimensioning/DimensioningTool.js +1 -1
- package/views/3d/analysis/Dimensioning/LengthDimensionVisualization.js +1 -1
- package/views/3d/environment/SnowyWeather.d.ts +4 -0
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +5 -5
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +37 -31
- package/views/draw/DrawOperation.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/SceneSnappingEngine.js +5 -0
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/snappingFactory.js +5 -0
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup/actionUtils.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0564f1cfa3d17ff1aad3.js +0 -1
- package/assets/esri/core/workers/chunks/0806d5d706a864542bfb.js +0 -1
- package/assets/esri/core/workers/chunks/52478ee2d2a1354b6900.js +0 -1
- package/assets/esri/core/workers/chunks/5759af97f96f24c40105.js +0 -1
- package/assets/esri/core/workers/chunks/7bc828fbdd54c0b28aac.js +0 -1
- package/assets/esri/core/workers/chunks/875f26ee040f3d75c0db.js +0 -1
- package/assets/esri/core/workers/chunks/88384e7cafbfd2348598.js +0 -1
- package/assets/esri/core/workers/chunks/89acd5f888d6b8df4aad.js +0 -1
- package/assets/esri/core/workers/chunks/9d7533aaeac3b8d145c4.js +0 -1
- package/assets/esri/core/workers/chunks/a3bb600bfcb0282622f1.js +0 -1
- package/assets/esri/core/workers/chunks/b50ae3dc7e43ff452568.js +0 -1
- package/assets/esri/core/workers/chunks/b5b7bcbc19b3430903ee.js +0 -1
- package/assets/esri/core/workers/chunks/b758f3c419edc2306784.js +0 -1
- package/assets/esri/core/workers/chunks/cf47b605c31063e88357.js +0 -1
- package/assets/esri/core/workers/chunks/cfbb332d144e65a4a55d.js +0 -1
- package/assets/esri/core/workers/chunks/db937849b2c1af87b481.js +0 -1
- package/assets/esri/core/workers/chunks/dc3ed59f450283d97a19.js +0 -1
- package/assets/esri/core/workers/chunks/dcd0653191cd4a1ccaae.js +0 -2
- package/assets/esri/core/workers/chunks/dfb6a28039e5d5ce6fd4.js +0 -1
- package/assets/esri/core/workers/chunks/e4fdd1eaf987977d0a51.js +0 -1
- package/assets/esri/core/workers/chunks/f7e0bb11ba3677069c94.js +0 -1
- package/assets/esri/core/workers/chunks/f7f3dde4c8f9c687cc1e.js +0 -1
- package/assets/esri/core/workers/chunks/fc6beaf9466ea3898549.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3974,4889],{78346:(e,t,r)=>{r.d(t,{bA:()=>M});var n=r(20102),o=r(80442),s=r(95330),i=r(80903),a=r(25045),l=r(40330),u=r(92604),p=r(70586),c=r(94362),d=r(99880),f=r(68773),y=(r(2587),r(17452));const m={};function h(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=m.baseUrl),m.packages?.forEach((e=>{!function(e,t){for(const r of e)if(r.name===t.name)return;e.push(t)}(t.packages,e)})),t}var g=r(41213);class w{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class b{constructor(){this._dispatcher=new w,this._workerPostMessage({type:c.Cs.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,g.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,g.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,c.QM)(e);if(t&&t.type===c.Cs.OPEN){const{modulePath:e,jobId:r}=t;let n=await a.default.loadWorker(e);n||(n=await import(e));const o=a.default.connect(n);this._workerPostMessage({type:c.Cs.OPENED,jobId:r,data:o})}}}var v=r(70171),S=r(17202);const C=u.Z.getLogger("esri.core.workers"),{HANDSHAKE:x}=c.Cs;let _,P;const E="Failed to create Worker. Fallback to execute module in main thread";async function F(e){return new Promise((t=>{function r(o){const s=(0,c.QM)(o);s&&s.type===x&&(e.removeEventListener("message",r),e.removeEventListener("error",n),t(e))}function n(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",n),C.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new b).addEventListener("message",r),e.addEventListener("error",n)}e.addEventListener("message",r),e.addEventListener("error",n)}))}let I=0;const k=u.Z.getLogger("esri.core.workers"),{ABORT:O,INVOKE:R,OPEN:N,OPENED:L,RESPONSE:j}=c.Cs;class T{constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),k.error(e)}))}static async create(e){const t=await async function(){if(!(0,o.Z)("esri-workers")||((0,o.Z)("mozilla"),0))return F(new b);if(!_&&!P)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,buildDate:r,version:t}=configuration.kernelInfo,{revision:n,buildDate:i,version:s}=e.kernelInfo;o!==n&&console.warn(`[esri.core.workers] Version mismatch detected between ArcGIS API for JavaScript and assets:\\nAPI version: ${t} [Date: ${r}, Revision: ${o.slice(0,8)}]\nAssets version: ${s} [Date: ${i}, Revision: ${n.slice(0,8)}]`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let e;function t(o){const t=e.connect(o);self.postMessage({type:2,jobId:r,data:t},[t])}"function"==typeof define&&define.amd?require([workerPath],(r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((r=>(e=r.default,checkWorkerRevision(e),e.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),e=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(e),e.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const e=outgoing.get(r);outgoing.delete(r),o.error?e.reject(JSON.parse(o.error)):e.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.replace('"{CONFIGURATION}"',`'${function(){let e;if(null!=f.Z.default){const t={...f.Z};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(f.Z));e.assetsPath=(0,y.hF)(e.assetsPath),e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,v.Kd)(),e.has={"esri-csp-restrictions":(0,o.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,o.Z)("esri-2d-update-debug"),"esri-2d-query-centroid-enabled":(0,o.Z)("esri-2d-query-centroid-enabled"),"featurelayer-pbf":(0,o.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,o.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,o.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,o.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,o.Z)("esri-atomics"),"esri-shared-array-buffer":(0,o.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,o.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,o.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,o.Z)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,y.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,y.hF)(e.workers.workerPath):e.workers.workerPath=(0,y.hF)((0,d.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.Z.workers.loaderConfig,r=h({baseUrl:t?.baseUrl,locale:(0,v.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),n={version:l.i8,buildDate:S.r,revision:S.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:n})}()}'`);_=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){P=e||{}}let e;if(_)try{e=new Worker(_,{name:"esri-worker-"+I++})}catch(t){C.warn(E,P),e=new b}else C.warn(E,P),e=new b;return F(e)}();return new T(t,e)}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,n=(0,c.jt)();return new Promise(((t,o)=>{const i={resolve:t,reject:o,abortHandle:(0,s.$F)(r,(()=>{this._outJobs.delete(n),this._post({type:O,jobId:n})}))};this._outJobs.set(n,i),this._post({type:N,jobId:n,modulePath:e})}))}_onMessage(e){const t=(0,c.QM)(e);if(t)switch(t.type){case L:this._onOpenedMessage(t);break;case j:this._onResponseMessage(t);break;case O:this._onAbortMessage(t);break;case R:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);n&&(n.controller&&n.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:o}=e,i=o?new AbortController:null,a=this._inJobs,u=l.Nv[t];let p;try{if("function"!=typeof u)throw new TypeError(`${t} is not a function`);p=u.call(null,n,{signal:i?i.signal:null})}catch(e){return void this._post({type:j,jobId:r,error:(0,c.AB)(e)})}(0,s.y8)(p)?(a.set(r,{controller:i,promise:p}),p.then((e=>{a.has(r)&&(a.delete(r),this._post({type:j,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,s.D_)(e)||this._post({type:j,jobId:r,error:(0,c.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:j,jobId:r},p)}_onOpenedMessage(e){const{jobId:t,data:r}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,p.hw)(n.abortHandle),n.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:o}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,p.hw)(s.abortHandle),r?s.reject(n.Z.fromJSON(JSON.parse(r))):s.resolve(o))}_post(e,t,r){return(0,c.oi)(this.worker,e,t,r)}}let Z=(0,o.Z)("esri-workers-debug")?1:(0,o.Z)("host-browser")?navigator.hardwareConcurrency-1:0;Z||(Z=(0,o.Z)("safari")&&(0,o.Z)("mac")||(0,o.Z)("trident")?7:2);let A=0;const D=[];async function U(e,t){const r=new i.Z;return await r.open(e,t),r}async function M(e,t={}){if("string"!=typeof e)throw new n.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,o.Z)("host-webworker")&&!(0,o.Z)("esri-workers")&&(r="local"),"local"===r){let r=await a.default.loadWorker(e);r||(r=await import(e)),(0,s.k_)(t.signal);const n=t.client||r;return U([a.default.connect(r)],{...t,client:n})}if(await async function(){if(q)return q;$=new AbortController;const e=[];for(let t=0;t<Z;t++){const r=T.create(t).then((e=>(D[t]=e,e)));e.push(r)}return q=Promise.all(e),q}(),(0,s.k_)(t.signal),"dedicated"===r){const r=A++%Z;return U([await D[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,Z);if(r<Z){const n=new Array(r);for(let o=0;o<r;++o){const r=A++%Z;n[o]=D[r].open(e,t)}return U(n,t)}}return U(D.map((r=>r.open(e,t))),t)}let $,q=null},2587:(e,t,r)=>{r(90344),r(18848),r(940),r(70171);var n=r(94443),o=r(3172),s=r(20102),i=r(70586);async function a(e){if((0,i.pC)(u.fetchBundleAsset))return u.fetchBundleAsset(e);const t=await(0,o.default)(e,{responseType:"text"});return JSON.parse(t.data)}class l{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let n;n="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=n,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,o){const i=t.exec(r);if(!i)throw new s.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=i[1]?`${i[1]}/`:"",u=i[2],p=(0,n.Su)(o),c=`${l}${u}.json`,d=p?`${l}${u}_${p}.json`:c;let f;try{f=await a(e(d))}catch(t){if(d===c)throw new s.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{f=await a(e(c))}catch(e){throw new s.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return f}(this.getAssetUrl,this.matcher,e,t)}}const u={};var p,c=r(99880);(0,n.tz)((p={pattern:"esri/",location:c.V},new l(p)))},940:(e,t,r)=>{r.d(t,{n:()=>u});var n=r(92604),o=r(78286),s=r(19153),i=r(90344),a=r(18848);const l=n.Z.getLogger("esri.intl");function u(e,t,r={}){const{format:n={}}=r;return(0,s.gx)(e,(e=>function(e,t,r){let n,s;const i=e.indexOf(":");if(-1===i?n=e.trim():(n=e.slice(0,i).trim(),s=e.slice(i+1).trim()),!n)return"";const a=(0,o.hS)(n,t);if(null==a)return"";const l=r[s]||r[n];return l?p(a,l):s?c(a,s):d(a)}(e,t,n)))}function p(e,t){switch(t.type){case"date":return(0,i.p6)(e,t.intlOptions);case"number":return(0,a.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),d(e)}}function c(e,t){switch(t.toLowerCase()){case"dateformat":return(0,i.p6)(e);case"numberformat":return(0,a.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,i.p6)(e):/^numberformat/i.test(t)?(0,a.uf)(e):d(e)}}function d(e){switch(typeof e){case"string":return e;case"number":return(0,a.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,i.p6)(e):""}}},12653:(e,t,r)=>{r.r(t),r.d(t,{default:()=>V});var n=r(43697),o=(r(66577),r(51773)),s=(r(16050),r(12501),r(28756),r(92271),r(18746),r(5499),r(84382),r(30687),r(91423),r(32400)),i=r(70586),a=r(16453),l=r(78286),u=r(17452),p=r(5600),c=(r(67676),r(80442)),d=r(75215),f=r(52011),y=r(30556),m=r(86973),h=r(87085),g=r(20102),w=r(3920),b=r(83379),v=r(95330),S=r(78346),C=r(25278),x=r(51432),_=r(74889),P=r(6570);let E=class extends((0,w.p)(b.Z)){constructor(){super(...arguments),this.capabilities=(0,C.MS)(!1,!1),this.type="wfs",this.refresh=(0,v.Ds)((async e=>{await this.load();const{extent:t}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,{dataChanged:!0,updates:{extent:this.sourceJSON.extent}}}))}load(e){const t=((0,i.pC)(e)&&e.signal)??null;return this.addResolvingPromise(this._startWorker({signal:t})),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return _.default.fromJSON(r)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._connection.invoke("queryFeatures",e?e.toJSON():null,t)}async queryFeatureCount(e,t={}){return await this.load(t),this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)}async queryObjectIds(e,t={}){return await this.load(t),this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)}async queryExtent(e,t={}){await this.load(t);const r=await this._connection.invoke("queryExtent",e?e.toJSON():null,t);return{count:r.count,extent:P.Z.fromJSON(r.extent)}}async querySnapping(e,t={}){return await this.load(t),this._connection.invoke("querySnapping",e,t)}async _createLoadOptions(e){const{url:t,customParameters:r,name:n,namespaceUri:o,spatialReference:s,fields:a,geometryType:l,swapXY:u}=this.layer;if(!t)throw new g.Z("wfs-layer:missing-url","WFSLayer must be created with a url");this.wfsCapabilities||(this.wfsCapabilities=await(0,x.FU)(t,{customParameters:r,...e}));const p=["fields","geometryType","name","namespaceUri","spatialReference","swapXY"].some((e=>null==this.layer[e])),c=p?await(0,x.be)(this.wfsCapabilities,n,o,{spatialReference:s,customParameters:r,signal:e?.signal}):{...(0,x.eB)(a),geometryType:l,name:n,namespaceUri:o,spatialReference:s,swapXY:u},d=(0,i.Wg)((0,x.ft)(this.wfsCapabilities.readFeatureTypes(),c.name,c.namespaceUri)),f=m.Mk.toJSON(c.geometryType);return{customParameters:r,featureType:d,fields:c.fields.map((e=>e.toJSON())),geometryField:c.geometryField,geometryType:f,getFeatureUrl:this.wfsCapabilities.operations.GetFeature.url,getFeatureOutputFormat:this.wfsCapabilities.operations.GetFeature.outputFormat,objectIdField:c.objectIdField,spatialReference:c.spatialReference.toJSON(),swapXY:c.swapXY}}async _startWorker(e){const[t,r]=await(0,v.as)([this._createLoadOptions(e),(0,S.bA)("WFSSourceWorker",{...e,strategy:(0,c.Z)("feature-layers-workers")?"dedicated":"local"})]),n=t.error||r.error||null,o=r.value||null;if(n)throw o&&o.close(),n;const s=t.value;this._connection=r.value;const{extent:i}=await this._connection.invoke("load",s,e);this.sourceJSON={extent:i,fields:s.fields,geometryType:s.geometryType,objectIdField:s.objectIdField,geometryField:s.geometryField,drawingInfo:(0,C.bU)(s.geometryType),name:s.featureType.title,wfsInfo:{name:s.featureType.name,featureUrl:s.getFeatureUrl,maxFeatures:3e3,swapXY:s.swapXY,supportedSpatialReferences:s.featureType.supportedSpatialReferences,version:"2.0.0",wfsNamespace:s.featureType.namespaceUri}}}};(0,n._)([(0,p.Cb)()],E.prototype,"capabilities",void 0),(0,n._)([(0,p.Cb)({constructOnly:!0})],E.prototype,"layer",void 0),(0,n._)([(0,p.Cb)()],E.prototype,"sourceJSON",void 0),(0,n._)([(0,p.Cb)()],E.prototype,"type",void 0),(0,n._)([(0,p.Cb)()],E.prototype,"wfsCapabilities",void 0),E=(0,n._)([(0,f.j)("esri.layers.graphics.sources.WFSSource")],E);var F,I=r(71612),k=r(17017),O=r(69637),R=r(38009),N=r(68825),L=r(16859),j=r(34760),T=r(72965),Z=r(28294),A=r(21506),D=r(2075),U=r(1231),M=r(53518),$=r(35671),q=r(2319),G=r(30707),J=r(57444),W=r(32163),H=r(82971);const B=(0,M.v)();let z=F=class extends((0,N.c)((0,k.N)((0,O.b)((0,I.h)((0,Z.n)((0,j.Q)((0,T.M)((0,R.q)((0,L.I)((0,a.R)(h.Z))))))))))){constructor(e){super(e),this.capabilities=null,this.copyright=null,this.customParameters=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.featureReduction=null,this.featureUrl=void 0,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="WFS",this.maxFeatures=3e3,this.mode=0,this.name=null,this.namespaceUri=null,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new E({layer:this}),this.spatialReference=H.Z.WGS84,this.spatialReferences=[4326],this.swapXY=void 0,this.title="WFS",this.type="wfs",this.url=null,this.version=void 0}static fromWFSLayerInfo(e){const{customParameters:t,fields:r,geometryField:n,geometryType:o,name:s,namespaceUri:i,objectIdField:a,spatialReference:l,swapXY:u,url:p,wfsCapabilities:c}=e;return new F({customParameters:t,fields:r,geometryField:n,geometryType:o,name:s,namespaceUri:i,objectIdField:a,spatialReference:l,swapXY:u,url:p,wfsCapabilities:c})}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]},e).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo","spatialReference","name","namespaceUri"],"service"),(0,$.YN)(this.renderer,this.fieldsIndex),(0,$.UF)(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r){const n=e.filter((e=>e.name!==x.M8));this.geometryField&&n.unshift(new U.Z({name:this.geometryField,alias:this.geometryField,type:"geometry"})),(0,l.RB)(r,n.map((e=>e.toJSON())),t)}get parsedUrl(){return this.url?(0,u.mN)(this.url):null}set renderer(e){(0,$.YN)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,W.eZ)(this,e)}createQuery(){const e=new J.Z;e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:t,timeExtent:r}=this;return e.timeExtent=null!=t&&null!=r?r.offset(-t.value,t.unit):r||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(J.Z.from(e)||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(J.Z.from(e)||this.createQuery(),t)))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(J.Z.from(e)||this.createQuery(),t)))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(J.Z.from(e)||this.createQuery(),t)))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return(0,i.pC)(t)&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,n._)([(0,p.Cb)({readOnly:!0,aliasOf:"source.capabilities"})],z.prototype,"capabilities",void 0),(0,n._)([(0,p.Cb)({type:String})],z.prototype,"copyright",void 0),(0,n._)([(0,p.Cb)({readOnly:!0})],z.prototype,"createQueryVersion",null),(0,n._)([(0,p.Cb)({json:{name:"wfsInfo.customParameters",write:{ignoreOrigin:!0}}})],z.prototype,"customParameters",void 0),(0,n._)([(0,p.Cb)({readOnly:!0})],z.prototype,"defaultPopupTemplate",null),(0,n._)([(0,p.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],z.prototype,"definitionExpression",void 0),(0,n._)([(0,p.Cb)({type:String})],z.prototype,"displayField",void 0),(0,n._)([(0,p.Cb)(A.PV)],z.prototype,"elevationInfo",void 0),(0,n._)([(0,p.Cb)(D.d)],z.prototype,"featureReduction",void 0),(0,n._)([(0,p.Cb)({type:String,readOnly:!0,json:{name:"wfsInfo.featureUrl",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"featureUrl",void 0),(0,n._)([(0,p.Cb)({type:[U.Z],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],z.prototype,"fields",void 0),(0,n._)([(0,y.c)("fields")],z.prototype,"writeFields",null),(0,n._)([(0,p.Cb)(B.fieldsIndex)],z.prototype,"fieldsIndex",void 0),(0,n._)([(0,p.Cb)({type:P.Z,json:{name:"extent"}})],z.prototype,"fullExtent",void 0),(0,n._)([(0,p.Cb)()],z.prototype,"geometryField",void 0),(0,n._)([(0,p.Cb)({type:String,json:{read:{source:"layerDefinition.geometryType",reader:m.Mk.read},write:{target:"layerDefinition.geometryType",writer:m.Mk.write,ignoreOrigin:!0},origins:{service:{read:m.Mk.read}}}})],z.prototype,"geometryType",void 0),(0,n._)([(0,p.Cb)({type:String})],z.prototype,"id",void 0),(0,n._)([(0,p.Cb)(A.iR)],z.prototype,"labelsVisible",void 0),(0,n._)([(0,p.Cb)({type:[q.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:G.r},write:!0}})],z.prototype,"labelingInfo",void 0),(0,n._)([(0,p.Cb)(A.rn)],z.prototype,"legendEnabled",void 0),(0,n._)([(0,p.Cb)({type:["show","hide"]})],z.prototype,"listMode",void 0),(0,n._)([(0,p.Cb)({type:String})],z.prototype,"objectIdField",void 0),(0,n._)([(0,p.Cb)({type:["WFS"]})],z.prototype,"operationalLayerType",void 0),(0,n._)([(0,p.Cb)({type:d.z8,json:{name:"wfsInfo.maxFeatures",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"maxFeatures",void 0),(0,n._)([(0,p.Cb)({type:[0],readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],z.prototype,"mode",void 0),(0,n._)([(0,p.Cb)({type:String,json:{name:"wfsInfo.name",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"name",void 0),(0,n._)([(0,p.Cb)({type:String,json:{name:"wfsInfo.wfsNamespace",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"namespaceUri",void 0),(0,n._)([(0,p.Cb)(A.bT)],z.prototype,"opacity",void 0),(0,n._)([(0,p.Cb)(B.outFields)],z.prototype,"outFields",void 0),(0,n._)([(0,p.Cb)({readOnly:!0})],z.prototype,"parsedUrl",null),(0,n._)([(0,p.Cb)(A.C_)],z.prototype,"popupEnabled",void 0),(0,n._)([(0,p.Cb)({type:o.Z,json:{name:"popupInfo",write:!0}})],z.prototype,"popupTemplate",void 0),(0,n._)([(0,p.Cb)({types:s.A,json:{origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:s.o,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:{ignoreOrigin:!0}}})],z.prototype,"renderer",null),(0,n._)([(0,p.Cb)(A.YI)],z.prototype,"screenSizePerspectiveEnabled",void 0),(0,n._)([(0,p.Cb)({readOnly:!0})],z.prototype,"source",void 0),(0,n._)([(0,p.Cb)({type:H.Z,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"extent.spatialReference"}}}})],z.prototype,"spatialReference",void 0),(0,n._)([(0,p.Cb)({readOnly:!0,type:[d.z8],json:{name:"wfsInfo.supportedSpatialReferences",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"spatialReferences",void 0),(0,n._)([(0,p.Cb)({type:Boolean,value:!1,json:{name:"wfsInfo.swapXY",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"swapXY",void 0),(0,n._)([(0,p.Cb)({json:{write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"name"}}}})],z.prototype,"title",void 0),(0,n._)([(0,p.Cb)({json:{read:!1},readOnly:!0})],z.prototype,"type",void 0),(0,n._)([(0,p.Cb)(A.HQ)],z.prototype,"url",void 0),(0,n._)([(0,p.Cb)({type:String,readOnly:!0,json:{name:"wfsInfo.version",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"version",void 0),(0,n._)([(0,p.Cb)({aliasOf:"source.wfsCapabilities"})],z.prototype,"wfsCapabilities",void 0),z=F=(0,n._)([(0,f.j)("esri.layers.WFSLayer")],z);const V=z},61159:(e,t,r)=>{r.d(t,{g:()=>n});const n={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},92722:(e,t,r)=>{r.d(t,{O3:()=>S,lG:()=>x,my:()=>C,q9:()=>l});var n=r(20102),o=r(70272),s=r(5428),i=r(35671);const a={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function l(e){return a[e]}function*u(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*p(e){if(!e)return null;switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function c(e){for(const t of e)if(t.length>2)return!0;return!1}function d(e){let t=0;for(let r=0;r<e.length;r++){const n=e[r],o=e[(r+1)%e.length];t+=n[0]*o[1]-o[0]*n[1]}return t<=0}function f(e){const t=e[0],r=e[e.length-1];return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]||e.push(t),e}function y(e,t,r){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,r){return g(e,t.coordinates,r),e}(e,t,r);case"MultiLineString":return function(e,t,r){for(const n of t.coordinates)g(e,n,r);return e}(e,t,r);case"MultiPolygon":return function(e,t,r){for(const n of t.coordinates){m(e,n[0],r);for(let t=1;t<n.length;t++)h(e,n[t],r)}return e}(e,t,r);case"Point":return function(e,t,r){return b(e,t.coordinates,r),e}(e,t,r);case"Polygon":return function(e,t,r){const n=t.coordinates;m(e,n[0],r);for(let t=1;t<n.length;t++)h(e,n[t],r);return e}(e,t,r)}}function m(e,t,r){const n=f(t);!function(e){return!d(e)}(n)?g(e,n,r):w(e,n,r)}function h(e,t,r){const n=f(t);!function(e){return d(e)}(n)?g(e,n,r):w(e,n,r)}function g(e,t,r){for(const n of t)b(e,n,r);e.lengths.push(t.length)}function w(e,t,r){for(let n=t.length-1;n>=0;n--)b(e,t[n],r);e.lengths.push(t.length)}function b(e,t,r){const[n,o,s]=t;e.coords.push(n,o),r.hasZ&&e.coords.push(s||0)}function v(e){switch(typeof e){case"string":return"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function S(e){if(!e)throw new n.Z("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new n.Z("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:t}=e;if(!t)return;const r="string"==typeof t?t:"name"===t.type?t.properties.name:"EPSG"===t.type?t.properties.code:null,o=new RegExp(".*(CRS84H?|4326)$","i");if(!r||!o.test(r))throw new n.Z("geojson-layer:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:t})}function C(e,t={}){const r=[],n=new Set,o=new Set;let s,a=!1,d=null,f=!1,{geometryType:y=null}=t,m=!1;for(const t of u(e)){const{geometry:e,properties:i,id:u}=t;if((!e||(y||(y=l(e.type)),l(e.type)===y))&&(a||(a=c(p(e))),f||(f=null!=u,f&&(s=typeof u,d=Object.keys(i).filter((e=>i[e]===u)))),f&&null!=u&&(d.length>1?d=d.filter((e=>i[e]===u)):1===d.length&&(d=i[d[0]]===u?d:[])),!m&&i)){let e=!0;for(const t in i){if(n.has(t))continue;const s=i[t];if(null==s){e=!1,o.add(t);continue}const a=v(s);"unknown"!==a?(o.delete(t),n.add(t),r.push({name:t,alias:t,type:a})):o.add(t)}m=e}}const h=d&&1===d.length&&d[0]||null;if(h)for(const e of r)if(e.name===h&&(0,i.H7)(e)){e.type="esriFieldTypeOID";break}return{fields:r,geometryType:y,hasZ:a,objectIdFieldName:h,objectIdFieldType:s,unknownFields:Array.from(o)}}function x(e,t){return Array.from(function*(e,t={}){const{geometryType:r,objectIdField:n}=t;for(const i of e){const{geometry:e,properties:a,id:u}=i;if(e&&l(e.type)!==r)continue;const p=a||{};let c=p[n]??null;n&&null!=u&&!p[n]&&(p[n]=c=u);const d=new o.u_(e?y(new s.Z,e,t):null,p,null,c);yield d}}(u(e),t))}},25278:(e,t,r)=>{r.d(t,{Dm:()=>p,Hq:()=>c,MS:()=>d,bU:()=>a});var n=r(80442),o=r(22974),s=r(61159),i=r(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.I4:"esriGeometryPolyline"===e?i.ET:i.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,n.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new n}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,o.d9)(e)}}]}function d(e,t){return{attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:s.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}}},17017:(e,t,r)=>{r.d(t,{N:()=>i});var n=r(43697),o=r(5600),s=(r(67676),r(80442),r(75215),r(52011));const i=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,n._)([(0,o.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,n._)([(0,s.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},68825:(e,t,r)=>{r.d(t,{c:()=>m});var n,o=r(43697),s=r(78286),i=r(5600),a=(r(67676),r(80442),r(75215),r(52011)),l=r(35454),u=r(96674);const p=new l.X({asc:"ascending",desc:"descending"});let c=n=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new n({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o._)([(0,i.Cb)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,o._)([(0,i.Cb)({type:String,json:{write:!0}})],c.prototype,"valueExpression",void 0),(0,o._)([(0,i.Cb)({type:p.apiValues,json:{read:p.read,write:p.write}})],c.prototype,"order",void 0),c=n=(0,o._)([(0,a.j)("esri.layers.support.OrderByInfo")],c);const d=c;function f(e,t,r){if(!e)return null;const n=e.find((e=>!!e.field));if(!n)return null;const o=new d;return o.read(n,r),[o]}function y(e,t,r,n){const o=e.find((e=>!!e.field));o&&(0,s.RB)(r,[o.toJSON()],t)}const m=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,o._)([(0,i.Cb)({type:[d],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:f},write:{target:"layerDefinition.orderBy",writer:y}}})],t.prototype,"orderBy",void 0),t=(0,o._)([(0,a.j)("esri.layers.mixins.OrderedLayer")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>v});var n=r(43697),o=r(40330),s=r(3172),i=r(66643),a=r(20102),l=r(92604),u=r(70586),p=r(95330),c=r(17452),d=r(5600),f=(r(67676),r(80442),r(75215),r(71715)),y=r(52011),m=r(30556),h=r(65587),g=r(15235),w=r(86082);const b=l.Z.getLogger("esri.layers.mixins.PortalLayer"),v=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new g.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const n=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await n.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,p.D_)(e)||b.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=r,(0,u.Wi)(r)||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id.findServerInfo(this.url);if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,a=h.Z.getDefault();if(a&&a.loaded&&(0,c.Fv)(a.restUrl)===(0,c.Fv)(n))return a.user;const l=`${n}/community/self`,p=(0,u.pC)(e)?e.signal:null,d=await(0,i.q6)((0,s.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:p}));return d.ok?w.default.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,n=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||h.Z.getDefault());return r&&n&&!(0,c.tm)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,n._)([(0,d.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,n._)([(0,f.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,n._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,n._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,n._)([(0,d.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,n._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>g});var n=r(43697),o=r(92604),s=r(95330),i=r(5600),a=(r(67676),r(80442),r(75215),r(52011)),l=r(80539),u=(r(26258),r(87538));const p=new l.Z,c=new WeakMap;function d(e){return e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let y=0,m=0;function h(){const e=Date.now();for(const t of p)t.refreshInterval&&e-(c.get(t)??0)+5>=6e4*t.refreshInterval&&(c.set(t,e),t.refresh(e))}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of p)t=f(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?c.get(r)||c.set(r,e):c.delete(r);if(t!==m){if(m=t,clearInterval(y),0===m)return void(y=0);y=setInterval(h,m)}}));const g=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{!function(e){d(e)&&p.push(e)}(this)}),(()=>{}))}destroy(){var e;d(e=this)&&p.includes(e)&&p.remove(e)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,s.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{o.Z.getLogger(this.declaredClass).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,n._)([(0,i.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,i.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,i.Cb)()],t.prototype,"refreshParameters",null),t=(0,n._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},51432:(e,t,r)=>{r.d(t,{M8:()=>S,ft:()=>F,FU:()=>_,Bm:()=>L,be:()=>I,eB:()=>k}),r(66577);var n=r(3172),o=r(20102),s=r(66374),i=r(70586),a=r(95330),l=r(17452),u=r(44547),p=r(8744),c=r(86973),d=r(92722);function f(e){return function(e){const t=y.exec(e);if(!t)return null;const r=t.groups,n=+r.year,o=+r.month-1,s=+r.day,i=+(r.hours??"0"),a=+(r.minutes??"0"),l=+(r.seconds??"0");if(i>23)return null;if(a>59)return null;if(l>59)return null;const u=r.ms??"0",p=u?+u.padEnd(3,"0").substring(0,3):0;let c;if(r.isUTC)c=Date.UTC(n,o,s,i,a,l,p);else if(r.offsetSign){const e=+r.offsetHours,t=+r.offsetMinutes;c=6e4*("+"===r.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,o,s,i,a,l,p)}else c=new Date(n,o,s,i,a,l,p).getTime();return Number.isNaN(c)?null:c}(e)??function(e){const t=new Date(e).getTime();return Number.isNaN(t)?null:t}(e)}const y=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/;var m=r(88724),h=r(1231),g=r(82971),w=r(6570);const b="xlink:href",v="2.0.0",S="__esri_wfs_id__",C="wfs-layer:feature-type-not-found",x="wfs-layer:unknown-geometry-type";async function _(e,t){const r=function(e){const t=T(e);(function(e){const t=e.firstElementChild.getAttribute("version");if(t&&t!==v)throw new o.Z("wfs-layer:unsupported-wfs-version",`Unsupported WFS version ${t}. Supported version: ${v}`)})(t),A(t);const r=t.firstElementChild,n=(0,s.Fs)(function(e){return(0,m.H)(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",supportedSpatialReferences:[]},r=new Set([4326]),n=e=>{const t=parseInt(e.textContent.match(/(?<wkid>\d+$)/i)?.groups?.wkid,10);Number.isNaN(t)||r.add(t)};return(0,m.h)(e,{Name:e=>{const{name:r,prefix:n}=Z(e.textContent);t.typeName=`${n}:${r}`,t.name=r,t.namespacePrefix=n,t.namespaceUri=e.lookupNamespaceURI(n)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=function(e){let t,r,n,o;for(const s of e.children)switch(s.localName){case"LowerCorner":[t,r]=s.textContent.split(" ").map((e=>Number.parseFloat(e)));break;case"UpperCorner":[n,o]=s.textContent.split(" ").map((e=>Number.parseFloat(e)))}return{xmin:t,ymin:r,xmax:n,ymax:o,spatialReference:p.Zn}}(e)},DefaultSRS:n,DefaultCRS:n,OtherSRS:n,OtherCRS:n}),t.title||(t.title=t.name),t.supportedSpatialReferences.push(...r),t}}})}(r));return{operations:E(r),get featureTypes(){return Array.from(n())},readFeatureTypes:n}}((await(0,n.default)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:v,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,l.$U)(e)&&((0,l.D6)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,l.hO)(t.operations.DescribeFeatureType.url)),(0,l.D6)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,l.hO)(t.operations.GetFeature.url)))}(e,r),r}const P=new Set(["json","application/json","geojson","application/json; subtype=geojson"]);function E(e){let t=!1;const r={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}};if((0,m.h)(e,{OperationsMetadata:{Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{r.GetCapabilities.url=e.getAttribute(b)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{r.DescribeFeatureType.url=e.getAttribute(b)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{r.GetFeature.url=e.getAttribute(b)}}},Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:e=>{const t=e.textContent;P.has(t.toLowerCase())&&(r.GetFeature.outputFormat=t)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{r.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),!t)throw new o.Z("wfs-layer:kvp-encoding-not-supported","WFS service doesn't support key/value pair (KVP) encoding");if((0,i.Wi)(r.GetFeature.outputFormat))throw new o.Z("wfs-layer:geojson-not-supported","WFS service doesn't support GeoJSON output format");return r}function F(e,t,r){return(0,s.sE)(e,(e=>r?e.name===t&&e.namespaceUri===r:e.typeName===t||e.name===t))}async function I(e,t,r,n={}){const{featureType:s,extent:l}=await async function(e,t,r,n={}){const{spatialReference:s=g.Z.WGS84}=n,a=e.readFeatureTypes(),l=t?F(a,t,r):a.next().value;if((0,i.Wi)(l))throw t?new o.Z(C,`The type '${t}' could not be found in the service`):new o.Z("wfs-layer:empty-service","The service is empty");let c=new w.Z({...l.extent,spatialReference:s});if(!(0,p.fS)(s,p.Zn))try{await(0,u.iQ)(p.Zn,s,void 0,n),c=(0,u.iV)(c,p.Zn)}catch{throw new o.Z("wfs-layer:unsupported-spatial-reference","Projection not supported")}return{extent:c,spatialReference:s,featureType:l}}(e,t,r,n),{fields:c,geometryType:d,swapXY:f,objectIdField:y,geometryField:m}=await async function(e,t,r={}){const[n,s]=await(0,a.as)([R(e.operations.DescribeFeatureType.url,t,r),O(e,t,r)]);if(n.error||s.error)throw new o.Z("wfs-layer:getWFSLayerTypeInfo-error",`An error occurred while getting info about the feature type '${t}'`,{error:n.error||s.error});const{fields:l,errors:u}=n.value,p=n.value.geometryType||s.value.geometryType,c=s.value.swapXY;if((0,i.Wi)(p))throw new o.Z(x,`The geometry type could not be determined for type '${t}`,{typeName:t,geometryType:p,fields:l,errors:u});return{...k(l),geometryType:p,swapXY:c}}(e,s.typeName,n);return{url:e.operations.GetCapabilities.url,name:s.name,namespaceUri:s.namespaceUri,fields:c,geometryField:m,geometryType:d,objectIdField:y,spatialReference:n.spatialReference??g.Z.WGS84,extent:l,swapXY:f,wfsCapabilities:e,customParameters:n.customParameters}}function k(e){const t=e.find((e=>"geometry"===e.type));let r=e.find((e=>"oid"===e.type));return e=e.filter((e=>"geometry"!==e.type)),r||(r=new h.Z({name:S,type:"oid",alias:S}),e.unshift(r)),{geometryField:t?.name??null,objectIdField:r.name,fields:e}}async function O(e,t,r={}){let o,s=!1;const[i,a]=await Promise.all([L(e.operations.GetFeature.url,t,e.operations.GetFeature.outputFormat,{...r,count:1}),(0,n.default)(e.operations.GetFeature.url,{responseType:"text",query:j(t,void 0,{...r,count:1}),signal:r?.signal})]),l="FeatureCollection"===i.type&&i.features[0]?.geometry;if(l){let e;switch(o=c.Mk.fromJSON((0,d.q9)(l.type)),l.type){case"Point":e=l.coordinates;break;case"LineString":case"MultiPoint":e=l.coordinates[0];break;case"MultiLineString":case"Polygon":e=l.coordinates[0][0];break;case"MultiPolygon":e=l.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(a.data);if(t){const r=e[0].toFixed(3),n=e[1].toFixed(3),o=parseFloat(t[1]).toFixed(3);r===parseFloat(t[2]).toFixed(3)&&n===o&&(s=!0)}}return{geometryType:o,swapXY:s}}async function R(e,t,r){return function(e,t){const{name:r}=Z(e),n=T(t);A(n);const a=(0,s.sE)((0,m.H)(n.firstElementChild,{element:e=>({name:e.getAttribute("name"),typeName:Z(e.getAttribute("type")).name})}),(({name:e})=>e===r));if((0,i.pC)(a)){const e=(0,s.sE)((0,m.H)(n.firstElementChild,{complexType:e=>e}),(e=>e.getAttribute("name")===a.typeName));if((0,i.pC)(e))return function(e){const t=[],r=[];let n;const s=(0,m.H)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const i of s){const s=i.getAttribute("name");if(!s)continue;let a,l;if(i.hasAttribute("type")?a=Z(i.getAttribute("type")).name:(0,m.h)(i,{simpleType:{restriction:e=>(a=Z(e.getAttribute("base")).name,{maxLength:e=>{l=+e.getAttribute("value")}})}}),!a)continue;const u="true"===i.getAttribute("nillable");let p=!1;switch(a.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":r.push(new h.Z({name:s,alias:s,type:"integer",nullable:u}));break;case"float":case"double":case"decimal":r.push(new h.Z({name:s,alias:s,type:"double",nullable:u}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":r.push(new h.Z({name:s,alias:s,type:"string",nullable:u,length:l??255}));break;case"datetime":case"date":r.push(new h.Z({name:s,alias:s,type:"date",nullable:u,length:l??36}));break;case"pointpropertytype":n="point",p=!0;break;case"multipointpropertytype":n="multipoint",p=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":n="polyline",p=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":n="polygon",p=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":p=!0,t.push(new o.Z(x,`geometry type '${a}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:t.push(new o.Z("wfs-layer:unknown-field-type",`Unknown field type '${a}'`,{type:(new XMLSerializer).serializeToString(e)}))}p&&r.push(new h.Z({name:s,alias:s,type:"geometry",nullable:u}))}for(const e of r)if("integer"===e.type&&!e.nullable&&N.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:n,fields:r,errors:t}}(e)}throw new o.Z(C,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(n)})}(t,(await(0,n.default)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:v,TYPENAME:t,...r?.customParameters},signal:r?.signal})).data)}const N=new Set(["objectid","fid"]);async function L(e,t,r,s){let{data:i}=await(0,n.default)(e,{responseType:"text",query:j(t,r,s),signal:s?.signal});i=i.replace(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{if(s?.dateFields?.length){const e=new Set(s.dateFields);return JSON.parse(i,((t,r)=>e.has(t)?f(r):r))}return JSON.parse(i)}catch(e){throw new o.Z("wfs-layer:malformed-json","Error while parsing the response",{response:i,error:e})}}function j(e,t,r){return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:v,TYPENAMES:e,OUTPUTFORMAT:t,SRSNAME:"EPSG:4326",STARTINDEX:r?.startIndex,COUNT:r?.count,...r?.customParameters}}function T(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function Z(e){const[t,r]=e.split(":");return{prefix:r?t:"",name:r??t}}function A(e){let t,r;if((0,m.h)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{r=e.textContent}})}),t)throw new o.Z(`wfs-layer:${t}`,r)}},88724:(e,t,r)=>{function n(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];if("function"==typeof e){const t=e(r);t&&n(r,t)}else n(r,e)}}function*o(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];"function"==typeof e?yield e(r):yield*o(r,e)}}r.d(t,{H:()=>o,h:()=>n})},2319:(e,t,r)=>{r.d(t,{Z:()=>k});var n,o=r(43697),s=r(78223),i=r(35454),a=r(96674),l=r(22974),u=r(62357),p=r(5600),c=(r(75215),r(71715)),d=r(52011),f=r(30556),y=(r(67676),r(80442),r(8813));let m=n=class extends a.wq{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,y.dI)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,y.dI)(this.value)),null!=e&&(t[r]=e)}clone(){return new n({expression:this.expression,title:this.title,value:this.value})}};(0,o._)([(0,p.Cb)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],m.prototype,"expression",void 0),(0,o._)([(0,c.r)("expression",["expression","value"])],m.prototype,"readExpression",null),(0,o._)([(0,f.c)("expression")],m.prototype,"writeExpression",null),(0,o._)([(0,p.Cb)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],m.prototype,"title",void 0),(0,o._)([(0,p.Cb)({json:{read:!1,write:!1}})],m.prototype,"value",void 0),m=n=(0,o._)([(0,d.j)("esri.layers.support.LabelExpressionInfo")],m);const h=m;var g=r(20256),w=r(4095),b=r(77987),v=r(78724),S=r(58333);b.Z.fromJSON(S.I4),w.Z.fromJSON(S.ET),g.Z.fromJSON(S.lF);const C=v.Z.fromJSON(S.qP);b.Z.fromJSON(S.eG),w.Z.fromJSON(S.wW),g.Z.fromJSON(S.lj);var x,_=r(21878);const P=new i.X({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function E(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function F(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let I=x=class extends a.wq{constructor(e){super(e),this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.repeatLabelDistance=null,this.symbol=C,this.useCodedValues=void 0,this.where=null}static evaluateWhere(e,t){const r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const n=e.split(" ");if(3===n.length)return r(t[n[0]],n[1],n[2]);if(7===n.length){const e=r(t[n[0]],n[1],n[2]),o=n[3],s=r(t[n[4]],n[5],n[6]);switch(o){case"AND":return e&&s;case"OR":return e||s}}return!1}catch(t){console.log("Error.: can't parse = "+e)}}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,y.z7)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,y.el)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,n){if(null==e&&null!=this.labelExpression&&E(n))e=new h({expression:this.getLabelExpressionArcade()});else if(!e)return;const o=e.toJSON(n);o.expression&&(t[r]=o)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return(0,y.hV)(this)}getLabelExpressionArcade(){return(0,y.YI)(this)}getLabelExpressionSingleField(){return(0,y.UO)(this)}hash(){return JSON.stringify(this)}clone(){return new x({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,l.d9)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,l.d9)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,o._)([(0,p.Cb)({type:String,json:{write:!0}})],I.prototype,"name",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1}}}})],I.prototype,"allowOverrun",void 0),(0,o._)([(0,p.Cb)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1}}}})],I.prototype,"deconflictionStrategy",void 0),(0,o._)([(0,p.Cb)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&F(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],I.prototype,"labelExpression",void 0),(0,o._)([(0,c.r)("labelExpression")],I.prototype,"readLabelExpression",null),(0,o._)([(0,f.c)("labelExpression")],I.prototype,"writeLabelExpression",null),(0,o._)([(0,p.Cb)({type:h,json:{write:{overridePolicy:(e,t,r)=>function(e){return E(e)||F(e.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],I.prototype,"labelExpressionInfo",void 0),(0,o._)([(0,f.c)("labelExpressionInfo")],I.prototype,"writeLabelExpressionInfo",null),(0,o._)([(0,p.Cb)({type:P.apiValues,json:{type:P.jsonValues,read:P.read,write:P.write}})],I.prototype,"labelPlacement",void 0),(0,o._)([(0,p.Cb)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],I.prototype,"labelPosition",void 0),(0,o._)([(0,p.Cb)({type:Number})],I.prototype,"maxScale",void 0),(0,o._)([(0,f.c)("maxScale")],I.prototype,"writeMaxScale",null),(0,o._)([(0,p.Cb)({type:Number})],I.prototype,"minScale",void 0),(0,o._)([(0,f.c)("minScale")],I.prototype,"writeMinScale",null),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:!1}}}})],I.prototype,"repeatLabel",void 0),(0,o._)([(0,p.Cb)({type:Number,cast:u.t_,json:{write:!0,origins:{"web-scene":{write:!1}}}})],I.prototype,"repeatLabelDistance",void 0),(0,o._)([(0,p.Cb)({types:s.yK,json:{origins:{"web-scene":{types:s.S6,write:_.vX,default:null}},write:_.vX,default:null}})],I.prototype,"symbol",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],I.prototype,"useCodedValues",void 0),(0,o._)([(0,p.Cb)({type:String,json:{write:!0}})],I.prototype,"where",void 0),I=x=(0,o._)([(0,d.j)("esri.layers.support.LabelClass")],I);const k=I},8813:(e,t,r)=>{r.d(t,{UO:()=>f,YI:()=>d,dI:()=>y,el:()=>b,hV:()=>c,z7:()=>p});var n=r(19153);const o="__begin__",s="__end__",i=new RegExp(o,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+o,"i"),u=new RegExp(s+"$","i");function p(e){return e.replace(new RegExp("\\{","g"),"[").replace(new RegExp("\\}","g"),"]")}function c(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=function(e){return e.replace(new RegExp("\\[","g"),"{").replace(new RegExp("\\]","g"),"}")}(e.labelExpression),t.type="conventional"),t}function d(e){const t=c(e);if(!t)return null;switch(t.type){case"conventional":return y(t.expression);case"arcade":return t.expression}return null}function f(e){const t=c(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e.match(m);return t&&t[1].trim()||null}(t.expression);case"arcade":return b(t.expression)}return null}function y(e){let t;return e?(t=(0,n.gx)(e,(e=>o+'$feature["'+e+'"]'+s)),t=l.test(t)?t.replace(l,""):'"'+t,t=u.test(t)?t.replace(u,""):t+'"',t=t.replace(i,'" + ').replace(a,' + "')):t='""',t}const m=/^\s*\{([^}]+)\}\s*$/i,h=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,g=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,w=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function b(e){if(!e)return null;let t=h.exec(e)||g.exec(e);return t?t[1]||t[3]:(t=w.exec(e),t?t[2]:null)}},51706:(e,t,r)=>{var n,o;function s(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function i(e){return null!=e&&!isNaN(e)&&isFinite(e)}function a(e){return e.valueExpression?n.Expression:e.field&&"string"==typeof e.field?n.Field:n.Unknown}function l(e,t){const r=t||a(e),s=e.valueUnit||"unknown";return r===n.Unknown?o.Constant:e.stops?o.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?o.ClampedLinear:"unknown"===s?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?o.Proportional:o.Additive:o.Identity:o.RealWorldSize}r.d(t,{PS:()=>a,QW:()=>l,RY:()=>n,hL:()=>o,iY:()=>s,qh:()=>i}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(n||(n={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(o||(o={}))},74889:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});var n,o=r(43697),s=r(66577),i=r(38171),a=r(35454),l=r(96674),u=r(22974),p=r(70586),c=r(5600),d=(r(75215),r(71715)),f=r(52011),y=r(30556),m=r(82971),h=r(33955),g=r(1231);const w=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=n=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=m.Z.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const o=e[t],s=i.Z.fromJSON(o),a=o.geometry&&o.geometry.spatialReference;(0,p.pC)(s.geometry)&&!a&&(s.geometry.spatialReference=r);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&(0,p.pC)(u))for(const e in u){const t=u[e],n=l[e]?.spatialReference;(0,p.pC)(t)&&!n&&(t.spatialReference=r)}n.push(s)}return n}writeGeometryType(e,t,r,n){if(e)return void w.write(e,t,r,n);const{features:o}=this;if(o)for(const e of o)if(e&&(0,p.pC)(e.geometry))return void w.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,h.im)(e);return!r&&t.spatialReference&&(n.spatialReference=m.Z.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&(0,p.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e&&e[r];n.geometry=t&&t.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,o]}=e,s=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=s.length;e<t;e++)i((0,p.Wg)(s[e].geometry))||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,o],scale:[s,i]}=r,a=this._getHydrationFunction(e,(e=>e*s+n),(e=>o-e*i));for(const{geometry:e}of t)(0,p.pC)(e)&&a(e);return this.transform=null,this}_quantizePoints(e,t,r){let n,o;const s=[];for(let i=0,a=e.length;i<a;i++){const a=e[i];if(i>0){const e=t(a[0]),i=r(a[1]);e===n&&i===o||(s.push([e-n,i-o]),n=e,o=i)}else n=t(a[0]),o=r(a[1]),s.push([n,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,h.oU)(e)?e.rings:e.paths,o=[];for(let e=0,s=n.length;e<s;e++){const s=n[e],i=this._quantizePoints(s,t,r);i&&o.push(i)}return o.length>0?((0,h.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const n=(0,h.oU)(e)?e.rings:e.paths;let o,s;for(let e=0,i=n.length;e<i;e++){const i=n[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],s+=n[1]):(o=n[0],s=n[1]),n[0]=t(o),n[1]=r(s)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const n=e.points;let o,s;for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(o+=i[0],s+=i[1]):(o=i[0],s=i[1]),i[0]=t(o),i[1]=r(s)}}:void 0}};(0,o._)([(0,c.Cb)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,o._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,c.Cb)({type:[i.Z],json:{write:!0}})],b.prototype,"features",void 0),(0,o._)([(0,d.r)("features")],b.prototype,"readFeatures",null),(0,o._)([(0,c.Cb)({type:[g.Z],json:{write:!0}})],b.prototype,"fields",void 0),(0,o._)([(0,c.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:w.read}}})],b.prototype,"geometryType",void 0),(0,o._)([(0,y.c)("geometryType")],b.prototype,"writeGeometryType",null),(0,o._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,o._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,o._)([(0,c.Cb)({types:s.qM,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,o._)([(0,d.r)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,o._)([(0,c.Cb)({type:m.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,o._)([(0,y.c)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,o._)([(0,c.Cb)({json:{write:!0}})],b.prototype,"transform",void 0),b=n=(0,o._)([(0,f.j)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const v=b},32163:(e,t,r)=>{r.d(t,{eZ:()=>c});var n=r(51773),o=r(35671),s=r(84649),i=(r(63801),r(48074),r(38745),r(9190)),a=(r(10214),r(44951),r(422)),l=r(63061);const u=["oid","global-id"],p=["oid","global-id","guid"];function c({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},p){if(!r)return null;const c=function({editFieldsInfo:e,fields:t,objectIdField:r},n){return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(y),e}(t,n?.ignoreFieldTypes||b).map((t=>new a.Z({fieldName:t.name,isEditable:h(t,e),label:t.alias,format:g(t),visible:f(t,{editFieldsInfo:e,objectIdField:r,visibleFieldNames:n?.visibleFieldNames})})))}({editFieldsInfo:t,fields:r,objectIdField:l},p);if(!c.length)return null;const d=function(e){const t=(0,o.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r}({titleBase:u,fields:r,displayField:e}),m=[new i.Z,new s.Z];return new n.Z({title:d,content:m,fieldInfos:c})}const d=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i],f=(e,{editFieldsInfo:t,objectIdField:r,visibleFieldNames:n})=>n?n.has(e.name):!(m(e.name,t)||r&&e.name===r||u.includes(e.type)||d.some((t=>t.test(e.name))));function y(e,t){return"oid"===e.type?-1:"oid"===t.type?1:w(e)?-1:w(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function m(e,t){if(!e||!t)return!1;const{creationDateField:r,creatorField:n,editDateField:o,editorField:s}=t;return[r&&r.toLowerCase(),n&&n.toLowerCase(),o&&o.toLowerCase(),s&&s.toLowerCase()].includes(e.toLowerCase())}function h(e,t){return e.editable&&!p.includes(e.type)&&!m(e.name,t)}function g(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.Z({digitSeparator:!0,places:0});case"double":return new l.Z({digitSeparator:!0,places:2});case"date":return new l.Z({dateFormat:"long-month-day-year"});default:return"string"===e.type&&(0,o.Ec)(e.name)?new l.Z({digitSeparator:!0,places:0}):null}}function w(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())||void 0}const b=["geometry","blob","raster","guid","xml"]}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1785],{3892:(t,e,r)=>{function n(t){return"h"in t&&"s"in t&&"v"in t}function i(t){return"l"in t&&"a"in t&&"b"in t}function a(t){return"l"in t&&"c"in t&&"h"in t}r.d(e,{Y3:()=>g,_Y:()=>f,sJ:()=>m,xr:()=>y});const s=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],o=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function l(t,e){const r=[];let n,i;if(t[0].length!==e.length)throw"dimensions do not match";const a=t.length,s=t[0].length;let o=0;for(n=0;n<a;n++){for(o=0,i=0;i<s;i++)o+=t[n][i]*e[i];r.push(o)}return r}function u(t){const e=[t.r/255,t.g/255,t.b/255].map((t=>t<=.04045?t/12.92:((t+.055)/1.055)**2.4)),r=l(s,e);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function c(t){const e=l(o,[t.x/100,t.y/100,t.z/100]).map((t=>{const e=t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055;return Math.min(1,Math.max(e,0))}));return{r:Math.round(255*e[0]),g:Math.round(255*e[1]),b:Math.round(255*e[2])}}function h(t){const e=[t.x/95.047,t.y/100,t.z/108.883].map((t=>t>(6/29)**3?t**(1/3):1/3*(29/6)**2*t+4/29));return{l:116*e[1]-16,a:500*(e[0]-e[1]),b:200*(e[1]-e[2])}}function p(t){const e=t.l,r=[(e+16)/116+t.a/500,(e+16)/116,(e+16)/116-t.b/200].map((t=>t>6/29?t**3:3*(6/29)**2*(t-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function y(t){return"r"in(e=t)&&"g"in e&&"b"in e?t:a(t)?function(t){return c(p(function(t){const e=t.l,r=t.c,n=t.h;return{l:e,a:r*Math.cos(n),b:r*Math.sin(n)}}(t)))}(t):i(t)?function(t){return c(p(t))}(t):function(t){return"x"in t&&"y"in t&&"z"in t}(t)?c(t):n(t)?function(t){const e=(t.h+360)%360/60,r=t.s/100,n=t.v/100*255,i=n*r,a=i*(1-Math.abs(e%2-1));let s;switch(Math.floor(e)){case 0:s={r:i,g:a,b:0};break;case 1:s={r:a,g:i,b:0};break;case 2:s={r:0,g:i,b:a};break;case 3:s={r:0,g:a,b:i};break;case 4:s={r:a,g:0,b:i};break;case 5:case 6:s={r:i,g:0,b:a};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-i),s.g=Math.round(s.g+n-i),s.b=Math.round(s.b+n-i),s}(t):t;var e}function f(t){return n(t)?t:function(t){const e=t.r,r=t.g,n=t.b,i=Math.max(e,r,n),a=i-Math.min(e,r,n);let s=i,o=0===a?0:i===e?(r-n)/a%6:i===r?(n-e)/a+2:(e-r)/a+4,l=0===a?0:a/s;return o<0&&(o+=6),o*=60,l*=100,s*=100/255,{h:o,s:l,v:s}}(y(t))}function g(t){return i(t)?t:function(t){return h(u(t))}(y(t))}function m(t){return a(t)?t:function(t){return function(t){const e=t.l,r=t.a,n=t.b,i=Math.sqrt(r*r+n*n);let a=Math.atan2(n,r);return a=a>0?a:a+2*Math.PI,{l:e,c:i,h:a}}(h(u(t)))}(y(t))}},31363:(t,e,r)=>{r.d(e,{B1:()=>n,DQ:()=>u,DT:()=>o,JJ:()=>i,Or:()=>c,_U:()=>a,k3:()=>h,sX:()=>p});const n=Number.POSITIVE_INFINITY,i=Math.PI,a=2*i,s=128/i,o=i/180,l=1/Math.LN2;function u(t,e){return(t%=e)>=0?t:t+e}function c(t){return u(t*s,256)}function h(t){return Math.log(t)*l}function p(t,e,r){return t*(1-r)+e*r}},26084:(t,e,r)=>{r.d(e,{Z:()=>n});class n{constructor(t){this._array=[],t<=0&&console.error("strideInBytes must be positive!"),this._stride=t}get array(){return this._array}get index(){return 4*this._array.length/this._stride}get itemSize(){return this._stride}get sizeInBytes(){return 4*this._array.length}reset(){this.array.length=0}toBuffer(){return new Uint32Array(this._array).buffer}static i1616to32(t,e){return 65535&t|e<<16}static i8888to32(t,e,r,n){return 255&t|(255&e)<<8|(255&r)<<16|n<<24}static i8816to32(t,e,r){return 255&t|(255&e)<<8|r<<16}}},4215:(t,e,r)=>{var n,i,a,s,o;r.d(e,{Fr:()=>o,_K:()=>s,al:()=>i}),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.FILL_VERTEX=1]="FILL_VERTEX",t[t.FILL_DD_VERTEX=2]="FILL_DD_VERTEX",t[t.FILL_INDEX=3]="FILL_INDEX",t[t.OUTLINE_VERTEX=4]="OUTLINE_VERTEX",t[t.OUTLINE_DD_VERTEX=5]="OUTLINE_DD_VERTEX",t[t.OUTLINE_INDEX=6]="OUTLINE_INDEX",t[t.LINE_VERTEX=7]="LINE_VERTEX",t[t.LINE_DD_VERTEX=8]="LINE_DD_VERTEX",t[t.LINE_INDEX=9]="LINE_INDEX",t[t.ICON_VERTEX=10]="ICON_VERTEX",t[t.ICON_DD_VERTEX=11]="ICON_DD_VERTEX",t[t.ICON_INDEX=12]="ICON_INDEX",t[t.TEXT_VERTEX=13]="TEXT_VERTEX",t[t.TEXT_DD_VERTEX=14]="TEXT_DD_VERTEX",t[t.TEXT_INDEX=15]="TEXT_INDEX",t[t.CIRCLE_VERTEX=16]="CIRCLE_VERTEX",t[t.CIRCLE_INDEX=17]="CIRCLE_INDEX"}(n||(n={})),function(t){t[t.FILL=1]="FILL",t[t.LINE=2]="LINE",t[t.SYMBOL=3]="SYMBOL",t[t.CIRCLE=4]="CIRCLE"}(i||(i={})),function(t){t[t.BACKGROUND=0]="BACKGROUND",t[t.OPAQUE=1]="OPAQUE",t[t.TRANSLUCENT=2]="TRANSLUCENT",t[t.SYMBOLS=3]="SYMBOLS",t[t.HITTEST=4]="HITTEST"}(a||(a={})),function(t){t[t.BACKGROUND=0]="BACKGROUND",t[t.FILL=1]="FILL",t[t.OUTLINE=2]="OUTLINE",t[t.LINE=3]="LINE",t[t.ICON=4]="ICON",t[t.CIRCLE=5]="CIRCLE",t[t.TEXT=6]="TEXT",t[t.TILEINFO=7]="TILEINFO"}(s||(s={})),function(t){t[t.PAINTER_CHANGED=0]="PAINTER_CHANGED",t[t.LAYOUT_CHANGED=1]="LAYOUT_CHANGED",t[t.LAYER_CHANGED=2]="LAYER_CHANGED",t[t.LAYER_REMOVED=3]="LAYER_REMOVED",t[t.SPRITES_CHANGED=4]="SPRITES_CHANGED"}(o||(o={}))},21315:(t,e,r)=>{r.d(e,{R:()=>a,_5:()=>u,aF:()=>s,f2:()=>f,fR:()=>n,nR:()=>l,r1:()=>h,vL:()=>o});var n,i,a,s,o,l,u,c,h,p,y=r(95648);(p=n||(n={}))[p.BACKGROUND=0]="BACKGROUND",p[p.FILL=1]="FILL",p[p.LINE=2]="LINE",p[p.SYMBOL=3]="SYMBOL",p[p.CIRCLE=4]="CIRCLE",function(t){t[t.VISIBLE=0]="VISIBLE",t[t.NONE=1]="NONE"}(i||(i={})),function(t){t[t.POINT=0]="POINT",t[t.LINE=1]="LINE",t[t.LINE_CENTER=2]="LINE_CENTER"}(a||(a={})),function(t){t[t.MAP=0]="MAP",t[t.VIEWPORT=1]="VIEWPORT",t[t.AUTO=2]="AUTO"}(s||(s={})),function(t){t[t.AUTO=0]="AUTO",t[t.LEFT=1]="LEFT",t[t.CENTER=2]="CENTER",t[t.RIGHT=3]="RIGHT"}(o||(o={})),function(t){t[t.CENTER=0]="CENTER",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.TOP=3]="TOP",t[t.BOTTOM=4]="BOTTOM",t[t.TOP_LEFT=5]="TOP_LEFT",t[t.TOP_RIGHT=6]="TOP_RIGHT",t[t.BOTTOM_LEFT=7]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=8]="BOTTOM_RIGHT"}(l||(l={})),function(t){t[t.NONE=0]="NONE",t[t.UPPERCASE=1]="UPPERCASE",t[t.LOWERCASE=2]="LOWERCASE"}(u||(u={})),function(t){t[t.MAP=0]="MAP",t[t.VIEWPORT=1]="VIEWPORT"}(c||(c={})),function(t){t[t.HORIZONTAL=0]="HORIZONTAL",t[t.VERTICAL=1]="VERTICAL"}(h||(h={}));class f{}f.backgroundLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE}},f.fillLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE}},f.lineLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE},"line-cap":{type:"enum",values:["butt","round","square"],default:y.RL.BUTT},"line-join":{type:"enum",values:["bevel","round","miter"],default:y.AH.MITER},"line-miter-limit":{type:"number",default:2},"line-round-limit":{type:"number",default:1.05}},f.symbolLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE},"symbol-avoid-edges":{type:"boolean",default:!1},"symbol-placement":{type:"enum",values:["point","line","line-center"],default:a.POINT},"symbol-sort-key":{type:"number",default:-1},"symbol-spacing":{type:"number",minimum:1,default:250},"icon-allow-overlap":{type:"boolean",default:!1},"icon-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:l.CENTER},"icon-ignore-placement":{type:"boolean",default:!1},"icon-image":{type:"string"},"icon-keep-upright":{type:"boolean",default:!1},"icon-offset":{type:"array",value:"number",length:2,default:[0,0]},"icon-optional":{type:"boolean",default:!1},"icon-padding":{type:"number",minimum:0,default:2},"icon-rotate":{type:"number",default:0},"icon-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:s.AUTO},"icon-size":{type:"number",minimum:0,default:1},"text-allow-overlap":{type:"boolean",default:!1},"text-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:l.CENTER},"text-field":{type:"string"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"]},"text-ignore-placement":{type:"boolean",default:!1},"text-justify":{type:"enum",values:["auto","left","center","right"],default:o.CENTER},"text-keep-upright":{type:"boolean",default:!0},"text-letter-spacing":{type:"number",default:0},"text-line-height":{type:"number",default:1.2},"text-max-angle":{type:"number",minimum:0,default:45},"text-max-width":{type:"number",minimum:0,default:10},"text-offset":{type:"array",value:"number",length:2,default:[0,0]},"text-optional":{type:"boolean",default:!1},"text-padding":{type:"number",minimum:0,default:2},"text-rotate":{type:"number",default:0},"text-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:s.AUTO},"text-size":{type:"number",minimum:0,default:16},"text-transform":{type:"enum",values:["none","uppercase","lowercase"],default:u.NONE},"text-writing-mode":{type:"array",value:"enum",values:["horizontal","vertical"],default:[h.HORIZONTAL]}},f.circleLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE}},f.backgroundPaintDefinition={"background-color":{type:"color",default:[0,0,0,1]},"background-opacity":{type:"number",minimum:0,maximum:1,default:1},"background-pattern":{type:"string"}},f.fillPaintDefinition={"fill-antialias":{type:"boolean",default:!0},"fill-color":{type:"color",default:[0,0,0,1]},"fill-opacity":{type:"number",minimum:0,maximum:1,default:1},"fill-outline-color":{type:"color",default:[0,0,0,0]},"fill-pattern":{type:"string"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0]},"fill-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP}},f.linePaintDefinition={"line-blur":{type:"number",minimum:0,default:0},"line-color":{type:"color",default:[0,0,0,1]},"line-dasharray":{type:"array",value:"number",default:[]},"line-gap-width":{type:"number",minimum:0,default:0},"line-offset":{type:"number",default:0},"line-opacity":{type:"number",minimum:0,maximum:1,default:1},"line-pattern":{type:"string"},"line-translate":{type:"array",value:"number",length:2,default:[0,0]},"line-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP},"line-width":{type:"number",minimum:0,default:1}},f.symbolPaintDefinition={"icon-color":{type:"color",default:[0,0,0,1]},"icon-halo-blur":{type:"number",minimum:0,default:0},"icon-halo-color":{type:"color",default:[0,0,0,0]},"icon-halo-width":{type:"number",minimum:0,default:0},"icon-opacity":{type:"number",minimum:0,maximum:1,default:1},"icon-translate":{type:"array",value:"number",length:2,default:[0,0]},"icon-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP},"text-color":{type:"color",default:[0,0,0,1]},"text-halo-blur":{type:"number",minimum:0,default:0},"text-halo-color":{type:"color",default:[0,0,0,0]},"text-halo-width":{type:"number",minimum:0,default:0},"text-opacity":{type:"number",minimum:0,maximum:1,default:1},"text-translate":{type:"array",value:"number",length:2,default:[0,0]},"text-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP}},f.rasterPaintDefinition={"raster-opacity":{type:"number",minimum:0,maximum:1,default:1},"raster-hue-rotate":{type:"number",default:0},"raster-brightness-min":{type:"number",minimum:0,maximum:1,default:0},"raster-brightness-max":{type:"number",minimum:0,maximum:1,default:1},"raster-saturation":{type:"number",minimum:-1,maximum:1,default:0},"raster-contrast":{type:"number",minimum:-1,maximum:1,default:0},"raster-fade-duration":{type:"number",minimum:0,default:300}},f.circlePaintDefinition={"circle-blur":{type:"number",minimum:0,default:0},"circle-color":{type:"color",default:[0,0,0,1]},"circle-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-radius":{type:"number",minimum:0,default:5},"circle-stroke-color":{type:"color",default:[0,0,0,1]},"circle-stroke-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-stroke-width":{type:"number",minimum:0,default:0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0]},"circle-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP}}},7333:(t,e,r)=>{r.d(e,{Et:()=>Pt,sj:()=>Gt,Le:()=>Ot,_L:()=>Bt,gf:()=>St,jG:()=>Ut,nj:()=>kt});var n,i,a=r(95648),s=r(4215),o=r(70586),l=r(26084);!function(t){t[t.R8_SIGNED=0]="R8_SIGNED",t[t.R8_UNSIGNED=1]="R8_UNSIGNED",t[t.R16_SIGNED=2]="R16_SIGNED",t[t.R16_UNSIGNED=3]="R16_UNSIGNED",t[t.R8G8_SIGNED=4]="R8G8_SIGNED",t[t.R8G8_UNSIGNED=5]="R8G8_UNSIGNED",t[t.R16G16_SIGNED=6]="R16G16_SIGNED",t[t.R16G16_UNSIGNED=7]="R16G16_UNSIGNED",t[t.R8G8B8A8_SIGNED=8]="R8G8B8A8_SIGNED",t[t.R8G8B8A8_UNSIGNED=9]="R8G8B8A8_UNSIGNED",t[t.R8G8B8A8_COLOR=10]="R8G8B8A8_COLOR",t[t.R16G16B16A16_DASHARRAY=11]="R16G16B16A16_DASHARRAY",t[t.R16G16B16A16_PATTERN=12]="R16G16B16A16_PATTERN"}(n||(n={})),function(t){t[t.UNIFORM=0]="UNIFORM",t[t.DATA_DRIVEN=1]="DATA_DRIVEN",t[t.INTERPOLATED_DATA_DRIVEN=2]="INTERPOLATED_DATA_DRIVEN",t[t.UNUSED=3]="UNUSED"}(i||(i={}));var u=r(35371),c=r(21968);class h{constructor(t){this._locations=new Map,this._key=t}get key(){return this._key}get type(){return 7&this._key}defines(){return[]}getStride(){return this._layoutInfo||this._buildAttributesInfo(),this._stride}getAttributeLocations(){return 0===this._locations.size&&this._buildAttributesInfo(),this._locations}getLayoutInfo(){return this._layoutInfo||this._buildAttributesInfo(),this._layoutInfo}getEncodingInfos(){return this._propertyEncodingInfo||this._buildAttributesInfo(),this._propertyEncodingInfo}getUniforms(){return this._uniforms||this._buildAttributesInfo(),this._uniforms}getShaderHeader(){return this._shaderHeader||this._buildAttributesInfo(),this._shaderHeader}getShaderMain(){return this._shaderMain||this._buildAttributesInfo(),this._shaderMain}setDataUniforms(t,e,r,n,i){const a=this.getUniforms();for(const s of a){const{name:a,type:o,getValue:l}=s,u=l(r,e,n,i);if(null!==u)switch(o){case"float":t.setUniform1f(a,u);break;case"vec2":t.setUniform2fv(a,u);break;case"vec4":t.setUniform4fv(a,u)}}}encodeAttributes(t,e,r,i){const a=this.attributesInfo(),s=this.getEncodingInfos(),o=[];let l=0,u=0;for(const c of Object.keys(s)){const h=s[c],{type:p,precisionFactor:y,isLayout:f}=a[c],g=f?r.getLayoutProperty(c):r.getPaintProperty(c),m=g.interpolator?.getInterpolationRange(e);let d=0;for(const r of h){const{offset:a,bufferElementsToAdd:s}=r;if(s>0){for(let t=0;t<s;t++)o.push(0);l+=u,u=r.bufferElementsToAdd}const c=i??g.getValue(m?m[d]:e,t);switch(p){case n.R8_SIGNED:case n.R8_UNSIGNED:o[l]|=this._encodeByte(c*(y||1),8*a);break;case n.R16_SIGNED:case n.R16_UNSIGNED:o[l]|=this._encodeShort(c*(y||1),8*a);break;case n.R8G8_SIGNED:case n.R8G8_UNSIGNED:o[l]|=this._encodeByte(c*(y||1),8*a),o[l]|=this._encodeByte(c*(y||1),8*a+8);break;case n.R16G16_SIGNED:case n.R16G16_UNSIGNED:o[l]|=this._encodeShort(c*(y||1),8*a),o[l]|=this._encodeShort(c*(y||1),8*a+16);break;case n.R8G8B8A8_SIGNED:case n.R8G8B8A8_UNSIGNED:o[l]|=this._encodeByte(c*(y||1),8*a),o[l]|=this._encodeByte(c*(y||1),8*a+8),o[l]|=this._encodeByte(c*(y||1),8*a+16),o[l]|=this._encodeByte(c*(y||1),8*a+24);break;case n.R8G8B8A8_COLOR:o[l]=this._encodeColor(c);break;case n.R16G16B16A16_DASHARRAY:case n.R16G16B16A16_PATTERN:this._encodePattern(l,o,c);break;default:throw new Error("Unsupported encoding type")}d++}}return o}getAtributeState(t){let e=0;const r=3+2*t;return e|=this._bit(r),e|=this._bit(r+1)<<1,e}_buildAttributesInfo(){const t=[],e={},r={};let n=-1;const a=this.attributesInfo(),s=this.attributes();let o=-1;for(const l of s){o++;const s=this.getAtributeState(o);if(s===i.UNIFORM||s===i.UNUSED)continue;const u=a[l],c=[];e[l]=c;const p=u.type;for(let e=0;e<s;e++){const{dataType:e,bytesPerElement:i,count:a,normalized:s}=h._encodingInfo[p],o=i*a;let l=r[e],u=0;if(!l||l.count+a>4)n++,l={dataIndex:n,count:0,offset:0},4!==a&&(r[e]=l),t.push({location:-1,name:"a_data_"+n,count:a,type:e,normalized:s}),u=Math.ceil(Math.max(o/4,1));else{const e=t[l.dataIndex];e.count+=a,u=Math.ceil(Math.max(e.count*i/4,1))-Math.ceil(Math.max(l.offset/4,1))}c.push({dataIndex:l.dataIndex,offset:l.offset,bufferElementsToAdd:u}),l.offset+=o,l.count+=a}}for(const e of t)switch(e.type){case u.g.BYTE:case u.g.UNSIGNED_BYTE:e.count=4;case u.g.SHORT:case u.g.UNSIGNED_SHORT:e.count+=e.count%2}this._buildVertexBufferLayout(t);let l=0;const c=this._layoutInfo.geometry;for(const t of c)this._locations.set(t.name,l++);const p=this._layoutInfo.opacity;if(p)for(const t of p)this._locations.set(t.name,l++);this._buildShaderInfo(t,e),this._propertyEncodingInfo=e}_buildVertexBufferLayout(t){const e={},r=this.geometryInfo();let n=r[0].stride;if(0===t.length)e.geometry=r;else{const i=[];let a=n;for(const e of t)n+=p(e.type)*e.count;for(const t of r){const e={...t};e.stride=n,i.push(e)}for(const e of t)i.push(new c.G(e.name,e.count,e.type,a,n)),a+=p(e.type)*e.count;e.geometry=i}this.opacityInfo()&&(e.opacity=this.opacityInfo()),this._layoutInfo=e,this._stride=n}_buildShaderInfo(t,e){let r="\n",a="\n";const s=[];for(const e of t)r+=`attribute ${this._getType(e.count)} ${e.name};\n`;const l=this.attributes(),u=this.attributesInfo();let c=-1;for(const t of l){c++;const{name:l,type:p,precisionFactor:f,isLayout:g}=u[t],m=f&&1!==f?" * "+1/f:"",{bytesPerElement:d,count:_}=h._encodingInfo[p],E=t=>`a_data_${t.dataIndex}${y(_,t.offset,d)}`;switch(this.getAtributeState(c)){case i.UNIFORM:{const e=this._getType(_),i=`u_${l}`;s.push({name:i,type:e,getValue:(e,r,i,a)=>{const s=g?e.getLayoutValue(t,r):e.getPaintValue(t,r);if(p===n.R16G16B16A16_DASHARRAY){const t=e.getDashKey(s,e.getLayoutValue("line-cap",r)),n=a.getMosaicItemPosition(t,!1);if((0,o.Wi)(n))return null;const{tl:i,br:l}=n;return[i[0],l[1],l[0],i[1]]}if(p===n.R16G16B16A16_PATTERN){const e=a.getMosaicItemPosition(s,!t.includes("line-"));if((0,o.Wi)(e))return null;const{tl:r,br:n}=e;return[r[0],n[1],n[0],r[1]]}if(p===n.R8G8B8A8_COLOR){const t=s[3];return[t*s[0],t*s[1],t*s[2],t]}return s}}),r+=`uniform ${e} ${i};\n`,a+=`${e} ${l} = ${i};\n`}break;case i.DATA_DRIVEN:{const r=E(e[t][0]);a+=`${this._getType(_)} ${l} = ${r}${m};\n`}break;case i.INTERPOLATED_DATA_DRIVEN:{const n=`u_t_${l}`;s.push({name:n,type:"float",getValue:(e,r,n,i)=>(g?e.getLayoutProperty(t):e.getPaintProperty(t)).interpolator.interpolationUniformValue(n,r)}),r+=`uniform float ${n};\n`;const i=E(e[t][0]),o=E(e[t][1]);a+=`${this._getType(_)} ${l} = mix(${i}${m}, ${o}${m}, ${n});\n`}}}this._shaderHeader=r,this._shaderMain=a,this._uniforms=s}_bit(t){return(this._key&1<<t)>>t}_getType(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4"}throw new Error("Invalid count")}_encodeColor(t){const e=255*t[3];return l.Z.i8888to32(t[0]*e,t[1]*e,t[2]*e,e)}_encodePattern(t,e,r){if(!r||!r.rect)return;const n=r.rect,i=r.width,a=r.height;e[t]=this._encodeShort(n.x+2,0),e[t]|=this._encodeShort(n.y+2+a,16),e[t+1]=this._encodeShort(n.x+2+i,0),e[t+1]|=this._encodeShort(n.y+2,16)}_encodeByte(t,e){return(255&t)<<e}_encodeShort(t,e){return(65535&t)<<e}}h._encodingInfo={[n.R8_SIGNED]:{dataType:u.g.BYTE,bytesPerElement:1,count:1,normalized:!1},[n.R8_UNSIGNED]:{dataType:u.g.UNSIGNED_BYTE,bytesPerElement:1,count:1,normalized:!1},[n.R16_SIGNED]:{dataType:u.g.SHORT,bytesPerElement:2,count:1,normalized:!1},[n.R16_UNSIGNED]:{dataType:u.g.UNSIGNED_SHORT,bytesPerElement:2,count:1,normalized:!1},[n.R8G8_SIGNED]:{dataType:u.g.BYTE,bytesPerElement:1,count:2,normalized:!1},[n.R8G8_UNSIGNED]:{dataType:u.g.UNSIGNED_BYTE,bytesPerElement:1,count:2,normalized:!1},[n.R16G16_SIGNED]:{dataType:u.g.SHORT,bytesPerElement:2,count:2,normalized:!1},[n.R16G16_UNSIGNED]:{dataType:u.g.UNSIGNED_SHORT,bytesPerElement:2,count:2,normalized:!1},[n.R8G8B8A8_SIGNED]:{dataType:u.g.BYTE,bytesPerElement:1,count:4,normalized:!1},[n.R8G8B8A8_UNSIGNED]:{dataType:u.g.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!1},[n.R8G8B8A8_COLOR]:{dataType:u.g.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!0},[n.R16G16B16A16_DASHARRAY]:{dataType:u.g.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1},[n.R16G16B16A16_PATTERN]:{dataType:u.g.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1}};const p=t=>{switch(t){case u.g.FLOAT:case u.g.INT:case u.g.UNSIGNED_INT:return 4;case u.g.SHORT:case u.g.UNSIGNED_SHORT:return 2;case u.g.BYTE:case u.g.UNSIGNED_BYTE:return 1}},y=(t,e,r)=>{const n=e/r;if(1===t)switch(n){case 0:return".x";case 1:return".y";case 2:return".z";case 3:return".w"}else if(2===t)switch(n){case 0:return".xy";case 1:return".yz";case 2:return".zw"}else if(3===t)switch(n){case 0:return".xyz";case 1:return".yzw"}return""};class f extends h{constructor(t){super(t)}geometryInfo(){return f.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return f.ATTRIBUTES}attributesInfo(){return f.ATTRIBUTES_INFO}}f.ATTRIBUTES=[],f.GEOMETRY_LAYOUT=[new c.G("a_pos",2,u.g.BYTE,0,2)],f.ATTRIBUTES_INFO={};class g extends h{constructor(t){super(t)}geometryInfo(){return g.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return g.ATTRIBUTES}attributesInfo(){return g.ATTRIBUTES_INFO}}g.ATTRIBUTES=["circle-radius","circle-color","circle-opacity","circle-stroke-width","circle-stroke-color","circle-stroke-opacity","circle-blur"],g.GEOMETRY_LAYOUT=[new c.G("a_pos",2,u.g.SHORT,0,4)],g.ATTRIBUTES_INFO={"circle-radius":{name:"radius",type:n.R8_UNSIGNED},"circle-color":{name:"color",type:n.R8G8B8A8_COLOR},"circle-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"circle-stroke-width":{name:"stroke_width",type:n.R8_UNSIGNED,precisionFactor:4},"circle-stroke-color":{name:"stroke_color",type:n.R8G8B8A8_COLOR},"circle-stroke-opacity":{name:"stroke_opacity",type:n.R8_UNSIGNED,precisionFactor:100},"circle-blur":{name:"blur",type:n.R8_UNSIGNED,precisionFactor:32}};class m extends h{constructor(t){super(t)}geometryInfo(){return m.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return m.ATTRIBUTES}attributesInfo(){return m.ATTRIBUTES_INFO}}m.ATTRIBUTES=["fill-color","fill-opacity","fill-pattern"],m.GEOMETRY_LAYOUT=[new c.G("a_pos",2,u.g.SHORT,0,4)],m.ATTRIBUTES_INFO={"fill-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"fill-pattern":{name:"tlbr",type:n.R16G16B16A16_PATTERN,isOptional:!0}};class d extends h{constructor(t,e){super(t),this.usefillColor=e}geometryInfo(){return d.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return this.usefillColor?d.ATTRIBUTES_FILL:d.ATTRIBUTES_OUTLINE}attributesInfo(){return this.usefillColor?d.ATTRIBUTES_INFO_FILL:d.ATTRIBUTES_INFO_OUTLINE}}d.ATTRIBUTES_OUTLINE=["fill-outline-color","fill-opacity"],d.ATTRIBUTES_FILL=["fill-color","fill-opacity"],d.GEOMETRY_LAYOUT=[new c.G("a_pos",2,u.g.SHORT,0,8),new c.G("a_offset",2,u.g.BYTE,4,8),new c.G("a_xnormal",2,u.g.BYTE,6,8)],d.ATTRIBUTES_INFO_OUTLINE={"fill-outline-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100}},d.ATTRIBUTES_INFO_FILL={"fill-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100}};class _ extends h{constructor(t){super(t)}geometryInfo(){return _.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return _.ATTRIBUTES}attributesInfo(){return _.ATTRIBUTES_INFO}}_.ATTRIBUTES=["line-blur","line-color","line-gap-width","line-offset","line-opacity","line-width","line-pattern","line-dasharray"],_.GEOMETRY_LAYOUT=[new c.G("a_pos",2,u.g.SHORT,0,16),new c.G("a_extrude_offset",4,u.g.BYTE,4,16),new c.G("a_dir_normal",4,u.g.BYTE,8,16),new c.G("a_accumulatedDistance",2,u.g.UNSIGNED_SHORT,12,16)],_.ATTRIBUTES_INFO={"line-width":{name:"width",type:n.R8_UNSIGNED,precisionFactor:2},"line-gap-width":{name:"gap_width",type:n.R8_UNSIGNED,precisionFactor:2},"line-offset":{name:"offset",type:n.R8_SIGNED,precisionFactor:2},"line-color":{name:"color",type:n.R8G8B8A8_COLOR},"line-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"line-blur":{name:"blur",type:n.R8_UNSIGNED,precisionFactor:4},"line-pattern":{name:"tlbr",type:n.R16G16B16A16_PATTERN,isOptional:!0},"line-dasharray":{name:"tlbr",type:n.R16G16B16A16_DASHARRAY,isOptional:!0}};const E=[new c.G("a_pos",2,u.g.SHORT,0,16),new c.G("a_vertexOffset",2,u.g.SHORT,4,16),new c.G("a_texAngleRange",4,u.g.UNSIGNED_BYTE,8,16),new c.G("a_levelInfo",4,u.g.UNSIGNED_BYTE,12,16)],b=[new c.G("a_opacityInfo",1,u.g.UNSIGNED_BYTE,0,1)];class T extends h{constructor(t){super(t)}geometryInfo(){return E}opacityInfo(){return b}attributes(){return T.ATTRIBUTES}attributesInfo(){return T.ATTRIBUTES_INFO}}T.ATTRIBUTES=["icon-color","icon-opacity","icon-halo-blur","icon-halo-color","icon-halo-width","icon-size"],T.ATTRIBUTES_INFO={"icon-color":{name:"color",type:n.R8G8B8A8_COLOR},"icon-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"icon-halo-color":{name:"halo_color",type:n.R8G8B8A8_COLOR},"icon-halo-width":{name:"halo_width",type:n.R8_UNSIGNED,precisionFactor:4},"icon-halo-blur":{name:"halo_blur",type:n.R8_UNSIGNED,precisionFactor:4},"icon-size":{name:"size",type:n.R8_UNSIGNED,precisionFactor:32,isLayout:!0}};class I extends h{constructor(t){super(t)}geometryInfo(){return E}opacityInfo(){return b}attributes(){return I.ATTRIBUTES}attributesInfo(){return I.ATTRIBUTES_INFO}}I.ATTRIBUTES=["text-color","text-opacity","text-halo-blur","text-halo-color","text-halo-width","text-size"],I.ATTRIBUTES_INFO={"text-color":{name:"color",type:n.R8G8B8A8_COLOR},"text-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"text-halo-color":{name:"halo_color",type:n.R8G8B8A8_COLOR},"text-halo-width":{name:"halo_width",type:n.R8_UNSIGNED,precisionFactor:4},"text-halo-blur":{name:"halo_blur",type:n.R8_UNSIGNED,precisionFactor:4},"text-size":{name:"size",type:n.R8_UNSIGNED,isLayout:!0}};var w=r(22303),v=r(3892);function R(t,e,r,n){const i=3*t,a=3*(r-t)-i,s=1-i-a,o=3*e,l=3*(n-e)-o,u=1-o-l;function c(t){return((s*t+a)*t+i)*t}function h(t){return(3*s*t+2*a)*t+i}return function(t,e=1e-6){return function(t){return((u*t+l)*t+o)*t}(function(t,e){let r,n,i,a,s,o;for(i=t,o=0;o<8;o++){if(a=c(i)-t,Math.abs(a)<e)return i;if(s=h(i),Math.abs(s)<1e-6)break;i-=a/s}if(r=0,n=1,i=t,i<r)return r;if(i>n)return n;for(;r<n;){if(a=c(i),Math.abs(a-t)<e)return i;t>a?r=i:n=i,i=.5*(n-r)+r}return i}(t,e))}}const N={};N.ease=R(.25,.1,.25,1),N.linear=R(0,0,1,1),N.easeIn=N["ease-in"]=R(.42,0,1,1),N.easeOut=N["ease-out"]=R(0,0,.58,1),N.easeInOut=N["ease-in-out"]=R(.42,0,.58,1);var D=r(31363);const L={kind:"null"},x={kind:"number"},A={kind:"string"},P={kind:"boolean"},O={kind:"color"},S={kind:"object"},U={kind:"value"};function G(t,e){return{kind:"array",itemType:t,n:e}}const B=[L,x,A,P,O,S,G(U)];function k(t){if("array"===t.kind){const e=k(t.itemType);return"number"==typeof t.n?`array<${e}, ${t.n}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}function M(t){if(null===t)return L;if("string"==typeof t)return A;if("boolean"==typeof t)return P;if("number"==typeof t)return x;if(t instanceof w.Z)return O;if(Array.isArray(t)){let e;for(const r of t){const t=M(r);if(e){if(e!==t){e=U;break}}else e=t}return G(e||U,t.length)}return"object"==typeof t?S:U}function C(t,e){if("array"===e.kind)return"array"===t.kind&&(0===t.n&&"value"===t.itemType.kind||C(t.itemType,e.itemType))&&("number"!=typeof e.n||e.n===t.n);if("value"===e.kind)for(const e of B)if(C(t,e))return!0;return e.kind===t.kind}function V(t){if(null===t)return"";const e=typeof t;return"string"===e?t:"number"===e||"boolean"===e?String(t):t instanceof w.Z?t.toString():JSON.stringify(t)}var F=r(35362);class z{constructor(t){this.parent=t,this.vars={}}add(t,e){this.vars[t]=e}get(t){return this.vars[t]?this.vars[t]:this.parent?this.parent.get(t):null}}class ${constructor(){this.type=U}static parse(t){if(t.length>1)throw new Error('"id" does not expect arguments');return new $}evaluate(t,e){return t?.id}}class Y{constructor(){this.type=A}static parse(t){if(t.length>1)throw new Error('"geometry-type" does not expect arguments');return new Y}evaluate(t,e){if(!t)return null;switch(t.type){case F.V.Point:return"Point";case F.V.LineString:return"LineString";case F.V.Polygon:return"Polygon";default:return null}}}class X{constructor(){this.type=S}static parse(t){if(t.length>1)throw new Error('"properties" does not expect arguments');return new X}evaluate(t,e){return t?.values}}class H{constructor(){this.type=x}static parse(t){if(t.length>1)throw new Error('"zoom" does not expect arguments');return new H}evaluate(t,e){return e}}class Z{constructor(t,e,r){this.lhs=t,this.rhs=e,this.compare=r,this.type=P}static parse(t,e,r){if(3!==t.length&&4!==t.length)throw new Error(`"${t[0]}" expects 2 or 3 arguments`);if(4===t.length)throw new Error(`"${t[0]}" collator not supported`);return new Z(vt(t[1],e),vt(t[2],e),r)}evaluate(t,e){return this.compare(this.lhs.evaluate(t,e),this.rhs.evaluate(t,e))}}class K{constructor(t){this.arg=t,this.type=P}static parse(t,e){if(2!==t.length)throw new Error('"!" expects 1 argument');return new K(vt(t[1],e))}evaluate(t,e){return!this.arg.evaluate(t,e)}}class j{constructor(t){this.args=t,this.type=P}static parse(t,e){const r=[];for(let n=1;n<t.length;n++)r.push(vt(t[n],e));return new j(r)}evaluate(t,e){for(const r of this.args)if(!r.evaluate(t,e))return!1;return!0}}class q{constructor(t){this.args=t,this.type=P}static parse(t,e){const r=[];for(let n=1;n<t.length;n++)r.push(vt(t[n],e));return new q(r)}evaluate(t,e){for(const r of this.args)if(r.evaluate(t,e))return!0;return!1}}class W{constructor(t){this.args=t,this.type=P}static parse(t,e){const r=[];for(let n=1;n<t.length;n++)r.push(vt(t[n],e));return new W(r)}evaluate(t,e){for(const r of this.args)if(r.evaluate(t,e))return!1;return!0}}class J{constructor(t,e,r){this.type=t,this.args=e,this.fallback=r}static parse(t,e,r){if(t.length<4)throw new Error('"case" expects at least 3 arguments');if(t.length%2==1)throw new Error('"case" expects an odd number of arguments');let n;const i=[];for(let a=1;a<t.length-1;a+=2){const s=vt(t[a],e),o=vt(t[a+1],e,r);n||(n=o.type),i.push({condition:s,output:o})}const a=vt(t[t.length-1],e,r);return n||(n=a.type),new J(n,i,a)}evaluate(t,e){for(const r of this.args)if(r.condition.evaluate(t,e))return r.output.evaluate(t,e);return this.fallback.evaluate(t,e)}}class Q{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)throw new Error('"coalesce" expects at least 1 argument');let r;const n=[];for(let i=1;i<t.length;i++){const a=vt(t[i],e);r||(r=a.type),n.push(a)}return new Q(r,n)}evaluate(t,e){for(const r of this.args){const n=r.evaluate(t,e);if(null!==n)return n}return null}}class tt{constructor(t,e,r,n,i){this.type=t,this.input=e,this.labels=r,this.outputs=n,this.fallback=i}static parse(t,e){if(t.length<3)throw new Error('"match" expects at least 3 arguments');if(t.length%2==0)throw new Error('"case" expects an even number of arguments');let r;const n=vt(t[1],e),i=[],a={};let s;for(let n=2;n<t.length-1;n+=2){let o=t[n];Array.isArray(o)||(o=[o]);for(const t of o){const e=typeof t;if("string"!==e&&"number"!==e)throw new Error('"match" requires string or number literal as labels');if(s){if(e!==s)throw new Error('"match" requires labels to have the same type')}else s=e;a[t]=i.length}const l=vt(t[n+1],e);r||(r=l.type),i.push(l)}return new tt(r,n,a,i,vt(t[t.length-1],e))}evaluate(t,e){const r=this.input.evaluate(t,e);return(this.outputs[this.labels[r]]||this.fallback).evaluate(t,e)}}class et{constructor(t,e,r,n,i){this.operator=t,this.type=e,this.interpolation=r,this.input=n,this.stops=i}static parse(t,e,r){const n=t[0];if(t.length<5)throw new Error(`"${n}" expects at least 4 arguments`);const i=t[1];if(!Array.isArray(i)||0===i.length)throw new Error(`"${i}" is not a valid interpolation`);switch(i[0]){case"linear":if(1!==i.length)throw new Error("Linear interpolation cannot have parameters");break;case"exponential":if(2!==i.length||"number"!=typeof i[1])throw new Error("Exponential interpolation requires one numeric argument");break;case"cubic-bezier":if(5!==i.length)throw new Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1");for(let t=1;t<5;t++){const e=i[t];if("number"!=typeof e||e<0||e>1)throw new Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1")}break;default:throw new Error(`"${t[0]}" unknown interpolation type "${i[0]}"`)}if(t.length%2!=1)throw new Error(`"${n}" expects an even number of arguments`);const a=vt(t[2],e,x);let s;"interpolate-hcl"===n||"interpolate-lab"===n?s=O:r&&"value"!==r.kind&&(s=r);const o=[];for(let r=3;r<t.length;r+=2){const i=t[r];if("number"!=typeof i)throw new Error(`"${n}" requires stop inputs as literal numbers`);if(o.length&&o[o.length-1][0]>=i)throw new Error(`"${n}" requires strictly ascending stop inputs`);const a=vt(t[r+1],e,s);s||(s=a.type),o.push([i,a])}if(s&&s!==O&&s!==x&&("array"!==s.kind||s.itemType!==x))throw new Error(`"${n}" cannot interpolate type ${k(s)}`);return new et(n,s,i,a,o)}evaluate(t,e){const r=this.stops;if(1===r.length)return r[0][1].evaluate(t,e);const n=this.input.evaluate(t,e);if(n<=r[0][0])return r[0][1].evaluate(t,e);if(n>=r[r.length-1][0])return r[r.length-1][1].evaluate(t,e);let i=0;for(;++i<r.length&&!(n<r[i][0]););const a=r[i-1][0],s=r[i][0],o=et.interpolationRatio(this.interpolation,n,a,s),l=r[i-1][1].evaluate(t,e),u=r[i][1].evaluate(t,e);if("interpolate"===this.operator){if("array"===this.type.kind&&Array.isArray(l)&&Array.isArray(u))return l.map(((t,e)=>(0,D.sX)(t,u[e],o)));if("color"===this.type.kind&&l instanceof w.Z&&u instanceof w.Z){const t=new w.Z(l),e=new w.Z(u);return new w.Z([(0,D.sX)(t.r,e.r,o),(0,D.sX)(t.g,e.g,o),(0,D.sX)(t.b,e.b,o),(0,D.sX)(t.a,e.a,o)])}if("number"===this.type.kind&&"number"==typeof l&&"number"==typeof u)return(0,D.sX)(l,u,o);throw new Error(`"${this.operator}" cannot interpolate type ${k(this.type)}`)}if("interpolate-hcl"===this.operator){const t=(0,v.sJ)(l),e=(0,v.sJ)(u),r=e.h-t.h,n=(0,v.xr)({h:t.h+o*(r>180||r<-180?r-360*Math.round(r/360):r),c:(0,D.sX)(t.c,e.c,o),l:(0,D.sX)(t.l,e.l,o)});return new w.Z({a:(0,D.sX)(l.a,u.a,o),...n})}if("interpolate-lab"===this.operator){const t=(0,v.Y3)(l),e=(0,v.Y3)(u),r=(0,v.xr)({l:(0,D.sX)(t.l,e.l,o),a:(0,D.sX)(t.a,e.a,o),b:(0,D.sX)(t.b,e.b,o)});return new w.Z({a:(0,D.sX)(l.a,u.a,o),...r})}throw new Error(`Unexpected operator "${this.operator}"`)}interpolationUniformValue(t,e){const r=this.stops;if(1===r.length)return 0;if(t>=r[r.length-1][0])return 0;let n=0;for(;++n<r.length&&!(t<r[n][0]););const i=r[n-1][0],a=r[n][0];return et.interpolationRatio(this.interpolation,e,i,a)}getInterpolationRange(t){const e=this.stops;if(1===e.length){const t=e[0][0];return[t,t]}const r=e[e.length-1][0];if(t>=r)return[r,r];let n=0;for(;++n<e.length&&!(t<e[n][0]););return[e[n-1][0],e[n][0]]}static interpolationRatio(t,e,r,n){let i=0;return"linear"===t[0]?i=et._exponentialInterpolationRatio(e,1,r,n):"exponential"===t[0]?i=et._exponentialInterpolationRatio(e,t[1],r,n):"cubic-bezier"===t[0]&&(i=R(t[1],t[2],t[3],t[4])(et._exponentialInterpolationRatio(e,1,r,n),1e-5)),i<0?i=0:i>1&&(i=1),i}static _exponentialInterpolationRatio(t,e,r,n){const i=n-r;if(0===i)return 0;const a=t-r;return 1===e?a/i:(e**a-1)/(e**i-1)}}class rt{constructor(t,e,r){this.type=t,this.input=e,this.stops=r}static parse(t,e){if(t.length<5)throw new Error('"step" expects at least 4 arguments');if(t.length%2!=1)throw new Error('"step" expects an even number of arguments');const r=vt(t[1],e,x);let n;const i=[];i.push([-1/0,vt(t[2],e)]);for(let r=3;r<t.length;r+=2){const a=t[r];if("number"!=typeof a)throw new Error('"step" requires stop inputs as literal numbers');if(i.length&&i[i.length-1][0]>=a)throw new Error('"step" requires strictly ascending stop inputs');const s=vt(t[r+1],e);n||(n=s.type),i.push([a,s])}return new rt(n,r,i)}evaluate(t,e){const r=this.stops;if(1===r.length)return r[0][1].evaluate(t,e);const n=this.input.evaluate(t,e);let i=0;for(;++i<r.length&&!(n<r[i][0]););return this.stops[i-1][1].evaluate(t,e)}}class nt{constructor(t,e){this.type=t,this.output=e}static parse(t,e,r){if(t.length<4)throw new Error('"let" expects at least 3 arguments');if(t.length%2==1)throw new Error('"let" expects an odd number of arguments');const n=new z(e);for(let r=1;r<t.length-1;r+=2){const i=t[r];if("string"!=typeof i)throw new Error(`"let" requires a string to define variable names - found ${i}`);n.add(i,vt(t[r+1],e))}const i=vt(t[t.length-1],n,r);return new nt(i.type,i)}evaluate(t,e){return this.output.evaluate(t,e)}}class it{constructor(t,e){this.type=t,this.output=e}static parse(t,e,r){if(2!==t.length||"string"!=typeof t[1])throw new Error('"var" requires just one literal string argument');const n=e.get(t[1]);if(!n)throw new Error(`${t[1]} must be defined before being used in a "var" expression`);return new it(r||U,n)}evaluate(t,e){return this.output.evaluate(t,e)}}class at{constructor(t,e,r){this.type=t,this.index=e,this.array=r}static parse(t,e){if(3!==t.length)throw new Error('"at" expects 2 arguments');const r=vt(t[1],e,x),n=vt(t[2],e);return new at(n.type.itemType,r,n)}evaluate(t,e){const r=this.index.evaluate(t,e),n=this.array.evaluate(t,e);if(r<0||r>=n.length)throw new Error('"at" index out of bounds');if(r!==Math.floor(r))throw new Error('"at" index must be an integer');return n[r]}}class st{constructor(t,e){this.key=t,this.obj=e,this.type=U}static parse(t,e){let r,n;switch(t.length){case 2:return r=vt(t[1],e),new st(r);case 3:return r=vt(t[1],e),n=vt(t[2],e),new st(r,n);default:throw new Error('"get" expects 1 or 2 arguments')}}evaluate(t,e){const r=this.key.evaluate(t,e);return this.obj?this.obj.evaluate(t,e)[r]:t?.values[r]}}class ot{constructor(t,e){this.key=t,this.obj=e,this.type=P}static parse(t,e){let r,n;switch(t.length){case 2:return r=vt(t[1],e),new ot(r);case 3:return r=vt(t[1],e),n=vt(t[2],e),new ot(r,n);default:throw new Error('"has" expects 1 or 2 arguments')}}evaluate(t,e){const r=this.key.evaluate(t,e);return this.obj?r in this.obj.evaluate(t,e):!!t?.values[r]}}class lt{constructor(t,e){this.key=t,this.vals=e,this.type=P}static parse(t,e){if(3!==t.length)throw new Error('"in" expects 2 arguments');return new lt(vt(t[1],e),vt(t[2],e))}evaluate(t,e){const r=this.key.evaluate(t,e);return this.vals.evaluate(t,e).includes(r)}}class ut{constructor(t,e,r){this.item=t,this.array=e,this.from=r,this.type=x}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"index-of" expects 3 or 4 arguments');const r=vt(t[1],e),n=vt(t[2],e);if(4===t.length){const i=vt(t[3],e,x);return new ut(r,n,i)}return new ut(r,n)}evaluate(t,e){const r=this.item.evaluate(t,e),n=this.array.evaluate(t,e);if(this.from){const i=this.from.evaluate(t,e);if(i!==Math.floor(i))throw new Error('"index-of" index must be an integer');return n.indexOf(r,i)}return n.indexOf(r)}}class ct{constructor(t){this.arg=t,this.type=x}static parse(t,e){if(2!==t.length)throw new Error('"length" expects 2 arguments');const r=vt(t[1],e);return new ct(r)}evaluate(t,e){const r=this.arg.evaluate(t,e);if("string"==typeof r)return r.length;if(Array.isArray(r))return r.length;throw new Error('"length" expects string or array')}}class ht{constructor(t,e,r,n){this.type=t,this.array=e,this.from=r,this.to=n}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"slice" expects 2 or 3 arguments');const r=vt(t[1],e),n=vt(t[2],e,x);if(n.type!==x)throw new Error('"slice" index must return a number');if(4===t.length){const i=vt(t[3],e,x);if(i.type!==x)throw new Error('"slice" index must return a number');return new ht(r.type,r,n,i)}return new ht(r.type,r,n)}evaluate(t,e){const r=this.array.evaluate(t,e);if(!Array.isArray(r)&&"string"!=typeof r)throw new Error('"slice" input must be an array or a string');const n=this.from.evaluate(t,e);if(n<0||n>=r.length)throw new Error('"slice" index out of bounds');if(n!==Math.floor(n))throw new Error('"slice" index must be an integer');if(this.to){const i=this.to.evaluate(t,e);if(i<0||i>=r.length)throw new Error('"slice" index out of bounds');if(i!==Math.floor(i))throw new Error('"slice" index must be an integer');return r.slice(n,i)}return r.slice(n)}}class pt{constructor(){this.type=P}static parse(t){if(1!==t.length)throw new Error('"has-id" expects no arguments');return new pt}evaluate(t,e){return t&&void 0!==t.id}}class yt{constructor(t,e){this.args=t,this.calculate=e,this.type=x}static parse(t,e,r){const n=t.slice(1).map((t=>vt(t,e)));return new yt(n,r)}evaluate(t,e){let r;return this.args&&(r=this.args.map((r=>r.evaluate(t,e)))),this.calculate(r)}}class ft{constructor(t,e){this.args=t,this.calculate=e,this.type=x}static parse(t,e){const r=t.slice(1).map((t=>vt(t,e)));return new ft(r,ft.ops[t[0]])}evaluate(t,e){let r;return this.args&&(r=this.args.map((r=>r.evaluate(t,e)))),this.calculate(r)}}ft.ops={abs:t=>Math.abs(t[0]),acos:t=>Math.acos(t[0]),asin:t=>Math.asin(t[0]),atan:t=>Math.atan(t[0]),ceil:t=>Math.ceil(t[0]),cos:t=>Math.cos(t[0]),e:()=>Math.E,floor:t=>Math.floor(t[0]),ln:t=>Math.log(t[0]),ln2:()=>Math.LN2,log10:t=>Math.log(t[0])/Math.LN10,log2:t=>Math.log(t[0])/Math.LN2,max:t=>Math.max(...t),min:t=>Math.min(...t),pi:()=>Math.PI,round:t=>Math.round(t[0]),sin:t=>Math.sin(t[0]),sqrt:t=>Math.sqrt(t[0]),tan:t=>Math.tan(t[0])};class gt{constructor(t){this.args=t,this.type=A}static parse(t,e){return new gt(t.slice(1).map((t=>vt(t,e))))}evaluate(t,e){return this.args.map((r=>r.evaluate(t,e))).join("")}}class mt{constructor(t,e){this.arg=t,this.calculate=e,this.type=A}static parse(t,e){if(2!==t.length)throw new Error(`${t[0]} expects 1 argument`);const r=vt(t[1],e);return new mt(r,mt.ops[t[0]])}evaluate(t,e){return this.calculate(this.arg.evaluate(t,e))}}mt.ops={downcase:t=>t.toLowerCase(),upcase:t=>t.toUpperCase()};class dt{constructor(t){this.args=t,this.type=O}static parse(t,e){if(4!==t.length)throw new Error('"rgb" expects 3 arguments');const r=t.slice(1).map((t=>vt(t,e)));return new dt(r)}evaluate(t,e){const r=this._validate(this.args[0].evaluate(t,e)),n=this._validate(this.args[1].evaluate(t,e)),i=this._validate(this.args[2].evaluate(t,e));return new w.Z({r,g:n,b:i})}_validate(t){if("number"!=typeof t||t<0||t>255)throw new Error(`${t}: invalid color component`);return Math.round(t)}}class _t{constructor(t){this.args=t,this.type=O}static parse(t,e){if(5!==t.length)throw new Error('"rgba" expects 4 arguments');const r=t.slice(1).map((t=>vt(t,e)));return new _t(r)}evaluate(t,e){const r=this._validate(this.args[0].evaluate(t,e)),n=this._validate(this.args[1].evaluate(t,e)),i=this._validate(this.args[2].evaluate(t,e)),a=this._validateAlpha(this.args[3].evaluate(t,e));return new w.Z({r,g:n,b:i,a})}_validate(t){if("number"!=typeof t||t<0||t>255)throw new Error(`${t}: invalid color component`);return Math.round(t)}_validateAlpha(t){if("number"!=typeof t||t<0||t>1)throw new Error(`${t}: invalid alpha color component`);return t}}class Et{constructor(t){this.color=t,this.type=G(x,4)}static parse(t,e){if(2!==t.length)throw new Error('"to-rgba" expects 1 argument');const r=vt(t[1],e);return new Et(r)}evaluate(t,e){return new w.Z(this.color.evaluate(t,e)).toRgba()}}class bt{constructor(t,e){this.type=t,this.args=e}static parse(t,e){const r=t[0];if(t.length<2)throw new Error(`${r} expects at least one argument`);let n,i=1;if("array"===r){if(t.length>2){switch(t[1]){case"string":n=A;break;case"number":n=x;break;case"boolean":n=P;break;default:throw new Error('"array" type argument must be string, number or boolean')}i++}else n=U;let e;if(t.length>3){if(e=t[2],null!==e&&("number"!=typeof e||e<0||e!==Math.floor(e)))throw new Error('"array" length argument must be a positive integer literal');i++}n=G(n,e)}else switch(r){case"string":n=A;break;case"number":n=x;break;case"boolean":n=P;break;case"object":n=S}const a=[];for(;i<t.length;i++){const r=vt(t[i],e);a.push(r)}return new bt(n,a)}evaluate(t,e){let r;for(const n of this.args){const i=n.evaluate(t,e);if(r=M(i),C(r,this.type))return i}throw new Error(`Expected ${k(this.type)} but got ${k(r)}`)}}class Tt{constructor(t,e){this.type=t,this.args=e}static parse(t,e){const r=t[0],n=Tt.types[r];if(n===P||n===A){if(2!==t.length)throw new Error(`${r} expects one argument`)}else if(t.length<2)throw new Error(`${r} expects at least one argument`);const i=[];for(let r=1;r<t.length;r++){const n=vt(t[r],e);i.push(n)}return new Tt(n,i)}evaluate(t,e){if(this.type===P)return Boolean(this.args[0].evaluate(t,e));if(this.type===A)return V(this.args[0].evaluate(t,e));if(this.type===x){for(const r of this.args){const n=Number(r.evaluate(t,e));if(!isNaN(n))return n}return null}if(this.type===O){for(const r of this.args)try{const n=Tt.toColor(r.evaluate(t,e));if(n instanceof w.Z)return n}catch{}return null}}static toBoolean(t){return Boolean(t)}static toString(t){return V(t)}static toNumber(t){const e=Number(t);if(isNaN(e))throw new Error(`"${t}" is not a number`);return e}static toColor(t){if(t instanceof w.Z)return t;if("string"==typeof t){const e=w.Z.fromString(t);if(e)return e;throw new Error(`"${t}" is not a color`)}if(Array.isArray(t))return w.Z.fromArray(t);throw new Error(`"${t}" is not a color`)}}Tt.types={"to-boolean":P,"to-color":O,"to-number":x,"to-string":A};class It{constructor(t){this.val=t,this.type=M(t)}static parse(t){if(2!==t.length)throw new Error('"literal" expects 1 argument');return new It(t[1])}evaluate(t,e){return this.val}}class wt{constructor(t){this.arg=t,this.type=A}static parse(t,e){if(2!==t.length)throw new Error('"typeof" expects 1 argument');return new wt(vt(t[1],e))}evaluate(t,e){return k(M(this.arg.evaluate(t,e)))}}function vt(t,e,r){const n=typeof t;if("string"===n||"boolean"===n||"number"===n||null===t){if(r)switch(r.kind){case"string":"string"!==n&&(t=Tt.toString(t));break;case"number":"number"!==n&&(t=Tt.toNumber(t));break;case"color":t=Tt.toColor(t)}t=["literal",t]}if(!Array.isArray(t)||0===t.length)throw new Error("Expression must be a non empty array");const i=t[0];if("string"!=typeof i)throw new Error("First element of expression must be a string");const a=Rt[i];if(void 0===a)throw new Error(`Invalid expression operator "${i}"`);if(!a)throw new Error(`Unimplemented expression operator "${i}"`);return a.parse(t,e,r)}const Rt={array:bt,boolean:bt,collator:null,format:null,image:null,literal:It,number:bt,"number-format":null,object:bt,string:bt,"to-boolean":Tt,"to-color":Tt,"to-number":Tt,"to-string":Tt,typeof:wt,accumulated:null,"feature-state":null,"geometry-type":Y,id:$,"line-progress":null,properties:X,at,get:st,has:ot,in:lt,"index-of":ut,length:ct,slice:ht,"!":K,"!=":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t!==e))}},"<":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t<e))}},"<=":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t<=e))}},"==":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t===e))}},">":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t>e))}},">=":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t>=e))}},all:j,any:q,case:J,coalesce:Q,match:tt,within:null,interpolate:et,"interpolate-hcl":et,"interpolate-lab":et,step:rt,let:nt,var:it,concat:gt,downcase:mt,"is-supported-script":null,"resolved-locale":null,upcase:mt,rgb:dt,rgba:_t,"to-rgba":Et,"-":class extends yt{static parse(t,e){switch(t.length){case 2:return yt.parse(t,e,(t=>-t[0]));case 3:return yt.parse(t,e,(t=>t[0]-t[1]));default:throw new Error('"-" expects 1 or 2 arguments')}}},"*":class extends yt{static parse(t,e){return yt.parse(t,e,(t=>{let e=1;for(const r of t)e*=r;return e}))}},"/":class extends yt{static parse(t,e){if(3===t.length)return yt.parse(t,e,(t=>t[0]/t[1]));throw new Error('"/" expects 2 arguments')}},"%":class extends yt{static parse(t,e){if(3===t.length)return yt.parse(t,e,(t=>t[0]%t[1]));throw new Error('"%" expects 2 arguments')}},"^":class extends yt{static parse(t,e){if(3===t.length)return yt.parse(t,e,(t=>t[0]**t[1]));throw new Error('"^" expects 1 or 2 arguments')}},"+":class extends yt{static parse(t,e){return yt.parse(t,e,(t=>{let e=0;for(const r of t)e+=r;return e}))}},abs:ft,acos:ft,asin:ft,atan:ft,ceil:ft,cos:ft,e:ft,floor:ft,ln:ft,ln2:ft,log10:ft,log2:ft,max:ft,min:ft,pi:ft,round:ft,sin:ft,sqrt:ft,tan:ft,zoom:H,"heatmap-density":null,"has-id":pt,none:W};class Nt{constructor(t){this._expression=t}filter(t,e){if(!this._expression)return!0;try{return this._expression.evaluate(t,e)}catch(t){return console.log(t.message),!0}}static createFilter(t){if(!t)return null;this.isLegacyFilter(t)&&(t=this.convertLegacyFilter(t));try{const e=vt(t,null,P);return new Nt(e)}catch(t){return console.log(t.message),null}}static isLegacyFilter(t){if(!Array.isArray(t))return!0;if(0===t.length)return!0;switch(t[0]){case"==":case"!=":case">":case"<":case">=":case"<=":return 3===t.length&&"string"==typeof t[1]&&!Array.isArray(t[2]);case"in":return t.length>=3&&"string"==typeof t[1]&&!Array.isArray(t[2]);case"!in":case"none":case"!has":return!0;case"any":case"all":for(let e=1;e<t.length;e++)if(!this.isLegacyFilter(t[1]))return!1;return!0;case"has":return 2===t.length&&("$id"===t[1]||"$type"===t[1]);default:return!1}}static convertLegacyFilter(t){if(!Array.isArray(t)||0===t.length)return!0;const e=t[0];if(1===t.length)return"any"!==e;switch(e){case"==":return Nt.convertComparison("==",t[1],t[2]);case"!=":return Nt.negate(Nt.convertComparison("==",t[1],t[2]));case">":case"<":case">=":case"<=":return Nt.convertComparison(e,t[1],t[2]);case"in":return Nt.convertIn(t[1],t.slice(2));case"!in":return Nt.negate(Nt.convertIn(t[1],t.slice(2)));case"any":case"all":case"none":return Nt.convertCombining(e,t.slice(1));case"has":return Nt.convertHas(t[1]);case"!has":return Nt.negate(Nt.convertHas(t[1]));default:throw new Error("Unexpected legacy filter.")}}static convertComparison(t,e,r){switch(e){case"$type":return[t,["geometry-type"],r];case"$id":return[t,["id"],r];default:return[t,["get",e],r]}}static convertIn(t,e){switch(t){case"$type":return["in",["geometry-type"],["literal",e]];case"$id":return["in",["id"],["literal",e]];default:return["in",["get",t],["literal",e]]}}static convertHas(t){switch(t){case"$type":return!0;case"$id":return["has-id"];default:return["has",t]}}static convertCombining(t,e){return[t].concat(e.map(this.convertLegacyFilter))}static negate(t){return["!",t]}}var Dt=r(21315);class Lt{constructor(t,e){let r;switch(this.isDataDriven=!1,this.interpolator=null,t.type){case"number":case"color":r=!0;break;case"array":r="number"===t.value;break;default:r=!1}if(null==e&&(e=t.default),Array.isArray(e)&&e.length>0&&Rt[e[0]]){const r={number:x,color:O,string:A,boolean:P,enum:A};try{const n=vt(e,null,"array"===t.type?G(r[t.value]||U,t.length):r[t.type]);this.getValue=this._buildExpression(n,t),this.isDataDriven=!0,n instanceof et&&n.input instanceof H&&(this.interpolator=n)}catch(e){console.log(e.message),this.getValue=this._buildSimple(t.default)}return}r&&"interval"===e.type&&(r=!1);const n=e&&e.stops&&e.stops.length>0;if(n)for(const r of e.stops)r[1]=this._validate(r[1],t);if(this.isDataDriven=!!e&&!!e.property,this.isDataDriven)if(void 0!==e.default&&(e.default=this._validate(e.default,t)),n)switch(e.type){case"identity":this.getValue=this._buildIdentity(e,t);break;case"categorical":this.getValue=this._buildCategorical(e,t);break;default:this.getValue=r?this._buildInterpolate(e,t):this._buildInterval(e,t)}else this.getValue=this._buildIdentity(e,t);else n?this.getValue=r?this._buildZoomInterpolate(e):this._buildZoomInterval(e):(e=this._validate(e,t),this.getValue=this._buildSimple(e))}_validate(t,e){if("number"===e.type){if(t<e.minimum)return e.minimum;if(t>e.maximum)return e.maximum}else"color"===e.type?t=Lt._parseColor(t):"enum"===e.type?"string"==typeof t&&(t=e.values.indexOf(t)):"array"===e.type&&"enum"===e.value?t=t.map((t=>"string"==typeof t?e.values.indexOf(t):t)):"string"===e.type&&(t=V(t));return t}_buildSimple(t){return()=>t}_buildExpression(t,e){return(r,n)=>{try{const i=t.evaluate(n,r);return void 0===i?e.default:this._validate(i,e)}catch(t){return console.log(t.message),e.default}}}_buildIdentity(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),void 0!==i&&(i=this._validate(i,e)),null!=i?i:void 0!==t.default?t.default:e.default}}_buildCategorical(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),i=this._categorical(i,t.stops),void 0!==i?i:void 0!==t.default?t.default:e.default}}_buildInterval(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),"number"==typeof i?this._interval(i,t.stops):void 0!==t.default?t.default:e.default}}_buildInterpolate(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),"number"==typeof i?this._interpolate(i,t.stops,t.base||1):void 0!==t.default?t.default:e.default}}_buildZoomInterpolate(t){return e=>this._interpolate(e,t.stops,t.base||1)}_buildZoomInterval(t){return e=>this._interval(e,t.stops)}_categorical(t,e){const r=e.length;for(let n=0;n<r;n++)if(e[n][0]===t)return e[n][1]}_interval(t,e){const r=e.length;let n=0;for(let i=0;i<r&&e[i][0]<=t;i++)n=i;return e[n][1]}_interpolate(t,e,r){let n,i;const a=e.length;for(let r=0;r<a;r++){const a=e[r];if(!(a[0]<=t)){i=a;break}n=a}if(n&&i){const e=i[0]-n[0],a=t-n[0],s=1===r?a/e:(r**a-1)/(r**e-1);if(Array.isArray(n[1])){const t=n[1],e=i[1],r=[];for(let n=0;n<t.length;n++)r.push((0,D.sX)(t[n],e[n],s));return r}return(0,D.sX)(n[1],i[1],s)}return n?n[1]:i?i[1]:void 0}static _isEmpty(t){for(const e in t)if(t.hasOwnProperty(e))return!1;return!0}static _parseColor(t){return Array.isArray(t)?t:("string"==typeof t&&(t=new w.Z(t)),t instanceof w.Z&&!this._isEmpty(t)?w.Z.toUnitRGBA(t):void 0)}}var xt=r(16534);class At{constructor(t,e,r,n){switch(this.type=t,this.typeName=e.type,this.id=e.id,this.source=e.source,this.sourceLayer=e["source-layer"],this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,this.filter=e.filter,this.layout=e.layout,this.paint=e.paint,this.z=r,this.uid=n,t){case Dt.fR.BACKGROUND:this._layoutDefinition=Dt.f2.backgroundLayoutDefinition,this._paintDefinition=Dt.f2.backgroundPaintDefinition;break;case Dt.fR.FILL:this._layoutDefinition=Dt.f2.fillLayoutDefinition,this._paintDefinition=Dt.f2.fillPaintDefinition;break;case Dt.fR.LINE:this._layoutDefinition=Dt.f2.lineLayoutDefinition,this._paintDefinition=Dt.f2.linePaintDefinition;break;case Dt.fR.SYMBOL:this._layoutDefinition=Dt.f2.symbolLayoutDefinition,this._paintDefinition=Dt.f2.symbolPaintDefinition;break;case Dt.fR.CIRCLE:this._layoutDefinition=Dt.f2.circleLayoutDefinition,this._paintDefinition=Dt.f2.circlePaintDefinition}this._layoutProperties=this._parseLayout(this.layout),this._paintProperties=this._parsePaint(this.paint)}getFeatureFilter(){return void 0!==this._featureFilter?this._featureFilter:this._featureFilter=Nt.createFilter(this.filter)}getLayoutProperty(t){return this._layoutProperties[t]}getPaintProperty(t){return this._paintProperties[t]}getLayoutValue(t,e,r){let n;const i=this._layoutProperties[t];return i&&(n=i.getValue(e,r)),void 0===n&&(n=this._layoutDefinition[t].default),n}getPaintValue(t,e,r){let n;const i=this._paintProperties[t];return i&&(n=i.getValue(e,r)),void 0===n&&(n=this._paintDefinition[t].default),n}isPainterDataDriven(){const t=this._paintProperties;if(t)for(const e in t)if(t[e].isDataDriven)return!0;return!1}_parseLayout(t){const e={};for(const r in t){const n=this._layoutDefinition[r];n&&(e[r]=new Lt(n,t[r]))}return e}_parsePaint(t){const e={};for(const r in t){const n=this._paintDefinition[r];n&&(e[r]=new Lt(n,t[r]))}return e}computeAttributesKey(t,e,r,n){let i=0,a=0;for(const t of e){let e=3;if(!t||t!==n){const n=r[t],{isLayout:i,isOptional:a}=n,s=i?this.getLayoutProperty(t):this.getPaintProperty(t);e=s?.interpolator?2:s?.isDataDriven?1:a&&!s?3:0}a|=e<<i,i+=2}return a<<3|t}}class Pt extends At{constructor(t,e,r,n){super(t,e,r,n),this.backgroundMaterial=new f(this.computeAttributesKey(s._K.BACKGROUND,f.ATTRIBUTES,f.ATTRIBUTES_INFO))}}class Ot extends At{constructor(t,e,r,n){super(t,e,r,n);const i=this.getPaintProperty("fill-color"),a=this.getPaintProperty("fill-opacity"),o=this.getPaintProperty("fill-pattern");this.hasDataDrivenColor=i?.isDataDriven,this.hasDataDrivenOpacity=a?.isDataDriven,this.hasDataDrivenFill=this.hasDataDrivenColor||this.hasDataDrivenOpacity||o?.isDataDriven;const l=this.getPaintProperty("fill-outline-color");this.outlineUsesFillColor=!l,this.hasDataDrivenOutlineColor=l?.isDataDriven,this.hasDataDrivenOutline=l?l.isDataDriven:!!i&&i.isDataDriven,this.hasDataDrivenOutline=(l?this.hasDataDrivenOutlineColor:this.hasDataDrivenColor)||this.hasDataDrivenOpacity,this.fillMaterial=new m(this.computeAttributesKey(s._K.FILL,m.ATTRIBUTES,m.ATTRIBUTES_INFO)),this.outlineMaterial=new d(this.computeAttributesKey(s._K.OUTLINE,this.outlineUsesFillColor?d.ATTRIBUTES_FILL:d.ATTRIBUTES_OUTLINE,this.outlineUsesFillColor?d.ATTRIBUTES_INFO_FILL:d.ATTRIBUTES_INFO_OUTLINE),this.outlineUsesFillColor)}}class St extends At{constructor(t,e,r,n){super(t,e,r,n);const i=this.getPaintProperty("line-pattern");if(this.lineMaterial=new _(this.computeAttributesKey(s._K.LINE,_.ATTRIBUTES,_.ATTRIBUTES_INFO,i?"line-dasharray":"")),this.hasDataDrivenLine=this.getPaintProperty("line-blur")?.isDataDriven||this.getPaintProperty("line-color")?.isDataDriven||this.getPaintProperty("line-gap-width")?.isDataDriven||this.getPaintProperty("line-offset")?.isDataDriven||this.getPaintProperty("line-opacity")?.isDataDriven||this.getPaintProperty("line-pattern")?.isDataDriven||this.getPaintProperty("line-dasharray")?.isDataDriven||this.getLayoutProperty("line-cap")?.isDataDriven||this.getPaintProperty("line-width")?.isDataDriven,this.canUseThinTessellation=!1,!this.hasDataDrivenLine){const t=this.getPaintProperty("line-width");if(!t||"number"==typeof t&&.5*t<xt.tQ){const t=this.getPaintProperty("line-offset");(!t||"number"==typeof t&&0===t)&&(this.canUseThinTessellation=!0)}}}getDashKey(t,e){let r;switch(e){case a.RL.BUTT:r="Butt";break;case a.RL.ROUND:r="Round";break;case a.RL.SQUARE:r="Square";break;default:r="Butt"}return`dasharray-[${t.toString()}]-${r}`}}class Ut extends At{constructor(t,e,r,n){super(t,e,r,n),this.iconMaterial=new T(this.computeAttributesKey(s._K.ICON,T.ATTRIBUTES,T.ATTRIBUTES_INFO)),this.textMaterial=new I(this.computeAttributesKey(s._K.TEXT,I.ATTRIBUTES,I.ATTRIBUTES_INFO)),this.hasDataDrivenIcon=this.getPaintProperty("icon-color")?.isDataDriven||this.getPaintProperty("icon-halo-blur")?.isDataDriven||this.getPaintProperty("icon-halo-color")?.isDataDriven||this.getPaintProperty("icon-halo-width")?.isDataDriven||this.getPaintProperty("icon-opacity")?.isDataDriven||this.getLayoutProperty("icon-size")?.isDataDriven,this.hasDataDrivenText=this.getPaintProperty("text-color")?.isDataDriven||this.getPaintProperty("text-halo-blur")?.isDataDriven||this.getPaintProperty("text-halo-color")?.isDataDriven||this.getPaintProperty("text-halo-width")?.isDataDriven||this.getPaintProperty("text-opacity")?.isDataDriven||this.getLayoutProperty("text-size")?.isDataDriven}}class Gt extends At{constructor(t,e,r,n){super(t,e,r,n),this.circleMaterial=new g(this.computeAttributesKey(s._K.CIRCLE,g.ATTRIBUTES,g.ATTRIBUTES_INFO))}}class Bt{constructor(t,e,r){let n;this.allowOverlap=t.getLayoutValue("icon-allow-overlap",e),this.ignorePlacement=t.getLayoutValue("icon-ignore-placement",e),this.keepUpright=t.getLayoutValue("icon-keep-upright",e),this.optional=t.getLayoutValue("icon-optional",e),this.rotationAlignment=t.getLayoutValue("icon-rotation-alignment",e),this.rotationAlignment===Dt.aF.AUTO&&(this.rotationAlignment=r?Dt.aF.MAP:Dt.aF.VIEWPORT),n=t.getLayoutProperty("icon-anchor"),n?.isDataDriven?this._anchorProp=n:this.anchor=t.getLayoutValue("icon-anchor",e),n=t.getLayoutProperty("icon-offset"),n?.isDataDriven?this._offsetProp=n:this.offset=t.getLayoutValue("icon-offset",e),n=t.getLayoutProperty("icon-padding"),n?.isDataDriven?this._paddingProp=n:this.padding=t.getLayoutValue("icon-padding",e),n=t.getLayoutProperty("icon-rotate"),n?.isDataDriven?this._rotateProp=n:this.rotate=t.getLayoutValue("icon-rotate",e),n=t.getLayoutProperty("icon-size"),n?.isDataDriven?this._sizeProp=n:this.size=t.getLayoutValue("icon-size",e)}update(t,e){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,e)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,e)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,e)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,e)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,e))}}class kt{constructor(t,e,r){let n;this.allowOverlap=t.getLayoutValue("text-allow-overlap",e),this.ignorePlacement=t.getLayoutValue("text-ignore-placement",e),this.keepUpright=t.getLayoutValue("text-keep-upright",e),this.optional=t.getLayoutValue("text-optional",e),this.rotationAlignment=t.getLayoutValue("text-rotation-alignment",e),this.rotationAlignment===Dt.aF.AUTO&&(this.rotationAlignment=r?Dt.aF.MAP:Dt.aF.VIEWPORT),n=t.getLayoutProperty("text-anchor"),n?.isDataDriven?this._anchorProp=n:this.anchor=t.getLayoutValue("text-anchor",e),n=t.getLayoutProperty("text-justify"),n?.isDataDriven?this._justifyProp=n:this.justify=t.getLayoutValue("text-justify",e),n=t.getLayoutProperty("text-letter-spacing"),n?.isDataDriven?this._letterSpacingProp=n:this.letterSpacing=t.getLayoutValue("text-letter-spacing",e),n=t.getLayoutProperty("text-line-height"),n?.isDataDriven?this._lineHeightProp=n:this.lineHeight=t.getLayoutValue("text-line-height",e),n=t.getLayoutProperty("text-max-angle"),n?.isDataDriven?this._maxAngleProp=n:this.maxAngle=t.getLayoutValue("text-max-angle",e),n=t.getLayoutProperty("text-max-width"),n?.isDataDriven?this._maxWidthProp=n:this.maxWidth=t.getLayoutValue("text-max-width",e),n=t.getLayoutProperty("text-offset"),n?.isDataDriven?this._offsetProp=n:this.offset=t.getLayoutValue("text-offset",e),n=t.getLayoutProperty("text-padding"),n?.isDataDriven?this._paddingProp=n:this.padding=t.getLayoutValue("text-padding",e),n=t.getLayoutProperty("text-rotate"),n?.isDataDriven?this._rotateProp=n:this.rotate=t.getLayoutValue("text-rotate",e),n=t.getLayoutProperty("text-size"),n?.isDataDriven?this._sizeProp=n:this.size=t.getLayoutValue("text-size",e),n=t.getLayoutProperty("text-writing-mode"),n?.isDataDriven?this._writingModeProp=n:this.writingMode=t.getLayoutValue("text-writing-mode",e)}update(t,e){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,e)),this._justifyProp&&(this.justify=this._justifyProp.getValue(t,e)),this._letterSpacingProp&&(this.letterSpacing=this._letterSpacingProp.getValue(t,e)),this._lineHeightProp&&(this.lineHeight=this._lineHeightProp.getValue(t,e)),this._maxAngleProp&&(this.maxAngle=this._maxAngleProp.getValue(t,e)),this._maxWidthProp&&(this.maxWidth=this._maxWidthProp.getValue(t,e)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,e)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,e)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,e)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,e)),this._writingModeProp&&(this.writingMode=this._writingModeProp.getValue(t,e))}}},51785:(t,e,r)=>{r.d(e,{Z:()=>a});var n=r(21315),i=r(7333);class a{constructor(t){if(this._style=t,this.backgroundBucketIds=[],this._uidToLayer=new Map,this._layerByName={},this._runningId=0,t.layers||(t.layers=[]),this.version=parseFloat(t.version),this.layers=t.layers.map(((t,e,r)=>this._create(t,e,r))),this.layers){let t;for(let e=0;e<this.layers.length;e++)t=this.layers[e],this._layerByName[t.id]=t,this._uidToLayer.set(t.uid,t),t.type===n.fR.BACKGROUND&&this.backgroundBucketIds.push(t.id)}this._identifyRefLayers()}isPainterDataDriven(t){const e=this._layerByName[t];return!!e&&e.isPainterDataDriven()}getStyleLayerId(t){return t>=this.layers.length?null:this.layers[t].id}getStyleLayerByUID(t){return this._uidToLayer.get(t)??null}getStyleLayerIndex(t){const e=this._layerByName[t];return e?this.layers.indexOf(e):-1}setStyleLayer(t,e){if(!t||!t.id)return;const r=this._style;null!=e&&e>=this.layers.length&&(e=this.layers.length-1);let n,i=!0;const s=this._layerByName[t.id];if(s){const o=this.layers.indexOf(s);e||(e=o),e===o?(i=!1,n=a._recreateLayer(t,s),this.layers[e]=n,r.layers[e]=t):(this.layers.splice(o,1),r.layers.splice(o,1),n=this._create(t,e,this.layers),this.layers.splice(e,0,n),r.layers.splice(e,0,t))}else n=this._create(t,e,this.layers),!e||e>=this.layers.length?(this.layers.push(n),r.layers.push(t)):(this.layers.splice(e,0,n),r.layers.splice(e,0,t));this._layerByName[t.id]=n,this._uidToLayer.set(n.uid,n),i&&this._recomputeZValues(),this._identifyRefLayers()}getStyleLayer(t){const e=this._layerByName[t];return e?{type:e.typeName,id:e.id,source:e.source,"source-layer":e.sourceLayer,minzoom:e.minzoom,maxzoom:e.maxzoom,filter:e.filter,layout:e.layout,paint:e.paint}:null}deleteStyleLayer(t){const e=this._layerByName[t];if(e){delete this._layerByName[t],this._uidToLayer.delete(e.uid);const r=this.layers.indexOf(e);this.layers.splice(r,1),this._style.layers.splice(r,1),this._recomputeZValues(),this._identifyRefLayers()}}getLayerById(t){return this._layerByName[t]}getLayoutProperties(t){const e=this._layerByName[t];return e?e.layout:null}getPaintProperties(t){const e=this._layerByName[t];return e?e.paint:null}setPaintProperties(t,e){const r=this._layerByName[t];if(!r)return;const n={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:r.layout,paint:e},i=a._recreateLayer(n,r),s=this.layers.indexOf(r);this.layers[s]=i,this._style.layers[s].paint=e,this._layerByName[r.id]=i,this._uidToLayer.set(r.uid,i)}setLayoutProperties(t,e){const r=this._layerByName[t];if(!r)return;const n={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:e,paint:r.paint},i=a._recreateLayer(n,r),s=this.layers.indexOf(r);this.layers[s]=i,this._style.layers[s].layout=e,this._layerByName[r.id]=i,this._uidToLayer.set(r.uid,i)}setStyleLayerVisibility(t,e){const r=this._layerByName[t];if(!r)return;const n=r.layout||{};n.visibility=e;const i={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:n,paint:r.paint},s=a._recreateLayer(i,r),o=this.layers.indexOf(r);this.layers[o]=s,this._style.layers[o].layout=n,this._layerByName[r.id]=s,this._uidToLayer.set(r.uid,s)}getStyleLayerVisibility(t){const e=this._layerByName[t];return e?e.layout?.visibility??"visible":"none"}_recomputeZValues(){const t=this.layers,e=1/(t.length+1);for(let r=0;r<t.length;r++)t[r].z=1-(1+r)*e}_identifyRefLayers(){const t=[],e=[];let r=0;for(const i of this.layers){const a=i.layout;if(i.type===n.fR.FILL){const e=i;let n=i.source+"|"+i.sourceLayer;n+="|"+a?.visibility??"",n+="|"+i.minzoom,n+="|"+i.maxzoom,n+="|"+JSON.stringify(i.filter),(e.hasDataDrivenFill||e.hasDataDrivenOutline)&&(n+="|"+r),t.push({key:n,layer:i})}else if(i.type===n.fR.LINE){const t=i;let n=i.source+"|"+i.sourceLayer;n+="|"+a?.visibility??"",n+="|"+i.minzoom,n+="|"+i.maxzoom,n+="|"+JSON.stringify(i.filter),n+="|"+(void 0!==a?a["line-cap"]:""),n+="|"+(void 0!==a?a["line-join"]:""),t.hasDataDrivenLine&&(n+="|"+r),e.push({key:n,layer:i})}++r}this._assignRefLayers(t),this._assignRefLayers(e)}_assignRefLayers(t){let e,r;t.sort(((t,e)=>t.key<e.key?-1:t.key>e.key?1:0));const i=t.length;for(let a=0;a<i;a++){const s=t[a];if(s.key===e)s.layer.refLayerId=r;else if(e=s.key,r=s.layer.id,s.layer.type===n.fR.FILL){if(!s.layer.getPaintProperty("fill-outline-color"))for(let n=a+1;n<i;n++){const i=t[n];if(i.key!==e)break;if(i.layer.getPaintProperty("fill-outline-color")){t[a]=i,t[n]=s,r=i.layer.id;break}}}else if(s.layer.type===n.fR.LINE){let n=s.layer;for(let o=a+1;o<i;o++){const i=t[o];if(i.key!==e)break;const l=i.layer;(n.canUseThinTessellation&&!l.canUseThinTessellation||!n.canUseThinTessellation&&(l.getPaintProperty("line-pattern")||l.getPaintProperty("line-dasharray")))&&(n=l,t[a]=i,t[o]=s,r=i.layer.id)}}}}_create(t,e,r){const a=1-(1+e)*(1/(r.length+1)),s=this._runningId++;switch(t.type){case"background":return new i.Et(n.fR.BACKGROUND,t,a,s);case"fill":return new i.Le(n.fR.FILL,t,a,s);case"line":return new i.gf(n.fR.LINE,t,a,s);case"symbol":return new i.jG(n.fR.SYMBOL,t,a,s);case"raster":throw new Error("Unsupported vector tile raster layer");case"circle":return new i.sj(n.fR.CIRCLE,t,a,s)}throw new Error("Unknown vector tile layer")}static _recreateLayer(t,e){switch(t.type){case"background":return new i.Et(n.fR.BACKGROUND,t,e.z,e.uid);case"fill":return new i.Le(n.fR.FILL,t,e.z,e.uid);case"line":return new i.gf(n.fR.LINE,t,e.z,e.uid);case"symbol":return new i.jG(n.fR.SYMBOL,t,e.z,e.uid);case"raster":throw new Error("Unsupported vector tile raster layer");case"circle":return new i.sj(n.fR.CIRCLE,t,e.z,e.uid)}}}},35362:(t,e,r)=>{r.d(e,{E:()=>n,V:()=>i});class n{constructor(t,e){this.x=t,this.y=e}clone(){return new n(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){this.x=t,this.y=e}normalize(){const t=this.x,e=this.y,r=Math.sqrt(t*t+e*e);this.x/=r,this.y/=r}rightPerpendicular(){const t=this.x;this.x=this.y,this.y=-t}move(t,e){this.x+=t,this.y+=e}assign(t){this.x=t.x,this.y=t.y}assignAdd(t,e){this.x=t.x+e.x,this.y=t.y+e.y}assignSub(t,e){this.x=t.x-e.x,this.y=t.y-e.y}rotate(t,e){const r=this.x,n=this.y;this.x=r*t-n*e,this.y=r*e+n*t}scale(t){this.x*=t,this.y*=t}length(){const t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}static distance(t,e){const r=e.x-t.x,n=e.y-t.y;return Math.sqrt(r*r+n*n)}static add(t,e){return new n(t.x+e.x,t.y+e.y)}static sub(t,e){return new n(t.x-e.x,t.y-e.y)}}var i;!function(t){t[t.Unknown=0]="Unknown",t[t.Point=1]="Point",t[t.LineString=2]="LineString",t[t.Polygon=3]="Polygon"}(i||(i={}))},21968:(t,e,r)=>{r.d(e,{G:()=>n});class n{constructor(t,e,r,n,i,a=!1,s=0){this.name=t,this.count=e,this.type=r,this.offset=n,this.stride=i,this.normalized=a,this.divisor=s}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1785],{3892:(t,e,r)=>{function n(t){return"h"in t&&"s"in t&&"v"in t}function i(t){return"l"in t&&"a"in t&&"b"in t}function a(t){return"l"in t&&"c"in t&&"h"in t}r.d(e,{Y3:()=>g,_Y:()=>f,sJ:()=>m,xr:()=>y});const s=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],o=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function l(t,e){const r=[];let n,i;if(t[0].length!==e.length)throw"dimensions do not match";const a=t.length,s=t[0].length;let o=0;for(n=0;n<a;n++){for(o=0,i=0;i<s;i++)o+=t[n][i]*e[i];r.push(o)}return r}function u(t){const e=[t.r/255,t.g/255,t.b/255].map((t=>t<=.04045?t/12.92:((t+.055)/1.055)**2.4)),r=l(s,e);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function c(t){const e=l(o,[t.x/100,t.y/100,t.z/100]).map((t=>{const e=t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055;return Math.min(1,Math.max(e,0))}));return{r:Math.round(255*e[0]),g:Math.round(255*e[1]),b:Math.round(255*e[2])}}function h(t){const e=[t.x/95.047,t.y/100,t.z/108.883].map((t=>t>(6/29)**3?t**(1/3):1/3*(29/6)**2*t+4/29));return{l:116*e[1]-16,a:500*(e[0]-e[1]),b:200*(e[1]-e[2])}}function p(t){const e=t.l,r=[(e+16)/116+t.a/500,(e+16)/116,(e+16)/116-t.b/200].map((t=>t>6/29?t**3:3*(6/29)**2*(t-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function y(t){return"r"in(e=t)&&"g"in e&&"b"in e?t:a(t)?function(t){return c(p(function(t){const e=t.l,r=t.c,n=t.h;return{l:e,a:r*Math.cos(n),b:r*Math.sin(n)}}(t)))}(t):i(t)?function(t){return c(p(t))}(t):function(t){return"x"in t&&"y"in t&&"z"in t}(t)?c(t):n(t)?function(t){const e=(t.h+360)%360/60,r=t.s/100,n=t.v/100*255,i=n*r,a=i*(1-Math.abs(e%2-1));let s;switch(Math.floor(e)){case 0:s={r:i,g:a,b:0};break;case 1:s={r:a,g:i,b:0};break;case 2:s={r:0,g:i,b:a};break;case 3:s={r:0,g:a,b:i};break;case 4:s={r:a,g:0,b:i};break;case 5:case 6:s={r:i,g:0,b:a};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-i),s.g=Math.round(s.g+n-i),s.b=Math.round(s.b+n-i),s}(t):t;var e}function f(t){return n(t)?t:function(t){const e=t.r,r=t.g,n=t.b,i=Math.max(e,r,n),a=i-Math.min(e,r,n);let s=i,o=0===a?0:i===e?(r-n)/a%6:i===r?(n-e)/a+2:(e-r)/a+4,l=0===a?0:a/s;return o<0&&(o+=6),o*=60,l*=100,s*=100/255,{h:o,s:l,v:s}}(y(t))}function g(t){return i(t)?t:function(t){return h(u(t))}(y(t))}function m(t){return a(t)?t:function(t){return function(t){const e=t.l,r=t.a,n=t.b,i=Math.sqrt(r*r+n*n);let a=Math.atan2(n,r);return a=a>0?a:a+2*Math.PI,{l:e,c:i,h:a}}(h(u(t)))}(y(t))}},31363:(t,e,r)=>{r.d(e,{B1:()=>n,DQ:()=>u,DT:()=>o,JJ:()=>i,Or:()=>c,_U:()=>a,k3:()=>h,sX:()=>p});const n=Number.POSITIVE_INFINITY,i=Math.PI,a=2*i,s=128/i,o=i/180,l=1/Math.LN2;function u(t,e){return(t%=e)>=0?t:t+e}function c(t){return u(t*s,256)}function h(t){return Math.log(t)*l}function p(t,e,r){return t*(1-r)+e*r}},26084:(t,e,r)=>{r.d(e,{Z:()=>n});class n{constructor(t){this._array=[],t<=0&&console.error("strideInBytes must be positive!"),this._stride=t}get array(){return this._array}get index(){return 4*this._array.length/this._stride}get itemSize(){return this._stride}get sizeInBytes(){return 4*this._array.length}reset(){this.array.length=0}toBuffer(){return new Uint32Array(this._array).buffer}static i1616to32(t,e){return 65535&t|e<<16}static i8888to32(t,e,r,n){return 255&t|(255&e)<<8|(255&r)<<16|n<<24}static i8816to32(t,e,r){return 255&t|(255&e)<<8|r<<16}}},4215:(t,e,r)=>{var n,i,a,s,o;r.d(e,{Fr:()=>o,_K:()=>s,al:()=>i}),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.FILL_VERTEX=1]="FILL_VERTEX",t[t.FILL_DD_VERTEX=2]="FILL_DD_VERTEX",t[t.FILL_INDEX=3]="FILL_INDEX",t[t.OUTLINE_VERTEX=4]="OUTLINE_VERTEX",t[t.OUTLINE_DD_VERTEX=5]="OUTLINE_DD_VERTEX",t[t.OUTLINE_INDEX=6]="OUTLINE_INDEX",t[t.LINE_VERTEX=7]="LINE_VERTEX",t[t.LINE_DD_VERTEX=8]="LINE_DD_VERTEX",t[t.LINE_INDEX=9]="LINE_INDEX",t[t.ICON_VERTEX=10]="ICON_VERTEX",t[t.ICON_DD_VERTEX=11]="ICON_DD_VERTEX",t[t.ICON_INDEX=12]="ICON_INDEX",t[t.TEXT_VERTEX=13]="TEXT_VERTEX",t[t.TEXT_DD_VERTEX=14]="TEXT_DD_VERTEX",t[t.TEXT_INDEX=15]="TEXT_INDEX",t[t.CIRCLE_VERTEX=16]="CIRCLE_VERTEX",t[t.CIRCLE_INDEX=17]="CIRCLE_INDEX"}(n||(n={})),function(t){t[t.FILL=1]="FILL",t[t.LINE=2]="LINE",t[t.SYMBOL=3]="SYMBOL",t[t.CIRCLE=4]="CIRCLE"}(i||(i={})),function(t){t[t.BACKGROUND=0]="BACKGROUND",t[t.OPAQUE=1]="OPAQUE",t[t.TRANSLUCENT=2]="TRANSLUCENT",t[t.SYMBOLS=3]="SYMBOLS",t[t.HITTEST=4]="HITTEST"}(a||(a={})),function(t){t[t.BACKGROUND=0]="BACKGROUND",t[t.FILL=1]="FILL",t[t.OUTLINE=2]="OUTLINE",t[t.LINE=3]="LINE",t[t.ICON=4]="ICON",t[t.CIRCLE=5]="CIRCLE",t[t.TEXT=6]="TEXT",t[t.TILEINFO=7]="TILEINFO"}(s||(s={})),function(t){t[t.PAINTER_CHANGED=0]="PAINTER_CHANGED",t[t.LAYOUT_CHANGED=1]="LAYOUT_CHANGED",t[t.LAYER_CHANGED=2]="LAYER_CHANGED",t[t.LAYER_REMOVED=3]="LAYER_REMOVED",t[t.SPRITES_CHANGED=4]="SPRITES_CHANGED"}(o||(o={}))},21315:(t,e,r)=>{r.d(e,{R:()=>a,_5:()=>u,aF:()=>s,f2:()=>f,fR:()=>n,nR:()=>l,r1:()=>h,vL:()=>o});var n,i,a,s,o,l,u,c,h,p,y=r(95648);(p=n||(n={}))[p.BACKGROUND=0]="BACKGROUND",p[p.FILL=1]="FILL",p[p.LINE=2]="LINE",p[p.SYMBOL=3]="SYMBOL",p[p.CIRCLE=4]="CIRCLE",function(t){t[t.VISIBLE=0]="VISIBLE",t[t.NONE=1]="NONE"}(i||(i={})),function(t){t[t.POINT=0]="POINT",t[t.LINE=1]="LINE",t[t.LINE_CENTER=2]="LINE_CENTER"}(a||(a={})),function(t){t[t.MAP=0]="MAP",t[t.VIEWPORT=1]="VIEWPORT",t[t.AUTO=2]="AUTO"}(s||(s={})),function(t){t[t.AUTO=0]="AUTO",t[t.LEFT=1]="LEFT",t[t.CENTER=2]="CENTER",t[t.RIGHT=3]="RIGHT"}(o||(o={})),function(t){t[t.CENTER=0]="CENTER",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.TOP=3]="TOP",t[t.BOTTOM=4]="BOTTOM",t[t.TOP_LEFT=5]="TOP_LEFT",t[t.TOP_RIGHT=6]="TOP_RIGHT",t[t.BOTTOM_LEFT=7]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=8]="BOTTOM_RIGHT"}(l||(l={})),function(t){t[t.NONE=0]="NONE",t[t.UPPERCASE=1]="UPPERCASE",t[t.LOWERCASE=2]="LOWERCASE"}(u||(u={})),function(t){t[t.MAP=0]="MAP",t[t.VIEWPORT=1]="VIEWPORT"}(c||(c={})),function(t){t[t.HORIZONTAL=0]="HORIZONTAL",t[t.VERTICAL=1]="VERTICAL"}(h||(h={}));class f{}f.backgroundLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE}},f.fillLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE}},f.lineLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE},"line-cap":{type:"enum",values:["butt","round","square"],default:y.RL.BUTT},"line-join":{type:"enum",values:["bevel","round","miter"],default:y.AH.MITER},"line-miter-limit":{type:"number",default:2},"line-round-limit":{type:"number",default:1.05}},f.symbolLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE},"symbol-avoid-edges":{type:"boolean",default:!1},"symbol-placement":{type:"enum",values:["point","line","line-center"],default:a.POINT},"symbol-sort-key":{type:"number",default:-1},"symbol-spacing":{type:"number",minimum:1,default:250},"icon-allow-overlap":{type:"boolean",default:!1},"icon-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:l.CENTER},"icon-ignore-placement":{type:"boolean",default:!1},"icon-image":{type:"string"},"icon-keep-upright":{type:"boolean",default:!1},"icon-offset":{type:"array",value:"number",length:2,default:[0,0]},"icon-optional":{type:"boolean",default:!1},"icon-padding":{type:"number",minimum:0,default:2},"icon-rotate":{type:"number",default:0},"icon-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:s.AUTO},"icon-size":{type:"number",minimum:0,default:1},"text-allow-overlap":{type:"boolean",default:!1},"text-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:l.CENTER},"text-field":{type:"string"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"]},"text-ignore-placement":{type:"boolean",default:!1},"text-justify":{type:"enum",values:["auto","left","center","right"],default:o.CENTER},"text-keep-upright":{type:"boolean",default:!0},"text-letter-spacing":{type:"number",default:0},"text-line-height":{type:"number",default:1.2},"text-max-angle":{type:"number",minimum:0,default:45},"text-max-width":{type:"number",minimum:0,default:10},"text-offset":{type:"array",value:"number",length:2,default:[0,0]},"text-optional":{type:"boolean",default:!1},"text-padding":{type:"number",minimum:0,default:2},"text-rotate":{type:"number",default:0},"text-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:s.AUTO},"text-size":{type:"number",minimum:0,default:16},"text-transform":{type:"enum",values:["none","uppercase","lowercase"],default:u.NONE},"text-writing-mode":{type:"array",value:"enum",values:["horizontal","vertical"],default:[h.HORIZONTAL]}},f.circleLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE}},f.backgroundPaintDefinition={"background-color":{type:"color",default:[0,0,0,1]},"background-opacity":{type:"number",minimum:0,maximum:1,default:1},"background-pattern":{type:"string"}},f.fillPaintDefinition={"fill-antialias":{type:"boolean",default:!0},"fill-color":{type:"color",default:[0,0,0,1]},"fill-opacity":{type:"number",minimum:0,maximum:1,default:1},"fill-outline-color":{type:"color",default:[0,0,0,0]},"fill-pattern":{type:"string"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0]},"fill-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP}},f.linePaintDefinition={"line-blur":{type:"number",minimum:0,default:0},"line-color":{type:"color",default:[0,0,0,1]},"line-dasharray":{type:"array",value:"number",default:[]},"line-gap-width":{type:"number",minimum:0,default:0},"line-offset":{type:"number",default:0},"line-opacity":{type:"number",minimum:0,maximum:1,default:1},"line-pattern":{type:"string"},"line-translate":{type:"array",value:"number",length:2,default:[0,0]},"line-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP},"line-width":{type:"number",minimum:0,default:1}},f.symbolPaintDefinition={"icon-color":{type:"color",default:[0,0,0,1]},"icon-halo-blur":{type:"number",minimum:0,default:0},"icon-halo-color":{type:"color",default:[0,0,0,0]},"icon-halo-width":{type:"number",minimum:0,default:0},"icon-opacity":{type:"number",minimum:0,maximum:1,default:1},"icon-translate":{type:"array",value:"number",length:2,default:[0,0]},"icon-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP},"text-color":{type:"color",default:[0,0,0,1]},"text-halo-blur":{type:"number",minimum:0,default:0},"text-halo-color":{type:"color",default:[0,0,0,0]},"text-halo-width":{type:"number",minimum:0,default:0},"text-opacity":{type:"number",minimum:0,maximum:1,default:1},"text-translate":{type:"array",value:"number",length:2,default:[0,0]},"text-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP}},f.rasterPaintDefinition={"raster-opacity":{type:"number",minimum:0,maximum:1,default:1},"raster-hue-rotate":{type:"number",default:0},"raster-brightness-min":{type:"number",minimum:0,maximum:1,default:0},"raster-brightness-max":{type:"number",minimum:0,maximum:1,default:1},"raster-saturation":{type:"number",minimum:-1,maximum:1,default:0},"raster-contrast":{type:"number",minimum:-1,maximum:1,default:0},"raster-fade-duration":{type:"number",minimum:0,default:300}},f.circlePaintDefinition={"circle-blur":{type:"number",minimum:0,default:0},"circle-color":{type:"color",default:[0,0,0,1]},"circle-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-radius":{type:"number",minimum:0,default:5},"circle-stroke-color":{type:"color",default:[0,0,0,1]},"circle-stroke-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-stroke-width":{type:"number",minimum:0,default:0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0]},"circle-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP}}},7333:(t,e,r)=>{r.d(e,{Et:()=>Pt,sj:()=>Gt,Le:()=>Ot,_L:()=>Bt,gf:()=>St,jG:()=>Ut,nj:()=>kt});var n,i,a=r(95648),s=r(4215),o=r(70586),l=r(26084);!function(t){t[t.R8_SIGNED=0]="R8_SIGNED",t[t.R8_UNSIGNED=1]="R8_UNSIGNED",t[t.R16_SIGNED=2]="R16_SIGNED",t[t.R16_UNSIGNED=3]="R16_UNSIGNED",t[t.R8G8_SIGNED=4]="R8G8_SIGNED",t[t.R8G8_UNSIGNED=5]="R8G8_UNSIGNED",t[t.R16G16_SIGNED=6]="R16G16_SIGNED",t[t.R16G16_UNSIGNED=7]="R16G16_UNSIGNED",t[t.R8G8B8A8_SIGNED=8]="R8G8B8A8_SIGNED",t[t.R8G8B8A8_UNSIGNED=9]="R8G8B8A8_UNSIGNED",t[t.R8G8B8A8_COLOR=10]="R8G8B8A8_COLOR",t[t.R16G16B16A16_DASHARRAY=11]="R16G16B16A16_DASHARRAY",t[t.R16G16B16A16_PATTERN=12]="R16G16B16A16_PATTERN"}(n||(n={})),function(t){t[t.UNIFORM=0]="UNIFORM",t[t.DATA_DRIVEN=1]="DATA_DRIVEN",t[t.INTERPOLATED_DATA_DRIVEN=2]="INTERPOLATED_DATA_DRIVEN",t[t.UNUSED=3]="UNUSED"}(i||(i={}));var u=r(35371),c=r(21968);class h{constructor(t){this._locations=new Map,this._key=t}get key(){return this._key}get type(){return 7&this._key}defines(){return[]}getStride(){return this._layoutInfo||this._buildAttributesInfo(),this._stride}getAttributeLocations(){return 0===this._locations.size&&this._buildAttributesInfo(),this._locations}getLayoutInfo(){return this._layoutInfo||this._buildAttributesInfo(),this._layoutInfo}getEncodingInfos(){return this._propertyEncodingInfo||this._buildAttributesInfo(),this._propertyEncodingInfo}getUniforms(){return this._uniforms||this._buildAttributesInfo(),this._uniforms}getShaderHeader(){return this._shaderHeader||this._buildAttributesInfo(),this._shaderHeader}getShaderMain(){return this._shaderMain||this._buildAttributesInfo(),this._shaderMain}setDataUniforms(t,e,r,n,i){const a=this.getUniforms();for(const s of a){const{name:a,type:o,getValue:l}=s,u=l(r,e,n,i);if(null!==u)switch(o){case"float":t.setUniform1f(a,u);break;case"vec2":t.setUniform2fv(a,u);break;case"vec4":t.setUniform4fv(a,u)}}}encodeAttributes(t,e,r,i){const a=this.attributesInfo(),s=this.getEncodingInfos(),o=[];let l=0,u=0;for(const c of Object.keys(s)){const h=s[c],{type:p,precisionFactor:y,isLayout:f}=a[c],g=f?r.getLayoutProperty(c):r.getPaintProperty(c),m=g.interpolator?.getInterpolationRange(e);let d=0;for(const r of h){const{offset:a,bufferElementsToAdd:s}=r;if(s>0){for(let t=0;t<s;t++)o.push(0);l+=u,u=r.bufferElementsToAdd}const c=i??g.getValue(m?m[d]:e,t);switch(p){case n.R8_SIGNED:case n.R8_UNSIGNED:o[l]|=this._encodeByte(c*(y||1),8*a);break;case n.R16_SIGNED:case n.R16_UNSIGNED:o[l]|=this._encodeShort(c*(y||1),8*a);break;case n.R8G8_SIGNED:case n.R8G8_UNSIGNED:o[l]|=this._encodeByte(c*(y||1),8*a),o[l]|=this._encodeByte(c*(y||1),8*a+8);break;case n.R16G16_SIGNED:case n.R16G16_UNSIGNED:o[l]|=this._encodeShort(c*(y||1),8*a),o[l]|=this._encodeShort(c*(y||1),8*a+16);break;case n.R8G8B8A8_SIGNED:case n.R8G8B8A8_UNSIGNED:o[l]|=this._encodeByte(c*(y||1),8*a),o[l]|=this._encodeByte(c*(y||1),8*a+8),o[l]|=this._encodeByte(c*(y||1),8*a+16),o[l]|=this._encodeByte(c*(y||1),8*a+24);break;case n.R8G8B8A8_COLOR:o[l]=this._encodeColor(c);break;case n.R16G16B16A16_DASHARRAY:case n.R16G16B16A16_PATTERN:this._encodePattern(l,o,c);break;default:throw new Error("Unsupported encoding type")}d++}}return o}getAtributeState(t){let e=0;const r=3+2*t;return e|=this._bit(r),e|=this._bit(r+1)<<1,e}_buildAttributesInfo(){const t=[],e={},r={};let n=-1;const a=this.attributesInfo(),s=this.attributes();let o=-1;for(const l of s){o++;const s=this.getAtributeState(o);if(s===i.UNIFORM||s===i.UNUSED)continue;const u=a[l],c=[];e[l]=c;const p=u.type;for(let e=0;e<s;e++){const{dataType:e,bytesPerElement:i,count:a,normalized:s}=h._encodingInfo[p],o=i*a;let l=r[e],u=0;if(!l||l.count+a>4)n++,l={dataIndex:n,count:0,offset:0},4!==a&&(r[e]=l),t.push({location:-1,name:"a_data_"+n,count:a,type:e,normalized:s}),u=Math.ceil(Math.max(o/4,1));else{const e=t[l.dataIndex];e.count+=a,u=Math.ceil(Math.max(e.count*i/4,1))-Math.ceil(Math.max(l.offset/4,1))}c.push({dataIndex:l.dataIndex,offset:l.offset,bufferElementsToAdd:u}),l.offset+=o,l.count+=a}}for(const e of t)switch(e.type){case u.g.BYTE:case u.g.UNSIGNED_BYTE:e.count=4;case u.g.SHORT:case u.g.UNSIGNED_SHORT:e.count+=e.count%2}this._buildVertexBufferLayout(t);let l=0;const c=this._layoutInfo.geometry;for(const t of c)this._locations.set(t.name,l++);const p=this._layoutInfo.opacity;if(p)for(const t of p)this._locations.set(t.name,l++);this._buildShaderInfo(t,e),this._propertyEncodingInfo=e}_buildVertexBufferLayout(t){const e={},r=this.geometryInfo();let n=r[0].stride;if(0===t.length)e.geometry=r;else{const i=[];let a=n;for(const e of t)n+=p(e.type)*e.count;for(const t of r){const e={...t};e.stride=n,i.push(e)}for(const e of t)i.push(new c.G(e.name,e.count,e.type,a,n)),a+=p(e.type)*e.count;e.geometry=i}this.opacityInfo()&&(e.opacity=this.opacityInfo()),this._layoutInfo=e,this._stride=n}_buildShaderInfo(t,e){let r="\n",a="\n";const s=[];for(const e of t)r+=`attribute ${this._getType(e.count)} ${e.name};\n`;const l=this.attributes(),u=this.attributesInfo();let c=-1;for(const t of l){c++;const{name:l,type:p,precisionFactor:f,isLayout:g}=u[t],m=f&&1!==f?" * "+1/f:"",{bytesPerElement:d,count:_}=h._encodingInfo[p],E=t=>`a_data_${t.dataIndex}${y(_,t.offset,d)}`;switch(this.getAtributeState(c)){case i.UNIFORM:{const e=this._getType(_),i=`u_${l}`;s.push({name:i,type:e,getValue:(e,r,i,a)=>{const s=g?e.getLayoutValue(t,r):e.getPaintValue(t,r);if(p===n.R16G16B16A16_DASHARRAY){const t=e.getDashKey(s,e.getLayoutValue("line-cap",r)),n=a.getMosaicItemPosition(t,!1);if((0,o.Wi)(n))return null;const{tl:i,br:l}=n;return[i[0],l[1],l[0],i[1]]}if(p===n.R16G16B16A16_PATTERN){const e=a.getMosaicItemPosition(s,!t.includes("line-"));if((0,o.Wi)(e))return null;const{tl:r,br:n}=e;return[r[0],n[1],n[0],r[1]]}if(p===n.R8G8B8A8_COLOR){const t=s[3];return[t*s[0],t*s[1],t*s[2],t]}return s}}),r+=`uniform ${e} ${i};\n`,a+=`${e} ${l} = ${i};\n`}break;case i.DATA_DRIVEN:{const r=E(e[t][0]);a+=`${this._getType(_)} ${l} = ${r}${m};\n`}break;case i.INTERPOLATED_DATA_DRIVEN:{const n=`u_t_${l}`;s.push({name:n,type:"float",getValue:(e,r,n,i)=>(g?e.getLayoutProperty(t):e.getPaintProperty(t)).interpolator.interpolationUniformValue(n,r)}),r+=`uniform float ${n};\n`;const i=E(e[t][0]),o=E(e[t][1]);a+=`${this._getType(_)} ${l} = mix(${i}${m}, ${o}${m}, ${n});\n`}}}this._shaderHeader=r,this._shaderMain=a,this._uniforms=s}_bit(t){return(this._key&1<<t)>>t}_getType(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4"}throw new Error("Invalid count")}_encodeColor(t){const e=255*t[3];return l.Z.i8888to32(t[0]*e,t[1]*e,t[2]*e,e)}_encodePattern(t,e,r){if(!r||!r.rect)return;const n=r.rect,i=r.width,a=r.height;e[t]=this._encodeShort(n.x+2,0),e[t]|=this._encodeShort(n.y+2+a,16),e[t+1]=this._encodeShort(n.x+2+i,0),e[t+1]|=this._encodeShort(n.y+2,16)}_encodeByte(t,e){return(255&t)<<e}_encodeShort(t,e){return(65535&t)<<e}}h._encodingInfo={[n.R8_SIGNED]:{dataType:u.g.BYTE,bytesPerElement:1,count:1,normalized:!1},[n.R8_UNSIGNED]:{dataType:u.g.UNSIGNED_BYTE,bytesPerElement:1,count:1,normalized:!1},[n.R16_SIGNED]:{dataType:u.g.SHORT,bytesPerElement:2,count:1,normalized:!1},[n.R16_UNSIGNED]:{dataType:u.g.UNSIGNED_SHORT,bytesPerElement:2,count:1,normalized:!1},[n.R8G8_SIGNED]:{dataType:u.g.BYTE,bytesPerElement:1,count:2,normalized:!1},[n.R8G8_UNSIGNED]:{dataType:u.g.UNSIGNED_BYTE,bytesPerElement:1,count:2,normalized:!1},[n.R16G16_SIGNED]:{dataType:u.g.SHORT,bytesPerElement:2,count:2,normalized:!1},[n.R16G16_UNSIGNED]:{dataType:u.g.UNSIGNED_SHORT,bytesPerElement:2,count:2,normalized:!1},[n.R8G8B8A8_SIGNED]:{dataType:u.g.BYTE,bytesPerElement:1,count:4,normalized:!1},[n.R8G8B8A8_UNSIGNED]:{dataType:u.g.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!1},[n.R8G8B8A8_COLOR]:{dataType:u.g.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!0},[n.R16G16B16A16_DASHARRAY]:{dataType:u.g.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1},[n.R16G16B16A16_PATTERN]:{dataType:u.g.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1}};const p=t=>{switch(t){case u.g.FLOAT:case u.g.INT:case u.g.UNSIGNED_INT:return 4;case u.g.SHORT:case u.g.UNSIGNED_SHORT:return 2;case u.g.BYTE:case u.g.UNSIGNED_BYTE:return 1}},y=(t,e,r)=>{const n=e/r;if(1===t)switch(n){case 0:return".x";case 1:return".y";case 2:return".z";case 3:return".w"}else if(2===t)switch(n){case 0:return".xy";case 1:return".yz";case 2:return".zw"}else if(3===t)switch(n){case 0:return".xyz";case 1:return".yzw"}return""};class f extends h{constructor(t){super(t)}geometryInfo(){return f.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return f.ATTRIBUTES}attributesInfo(){return f.ATTRIBUTES_INFO}}f.ATTRIBUTES=[],f.GEOMETRY_LAYOUT=[new c.G("a_pos",2,u.g.BYTE,0,2)],f.ATTRIBUTES_INFO={};class g extends h{constructor(t){super(t)}geometryInfo(){return g.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return g.ATTRIBUTES}attributesInfo(){return g.ATTRIBUTES_INFO}}g.ATTRIBUTES=["circle-radius","circle-color","circle-opacity","circle-stroke-width","circle-stroke-color","circle-stroke-opacity","circle-blur"],g.GEOMETRY_LAYOUT=[new c.G("a_pos",2,u.g.SHORT,0,4)],g.ATTRIBUTES_INFO={"circle-radius":{name:"radius",type:n.R8_UNSIGNED},"circle-color":{name:"color",type:n.R8G8B8A8_COLOR},"circle-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"circle-stroke-width":{name:"stroke_width",type:n.R8_UNSIGNED,precisionFactor:4},"circle-stroke-color":{name:"stroke_color",type:n.R8G8B8A8_COLOR},"circle-stroke-opacity":{name:"stroke_opacity",type:n.R8_UNSIGNED,precisionFactor:100},"circle-blur":{name:"blur",type:n.R8_UNSIGNED,precisionFactor:32}};class m extends h{constructor(t){super(t)}geometryInfo(){return m.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return m.ATTRIBUTES}attributesInfo(){return m.ATTRIBUTES_INFO}}m.ATTRIBUTES=["fill-color","fill-opacity","fill-pattern"],m.GEOMETRY_LAYOUT=[new c.G("a_pos",2,u.g.SHORT,0,4)],m.ATTRIBUTES_INFO={"fill-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"fill-pattern":{name:"tlbr",type:n.R16G16B16A16_PATTERN,isOptional:!0}};class d extends h{constructor(t,e){super(t),this.usefillColor=e}geometryInfo(){return d.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return this.usefillColor?d.ATTRIBUTES_FILL:d.ATTRIBUTES_OUTLINE}attributesInfo(){return this.usefillColor?d.ATTRIBUTES_INFO_FILL:d.ATTRIBUTES_INFO_OUTLINE}}d.ATTRIBUTES_OUTLINE=["fill-outline-color","fill-opacity"],d.ATTRIBUTES_FILL=["fill-color","fill-opacity"],d.GEOMETRY_LAYOUT=[new c.G("a_pos",2,u.g.SHORT,0,8),new c.G("a_offset",2,u.g.BYTE,4,8),new c.G("a_xnormal",2,u.g.BYTE,6,8)],d.ATTRIBUTES_INFO_OUTLINE={"fill-outline-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100}},d.ATTRIBUTES_INFO_FILL={"fill-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100}};class _ extends h{constructor(t){super(t)}geometryInfo(){return _.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return _.ATTRIBUTES}attributesInfo(){return _.ATTRIBUTES_INFO}}_.ATTRIBUTES=["line-blur","line-color","line-gap-width","line-offset","line-opacity","line-width","line-pattern","line-dasharray"],_.GEOMETRY_LAYOUT=[new c.G("a_pos",2,u.g.SHORT,0,16),new c.G("a_extrude_offset",4,u.g.BYTE,4,16),new c.G("a_dir_normal",4,u.g.BYTE,8,16),new c.G("a_accumulatedDistance",2,u.g.UNSIGNED_SHORT,12,16)],_.ATTRIBUTES_INFO={"line-width":{name:"width",type:n.R8_UNSIGNED,precisionFactor:2},"line-gap-width":{name:"gap_width",type:n.R8_UNSIGNED,precisionFactor:2},"line-offset":{name:"offset",type:n.R8_SIGNED,precisionFactor:2},"line-color":{name:"color",type:n.R8G8B8A8_COLOR},"line-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"line-blur":{name:"blur",type:n.R8_UNSIGNED,precisionFactor:4},"line-pattern":{name:"tlbr",type:n.R16G16B16A16_PATTERN,isOptional:!0},"line-dasharray":{name:"tlbr",type:n.R16G16B16A16_DASHARRAY,isOptional:!0}};const E=[new c.G("a_pos",2,u.g.SHORT,0,16),new c.G("a_vertexOffset",2,u.g.SHORT,4,16),new c.G("a_texAngleRange",4,u.g.UNSIGNED_BYTE,8,16),new c.G("a_levelInfo",4,u.g.UNSIGNED_BYTE,12,16)],b=[new c.G("a_opacityInfo",1,u.g.UNSIGNED_BYTE,0,1)];class T extends h{constructor(t){super(t)}geometryInfo(){return E}opacityInfo(){return b}attributes(){return T.ATTRIBUTES}attributesInfo(){return T.ATTRIBUTES_INFO}}T.ATTRIBUTES=["icon-color","icon-opacity","icon-halo-blur","icon-halo-color","icon-halo-width","icon-size"],T.ATTRIBUTES_INFO={"icon-color":{name:"color",type:n.R8G8B8A8_COLOR},"icon-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"icon-halo-color":{name:"halo_color",type:n.R8G8B8A8_COLOR},"icon-halo-width":{name:"halo_width",type:n.R8_UNSIGNED,precisionFactor:4},"icon-halo-blur":{name:"halo_blur",type:n.R8_UNSIGNED,precisionFactor:4},"icon-size":{name:"size",type:n.R8_UNSIGNED,precisionFactor:32,isLayout:!0}};class I extends h{constructor(t){super(t)}geometryInfo(){return E}opacityInfo(){return b}attributes(){return I.ATTRIBUTES}attributesInfo(){return I.ATTRIBUTES_INFO}}I.ATTRIBUTES=["text-color","text-opacity","text-halo-blur","text-halo-color","text-halo-width","text-size"],I.ATTRIBUTES_INFO={"text-color":{name:"color",type:n.R8G8B8A8_COLOR},"text-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"text-halo-color":{name:"halo_color",type:n.R8G8B8A8_COLOR},"text-halo-width":{name:"halo_width",type:n.R8_UNSIGNED,precisionFactor:4},"text-halo-blur":{name:"halo_blur",type:n.R8_UNSIGNED,precisionFactor:4},"text-size":{name:"size",type:n.R8_UNSIGNED,isLayout:!0}};var w=r(22303),v=r(3892);function R(t,e,r,n){const i=3*t,a=3*(r-t)-i,s=1-i-a,o=3*e,l=3*(n-e)-o,u=1-o-l;function c(t){return((s*t+a)*t+i)*t}function h(t){return(3*s*t+2*a)*t+i}return function(t,e=1e-6){return function(t){return((u*t+l)*t+o)*t}(function(t,e){let r,n,i,a,s,o;for(i=t,o=0;o<8;o++){if(a=c(i)-t,Math.abs(a)<e)return i;if(s=h(i),Math.abs(s)<1e-6)break;i-=a/s}if(r=0,n=1,i=t,i<r)return r;if(i>n)return n;for(;r<n;){if(a=c(i),Math.abs(a-t)<e)return i;t>a?r=i:n=i,i=.5*(n-r)+r}return i}(t,e))}}const N={};N.ease=R(.25,.1,.25,1),N.linear=R(0,0,1,1),N.easeIn=N["ease-in"]=R(.42,0,1,1),N.easeOut=N["ease-out"]=R(0,0,.58,1),N.easeInOut=N["ease-in-out"]=R(.42,0,.58,1);var D=r(31363);const L={kind:"null"},x={kind:"number"},A={kind:"string"},P={kind:"boolean"},O={kind:"color"},S={kind:"object"},U={kind:"value"};function G(t,e){return{kind:"array",itemType:t,n:e}}const B=[L,x,A,P,O,S,G(U)];function k(t){if("array"===t.kind){const e=k(t.itemType);return"number"==typeof t.n?`array<${e}, ${t.n}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}function M(t){if(null===t)return L;if("string"==typeof t)return A;if("boolean"==typeof t)return P;if("number"==typeof t)return x;if(t instanceof w.Z)return O;if(Array.isArray(t)){let e;for(const r of t){const t=M(r);if(e){if(e!==t){e=U;break}}else e=t}return G(e||U,t.length)}return"object"==typeof t?S:U}function C(t,e){if("array"===e.kind)return"array"===t.kind&&(0===t.n&&"value"===t.itemType.kind||C(t.itemType,e.itemType))&&("number"!=typeof e.n||e.n===t.n);if("value"===e.kind)for(const e of B)if(C(t,e))return!0;return e.kind===t.kind}function V(t){if(null===t)return"";const e=typeof t;return"string"===e?t:"number"===e||"boolean"===e?String(t):t instanceof w.Z?t.toString():JSON.stringify(t)}var F=r(35362);class z{constructor(t){this.parent=t,this.vars={}}add(t,e){this.vars[t]=e}get(t){return this.vars[t]?this.vars[t]:this.parent?this.parent.get(t):null}}class ${constructor(){this.type=U}static parse(t){if(t.length>1)throw new Error('"id" does not expect arguments');return new $}evaluate(t,e){return t?.id}}class Y{constructor(){this.type=A}static parse(t){if(t.length>1)throw new Error('"geometry-type" does not expect arguments');return new Y}evaluate(t,e){if(!t)return null;switch(t.type){case F.V.Point:return"Point";case F.V.LineString:return"LineString";case F.V.Polygon:return"Polygon";default:return null}}}class X{constructor(){this.type=S}static parse(t){if(t.length>1)throw new Error('"properties" does not expect arguments');return new X}evaluate(t,e){return t?.values}}class H{constructor(){this.type=x}static parse(t){if(t.length>1)throw new Error('"zoom" does not expect arguments');return new H}evaluate(t,e){return e}}class Z{constructor(t,e,r){this.lhs=t,this.rhs=e,this.compare=r,this.type=P}static parse(t,e,r){if(3!==t.length&&4!==t.length)throw new Error(`"${t[0]}" expects 2 or 3 arguments`);if(4===t.length)throw new Error(`"${t[0]}" collator not supported`);return new Z(vt(t[1],e),vt(t[2],e),r)}evaluate(t,e){return this.compare(this.lhs.evaluate(t,e),this.rhs.evaluate(t,e))}}class K{constructor(t){this.arg=t,this.type=P}static parse(t,e){if(2!==t.length)throw new Error('"!" expects 1 argument');return new K(vt(t[1],e))}evaluate(t,e){return!this.arg.evaluate(t,e)}}class j{constructor(t){this.args=t,this.type=P}static parse(t,e){const r=[];for(let n=1;n<t.length;n++)r.push(vt(t[n],e));return new j(r)}evaluate(t,e){for(const r of this.args)if(!r.evaluate(t,e))return!1;return!0}}class q{constructor(t){this.args=t,this.type=P}static parse(t,e){const r=[];for(let n=1;n<t.length;n++)r.push(vt(t[n],e));return new q(r)}evaluate(t,e){for(const r of this.args)if(r.evaluate(t,e))return!0;return!1}}class W{constructor(t){this.args=t,this.type=P}static parse(t,e){const r=[];for(let n=1;n<t.length;n++)r.push(vt(t[n],e));return new W(r)}evaluate(t,e){for(const r of this.args)if(r.evaluate(t,e))return!1;return!0}}class J{constructor(t,e,r){this.type=t,this.args=e,this.fallback=r}static parse(t,e,r){if(t.length<4)throw new Error('"case" expects at least 3 arguments');if(t.length%2==1)throw new Error('"case" expects an odd number of arguments');let n;const i=[];for(let a=1;a<t.length-1;a+=2){const s=vt(t[a],e),o=vt(t[a+1],e,r);n||(n=o.type),i.push({condition:s,output:o})}const a=vt(t[t.length-1],e,r);return n||(n=a.type),new J(n,i,a)}evaluate(t,e){for(const r of this.args)if(r.condition.evaluate(t,e))return r.output.evaluate(t,e);return this.fallback.evaluate(t,e)}}class Q{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)throw new Error('"coalesce" expects at least 1 argument');let r;const n=[];for(let i=1;i<t.length;i++){const a=vt(t[i],e);r||(r=a.type),n.push(a)}return new Q(r,n)}evaluate(t,e){for(const r of this.args){const n=r.evaluate(t,e);if(null!==n)return n}return null}}class tt{constructor(t,e,r,n,i){this.type=t,this.input=e,this.labels=r,this.outputs=n,this.fallback=i}static parse(t,e){if(t.length<3)throw new Error('"match" expects at least 3 arguments');if(t.length%2==0)throw new Error('"case" expects an even number of arguments');let r;const n=vt(t[1],e),i=[],a={};let s;for(let n=2;n<t.length-1;n+=2){let o=t[n];Array.isArray(o)||(o=[o]);for(const t of o){const e=typeof t;if("string"!==e&&"number"!==e)throw new Error('"match" requires string or number literal as labels');if(s){if(e!==s)throw new Error('"match" requires labels to have the same type')}else s=e;a[t]=i.length}const l=vt(t[n+1],e);r||(r=l.type),i.push(l)}return new tt(r,n,a,i,vt(t[t.length-1],e))}evaluate(t,e){const r=this.input.evaluate(t,e);return(this.outputs[this.labels[r]]||this.fallback).evaluate(t,e)}}class et{constructor(t,e,r,n,i){this.operator=t,this.type=e,this.interpolation=r,this.input=n,this.stops=i}static parse(t,e,r){const n=t[0];if(t.length<5)throw new Error(`"${n}" expects at least 4 arguments`);const i=t[1];if(!Array.isArray(i)||0===i.length)throw new Error(`"${i}" is not a valid interpolation`);switch(i[0]){case"linear":if(1!==i.length)throw new Error("Linear interpolation cannot have parameters");break;case"exponential":if(2!==i.length||"number"!=typeof i[1])throw new Error("Exponential interpolation requires one numeric argument");break;case"cubic-bezier":if(5!==i.length)throw new Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1");for(let t=1;t<5;t++){const e=i[t];if("number"!=typeof e||e<0||e>1)throw new Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1")}break;default:throw new Error(`"${t[0]}" unknown interpolation type "${i[0]}"`)}if(t.length%2!=1)throw new Error(`"${n}" expects an even number of arguments`);const a=vt(t[2],e,x);let s;"interpolate-hcl"===n||"interpolate-lab"===n?s=O:r&&"value"!==r.kind&&(s=r);const o=[];for(let r=3;r<t.length;r+=2){const i=t[r];if("number"!=typeof i)throw new Error(`"${n}" requires stop inputs as literal numbers`);if(o.length&&o[o.length-1][0]>=i)throw new Error(`"${n}" requires strictly ascending stop inputs`);const a=vt(t[r+1],e,s);s||(s=a.type),o.push([i,a])}if(s&&s!==O&&s!==x&&("array"!==s.kind||s.itemType!==x))throw new Error(`"${n}" cannot interpolate type ${k(s)}`);return new et(n,s,i,a,o)}evaluate(t,e){const r=this.stops;if(1===r.length)return r[0][1].evaluate(t,e);const n=this.input.evaluate(t,e);if(n<=r[0][0])return r[0][1].evaluate(t,e);if(n>=r[r.length-1][0])return r[r.length-1][1].evaluate(t,e);let i=0;for(;++i<r.length&&!(n<r[i][0]););const a=r[i-1][0],s=r[i][0],o=et.interpolationRatio(this.interpolation,n,a,s),l=r[i-1][1].evaluate(t,e),u=r[i][1].evaluate(t,e);if("interpolate"===this.operator){if("array"===this.type.kind&&Array.isArray(l)&&Array.isArray(u))return l.map(((t,e)=>(0,D.sX)(t,u[e],o)));if("color"===this.type.kind&&l instanceof w.Z&&u instanceof w.Z){const t=new w.Z(l),e=new w.Z(u);return new w.Z([(0,D.sX)(t.r,e.r,o),(0,D.sX)(t.g,e.g,o),(0,D.sX)(t.b,e.b,o),(0,D.sX)(t.a,e.a,o)])}if("number"===this.type.kind&&"number"==typeof l&&"number"==typeof u)return(0,D.sX)(l,u,o);throw new Error(`"${this.operator}" cannot interpolate type ${k(this.type)}`)}if("interpolate-hcl"===this.operator){const t=(0,v.sJ)(l),e=(0,v.sJ)(u),r=e.h-t.h,n=(0,v.xr)({h:t.h+o*(r>180||r<-180?r-360*Math.round(r/360):r),c:(0,D.sX)(t.c,e.c,o),l:(0,D.sX)(t.l,e.l,o)});return new w.Z({a:(0,D.sX)(l.a,u.a,o),...n})}if("interpolate-lab"===this.operator){const t=(0,v.Y3)(l),e=(0,v.Y3)(u),r=(0,v.xr)({l:(0,D.sX)(t.l,e.l,o),a:(0,D.sX)(t.a,e.a,o),b:(0,D.sX)(t.b,e.b,o)});return new w.Z({a:(0,D.sX)(l.a,u.a,o),...r})}throw new Error(`Unexpected operator "${this.operator}"`)}interpolationUniformValue(t,e){const r=this.stops;if(1===r.length)return 0;if(t>=r[r.length-1][0])return 0;let n=0;for(;++n<r.length&&!(t<r[n][0]););const i=r[n-1][0],a=r[n][0];return et.interpolationRatio(this.interpolation,e,i,a)}getInterpolationRange(t){const e=this.stops;if(1===e.length){const t=e[0][0];return[t,t]}const r=e[e.length-1][0];if(t>=r)return[r,r];let n=0;for(;++n<e.length&&!(t<e[n][0]););return[e[n-1][0],e[n][0]]}static interpolationRatio(t,e,r,n){let i=0;return"linear"===t[0]?i=et._exponentialInterpolationRatio(e,1,r,n):"exponential"===t[0]?i=et._exponentialInterpolationRatio(e,t[1],r,n):"cubic-bezier"===t[0]&&(i=R(t[1],t[2],t[3],t[4])(et._exponentialInterpolationRatio(e,1,r,n),1e-5)),i<0?i=0:i>1&&(i=1),i}static _exponentialInterpolationRatio(t,e,r,n){const i=n-r;if(0===i)return 0;const a=t-r;return 1===e?a/i:(e**a-1)/(e**i-1)}}class rt{constructor(t,e,r){this.type=t,this.input=e,this.stops=r}static parse(t,e){if(t.length<5)throw new Error('"step" expects at least 4 arguments');if(t.length%2!=1)throw new Error('"step" expects an even number of arguments');const r=vt(t[1],e,x);let n;const i=[];i.push([-1/0,vt(t[2],e)]);for(let r=3;r<t.length;r+=2){const a=t[r];if("number"!=typeof a)throw new Error('"step" requires stop inputs as literal numbers');if(i.length&&i[i.length-1][0]>=a)throw new Error('"step" requires strictly ascending stop inputs');const s=vt(t[r+1],e);n||(n=s.type),i.push([a,s])}return new rt(n,r,i)}evaluate(t,e){const r=this.stops;if(1===r.length)return r[0][1].evaluate(t,e);const n=this.input.evaluate(t,e);let i=0;for(;++i<r.length&&!(n<r[i][0]););return this.stops[i-1][1].evaluate(t,e)}}class nt{constructor(t,e){this.type=t,this.output=e}static parse(t,e,r){if(t.length<4)throw new Error('"let" expects at least 3 arguments');if(t.length%2==1)throw new Error('"let" expects an odd number of arguments');const n=new z(e);for(let r=1;r<t.length-1;r+=2){const i=t[r];if("string"!=typeof i)throw new Error(`"let" requires a string to define variable names - found ${i}`);n.add(i,vt(t[r+1],e))}const i=vt(t[t.length-1],n,r);return new nt(i.type,i)}evaluate(t,e){return this.output.evaluate(t,e)}}class it{constructor(t,e){this.type=t,this.output=e}static parse(t,e,r){if(2!==t.length||"string"!=typeof t[1])throw new Error('"var" requires just one literal string argument');const n=e.get(t[1]);if(!n)throw new Error(`${t[1]} must be defined before being used in a "var" expression`);return new it(r||U,n)}evaluate(t,e){return this.output.evaluate(t,e)}}class at{constructor(t,e,r){this.type=t,this.index=e,this.array=r}static parse(t,e){if(3!==t.length)throw new Error('"at" expects 2 arguments');const r=vt(t[1],e,x),n=vt(t[2],e);return new at(n.type.itemType,r,n)}evaluate(t,e){const r=this.index.evaluate(t,e),n=this.array.evaluate(t,e);if(r<0||r>=n.length)throw new Error('"at" index out of bounds');if(r!==Math.floor(r))throw new Error('"at" index must be an integer');return n[r]}}class st{constructor(t,e){this.key=t,this.obj=e,this.type=U}static parse(t,e){let r,n;switch(t.length){case 2:return r=vt(t[1],e),new st(r);case 3:return r=vt(t[1],e),n=vt(t[2],e),new st(r,n);default:throw new Error('"get" expects 1 or 2 arguments')}}evaluate(t,e){const r=this.key.evaluate(t,e);return this.obj?this.obj.evaluate(t,e)[r]:t?.values[r]}}class ot{constructor(t,e){this.key=t,this.obj=e,this.type=P}static parse(t,e){let r,n;switch(t.length){case 2:return r=vt(t[1],e),new ot(r);case 3:return r=vt(t[1],e),n=vt(t[2],e),new ot(r,n);default:throw new Error('"has" expects 1 or 2 arguments')}}evaluate(t,e){const r=this.key.evaluate(t,e);return this.obj?r in this.obj.evaluate(t,e):!!t?.values[r]}}class lt{constructor(t,e){this.key=t,this.vals=e,this.type=P}static parse(t,e){if(3!==t.length)throw new Error('"in" expects 2 arguments');return new lt(vt(t[1],e),vt(t[2],e))}evaluate(t,e){const r=this.key.evaluate(t,e);return this.vals.evaluate(t,e).includes(r)}}class ut{constructor(t,e,r){this.item=t,this.array=e,this.from=r,this.type=x}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"index-of" expects 3 or 4 arguments');const r=vt(t[1],e),n=vt(t[2],e);if(4===t.length){const i=vt(t[3],e,x);return new ut(r,n,i)}return new ut(r,n)}evaluate(t,e){const r=this.item.evaluate(t,e),n=this.array.evaluate(t,e);if(this.from){const i=this.from.evaluate(t,e);if(i!==Math.floor(i))throw new Error('"index-of" index must be an integer');return n.indexOf(r,i)}return n.indexOf(r)}}class ct{constructor(t){this.arg=t,this.type=x}static parse(t,e){if(2!==t.length)throw new Error('"length" expects 2 arguments');const r=vt(t[1],e);return new ct(r)}evaluate(t,e){const r=this.arg.evaluate(t,e);if("string"==typeof r)return r.length;if(Array.isArray(r))return r.length;throw new Error('"length" expects string or array')}}class ht{constructor(t,e,r,n){this.type=t,this.array=e,this.from=r,this.to=n}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"slice" expects 2 or 3 arguments');const r=vt(t[1],e),n=vt(t[2],e,x);if(n.type!==x)throw new Error('"slice" index must return a number');if(4===t.length){const i=vt(t[3],e,x);if(i.type!==x)throw new Error('"slice" index must return a number');return new ht(r.type,r,n,i)}return new ht(r.type,r,n)}evaluate(t,e){const r=this.array.evaluate(t,e);if(!Array.isArray(r)&&"string"!=typeof r)throw new Error('"slice" input must be an array or a string');const n=this.from.evaluate(t,e);if(n<0||n>=r.length)throw new Error('"slice" index out of bounds');if(n!==Math.floor(n))throw new Error('"slice" index must be an integer');if(this.to){const i=this.to.evaluate(t,e);if(i<0||i>=r.length)throw new Error('"slice" index out of bounds');if(i!==Math.floor(i))throw new Error('"slice" index must be an integer');return r.slice(n,i)}return r.slice(n)}}class pt{constructor(){this.type=P}static parse(t){if(1!==t.length)throw new Error('"has-id" expects no arguments');return new pt}evaluate(t,e){return t&&void 0!==t.id}}class yt{constructor(t,e){this.args=t,this.calculate=e,this.type=x}static parse(t,e,r){const n=t.slice(1).map((t=>vt(t,e)));return new yt(n,r)}evaluate(t,e){let r;return this.args&&(r=this.args.map((r=>r.evaluate(t,e)))),this.calculate(r)}}class ft{constructor(t,e){this.args=t,this.calculate=e,this.type=x}static parse(t,e){const r=t.slice(1).map((t=>vt(t,e)));return new ft(r,ft.ops[t[0]])}evaluate(t,e){let r;return this.args&&(r=this.args.map((r=>r.evaluate(t,e)))),this.calculate(r)}}ft.ops={abs:t=>Math.abs(t[0]),acos:t=>Math.acos(t[0]),asin:t=>Math.asin(t[0]),atan:t=>Math.atan(t[0]),ceil:t=>Math.ceil(t[0]),cos:t=>Math.cos(t[0]),e:()=>Math.E,floor:t=>Math.floor(t[0]),ln:t=>Math.log(t[0]),ln2:()=>Math.LN2,log10:t=>Math.log(t[0])/Math.LN10,log2:t=>Math.log(t[0])/Math.LN2,max:t=>Math.max(...t),min:t=>Math.min(...t),pi:()=>Math.PI,round:t=>Math.round(t[0]),sin:t=>Math.sin(t[0]),sqrt:t=>Math.sqrt(t[0]),tan:t=>Math.tan(t[0])};class gt{constructor(t){this.args=t,this.type=A}static parse(t,e){return new gt(t.slice(1).map((t=>vt(t,e))))}evaluate(t,e){return this.args.map((r=>r.evaluate(t,e))).join("")}}class mt{constructor(t,e){this.arg=t,this.calculate=e,this.type=A}static parse(t,e){if(2!==t.length)throw new Error(`${t[0]} expects 1 argument`);const r=vt(t[1],e);return new mt(r,mt.ops[t[0]])}evaluate(t,e){return this.calculate(this.arg.evaluate(t,e))}}mt.ops={downcase:t=>t.toLowerCase(),upcase:t=>t.toUpperCase()};class dt{constructor(t){this.args=t,this.type=O}static parse(t,e){if(4!==t.length)throw new Error('"rgb" expects 3 arguments');const r=t.slice(1).map((t=>vt(t,e)));return new dt(r)}evaluate(t,e){const r=this._validate(this.args[0].evaluate(t,e)),n=this._validate(this.args[1].evaluate(t,e)),i=this._validate(this.args[2].evaluate(t,e));return new w.Z({r,g:n,b:i})}_validate(t){if("number"!=typeof t||t<0||t>255)throw new Error(`${t}: invalid color component`);return Math.round(t)}}class _t{constructor(t){this.args=t,this.type=O}static parse(t,e){if(5!==t.length)throw new Error('"rgba" expects 4 arguments');const r=t.slice(1).map((t=>vt(t,e)));return new _t(r)}evaluate(t,e){const r=this._validate(this.args[0].evaluate(t,e)),n=this._validate(this.args[1].evaluate(t,e)),i=this._validate(this.args[2].evaluate(t,e)),a=this._validateAlpha(this.args[3].evaluate(t,e));return new w.Z({r,g:n,b:i,a})}_validate(t){if("number"!=typeof t||t<0||t>255)throw new Error(`${t}: invalid color component`);return Math.round(t)}_validateAlpha(t){if("number"!=typeof t||t<0||t>1)throw new Error(`${t}: invalid alpha color component`);return t}}class Et{constructor(t){this.color=t,this.type=G(x,4)}static parse(t,e){if(2!==t.length)throw new Error('"to-rgba" expects 1 argument');const r=vt(t[1],e);return new Et(r)}evaluate(t,e){return new w.Z(this.color.evaluate(t,e)).toRgba()}}class bt{constructor(t,e){this.type=t,this.args=e}static parse(t,e){const r=t[0];if(t.length<2)throw new Error(`${r} expects at least one argument`);let n,i=1;if("array"===r){if(t.length>2){switch(t[1]){case"string":n=A;break;case"number":n=x;break;case"boolean":n=P;break;default:throw new Error('"array" type argument must be string, number or boolean')}i++}else n=U;let e;if(t.length>3){if(e=t[2],null!==e&&("number"!=typeof e||e<0||e!==Math.floor(e)))throw new Error('"array" length argument must be a positive integer literal');i++}n=G(n,e)}else switch(r){case"string":n=A;break;case"number":n=x;break;case"boolean":n=P;break;case"object":n=S}const a=[];for(;i<t.length;i++){const r=vt(t[i],e);a.push(r)}return new bt(n,a)}evaluate(t,e){let r;for(const n of this.args){const i=n.evaluate(t,e);if(r=M(i),C(r,this.type))return i}throw new Error(`Expected ${k(this.type)} but got ${k(r)}`)}}class Tt{constructor(t,e){this.type=t,this.args=e}static parse(t,e){const r=t[0],n=Tt.types[r];if(n===P||n===A){if(2!==t.length)throw new Error(`${r} expects one argument`)}else if(t.length<2)throw new Error(`${r} expects at least one argument`);const i=[];for(let r=1;r<t.length;r++){const n=vt(t[r],e);i.push(n)}return new Tt(n,i)}evaluate(t,e){if(this.type===P)return Boolean(this.args[0].evaluate(t,e));if(this.type===A)return V(this.args[0].evaluate(t,e));if(this.type===x){for(const r of this.args){const n=Number(r.evaluate(t,e));if(!isNaN(n))return n}return null}if(this.type===O){for(const r of this.args)try{const n=Tt.toColor(r.evaluate(t,e));if(n instanceof w.Z)return n}catch{}return null}}static toBoolean(t){return Boolean(t)}static toString(t){return V(t)}static toNumber(t){const e=Number(t);if(isNaN(e))throw new Error(`"${t}" is not a number`);return e}static toColor(t){if(t instanceof w.Z)return t;if("string"==typeof t){const e=w.Z.fromString(t);if(e)return e;throw new Error(`"${t}" is not a color`)}if(Array.isArray(t))return w.Z.fromArray(t);throw new Error(`"${t}" is not a color`)}}Tt.types={"to-boolean":P,"to-color":O,"to-number":x,"to-string":A};class It{constructor(t){this.val=t,this.type=M(t)}static parse(t){if(2!==t.length)throw new Error('"literal" expects 1 argument');return new It(t[1])}evaluate(t,e){return this.val}}class wt{constructor(t){this.arg=t,this.type=A}static parse(t,e){if(2!==t.length)throw new Error('"typeof" expects 1 argument');return new wt(vt(t[1],e))}evaluate(t,e){return k(M(this.arg.evaluate(t,e)))}}function vt(t,e,r){const n=typeof t;if("string"===n||"boolean"===n||"number"===n||null===t){if(r)switch(r.kind){case"string":"string"!==n&&(t=Tt.toString(t));break;case"number":"number"!==n&&(t=Tt.toNumber(t));break;case"color":t=Tt.toColor(t)}t=["literal",t]}if(!Array.isArray(t)||0===t.length)throw new Error("Expression must be a non empty array");const i=t[0];if("string"!=typeof i)throw new Error("First element of expression must be a string");const a=Rt[i];if(void 0===a)throw new Error(`Invalid expression operator "${i}"`);if(!a)throw new Error(`Unimplemented expression operator "${i}"`);return a.parse(t,e,r)}const Rt={array:bt,boolean:bt,collator:null,format:null,image:null,literal:It,number:bt,"number-format":null,object:bt,string:bt,"to-boolean":Tt,"to-color":Tt,"to-number":Tt,"to-string":Tt,typeof:wt,accumulated:null,"feature-state":null,"geometry-type":Y,id:$,"line-progress":null,properties:X,at,get:st,has:ot,in:lt,"index-of":ut,length:ct,slice:ht,"!":K,"!=":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t!==e))}},"<":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t<e))}},"<=":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t<=e))}},"==":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t===e))}},">":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t>e))}},">=":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t>=e))}},all:j,any:q,case:J,coalesce:Q,match:tt,within:null,interpolate:et,"interpolate-hcl":et,"interpolate-lab":et,step:rt,let:nt,var:it,concat:gt,downcase:mt,"is-supported-script":null,"resolved-locale":null,upcase:mt,rgb:dt,rgba:_t,"to-rgba":Et,"-":class extends yt{static parse(t,e){switch(t.length){case 2:return yt.parse(t,e,(t=>-t[0]));case 3:return yt.parse(t,e,(t=>t[0]-t[1]));default:throw new Error('"-" expects 1 or 2 arguments')}}},"*":class extends yt{static parse(t,e){return yt.parse(t,e,(t=>{let e=1;for(const r of t)e*=r;return e}))}},"/":class extends yt{static parse(t,e){if(3===t.length)return yt.parse(t,e,(t=>t[0]/t[1]));throw new Error('"/" expects 2 arguments')}},"%":class extends yt{static parse(t,e){if(3===t.length)return yt.parse(t,e,(t=>t[0]%t[1]));throw new Error('"%" expects 2 arguments')}},"^":class extends yt{static parse(t,e){if(3===t.length)return yt.parse(t,e,(t=>t[0]**t[1]));throw new Error('"^" expects 1 or 2 arguments')}},"+":class extends yt{static parse(t,e){return yt.parse(t,e,(t=>{let e=0;for(const r of t)e+=r;return e}))}},abs:ft,acos:ft,asin:ft,atan:ft,ceil:ft,cos:ft,e:ft,floor:ft,ln:ft,ln2:ft,log10:ft,log2:ft,max:ft,min:ft,pi:ft,round:ft,sin:ft,sqrt:ft,tan:ft,zoom:H,"heatmap-density":null,"has-id":pt,none:W};class Nt{constructor(t){this._expression=t}filter(t,e){if(!this._expression)return!0;try{return this._expression.evaluate(t,e)}catch(t){return console.log(t.message),!0}}static createFilter(t){if(!t)return null;this.isLegacyFilter(t)&&(t=this.convertLegacyFilter(t));try{const e=vt(t,null,P);return new Nt(e)}catch(t){return console.log(t.message),null}}static isLegacyFilter(t){if(!Array.isArray(t))return!0;if(0===t.length)return!0;switch(t[0]){case"==":case"!=":case">":case"<":case">=":case"<=":return 3===t.length&&"string"==typeof t[1]&&!Array.isArray(t[2]);case"in":return t.length>=3&&"string"==typeof t[1]&&!Array.isArray(t[2]);case"!in":case"none":case"!has":return!0;case"any":case"all":for(let e=1;e<t.length;e++)if(this.isLegacyFilter(t[e]))return!0;return!1;case"has":return 2===t.length&&("$id"===t[1]||"$type"===t[1]);default:return!1}}static convertLegacyFilter(t){if(!Array.isArray(t)||0===t.length)return!0;const e=t[0];if(1===t.length)return"any"!==e;switch(e){case"==":return Nt.convertComparison("==",t[1],t[2]);case"!=":return Nt.negate(Nt.convertComparison("==",t[1],t[2]));case">":case"<":case">=":case"<=":return Nt.convertComparison(e,t[1],t[2]);case"in":return Nt.convertIn(t[1],t.slice(2));case"!in":return Nt.negate(Nt.convertIn(t[1],t.slice(2)));case"any":case"all":case"none":return Nt.convertCombining(e,t.slice(1));case"has":return Nt.convertHas(t[1]);case"!has":return Nt.negate(Nt.convertHas(t[1]));default:throw new Error("Unexpected legacy filter.")}}static convertComparison(t,e,r){switch(e){case"$type":return[t,["geometry-type"],r];case"$id":return[t,["id"],r];default:return[t,["get",e],r]}}static convertIn(t,e){switch(t){case"$type":return["in",["geometry-type"],["literal",e]];case"$id":return["in",["id"],["literal",e]];default:return["in",["get",t],["literal",e]]}}static convertHas(t){switch(t){case"$type":return!0;case"$id":return["has-id"];default:return["has",t]}}static convertCombining(t,e){return[t].concat(e.map(this.convertLegacyFilter))}static negate(t){return["!",t]}}var Dt=r(21315);class Lt{constructor(t,e){let r;switch(this.isDataDriven=!1,this.interpolator=null,t.type){case"number":case"color":r=!0;break;case"array":r="number"===t.value;break;default:r=!1}if(null==e&&(e=t.default),Array.isArray(e)&&e.length>0&&Rt[e[0]]){const r={number:x,color:O,string:A,boolean:P,enum:A};try{const n=vt(e,null,"array"===t.type?G(r[t.value]||U,t.length):r[t.type]);this.getValue=this._buildExpression(n,t),this.isDataDriven=!0,n instanceof et&&n.input instanceof H&&(this.interpolator=n)}catch(e){console.log(e.message),this.getValue=this._buildSimple(t.default)}return}r&&"interval"===e.type&&(r=!1);const n=e&&e.stops&&e.stops.length>0;if(n)for(const r of e.stops)r[1]=this._validate(r[1],t);if(this.isDataDriven=!!e&&!!e.property,this.isDataDriven)if(void 0!==e.default&&(e.default=this._validate(e.default,t)),n)switch(e.type){case"identity":this.getValue=this._buildIdentity(e,t);break;case"categorical":this.getValue=this._buildCategorical(e,t);break;default:this.getValue=r?this._buildInterpolate(e,t):this._buildInterval(e,t)}else this.getValue=this._buildIdentity(e,t);else n?this.getValue=r?this._buildZoomInterpolate(e):this._buildZoomInterval(e):(e=this._validate(e,t),this.getValue=this._buildSimple(e))}_validate(t,e){if("number"===e.type){if(t<e.minimum)return e.minimum;if(t>e.maximum)return e.maximum}else"color"===e.type?t=Lt._parseColor(t):"enum"===e.type?"string"==typeof t&&(t=e.values.indexOf(t)):"array"===e.type&&"enum"===e.value?t=t.map((t=>"string"==typeof t?e.values.indexOf(t):t)):"string"===e.type&&(t=V(t));return t}_buildSimple(t){return()=>t}_buildExpression(t,e){return(r,n)=>{try{const i=t.evaluate(n,r);return void 0===i?e.default:this._validate(i,e)}catch(t){return console.log(t.message),e.default}}}_buildIdentity(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),void 0!==i&&(i=this._validate(i,e)),null!=i?i:void 0!==t.default?t.default:e.default}}_buildCategorical(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),i=this._categorical(i,t.stops),void 0!==i?i:void 0!==t.default?t.default:e.default}}_buildInterval(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),"number"==typeof i?this._interval(i,t.stops):void 0!==t.default?t.default:e.default}}_buildInterpolate(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),"number"==typeof i?this._interpolate(i,t.stops,t.base||1):void 0!==t.default?t.default:e.default}}_buildZoomInterpolate(t){return e=>this._interpolate(e,t.stops,t.base||1)}_buildZoomInterval(t){return e=>this._interval(e,t.stops)}_categorical(t,e){const r=e.length;for(let n=0;n<r;n++)if(e[n][0]===t)return e[n][1]}_interval(t,e){const r=e.length;let n=0;for(let i=0;i<r&&e[i][0]<=t;i++)n=i;return e[n][1]}_interpolate(t,e,r){let n,i;const a=e.length;for(let r=0;r<a;r++){const a=e[r];if(!(a[0]<=t)){i=a;break}n=a}if(n&&i){const e=i[0]-n[0],a=t-n[0],s=1===r?a/e:(r**a-1)/(r**e-1);if(Array.isArray(n[1])){const t=n[1],e=i[1],r=[];for(let n=0;n<t.length;n++)r.push((0,D.sX)(t[n],e[n],s));return r}return(0,D.sX)(n[1],i[1],s)}return n?n[1]:i?i[1]:void 0}static _isEmpty(t){for(const e in t)if(t.hasOwnProperty(e))return!1;return!0}static _parseColor(t){return Array.isArray(t)?t:("string"==typeof t&&(t=new w.Z(t)),t instanceof w.Z&&!this._isEmpty(t)?w.Z.toUnitRGBA(t):void 0)}}var xt=r(16534);class At{constructor(t,e,r,n){switch(this.type=t,this.typeName=e.type,this.id=e.id,this.source=e.source,this.sourceLayer=e["source-layer"],this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,this.filter=e.filter,this.layout=e.layout,this.paint=e.paint,this.z=r,this.uid=n,t){case Dt.fR.BACKGROUND:this._layoutDefinition=Dt.f2.backgroundLayoutDefinition,this._paintDefinition=Dt.f2.backgroundPaintDefinition;break;case Dt.fR.FILL:this._layoutDefinition=Dt.f2.fillLayoutDefinition,this._paintDefinition=Dt.f2.fillPaintDefinition;break;case Dt.fR.LINE:this._layoutDefinition=Dt.f2.lineLayoutDefinition,this._paintDefinition=Dt.f2.linePaintDefinition;break;case Dt.fR.SYMBOL:this._layoutDefinition=Dt.f2.symbolLayoutDefinition,this._paintDefinition=Dt.f2.symbolPaintDefinition;break;case Dt.fR.CIRCLE:this._layoutDefinition=Dt.f2.circleLayoutDefinition,this._paintDefinition=Dt.f2.circlePaintDefinition}this._layoutProperties=this._parseLayout(this.layout),this._paintProperties=this._parsePaint(this.paint)}getFeatureFilter(){return void 0!==this._featureFilter?this._featureFilter:this._featureFilter=Nt.createFilter(this.filter)}getLayoutProperty(t){return this._layoutProperties[t]}getPaintProperty(t){return this._paintProperties[t]}getLayoutValue(t,e,r){let n;const i=this._layoutProperties[t];return i&&(n=i.getValue(e,r)),void 0===n&&(n=this._layoutDefinition[t].default),n}getPaintValue(t,e,r){let n;const i=this._paintProperties[t];return i&&(n=i.getValue(e,r)),void 0===n&&(n=this._paintDefinition[t].default),n}isPainterDataDriven(){const t=this._paintProperties;if(t)for(const e in t)if(t[e].isDataDriven)return!0;return!1}_parseLayout(t){const e={};for(const r in t){const n=this._layoutDefinition[r];n&&(e[r]=new Lt(n,t[r]))}return e}_parsePaint(t){const e={};for(const r in t){const n=this._paintDefinition[r];n&&(e[r]=new Lt(n,t[r]))}return e}computeAttributesKey(t,e,r,n){let i=0,a=0;for(const t of e){let e=3;if(!t||t!==n){const n=r[t],{isLayout:i,isOptional:a}=n,s=i?this.getLayoutProperty(t):this.getPaintProperty(t);e=s?.interpolator?2:s?.isDataDriven?1:a&&!s?3:0}a|=e<<i,i+=2}return a<<3|t}}class Pt extends At{constructor(t,e,r,n){super(t,e,r,n),this.backgroundMaterial=new f(this.computeAttributesKey(s._K.BACKGROUND,f.ATTRIBUTES,f.ATTRIBUTES_INFO))}}class Ot extends At{constructor(t,e,r,n){super(t,e,r,n);const i=this.getPaintProperty("fill-color"),a=this.getPaintProperty("fill-opacity"),o=this.getPaintProperty("fill-pattern");this.hasDataDrivenColor=i?.isDataDriven,this.hasDataDrivenOpacity=a?.isDataDriven,this.hasDataDrivenFill=this.hasDataDrivenColor||this.hasDataDrivenOpacity||o?.isDataDriven;const l=this.getPaintProperty("fill-outline-color");this.outlineUsesFillColor=!l,this.hasDataDrivenOutlineColor=l?.isDataDriven,this.hasDataDrivenOutline=l?l.isDataDriven:!!i&&i.isDataDriven,this.hasDataDrivenOutline=(l?this.hasDataDrivenOutlineColor:this.hasDataDrivenColor)||this.hasDataDrivenOpacity,this.fillMaterial=new m(this.computeAttributesKey(s._K.FILL,m.ATTRIBUTES,m.ATTRIBUTES_INFO)),this.outlineMaterial=new d(this.computeAttributesKey(s._K.OUTLINE,this.outlineUsesFillColor?d.ATTRIBUTES_FILL:d.ATTRIBUTES_OUTLINE,this.outlineUsesFillColor?d.ATTRIBUTES_INFO_FILL:d.ATTRIBUTES_INFO_OUTLINE),this.outlineUsesFillColor)}}class St extends At{constructor(t,e,r,n){super(t,e,r,n);const i=this.getPaintProperty("line-pattern");if(this.lineMaterial=new _(this.computeAttributesKey(s._K.LINE,_.ATTRIBUTES,_.ATTRIBUTES_INFO,i?"line-dasharray":"")),this.hasDataDrivenLine=this.getPaintProperty("line-blur")?.isDataDriven||this.getPaintProperty("line-color")?.isDataDriven||this.getPaintProperty("line-gap-width")?.isDataDriven||this.getPaintProperty("line-offset")?.isDataDriven||this.getPaintProperty("line-opacity")?.isDataDriven||this.getPaintProperty("line-pattern")?.isDataDriven||this.getPaintProperty("line-dasharray")?.isDataDriven||this.getLayoutProperty("line-cap")?.isDataDriven||this.getPaintProperty("line-width")?.isDataDriven,this.canUseThinTessellation=!1,!this.hasDataDrivenLine){const t=this.getPaintProperty("line-width");if(!t||"number"==typeof t&&.5*t<xt.tQ){const t=this.getPaintProperty("line-offset");(!t||"number"==typeof t&&0===t)&&(this.canUseThinTessellation=!0)}}}getDashKey(t,e){let r;switch(e){case a.RL.BUTT:r="Butt";break;case a.RL.ROUND:r="Round";break;case a.RL.SQUARE:r="Square";break;default:r="Butt"}return`dasharray-[${t.toString()}]-${r}`}}class Ut extends At{constructor(t,e,r,n){super(t,e,r,n),this.iconMaterial=new T(this.computeAttributesKey(s._K.ICON,T.ATTRIBUTES,T.ATTRIBUTES_INFO)),this.textMaterial=new I(this.computeAttributesKey(s._K.TEXT,I.ATTRIBUTES,I.ATTRIBUTES_INFO)),this.hasDataDrivenIcon=this.getPaintProperty("icon-color")?.isDataDriven||this.getPaintProperty("icon-halo-blur")?.isDataDriven||this.getPaintProperty("icon-halo-color")?.isDataDriven||this.getPaintProperty("icon-halo-width")?.isDataDriven||this.getPaintProperty("icon-opacity")?.isDataDriven||this.getLayoutProperty("icon-size")?.isDataDriven,this.hasDataDrivenText=this.getPaintProperty("text-color")?.isDataDriven||this.getPaintProperty("text-halo-blur")?.isDataDriven||this.getPaintProperty("text-halo-color")?.isDataDriven||this.getPaintProperty("text-halo-width")?.isDataDriven||this.getPaintProperty("text-opacity")?.isDataDriven||this.getLayoutProperty("text-size")?.isDataDriven}}class Gt extends At{constructor(t,e,r,n){super(t,e,r,n),this.circleMaterial=new g(this.computeAttributesKey(s._K.CIRCLE,g.ATTRIBUTES,g.ATTRIBUTES_INFO))}}class Bt{constructor(t,e,r){let n;this.allowOverlap=t.getLayoutValue("icon-allow-overlap",e),this.ignorePlacement=t.getLayoutValue("icon-ignore-placement",e),this.keepUpright=t.getLayoutValue("icon-keep-upright",e),this.optional=t.getLayoutValue("icon-optional",e),this.rotationAlignment=t.getLayoutValue("icon-rotation-alignment",e),this.rotationAlignment===Dt.aF.AUTO&&(this.rotationAlignment=r?Dt.aF.MAP:Dt.aF.VIEWPORT),n=t.getLayoutProperty("icon-anchor"),n?.isDataDriven?this._anchorProp=n:this.anchor=t.getLayoutValue("icon-anchor",e),n=t.getLayoutProperty("icon-offset"),n?.isDataDriven?this._offsetProp=n:this.offset=t.getLayoutValue("icon-offset",e),n=t.getLayoutProperty("icon-padding"),n?.isDataDriven?this._paddingProp=n:this.padding=t.getLayoutValue("icon-padding",e),n=t.getLayoutProperty("icon-rotate"),n?.isDataDriven?this._rotateProp=n:this.rotate=t.getLayoutValue("icon-rotate",e),n=t.getLayoutProperty("icon-size"),n?.isDataDriven?this._sizeProp=n:this.size=t.getLayoutValue("icon-size",e)}update(t,e){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,e)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,e)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,e)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,e)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,e))}}class kt{constructor(t,e,r){let n;this.allowOverlap=t.getLayoutValue("text-allow-overlap",e),this.ignorePlacement=t.getLayoutValue("text-ignore-placement",e),this.keepUpright=t.getLayoutValue("text-keep-upright",e),this.optional=t.getLayoutValue("text-optional",e),this.rotationAlignment=t.getLayoutValue("text-rotation-alignment",e),this.rotationAlignment===Dt.aF.AUTO&&(this.rotationAlignment=r?Dt.aF.MAP:Dt.aF.VIEWPORT),n=t.getLayoutProperty("text-anchor"),n?.isDataDriven?this._anchorProp=n:this.anchor=t.getLayoutValue("text-anchor",e),n=t.getLayoutProperty("text-justify"),n?.isDataDriven?this._justifyProp=n:this.justify=t.getLayoutValue("text-justify",e),n=t.getLayoutProperty("text-letter-spacing"),n?.isDataDriven?this._letterSpacingProp=n:this.letterSpacing=t.getLayoutValue("text-letter-spacing",e),n=t.getLayoutProperty("text-line-height"),n?.isDataDriven?this._lineHeightProp=n:this.lineHeight=t.getLayoutValue("text-line-height",e),n=t.getLayoutProperty("text-max-angle"),n?.isDataDriven?this._maxAngleProp=n:this.maxAngle=t.getLayoutValue("text-max-angle",e),n=t.getLayoutProperty("text-max-width"),n?.isDataDriven?this._maxWidthProp=n:this.maxWidth=t.getLayoutValue("text-max-width",e),n=t.getLayoutProperty("text-offset"),n?.isDataDriven?this._offsetProp=n:this.offset=t.getLayoutValue("text-offset",e),n=t.getLayoutProperty("text-padding"),n?.isDataDriven?this._paddingProp=n:this.padding=t.getLayoutValue("text-padding",e),n=t.getLayoutProperty("text-rotate"),n?.isDataDriven?this._rotateProp=n:this.rotate=t.getLayoutValue("text-rotate",e),n=t.getLayoutProperty("text-size"),n?.isDataDriven?this._sizeProp=n:this.size=t.getLayoutValue("text-size",e),n=t.getLayoutProperty("text-writing-mode"),n?.isDataDriven?this._writingModeProp=n:this.writingMode=t.getLayoutValue("text-writing-mode",e)}update(t,e){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,e)),this._justifyProp&&(this.justify=this._justifyProp.getValue(t,e)),this._letterSpacingProp&&(this.letterSpacing=this._letterSpacingProp.getValue(t,e)),this._lineHeightProp&&(this.lineHeight=this._lineHeightProp.getValue(t,e)),this._maxAngleProp&&(this.maxAngle=this._maxAngleProp.getValue(t,e)),this._maxWidthProp&&(this.maxWidth=this._maxWidthProp.getValue(t,e)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,e)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,e)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,e)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,e)),this._writingModeProp&&(this.writingMode=this._writingModeProp.getValue(t,e))}}},51785:(t,e,r)=>{r.d(e,{Z:()=>a});var n=r(21315),i=r(7333);class a{constructor(t){if(this._style=t,this.backgroundBucketIds=[],this._uidToLayer=new Map,this._layerByName={},this._runningId=0,t.layers||(t.layers=[]),this.version=parseFloat(t.version),this.layers=t.layers.map(((t,e,r)=>this._create(t,e,r))).filter((t=>!!t)),this.layers){let t;for(let e=0;e<this.layers.length;e++)t=this.layers[e],this._layerByName[t.id]=t,this._uidToLayer.set(t.uid,t),t.type===n.fR.BACKGROUND&&this.backgroundBucketIds.push(t.id)}this._identifyRefLayers()}isPainterDataDriven(t){const e=this._layerByName[t];return!!e&&e.isPainterDataDriven()}getStyleLayerId(t){return t>=this.layers.length?null:this.layers[t].id}getStyleLayerByUID(t){return this._uidToLayer.get(t)??null}getStyleLayerIndex(t){const e=this._layerByName[t];return e?this.layers.indexOf(e):-1}setStyleLayer(t,e){if(!t||!t.id)return;const r=this._style;null!=e&&e>=this.layers.length&&(e=this.layers.length-1);let n,i=!0;const s=this._layerByName[t.id];if(s){const o=this.layers.indexOf(s);e||(e=o),e===o?(i=!1,n=a._recreateLayer(t,s),this.layers[e]=n,r.layers[e]=t):(this.layers.splice(o,1),r.layers.splice(o,1),n=this._create(t,e,this.layers),this.layers.splice(e,0,n),r.layers.splice(e,0,t))}else n=this._create(t,e,this.layers),!e||e>=this.layers.length?(this.layers.push(n),r.layers.push(t)):(this.layers.splice(e,0,n),r.layers.splice(e,0,t));this._layerByName[t.id]=n,this._uidToLayer.set(n.uid,n),i&&this._recomputeZValues(),this._identifyRefLayers()}getStyleLayer(t){const e=this._layerByName[t];return e?{type:e.typeName,id:e.id,source:e.source,"source-layer":e.sourceLayer,minzoom:e.minzoom,maxzoom:e.maxzoom,filter:e.filter,layout:e.layout,paint:e.paint}:null}deleteStyleLayer(t){const e=this._layerByName[t];if(e){delete this._layerByName[t],this._uidToLayer.delete(e.uid);const r=this.layers.indexOf(e);this.layers.splice(r,1),this._style.layers.splice(r,1),this._recomputeZValues(),this._identifyRefLayers()}}getLayerById(t){return this._layerByName[t]}getLayoutProperties(t){const e=this._layerByName[t];return e?e.layout:null}getPaintProperties(t){const e=this._layerByName[t];return e?e.paint:null}setPaintProperties(t,e){const r=this._layerByName[t];if(!r)return;const n={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:r.layout,paint:e},i=a._recreateLayer(n,r),s=this.layers.indexOf(r);this.layers[s]=i,this._style.layers[s].paint=e,this._layerByName[r.id]=i,this._uidToLayer.set(r.uid,i)}setLayoutProperties(t,e){const r=this._layerByName[t];if(!r)return;const n={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:e,paint:r.paint},i=a._recreateLayer(n,r),s=this.layers.indexOf(r);this.layers[s]=i,this._style.layers[s].layout=e,this._layerByName[r.id]=i,this._uidToLayer.set(r.uid,i)}setStyleLayerVisibility(t,e){const r=this._layerByName[t];if(!r)return;const n=r.layout||{};n.visibility=e;const i={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:n,paint:r.paint},s=a._recreateLayer(i,r),o=this.layers.indexOf(r);this.layers[o]=s,this._style.layers[o].layout=n,this._layerByName[r.id]=s,this._uidToLayer.set(r.uid,s)}getStyleLayerVisibility(t){const e=this._layerByName[t];return e?e.layout?.visibility??"visible":"none"}_recomputeZValues(){const t=this.layers,e=1/(t.length+1);for(let r=0;r<t.length;r++)t[r].z=1-(1+r)*e}_identifyRefLayers(){const t=[],e=[];let r=0;for(const i of this.layers){const a=i.layout;if(i.type===n.fR.FILL){const e=i;let n=i.source+"|"+i.sourceLayer;n+="|"+a?.visibility??"",n+="|"+i.minzoom,n+="|"+i.maxzoom,n+="|"+JSON.stringify(i.filter),(e.hasDataDrivenFill||e.hasDataDrivenOutline)&&(n+="|"+r),t.push({key:n,layer:i})}else if(i.type===n.fR.LINE){const t=i;let n=i.source+"|"+i.sourceLayer;n+="|"+a?.visibility??"",n+="|"+i.minzoom,n+="|"+i.maxzoom,n+="|"+JSON.stringify(i.filter),n+="|"+(void 0!==a?a["line-cap"]:""),n+="|"+(void 0!==a?a["line-join"]:""),t.hasDataDrivenLine&&(n+="|"+r),e.push({key:n,layer:i})}++r}this._assignRefLayers(t),this._assignRefLayers(e)}_assignRefLayers(t){let e,r;t.sort(((t,e)=>t.key<e.key?-1:t.key>e.key?1:0));const i=t.length;for(let a=0;a<i;a++){const s=t[a];if(s.key===e)s.layer.refLayerId=r;else if(e=s.key,r=s.layer.id,s.layer.type===n.fR.FILL){if(!s.layer.getPaintProperty("fill-outline-color"))for(let n=a+1;n<i;n++){const i=t[n];if(i.key!==e)break;if(i.layer.getPaintProperty("fill-outline-color")){t[a]=i,t[n]=s,r=i.layer.id;break}}}else if(s.layer.type===n.fR.LINE){let n=s.layer;for(let o=a+1;o<i;o++){const i=t[o];if(i.key!==e)break;const l=i.layer;(n.canUseThinTessellation&&!l.canUseThinTessellation||!n.canUseThinTessellation&&(l.getPaintProperty("line-pattern")||l.getPaintProperty("line-dasharray")))&&(n=l,t[a]=i,t[o]=s,r=i.layer.id)}}}}_create(t,e,r){const a=1-(1+e)*(1/(r.length+1)),s=this._runningId++;switch(t.type){case"background":return new i.Et(n.fR.BACKGROUND,t,a,s);case"fill":return new i.Le(n.fR.FILL,t,a,s);case"line":return new i.gf(n.fR.LINE,t,a,s);case"symbol":return new i.jG(n.fR.SYMBOL,t,a,s);case"raster":console.warn(`Unsupported vector tile raster layer ${t.id}`);case"circle":return new i.sj(n.fR.CIRCLE,t,a,s)}}static _recreateLayer(t,e){switch(t.type){case"background":return new i.Et(n.fR.BACKGROUND,t,e.z,e.uid);case"fill":return new i.Le(n.fR.FILL,t,e.z,e.uid);case"line":return new i.gf(n.fR.LINE,t,e.z,e.uid);case"symbol":return new i.jG(n.fR.SYMBOL,t,e.z,e.uid);case"raster":console.warn(`Unsupported vector tile raster layer ${t.id}`);case"circle":return new i.sj(n.fR.CIRCLE,t,e.z,e.uid)}}}},35362:(t,e,r)=>{r.d(e,{E:()=>n,V:()=>i});class n{constructor(t,e){this.x=t,this.y=e}clone(){return new n(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){this.x=t,this.y=e}normalize(){const t=this.x,e=this.y,r=Math.sqrt(t*t+e*e);this.x/=r,this.y/=r}rightPerpendicular(){const t=this.x;this.x=this.y,this.y=-t}move(t,e){this.x+=t,this.y+=e}assign(t){this.x=t.x,this.y=t.y}assignAdd(t,e){this.x=t.x+e.x,this.y=t.y+e.y}assignSub(t,e){this.x=t.x-e.x,this.y=t.y-e.y}rotate(t,e){const r=this.x,n=this.y;this.x=r*t-n*e,this.y=r*e+n*t}scale(t){this.x*=t,this.y*=t}length(){const t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}static distance(t,e){const r=e.x-t.x,n=e.y-t.y;return Math.sqrt(r*r+n*n)}static add(t,e){return new n(t.x+e.x,t.y+e.y)}static sub(t,e){return new n(t.x-e.x,t.y-e.y)}}var i;!function(t){t[t.Unknown=0]="Unknown",t[t.Point=1]="Point",t[t.LineString=2]="LineString",t[t.Polygon=3]="Polygon"}(i||(i={}))},21968:(t,e,r)=>{r.d(e,{G:()=>n});class n{constructor(t,e,r,n,i,a=!1,s=0){this.name=t,this.count=e,this.type=r,this.offset=n,this.stride=i,this.normalized=a,this.divisor=s}}}}]);
|