weatherlayers-gl
Version:
WeatherLayers GL - Weather Visualization Layers for deck.gl
14 lines (13 loc) • 153 kB
JavaScript
/*!
* Copyright (c) 2021-2026 WeatherLayers.com
*
* WeatherLayers GL 2026.5.1
*
* Package and source code is dual-licensed, the choice of license is MPL-2.0 or our License Terms of Use. Contact support@weatherlayers.com for details.
*
* Homepage - https://weatherlayers.com/
* Demo - https://demo.weatherlayers.com/
* Docs - https://docs.weatherlayers.com/
* WeatherLayers GL License Terms of Use - https://weatherlayers.com/license-terms-of-use.html
*/
"use strict";var e=require("cpt2js"),t=require("@deck.gl/core"),n=require("@deck.gl/layers"),a=require("@deck.gl/extensions"),r=require("geodesy-fn"),o=require("comlink"),i=require("rollup-plugin-worker-factory/src/browser.js"),A=require("@mapbox/sphericalmercator"),s=require("icomesh"),l=require("kdbush"),c=require("geokdbush"),g=require("@luma.gl/engine");function u(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var p=u(c);const d=new Map;const m={INWARD:"INWARD",OUTWARD:"OUTWARD"},h={VALUE:"VALUE",CARDINAL:"CARDINAL",CARDINAL2:"CARDINAL2",CARDINAL3:"CARDINAL3"},C={[h.CARDINAL]:["N","E","S","W"],[h.CARDINAL2]:["N","NE","E","SE","S","SW","W","NW"],[h.CARDINAL3]:["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"]};function I(e,t){if(!t)return`${Math.round(e)}`;const{scale:n=1,offset:a=0,decimals:r=0}=t,o=n*e+a;return`${r?Math.round(o*10**r)/10**r:Math.round(o)}`}function v(e){return e.unit.replace("^2","²").replace("^3","³")}function f(e,t){return`${I(e,t)} ${v(t)}`}function E(e,t,n){if(t===m.OUTWARD&&(e+=180),n===h.VALUE)return`${Math.round(e%360)}°`;if(n===h.CARDINAL||n===h.CARDINAL2||n===h.CARDINAL3){const t=C[n],a=360/t.length;return t[Math.floor((e%360+a/2)/a)%t.length]}throw new Error("Invalid state")}const B=[255,255,255],y='"Helvetica Neue", Arial, Helvetica, sans-serif',Q=[255,255,255],b=[13,13,13],w=I,x=[255,255,255];function T(e,t){const n={};for(const a in e)if(void 0===e[a]&&a in t){const e=t[a];e&&("value"in e?e.value&&(n[a]=e.value):n[a]=e)}return Object.freeze({...e,...n})}class M{constructor(e){this._running=!1,this._raf=void 0,this._lastFrameTime=0,this._config=e}getConfig(){return{...this._config}}setConfig(e){this._config=e}updateConfig(e){this.setConfig({...this._config,...e})}get running(){return this._running}toggle(e=!this._running){e?this.start():this.stop()}start(){this._running||(this._running=!0,this._raf=window.requestAnimationFrame((()=>this.step())))}stop(){this._running&&(this._running=!1,this._raf&&(window.cancelAnimationFrame(this._raf),this._raf=void 0))}step(){const e=1e3/(this._config.fps??30),t=Date.now(),n=t-this._lastFrameTime;n>e&&(this._lastFrameTime=t-n%e,this._config.onUpdate()),this._running&&(this._raf=window.requestAnimationFrame((()=>this.step())))}}const O=new Map;const S=new class{constructor(){this.queue=Promise.resolve()}async run(e){const t=this.queue;let n;this.queue=new Promise((e=>{n=e}));try{return await t,await e()}finally{n()}}};async function P(e,t){const n=await async function(e){if(d.has(e))return d.get(e);try{if("geotiff"===e)return await import("geotiff")}catch(t){throw new Error(`Optional dependency '${e}' is missing, install it with a package manager or provide with \`setLibrary('${e}', library)\``,{cause:t})}}("geotiff");let a;try{a=await n.fromUrl(e,{allowFullFile:!0,blockSize:Number.MAX_SAFE_INTEGER,fetch:(e,n)=>fetch(e,{...n,headers:{...n?.headers,...t?.headers}})},t?.signal)}catch(t){throw new Error(`Image ${e} can't be decoded.`,{cause:t})}const r=await a.getImage(0),o=await r.readRasters({interleave:!0,signal:t?.signal});if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray||o instanceof Float32Array))throw new Error("Unsupported data format");const i=function(e,t){if(null==t)return e;const n=e.slice(0);for(let e=0;e<n.length;e++)Math.abs(n[e]-t)<2*Number.EPSILON&&(n[e]=NaN);return n}(o,r.getGDALNoData());return{data:i,width:r.getWidth(),height:r.getHeight()}}function L(e){return async(t,n)=>{if(!1===n?.cache)return e(t);const a=n?.cache??O,r=t+(n?.headers?":"+JSON.stringify(n?.headers):""),o=a.get(r);if(o)return o;const i={...n,cache:void 0},A=e(t,i);return a.set(r,A),A.then((e=>{a.set(r,e)})),A}}const V=L((async(e,t)=>{if(e.includes(".png")||e.includes(".webp")||e.includes("image/png")||e.includes("image/webp"))return async function(e,t){let n;if(t?.headers||t?.signal){const a=await fetch(e,{headers:t.headers,signal:t.signal});if(!a.ok)throw new Error(`URL ${e} can't be loaded. Status: ${a.status}`);const r=await a.blob();n=URL.createObjectURL(r)}const a=new Image;try{await new Promise(((t,r)=>{a.addEventListener("load",t),a.addEventListener("error",r),a.crossOrigin="anonymous",a.src=n??e}))}catch(t){throw new Error(`URL ${e} can't be loaded.`,{cause:t})}finally{n&&URL.revokeObjectURL(n)}try{await S.run((()=>a.decode()))}catch(t){throw new Error(`Image ${e} can't be decoded.`,{cause:t})}const r=document.createElement("canvas");r.width=a.width,r.height=a.height;const o=r.getContext("2d");o.drawImage(a,0,0);const i=o.getImageData(0,0,r.width,r.height),{data:A,width:s,height:l}=i;return{data:A,width:s,height:l}}(e,t);if(e.includes(".tif")||e.includes("image/tif"))return P(e,t);throw new Error("Unsupported data format")})),D=L((async(e,t)=>{const n=await fetch(e,{headers:t?.headers});if(!n.ok)throw new Error(`URL ${e} can't be loaded. Status: ${n.status}`);return n.json()}));function N(e,t,n){if(!t){if(0===n)return e;throw new Error("Invalid state")}if(n<=0)return e;if(n>=1)return t;{const a=new Date(e),r=new Date(t);return new Date(a.getTime()+(r.getTime()-a.getTime())*n).toISOString()}}function U(e,t,n){if(!t){if(e===n)return 0;throw new Error("Invalid state")}if(n<=e)return 0;if(n>=t)return 1;{const a=new Date(e),r=new Date(t);return(new Date(n).getTime()-a.getTime())/(r.getTime()-a.getTime())}}function J(e,t){const n=new Date(e);return new Date(n.getTime()+1e3*t*60*60).toISOString()}function F(e){if(!e)return e;const t=new Date(e);if(!t.getDate())return e;return`${t.getUTCFullYear()}/${`${t.getUTCMonth()+1}`.padStart(2,"0")}/${`${t.getUTCDate()}`.padStart(2,"0")} ${`${t.getUTCHours()}`.padStart(2,"0")}:${`${t.getUTCMinutes()}`.padStart(2,"0")} UTC`}const Z={NEAREST:"NEAREST",LINEAR:"LINEAR",CUBIC:"CUBIC"},R={SCALAR:"SCALAR",VECTOR:"VECTOR"},q={BOTTOM:"BOTTOM",TOP:"TOP",RIGHT:"RIGHT",LEFT:"LEFT"};function W(e){return e%1}function k(e,t){return e.map(((n,a)=>e[a]+t[a]))}function G(e,t){return e.map(((n,a)=>e[a]*t))}function K(e,t){return e.map(((n,a)=>e[a]*t[a])).reduce(((e,t)=>e+t))}function z(e,t,n){return e===t?e:e*(1-n)+t*n}function j(e,t,n){return e.map(((a,r)=>z(e[r],t[r],n)))}function X(e,t){return t?e[3]>=255:!isNaN(e[0])}function H(e,t,n){return t===R.VECTOR?n?[z(n[0],n[1],e[0]/255),z(n[0],n[1],e[1]/255)]:[e[0],e[1]]:[NaN,NaN]}function Y(e,t,n){if(t===R.VECTOR){const a=H(e,t,n);return Math.hypot(a[0],a[1])}return function(e,t,n){return t===R.VECTOR?0:n?z(n[0],n[1],e[0]/255):e[0]}(e,t,n)}function _(e,t,n,a,r,o){const{data:i,width:A,height:s}=e,l=i.length/(A*s),c=(n+r+.5)/t[0],g=(a+o+.5)/t[1],u=Math.max(0,Math.min(A-1,Math.floor(c*A))),p=Math.max(0,Math.min(s-1,Math.floor(g*s)));return new Array(l).fill(void 0).map(((e,t)=>i[(u+p*A)*l+t]))}const $=[3,-6,0,4].map((e=>e/6)),ee=[-1,6,-12,8].map((e=>e/6));function te(e){return[e*e*e,e*e,e,1]}function ne(e,t,n,a,r){const o=k(k(k(G(e,K(ee,te(r+1))),G(t,K($,te(r)))),G(n,K($,te(1-r)))),G(a,K(ee,te(2-r))));return o[3]=e[3]>0&&t[3]>0&&n[3]>0&&a[3]>0?Math.max(Math.max(Math.max(e[3],t[3]),n[3]),a[3]):0,o}function ae(e,t,n,a,r){return n===Z.CUBIC?function(e,t,n,a){const r=n*t[0]-.5,o=a*t[1]-.5,i=Math.floor(r),A=Math.floor(o),s=W(r),l=W(o);return ne(ne(_(e,t,i,A,-1,-1),_(e,t,i,A,0,-1),_(e,t,i,A,1,-1),_(e,t,i,A,2,-1),s),ne(_(e,t,i,A,-1,0),_(e,t,i,A,0,0),_(e,t,i,A,1,0),_(e,t,i,A,2,0),s),ne(_(e,t,i,A,-1,1),_(e,t,i,A,0,1),_(e,t,i,A,1,1),_(e,t,i,A,2,1),s),ne(_(e,t,i,A,-1,2),_(e,t,i,A,0,2),_(e,t,i,A,1,2),_(e,t,i,A,2,2),s),l)}(e,t,a,r):n===Z.LINEAR?function(e,t,n,a){const r=n*t[0]-.5,o=a*t[1]-.5,i=Math.floor(r),A=Math.floor(o),s=W(r),l=W(o);return j(j(_(e,t,i,A,0,0),_(e,t,i,A,1,0),s),j(_(e,t,i,A,0,1),_(e,t,i,A,1,1),s),l)}(e,t,a,r):function(e,t,n,a){const r=n*t[0]-.5,o=a*t[1]-.5;return _(e,t,Math.round(r),Math.round(o),0,0)}(e,t,a,r)}function re(e,t,n,a,r,o,i,A){const s=o?i+.5/n[0]:z(0+.5/n[0],1-.5/n[0],i),l=z(0+.5/n[1],1-.5/n[1],A);if(t&&r>0){return j(ae(e,n,a,s,l),ae(t,n,a,s,l),r)}return ae(e,n,a,s,l)}function oe(e,t,n){const a=1+Math.max(0,n);return[e/a,t/a]}const ie=-180,Ae=180,se=-85.051129,le=85.051129;function ce(e,t){let n=((e+180)%(a=360)+a)%a-180;var a;return"number"==typeof t&&n<t&&(n+=360),n}function ge(e){return e[2]-e[0]==360}function ue(e,t){return{type:"Feature",geometry:{type:"Point",coordinates:e},properties:t}}function pe(e,t,n){const{image:a,image2:r,imageSmoothing:o,imageInterpolation:i,imageWeight:A,imageType:s,imageUnscale:l,imageMinValue:c,imageMaxValue:g}=e,{width:u,height:p}=a,d=function(e,t,n){const a=[n[0],n[3]],r=(n[2]-n[0])/e,o=(n[3]-n[1])/t;return e=>{const[t,n]=e;return[(t-a[0])/r,(a[1]-n)/o]}}(u,p,t),m=oe(u,p,o),h=ge(t),C=n.map((e=>{if(!function(e,t){return e[0]>=t[0]&&e[0]<=t[2]&&e[1]>=t[1]&&e[1]<=t[3]}(e,t))return ue(e,{value:NaN});const n=d(e),o=n[0]/u,C=n[1]/p,I=re(a,r,m,i,A,h,o,C);if(!X(I,l))return ue(e,{value:NaN});const v=Y(I,s,l);if("number"==typeof c&&!isNaN(c)&&v<c||"number"==typeof g&&!isNaN(g)&&v>g)return ue(e,{value:NaN});if(s===R.VECTOR){const t=function(e,t,n){if(t===R.VECTOR){const a=H(e,t,n);return(360-(Math.atan2(a[1],a[0])/Math.PI*180+180)-270)%360}return NaN}(I,s,l);return ue(e,{value:v,direction:t})}return ue(e,{value:v})}));return{type:"FeatureCollection",features:C}}const de=new WeakMap,me=new WeakMap;function he(e,t){const{data:n,width:a,height:r}=t,o=n.length/(a*r);if(n instanceof Uint8Array||n instanceof Uint8ClampedArray){if(4===o)return"rgba8unorm";if(2===o)return"rg8unorm";if(1===o)return"r8unorm";throw new Error("Unsupported data format")}if(n instanceof Float32Array){if(!e.features.has("float32-renderable-webgl"))throw new Error("Float textures are required");if(2===o)return"rg32float";if(1===o)return"r32float";throw new Error("Unsupported data format")}throw new Error("Unsupported data format")}function Ce(e,t,n=!1){const a=n?de:me,r=a.get(e)??(()=>{const t=new WeakMap;return a.set(e,t),t})();return r.get(t)??(()=>{const a=e.createTexture({format:he(e,t),width:t.width,height:t.height,mipLevels:1,sampler:{magFilter:"nearest",minFilter:"nearest",addressModeU:n?"repeat":"clamp-to-edge",addressModeV:"clamp-to-edge",lodMaxClamp:0}});return a.copyImageData({data:t.data}),r.set(t,a),a})()}let Ie=null;function ve(e){return Ie||(Ie=e.createTexture({width:1,height:1,mipLevels:1}),Ie.copyImageData({data:new Uint8Array([0,0,0,0])})),Ie}const fe=6370972;function Ee(e,t){return r.distance(e,t,fe)}function Be(e,t,n){return r.destinationPoint(e,t,n,fe)}function ye(e){return!!e.resolution}function Qe(e){return!ye(e)}function be(e,t,n){return!(null!=t&&e.zoom<t)&&!(null!=n&&e.zoom>n)}function we(e){return[e.longitude,e.latitude]}function xe(e){const t=we(e);return Math.max(Ee(t,e.unproject([e.width/2,0])),Ee(t,e.unproject([0,e.height/2])),...e.width>e.height?[Ee(t,e.unproject([e.width/2-e.height/4*1,e.height/2])),Ee(t,e.unproject([e.width/2-e.height/2*1,e.height/2])),Ee(t,e.unproject([e.width/2-e.height/4*3,e.height/2])),Ee(t,e.unproject([e.width/2-e.height,e.height/2]))]:[Ee(t,e.unproject([e.width/2,e.height/2-e.width/4*1])),Ee(t,e.unproject([e.width/2,e.height/2-e.width/2*1])),Ee(t,e.unproject([e.width/2,e.height/2-e.width/4*3])),Ee(t,e.unproject([e.width/2,e.height/2-e.width]))])}function Te(e){return function(e){const t=e[2]-e[0]<360?ce(e[0]):ie,n=e[2]-e[0]<360?ce(e[2],t):Ae;return[t,Math.max(e[1],se),n,Math.min(e[3],le)]}(e.getBounds())}function Me(e){return ye(e)?Math.log2(e.scale):e.zoom}function Oe(e,t){return t*(ye(e)?-1:1)}function Se(e,t){return t+(ye(e)?180:0)}function Pe(t,n){const a=n.domain(),r=[a[0],a[a.length-1]],o=e.colorRampCanvas(n),i=t.createTexture({width:o.width,height:o.height,mipLevels:1,sampler:{magFilter:"linear",minFilter:"linear",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}});return i.copyExternalImage({image:o}),{paletteBounds:r,paletteTexture:i}}function Le(e){return[e[0]/255,e[1]/255,e[2]/255,(e[3]??255)/255]}function Ve(e){return[e[0],e[1],e[2],255*e[3]]}const De="layout(std140)uniform bitmap2Uniforms{\nvec4 A;\nbool B;\nfloat C;\nvec4 D;\n}\nbitmap2;\nconst float E=512.;\nconst float F=3.1415926536;\nconst float G=E/F/2.;\nvec2 H(vec2 I){\nfloat J=I.x;\nfloat K=clamp(I.y,-89.9,89.9);\nreturn vec2(radians(J)+F,F+log(tan(F*0.25+radians(K)*0.5)))*G;\n}\nvec2 L(vec2 M){\nM/=G;\nreturn degrees(vec2(M.x-F,atan(exp(M.y-F))*2.-F*0.5));\n}\nvec4 N(vec3 O,float P){\nreturn mix(bitmap2.D,vec4(O,1.),P);\n}\nvec2 Q(vec2 R){\nreturn vec2((R.x-bitmap2.A[0])/(bitmap2.A[2]-bitmap2.A[0]),(R.y-bitmap2.A[3])/(bitmap2.A[1]-bitmap2.A[3]));\n}\nvec2 S(vec2 T,vec2 U){\nvec2 uv=T;\nif(bitmap2.C<-0.5){\nvec2 I=L(U);\nuv=Q(I);\n}\nelse if(bitmap2.C>0.5){\nvec2 V=H(U);\nuv=Q(V);\n}\nreturn uv;\n}\n",Ne="A",Ue="B",Je="C",Fe="D";const Ze=Math.PI,Re=Ze/4,qe=Ze/180,We=512;function ke(e){const[t,n]=e,a=n*qe;return[We*(t*qe+Ze)/(2*Ze),We*(Ze+Math.log(Math.tan(Re+.5*a)))/(2*Ze)]}function Ge(e={}){const{LNGLAT:n,CARTESIAN:a,DEFAULT:r}=t.COORDINATE_SYSTEM;let{viewportGlobe:o,bounds:i,_imageCoordinateSystem:A}=e;if(!function(e){return Number.isFinite(e[0])}(i))throw new Error("_imageCoordinateSystem only supports rectangular bounds");if(A!==r){const e=o?n:a;if(A=A===n?n:a,A===n&&e===a)return{coordinateConversion:-1,bounds:i};if(A===a&&e===n){const e=ke([i[0],i[1]]),t=ke([i[2],i[3]]);return{coordinateConversion:1,bounds:[e[0],e[1],t[0],t[1]]}}}return{coordinateConversion:0,bounds:i}}const Ke={name:"bitmap2",vs:De,fs:De,uniformTypes:{[Ne]:"vec4<f32>",[Ue]:"f32",[Je]:"f32",[Fe]:"vec4<f32>"},getUniforms:function(e={}){const{bounds:t,coordinateConversion:n}=Ge(e);return{[Ne]:t,[Ue]:ge(t)?1:0,[Je]:n,[Fe]:e.transparentColor?Le(e.transparentColor):[0,0,0,0]}}},ze=Je,je="uniform sampler2D W;\nuniform sampler2D X;\nlayout(std140)uniform rasterUniforms{\nvec2 Y;\nfloat Z;\nfloat a;\nfloat b;\nfloat c;\nvec2 d;\nfloat e;\nfloat f;\nfloat g;\nfloat h;\nvec4 i;\nfloat j;\nfloat k;\nvec4 l;\n}\nraster;\n",Xe="W",He="X",Ye="Y",_e="Z",$e="a",et="b",tt="c",nt="d",at="e",rt="f",ot="g",it="h",At="i",st="j",lt="k",ct="l";const gt={name:"raster",vs:je,fs:je,uniformTypes:{[Ye]:"vec2<f32>",[_e]:"f32",[$e]:"f32",[et]:"f32",[tt]:"f32",[nt]:"vec2<f32>",[at]:"f32",[rt]:"f32",[ot]:"f32",[it]:"f32",[At]:"vec4<f32>",[st]:"f32",[lt]:"f32",[ct]:"vec4<f32>"},getUniforms:function(e={}){return{[Xe]:e.imageTexture,[He]:e.imageTexture2,[Ye]:e.imageTexture?[e.imageTexture.width,e.imageTexture.height]:[0,0],[_e]:e.imageSmoothing??0,[$e]:Object.values(Z).indexOf(e.imageInterpolation??Z.NEAREST),[et]:e.imageTexture2!==e.imageTexture&&e.imageWeight?e.imageWeight:0,[tt]:Object.values(R).indexOf(e.imageType??R.SCALAR),[nt]:e.imageUnscale??[0,0],[at]:e.imageMinValue??Number.MIN_SAFE_INTEGER,[rt]:e.imageMaxValue??Number.MAX_SAFE_INTEGER,[ot]:e.borderEnabled?1:0,[it]:e.borderWidth??0,[At]:e.borderColor?Le(e.borderColor):[0,0,0,0],[st]:e.gridEnabled?1:0,[lt]:e.gridSize??0,[ct]:e.gridColor?Le(e.gridColor):[0,0,0,0]}}},ut="uniform sampler2D m;\nlayout(std140)uniform paletteUniforms{\nvec2 n;\nvec4 o;\n}\npalette;\nfloat p(float min,float max,float q){\nreturn(q-min)/(max-min);\n}\nvec4 r(sampler2D m,vec2 n,vec4 o,float q){\nif(n[0]<n[1]){\nfloat s=p(n[0],n[1],q);\nreturn texture(m,vec2(s,0.));\n}\nelse{\nreturn o;\n}\n}\n",pt="m",dt="n",mt="o";const ht={name:"palette",vs:ut,fs:ut,uniformTypes:{[dt]:"vec2<f32>",[mt]:"vec4<f32>"},getUniforms:function(e={}){return{[pt]:e.paletteTexture,[dt]:e.paletteBounds??[0,0],[mt]:e.paletteColor?Le(e.paletteColor):[0,0,0,0]}}},Ct={imageTexture:{type:"object",value:null},imageTexture2:{type:"object",value:null},imageSmoothing:{type:"number",value:0},imageInterpolation:{type:"object",value:Z.CUBIC},imageWeight:{type:"number",value:0},imageType:{type:"object",value:R.SCALAR},imageUnscale:{type:"array",value:null},imageMinValue:{type:"object",value:null},imageMaxValue:{type:"object",value:null},bounds:{type:"array",value:[-180,-90,180,90],compare:!0},minZoom:{type:"object",value:null},maxZoom:{type:"object",value:null},palette:{type:"object",value:null},borderEnabled:{type:"boolean",value:!1},borderWidth:{type:"number",value:1},borderColor:{type:"color",value:B},gridEnabled:{type:"boolean",value:!1},gridSize:{type:"number",value:1},gridColor:{type:"color",value:B}};class It extends n.BitmapLayer{getShaders(){const e=super.getShaders();return{...e,vs:e.vs.replaceAll("bitmap.coordinateConversion",`bitmap2.${ze}`),fs:"#version 300 es\n#define SHADER_NAME raster-bitmap-layer-fragment-shader\n#ifdef GL_ES\nprecision highp float;\n#endif\nvec4 AG(sampler2D AH,vec2 AI,vec2 AJ,vec2 AK){\nvec2 uv=(AJ+AK+0.5)/AI;\nreturn texture(AH,uv);\n}\nconst vec4 AL=vec4(3.,-6.,0.,4.)/6.;\nconst vec4 AM=vec4(-1.,6.,-12.,8.)/6.;\nvec4 AN(float J){\nreturn vec4(J*J*J,J*J,J,1.);\n}\nvec4 AO(vec4 AP,vec4 AQ,vec4 AR,vec4 AS,float AT){\nvec4 O=AP*dot(AM,AN(AT+1.))+AQ*dot(AL,AN(AT))+AR*dot(AL,AN(1.-AT))+AS*dot(AM,AN(2.-AT));\nO.a=(AP.a>0.&&AQ.a>0.&&AR.a>0.&&AS.a>0.)?max(max(max(AP.a,AQ.a),AR.a),AS.a):0.;\nreturn O;\n}\nvec4 AU(sampler2D AH,vec2 AI,vec2 uv){\nvec2 AV=uv*AI-0.5;\nvec2 AJ=floor(AV);\nvec2 AW=fract(AV);\nreturn AO(AO(AG(AH,AI,AJ,vec2(-1,-1)),AG(AH,AI,AJ,vec2(0,-1)),AG(AH,AI,AJ,vec2(1,-1)),AG(AH,AI,AJ,vec2(2,-1)),AW.x),AO(AG(AH,AI,AJ,vec2(-1,0)),AG(AH,AI,AJ,vec2(0,0)),AG(AH,AI,AJ,vec2(1,0)),AG(AH,AI,AJ,vec2(2,0)),AW.x),AO(AG(AH,AI,AJ,vec2(-1,1)),AG(AH,AI,AJ,vec2(0,1)),AG(AH,AI,AJ,vec2(1,1)),AG(AH,AI,AJ,vec2(2,1)),AW.x),AO(AG(AH,AI,AJ,vec2(-1,2)),AG(AH,AI,AJ,vec2(0,2)),AG(AH,AI,AJ,vec2(1,2)),AG(AH,AI,AJ,vec2(2,2)),AW.x),AW.y);\n}\nvec4 AX(sampler2D AH,vec2 AI,vec2 uv){\nvec2 AV=uv*AI-0.5;\nvec2 AJ=floor(AV);\nvec2 AW=fract(AV);\nreturn mix(mix(AG(AH,AI,AJ,vec2(0,0)),AG(AH,AI,AJ,vec2(1,0)),AW.x),mix(AG(AH,AI,AJ,vec2(0,1)),AG(AH,AI,AJ,vec2(1,1)),AW.x),AW.y);\n}\nvec4 AY(sampler2D AH,vec2 AI,vec2 uv){\nvec2 AV=uv*AI-0.5;\nvec2 AJ=floor(AV+0.5);\nreturn AG(AH,AI,AJ,vec2(0,0));\n}\nvec4 AZ(sampler2D AH,vec2 AI,float a,vec2 uv){\nif(a==2.){\nreturn AU(AH,AI,uv);\n}\nif(a==1.){\nreturn AX(AH,AI,uv);\n}\nelse{\nreturn AY(AH,AI,uv);\n}\n}\nvec4 Aa(sampler2D AH,sampler2D Ab,vec2 AI,float a,float b,bool B,vec2 uv){\nvec2 Ac;\nAc.x=B?uv.x+0.5/AI.x:mix(0.+0.5/AI.x,1.-0.5/AI.x,uv.x);\nAc.y=mix(0.+0.5/AI.y,1.-0.5/AI.y,uv.y);\nif(b>0.){\nvec4 Ad=AZ(AH,AI,a,Ac);\nvec4 Ae=AZ(Ab,AI,a,Ac);\nreturn mix(Ad,Ae,b);\n}\nelse{\nreturn AZ(AH,AI,a,Ac);\n}\n}\nvec4 Af(sampler2D AH,sampler2D Ab,vec2 Y,float Z,float a,float b,bool B,vec2 uv){\nfloat Ag=1.+max(0.,Z);\nvec2 AI=Y/Ag;\nreturn Aa(AH,Ab,AI,a,b,B,uv);\n}\nconst float Ah=3.1415926536;\nfloat Ai(float K,float J){\nreturn J==0.?sign(K)*Ah/2.:atan(K,J);\n}\nbool Aj(float q){\nuint Ak=floatBitsToUint(q);\nreturn(Ak&0x7fffffffu)>0x7f800000u;\n}\nbool Al(vec4 Ad,vec2 d){\nif(d[0]<d[1]){\nreturn Ad.a>=1.;\n}\nelse{\nreturn!Aj(Ad.x);\n}\n}\nfloat Am(vec4 Ad,float c,vec2 d){\nif(c==1.){\nreturn 0.;\n}\nelse{\nif(d[0]<d[1]){\nreturn mix(d[0],d[1],Ad.x);\n}\nelse{\nreturn Ad.x;\n}\n}\n}\nvec2 An(vec4 Ad,float c,vec2 d){\nif(c==1.){\nif(d[0]<d[1]){\nreturn mix(vec2(d[0]),vec2(d[1]),Ad.xy);\n}\nelse{\nreturn Ad.xy;\n}\n}\nelse{\nreturn vec2(0.);\n}\n}\nfloat Ao(vec4 Ad,float c,vec2 d){\nif(c==1.){\nvec2 q=An(Ad,c,d);\nreturn length(q);\n}\nelse{\nreturn Am(Ad,c,d);\n}\n}\nfloat Ap(vec4 Ad,float c,vec2 d){\nif(c==1.){\nvec2 q=An(Ad,c,d);\nreturn mod((360.-(Ai(q.y,q.x)/Ah*180.+180.))-270.,360.)/360.;\n}\nelse{\nreturn 0.;\n}\n}\nin vec2 vTexCoord;\nin vec2 vTexPos;\nout vec4 fragColor;\nvoid main(void){\nvec2 uv=S(vTexCoord,vTexPos);\nvec4 Ad=Af(W,X,raster.Y,raster.Z,raster.a,raster.b,bitmap2.B,uv);\nif(!Al(Ad,raster.d)){\ndiscard;\n}\nfloat q=Ao(Ad,raster.c,raster.d);\nif((!Aj(raster.e)&&q<raster.e)||(!Aj(raster.f)&&q>raster.f)){\ndiscard;\n}\nvec4 Aq=r(m,palette.n,palette.o,q);\nfragColor=N(Aq.rgb,Aq.a*layer.opacity);\nif(bool(raster.g)){\nvec2 Ar=vec2(length(dFdx(uv)),length(dFdy(uv)));\nvec2 h=raster.h/2.*Ar;\nif((uv.x<h.x||uv.x>1.-h.x)||(uv.y<h.y||uv.y>1.-h.y)){\nfragColor=N(raster.i.rgb,raster.i.a*layer.opacity*2.);\n}\n}\nif(bool(raster.j)){\nfloat Ag=1.+max(0.,raster.Z);\nvec2 AI=raster.Y/Ag;\nvec2 Ac;\nAc.x=bitmap2.B?uv.x+0.5/AI.x:mix(0.+0.5/AI.x,1.-0.5/AI.x,uv.x);\nAc.y=mix(0.+0.5/AI.y,1.-0.5/AI.y,uv.y);\nvec2 AV=Ac*AI-0.5;\nvec2 AW=fract(AV);\nvec2 Ar=vec2(length(dFdx(uv)),length(dFdy(uv)));\nvec2 k=raster.k/2.*Ar*raster.Y;\nif((AW.x<k.x||AW.x>1.-k.x)&&(AW.y<k.y||AW.y>1.-k.y)){\nfragColor=N(raster.l.rgb,raster.l.a*layer.opacity*2.);\n}\n}\ngeometry.uv=uv;\nDECKGL_FILTER_COLOR(fragColor,geometry);\nif(bool(picking.isActive)&&!bool(picking.isAttribute)){\nfloat s=p(palette.n[0],palette.n[1],q);\nfloat As=Ap(Ad,raster.c,raster.d);\nfragColor=vec4(s,As,0,1);\n}\n}\n",modules:[...e.modules.filter((e=>"bitmap"!==e.name)),Ke,gt,ht]}}updateState(e){const{palette:t}=e.props;super.updateState(e),t!==e.oldProps.palette&&this._updatePalette()}draw(e){const{device:t,viewport:n}=this.context,{model:a}=this.state,{imageTexture:r,imageTexture2:o,imageSmoothing:i,imageInterpolation:A,imageWeight:s,imageType:l,imageUnscale:c,imageMinValue:g,imageMaxValue:u,bounds:p,_imageCoordinateSystem:d,transparentColor:m,minZoom:h,maxZoom:C,borderEnabled:I,borderWidth:v,borderColor:f,gridEnabled:E,gridSize:B,gridColor:y}=T(this.props,Ct),{paletteTexture:Q,paletteBounds:b}=this.state;if(!r)return;const w=ye(n);a&&be(n,h,C)&&(a.shaderInputs.setProps({[Ke.name]:{viewportGlobe:w,bounds:p,_imageCoordinateSystem:d,transparentColor:m},[gt.name]:{imageTexture:r??ve(t),imageTexture2:o??ve(t),imageSmoothing:i,imageInterpolation:A,imageWeight:s,imageType:l,imageUnscale:c,imageMinValue:g,imageMaxValue:u,borderEnabled:I,borderWidth:v,borderColor:f,gridEnabled:E,gridSize:B,gridColor:y},[ht.name]:{paletteTexture:Q??ve(t),paletteBounds:b}}),this.props.image=r,super.draw(e),this.props.image=null)}_updatePalette(){const{device:t}=this.context,{palette:n}=T(this.props,Ct);if(!n)return void this.setState({paletteTexture:void 0,paletteBounds:void 0});const a=e.parsePalette(n),{paletteBounds:r,paletteTexture:o}=Pe(t,a);this.setState({paletteTexture:o,paletteBounds:r})}_getRasterMagnitudeValue(e,t){return t[0]+e[0]/255*(t[1]-t[0])}_getRasterDirectionValue(e){const{imageType:t}=T(this.props,Ct);return t===R.VECTOR?e[1]/255*360:NaN}getPickingInfo(e){const t=super.getPickingInfo(e),{imageType:n}=T(this.props,Ct),{paletteBounds:a}=this.state;if(!t.color)return t;let r;const o=this._getRasterMagnitudeValue(t.color,a??[0,0]);if(n===R.VECTOR){r={value:o,direction:this._getRasterDirectionValue(t.color)}}else r={value:o};return t.raster=r,t}}It.layerName="RasterBitmapLayer",It.defaultProps=Ct;const vt={...It.defaultProps,imageTexture:void 0,imageTexture2:void 0,image:{type:"object",value:null},image2:{type:"object",value:null},bounds:{type:"array",value:[-180,-90,180,90],compare:!0}};class ft extends t.CompositeLayer{renderLayers(){const{device:e}=this.context,{props:n,imageTexture:a,imageTexture2:r}=this.state;return n&&a?[new It(this.props,this.getSubLayerProps({id:"bitmap",imageTexture:a,imageTexture2:r,_imageCoordinateSystem:t.COORDINATE_SYSTEM.LNGLAT,parameters:{cullMode:"back",depthCompare:"always",...this.props.parameters},image:ve(e),image2:ve(e)}))]:[]}updateState(e){const{image:t,image2:n,imageUnscale:a,bounds:r}=e.props;if(super.updateState(e),t&&a&&!(t.data instanceof Uint8Array||t.data instanceof Uint8ClampedArray))throw new Error("imageUnscale can be applied to Uint8 data only");if(t!==e.oldProps.image||n!==e.oldProps.image2){const{device:e}=this.context,{image:t,image2:n}=this.props,a=t?Ce(e,t,ge(r)):null,o=n?Ce(e,n,ge(r)):null;this.setState({imageTexture:a,imageTexture2:o})}this.setState({props:e.props})}}ft.layerName="RasterLayer",ft.defaultProps=vt;const Et="layout(std140)uniform contourUniforms{\nfloat t;\nfloat u;\nfloat v;\n}\ncontour;\n",Bt="t",yt="u",Qt="v";const bt={name:"contour",vs:Et,fs:Et,uniformTypes:{[Bt]:"f32",[yt]:"f32",[Qt]:"f32"},getUniforms:function(e={}){return{[Bt]:e.interval,[yt]:e.majorInterval,[Qt]:e.width}}},wt={imageTexture:{type:"object",value:null},imageTexture2:{type:"object",value:null},imageSmoothing:{type:"number",value:0},imageInterpolation:{type:"object",value:Z.CUBIC},imageWeight:{type:"number",value:0},imageType:{type:"object",value:R.SCALAR},imageUnscale:{type:"object",value:null},imageMinValue:{type:"object",value:null},imageMaxValue:{type:"object",value:null},bounds:{type:"array",value:[-180,-90,180,90],compare:!0},minZoom:{type:"object",value:null},maxZoom:{type:"object",value:10},palette:{type:"object",value:null},color:{type:"color",value:B},interval:{type:"number",value:0},majorInterval:{type:"number",value:0},width:{type:"number",value:1}};class xt extends n.BitmapLayer{getShaders(){const e=super.getShaders();return{...e,vs:e.vs.replaceAll("bitmap.coordinateConversion",`bitmap2.${ze}`),fs:"#version 300 es\n#define SHADER_NAME contour-bitmap-layer-fragment-shader\n#ifdef GL_ES\nprecision highp float;\n#endif\nvec4 AG(sampler2D AH,vec2 AI,vec2 AJ,vec2 AK){\nvec2 uv=(AJ+AK+0.5)/AI;\nreturn texture(AH,uv);\n}\nconst vec4 AL=vec4(3.,-6.,0.,4.)/6.;\nconst vec4 AM=vec4(-1.,6.,-12.,8.)/6.;\nvec4 AN(float J){\nreturn vec4(J*J*J,J*J,J,1.);\n}\nvec4 AO(vec4 AP,vec4 AQ,vec4 AR,vec4 AS,float AT){\nvec4 O=AP*dot(AM,AN(AT+1.))+AQ*dot(AL,AN(AT))+AR*dot(AL,AN(1.-AT))+AS*dot(AM,AN(2.-AT));\nO.a=(AP.a>0.&&AQ.a>0.&&AR.a>0.&&AS.a>0.)?max(max(max(AP.a,AQ.a),AR.a),AS.a):0.;\nreturn O;\n}\nvec4 AU(sampler2D AH,vec2 AI,vec2 uv){\nvec2 AV=uv*AI-0.5;\nvec2 AJ=floor(AV);\nvec2 AW=fract(AV);\nreturn AO(AO(AG(AH,AI,AJ,vec2(-1,-1)),AG(AH,AI,AJ,vec2(0,-1)),AG(AH,AI,AJ,vec2(1,-1)),AG(AH,AI,AJ,vec2(2,-1)),AW.x),AO(AG(AH,AI,AJ,vec2(-1,0)),AG(AH,AI,AJ,vec2(0,0)),AG(AH,AI,AJ,vec2(1,0)),AG(AH,AI,AJ,vec2(2,0)),AW.x),AO(AG(AH,AI,AJ,vec2(-1,1)),AG(AH,AI,AJ,vec2(0,1)),AG(AH,AI,AJ,vec2(1,1)),AG(AH,AI,AJ,vec2(2,1)),AW.x),AO(AG(AH,AI,AJ,vec2(-1,2)),AG(AH,AI,AJ,vec2(0,2)),AG(AH,AI,AJ,vec2(1,2)),AG(AH,AI,AJ,vec2(2,2)),AW.x),AW.y);\n}\nvec4 AX(sampler2D AH,vec2 AI,vec2 uv){\nvec2 AV=uv*AI-0.5;\nvec2 AJ=floor(AV);\nvec2 AW=fract(AV);\nreturn mix(mix(AG(AH,AI,AJ,vec2(0,0)),AG(AH,AI,AJ,vec2(1,0)),AW.x),mix(AG(AH,AI,AJ,vec2(0,1)),AG(AH,AI,AJ,vec2(1,1)),AW.x),AW.y);\n}\nvec4 AY(sampler2D AH,vec2 AI,vec2 uv){\nvec2 AV=uv*AI-0.5;\nvec2 AJ=floor(AV+0.5);\nreturn AG(AH,AI,AJ,vec2(0,0));\n}\nvec4 AZ(sampler2D AH,vec2 AI,float a,vec2 uv){\nif(a==2.){\nreturn AU(AH,AI,uv);\n}\nif(a==1.){\nreturn AX(AH,AI,uv);\n}\nelse{\nreturn AY(AH,AI,uv);\n}\n}\nvec4 Aa(sampler2D AH,sampler2D Ab,vec2 AI,float a,float b,bool B,vec2 uv){\nvec2 Ac;\nAc.x=B?uv.x+0.5/AI.x:mix(0.+0.5/AI.x,1.-0.5/AI.x,uv.x);\nAc.y=mix(0.+0.5/AI.y,1.-0.5/AI.y,uv.y);\nif(b>0.){\nvec4 Ad=AZ(AH,AI,a,Ac);\nvec4 Ae=AZ(Ab,AI,a,Ac);\nreturn mix(Ad,Ae,b);\n}\nelse{\nreturn AZ(AH,AI,a,Ac);\n}\n}\nvec4 Af(sampler2D AH,sampler2D Ab,vec2 Y,float Z,float a,float b,bool B,vec2 uv){\nfloat Ag=1.+max(0.,Z);\nvec2 AI=Y/Ag;\nreturn Aa(AH,Ab,AI,a,b,B,uv);\n}\nconst float Ah=3.1415926536;\nfloat Ai(float K,float J){\nreturn J==0.?sign(K)*Ah/2.:atan(K,J);\n}\nbool Aj(float q){\nuint Ak=floatBitsToUint(q);\nreturn(Ak&0x7fffffffu)>0x7f800000u;\n}\nbool Al(vec4 Ad,vec2 d){\nif(d[0]<d[1]){\nreturn Ad.a>=1.;\n}\nelse{\nreturn!Aj(Ad.x);\n}\n}\nfloat Am(vec4 Ad,float c,vec2 d){\nif(c==1.){\nreturn 0.;\n}\nelse{\nif(d[0]<d[1]){\nreturn mix(d[0],d[1],Ad.x);\n}\nelse{\nreturn Ad.x;\n}\n}\n}\nvec2 An(vec4 Ad,float c,vec2 d){\nif(c==1.){\nif(d[0]<d[1]){\nreturn mix(vec2(d[0]),vec2(d[1]),Ad.xy);\n}\nelse{\nreturn Ad.xy;\n}\n}\nelse{\nreturn vec2(0.);\n}\n}\nfloat Ao(vec4 Ad,float c,vec2 d){\nif(c==1.){\nvec2 q=An(Ad,c,d);\nreturn length(q);\n}\nelse{\nreturn Am(Ad,c,d);\n}\n}\nfloat Ap(vec4 Ad,float c,vec2 d){\nif(c==1.){\nvec2 q=An(Ad,c,d);\nreturn mod((360.-(Ai(q.y,q.x)/Ah*180.+180.))-270.,360.)/360.;\n}\nelse{\nreturn 0.;\n}\n}\nin vec2 vTexCoord;\nin vec2 vTexPos;\nout vec4 fragColor;\nvoid main(void){\nvec2 uv=S(vTexCoord,vTexPos);\nvec4 Ad=Af(W,X,raster.Y,raster.Z,raster.a,raster.b,bitmap2.B,uv);\nif(!Al(Ad,raster.d)){\ndiscard;\n}\nfloat q=Ao(Ad,raster.c,raster.d);\nif((!Aj(raster.e)&&q<raster.e)||(!Aj(raster.f)&&q>raster.f)){\ndiscard;\n}\nfloat Aq=contour.u>contour.t?floor(contour.u/contour.t):1.;\nfloat Ar=q/contour.t;\nfloat As=(step(fract(Ar/Aq),0.1)+1.)/2.;\nfloat At=contour.v*As;\nfloat Au=abs(fract(Ar+0.5)-0.5);\nfloat Av=length(vec2(dFdx(Ar),dFdy(Ar)));\nfloat Aw=1.-clamp((Au/Av)+0.5-At,0.,1.);\nif(Av==0.){\nAw=0.;\n}\nfloat Ax=Aw*As;\nvec4 Ay=r(m,palette.n,palette.o,q);\nfragColor=vec4(Ay.rgb,Ay.a*Ax*layer.opacity);\ngeometry.uv=uv;\nDECKGL_FILTER_COLOR(fragColor,geometry);\n}\n",modules:[...e.modules.filter((e=>"bitmap"!==e.name)),Ke,gt,ht,bt]}}updateState(e){const{palette:t}=e.props;super.updateState(e),t!==e.oldProps.palette&&this._updatePalette()}draw(e){const{device:t,viewport:n}=this.context,{model:a}=this.state,{imageTexture:r,imageTexture2:o,imageSmoothing:i,imageInterpolation:A,imageWeight:s,imageType:l,imageUnscale:c,imageMinValue:g,imageMaxValue:u,bounds:p,_imageCoordinateSystem:d,transparentColor:m,minZoom:h,maxZoom:C,color:I,interval:v,majorInterval:f,width:E}=T(this.props,wt),{paletteTexture:B,paletteBounds:y}=this.state;if(!r)return;const Q=ye(n);a&&be(n,h,C)&&(a.shaderInputs.setProps({[Ke.name]:{viewportGlobe:Q,bounds:p,_imageCoordinateSystem:d,transparentColor:m},[gt.name]:{imageTexture:r??ve(t),imageTexture2:o??ve(t),imageSmoothing:i,imageInterpolation:A,imageWeight:s,imageType:l,imageUnscale:c,imageMinValue:g,imageMaxValue:u},[ht.name]:{paletteTexture:B??ve(t),paletteBounds:y,paletteColor:I},[bt.name]:{interval:v,majorInterval:f,width:E}}),this.props.image=r,super.draw(e),this.props.image=null)}_updatePalette(){const{device:t}=this.context,{palette:n}=T(this.props,wt);if(!n)return void this.setState({paletteTexture:void 0,paletteBounds:void 0});const a=e.parsePalette(n),{paletteBounds:r,paletteTexture:o}=Pe(t,a);this.setState({paletteTexture:o,paletteBounds:r})}}xt.layerName="ContourBitmapLayer",xt.defaultProps=wt;const Tt={...xt.defaultProps,imageTexture:void 0,imageTexture2:void 0,image:{type:"object",value:null},image2:{type:"object",value:null}};class Mt extends t.CompositeLayer{renderLayers(){const{device:e}=this.context,{props:n,imageTexture:a,imageTexture2:r}=this.state;return n&&a?[new xt(this.props,this.getSubLayerProps({id:"bitmap",imageTexture:a,imageTexture2:r,_imageCoordinateSystem:t.COORDINATE_SYSTEM.LNGLAT,parameters:{cullMode:"back",depthCompare:"always",...this.props.parameters},image:ve(e),image2:ve(e)}))]:[]}updateState(e){const{image:t,image2:n,imageUnscale:a,bounds:r}=e.props;if(super.updateState(e),t&&a&&!(t.data instanceof Uint8Array||t.data instanceof Uint8ClampedArray))throw new Error("imageUnscale can be applied to Uint8 data only");if(t!==e.oldProps.image||n!==e.oldProps.image2){const{device:e}=this.context,{image:t,image2:n}=this.props,a=t?Ce(e,t,ge(r)):null,o=n?Ce(e,n,ge(r)):null;this.setState({imageTexture:a,imageTexture2:o})}this.setState({props:e.props})}}Mt.layerName="ContourLayer",Mt.defaultProps=Tt;const Ot="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";function St(e=20){return new Array(e).fill(void 0).map((()=>Ot.charAt(Math.floor(62*Math.random())))).join("")}const Pt=i.transform((Lt=function(){const e=Symbol("Comlink.proxy"),t=Symbol("Comlink.endpoint"),n=Symbol("Comlink.releaseProxy"),a=Symbol("Comlink.finalizer"),r=Symbol("Comlink.thrown"),o=e=>"object"==typeof e&&null!==e||"function"==typeof e,i={canHandle:t=>o(t)&&t[e],serialize(e){const{port1:t,port2:n}=new MessageChannel;return s(e,t),[n,[n]]},deserialize:e=>(e.start(),function(e,t){const n=new Map;return e.addEventListener("message",(function(e){const{data:t}=e;if(!t||!t.id)return;const a=n.get(t.id);if(a)try{a(t)}finally{n.delete(t.id)}})),d(e,n,[],t)}(e))},A=new Map([["proxy",i],["throw",{canHandle:e=>o(e)&&r in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function s(t,n=globalThis,o=["*"]){n.addEventListener("message",(function i(A){if(!A||!A.data)return;if(!function(e,t){for(const n of e){if(t===n||"*"===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}return!1}(o,A.origin))return void console.warn(`Invalid origin '${A.origin}' for comlink proxy`);const{id:c,type:g,path:u}=Object.assign({path:[]},A.data),p=(A.data.argumentList||[]).map(v);let d;try{const n=u.slice(0,-1).reduce(((e,t)=>e[t]),t),a=u.reduce(((e,t)=>e[t]),t);switch(g){case"GET":d=a;break;case"SET":n[u.slice(-1)[0]]=v(A.data.value),d=!0;break;case"APPLY":d=a.apply(n,p);break;case"CONSTRUCT":d=function(t){return Object.assign(t,{[e]:!0})}(new a(...p));break;case"ENDPOINT":{const{port1:e,port2:n}=new MessageChannel;s(t,n),d=C(e,[e])}break;case"RELEASE":d=void 0;break;default:return}}catch(e){d={value:e,[r]:0}}Promise.resolve(d).catch((e=>({value:e,[r]:0}))).then((e=>{const[r,o]=I(e);n.postMessage(Object.assign(Object.assign({},r),{id:c}),o),"RELEASE"===g&&(n.removeEventListener("message",i),l(n),a in t&&"function"==typeof t[a]&&t[a]())})).catch((e=>{const[t,a]=I({value:new TypeError("Unserializable return value"),[r]:0});n.postMessage(Object.assign(Object.assign({},t),{id:c}),a)}))})),n.start&&n.start()}function l(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function c(e){if(e)throw new Error("Proxy has been released and is not useable")}function g(e){return f(e,new Map,{type:"RELEASE"}).then((()=>{l(e)}))}const u=new WeakMap,p="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(u.get(e)||0)-1;u.set(e,t),0===t&&g(e)}));function d(e,a,r=[],o=function(){}){let i=!1;const A=new Proxy(o,{get(t,o){if(c(i),o===n)return()=>{!function(e){p&&p.unregister(e)}(A),g(e),a.clear(),i=!0};if("then"===o){if(0===r.length)return{then:()=>A};const t=f(e,a,{type:"GET",path:r.map((e=>e.toString()))}).then(v);return t.then.bind(t)}return d(e,a,[...r,o])},set(t,n,o){c(i);const[A,s]=I(o);return f(e,a,{type:"SET",path:[...r,n].map((e=>e.toString())),value:A},s).then(v)},apply(n,o,A){c(i);const s=r[r.length-1];if(s===t)return f(e,a,{type:"ENDPOINT"}).then(v);if("bind"===s)return d(e,a,r.slice(0,-1));const[l,g]=m(A);return f(e,a,{type:"APPLY",path:r.map((e=>e.toString())),argumentList:l},g).then(v)},construct(t,n){c(i);const[o,A]=m(n);return f(e,a,{type:"CONSTRUCT",path:r.map((e=>e.toString())),argumentList:o},A).then(v)}});return function(e,t){const n=(u.get(t)||0)+1;u.set(t,n),p&&p.register(e,t,e)}(A,e),A}function m(e){const t=e.map(I);return[t.map((e=>e[0])),(n=t.map((e=>e[1])),Array.prototype.concat.apply([],n))];var n}const h=new WeakMap;function C(e,t){return h.set(e,t),e}function I(e){for(const[t,n]of A)if(n.canHandle(e)){const[a,r]=n.serialize(e);return[{type:"HANDLER",name:t,value:a},r]}return[{type:"RAW",value:e},h.get(e)||[]]}function v(e){switch(e.type){case"HANDLER":return A.get(e.name).deserialize(e.value);case"RAW":return e.value}}function f(e,t,n,a){return new Promise((r=>{const o=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.set(o,r),e.start&&e.start(),e.postMessage(Object.assign({id:o},n),a)}))}const E=6371e3;function B(e){return e/180*Math.PI}const y=6370972;function Q(e,t){return function(e,t,n=E){const a=n,r=B(e[1]),o=B(e[0]),i=B(t[1]),A=i-r,s=B(t[0])-o,l=Math.sin(A/2)*Math.sin(A/2)+Math.cos(r)*Math.cos(i)*Math.sin(s/2)*Math.sin(s/2);return a*(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)))}(e,t,y)}const b={NEAREST:"NEAREST",LINEAR:"LINEAR",CUBIC:"CUBIC"},w={VECTOR:"VECTOR"};function x(e){return e%1}function T(e,t){return e.map(((n,a)=>e[a]+t[a]))}function M(e,t){return e.map(((n,a)=>e[a]*t))}function O(e,t){return e.map(((n,a)=>e[a]*t[a])).reduce(((e,t)=>e+t))}function S(e,t,n){return e===t?e:e*(1-n)+t*n}function P(e,t,n){return e.map(((a,r)=>S(e[r],t[r],n)))}function L(e,t){return t?e[3]>=255:!isNaN(e[0])}function V(e,t,n){if(t===w.VECTOR){const a=function(e,t,n){return t===w.VECTOR?n?[S(n[0],n[1],e[0]/255),S(n[0],n[1],e[1]/255)]:[e[0],e[1]]:[NaN,NaN]}(e,t,n);return Math.hypot(a[0],a[1])}return function(e,t,n){return t===w.VECTOR?0:n?S(n[0],n[1],e[0]/255):e[0]}(e,t,n)}function D(e,t,n,a,r,o){const{data:i,width:A,height:s}=e,l=i.length/(A*s),c=(n+r+.5)/t[0],g=(a+o+.5)/t[1],u=Math.max(0,Math.min(A-1,Math.floor(c*A))),p=Math.max(0,Math.min(s-1,Math.floor(g*s)));return new Array(l).fill(void 0).map(((e,t)=>i[(u+p*A)*l+t]))}const N=[3,-6,0,4].map((e=>e/6)),U=[-1,6,-12,8].map((e=>e/6));function J(e){return[e*e*e,e*e,e,1]}function F(e,t,n,a,r){const o=T(T(T(M(e,O(U,J(r+1))),M(t,O(N,J(r)))),M(n,O(N,J(1-r)))),M(a,O(U,J(2-r))));return o[3]=e[3]>0&&t[3]>0&&n[3]>0&&a[3]>0?Math.max(Math.max(Math.max(e[3],t[3]),n[3]),a[3]):0,o}function Z(e,t,n,a,r){return n===b.CUBIC?function(e,t,n,a){const r=n*t[0]-.5,o=a*t[1]-.5,i=Math.floor(r),A=Math.floor(o),s=x(r),l=x(o);return F(F(D(e,t,i,A,-1,-1),D(e,t,i,A,0,-1),D(e,t,i,A,1,-1),D(e,t,i,A,2,-1),s),F(D(e,t,i,A,-1,0),D(e,t,i,A,0,0),D(e,t,i,A,1,0),D(e,t,i,A,2,0),s),F(D(e,t,i,A,-1,1),D(e,t,i,A,0,1),D(e,t,i,A,1,1),D(e,t,i,A,2,1),s),F(D(e,t,i,A,-1,2),D(e,t,i,A,0,2),D(e,t,i,A,1,2),D(e,t,i,A,2,2),s),l)}(e,t,a,r):n===b.LINEAR?function(e,t,n,a){const r=n*t[0]-.5,o=a*t[1]-.5,i=Math.floor(r),A=Math.floor(o),s=x(r),l=x(o);return P(P(D(e,t,i,A,0,0),D(e,t,i,A,1,0),s),P(D(e,t,i,A,0,1),D(e,t,i,A,1,1),s),l)}(e,t,a,r):function(e,t,n,a){const r=n*t[0]-.5,o=a*t[1]-.5;return D(e,t,Math.round(r),Math.round(o),0,0)}(e,t,a,r)}function R(e,t,n,a,r,o,i,A){const s=o?i+.5/n[0]:S(0+.5/n[0],1-.5/n[0],i),l=S(0+.5/n[1],1-.5/n[1],A);return t&&r>0?P(Z(e,n,a,s,l),Z(t,n,a,s,l),r):Z(e,n,a,s,l)}function q(e,t){const{image:n,image2:a,imageSmoothing:r,imageInterpolation:o,imageWeight:i,imageType:A,imageUnscale:s,imageMinValue:l,imageMaxValue:c}=e,{width:g,height:u}=n,p=o!==b.NEAREST?b.NEAREST:o,d=function(e,t,n){const a=1+Math.max(0,n);return[e/a,t/a]}(g,u,r),m=function(e){return e[2]-e[0]==360}(t),h=new Float32Array(g*u);for(let e=0;e<u;e++)for(let t=0;t<g;t++){const r=t+e*g,o=R(n,a,d,p,i,m,t/g,e/u);if(!L(o,s)){h[r]=NaN;continue}const C=V(o,A,s);"number"==typeof l&&!isNaN(l)&&C<l||"number"==typeof c&&!isNaN(c)&&C>c?h[r]=NaN:h[r]=C}return{data:h,width:g,height:u}}function W(e,t,n){let{data:a,width:r,height:o}=e;const i=1e3*n,A=function(e,t,n){const a=[n[0],n[3]],r=(n[2]-n[0])/e,o=(n[3]-n[1])/t;return e=>{const[t,n]=e;return[a[0]+t*r,a[1]-n*o]}}(r,o,t);a=function(e,t,n){const a=new Float32Array(e.length);for(let r=0;r<n;r++)for(let o=0;o<t;o++){const i=o+r*t;if(o>=1&&o<=t-2&&r>=1&&r<=n-2){const n=[e[o-1+(r-1)*t],e[o+(r-1)*t],e[o+1+(r-1)*t],e[o-1+r*t],e[o+r*t],e[o+1+r*t],e[o-1+(r+1)*t],e[o+(r+1)*t],e[o+1+(r-1)*t]];a[i]=n.reduce(((e,t)=>e+t),0)/n.length}else a[i]=e[i]}return a}(a,r,o);let s=[],l=[];for(let e=1;e<o-1;e++)for(let t=1;t<r-1;t++){const n=a[t+e*r];if(!isNaN(n)&&n>=a[t+1+e*r]&&n>=a[t+1+(e+1)*r]&&n>=a[t+(e+1)*r]&&n>=a[t-1+(e+1)*r]&&n>a[t-1+e*r]&&n>a[t-1+(e-1)*r]&&n>a[t+(e-1)*r]&&n>a[t+1+(e-1)*r]){const a=A([t,e]);s.push({position:a,value:n})}if(!isNaN(n)&&n<=a[t+1+e*r]&&n<=a[t+1+(e+1)*r]&&n<=a[t+(e+1)*r]&&n<=a[t-1+(e+1)*r]&&n<a[t-1+e*r]&&n<a[t-1+(e-1)*r]&&n<a[t+(e-1)*r]&&n<a[t+1+(e-1)*r]){const a=A([t,e]);l.push({position:a,value:n})}}s=s.sort(((e,t)=>t.value-e.value)),l=l.sort(((e,t)=>e.value-t.value));const c=[...s];for(let e=0;e<c.length;e++){const t=c[e];if(t)for(let n=e+1;n<c.length;n++){const e=c[n];e&&Q(t.position,e.position)<i&&(c[n]=void 0)}}s=c.filter((e=>!!e));const g=[...l];for(let e=0;e<g.length;e++){const t=g[e];if(t)for(let n=e+1;n<g.length;n++){const e=g[n];e&&Q(t.position,e.position)<i&&(g[n]=void 0)}}return l=g.filter((e=>!!e)),new Float32Array([s.length,...s.map((e=>[...e.position,e.value])).flat(),l.length,...l.map((e=>[...e.position,e.value])).flat()])}s({getHighLowPointData(e,t,n,a,r,o,i,A,s,l,c,g,u,p,d){const m=function(e,t,n){return W(q(e,t),t,n)}({image:{data:e,width:t,height:n},image2:a?{data:a,width:r,height:o}:null,imageSmoothing:i,imageInterpolation:A,imageWeight:s,imageType:l,imageUnscale:c,imageMinValue:g,imageMaxValue:u},p,d);return C(m,[m.buffer])}})},Lt.toString().replace(/^function.+?{/,"").slice(0,-1)));var Lt,Vt=i.factory(Pt);const Dt={LOW:"L",HIGH:"H"},Nt=o.wrap(Vt());function Ut(e,t){return{type:"Feature",geometry:{type:"Point",coordinates:e},properties:t}}async function Jt(e,t,n){const{image:a,image2:r,imageSmoothing:i,imageInterpolation:A,imageWeight:s,imageType:l,imageUnscale:c,imageMinValue:g,imageMaxValue:u}=e,{data:p,width:d,height:m}=a,{data:h=null,width:C=null,height:I=null}=r||{},v=p.slice(0),f=h?h.slice(0):null,E=function(e){let t=0;const n=[],a=e[t++];for(let r=0;r<a;r++){const a=[e[t++],e[t++]],r=e[t++];n.push(Ut(a,{type:Dt.HIGH,value:r}))}const r=e[t++];for(let a=0;a<r;a++){const a=[e[t++],e[t++]],r=e[t++];n.push(Ut(a,{type:Dt.LOW,value:r}))}return n}(await Nt.getHighLowPointData(o.transfer(v,[v.buffer]),d,m,f?o.transfer(f,[f.buffer]):null,C,I,i,A,s,l,c,g,u,t,n));return{type:"FeatureCollection",features:E}}const Ft="high-low-label";function Zt(e,t,n){return e.properties.type===Dt.HIGH?Math.round((e.properties.value-n)/n*100):Math.round((t-e.properties.value)/t*100)}const Rt={image:{type:"object",value:null},image2:{type:"object",value:null},imageSmoothing:{type:"number",value:0},imageInterpolation:{type:"object",value:Z.CUBIC},imageWeight:{type:"number",value:0},imageType:{type:"object",value:R.SCALAR},imageUnscale:{type:"array",value:null},imageMinValue:{type:"object",value:null},imageMaxValue:{type:"object",value:null},bounds:{type:"array",value:[-180,-90,180,90],compare:!0},minZoom:{type:"object",value:null},maxZoom:{type:"object",value:null},radius:{type:"number",value:0},unitFormat:{type:"object",value:null},textFormatFunction:{type:"function",value:w},textFontFamily:{type:"object",value:y},textSize:{type:"number",value:12},textColor:{type:"color",value:Q},textOutlineWidth:{type:"number",value:1},textOutlineColor:{type:"color",value:b},palette:{type:"object",value:null}};class qt extends t.CompositeLayer{renderLayers(){const{viewport:e}=this.context,{props:t,points:r,minValue:o,maxValue:i}=this.state;if(!t||!r||"number"!=typeof o||"number"!=typeof i)return[];const{unitFormat:A,textFormatFunction:s,textFontFamily:l,textSize:c,textColor:g,textOutlineWidth:u,textOutlineColor:p}=T(t,Rt),{paletteScale:d}=this.state;return[new n.TextLayer(this.getSubLayerProps({id:"type",data:r,getPixelOffset:[0,-Oe(e,1.2*c/2)],getPosition:e=>e.geometry.coordinates,getText:e=>e.properties.type,getSize:1.2*c,getColor:e=>d?Ve(d(e.properties.value).rgba()):g,getAngle:Se(e,0),outlineWidth:u,outlineColor:p,fontFamily:l,fontSettings:{sdf:!0},billboard:!1,extensions:[new a.CollisionFilterExtension],collisionEnabled:!0,collisionGroup:Ft,collisionTestProps:{sizeScale:5},getCollisionPriority:e=>Zt(e,o,i),parameters:{cullMode:"front",depthCompare:"always",...this.props.parameters}})),new n.TextLayer(this.getSubLayerProps({id:"value",data:r,getPixelOffset:[0,Oe(e,1.2*c/2)],getPosition:e=>e.geometry.coordinates,getText:e=>s(e.properties.value,A),getSize:c,getColor:e=>d?Ve(d(e.properties.value).rgba()):g,getAngle:Se(e,0),outlineWidth:u,outlineColor:p,fontFamily:l,fontSettings:{sdf:!0},billboard:!1,extensions:[new a.CollisionFilterExtension],collisionEnabled:!0,collisionGroup:Ft,collisionTestProps:{sizeScale:5},getCollisionPriority:e=>Zt(e,o,i),parameters:{cullMode:"front",depthCompare:"always",...this.props.parameters}}))]}filterSubLayer(e){const{viewport:t}=e,{minZoom:n,maxZoom:a}=T(this.props,Rt);return be(t,n,a)}updateState(e){const{image:t,image2:n,imageSmoothing:a,imageInterpolation:r,imageWeight:o,imageType:i,imageUnscale:A,imageMinValue:s,imageMaxValue:l,radius:c,unitFormat:g,textFormatFunction:u,textFontFamily:p,textSize:d,textColor:m,textOutlineWidth:h,textOutlineColor:C,palette:I,visible:v}=e.props;super.updateState(e),c&&v?(t===e.oldProps.image&&n===e.oldProps.image2&&a===e.oldProps.imageSmoothing&&r===e.oldProps.imageInterpolation&&o===e.oldProps.imageWeight&&i===e.oldProps.imageType&&A===e.oldProps.imageUnscale&&s===e.oldProps.imageMinValue&&l===e.oldProps.imageMaxValue&&c===e.oldProps.radius&&v===e.oldProps.visible||this._updateFeatures(),I!==e.oldProps.palette&&this._updatePalette(),g===e.oldProps.unitFormat&&u===e.oldProps.textFormatFunction&&p===e.oldProps.textFontFamily&&d===e.oldProps.textSize&&m===e.oldProps.textColor&&h===e.oldProps.textOutlineWidth&&C===e.oldProps.textOutlineColor||this._redrawVisibleFeatures(),this.setState({props:e.props})):this.setState({points:void 0,minValue:void 0,maxValue:void 0})}async _updateFeatures(){const{image:e,image2:t,imageSmoothing:n,imageInterpolation:a,imageType:r,imageUnscale:o,imageMinValue:i,imageMaxValue:A,imageWeight:s,bounds:l,radius:c}=T(this.props,Rt);if(!e)return;const g=St();this.state.requestId=g;const u={image:e,image2:t,imageSmoothing:n,imageInterpolation:a,imageWeight:s,imageType:r,imageUnscale:o,imageMinValue:i,imageMaxValue:A},p=(await Jt(u,l,c)).features;if(this.state.requestId!==g)return;const d=p.map((e=>e.properties.value)),m=Math.min(...d),h=Math.max(...d);this.setState({points:p,minValue:m,maxValue:h})}_updatePalette(){const{palette:t}=T(this.props,Rt);if(!t)return this.setState({paletteScale:void 0}),void this._redrawVisibleFeatures();const n=e.parsePalette(t);this.setState({paletteScale:n}),this._redrawVisibleFeatures()}_redrawVisibleFeatures(){this.setState({points:Array.isArray(this.state.points)?Array.from(this.state.points):this.state.points})}}qt.layerName="HighLowCompositeLayer",qt.defaultProps=Rt;const Wt={...qt.defaultProps};class kt extends t.CompositeLayer{renderLayers(){const{props:e}=this.state;return e?[new qt(this.props,this.getSubLayerProps({id:"composite"}))]:[]}updateState(e){const{image:t,imageUnscale:n}=e.props;if(super.updateState(e),t&&n&&!(t.data instanceof Uint8Array||t.data instanceof Uint8ClampedArray))throw new Error("imageUnscale can be applied to Uint8 data only");this.setState({props:e.props})}}kt.layerName="HighLowLayer",kt.defaultProps=Wt;const Gt={COLD:"COLD",WARM:"WARM",OCCLUDED:"OCCLUDED",STATIONARY:"STATIONARY"},Kt={iconAtlas:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGoAAAAqCAYAAABbec77AAAFsmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS41LjAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iCiAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgeG1wOkNyZWF0ZURhdGU9IjIwMjMtMDMtMTBUMTQ6NDI6NTYrMDEwMCIKICAgeG1wOk1vZGlmeURhdGU9IjIwMjMtMDMtMjVUMDk6MDY6NTgrMDE6MDAiCiAgIHhtcDpNZXRhZGF0YURhdGU9IjIwMjMtMDMtMjVUMDk6MDY6NTgrMDE6MDAiCiAgIHBob3Rvc2hvcDpEYXRlQ3JlYXRlZD0iMjAyMy0wMy0xMFQxNDo0Mjo1NiswMTAwIgogICBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIgogICBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEi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",iconMapping:{COLD:{x: