wacomm 1.13.4 → 1.13.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buttons/StyledButton.d.ts +3 -2
- package/dist/{index-DnKsImP2.mjs → index-BE2rsDbE.mjs} +98212 -63970
- package/dist/index-C_F8-HpP.js +2342 -0
- package/dist/{mapbox-gl-CpS2lt4x-Ha5Bvx4z-BjI9cadM-sSIfaObk-Cx1387Dz-BeFoufHt-CEfk48DH.js → mapbox-gl-B2IX9o8Y-CE7wLw_z-B8satkFj-DdlMNPco-Daw-5hP--DM4NNJ5E-0ihyYnQQ.js} +2 -2
- package/dist/{mapbox-gl-CpS2lt4x-Ha5Bvx4z-BjI9cadM-sSIfaObk-Cx1387Dz-BeFoufHt-D4DPQwhs.mjs → mapbox-gl-B2IX9o8Y-CE7wLw_z-B8satkFj-DdlMNPco-Daw-5hP--DM4NNJ5E-CZqhkwcx.mjs} +1 -1
- package/dist/{mapbox-gl-CEqI7hN1-BkVcvhIg-Bm84Fd-v-Qjpa1YMH.mjs → mapbox-gl-BvoXJzph-BTEf7DFf-DGBvmgTz-BFYU_JRM.mjs} +1 -1
- package/dist/{mapbox-gl-CEqI7hN1-BkVcvhIg-Bm84Fd-v-Ez_-PKHN.js → mapbox-gl-BvoXJzph-BTEf7DFf-DGBvmgTz-Dw-Rg0dH.js} +2 -2
- package/dist/{mapbox-gl-D-aOG1nl-CwOZ8-NK-BSpWJB4t-DtC3xNh5-D4NE4dQe.mjs → mapbox-gl-CEqI7hN1-BkVcvhIg-Bm84Fd-v-Qjpa1YMH-Bfxn5yUU.mjs} +1 -1
- package/dist/{mapbox-gl-D-aOG1nl-CwOZ8-NK-BSpWJB4t-DtC3xNh5-AsF5YlZm.js → mapbox-gl-CEqI7hN1-BkVcvhIg-Bm84Fd-v-Qjpa1YMH-Bj_Ln51s.js} +2 -2
- package/dist/mapbox-gl-CKOeLeTf-DPo4M4jw-27-CdDnq-CBuXJegs-aacneuy_-CKYABPJi-1QomBKyc-oQolCIcN-D1hs5odJ.js +2661 -0
- package/dist/mapbox-gl-CKOeLeTf-DPo4M4jw-27-CdDnq-CBuXJegs-aacneuy_-CKYABPJi-1QomBKyc-oQolCIcN-N5dxdeRI.mjs +33296 -0
- package/dist/{mapbox-gl-CKOeLeTf-DPo4M4jw-27-CdDnq-CBuXJegs-aacneuy_-CKYABPJi-1QomBKyc-YRXv0Kgy.js → mapbox-gl-CpS2lt4x-Ha5Bvx4z-BjI9cadM-sSIfaObk-Cx1387Dz-BeFoufHt-D4DPQwhs-BLCZKUHk.js} +2 -2
- package/dist/{mapbox-gl-CKOeLeTf-DPo4M4jw-27-CdDnq-CBuXJegs-aacneuy_-CKYABPJi-1QomBKyc-oQolCIcN.mjs → mapbox-gl-CpS2lt4x-Ha5Bvx4z-BjI9cadM-sSIfaObk-Cx1387Dz-BeFoufHt-D4DPQwhs-pfeNxrWn.mjs} +1 -1
- package/dist/{mapbox-gl-B2IX9o8Y-CE7wLw_z-B8satkFj-DdlMNPco-Daw-5hP--DiJ0OGn8.js → mapbox-gl-D-aOG1nl-CwOZ8-NK-BSpWJB4t-DtC3xNh5-D4NE4dQe-C4Yp43Jg.js} +2 -2
- package/dist/{mapbox-gl-B2IX9o8Y-CE7wLw_z-B8satkFj-DdlMNPco-Daw-5hP--DM4NNJ5E.mjs → mapbox-gl-D-aOG1nl-CwOZ8-NK-BSpWJB4t-DtC3xNh5-D4NE4dQe-E7CH-Vqh.mjs} +1 -1
- package/dist/{mapbox-gl-BItIfMIk.js → mapbox-gl-DBIDWslD.js} +1 -1
- package/dist/{mapbox-gl-YTLflCS_-BEwVFcb-.js → mapbox-gl-DduunXKc-DPdaTa6V.js} +2 -2
- package/dist/{mapbox-gl-YTLflCS_-CP4AyTpc.mjs → mapbox-gl-DduunXKc-nAkhtFYc.mjs} +1 -1
- package/dist/{mapbox-gl-DduunXKc.mjs → mapbox-gl-DsBseZ7R.mjs} +1 -1
- package/dist/{mapbox-gl-BvoXJzph-BTEf7DFf-DGBvmgTz.mjs → mapbox-gl-YTLflCS_-CP4AyTpc-D6mrmvc-.mjs} +1 -1
- package/dist/{mapbox-gl-BvoXJzph-BTEf7DFf-CWwM-UsC.js → mapbox-gl-YTLflCS_-CP4AyTpc-obNFUPF5.js} +2 -2
- package/dist/wacomm.cjs.js +1 -1
- package/dist/wacomm.es.js +37 -37
- package/package.json +1 -1
- package/dist/index-Dq5bULav.js +0 -2098
package/dist/{mapbox-gl-BvoXJzph-BTEf7DFf-CWwM-UsC.js → mapbox-gl-YTLflCS_-CP4AyTpc-obNFUPF5.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const eb=require("./index-Dq5bULav.js");function tb(rh,Zp){for(var Ys=0;Ys<Zp.length;Ys++){const $o=Zp[Ys];if(typeof $o!="string"&&!Array.isArray($o)){for(const Ks in $o)if(Ks!=="default"&&!(Ks in rh)){const La=Object.getOwnPropertyDescriptor($o,Ks);La&&Object.defineProperty(rh,Ks,La.get?La:{enumerable:!0,get:()=>$o[Ks]})}}}return Object.freeze(Object.defineProperty(rh,Symbol.toStringTag,{value:"Module"}))}var Wp={exports:{}},ib=Wp.exports,Nx;function rb(){return Nx||(Nx=1,function(rh,Zp){(function(Ys,$o){rh.exports=$o()})(ib,function(){"use strict";var Ys,$o,Ks;function La(n,Rr){if(!Ys)Ys=Rr;else if(!$o)$o=Rr;else{var qi="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+Ys+")(sharedChunk); ("+$o+")(sharedChunk); self.onerror = null;",Yo={};Ys(Yo),Ks=Rr(Yo),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(Ks.workerUrl=window.URL.createObjectURL(new Blob([qi],{type:"text/javascript"})))}}La(["exports"],function(n){var Rr=1e-6,qi=typeof Float32Array<"u"?Float32Array:Array;function Yo(r,e){var i=e[0],s=e[1],a=e[2],h=e[3],u=i*h-a*s;return u?(r[0]=h*(u=1/u),r[1]=-s*u,r[2]=-a*u,r[3]=i*u,r):null}function Fl(){var r=new qi(9);return qi!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r}function Qs(r,e){var i=e[0],s=e[1],a=e[2],h=e[3],u=e[4],f=e[5],_=e[6],g=e[7],v=e[8];return r[0]=u*v-f*g,r[1]=a*g-s*v,r[2]=s*f-a*u,r[3]=f*_-h*v,r[4]=i*v-a*_,r[5]=a*h-i*f,r[6]=h*g-u*_,r[7]=s*_-i*g,r[8]=i*u-s*h,r}function Fo(r,e,i){var s=e[0],a=e[1],h=e[2],u=e[3],f=e[4],_=e[5],g=e[6],v=e[7],b=e[8],T=i[0],A=i[1],M=i[2],P=i[3],k=i[4],F=i[5],q=i[6],j=i[7],z=i[8];return r[0]=T*s+A*u+M*g,r[1]=T*a+A*f+M*v,r[2]=T*h+A*_+M*b,r[3]=P*s+k*u+F*g,r[4]=P*a+k*f+F*v,r[5]=P*h+k*_+F*b,r[6]=q*s+j*u+z*g,r[7]=q*a+j*f+z*v,r[8]=q*h+j*_+z*b,r}function Js(){var r=new qi(16);return qi!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0),r[0]=1,r[5]=1,r[10]=1,r[15]=1,r}function Ut(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function Wr(r,e){var i=e[0],s=e[1],a=e[2],h=e[3],u=e[4],f=e[5],_=e[6],g=e[7],v=e[8],b=e[9],T=e[10],A=e[11],M=e[12],P=e[13],k=e[14],F=e[15],q=i*f-s*u,j=i*_-a*u,z=i*g-h*u,N=s*_-a*f,G=s*g-h*f,Z=a*g-h*_,re=v*P-b*M,ne=v*k-T*M,ae=v*F-A*M,de=b*k-T*P,xe=b*F-A*P,Ve=T*F-A*k,De=q*Ve-j*xe+z*de+N*ae-G*ne+Z*re;return De?(r[0]=(f*Ve-_*xe+g*de)*(De=1/De),r[1]=(a*xe-s*Ve-h*de)*De,r[2]=(P*Z-k*G+F*N)*De,r[3]=(T*G-b*Z-A*N)*De,r[4]=(_*ae-u*Ve-g*ne)*De,r[5]=(i*Ve-a*ae+h*ne)*De,r[6]=(k*z-M*Z-F*j)*De,r[7]=(v*Z-T*z+A*j)*De,r[8]=(u*xe-f*ae+g*re)*De,r[9]=(s*ae-i*xe-h*re)*De,r[10]=(M*G-P*z+F*q)*De,r[11]=(b*z-v*G-A*q)*De,r[12]=(f*ne-u*de-_*re)*De,r[13]=(i*de-s*ne+a*re)*De,r[14]=(P*j-M*N-k*q)*De,r[15]=(v*N-b*j+T*q)*De,r):null}function Ni(r,e,i){var s=e[0],a=e[1],h=e[2],u=e[3],f=e[4],_=e[5],g=e[6],v=e[7],b=e[8],T=e[9],A=e[10],M=e[11],P=e[12],k=e[13],F=e[14],q=e[15],j=i[0],z=i[1],N=i[2],G=i[3];return r[0]=j*s+z*f+N*b+G*P,r[1]=j*a+z*_+N*T+G*k,r[2]=j*h+z*g+N*A+G*F,r[3]=j*u+z*v+N*M+G*q,r[4]=(j=i[4])*s+(z=i[5])*f+(N=i[6])*b+(G=i[7])*P,r[5]=j*a+z*_+N*T+G*k,r[6]=j*h+z*g+N*A+G*F,r[7]=j*u+z*v+N*M+G*q,r[8]=(j=i[8])*s+(z=i[9])*f+(N=i[10])*b+(G=i[11])*P,r[9]=j*a+z*_+N*T+G*k,r[10]=j*h+z*g+N*A+G*F,r[11]=j*u+z*v+N*M+G*q,r[12]=(j=i[12])*s+(z=i[13])*f+(N=i[14])*b+(G=i[15])*P,r[13]=j*a+z*_+N*T+G*k,r[14]=j*h+z*g+N*A+G*F,r[15]=j*u+z*v+N*M+G*q,r}function Lr(r,e,i){var s,a,h,u,f,_,g,v,b,T,A,M,P=i[0],k=i[1],F=i[2];return e===r?(r[12]=e[0]*P+e[4]*k+e[8]*F+e[12],r[13]=e[1]*P+e[5]*k+e[9]*F+e[13],r[14]=e[2]*P+e[6]*k+e[10]*F+e[14],r[15]=e[3]*P+e[7]*k+e[11]*F+e[15]):(a=e[1],h=e[2],u=e[3],f=e[4],_=e[5],g=e[6],v=e[7],b=e[8],T=e[9],A=e[10],M=e[11],r[0]=s=e[0],r[1]=a,r[2]=h,r[3]=u,r[4]=f,r[5]=_,r[6]=g,r[7]=v,r[8]=b,r[9]=T,r[10]=A,r[11]=M,r[12]=s*P+f*k+b*F+e[12],r[13]=a*P+_*k+T*F+e[13],r[14]=h*P+g*k+A*F+e[14],r[15]=u*P+v*k+M*F+e[15]),r}function Mr(r,e,i){var s=i[0],a=i[1],h=i[2];return r[0]=e[0]*s,r[1]=e[1]*s,r[2]=e[2]*s,r[3]=e[3]*s,r[4]=e[4]*a,r[5]=e[5]*a,r[6]=e[6]*a,r[7]=e[7]*a,r[8]=e[8]*h,r[9]=e[9]*h,r[10]=e[10]*h,r[11]=e[11]*h,r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}function bs(r,e,i){var s=Math.sin(i),a=Math.cos(i),h=e[4],u=e[5],f=e[6],_=e[7],g=e[8],v=e[9],b=e[10],T=e[11];return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[4]=h*a+g*s,r[5]=u*a+v*s,r[6]=f*a+b*s,r[7]=_*a+T*s,r[8]=g*a-h*s,r[9]=v*a-u*s,r[10]=b*a-f*s,r[11]=T*a-_*s,r}function Ko(r,e,i){var s=Math.sin(i),a=Math.cos(i),h=e[0],u=e[1],f=e[2],_=e[3],g=e[8],v=e[9],b=e[10],T=e[11];return e!==r&&(r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=h*a-g*s,r[1]=u*a-v*s,r[2]=f*a-b*s,r[3]=_*a-T*s,r[8]=h*s+g*a,r[9]=u*s+v*a,r[10]=f*s+b*a,r[11]=_*s+T*a,r}function ws(r,e,i){var s=Math.sin(i),a=Math.cos(i),h=e[0],u=e[1],f=e[2],_=e[3],g=e[4],v=e[5],b=e[6],T=e[7];return e!==r&&(r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=h*a+g*s,r[1]=u*a+v*s,r[2]=f*a+b*s,r[3]=_*a+T*s,r[4]=g*a-h*s,r[5]=v*a-u*s,r[6]=b*a-f*s,r[7]=T*a-_*s,r}function Qo(r,e){return r[0]=e[0],r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=e[1],r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=e[2],r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function Jo(r,e,i){var s,a,h,u=i[0],f=i[1],_=i[2],g=Math.hypot(u,f,_);return g<Rr?null:(u*=g=1/g,f*=g,_*=g,s=Math.sin(e),a=Math.cos(e),r[0]=u*u*(h=1-a)+a,r[1]=f*u*h+_*s,r[2]=_*u*h-f*s,r[3]=0,r[4]=u*f*h-_*s,r[5]=f*f*h+a,r[6]=_*f*h+u*s,r[7]=0,r[8]=u*_*h+f*s,r[9]=f*_*h-u*s,r[10]=_*_*h+a,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r)}function en(r,e){var i=e[0],s=e[1],a=e[2],h=e[3],u=i+i,f=s+s,_=a+a,g=i*u,v=s*u,b=s*f,T=a*u,A=a*f,M=a*_,P=h*u,k=h*f,F=h*_;return r[0]=1-b-M,r[1]=v+F,r[2]=T-k,r[3]=0,r[4]=v-F,r[5]=1-g-M,r[6]=A+P,r[7]=0,r[8]=T+k,r[9]=A-P,r[10]=1-g-b,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}Math.hypot||(Math.hypot=function(){for(var r=0,e=arguments.length;e--;)r+=arguments[e]*arguments[e];return Math.sqrt(r)});var ka=Ni;function ir(){var r=new qi(3);return qi!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r}function Ts(r){var e=new qi(3);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}function kr(r){return Math.hypot(r[0],r[1],r[2])}function Vi(r,e,i){var s=new qi(3);return s[0]=r,s[1]=e,s[2]=i,s}function ar(r,e,i){return r[0]=e[0]+i[0],r[1]=e[1]+i[1],r[2]=e[2]+i[2],r}function br(r,e,i){return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],r}function wo(r,e,i){return r[0]=e[0]*i[0],r[1]=e[1]*i[1],r[2]=e[2]*i[2],r}function Bo(r,e,i){return r[0]=Math.min(e[0],i[0]),r[1]=Math.min(e[1],i[1]),r[2]=Math.min(e[2],i[2]),r}function No(r,e,i){return r[0]=Math.max(e[0],i[0]),r[1]=Math.max(e[1],i[1]),r[2]=Math.max(e[2],i[2]),r}function gi(r,e,i){return r[0]=e[0]*i,r[1]=e[1]*i,r[2]=e[2]*i,r}function po(r,e,i,s){return r[0]=e[0]+i[0]*s,r[1]=e[1]+i[1]*s,r[2]=e[2]+i[2]*s,r}function Bn(r,e){var i=e[0]-r[0],s=e[1]-r[1],a=e[2]-r[2];return i*i+s*s+a*a}function Nn(r){var e=r[0],i=r[1],s=r[2];return e*e+i*i+s*s}function tn(r,e){return r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r}function Di(r,e){var i=e[0],s=e[1],a=e[2],h=i*i+s*s+a*a;return h>0&&(h=1/Math.sqrt(h)),r[0]=e[0]*h,r[1]=e[1]*h,r[2]=e[2]*h,r}function Ui(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function rr(r,e,i){var s=e[0],a=e[1],h=e[2],u=i[0],f=i[1],_=i[2];return r[0]=a*_-h*f,r[1]=h*u-s*_,r[2]=s*f-a*u,r}function Vn(r,e,i,s){var a=e[0],h=e[1],u=e[2];return r[0]=a+s*(i[0]-a),r[1]=h+s*(i[1]-h),r[2]=u+s*(i[2]-u),r}function Yi(r,e,i){var s=e[0],a=e[1],h=e[2],u=i[3]*s+i[7]*a+i[11]*h+i[15];return r[0]=(i[0]*s+i[4]*a+i[8]*h+i[12])/(u=u||1),r[1]=(i[1]*s+i[5]*a+i[9]*h+i[13])/u,r[2]=(i[2]*s+i[6]*a+i[10]*h+i[14])/u,r}function Un(r,e,i){var s=e[0],a=e[1],h=e[2];return r[0]=s*i[0]+a*i[3]+h*i[6],r[1]=s*i[1]+a*i[4]+h*i[7],r[2]=s*i[2]+a*i[5]+h*i[8],r}function Ss(r,e,i){var s=i[0],a=i[1],h=i[2],u=e[0],f=e[1],_=e[2],g=a*_-h*f,v=h*u-s*_,b=s*f-a*u,T=a*b-h*v,A=h*g-s*b,M=s*v-a*g,P=2*i[3];return v*=P,b*=P,A*=2,M*=2,r[0]=u+(g*=P)+(T*=2),r[1]=f+v+A,r[2]=_+b+M,r}function ao(r,e){return r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]}var Qi=br,oh=wo,rn=kr;function Or(){var r=new qi(4);return qi!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0,r[3]=0),r}function es(r,e,i){return r[0]=e[0]*i,r[1]=e[1]*i,r[2]=e[2]*i,r[3]=e[3]*i,r}function Es(r,e){var i=e[0],s=e[1],a=e[2],h=e[3],u=i*i+s*s+a*a+h*h;return u>0&&(u=1/Math.sqrt(u)),r[0]=i*u,r[1]=s*u,r[2]=a*u,r[3]=h*u,r}function eo(r,e,i){var s=e[0],a=e[1],h=e[2],u=e[3];return r[0]=i[0]*s+i[4]*a+i[8]*h+i[12]*u,r[1]=i[1]*s+i[5]*a+i[9]*h+i[13]*u,r[2]=i[2]*s+i[6]*a+i[10]*h+i[14]*u,r[3]=i[3]*s+i[7]*a+i[11]*h+i[15]*u,r}function To(){var r=new qi(4);return qi!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r[3]=1,r}function Is(r){return r[0]=0,r[1]=0,r[2]=0,r[3]=1,r}function ts(r,e,i){i*=.5;var s=e[0],a=e[1],h=e[2],u=e[3],f=Math.sin(i),_=Math.cos(i);return r[0]=s*_+u*f,r[1]=a*_+h*f,r[2]=h*_-a*f,r[3]=u*_-s*f,r}function on(r,e,i){i*=.5;var s=e[0],a=e[1],h=e[2],u=e[3],f=Math.sin(i),_=Math.cos(i);return r[0]=s*_-h*f,r[1]=a*_+u*f,r[2]=h*_+s*f,r[3]=u*_-a*f,r}ir(),Or();var Zr,lo,Oa,sn,jn,Vo=Es,is=(Zr=ir(),lo=Vi(1,0,0),Oa=Vi(0,1,0),function(r,e,i){var s=Ui(e,i);return s<-.999999?(rr(Zr,lo,e),rn(Zr)<1e-6&&rr(Zr,Oa,e),Di(Zr,Zr),function(a,h,u){u*=.5;var f=Math.sin(u);a[0]=f*h[0],a[1]=f*h[1],a[2]=f*h[2],a[3]=Math.cos(u)}(r,Zr,Math.PI),r):s>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(rr(Zr,e,i),r[0]=Zr[0],r[1]=Zr[1],r[2]=Zr[2],r[3]=1+s,Vo(r,r))});function Xr(){var r=new qi(2);return qi!=Float32Array&&(r[0]=0,r[1]=0),r}function nn(r,e){var i=new qi(2);return i[0]=r,i[1]=e,i}function As(r,e,i){return r[0]=e[0]+i[0],r[1]=e[1]+i[1],r}function Uo(r,e,i){return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r}function an(r,e,i){return r[0]=e[0]*i,r[1]=e[1]*i,r}function ln(r){return Math.hypot(r[0],r[1])}function Fa(r,e){var i=e[0],s=e[1],a=i*i+s*s;return a>0&&(a=1/Math.sqrt(a)),r[0]=e[0]*a,r[1]=e[1]*a,r}function Ri(r,e){return r[0]*e[0]+r[1]*e[1]}function jo(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}To(),To(),Fl(),Xr();var Gn,fo,Ba=function(){if(jn)return sn;function r(e,i,s,a){this.cx=3*e,this.bx=3*(s-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(a-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=i,this.p2x=s,this.p2y=a}return jn=1,sn=r,r.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,i){if(i===void 0&&(i=1e-6),e<0)return 0;if(e>1)return 1;for(var s=e,a=0;a<8;a++){var h=this.sampleCurveX(s)-e;if(Math.abs(h)<i)return s;var u=this.sampleCurveDerivativeX(s);if(Math.abs(u)<1e-6)break;s-=h/u}var f=0,_=1;for(s=e,a=0;a<20&&(h=this.sampleCurveX(s),!(Math.abs(h-e)<i));a++)e>h?f=s:_=s,s=.5*(_-f)+f;return s},solve:function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))}},sn}(),Bl=jo(Ba);function Na(){if(fo)return Gn;function r(e,i){this.x=e,this.y=i}return fo=1,Gn=r,r.prototype={clone:function(){return new r(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,i){return this.clone()._rotateAround(e,i)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var i=e.x-this.x,s=e.y-this.y;return i*i+s*s},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,i){return Math.atan2(this.x*i-this.y*e,this.x*e+this.y*i)},_matMult:function(e){var i=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=i,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var i=Math.cos(e),s=Math.sin(e),a=s*this.x+i*this.y;return this.x=i*this.x-s*this.y,this.y=a,this},_rotateAround:function(e,i){var s=Math.cos(e),a=Math.sin(e),h=i.y+a*(this.x-i.x)+s*(this.y-i.y);return this.x=i.x+s*(this.x-i.x)-a*(this.y-i.y),this.y=h,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},r.convert=function(e){return e instanceof r?e:Array.isArray(e)?new r(e[0],e[1]):e},Gn}var We=jo(Na());function rs(r,e){if(Array.isArray(r)){if(!Array.isArray(e)||r.length!==e.length)return!1;for(let i=0;i<r.length;i++)if(!rs(r[i],e[i]))return!1;return!0}if(typeof r=="object"&&r!==null&&e!==null){if(typeof e!="object"||Object.keys(r).length!==Object.keys(e).length)return!1;for(const i in r)if(!rs(r[i],e[i]))return!1;return!0}return r===e}const Nl=Math.PI/180,Ie=180/Math.PI;function L(r){return r*Nl}function V(r){return r*Ie}const K=[[0,0],[1,0],[1,1],[0,1]];function se(r){if(r<=0)return 0;if(r>=1)return 1;const e=r*r,i=e*r;return 4*(r<.5?i:3*(r-e)+i-.75)}function ie(r,e,i,s){const a=new Bl(r,e,i,s);return function(h){return a.solve(h)}}const ce=ie(.25,.1,.25,1);function he(r,e,i){return Math.min(i,Math.max(e,r))}function ue(r,e,i){return(i=he((i-r)/(e-r),0,1))*i*(3-2*i)}function ve(r,e,i){const s=i-e,a=((r-e)%s+s)%s+e;return a===e?i:a}function Ce(r,e,i){if(!r.length)return i(null,[]);let s=r.length;const a=new Array(r.length);let h=null;r.forEach((u,f)=>{e(u,(_,g)=>{_&&(h=_),a[f]=g,--s==0&&i(h,a)})})}function ye(r,...e){for(const i of e)for(const s in i)r[s]=i[s];return r}let Ze=1;function et(){return Ze++}function lt(r){return r<=1?1:Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function St(r,e){r.forEach(i=>{e[i]&&(e[i]=e[i].bind(e))})}function At(r,e,i){const s={};for(const a in r)s[a]=e.call(this,r[a],a,r);return s}function Pt(r,e,i){const s={};for(const a in r)e.call(this,r[a],a,r)&&(s[a]=r[a]);return s}function Ft(r){return Array.isArray(r)?r.map(Ft):typeof r=="object"&&r?At(r,Ft):r}const ji={};function Nt(r){ji[r]||(typeof console<"u"&&console.warn(r),ji[r]=!0)}function pi(r,e,i){return(i.y-r.y)*(e.x-r.x)>(e.y-r.y)*(i.x-r.x)}function Kt(r){let e=0;for(let i,s,a=0,h=r.length,u=h-1;a<h;u=a++)i=r[a],s=r[u],e+=(s.x-i.x)*(i.y+s.y);return e}function fi([r,e,i]){const s=L(e+90),a=L(i);return{x:r*Math.cos(s)*Math.sin(a),y:r*Math.sin(s)*Math.sin(a),z:r*Math.cos(a),azimuthal:e,polar:i}}function yi(r){return(typeof self<"u"||r!==void 0)&&typeof WorkerGlobalScope<"u"&&(r!==void 0?r:self)instanceof WorkerGlobalScope}function Ji(r){const e={};if(r.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(i,s,a,h)=>{const u=a||h;return e[s]=!u||u.toLowerCase(),""}),e["max-age"]){const i=parseInt(e["max-age"],10);isNaN(i)?delete e["max-age"]:e["max-age"]=i}return e}let lr=null;function mr(r,e){return[r[4*e],r[4*e+1],r[4*e+2],r[4*e+3]]}function wr(r,e,i,s){for(;e<i;){const a=e+i>>1;r[a]<s?e=a+1:i=a}return e}function os(r,e,i,s){for(;e<i;){const a=e+i>>1;r[a]<=s?e=a+1:i=a}return e}function Cr(r){return r>0?1/(1.001-r):1+r}function Pr(r){return r>0?1-1/(1.001-r):-r}function xr(r,e,i){return(r-e.min)*(i.max-i.min)/(e.max-e.min)+i.min}const Sr={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){if(!Sr.API_URL)return null;try{const r=new URL(Sr.API_URL);return r.hostname==="api.mapbox.cn"?"https://events.mapbox.cn/events/v2":r.hostname==="api.mapbox.com"?"https://events.mapbox.com/events/v2":null}catch{return null}},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",RASTERARRAYS_URL_PREFIX:"rasterarrays/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,DEFAULT_STYLE:"mapbox://styles/mapbox/standard",MAX_PARALLEL_IMAGE_REQUESTS:16,DRACO_URL:"https://api.mapbox.com/mapbox-gl-js/draco_decoder_gltf_v1.5.6.wasm",MESHOPT_URL:"https://api.mapbox.com/mapbox-gl-js/meshopt_base_v0.20.wasm",MESHOPT_SIMD_URL:"https://api.mapbox.com/mapbox-gl-js/meshopt_simd_v0.20.wasm",GLYPHS_URL:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf",TILES3D_URL_PREFIX:"3dtiles/v1"};function Go(r){return Sr.API_URL_REGEX.test(r)}function cn(r){return Sr.API_SPRITE_REGEX.test(r)}let Va,qn,Vl,Ua,hn,ja;function sh(){return Va==null&&(Va=self.OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),Va}const So={now:()=>Ua!==void 0?Ua:performance.now(),setNow(r){Ua=r},restoreNow(){Ua=void 0},frame(r){const e=requestAnimationFrame(r);return{cancel:()=>cancelAnimationFrame(e)}},getImageData(r,e=0){const{width:i,height:s}=r;hn||(hn=document.createElement("canvas"));const a=hn.getContext("2d",{willReadFrequently:!0});if(!a)throw new Error("failed to create canvas 2d context");return(i>hn.width||s>hn.height)&&(hn.width=i,hn.height=s),a.clearRect(-e,-e,i+2*e,s+2*e),a.drawImage(r,0,0,i,s),a.getImageData(-e,-e,i+2*e,s+2*e)},resolveURL:r=>(qn||(qn=document.createElement("a")),qn.href=r,qn.href),get devicePixelRatio(){return window.devicePixelRatio},get prefersReducedMotion(){return!!window.matchMedia&&(Vl==null&&(Vl=window.matchMedia("(prefers-reduced-motion: reduce)")),Vl.matches)},hasCanvasFingerprintNoise(){if(ja!==void 0)return ja;if(!sh())return ja=!1,!1;const r=new OffscreenCanvas(85,1),e=r.getContext("2d",{willReadFrequently:!0});let i=0;for(let a=0;a<r.width;++a)e.fillStyle=`rgba(${i++},${i++},${i++}, 255)`,e.fillRect(a,0,1,1);const s=e.getImageData(0,0,r.width,r.height);i=0;for(let a=0;a<s.data.length;++a)if(a%4!=3&&i++!==s.data[a])return ja=!0,!0;return ja=!1,!1}};function nh(r,e){const i=r.indexOf("?");if(i<0)return`${r}?${new URLSearchParams(e).toString()}`;const s=new URLSearchParams(r.slice(i));for(const a in e)s.set(a,e[a]);return`${r.slice(0,i)}?${s.toString()}`}function to(r,e={persistentParams:[]}){const i=r.indexOf("?");if(i<0)return r;const s=new URLSearchParams,a=new URLSearchParams(r.slice(i));for(const u of e.persistentParams){const f=a.get(u);f&&s.set(u,f)}const h=s.toString();return`${r.slice(0,i)}${h.length>0?`?${h}`:""}`}const Eo="mapbox-tiles";let ss=500,Io=50;const ns=["language","worldview","jobid"];let mo,Ga;function ah(){try{return caches}catch{}}function as(){const r=ah();r&&mo==null&&(mo=r.open(Eo))}let qa=1/0;const lh={supported:!1,testSupport:function(r){!Ul&&Fr&&(jl?Zu(r):Ha=r)}};let Ha,Fr,Ul=!1,jl=!1;const Hn=typeof self<"u"?self:{};function Zu(r){const e=r.createTexture();r.bindTexture(r.TEXTURE_2D,e);try{if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,Fr),r.isContextLost())return;lh.supported=!0}catch{}r.deleteTexture(e),Ul=!0}Hn.document&&(Fr=Hn.document.createElement("img"),Fr.onload=function(){Ha&&Zu(Ha),Ha=null,jl=!0},Fr.onerror=function(){Ul=!0,Ha=null},Fr.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const Gl={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Iconset:"Iconset",Image:"Image",Model:"Model"};typeof Object.freeze=="function"&&Object.freeze(Gl);class ql extends Error{constructor(e,i,s){i===401&&Go(s)&&(e+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(e),this.status=i,this.url=s}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const $t=yi()?()=>self.worker.referrer:()=>(location.protocol==="blob:"?parent:self).location.href,Wn=function(r,e){if(!(/^file:/.test(i=r.url)||/^file:/.test($t())&&!/^\w+:/.test(i))){if(self.fetch&&self.Request&&self.AbortController&&Request.prototype.hasOwnProperty("signal"))return function(s,a){const h=new AbortController,u=new Request(s.url,{method:s.method||"GET",body:s.body,credentials:s.credentials,headers:s.headers,referrer:$t(),referrerPolicy:s.referrerPolicy,signal:h.signal});let f=!1,_=!1;const g=(v=u.url).indexOf("sku=")>0&&Go(v);var v;s.type==="json"&&u.headers.set("Accept","application/json");const b=(A,M,P)=>{if(_)return;if(A&&A.message!=="SecurityError"&&Nt(A.toString()),M&&P)return T(M);const k=Date.now();fetch(u).then(F=>{if(F.ok){const q=g?F.clone():null;return T(F,q,k)}return a(new ql(F.statusText,F.status,s.url))}).catch(F=>{F.name!=="AbortError"&&a(new Error(`${F.message} ${s.url}`))})},T=(A,M,P)=>{(s.type==="arrayBuffer"?A.arrayBuffer():s.type==="json"?A.json():A.text()).then(k=>{_||(M&&P&&function(F,q,j){if(as(),mo==null)return;const z=Ji(q.headers.get("Cache-Control")||"");if(z["no-store"])return;const N={status:q.status,statusText:q.statusText,headers:new Headers};q.headers.forEach((re,ne)=>N.headers.set(ne,re)),z["max-age"]&&N.headers.set("Expires",new Date(j+1e3*z["max-age"]).toUTCString());const G=N.headers.get("Expires");if(!G||new Date(G).getTime()-j<42e4)return;let Z=to(F.url,{persistentParams:ns});if(q.status===206){const re=F.headers.get("Range");if(!re)return;N.status=200,Z=nh(Z,{range:re})}(function(re,ne){if(Ga===void 0)try{new Response(new ReadableStream),Ga=!0}catch{Ga=!1}Ga?ne(re.body):re.blob().then(ne).catch(ae=>Nt(ae.message))})(q,re=>{const ne=new Response((ae=q.status)!==200&&ae!==404&&[101,103,204,205,304].includes(ae)?null:re,N);var ae;as(),mo!=null&&mo.then(de=>de.put(Z,ne)).catch(de=>Nt(de.message))})}(u,M,P),f=!0,a(null,k,A.headers.get("Cache-Control"),A.headers.get("Expires")))}).catch(k=>{_||a(new Error(k.message))})};return g?function(A,M){if(as(),mo==null)return M(null);mo.then(P=>{let k=to(A.url,{persistentParams:ns});const F=A.headers.get("Range");F&&(k=nh(k,{range:F})),P.match(k).then(q=>{const j=function(z){if(!z)return!1;const N=new Date(z.headers.get("Expires")||0),G=Ji(z.headers.get("Cache-Control")||"");return Number(N)>Date.now()&&!G["no-cache"]}(q);P.delete(k).catch(M),j&&P.put(k,q.clone()).catch(M),M(null,q,j)}).catch(M)}).catch(M)}(u,b):b(null,null),{cancel:()=>{_=!0,f||h.abort()}}}(r,e);if(yi(self)&&self.worker.actor)return self.worker.actor.send("getResource",r,e,void 0,!0)}var i;return function(s,a){const h=new XMLHttpRequest;h.open(s.method||"GET",s.url,!0),s.type==="arrayBuffer"&&(h.responseType="arraybuffer");for(const u in s.headers)h.setRequestHeader(u,s.headers[u]);return s.type==="json"&&(h.responseType="text",h.setRequestHeader("Accept","application/json")),h.withCredentials=s.credentials==="include",h.onerror=()=>{a(new Error(h.statusText))},h.onload=()=>{if((h.status>=200&&h.status<300||h.status===0)&&h.response!==null){let u=h.response;if(s.type==="json")try{u=JSON.parse(h.response)}catch(f){return a(f)}a(null,u,h.getResponseHeader("Cache-Control"),h.getResponseHeader("Expires"))}else a(new ql(h.statusText,h.status,s.url))},h.send(s.body),{cancel:()=>h.abort()}}(r,e)},Zn=function(r,e){return Wn(ye(r,{type:"arrayBuffer"}),e)};function Xp(r){const e=document.createElement("a");return e.href=r,e.protocol===location.protocol&&e.host===location.host}const Xu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let un,Ms;un=[],Ms=0;const Xn=function(r,e){if(lh.supported&&(r.headers||(r.headers={}),r.headers.accept="image/webp,*/*"),Ms>=Sr.MAX_PARALLEL_IMAGE_REQUESTS){const h={requestParameters:r,callback:e,cancelled:!1,cancel(){this.cancelled=!0}};return un.push(h),h}Ms++;let i=!1;const s=()=>{if(!i)for(i=!0,Ms--;un.length&&Ms<Sr.MAX_PARALLEL_IMAGE_REQUESTS;){const h=un.shift(),{requestParameters:u,callback:f,cancelled:_}=h;_||(h.cancel=Xn(u,f).cancel)}},a=Zn(r,(h,u,f,_)=>{s(),h?e(h):u&&(self.createImageBitmap?function(g,v){const b=new Blob([new Uint8Array(g)],{type:"image/png"});createImageBitmap(b).then(T=>{v(null,T)}).catch(T=>{v(new Error(`Could not load image because of ${T.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(u,(g,v)=>e(g,v,f,_)):function(g,v){const b=new Image;b.onload=()=>{v(null,b),URL.revokeObjectURL(b.src),b.onload=null,requestAnimationFrame(()=>{b.src=Xu})},b.onerror=()=>v(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const T=new Blob([new Uint8Array(g)],{type:"image/png"});b.src=g.byteLength?URL.createObjectURL(T):Xu}(u,(g,v)=>e(g,v,f,_)))});return{cancel:()=>{a.cancel(),s()}}};var $u,ch,dn,Wa={exports:{}},$n={exports:{}},Hl={exports:{}},hh=function(){if(dn)return Wa.exports;dn=1;var r=($u||($u=1,$n.exports=function(i,s){var a,h,u,f,_,g,v,b;for(h=i.length-(a=3&i.length),u=s,_=3432918353,g=461845907,b=0;b<h;)v=255&i.charCodeAt(b)|(255&i.charCodeAt(++b))<<8|(255&i.charCodeAt(++b))<<16|(255&i.charCodeAt(++b))<<24,++b,u=27492+(65535&(f=5*(65535&(u=(u^=v=(65535&(v=(v=(65535&v)*_+(((v>>>16)*_&65535)<<16)&4294967295)<<15|v>>>17))*g+(((v>>>16)*g&65535)<<16)&4294967295)<<13|u>>>19))+((5*(u>>>16)&65535)<<16)&4294967295))+((58964+(f>>>16)&65535)<<16);switch(v=0,a){case 3:v^=(255&i.charCodeAt(b+2))<<16;case 2:v^=(255&i.charCodeAt(b+1))<<8;case 1:u^=v=(65535&(v=(v=(65535&(v^=255&i.charCodeAt(b)))*_+(((v>>>16)*_&65535)<<16)&4294967295)<<15|v>>>17))*g+(((v>>>16)*g&65535)<<16)&4294967295}return u^=i.length,u=2246822507*(65535&(u^=u>>>16))+((2246822507*(u>>>16)&65535)<<16)&4294967295,u=3266489909*(65535&(u^=u>>>13))+((3266489909*(u>>>16)&65535)<<16)&4294967295,(u^=u>>>16)>>>0}),$n.exports),e=(ch||(ch=1,Hl.exports=function(i,s){for(var a,h=i.length,u=s^h,f=0;h>=4;)a=1540483477*(65535&(a=255&i.charCodeAt(f)|(255&i.charCodeAt(++f))<<8|(255&i.charCodeAt(++f))<<16|(255&i.charCodeAt(++f))<<24))+((1540483477*(a>>>16)&65535)<<16),u=1540483477*(65535&u)+((1540483477*(u>>>16)&65535)<<16)^(a=1540483477*(65535&(a^=a>>>24))+((1540483477*(a>>>16)&65535)<<16)),h-=4,++f;switch(h){case 3:u^=(255&i.charCodeAt(f+2))<<16;case 2:u^=(255&i.charCodeAt(f+1))<<8;case 1:u=1540483477*(65535&(u^=255&i.charCodeAt(f)))+((1540483477*(u>>>16)&65535)<<16)}return u=1540483477*(65535&(u^=u>>>13))+((1540483477*(u>>>16)&65535)<<16),(u^=u>>>15)>>>0}),Hl.exports);return Wa.exports=r,Wa.exports.murmur3=r,Wa.exports.murmur2=e,Wa.exports}(),io=jo(hh);class Cs{constructor(e,...i){ye(this,i[0]||{}),this.type=e}}class uh extends Cs{constructor(e,i={}){super("error",ye({error:e},i))}}function dh(r,e,i){i[r]&&i[r].indexOf(e)!==-1||(i[r]=i[r]||[],i[r].push(e))}function Wl(r,e,i){if(i&&i[r]){const s=i[r].indexOf(e);s!==-1&&i[r].splice(s,1)}}class pn{on(e,i){return this._listeners=this._listeners||{},dh(e,i,this._listeners),this}off(e,i){return Wl(e,i,this._listeners),Wl(e,i,this._oneTimeListeners),this}once(e,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},dh(e,i,this._oneTimeListeners),this):new Promise(s=>{this.once(e,s)})}fire(e,i){const s=typeof e=="string"?new Cs(e,i):e,a=s.type;if(this.listens(a)){s.target=this;const h=this._listeners&&this._listeners[a]?this._listeners[a].slice():[];for(const _ of h)_.call(this,s);const u=this._oneTimeListeners&&this._oneTimeListeners[a]?this._oneTimeListeners[a].slice():[];for(const _ of u)Wl(a,_,this._oneTimeListeners),_.call(this,s);const f=this._eventedParent;f&&(ye(s,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),f.fire(s))}else s instanceof uh&&console.error(s.error);return this}listens(e){return!!(this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e))}setEventedParent(e,i){return this._eventedParent=e,this._eventedParentData=i,this}}class ro{constructor(e){typeof e=="string"?this.name=e:(this.name=e.name,this.iconsetId=e.iconsetId)}static from(e){return new ro(e)}static toString(e){return e.iconsetId?`${e.name}${e.iconsetId}`:e.name}static parse(e){const[i,s]=e.split("");return new ro({name:i,iconsetId:s})}static isEqual(e,i){return e.name===i.name&&e.iconsetId===i.iconsetId}toString(){return ro.toString(this)}serialize(){return{name:this.name,iconsetId:this.iconsetId}}}var ph,Zl={},Za=function(){if(ph)return Zl;ph=1;var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function e(h){return(h=Math.round(h))<0?0:h>255?255:h}function i(h){return e(h[h.length-1]==="%"?parseFloat(h)/100*255:parseInt(h))}function s(h){return(u=h[h.length-1]==="%"?parseFloat(h)/100:parseFloat(h))<0?0:u>1?1:u;var u}function a(h,u,f){return f<0?f+=1:f>1&&(f-=1),6*f<1?h+(u-h)*f*6:2*f<1?u:3*f<2?h+(u-h)*(2/3-f)*6:h}try{Zl.parseCSSColor=function(h){var u,f=h.replace(/ /g,"").toLowerCase();if(f in r)return r[f].slice();if(f[0]==="#")return f.length===4?(u=parseInt(f.substr(1),16))>=0&&u<=4095?[(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1]:null:f.length===7&&(u=parseInt(f.substr(1),16))>=0&&u<=16777215?[(16711680&u)>>16,(65280&u)>>8,255&u,1]:null;var _=f.indexOf("("),g=f.indexOf(")");if(_!==-1&&g+1===f.length){var v=f.substr(0,_),b=f.substr(_+1,g-(_+1)).split(","),T=1;switch(v){case"rgba":if(b.length!==4)return null;T=s(b.pop());case"rgb":return b.length!==3?null:[i(b[0]),i(b[1]),i(b[2]),T];case"hsla":if(b.length!==4)return null;T=s(b.pop());case"hsl":if(b.length!==3)return null;var A=(parseFloat(b[0])%360+360)%360/360,M=s(b[1]),P=s(b[2]),k=P<=.5?P*(M+1):P+M-P*M,F=2*P-k;return[e(255*a(F,k,A+1/3)),e(255*a(F,k,A)),e(255*a(F,k,A-1/3)),T];default:return null}}return null}}catch{}return Zl}();class Jt{constructor(e,i,s,a=1){this.r=e,this.g=i,this.b=s,this.a=a}static parse(e){if(!e)return;if(e instanceof Jt)return e;if(typeof e!="string")return;const i=Za.parseCSSColor(e);return i?new Jt(i[0]/255*i[3],i[1]/255*i[3],i[2]/255*i[3],i[3]):void 0}toStringPremultipliedAlpha(){const[e,i,s,a]=this.a===0?[0,0,0,0]:[255*this.r/this.a,255*this.g/this.a,255*this.b/this.a,this.a];return`rgba(${Math.round(e)},${Math.round(i)},${Math.round(s)},${a})`}toString(){const[e,i,s,a]=[this.r,this.g,this.b,this.a];return`rgba(${Math.round(255*e)},${Math.round(255*i)},${Math.round(255*s)},${a})`}toRenderColor(e){const{r:i,g:s,b:a,a:h}=this;return new Yu(e,i,s,a,h)}clone(){return new Jt(this.r,this.g,this.b,this.a)}}class Yu{constructor(e,i,s,a,h){if(e){const u=e.image.height,f=u*u;i=h===0?0:i/h*(u-1),s=h===0?0:s/h*(u-1),a=h===0?0:a/h*(u-1);const _=Math.floor(i),g=Math.floor(s),v=Math.floor(a),b=Math.ceil(i),T=Math.ceil(s),A=Math.ceil(a),M=i-_,P=s-g,k=a-v,F=e.image.data,q=4*(_+g*f+v*u),j=4*(_+g*f+A*u),z=4*(_+T*f+v*u),N=4*(_+T*f+A*u),G=4*(b+g*f+v*u),Z=4*(b+g*f+A*u),re=4*(b+T*f+v*u),ne=4*(b+T*f+A*u);if(q<0||ne>=F.length)throw new Error("out of range");this.r=ft(ft(ft(F[q],F[j],k),ft(F[z],F[N],k),P),ft(ft(F[G],F[Z],k),ft(F[re],F[ne],k),P),M)/255*h,this.g=ft(ft(ft(F[q+1],F[j+1],k),ft(F[z+1],F[N+1],k),P),ft(ft(F[G+1],F[Z+1],k),ft(F[re+1],F[ne+1],k),P),M)/255*h,this.b=ft(ft(ft(F[q+2],F[j+2],k),ft(F[z+2],F[N+2],k),P),ft(ft(F[G+2],F[Z+2],k),ft(F[re+2],F[ne+2],k),P),M)/255*h,this.a=h}else this.r=i,this.g=s,this.b=a,this.a=h}toArray(){const{r:e,g:i,b:s,a}=this;return a===0?[0,0,0,0]:[255*e/a,255*i/a,255*s/a,a]}toHslaArray(){if(this.a===0)return[0,0,0,0];const{r:e,g:i,b:s,a}=this,h=Math.min(Math.max(e/a,0),1),u=Math.min(Math.max(i/a,0),1),f=Math.min(Math.max(s/a,0),1),_=Math.min(h,u,f),g=Math.max(h,u,f),v=(_+g)/2;if(_===g)return[0,0,100*v,a];const b=g-_,T=v>.5?b/(2-g-_):b/(g+_);let A=0;return g===h?A=(u-f)/b+(u<f?6:0):g===u?A=(f-h)/b+2:g===f&&(A=(h-u)/b+4),A*=60,[Math.min(Math.max(A,0),360),Math.min(Math.max(100*T,0),100),Math.min(Math.max(100*v,0),100),a]}toArray01(){const{r:e,g:i,b:s,a}=this;return a===0?[0,0,0,0]:[e/a,i/a,s/a,a]}toArray01Scaled(e){const{r:i,g:s,b:a,a:h}=this;return h===0?[0,0,0]:[i/h*e,s/h*e,a/h*e]}toArray01PremultipliedAlpha(){const{r:e,g:i,b:s,a}=this;return[e,i,s,a]}toArray01Linear(){const{r:e,g:i,b:s,a}=this;return a===0?[0,0,0,0]:[Math.pow(e/a,2.2),Math.pow(i/a,2.2),Math.pow(s/a,2.2),a]}}function ft(r,e,i){return r*(1-i)+e*i}function Ku(r,e,i){return r.map((s,a)=>ft(s,e[a],i))}function Xl(r){return r*r*r*r*r}Jt.black=new Jt(0,0,0,1),Jt.white=new Jt(1,1,1,1),Jt.transparent=new Jt(0,0,0,0),Jt.red=new Jt(1,0,0,1),Jt.blue=new Jt(0,0,1,1);var $l=Object.freeze({__proto__:null,array:Ku,color:function(r,e,i){return new Jt(ft(r.r,e.r,i),ft(r.g,e.g,i),ft(r.b,e.b,i),ft(r.a,e.a,i))},easeIn:Xl,number:ft});function Xa(r,...e){for(const i of e)for(const s in i)r[s]=i[s];return r}class _o extends Error{constructor(e,i){super(i),this.message=i,this.key=e}}class fn{constructor(e,i=[]){this.parent=e,this.bindings={};for(const[s,a]of i)this.bindings[s]=a}concat(e){return new fn(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}const Ps={kind:"null"},dt={kind:"number"},ui={kind:"string"},ri={kind:"boolean"},$r={kind:"color"},zs={kind:"object"},ti={kind:"value"},mn={kind:"collator"},$a={kind:"formatted"},Ya={kind:"resolvedImage"};function Br(r,e){return{kind:"array",itemType:r,N:e}}function cr(r){if(r.kind==="array"){const e=cr(r.itemType);return typeof r.N=="number"?`array<${e}, ${r.N}>`:r.itemType.kind==="value"?"array":`array<${e}>`}return r.kind}const $p=[Ps,dt,ui,ri,$r,$a,zs,Br(ti),Ya];function Ka(r,e){if(e.kind==="error")return null;if(r.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!Ka(r.itemType,e.itemType))&&(typeof r.N!="number"||r.N===e.N))return null}else{if(r.kind===e.kind)return null;if(r.kind==="value"){for(const i of $p)if(!Ka(i,e))return null}}return`Expected ${cr(r)} but found ${cr(e)} instead.`}function fh(r,e){return e.some(i=>i.kind===r.kind)}function Yn(r,e){return e.some(i=>i==="null"?r===null:i==="array"?Array.isArray(r):i==="object"?r&&!Array.isArray(r)&&typeof r=="object":i===typeof r)}class Ds{constructor(e,i,s){this.sensitivity=e?i?"variant":"case":i?"accent":"base",this.locale=s,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,i){return this.collator.compare(e,i)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Yl{constructor(e,i,s,a,h){this.text=e.normalize?e.normalize():e,this.image=i,this.scale=s,this.fontStack=a,this.textColor=h}}class Nr{constructor(e){this.sections=e}static fromString(e){return new Nr([new Yl(e,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||!!e.image&&e.image.hasPrimary())}static factory(e){return e instanceof Nr?e:Nr.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const i of this.sections){if(i.image){const a=i.image.getPrimary().id.toString();e.push(["image",a]);continue}e.push(i.text);const s={};i.fontStack&&(s["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(s["font-scale"]=i.scale),i.textColor&&(s["text-color"]=["rgba"].concat(i.textColor.toRenderColor(null).toArray())),e.push(s)}return e}}class Ao{constructor(e,i={}){if(this.id=ro.from(e),this.options=Object.assign({},i),i.transform){const{a:s,b:a,c:h,d:u,e:f,f:_}=i.transform;this.options.transform=new DOMMatrix([s,a,h,u,f,_])}else this.options.transform=new DOMMatrix([1,0,0,1,0,0])}toString(){const{a:e,b:i,c:s,d:a,e:h,f:u}=this.options.transform;return JSON.stringify({name:this.id.name,iconsetId:this.id.iconsetId,params:this.options.params,transform:{a:e,b:i,c:s,d:a,e:h,f:u}})}static parse(e){let i,s,a,h;try{({name:i,iconsetId:s,params:a,transform:h}=JSON.parse(e)||{})}catch{return null}if(!i)return null;const{a:u,b:f,c:_,d:g,e:v,f:b}=h||{};return new Ao({name:i,iconsetId:s},{params:a,transform:new DOMMatrix([u,f,_,g,v,b])})}scaleSelf(e,i){return this.options.transform.scaleSelf(e,i),this}}class Yr{constructor(e,i,s,a,h=!1){this.primaryId=ro.from(e),this.primaryOptions=i,s&&(this.secondaryId=ro.from(s)),this.secondaryOptions=a,this.available=h}toString(){return this.primaryId&&this.secondaryId?`[${this.primaryId.name},${this.secondaryId.name}]`:this.primaryId.name}hasPrimary(){return!!this.primaryId}getPrimary(){return new Ao(this.primaryId,this.primaryOptions)}hasSecondary(){return!!this.secondaryId}getSecondary(){return this.secondaryId?new Ao(this.secondaryId,this.secondaryOptions):null}static from(e){return typeof e=="string"?Yr.build({name:e}):e}static build(e,i,s,a){return!e||typeof e=="object"&&!("name"in e)?null:new Yr(e,s,i,a)}}function Qu(r,e,i,s){return typeof r=="number"&&r>=0&&r<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof i=="number"&&i>=0&&i<=255?s===void 0||typeof s=="number"&&s>=0&&s<=1?null:`Invalid rgba value [${[r,e,i,s].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof s=="number"?[r,e,i,s]:[r,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Kn(r){if(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number"||r instanceof Jt||r instanceof Ds||r instanceof Nr||r instanceof Yr)return!0;if(Array.isArray(r)){for(const e of r)if(!Kn(e))return!1;return!0}if(typeof r=="object"){for(const e in r)if(!Kn(r[e]))return!1;return!0}return!1}function pr(r){if(r===null)return Ps;if(typeof r=="string")return ui;if(typeof r=="boolean")return ri;if(typeof r=="number")return dt;if(r instanceof Jt)return $r;if(r instanceof Ds)return mn;if(r instanceof Nr)return $a;if(r instanceof Yr)return Ya;if(Array.isArray(r)){const e=r.length;let i;for(const s of r){const a=pr(s);if(i){if(i===a)continue;i=ti;break}i=a}return Br(i||ti,e)}return zs}function Vr(r){const e=typeof r;return r===null?"":e==="string"||e==="number"||e==="boolean"?String(r):r instanceof Jt?r.toStringPremultipliedAlpha():r instanceof Nr||r instanceof Yr?r.toString():JSON.stringify(r)}class zt{constructor(e,i){this.type=e,this.value=i}static parse(e,i){if(e.length!==2)return i.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!Kn(e[1]))return i.error("invalid value");const s=e[1];let a=pr(s);const h=i.expectedType;return a.kind!=="array"||a.N!==0||!h||h.kind!=="array"||typeof h.N=="number"&&h.N!==0||(a=h),new zt(a,s)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Jt?["rgba"].concat(this.value.toRenderColor(null).toArray()):this.value instanceof Nr?this.value.serialize():this.value}}class rt{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}const Qa={string:ui,number:dt,boolean:ri,object:zs};class vt{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");let s,a=1;const h=e[0];if(h==="array"){let f,_;if(e.length>2){const g=e[1];if(typeof g!="string"||!(g in Qa)||g==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);f=Qa[g],a++}else f=ti;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return i.error('The length argument to "array" must be a positive integer literal',2);_=e[2],a++}s=Br(f,_)}else s=Qa[h];const u=[];for(;a<e.length;a++){const f=i.parse(e[a],a,ti);if(!f)return null;u.push(f)}return new vt(s,u)}evaluate(e){for(let i=0;i<this.args.length;i++){const s=this.args[i].evaluate(e);if(!Ka(this.type,pr(s)))return s;if(i===this.args.length-1)throw new rt(`The expression ${JSON.stringify(this.args[i].serialize())} evaluated to ${cr(pr(s))} but was expected to be of type ${cr(this.type)}.`)}return null}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=this.type,i=[e.kind];if(e.kind==="array"){const s=e.itemType;if(s.kind==="string"||s.kind==="number"||s.kind==="boolean"){i.push(s.kind);const a=e.N;(typeof a=="number"||this.args.length>1)&&i.push(a)}}return i.concat(this.args.map(s=>s.serialize()))}}class _n{constructor(e){this.type=$a,this.sections=e}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const s=e[1];if(!Array.isArray(s)&&typeof s=="object")return i.error("First argument must be an image or text section.");const a=[];let h=!1;for(let u=1;u<=e.length-1;++u){const f=e[u];if(h&&typeof f=="object"&&!Array.isArray(f)){h=!1;let _=null;if(f["font-scale"]&&(_=i.parseObjectValue(f["font-scale"],u,"font-scale",dt),!_))return null;let g=null;if(f["text-font"]&&(g=i.parseObjectValue(f["text-font"],u,"text-font",Br(ui)),!g))return null;let v=null;if(f["text-color"]&&(v=i.parseObjectValue(f["text-color"],u,"text-color",$r),!v))return null;const b=a[a.length-1];b.scale=_,b.font=g,b.textColor=v}else{const _=i.parse(e[u],u,ti);if(!_)return null;const g=_.type.kind;if(g!=="string"&&g!=="value"&&g!=="null"&&g!=="resolvedImage")return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");h=!0,a.push({content:_,scale:null,font:null,textColor:null})}}return new _n(a)}evaluate(e){return new Nr(this.sections.map(i=>{const s=i.content.evaluate(e);return pr(s)===Ya?new Yl("",s,null,null,null):new Yl(Vr(s),null,i.scale?i.scale.evaluate(e):null,i.font?i.font.evaluate(e).join(","):null,i.textColor?i.textColor.evaluate(e):null)}))}eachChild(e){for(const i of this.sections)e(i.content),i.scale&&e(i.scale),i.font&&e(i.font),i.textColor&&e(i.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const i of this.sections){e.push(i.content.serialize());const s={};i.scale&&(s["font-scale"]=i.scale.serialize()),i.font&&(s["text-font"]=i.font.serialize()),i.textColor&&(s["text-color"]=i.textColor.serialize()),e.push(s)}return e}}class Qn{constructor(e,i,s,a){this._imageWarnHistory={},this.type=Ya,this.namePrimary=e,this.nameSecondary=i,s&&(this.paramsPrimary=s.params,this.iconsetIdPrimary=s.iconset?s.iconset.id:void 0),a&&(this.paramsSecondary=a.params,this.iconsetIdSecondary=a.iconset?a.iconset.id:void 0)}static parse(e,i){if(e.length<2)return i.error("Expected two or more arguments.");let s=1;const a=[];function h(){if(s<e.length){const f=i.parse(e[s],s++,ui);return f?(a.push({image:f,options:{}}),!0):(i.error(a.length?"Secondary image variant is not a string.":"No image name provided."),!1)}return!0}function u(){if(s<e.length){const _=e[s];if((f=_)===null||typeof f!="object"||Array.isArray(f))return!0;const g=_.params,v=_.iconset,b=i.concat(s);if(!g&&!v)return s++,!0;if(g){if(typeof g!="object"||g.constructor!==Object)return b.error('Image options "params" should be an object'),!1;const T={},A=b.concat(void 0,"params");for(const M in g){if(!M)return A.error("Image parameter name should be non-empty"),!1;const P=A.concat(void 0,M).parse(g[M],void 0,$r,void 0,{typeAnnotation:"coerce"});if(!P)return!1;T[M]=P}a[a.length-1].options.params=T}if(v){if(typeof v!="object"||v.constructor!==Object)return b.error('Image options "iconset" should be an object'),!1;if(!v.id)return b.error('Image options "iconset" should have an "id" property'),!1;a[a.length-1].options.iconset=v}return s++,!0}var f;return!0}for(let f=0;f<2;f++)if(!h()||!u())return;return new Qn(a[0].image,a[1]?a[1].image:void 0,a[0].options,a[1]?a[1].options:void 0)}evaluateParams(e,i){const s={};if(i){for(const a in i)if(i[a])try{s[a]=i[a].evaluate(e)}catch{continue}if(Object.keys(s).length!==0)return{params:s}}}evaluate(e){const i={name:this.namePrimary.evaluate(e),iconsetId:this.iconsetIdPrimary},s=this.nameSecondary?{name:this.nameSecondary.evaluate(e),iconsetId:this.iconsetIdSecondary}:void 0,a=Yr.build(i,s,this.paramsPrimary?this.evaluateParams(e,this.paramsPrimary):void 0,this.paramsSecondary?this.evaluateParams(e,this.paramsSecondary):void 0);if(a&&e.availableImages){const h=a.getPrimary().id;if(a.available=e.availableImages.some(u=>ro.isEqual(u,h)),a.available){const u=a.getSecondary()?a.getSecondary().id:null;u&&(a.available=e.availableImages.some(f=>ro.isEqual(f,u)))}}return a}eachChild(e){if(e(this.namePrimary),this.paramsPrimary)for(const i in this.paramsPrimary)this.paramsPrimary[i]&&e(this.paramsPrimary[i]);if(this.nameSecondary&&(e(this.nameSecondary),this.paramsSecondary))for(const i in this.paramsSecondary)this.paramsSecondary[i]&&e(this.paramsSecondary[i])}outputDefined(){return!1}serializeOptions(e,i){const s={};if(i&&(s.iconset={id:i}),e){s.params={};for(const a in e)e[a]&&(s.params[a]=e[a].serialize())}return Object.keys(s).length>0?s:void 0}serialize(){const e=["image",this.namePrimary.serialize()];if(this.paramsPrimary||this.iconsetIdPrimary){const i=this.serializeOptions(this.paramsPrimary,this.iconsetIdPrimary);i&&e.push(i)}if(this.nameSecondary&&(e.push(this.nameSecondary.serialize()),this.paramsSecondary||this.iconsetIdSecondary)){const i=this.serializeOptions(this.paramsSecondary,this.iconsetIdSecondary);i&&e.push(i)}return e}}function bt(r){return r instanceof Number?"number":r instanceof String?"string":r instanceof Boolean?"boolean":Array.isArray(r)?"array":r===null?"null":typeof r}const Ju={"to-boolean":ri,"to-color":$r,"to-number":dt,"to-string":ui};class Mo{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const s=e[0],a=[];let h=Ps;if(s==="to-array"){if(!Array.isArray(e[1]))return null;const u=e[1].length;if(i.expectedType){if(i.expectedType.kind!=="array")return i.error(`Expected ${i.expectedType.kind} but found array.`);h=Br(i.expectedType.itemType,u)}else{if(!(u>0&&Kn(e[1][0])))return null;h=Br(pr(e[1][0]),u)}for(let f=0;f<u;f++){const _=e[1][f];let g;if(bt(_)==="array")g=i.parse(_,void 0,h.itemType);else{const v=bt(_);if(v!==h.itemType.kind)return i.error(`Expected ${h.itemType.kind} but found ${v}.`);g=i.registry.literal.parse(["literal",_===void 0?null:_],i)}if(!g)return null;a.push(g)}}else{if((s==="to-boolean"||s==="to-string")&&e.length!==2)return i.error("Expected one argument.");h=Ju[s];for(let u=1;u<e.length;u++){const f=i.parse(e[u],u,ti);if(!f)return null;a.push(f)}}return new Mo(h,a)}evaluate(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){let i,s;for(const a of this.args){if(i=a.evaluate(e),s=null,i instanceof Jt)return i;if(typeof i=="string"){const h=e.parseColor(i);if(h)return h}else if(Array.isArray(i)&&(s=i.length<3||i.length>4?`Invalid rbga value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:Qu(i[0],i[1],i[2],i[3]),!s))return new Jt(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new rt(s||`Could not parse color from value '${typeof i=="string"?i:String(JSON.stringify(i))}'`)}if(this.type.kind==="number"){let i=null;for(const s of this.args){if(i=s.evaluate(e),i===null)return 0;const a=Number(i);if(!isNaN(a))return a}throw new rt(`Could not convert ${JSON.stringify(i)} to number.`)}return this.type.kind==="formatted"?Nr.fromString(Vr(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?Yr.build(Vr(this.args[0].evaluate(e))):this.type.kind==="array"?this.args.map(i=>i.evaluate(e)):Vr(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if(this.type.kind==="formatted")return new _n([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Qn(this.args[0]).serialize();const e=this.type.kind==="array"?[]:[`to-${this.type.kind}`];return this.eachChild(i=>{e.push(i.serialize())}),e}}const ed=["Unknown","Point","LineString","Polygon"];class Kl{constructor(e,i){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null,this.scope=e,this.options=i}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?ed[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}measureLight(e){return this.globals.brightness||0}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const e=this.featureDistanceData.center,i=this.featureDistanceData.scale,{x:s,y:a}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(s*i-e[0])+this.featureDistanceData.bearing[1]*(a*i-e[1])}return 0}parseColor(e){let i=this._parseColorCache[e];return i||(i=this._parseColorCache[e]=Jt.parse(e)),i}getConfig(e){return this.options?this.options.get(e):null}}class zr{constructor(e,i,s,a,h){this.name=e,this.type=i,this._evaluate=s,this.args=a,this._overloadIndex=h}evaluate(e){if(!this._evaluate){const i=zr.definitions[this.name];this._evaluate=Array.isArray(i)?i[2]:i.overloads[this._overloadIndex][1]}return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,i){const s=e[0],a=zr.definitions[s];if(!a)return i.error(`Unknown expression "${s}". If you wanted a literal array, use ["literal", [...]].`,0);const h=Array.isArray(a)?a[0]:a.type,u=Array.isArray(a)?[[a[1],a[2]]]:a.overloads,f=[];let _=null,g=-1;for(const[v,b]of u){if(Array.isArray(v)&&v.length!==e.length-1)continue;f.push(v),g++,_=new hd(i.registry,i.path,null,i.scope,void 0,i._scope,i.options);const T=[];let A=!1;for(let M=1;M<e.length;M++){const P=e[M],k=Array.isArray(v)?v[M-1]:v.type,F=_.parse(P,1+T.length,k);if(!F){A=!0;break}T.push(F)}if(!A)if(Array.isArray(v)&&v.length!==T.length)_.error(`Expected ${v.length} arguments, but found ${T.length} instead.`);else{for(let M=0;M<T.length;M++){const P=Array.isArray(v)?v[M]:v.type,k=T[M];_.concat(M+1).checkSubtype(P,k.type)}if(_.errors.length===0)return new zr(s,h,b,T,g)}}if(f.length===1)i.errors.push(..._.errors);else{const v=(f.length?f:u.map(([T])=>T)).map(Ur).join(" | "),b=[];for(let T=1;T<e.length;T++){const A=i.parse(e[T],1+b.length);if(!A)return null;b.push(cr(A.type))}i.error(`Expected arguments of type ${v}, but found (${b.join(", ")}) instead.`)}return null}static register(e,i){zr.definitions=i;for(const s in i)e[s]=zr}}function Ur(r){return Array.isArray(r)?`(${r.map(cr).join(", ")})`:`(${cr(r.type)}...)`}class Jn{constructor(e,i,s){this.type=mn,this.locale=s,this.caseSensitive=e,this.diacriticSensitive=i}static parse(e,i){if(e.length!==2)return i.error("Expected one argument.");const s=e[1];if(typeof s!="object"||Array.isArray(s))return i.error("Collator options argument must be an object.");const a=s["case-sensitive"]===void 0?i.parse(!1,1,ri):i.parseObjectValue(s["case-sensitive"],1,"case-sensitive",ri);if(!a)return null;const h=s["diacritic-sensitive"]===void 0?i.parse(!1,1,ri):i.parseObjectValue(s["diacritic-sensitive"],1,"diacritic-sensitive",ri);if(!h)return null;let u=null;return s.locale&&(u=i.parseObjectValue(s.locale,1,"locale",ui),!u)?null:new Jn(a,h,u)}evaluate(e){return new Ds(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}serialize(){const e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]}}function Rs(r,e,i=0,s=r.length-1,a=yn){for(;s>i;){if(s-i>600){const _=s-i+1,g=e-i+1,v=Math.log(_),b=.5*Math.exp(2*v/3),T=.5*Math.sqrt(v*b*(_-b)/_)*(g-_/2<0?-1:1);Rs(r,e,Math.max(i,Math.floor(e-g*b/_+T)),Math.min(s,Math.floor(e+(_-g)*b/_+T)),a)}const h=r[e];let u=i,f=s;for(gn(r,i,e),a(r[s],h)>0&&gn(r,i,s);u<f;){for(gn(r,u,f),u++,f--;a(r[u],h)<0;)u++;for(;a(r[f],h)>0;)f--}a(r[i],h)===0?gn(r,i,f):(f++,gn(r,f,s)),f<=e&&(i=f+1),e<=f&&(s=f-1)}}function gn(r,e,i){const s=r[e];r[e]=r[i],r[i]=s}function yn(r,e){return r<e?-1:r>e?1:0}function jr(r){let e=0;for(let i,s,a=0,h=r.length,u=h-1;a<h;u=a++)i=r[a],s=r[u],e+=(s.x-i.x)*(i.y+s.y);return e}function Ja(r,e){r[0]=Math.min(r[0],e[0]),r[1]=Math.min(r[1],e[1]),r[2]=Math.max(r[2],e[0]),r[3]=Math.max(r[3],e[1])}function el(r,e){return!(r[0]<=e[0]||r[2]>=e[2]||r[1]<=e[1]||r[3]>=e[3])}function Yp(r,e,i){const s=r[0]-e[0],a=r[1]-e[1],h=r[0]-i[0],u=r[1]-i[1];return s*u-h*a==0&&s*h<=0&&a*u<=0}function ls(r,e,i=!1){let s=!1;for(let f=0,_=e.length;f<_;f++){const g=e[f];for(let v=0,b=g.length,T=b-1;v<b;T=v++){const A=g[T],M=g[v];if(Yp(r,A,M))return i;(h=A)[1]>(a=r)[1]!=(u=M)[1]>a[1]&&a[0]<(u[0]-h[0])*(a[1]-h[1])/(u[1]-h[1])+h[0]&&(s=!s)}}var a,h,u;return s}function mh(r,e,i,s){const a=s[0]-i[0],h=s[1]-i[1],u=(r[0]-i[0])*h-a*(r[1]-i[1]),f=(e[0]-i[0])*h-a*(e[1]-i[1]);return u>0&&f<0||u<0&&f>0}function qo(r,e,i,s){return(a=[s[0]-i[0],s[1]-i[1]])[0]*(h=[e[0]-r[0],e[1]-r[1]])[1]-a[1]*h[0]!=0&&!(!mh(r,e,i,s)||!mh(i,s,r,e));var a,h}function _h(r){const e=new We(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),i=new We(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);for(const s of r[0])e.x>s.x&&(e.x=s.x),e.y>s.y&&(e.y=s.y),i.x<s.x&&(i.x=s.x),i.y<s.y&&(i.y=s.y);return{min:e,max:i}}const Ls=8192;function Kp(r,e){const i=(180+r[0])/360,s=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r[1]*Math.PI/360)))/360,a=Math.pow(2,e.z);return[Math.round(i*a*Ls),Math.round(s*a*Ls)]}function Qp(r,e){for(let i=0;i<e.length;i++)if(ls(r,e[i]))return!0;return!1}function td(r,e,i){for(const s of i)for(let a=0,h=s.length,u=h-1;a<h;u=a++)if(qo(r,e,s[u],s[a]))return!0;return!1}function id(r,e){for(let i=0;i<r.length;++i)if(!ls(r[i],e))return!1;for(let i=0;i<r.length-1;++i)if(td(r[i],r[i+1],e))return!1;return!0}function Jp(r,e){for(let i=0;i<e.length;i++)if(id(r,e[i]))return!0;return!1}function Ql(r,e,i){const s=[];for(let a=0;a<r.length;a++){const h=[];for(let u=0;u<r[a].length;u++){const f=Kp(r[a][u],i);Ja(e,f),h.push(f)}s.push(h)}return s}function rd(r,e,i){const s=[];for(let a=0;a<r.length;a++){const h=Ql(r[a],e,i);s.push(h)}return s}function ks(r,e,i,s){if(r[0]<i[0]||r[0]>i[2]){const a=.5*s;let h=r[0]-i[0]>a?-s:i[0]-r[0]>a?s:0;h===0&&(h=r[0]-i[2]>a?-s:i[2]-r[0]>a?s:0),r[0]+=h}Ja(e,r)}function od(r,e,i,s){const a=Math.pow(2,s.z)*Ls,h=[s.x*Ls,s.y*Ls],u=[];if(!r)return u;for(const f of r)for(const _ of f){const g=[_.x+h[0],_.y+h[1]];ks(g,e,i,a),u.push(g)}return u}function sd(r,e,i,s){const a=Math.pow(2,s.z)*Ls,h=[s.x*Ls,s.y*Ls],u=[];if(!r)return u;for(const _ of r){const g=[];for(const v of _){const b=[v.x+h[0],v.y+h[1]];Ja(e,b),g.push(b)}u.push(g)}if(e[2]-e[0]<=a/2){(f=e)[0]=f[1]=1/0,f[2]=f[3]=-1/0;for(const _ of u)for(const g of _)ks(g,e,i,a)}var f;return u}class cs{constructor(e,i){this.type=ri,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(Kn(e[1])){const s=e[1];if(s.type==="FeatureCollection")for(let a=0;a<s.features.length;++a){const h=s.features[a].geometry.type;if(h==="Polygon"||h==="MultiPolygon")return new cs(s,s.features[a].geometry)}else if(s.type==="Feature"){const a=s.geometry.type;if(a==="Polygon"||a==="MultiPolygon")return new cs(s,s.geometry)}else if(s.type==="Polygon"||s.type==="MultiPolygon")return new cs(s,s)}return i.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return function(i,s){const a=[1/0,1/0,-1/0,-1/0],h=[1/0,1/0,-1/0,-1/0],u=i.canonicalID();if(!u)return!1;if(s.type==="Polygon"){const f=Ql(s.coordinates,h,u),_=od(i.geometry(),a,h,u);if(!el(a,h))return!1;for(const g of _)if(!ls(g,f))return!1}if(s.type==="MultiPolygon"){const f=rd(s.coordinates,h,u),_=od(i.geometry(),a,h,u);if(!el(a,h))return!1;for(const g of _)if(!Qp(g,f))return!1}return!0}(e,this.geometries);if(e.geometryType()==="LineString")return function(i,s){const a=[1/0,1/0,-1/0,-1/0],h=[1/0,1/0,-1/0,-1/0],u=i.canonicalID();if(!u)return!1;if(s.type==="Polygon"){const f=Ql(s.coordinates,h,u),_=sd(i.geometry(),a,h,u);if(!el(a,h))return!1;for(const g of _)if(!id(g,f))return!1}if(s.type==="MultiPolygon"){const f=rd(s.coordinates,h,u),_=sd(i.geometry(),a,h,u);if(!el(a,h))return!1;for(const g of _)if(!Jp(g,f))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}const tl={kilometers:1,miles:1e3/1609.344,nauticalmiles:1e3/1852,meters:1e3,metres:1e3,yards:1e3/.9144,feet:1e3/.3048,inches:1e3/.0254},gh=1/298.257223563,go=gh*(2-gh),ea=Math.PI/180;class ta{static fromTile(e,i,s){const a=Math.PI*(1-2*(e+.5)/Math.pow(2,i)),h=Math.atan(.5*(Math.exp(a)-Math.exp(-a)))/ea;return new ta(h,s)}static get units(){return tl}constructor(e,i){if(e===void 0)throw new Error("No latitude given.");if(i&&!tl[i])throw new Error(`Unknown unit ${i}. Use one of: ${Object.keys(tl).join(", ")}`);const s=6378.137*ea*(i?tl[i]:1),a=Math.cos(e*ea),h=1/(1-go*(1-a*a)),u=Math.sqrt(h);this.kx=s*u*a,this.ky=s*u*h*(1-go)}distance(e,i){const s=co(e[0]-i[0])*this.kx,a=(e[1]-i[1])*this.ky;return Math.sqrt(s*s+a*a)}bearing(e,i){const s=co(i[0]-e[0])*this.kx;return Math.atan2(s,(i[1]-e[1])*this.ky)/ea}destination(e,i,s){const a=s*ea;return this.offset(e,Math.sin(a)*i,Math.cos(a)*i)}offset(e,i,s){return[e[0]+i/this.kx,e[1]+s/this.ky]}lineDistance(e){let i=0;for(let s=0;s<e.length-1;s++)i+=this.distance(e[s],e[s+1]);return i}area(e){let i=0;for(let s=0;s<e.length;s++){const a=e[s];for(let h=0,u=a.length,f=u-1;h<u;f=h++)i+=co(a[h][0]-a[f][0])*(a[h][1]+a[f][1])*(s?-1:1)}return Math.abs(i)/2*this.kx*this.ky}along(e,i){let s=0;if(i<=0)return e[0];for(let a=0;a<e.length-1;a++){const h=e[a],u=e[a+1],f=this.distance(h,u);if(s+=f,s>i)return Jl(h,u,(i-(s-f))/f)}return e[e.length-1]}pointToSegmentDistance(e,i,s){let[a,h]=i,u=co(s[0]-a)*this.kx,f=(s[1]-h)*this.ky;if(u!==0||f!==0){const _=(co(e[0]-a)*this.kx*u+(e[1]-h)*this.ky*f)/(u*u+f*f);_>1?(a=s[0],h=s[1]):_>0&&(a+=u/this.kx*_,h+=f/this.ky*_)}return u=co(e[0]-a)*this.kx,f=(e[1]-h)*this.ky,Math.sqrt(u*u+f*f)}pointOnLine(e,i){let s=1/0,a=e[0][0],h=e[0][1],u=0,f=0;for(let _=0;_<e.length-1;_++){let g=e[_][0],v=e[_][1],b=co(e[_+1][0]-g)*this.kx,T=(e[_+1][1]-v)*this.ky,A=0;b===0&&T===0||(A=(co(i[0]-g)*this.kx*b+(i[1]-v)*this.ky*T)/(b*b+T*T),A>1?(g=e[_+1][0],v=e[_+1][1]):A>0&&(g+=b/this.kx*A,v+=T/this.ky*A)),b=co(i[0]-g)*this.kx,T=(i[1]-v)*this.ky;const M=b*b+T*T;M<s&&(s=M,a=g,h=v,u=_,f=A)}return{point:[a,h],index:u,t:Math.max(0,Math.min(1,f))}}lineSlice(e,i,s){let a=this.pointOnLine(s,e),h=this.pointOnLine(s,i);if(a.index>h.index||a.index===h.index&&a.t>h.t){const g=a;a=h,h=g}const u=[a.point],f=a.index+1,_=h.index;!yh(s[f],u[0])&&f<=_&&u.push(s[f]);for(let g=f+1;g<=_;g++)u.push(s[g]);return yh(s[_],h.point)||u.push(h.point),u}lineSliceAlong(e,i,s){let a=0;const h=[];for(let u=0;u<s.length-1;u++){const f=s[u],_=s[u+1],g=this.distance(f,_);if(a+=g,a>e&&h.length===0&&h.push(Jl(f,_,(e-(a-g))/g)),a>=i)return h.push(Jl(f,_,(i-(a-g))/g)),h;a>e&&h.push(_)}return h}bufferPoint(e,i){const s=i/this.ky,a=i/this.kx;return[e[0]-a,e[1]-s,e[0]+a,e[1]+s]}bufferBBox(e,i){const s=i/this.ky,a=i/this.kx;return[e[0]-a,e[1]-s,e[2]+a,e[3]+s]}insideBBox(e,i){return co(e[0]-i[0])>=0&&co(e[0]-i[2])<=0&&e[1]>=i[1]&&e[1]<=i[3]}}function yh(r,e){return r[0]===e[0]&&r[1]===e[1]}function Jl(r,e,i){const s=co(e[0]-r[0]);return[r[0]+s*i,r[1]+(e[1]-r[1])*i]}function co(r){for(;r<-180;)r+=360;for(;r>180;)r-=360;return r}class ec{constructor(e=[],i=(s,a)=>s<a?-1:s>a?1:0){if(this.data=e,this.length=this.data.length,this.compare=i,this.length>0)for(let s=(this.length>>1)-1;s>=0;s--)this._down(s)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)return;const e=this.data[0],i=this.data.pop();return--this.length>0&&(this.data[0]=i,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:i,compare:s}=this,a=i[e];for(;e>0;){const h=e-1>>1,u=i[h];if(s(a,u)>=0)break;i[e]=u,e=h}i[e]=a}_down(e){const{data:i,compare:s}=this,a=this.length>>1,h=i[e];for(;e<a;){let u=1+(e<<1);const f=u+1;if(f<this.length&&s(i[f],i[u])<0&&(u=f),s(i[u],h)>=0)break;i[e]=i[u],e=u}i[e]=h}}var Xe=8192;function xh(r,e){return e.dist-r.dist}const tc=100,ic=50;function vh(r){const e=[1/0,1/0,-1/0,-1/0];if(e.length!==r.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==r[i])return!1;return!0}function xn(r){return r[1]-r[0]+1}function yo(r,e){const i=r[1]>=r[0]&&r[1]<e;return i||console.warn("Distance Expression: Index is out of range"),i}function ia(r,e){if(r[0]>r[1])return[null,null];const i=xn(r);if(e){if(i===2)return[r,null];const s=Math.floor(i/2);return[[r[0],r[0]+s],[r[0]+s,r[1]]]}{if(i===1)return[r,null];const s=Math.floor(i/2)-1;return[[r[0],r[0]+s],[r[0]+s+1,r[1]]]}}function Os(r,e){const i=[1/0,1/0,-1/0,-1/0];if(!yo(e,r.length))return i;for(let s=e[0];s<=e[1];++s)Ja(i,r[s]);return i}function il(r){const e=[1/0,1/0,-1/0,-1/0];for(let i=0;i<r.length;++i)for(let s=0;s<r[i].length;++s)Ja(e,r[i][s]);return e}function vn(r,e,i){if(vh(r)||vh(e))return NaN;let s=0,a=0;return r[2]<e[0]&&(s=e[0]-r[2]),r[0]>e[2]&&(s=r[0]-e[2]),r[1]>e[3]&&(a=r[1]-e[3]),r[3]<e[1]&&(a=e[1]-r[3]),i.distance([0,0],[s,a])}function ra(r){return 360*r-180}function Wt(r){return 360/Math.PI*Math.atan(Math.exp((180-360*r)*Math.PI/180))-90}function bh(r,e){const i=Math.pow(2,e.z),s=(r.y/Xe+e.y)/i;return[ra((r.x/Xe+e.x)/i),Wt(s)]}function ef(r,e){const i=[];for(let s=0;s<r.length;++s)i.push(bh(r[s],e));return i}function nd(r,e,i){const s=i.pointOnLine(e,r).point;return i.distance(r,s)}function wh(r,e,i,s,a){const h=i.slice(s[0],s[1]+1);let u=1/0;for(let f=e[0];f<=e[1];++f)if((u=Math.min(u,nd(r[f],h,a)))===0)return 0;return u}function Th(r,e,i,s,a){const h=Math.min(a.pointToSegmentDistance(r,i,s),a.pointToSegmentDistance(e,i,s)),u=Math.min(a.pointToSegmentDistance(i,r,e),a.pointToSegmentDistance(s,r,e));return Math.min(h,u)}function Gi(r,e,i,s,a){if(!yo(e,r.length)||!yo(s,i.length))return NaN;let h=1/0;for(let u=e[0];u<e[1];++u)for(let f=s[0];f<s[1];++f){if(qo(r[u],r[u+1],i[f],i[f+1]))return 0;h=Math.min(h,Th(r[u],r[u+1],i[f],i[f+1],a))}return h}function tf(r,e,i,s,a){if(!yo(e,r.length)||!yo(s,i.length))return NaN;let h=1/0;for(let u=e[0];u<=e[1];++u)for(let f=s[0];f<=s[1];++f)if((h=Math.min(h,a.distance(r[u],i[f])))===0)return h;return h}function rf(r,e,i){if(ls(r,e,!0))return 0;let s=1/0;for(const a of e){const h=a.length;if(h<2)return console.warn("Distance Expression: Invalid polygon!"),NaN;if(a[0]!==a[h-1]&&(s=Math.min(s,i.pointToSegmentDistance(r,a[h-1],a[0])))===0||(s=Math.min(s,nd(r,a,i)))===0)return s}return s}function of(r,e,i,s){if(!yo(e,r.length))return NaN;for(let h=e[0];h<=e[1];++h)if(ls(r[h],i,!0))return 0;let a=1/0;for(let h=e[0];h<e[1];++h)for(const u of i)for(let f=0,_=u.length,g=_-1;f<_;g=f++){if(qo(r[h],r[h+1],u[g],u[f]))return 0;a=Math.min(a,Th(r[h],r[h+1],u[g],u[f],s))}return a}function ad(r,e){for(const i of r)for(let s=0;s<=i.length-1;++s)if(ls(i[s],e,!0))return!0;return!1}function sf(r,e,i,s=1/0){const a=il(r),h=il(e);if(s!==1/0&&vn(a,h,i)>=s)return s;if(el(a,h)){if(ad(r,e))return 0}else if(ad(e,r))return 0;let u=s;for(const f of r)for(let _=0,g=f.length,v=g-1;_<g;v=_++)for(const b of e)for(let T=0,A=b.length,M=A-1;T<A;M=T++){if(qo(f[v],f[_],b[M],b[T]))return 0;u=Math.min(u,Th(f[v],f[_],b[M],b[T],i))}return u}function rc(r,e,i,s,a,h,u){if(h===null||u===null)return;const f=vn(Os(s,h),Os(a,u),i);f<e&&r.push({dist:f,range1:h,range2:u})}function nf(r,e,i,s,a=1/0){let h=Math.min(s.distance(r[0],i[0][0]),a);if(h===0)return h;const u=new ec([{dist:0,range1:[0,r.length-1],range2:[0,0]}],xh),f=e?ic:tc,_=il(i);for(;u.length;){const g=u.pop();if(g.dist>=h)continue;const v=g.range1;if(xn(v)<=f){if(!yo(v,r.length))return NaN;if(e){const b=of(r,v,i,s);if((h=Math.min(h,b))===0)return h}else for(let b=v[0];b<=v[1];++b){const T=rf(r[b],i,s);if((h=Math.min(h,T))===0)return h}}else{const b=ia(v,e);if(b[0]!==null){const T=vn(Os(r,b[0]),_,s);T<h&&u.push({dist:T,range1:b[0],range2:[0,0]})}if(b[1]!==null){const T=vn(Os(r,b[1]),_,s);T<h&&u.push({dist:T,range1:b[1],range2:[0,0]})}}}return h}function ld(r,e,i,s,a,h=1/0){let u=Math.min(h,a.distance(r[0],i[0]));if(u===0)return u;const f=new ec([{dist:0,range1:[0,r.length-1],range2:[0,i.length-1]}],xh),_=e?ic:tc,g=s?ic:tc;for(;f.length;){const v=f.pop();if(v.dist>=u)continue;const b=v.range1,T=v.range2;if(xn(b)<=_&&xn(T)<=g){if(!yo(b,r.length)||!yo(T,i.length))return NaN;if(e&&s?u=Math.min(u,Gi(r,b,i,T,a)):e||s?e&&!s?u=Math.min(u,wh(i,T,r,b,a)):!e&&s&&(u=Math.min(u,wh(r,b,i,T,a))):u=Math.min(u,tf(r,b,i,T,a)),u===0)return u}else{const A=ia(b,e),M=ia(T,s);rc(f,u,a,r,i,A[0],M[0]),rc(f,u,a,r,i,A[0],M[1]),rc(f,u,a,r,i,A[1],M[0]),rc(f,u,a,r,i,A[1],M[1])}}return u}function Sh(r,e,i,s,a=1/0){let h=a;const u=Os(r,[0,r.length-1]);for(const f of i)if(!(h!==1/0&&vn(u,Os(f,[0,f.length-1]),s)>=h)&&(h=Math.min(h,ld(r,e,f,!0,s,h)),h===0))return h;return h}function oc(r,e,i,s,a=1/0){let h=a;const u=Os(r,[0,r.length-1]);for(const f of i){if(h!==1/0&&vn(u,il(f),s)>=h)continue;const _=nf(r,e,f,s,h);if(isNaN(_))return _;if((h=Math.min(h,_))===0)return h}return h}function Eh(r){return r==="Point"||r==="MultiPoint"||r==="LineString"||r==="MultiLineString"||r==="Polygon"||r==="MultiPolygon"}class bn{constructor(e,i){this.type=dt,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'distance' expression requires either one argument, but found ' ${e.length-1} instead.`);if(Kn(e[1])){const s=e[1];if(s.type==="FeatureCollection"){for(let a=0;a<s.features.length;++a)if(Eh(s.features[a].geometry.type))return new bn(s,s.features[a].geometry)}else if(s.type==="Feature"){if(Eh(s.geometry.type))return new bn(s,s.geometry)}else if(Eh(s.type))return new bn(s,s)}return i.error("'distance' expression needs to be an array with format ['Distance', GeoJSONObj].")}evaluate(e){const i=e.geometry(),s=e.canonicalID();if(i!=null&&s!=null){if(e.geometryType()==="Point")return function(a,h,u){const f=[];for(const g of a)for(const v of g)f.push(bh(v,h));const _=new ta(f[0][1],"meters");return u.type==="Point"||u.type==="MultiPoint"||u.type==="LineString"?ld(f,!1,u.type==="Point"?[u.coordinates]:u.coordinates,u.type==="LineString",_):u.type==="MultiLineString"?Sh(f,!1,u.coordinates,_):u.type==="Polygon"||u.type==="MultiPolygon"?oc(f,!1,u.type==="Polygon"?[u.coordinates]:u.coordinates,_):null}(i,s,this.geometries);if(e.geometryType()==="LineString")return function(a,h,u){const f=[];for(const g of a){const v=[];for(const b of g)v.push(bh(b,h));f.push(v)}const _=new ta(f[0][0][1],"meters");if(u.type==="Point"||u.type==="MultiPoint"||u.type==="LineString")return Sh(u.type==="Point"?[u.coordinates]:u.coordinates,u.type==="LineString",f,_);if(u.type==="MultiLineString"){let g=1/0;for(let v=0;v<u.coordinates.length;v++){const b=Sh(u.coordinates[v],!0,f,_,g);if(isNaN(b))return b;if((g=Math.min(g,b))===0)return g}return g}if(u.type==="Polygon"||u.type==="MultiPolygon"){let g=1/0;for(let v=0;v<f.length;v++){const b=oc(f[v],!0,u.type==="Polygon"?[u.coordinates]:u.coordinates,_,g);if(isNaN(b))return b;if((g=Math.min(g,b))===0)return g}return g}return null}(i,s,this.geometries);if(e.geometryType()==="Polygon")return function(a,h,u){const f=[];for(const g of function(v,b){const T=v.length;if(T<=1)return[v];const A=[];let M,P;for(let k=0;k<T;k++){const F=jr(v[k]);F!==0&&(v[k].area=Math.abs(F),P===void 0&&(P=F<0),P===F<0?(M&&A.push(M),M=[v[k]]):M.push(v[k]))}return M&&A.push(M),A}(a)){const v=[];for(let b=0;b<g.length;++b)v.push(ef(g[b],h));f.push(v)}const _=new ta(f[0][0][0][1],"meters");if(u.type==="Point"||u.type==="MultiPoint"||u.type==="LineString")return oc(u.type==="Point"?[u.coordinates]:u.coordinates,u.type==="LineString",f,_);if(u.type==="MultiLineString"){let g=1/0;for(let v=0;v<u.coordinates.length;v++){const b=oc(u.coordinates[v],!0,f,_,g);if(isNaN(b))return b;if((g=Math.min(g,b))===0)return g}return g}return u.type==="Polygon"||u.type==="MultiPolygon"?function(g,v,b){let T=1/0;for(const A of g)for(const M of v){const P=sf(A,M,b,T);if(isNaN(P))return P;if((T=Math.min(T,P))===0)return T}return T}(u.type==="Polygon"?[u.coordinates]:u.coordinates,f,_):null}(i,s,this.geometries);console.warn("Distance Expression: currently only evaluates valid Point/LineString/Polygon geometries.")}else console.warn("Distance Expression: requirs valid feature and canonical information.");return null}eachChild(){}outputDefined(){return!0}serialize(){return["distance",this.geojson]}}function Ih(r,e){switch(r){case"string":return Vr(e);case"number":return+e;case"boolean":return!!e;case"color":return Jt.parse(e);case"formatted":return Nr.fromString(Vr(e));case"resolvedImage":return Yr.build(Vr(e))}return e}function cd(r,e,i,s){return s!==void 0&&(r=s*Math.round(r/s)),e!==void 0&&r<e&&(r=e),i!==void 0&&r>i&&(r=i),r}class oa{constructor(e,i,s){this.type=e,this.key=i,this.scope=s}static parse(e,i){let s=i.expectedType;if(s==null&&(s=ti),e.length<2||e.length>3)return i.error("Invalid number of arguments for 'config' expression.");const a=i.parse(e[1],1);if(!(a instanceof zt))return i.error("Key name of 'config' expression must be a string literal.");if(e.length>=3){const h=i.parse(e[2],2);return h instanceof zt?new oa(s,Vr(a.value),Vr(h.value)):i.error("Scope of 'config' expression must be a string literal.")}return new oa(s,Vr(a.value))}evaluate(e){const i=[this.key,this.scope,e.scope].filter(Boolean).join(""),s=e.getConfig(i);if(!s)return null;const{type:a,value:h,values:u,minValue:f,maxValue:_,stepValue:g}=s,v=s.default.evaluate(e);let b=v;if(h){const T=e.scope;e.scope=(T||"").split("").slice(1).join(""),b=h.evaluate(e),e.scope=T}return a&&(b=Ih(a,b)),b===void 0||f===void 0&&_===void 0&&g===void 0||(typeof b=="number"?b=cd(b,f,_,g):Array.isArray(b)&&(b=b.map(T=>typeof T=="number"?cd(T,f,_,g):T))),h!==void 0&&b!==void 0&&u&&!u.includes(b)&&(b=v,a&&(b=Ih(a,b))),(a&&a!==this.type||b!==void 0&&pr(b)!==this.type)&&(b=Ih(this.type.kind,b)),b}eachChild(){}outputDefined(){return!1}serialize(){const e=["config",this.key];return this.scope&&e.concat(this.key),e}}function rl(r){if(r instanceof zr&&(r.name==="get"&&r.args.length===1||r.name==="feature-state"||r.name==="has"&&r.args.length===1||r.name==="properties"||r.name==="geometry-type"||r.name==="id"||/^filter-/.test(r.name))||r instanceof cs||r instanceof bn)return!1;let e=!0;return r.eachChild(i=>{e&&!rl(i)&&(e=!1)}),e}function sc(r){if(r instanceof zr&&r.name==="feature-state")return!1;let e=!0;return r.eachChild(i=>{e&&!sc(i)&&(e=!1)}),e}function nc(r){if(r instanceof oa)return new Set([r.key]);let e=new Set;return r.eachChild(i=>{e=new Set([...e,...nc(i)])}),e}function sa(r,e){if(r instanceof zr&&e.indexOf(r.name)>=0)return!1;let i=!0;return r.eachChild(s=>{i&&!sa(s,e)&&(i=!1)}),i}class ac{constructor(e,i){this.type=i.type,this.name=e,this.boundExpression=i}static parse(e,i){if(e.length!==2||typeof e[1]!="string")return i.error("'var' expression requires exactly one string literal argument.");const s=e[1];return i.scope.has(s)?new ac(s,i.scope.get(s)):i.error(`Unknown variable "${s}". Make sure "${s}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}class Ah{constructor(e,i=[],s,a=new fn,h=[],u,f){this.registry=e,this.path=i,this.key=i.map(_=>typeof _=="string"?`['${_}']`:`[${_}]`).join(""),this.scope=a,this.errors=h,this.expectedType=s,this._scope=u,this.options=f}parse(e,i,s,a,h={}){return i||s?this.concat(i,null,s,a)._parse(e,h):this._parse(e,h)}parseObjectValue(e,i,s,a,h,u={}){return this.concat(i,s,a,h)._parse(e,u)}_parse(e,i){function s(a,h,u){return u==="assert"?new vt(h,[a]):u==="coerce"?new Mo(h,[a]):a}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const a=typeof e[0]=="string"?this.registry[e[0]]:void 0;if(a){let h=a.parse(e,this);if(!h)return null;if(this.expectedType){const u=this.expectedType,f=h.type;if(u.kind!=="string"&&u.kind!=="number"&&u.kind!=="boolean"&&u.kind!=="object"&&u.kind!=="array"||f.kind!=="value")if(u.kind!=="color"&&u.kind!=="formatted"&&u.kind!=="resolvedImage"||f.kind!=="value"&&f.kind!=="string"){if(this.checkSubtype(u,f))return null}else h=s(h,u,i.typeAnnotation||"coerce");else h=s(h,u,i.typeAnnotation||"assert")}if(!(h instanceof zt)&&h.type.kind!=="resolvedImage"&&Mh(h)){const u=new Kl(this._scope,this.options);try{h=new zt(h.type,h.evaluate(u))}catch(f){return this.error(f.message),null}}return h}return Mo.parse(["to-array",e],this)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,i,s,a){let h=typeof e=="number"?this.path.concat(e):this.path;h=typeof i=="string"?h.concat(i):h;const u=a?this.scope.concat(a):this.scope;return new Ah(this.registry,h,s||null,u,this.errors,this._scope,this.options)}error(e,...i){const s=`${this.key}${i.map(a=>`[${a}]`).join("")}`;this.errors.push(new _o(s,e))}checkSubtype(e,i){const s=Ka(e,i);return s&&this.error(s),s}}var hd=Ah;function Mh(r){if(r instanceof ac)return Mh(r.boundExpression);if(r instanceof zr&&r.name==="error"||r instanceof Jn||r instanceof cs||r instanceof bn||r instanceof oa)return!1;const e=r instanceof Mo||r instanceof vt;let i=!0;return r.eachChild(s=>{i=e?i&&Mh(s):i&&s instanceof zt}),!!i&&rl(r)&&sa(r,["zoom","heatmap-density","line-progress","raster-value","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center","measure-light","raster-particle-speed"])}function lc(r,e){const i=r.length-1;let s,a,h=0,u=i,f=0;for(;h<=u;)if(f=Math.floor((h+u)/2),s=r[f],a=r[f+1],s<=e){if(f===i||e<a)return f;h=f+1}else{if(!(s>e))throw new rt("Input is not a number.");u=f-1}return 0}class ol{constructor(e,i,s){this.type=e,this.input=i,this.labels=[],this.outputs=[];for(const[a,h]of s)this.labels.push(a),this.outputs.push(h)}static parse(e,i){if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");const s=i.parse(e[1],1,dt);if(!s)return null;const a=[];let h=null;i.expectedType&&i.expectedType.kind!=="value"&&(h=i.expectedType);for(let u=1;u<e.length;u+=2){const f=u===1?-1/0:e[u],_=e[u+1],g=u,v=u+1;if(typeof f!="number")return i.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',g);if(a.length&&a[a.length-1][0]>=f)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',g);const b=i.parse(_,v,h);if(!b)return null;h=h||b.type,a.push([f,b])}return new ol(h,s,a)}evaluate(e){const i=this.labels,s=this.outputs;if(i.length===1)return s[0].evaluate(e);const a=this.input.evaluate(e);if(a<=i[0])return s[0].evaluate(e);const h=i.length;return a>=i[h-1]?s[h-1].evaluate(e):s[lc(i,a)].evaluate(e)}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let i=0;i<this.labels.length;i++)i>0&&e.push(this.labels[i]),e.push(this.outputs[i].serialize());return e}}const ud=.95047,dd=1.08883,pd=4/29,na=6/29,fd=3*na*na,af=na*na*na,Ch=Math.PI/180,lf=180/Math.PI;function cc(r){return r>af?Math.pow(r,1/3):r/fd+pd}function Ph(r){return r>na?r*r*r:fd*(r-pd)}function zh(r){return 255*(r<=.0031308?12.92*r:1.055*Math.pow(r,1/2.4)-.055)}function Dh(r){return(r/=255)<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function Rh(r){const e=Dh(r.r),i=Dh(r.g),s=Dh(r.b),a=cc((.4124564*e+.3575761*i+.1804375*s)/ud),h=cc((.2126729*e+.7151522*i+.072175*s)/1);return{l:116*h-16,a:500*(a-h),b:200*(h-cc((.0193339*e+.119192*i+.9503041*s)/dd)),alpha:r.a}}function Lh(r){let e=(r.l+16)/116,i=isNaN(r.a)?e:e+r.a/500,s=isNaN(r.b)?e:e-r.b/200;return e=1*Ph(e),i=ud*Ph(i),s=dd*Ph(s),new Jt(zh(3.2404542*i-1.5371385*e-.4985314*s),zh(-.969266*i+1.8760108*e+.041556*s),zh(.0556434*i-.2040259*e+1.0572252*s),r.alpha)}function aa(r,e,i){const s=e-r;return r+i*(s>180||s<-180?s-360*Math.round(s/360):s)}const la={forward:Rh,reverse:Lh,interpolate:function(r,e,i){return{l:ft(r.l,e.l,i),a:ft(r.a,e.a,i),b:ft(r.b,e.b,i),alpha:ft(r.alpha,e.alpha,i)}}},ca={forward:function(r){const{l:e,a:i,b:s}=Rh(r),a=Math.atan2(s,i)*lf;return{h:a<0?a+360:a,c:Math.sqrt(i*i+s*s),l:e,alpha:r.a}},reverse:function(r){const e=r.h*Ch,i=r.c;return Lh({l:r.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:r.alpha})},interpolate:function(r,e,i){return{h:aa(r.h,e.h,i),c:ft(r.c,e.c,i),l:ft(r.l,e.l,i),alpha:ft(r.alpha,e.alpha,i)}}};var md=Object.freeze({__proto__:null,hcl:ca,lab:la});class Kr{constructor(e,i,s,a,h){this.type=e,this.operator=i,this.interpolation=s,this.input=a,this.labels=[],this.outputs=[];for(const[u,f]of h)this.labels.push(u),this.outputs.push(f)}static interpolationFactor(e,i,s,a){let h=0;if(e.name==="exponential")h=sl(i,e.base,s,a);else if(e.name==="linear")h=sl(i,1,s,a);else if(e.name==="cubic-bezier"){const u=e.controlPoints;h=new Bl(u[0],u[1],u[2],u[3]).solve(sl(i,1,s,a))}return h}static parse(e,i){let[s,a,h,...u]=e;if(!Array.isArray(a)||a.length===0)return i.error("Expected an interpolation type expression.",1);if(a[0]==="linear")a={name:"linear"};else if(a[0]==="exponential"){const g=a[1];if(typeof g!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);a={name:"exponential",base:g}}else{if(a[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(a[0])}`,1,0);{const g=a.slice(1);if(g.length!==4||g.some(v=>typeof v!="number"||v<0||v>1))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);a={name:"cubic-bezier",controlPoints:g}}}if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length-1>3&&(e.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(h=i.parse(h,2,dt),!h)return null;const f=[];let _=null;s==="interpolate-hcl"||s==="interpolate-lab"?_=$r:i.expectedType&&i.expectedType.kind!=="value"&&(_=i.expectedType);for(let g=0;g<u.length;g+=2){const v=u[g],b=u[g+1],T=g+3,A=g+4;if(typeof v!="number")return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',T);if(f.length&&f[f.length-1][0]>=v)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',T);const M=i.parse(b,A,_);if(!M)return null;_=_||M.type,f.push([v,M])}return _.kind==="number"||_.kind==="color"||_.kind==="array"&&_.itemType.kind==="number"&&typeof _.N=="number"?new Kr(_,s,a,h,f):i.error(`Type ${cr(_)} is not interpolatable.`)}evaluate(e){const i=this.labels,s=this.outputs;if(i.length===1)return s[0].evaluate(e);const a=this.input.evaluate(e);if(a<=i[0])return s[0].evaluate(e);const h=i.length;if(a>=i[h-1])return s[h-1].evaluate(e);const u=lc(i,a),f=Kr.interpolationFactor(this.interpolation,a,i[u],i[u+1]),_=s[u].evaluate(e),g=s[u+1].evaluate(e);return this.operator==="interpolate"?$l[this.type.kind.toLowerCase()](_,g,f):this.operator==="interpolate-hcl"?ca.reverse(ca.interpolate(ca.forward(_),ca.forward(g),f)):la.reverse(la.interpolate(la.forward(_),la.forward(g),f))}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;e=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier",...this.interpolation.controlPoints];const i=[this.operator,e,this.input.serialize()];for(let s=0;s<this.labels.length;s++)i.push(this.labels[s],this.outputs[s].serialize());return i}}function sl(r,e,i,s){const a=s-i,h=r-i;return a===0?0:e===1?h/a:(Math.pow(e,h)-1)/(Math.pow(e,a)-1)}class hc{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expectected at least one argument.");let s=null;const a=i.expectedType;a&&a.kind!=="value"&&(s=a);const h=[];for(const f of e.slice(1)){const _=i.parse(f,1+h.length,s,void 0,{typeAnnotation:"omit"});if(!_)return null;s=s||_.type,h.push(_)}const u=a&&h.some(f=>Ka(a,f.type));return new hc(u?ti:s,h)}evaluate(e){let i,s=null,a=0;for(const h of this.args){if(a++,s=h.evaluate(e),s&&s instanceof Yr&&!s.available&&(i||(i=s),s=null,a===this.args.length))return i;if(s!==null)break}return s}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(i=>{e.push(i.serialize())}),e}}class uc{constructor(e,i){this.type=i.type,this.bindings=[].concat(e),this.result=i}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const i of this.bindings)e(i[1]);e(this.result)}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const s=[];for(let h=1;h<e.length-1;h+=2){const u=e[h];if(typeof u!="string")return i.error(`Expected string, but found ${typeof u} instead.`,h);if(/[^a-zA-Z0-9_]/.test(u))return i.error("Variable names must contain only alphanumeric characters or '_'.",h);const f=i.parse(e[h+1],h+1);if(!f)return null;s.push([u,f])}const a=i.parse(e[e.length-1],e.length-1,i.expectedType,s);return a?new uc(s,a):null}outputDefined(){return this.result.outputDefined()}serialize(){const e=["let"];for(const[i,s]of this.bindings)e.push(i,s.serialize());return e.push(this.result.serialize()),e}}class dc{constructor(e,i,s){this.type=e,this.index=i,this.input=s}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const s=i.parse(e[1],1,dt),a=i.parse(e[2],2,Br(i.expectedType||ti));return s&&a?new dc(a.type.itemType,s,a):null}evaluate(e){const i=this.index.evaluate(e),s=this.input.evaluate(e);if(i<0)throw new rt(`Array index out of bounds: ${i} < 0.`);if(i>=s.length)throw new rt(`Array index out of bounds: ${i} > ${s.length-1}.`);if(i!==Math.floor(i))throw new rt(`Array index must be an integer, but found ${i} instead. Use at-interpolated to retrieve interpolated result with a fractional index.`);return s[i]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}class pc{constructor(e,i,s){this.type=e,this.index=i,this.input=s}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const s=i.parse(e[1],1,dt),a=i.parse(e[2],2,Br(i.expectedType||ti));return s&&a?new pc(a.type.itemType,s,a):null}evaluate(e){const i=this.index.evaluate(e),s=this.input.evaluate(e);if(i<0)throw new rt(`Array index out of bounds: ${i} < 0.`);if(i>s.length-1)throw new rt(`Array index out of bounds: ${i} > ${s.length-1}.`);if(i===Math.floor(i))return s[i];const a=Math.floor(i),h=Math.ceil(i),u=s[a],f=s[h];if(typeof u!="number"||typeof f!="number")throw new rt(`Cannot interpolate between non-number values at index ${i}.`);const _=i-a;return u*(1-_)+f*_}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at-interpolated",this.index.serialize(),this.input.serialize()]}}class kh{constructor(e,i){this.type=ri,this.needle=e,this.haystack=i}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const s=i.parse(e[1],1,ti),a=i.parse(e[2],2,ti);return s&&a?fh(s.type,[ri,ui,dt,Ps,ti])?new kh(s,a):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${cr(s.type)} instead`):null}evaluate(e){const i=this.needle.evaluate(e),s=this.haystack.evaluate(e);if(s==null)return!1;if(!Yn(i,["boolean","string","number","null"]))throw new rt(`Expected first argument to be of type boolean, string, number or null, but found ${cr(pr(i))} instead.`);if(!Yn(s,["string","array"]))throw new rt(`Expected second argument to be of type array or string, but found ${cr(pr(s))} instead.`);return s.indexOf(i)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}class fc{constructor(e,i,s){this.type=dt,this.needle=e,this.haystack=i,this.fromIndex=s}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const s=i.parse(e[1],1,ti),a=i.parse(e[2],2,ti);if(!s||!a)return null;if(!fh(s.type,[ri,ui,dt,Ps,ti]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${cr(s.type)} instead`);if(e.length===4){const h=i.parse(e[3],3,dt);return h?new fc(s,a,h):null}return new fc(s,a)}evaluate(e){const i=this.needle.evaluate(e),s=this.haystack.evaluate(e);if(!Yn(i,["boolean","string","number","null"]))throw new rt(`Expected first argument to be of type boolean, string, number or null, but found ${cr(pr(i))} instead.`);if(!Yn(s,["string","array"]))throw new rt(`Expected second argument to be of type array or string, but found ${cr(pr(s))} instead.`);if(this.fromIndex){const a=this.fromIndex.evaluate(e);return s.indexOf(i,a)}return s.indexOf(i)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}class Oh{constructor(e,i,s,a,h,u){this.inputType=e,this.type=i,this.input=s,this.cases=a,this.outputs=h,this.otherwise=u}static parse(e,i){if(e.length<5)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return i.error("Expected an even number of arguments.");let s,a;i.expectedType&&i.expectedType.kind!=="value"&&(a=i.expectedType);const h={},u=[];for(let g=2;g<e.length-1;g+=2){let v=e[g];const b=e[g+1];Array.isArray(v)||(v=[v]);const T=i.concat(g);if(v.length===0)return T.error("Expected at least one branch label.");for(const M of v){if(typeof M!="number"&&typeof M!="string")return T.error("Branch labels must be numbers or strings.");if(typeof M=="number"&&Math.abs(M)>Number.MAX_SAFE_INTEGER)return T.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof M=="number"&&Math.floor(M)!==M)return T.error("Numeric branch labels must be integer values.");if(s){if(T.checkSubtype(s,pr(M)))return null}else s=pr(M);if(h[String(M)]!==void 0)return T.error("Branch labels must be unique.");h[String(M)]=u.length}const A=i.parse(b,g,a);if(!A)return null;a=a||A.type,u.push(A)}const f=i.parse(e[1],1,ti);if(!f)return null;const _=i.parse(e[e.length-1],e.length-1,a);return _?f.type.kind!=="value"&&i.concat(1).checkSubtype(s,f.type)?null:new Oh(s,a,f,h,u,_):null}evaluate(e){const i=this.input.evaluate(e);return(pr(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],i=Object.keys(this.cases).sort(),s=[],a={};for(const u of i){const f=a[this.cases[u]];f===void 0?(a[this.cases[u]]=s.length,s.push([this.cases[u],[u]])):s[f][1].push(u)}const h=u=>this.inputType.kind==="number"?Number(u):u;for(const[u,f]of s)e.push(f.length===1?h(f[0]):f.map(h)),e.push(this.outputs[u].serialize());return e.push(this.otherwise.serialize()),e}}class mc{constructor(e,i,s){this.type=e,this.branches=i,this.otherwise=s}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return i.error("Expected an odd number of arguments.");let s;i.expectedType&&i.expectedType.kind!=="value"&&(s=i.expectedType);const a=[];for(let u=1;u<e.length-1;u+=2){const f=i.parse(e[u],u,ri);if(!f)return null;const _=i.parse(e[u+1],u+1,s);if(!_)return null;a.push([f,_]),s=s||_.type}const h=i.parse(e[e.length-1],e.length-1,s);return h?new mc(s,a,h):null}evaluate(e){for(const[i,s]of this.branches)if(i.evaluate(e))return s.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[i,s]of this.branches)e(i),e(s);e(this.otherwise)}outputDefined(){return this.branches.every(([e,i])=>i.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(i=>{e.push(i.serialize())}),e}}class nl{constructor(e,i,s,a){this.type=e,this.input=i,this.beginIndex=s,this.endIndex=a}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const s=i.parse(e[1],1,ti),a=i.parse(e[2],2,dt);if(!s||!a)return null;if(!fh(s.type,[Br(ti),ui,ti]))return i.error(`Expected first argument to be of type array or string, but found ${cr(s.type)} instead`);if(e.length===4){const h=i.parse(e[3],3,dt);return h?new nl(s.type,s,a,h):null}return new nl(s.type,s,a)}evaluate(e){const i=this.input.evaluate(e),s=this.beginIndex.evaluate(e);if(!Yn(i,["string","array"]))throw new rt(`Expected first argument to be of type array or string, but found ${cr(pr(i))} instead.`);if(this.endIndex){const a=this.endIndex.evaluate(e);return i.slice(s,a)}return i.slice(s)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}function al(r,e){return r==="=="||r==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function _d(r,e,i,s){return s.compare(e,i)===0}function wn(r,e,i){const s=r!=="=="&&r!=="!=";return class Vx{constructor(h,u,f){this.type=ri,this.lhs=h,this.rhs=u,this.collator=f,this.hasUntypedArgument=h.type.kind==="value"||u.type.kind==="value"}static parse(h,u){if(h.length!==3&&h.length!==4)return u.error("Expected two or three arguments.");const f=h[0];let _=u.parse(h[1],1,ti);if(!_)return null;if(!al(f,_.type))return u.concat(1).error(`"${f}" comparisons are not supported for type '${cr(_.type)}'.`);let g=u.parse(h[2],2,ti);if(!g)return null;if(!al(f,g.type))return u.concat(2).error(`"${f}" comparisons are not supported for type '${cr(g.type)}'.`);if(_.type.kind!==g.type.kind&&_.type.kind!=="value"&&g.type.kind!=="value")return u.error(`Cannot compare types '${cr(_.type)}' and '${cr(g.type)}'.`);s&&(_.type.kind==="value"&&g.type.kind!=="value"?_=new vt(g.type,[_]):_.type.kind!=="value"&&g.type.kind==="value"&&(g=new vt(_.type,[g])));let v=null;if(h.length===4){if(_.type.kind!=="string"&&g.type.kind!=="string"&&_.type.kind!=="value"&&g.type.kind!=="value")return u.error("Cannot use collator to compare non-string types.");if(v=u.parse(h[3],3,mn),!v)return null}return new Vx(_,g,v)}evaluate(h){const u=this.lhs.evaluate(h),f=this.rhs.evaluate(h);if(s&&this.hasUntypedArgument){const _=pr(u),g=pr(f);if(_.kind!==g.kind||_.kind!=="string"&&_.kind!=="number")throw new rt(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${_.kind}, ${g.kind}) instead.`)}if(this.collator&&!s&&this.hasUntypedArgument){const _=pr(u),g=pr(f);if(_.kind!=="string"||g.kind!=="string")return e(h,u,f)}return this.collator?i(h,u,f,this.collator.evaluate(h)):e(h,u,f)}eachChild(h){h(this.lhs),h(this.rhs),this.collator&&h(this.collator)}outputDefined(){return!0}serialize(){const h=[r];return this.eachChild(u=>{h.push(u.serialize())}),h}}}const cf=wn("==",function(r,e,i){return e===i},_d),hf=wn("!=",function(r,e,i){return e!==i},function(r,e,i,s){return!_d(0,e,i,s)}),gd=wn("<",function(r,e,i){return e<i},function(r,e,i,s){return s.compare(e,i)<0}),yd=wn(">",function(r,e,i){return e>i},function(r,e,i,s){return s.compare(e,i)>0}),uf=wn("<=",function(r,e,i){return e<=i},function(r,e,i,s){return s.compare(e,i)<=0}),df=wn(">=",function(r,e,i){return e>=i},function(r,e,i,s){return s.compare(e,i)>=0});class Fh{constructor(e,i,s,a,h,u){this.type=ui,this.number=e,this.locale=i,this.currency=s,this.unit=a,this.minFractionDigits=h,this.maxFractionDigits=u}static parse(e,i){if(e.length!==3)return i.error("Expected two arguments.");const s=i.parse(e[1],1,dt);if(!s)return null;const a=e[2];if(typeof a!="object"||Array.isArray(a))return i.error("NumberFormat options argument must be an object.");let h=null;if(a.locale&&(h=i.parseObjectValue(a.locale,2,"locale",ui),!h))return null;let u=null;if(a.currency&&(u=i.parseObjectValue(a.currency,2,"currency",ui),!u))return null;let f=null;if(a.unit&&(f=i.parseObjectValue(a.unit,2,"unit",ui),!f))return null;let _=null;if(a["min-fraction-digits"]&&(_=i.parseObjectValue(a["min-fraction-digits"],2,"min-fraction-digits",dt),!_))return null;let g=null;return a["max-fraction-digits"]&&(g=i.parseObjectValue(a["max-fraction-digits"],2,"max-fraction-digits",dt),!g)?null:new Fh(s,h,u,f,_,g)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class ll{constructor(e){this.type=dt,this.input=e}static parse(e,i){if(e.length!==2)return i.error(`Expected 1 argument, but found ${e.length-1} instead.`);const s=i.parse(e[1],1);return s?s.type.kind!=="array"&&s.type.kind!=="string"&&s.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${cr(s.type)} instead.`):new ll(s):null}evaluate(e){const i=this.input.evaluate(e);if(typeof i=="string"||Array.isArray(i))return i.length;throw new rt(`Expected value to be of type string or array, but found ${cr(pr(i))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(i=>{e.push(i.serialize())}),e}}function xd(r){return function(){r=1831565813+(r|=0)|0;let e=Math.imul(r^r>>>15,1|r);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}const Tn={"==":cf,"!=":hf,">":yd,"<":gd,">=":df,"<=":uf,array:vt,at:dc,"at-interpolated":pc,boolean:vt,case:mc,coalesce:hc,collator:Jn,format:_n,image:Qn,in:kh,"index-of":fc,interpolate:Kr,"interpolate-hcl":Kr,"interpolate-lab":Kr,length:ll,let:uc,literal:zt,match:Oh,number:vt,"number-format":Fh,object:vt,slice:nl,step:ol,string:vt,"to-boolean":Mo,"to-color":Mo,"to-number":Mo,"to-string":Mo,var:ac,within:cs,distance:bn,config:oa};function vd(r,[e,i,s,a]){e=e.evaluate(r),i=i.evaluate(r),s=s.evaluate(r);const h=a?a.evaluate(r):1,u=Qu(e,i,s,h);if(u)throw new rt(u);return new Jt(e/255*h,i/255*h,s/255*h,h)}function bd(r,[e,i,s,a]){e=e.evaluate(r),i=i.evaluate(r),s=s.evaluate(r);const h=a?a.evaluate(r):1,u=function(g,v,b,T){return typeof g=="number"&&g>=0&&g<=360?typeof v=="number"&&v>=0&&v<=100&&typeof b=="number"&&b>=0&&b<=100?T===void 0||typeof T=="number"&&T>=0&&T<=1?null:`Invalid hsla value [${[g,v,b,T].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid hsla value [${(typeof T=="number"?[g,v,b,T]:[g,v,b]).join(", ")}]: 's', and 'l' must be between 0 and 100.`:`Invalid hsla value [${(typeof T=="number"?[g,v,b,T]:[g,v,b]).join(", ")}]: 'h' must be between 0 and 360.`}(e,i,s,h);if(u)throw new rt(u);const f=`hsla(${e}, ${i}%, ${s}%, ${h})`,_=Jt.parse(f);if(!_)throw new rt(`Failed to parse HSLA color: ${f}`);return _}function Bh(r,e){return r in e}function _c(r,e){const i=e[r];return i===void 0?null:i}function Fs(r){return{type:r}}function wd(r){return{result:"success",value:r}}function ho(r){return{result:"error",value:r}}function Nh(r,e){return!!r&&!!r.parameters&&r.parameters.indexOf(e)>-1}function gc(r){return r["property-type"]==="data-driven"}function Td(r){return Nh(r.expression,"measure-light")}function Vh(r){return Nh(r.expression,"zoom")}function yc(r){return!!r.expression&&r.expression.interpolated}function xc(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Sd(r){return r}function vc(r,e){const i=e.type==="color",s=r.stops&&typeof r.stops[0][0]=="object",a=s||!(s||r.property!==void 0),h=r.type||(yc(e)?"exponential":"interval");if(i&&((r=Xa({},r)).stops&&(r.stops=r.stops.map(g=>[g[0],Jt.parse(g[1])])),r.default=Jt.parse(r.default?r.default:e.default)),r.colorSpace&&r.colorSpace!=="rgb"&&!md[r.colorSpace])throw new Error(`Unknown color space: ${r.colorSpace}`);let u,f,_;if(h==="exponential")u=hs;else if(h==="interval")u=pf;else if(h==="categorical"){u=Ed,f=Object.create(null);for(const g of r.stops)f[g[0]]=g[1];_=typeof r.stops[0][0]}else{if(h!=="identity")throw new Error(`Unknown function type "${h}"`);u=ff}if(s){const g={},v=[];for(let A=0;A<r.stops.length;A++){const M=r.stops[A],P=M[0].zoom;g[P]===void 0&&(g[P]={zoom:P,type:r.type,property:r.property,default:r.default,stops:[]},v.push(P)),g[P].stops.push([M[0].value,M[1]])}const b=[];for(const A of v)b.push([g[A].zoom,vc(g[A],e)]);const T={name:"linear"};return{kind:"composite",interpolationType:T,interpolationFactor:Kr.interpolationFactor.bind(void 0,T),zoomStops:b.map(A=>A[0]),evaluate:({zoom:A},M)=>hs({stops:b,base:r.base},e,A).evaluate(A,M)}}if(a){const g=h==="exponential"?{name:"exponential",base:r.base!==void 0?r.base:1}:null;return{kind:"camera",interpolationType:g,interpolationFactor:Kr.interpolationFactor.bind(void 0,g),zoomStops:r.stops.map(v=>v[0]),evaluate:({zoom:v})=>u(r,e,v,f,_)}}return{kind:"source",evaluate(g,v){const b=v&&v.properties?v.properties[r.property]:void 0;return b===void 0?Sn(r.default,e.default):u(r,e,b,f,_)}}}function Sn(r,e,i){return r!==void 0?r:e!==void 0?e:i!==void 0?i:void 0}function Ed(r,e,i,s,a){return Sn(typeof i===a?s[i]:void 0,r.default,e.default)}function pf(r,e,i){if(bt(i)!=="number")return Sn(r.default,e.default);const s=r.stops.length;if(s===1||i<=r.stops[0][0])return r.stops[0][1];if(i>=r.stops[s-1][0])return r.stops[s-1][1];const a=lc(r.stops.map(h=>h[0]),i);return r.stops[a][1]}function hs(r,e,i){const s=r.base!==void 0?r.base:1;if(bt(i)!=="number")return Sn(r.default,e.default);const a=r.stops.length;if(a===1||i<=r.stops[0][0])return r.stops[0][1];if(i>=r.stops[a-1][0])return r.stops[a-1][1];const h=lc(r.stops.map(v=>v[0]),i),u=function(v,b,T,A){const M=A-T,P=v-T;return M===0?0:b===1?P/M:(Math.pow(b,P)-1)/(Math.pow(b,M)-1)}(i,s,r.stops[h][0],r.stops[h+1][0]),f=r.stops[h][1],_=r.stops[h+1][1];let g=$l[e.type]||Sd;if(r.colorSpace&&r.colorSpace!=="rgb"){const v=md[r.colorSpace];g=(b,T)=>v.reverse(v.interpolate(v.forward(b),v.forward(T),u))}return typeof f.evaluate=="function"?{evaluate(...v){const b=f.evaluate.apply(void 0,v),T=_.evaluate.apply(void 0,v);if(b!==void 0&&T!==void 0)return g(b,T,u)}}:g(f,_,u)}function ff(r,e,i){return e.type==="color"?i=Jt.parse(i):e.type==="formatted"?i=Nr.fromString(i.toString()):e.type==="resolvedImage"?i=Yr.build(i.toString()):bt(i)===e.type||e.type==="enum"&&e.values[i]||(i=void 0),Sn(i,r.default,e.default)}zr.register(Tn,{error:[{kind:"error"},[ui],(r,[e])=>{throw new rt(e.evaluate(r))}],typeof:[ui,[ti],(r,[e])=>cr(pr(e.evaluate(r)))],"to-rgba":[Br(dt,4),[$r],(r,[e])=>e.evaluate(r).toRenderColor(null).toArray()],"to-hsla":[Br(dt,4),[$r],(r,[e])=>e.evaluate(r).toRenderColor(null).toHslaArray()],rgb:[$r,[dt,dt,dt],vd],rgba:[$r,[dt,dt,dt,dt],vd],hsl:[$r,[dt,dt,dt],bd],hsla:[$r,[dt,dt,dt,dt],bd],has:{type:ri,overloads:[[[ui],(r,[e])=>Bh(e.evaluate(r),r.properties())],[[ui,zs],(r,[e,i])=>Bh(e.evaluate(r),i.evaluate(r))]]},get:{type:ti,overloads:[[[ui],(r,[e])=>_c(e.evaluate(r),r.properties())],[[ui,zs],(r,[e,i])=>_c(e.evaluate(r),i.evaluate(r))]]},"feature-state":[ti,[ui],(r,[e])=>_c(e.evaluate(r),r.featureState||{})],properties:[zs,[],r=>r.properties()],"geometry-type":[ui,[],r=>r.geometryType()],id:[ti,[],r=>r.id()],zoom:[dt,[],r=>r.globals.zoom],pitch:[dt,[],r=>r.globals.pitch||0],"distance-from-center":[dt,[],r=>r.distanceFromCenter()],"measure-light":[dt,[ui],(r,[e])=>r.measureLight(e.evaluate(r))],"heatmap-density":[dt,[],r=>r.globals.heatmapDensity||0],"line-progress":[dt,[],r=>r.globals.lineProgress||0],"raster-value":[dt,[],r=>r.globals.rasterValue||0],"raster-particle-speed":[dt,[],r=>r.globals.rasterParticleSpeed||0],"sky-radial-progress":[dt,[],r=>r.globals.skyRadialProgress||0],accumulated:[ti,[],r=>r.globals.accumulated===void 0?null:r.globals.accumulated],"+":[dt,Fs(dt),(r,e)=>{let i=0;for(const s of e)i+=s.evaluate(r);return i}],"*":[dt,Fs(dt),(r,e)=>{let i=1;for(const s of e)i*=s.evaluate(r);return i}],"-":{type:dt,overloads:[[[dt,dt],(r,[e,i])=>e.evaluate(r)-i.evaluate(r)],[[dt],(r,[e])=>-e.evaluate(r)]]},"/":[dt,[dt,dt],(r,[e,i])=>e.evaluate(r)/i.evaluate(r)],"%":[dt,[dt,dt],(r,[e,i])=>e.evaluate(r)%i.evaluate(r)],ln2:[dt,[],()=>Math.LN2],pi:[dt,[],()=>Math.PI],e:[dt,[],()=>Math.E],"^":[dt,[dt,dt],(r,[e,i])=>Math.pow(e.evaluate(r),i.evaluate(r))],sqrt:[dt,[dt],(r,[e])=>Math.sqrt(e.evaluate(r))],log10:[dt,[dt],(r,[e])=>Math.log(e.evaluate(r))/Math.LN10],ln:[dt,[dt],(r,[e])=>Math.log(e.evaluate(r))],log2:[dt,[dt],(r,[e])=>Math.log(e.evaluate(r))/Math.LN2],sin:[dt,[dt],(r,[e])=>Math.sin(e.evaluate(r))],cos:[dt,[dt],(r,[e])=>Math.cos(e.evaluate(r))],tan:[dt,[dt],(r,[e])=>Math.tan(e.evaluate(r))],asin:[dt,[dt],(r,[e])=>Math.asin(e.evaluate(r))],acos:[dt,[dt],(r,[e])=>Math.acos(e.evaluate(r))],atan:[dt,[dt],(r,[e])=>Math.atan(e.evaluate(r))],min:[dt,Fs(dt),(r,e)=>Math.min(...e.map(i=>i.evaluate(r)))],max:[dt,Fs(dt),(r,e)=>Math.max(...e.map(i=>i.evaluate(r)))],abs:[dt,[dt],(r,[e])=>Math.abs(e.evaluate(r))],round:[dt,[dt],(r,[e])=>{const i=e.evaluate(r);return i<0?-Math.round(-i):Math.round(i)}],floor:[dt,[dt],(r,[e])=>Math.floor(e.evaluate(r))],ceil:[dt,[dt],(r,[e])=>Math.ceil(e.evaluate(r))],"filter-==":[ri,[ui,ti],(r,[e,i])=>r.properties()[e.value]===i.value],"filter-id-==":[ri,[ti],(r,[e])=>r.id()===e.value],"filter-type-==":[ri,[ui],(r,[e])=>r.geometryType()===e.value],"filter-<":[ri,[ui,ti],(r,[e,i])=>{const s=r.properties()[e.value],a=i.value;return typeof s==typeof a&&s<a}],"filter-id-<":[ri,[ti],(r,[e])=>{const i=r.id(),s=e.value;return typeof i==typeof s&&i<s}],"filter->":[ri,[ui,ti],(r,[e,i])=>{const s=r.properties()[e.value],a=i.value;return typeof s==typeof a&&s>a}],"filter-id->":[ri,[ti],(r,[e])=>{const i=r.id(),s=e.value;return typeof i==typeof s&&i>s}],"filter-<=":[ri,[ui,ti],(r,[e,i])=>{const s=r.properties()[e.value],a=i.value;return typeof s==typeof a&&s<=a}],"filter-id-<=":[ri,[ti],(r,[e])=>{const i=r.id(),s=e.value;return typeof i==typeof s&&i<=s}],"filter->=":[ri,[ui,ti],(r,[e,i])=>{const s=r.properties()[e.value],a=i.value;return typeof s==typeof a&&s>=a}],"filter-id->=":[ri,[ti],(r,[e])=>{const i=r.id(),s=e.value;return typeof i==typeof s&&i>=s}],"filter-has":[ri,[ti],(r,[e])=>e.value in r.properties()],"filter-has-id":[ri,[],r=>r.id()!==null&&r.id()!==void 0],"filter-type-in":[ri,[Br(ui)],(r,[e])=>e.value.indexOf(r.geometryType())>=0],"filter-id-in":[ri,[Br(ti)],(r,[e])=>e.value.indexOf(r.id())>=0],"filter-in-small":[ri,[ui,Br(ti)],(r,[e,i])=>i.value.indexOf(r.properties()[e.value])>=0],"filter-in-large":[ri,[ui,Br(ti)],(r,[e,i])=>function(s,a,h,u){for(;h<=u;){const f=h+u>>1;if(a[f]===s)return!0;a[f]>s?u=f-1:h=f+1}return!1}(r.properties()[e.value],i.value,0,i.value.length-1)],all:{type:ri,overloads:[[[ri,ri],(r,[e,i])=>e.evaluate(r)&&i.evaluate(r)],[Fs(ri),(r,e)=>{for(const i of e)if(!i.evaluate(r))return!1;return!0}]]},any:{type:ri,overloads:[[[ri,ri],(r,[e,i])=>e.evaluate(r)||i.evaluate(r)],[Fs(ri),(r,e)=>{for(const i of e)if(i.evaluate(r))return!0;return!1}]]},"!":[ri,[ri],(r,[e])=>!e.evaluate(r)],"is-supported-script":[ri,[ui],(r,[e])=>{const i=r.globals&&r.globals.isSupportedScript;return!i||i(e.evaluate(r))}],upcase:[ui,[ui],(r,[e])=>e.evaluate(r).toUpperCase()],downcase:[ui,[ui],(r,[e])=>e.evaluate(r).toLowerCase()],concat:[ui,Fs(ti),(r,e)=>e.map(i=>Vr(i.evaluate(r))).join("")],"resolved-locale":[ui,[mn],(r,[e])=>e.evaluate(r).resolvedLocale()],random:[dt,[dt,dt,ti],(r,e)=>{const[i,s,a]=e.map(u=>u.evaluate(r));if(i>s||i===s)return i;let h;if(typeof a=="string")h=function(u){let f=0;if(u.length===0)return f;for(let _=0;_<u.length;_++)f=(f<<5)-f+u.charCodeAt(_),f|=0;return f}(a);else{if(typeof a!="number")throw new rt(`Invalid seed input: ${a}`);h=a}return i+xd(h)()*(s-i)}]});class Uh{constructor(e,i,s,a){this.expression=e,this._warningHistory={},this._evaluator=new Kl(s,a),this._defaultValue=i?function(h){return h.type==="color"&&(xc(h.default)||Array.isArray(h.default))?new Jt(0,0,0,0):h.type==="color"?Jt.parse(h.default)||null:h.default===void 0?null:h.default}(i):null,this._enumValues=i&&i.type==="enum"?i.values:null,this.configDependencies=nc(e)}evaluateWithoutErrorHandling(e,i,s,a,h,u,f,_){return this._evaluator.globals=e,this._evaluator.feature=i,this._evaluator.featureState=s,this._evaluator.canonical=a||null,this._evaluator.availableImages=h||null,this._evaluator.formattedSection=u,this._evaluator.featureTileCoord=f||null,this._evaluator.featureDistanceData=_||null,this.expression.evaluate(this._evaluator)}evaluate(e,i,s,a,h,u,f,_){this._evaluator.globals=e,this._evaluator.feature=i||null,this._evaluator.featureState=s||null,this._evaluator.canonical=a||null,this._evaluator.availableImages=h||null,this._evaluator.formattedSection=u||null,this._evaluator.featureTileCoord=f||null,this._evaluator.featureDistanceData=_||null;try{const g=this.expression.evaluate(this._evaluator);if(g==null||typeof g=="number"&&g!=g)return this._defaultValue;if(this._enumValues&&!(g in this._enumValues))throw new rt(`Expected value to be one of ${Object.keys(this._enumValues).map(v=>JSON.stringify(v)).join(", ")}, but found ${JSON.stringify(g)} instead.`);return g}catch(g){return this._warningHistory[g.message]||(this._warningHistory[g.message]=!0,typeof console<"u"&&console.warn(`Failed to evaluate expression "${JSON.stringify(this.expression.serialize())}". ${g.message}`)),this._defaultValue}}}function bc(r){return Array.isArray(r)&&r.length>0&&typeof r[0]=="string"&&r[0]in Tn}function ha(r,e,i,s){const a=new hd(Tn,[],e?function(u){const f={color:$r,string:ui,number:dt,enum:ui,boolean:ri,formatted:$a,resolvedImage:Ya};return u.type==="array"?Br(f[u.value]||ti,u.length):f[u.type]}(e):void 0,void 0,void 0,i,s),h=a.parse(r,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return h?wd(new Uh(h,e,i,s)):ho(a.errors)}class En{constructor(e,i,s,a){this.kind=e,this._styleExpression=i,this.isLightConstant=s,this.isLineProgressConstant=a,this.isStateDependent=e!=="constant"&&!sc(i.expression),this.configDependencies=nc(i.expression)}evaluateWithoutErrorHandling(e,i,s,a,h,u){return this._styleExpression.evaluateWithoutErrorHandling(e,i,s,a,h,u)}evaluate(e,i,s,a,h,u){return this._styleExpression.evaluate(e,i,s,a,h,u)}}class ua{constructor(e,i,s,a,h,u){this.kind=e,this.zoomStops=s,this._styleExpression=i,this.isStateDependent=e!=="camera"&&!sc(i.expression),this.isLightConstant=h,this.isLineProgressConstant=u,this.configDependencies=nc(i.expression),this.interpolationType=a}evaluateWithoutErrorHandling(e,i,s,a,h,u){return this._styleExpression.evaluateWithoutErrorHandling(e,i,s,a,h,u)}evaluate(e,i,s,a,h,u){return this._styleExpression.evaluate(e,i,s,a,h,u)}interpolationFactor(e,i,s){return this.interpolationType?Kr.interpolationFactor(this.interpolationType,e,i,s):0}}function cl(r,e,i,s){if((r=ha(r,e,i,s)).result==="error")return r;const a=r.value.expression,h=rl(a);if(!h&&!gc(e))return ho([new _o("","data expressions not supported")]);const u=sa(a,["zoom","pitch","distance-from-center"]);if(!u&&!Vh(e))return ho([new _o("","zoom expressions not supported")]);const f=sa(a,["measure-light"]);if(!f&&!Td(e))return ho([new _o("","measure-light expression not supported")]);const _=sa(a,["line-progress"]);if(!_&&!function(b){return Nh(b.expression,"line-progress")}(e))return ho([new _o("","line-progress expression not supported")]);const g=e.expression&&e.expression.relaxZoomRestriction,v=wc(a);return v||u||g?v instanceof _o?ho([v]):v instanceof Kr&&!yc(e)?ho([new _o("",'"interpolate" expressions cannot be used with this property')]):wd(v?new ua(h&&_?"camera":"composite",r.value,v.labels,v instanceof Kr?v.interpolation:void 0,f,_):new En(h&&_?"constant":"source",r.value,f,_)):ho([new _o("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression, or in the properties of atmosphere.')])}class hl{constructor(e,i){this._parameters=e,this._specification=i,Xa(this,vc(this._parameters,this._specification))}static deserialize(e){return new hl(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function wc(r){let e=null;if(r instanceof uc)e=wc(r.result);else if(r instanceof hc){for(const i of r.args)if(e=wc(i),e)break}else(r instanceof ol||r instanceof Kr)&&r.input instanceof zr&&r.input.name==="zoom"&&(e=r);return e instanceof _o||r.eachChild(i=>{const s=wc(i);s instanceof _o?e=s:e&&s&&e!==s&&(e=new _o("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}var jh,Tc,Gh=function(){if(Tc)return jh;Tc=1,jh=e;var r=3;function e(i,s,a){var h=this.cells=[];if(i instanceof ArrayBuffer){this.arrayBuffer=i;var u=new Int32Array(this.arrayBuffer);i=u[0],this.d=(s=u[1])+2*(a=u[2]);for(var f=0;f<this.d*this.d;f++){var _=u[r+f],g=u[r+f+1];h.push(_===g?null:u.subarray(_,g))}var v=u[r+h.length+1];this.keys=u.subarray(u[r+h.length],v),this.bboxes=u.subarray(v),this.insert=this._insertReadonly}else{this.d=s+2*a;for(var b=0;b<this.d*this.d;b++)h.push([]);this.keys=[],this.bboxes=[]}this.n=s,this.extent=i,this.padding=a,this.scale=s/i,this.uid=0;var T=a/s*i;this.min=-T,this.max=i+T}return e.prototype.insert=function(i,s,a,h,u){this._forEachCell(s,a,h,u,this._insertCell,this.uid++),this.keys.push(i),this.bboxes.push(s),this.bboxes.push(a),this.bboxes.push(h),this.bboxes.push(u)},e.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},e.prototype._insertCell=function(i,s,a,h,u,f){this.cells[u].push(f)},e.prototype.query=function(i,s,a,h,u){var f=this.min,_=this.max;if(i<=f&&s<=f&&_<=a&&_<=h&&!u)return Array.prototype.slice.call(this.keys);var g=[];return this._forEachCell(i,s,a,h,this._queryCell,g,{},u),g},e.prototype._queryCell=function(i,s,a,h,u,f,_,g){var v=this.cells[u];if(v!==null)for(var b=this.keys,T=this.bboxes,A=0;A<v.length;A++){var M=v[A];if(_[M]===void 0){var P=4*M;(g?g(T[P+0],T[P+1],T[P+2],T[P+3]):i<=T[P+2]&&s<=T[P+3]&&a>=T[P+0]&&h>=T[P+1])?(_[M]=!0,f.push(b[M])):_[M]=!1}}},e.prototype._forEachCell=function(i,s,a,h,u,f,_,g){for(var v=this._convertToCellCoord(i),b=this._convertToCellCoord(s),T=this._convertToCellCoord(a),A=this._convertToCellCoord(h),M=v;M<=T;M++)for(var P=b;P<=A;P++){var k=this.d*P+M;if((!g||g(this._convertFromCellCoord(M),this._convertFromCellCoord(P),this._convertFromCellCoord(M+1),this._convertFromCellCoord(P+1)))&&u.call(this,i,s,a,h,k,f,_,g))return}},e.prototype._convertFromCellCoord=function(i){return(i-this.padding)/this.scale},e.prototype._convertToCellCoord=function(i){return Math.max(0,Math.min(this.d-1,Math.floor(i*this.scale)+this.padding))},e.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var i=this.cells,s=r+this.cells.length+1+1,a=0,h=0;h<this.cells.length;h++)a+=this.cells[h].length;var u=new Int32Array(s+a+this.keys.length+this.bboxes.length);u[0]=this.extent,u[1]=this.n,u[2]=this.padding;for(var f=s,_=0;_<i.length;_++){var g=i[_];u[r+_]=f,u.set(g,f),f+=g.length}return u[r+i.length]=f,u.set(this.keys,f),u[r+i.length+1]=f+=this.keys.length,u.set(this.bboxes,f),f+=this.bboxes.length,u.buffer},jh}(),da=jo(Gh);const ul={};function it(r,e,i={}){Object.defineProperty(r,"_classRegistryKey",{value:e,writable:!1}),ul[e]={klass:r,omit:i.omit||[]}}it(Object,"Object"),da.serialize=function(r,e){const i=r.toArrayBuffer();return e&&e.add(i),{buffer:i}},da.deserialize=function(r){return new da(r.buffer)},Object.defineProperty(da,"name",{value:"Grid"}),it(da,"Grid"),typeof DOMMatrix<"u"&&it(DOMMatrix,"DOMMatrix"),it(Jt,"Color"),it(Error,"Error"),it(Nr,"Formatted"),it(Yl,"FormattedSection"),it(ql,"AJAXError"),it(Yr,"ResolvedImage"),it(hl,"StylePropertyFunction"),it(Uh,"StyleExpression",{omit:["_evaluator"]}),it(ro,"ImageId"),it(Ao,"ImageVariant"),it(ua,"ZoomDependentExpression"),it(En,"ZoomConstantExpression"),it(zr,"CompoundExpression",{omit:["_evaluate"]});for(const r in Tn)ul[Tn[r]._classRegistryKey]||it(Tn[r],`Expression${r}`);function dl(r){return r&&typeof ArrayBuffer<"u"&&(r instanceof ArrayBuffer||r.constructor&&r.constructor.name==="ArrayBuffer")}function In(r){return self.ImageBitmap&&r instanceof ImageBitmap}function Bs(r,e){if(r==null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||r instanceof Boolean||r instanceof Number||r instanceof String||r instanceof Date||r instanceof RegExp)return r;if(dl(r)||In(r))return e&&e.add(r),r;if(ArrayBuffer.isView(r))return e&&e.add(r.buffer),r;if(r instanceof ImageData)return e&&e.add(r.data.buffer),r;if(Array.isArray(r)){const i=[];for(const s of r)i.push(Bs(s,e));return i}if(r instanceof Map){const i={$name:"Map",entries:[]};for(const[s,a]of r.entries())i.entries.push(Bs(s),Bs(a,e));return i}if(r instanceof Set){const i={$name:"Set"};let s=0;for(const a of r.values())i[++s]=Bs(a);return i}if(r instanceof DOMMatrix){const i={$name:"DOMMatrix"},s=["is2D","m11","m12","m13","m14","m21","m22","m23","m24","m31","m32","m33","m34","m41","m42","m43","m44","a","b","c","d","e","f"];for(const a of s)i[a]=r[a];return i}if(typeof r=="bigint")return{$name:"BigInt",value:r.toString()};if(typeof r=="object"){const i=r.constructor,s=i._classRegistryKey;if(!s)throw new Error(`Can't serialize object of unregistered class "${i.name}".`);const a=i.serialize?i.serialize(r,e):{};if(!i.serialize){for(const h in r)r.hasOwnProperty(h)&&(ul[s].omit.indexOf(h)>=0||(a[h]=Bs(r[h],e)));r instanceof Error&&(a.message=r.message)}if(a.$name)throw new Error("$name property is reserved for worker serialization logic.");return s!=="Object"&&(a.$name=s),a}throw new Error("can't serialize object of type "+typeof r)}function Ns(r){if(r==null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||r instanceof Boolean||r instanceof Number||r instanceof String||r instanceof Date||r instanceof RegExp||dl(r)||In(r)||ArrayBuffer.isView(r)||r instanceof ImageData)return r;if(Array.isArray(r))return r.map(Ns);if(typeof r=="object"){const e=r.$name||"Object";if(e==="Map"){const a=r.entries||[],h=new Map;for(let u=0;u<a.length;u+=2)h.set(Ns(a[u]),Ns(a[u+1]));return h}if(e==="Set"){const a=new Set;for(const h of Object.keys(r))h!=="$name"&&a.add(Ns(r[h]));return a}if(e==="DOMMatrix"){let a;return a=r.is2D?[r.a,r.b,r.c,r.d,r.e,r.f]:[r.m11,r.m12,r.m13,r.m14,r.m21,r.m22,r.m23,r.m24,r.m31,r.m32,r.m33,r.m34,r.m41,r.m42,r.m43,r.m44],new DOMMatrix(a)}if(e==="BigInt")return BigInt(r.value);const{klass:i}=ul[e];if(!i)throw new Error(`Can't deserialize unregistered class "${e}".`);if(i.deserialize)return i.deserialize(r);const s=Object.create(i.prototype);for(const a of Object.keys(r))a!=="$name"&&(s[a]=Ns(r[a]));return s}throw new Error("can't deserialize object of type "+typeof r)}const mt={"Latin-1 Supplement":r=>r>=128&&r<=255,Arabic:r=>r>=1536&&r<=1791,"Arabic Supplement":r=>r>=1872&&r<=1919,"Arabic Extended-A":r=>r>=2208&&r<=2303,"Hangul Jamo":r=>r>=4352&&r<=4607,"Unified Canadian Aboriginal Syllabics":r=>r>=5120&&r<=5759,Khmer:r=>r>=6016&&r<=6143,"Unified Canadian Aboriginal Syllabics Extended":r=>r>=6320&&r<=6399,"General Punctuation":r=>r>=8192&&r<=8303,"Letterlike Symbols":r=>r>=8448&&r<=8527,"Number Forms":r=>r>=8528&&r<=8591,"Miscellaneous Technical":r=>r>=8960&&r<=9215,"Control Pictures":r=>r>=9216&&r<=9279,"Optical Character Recognition":r=>r>=9280&&r<=9311,"Enclosed Alphanumerics":r=>r>=9312&&r<=9471,"Geometric Shapes":r=>r>=9632&&r<=9727,"Miscellaneous Symbols":r=>r>=9728&&r<=9983,"Miscellaneous Symbols and Arrows":r=>r>=11008&&r<=11263,"CJK Radicals Supplement":r=>r>=11904&&r<=12031,"Kangxi Radicals":r=>r>=12032&&r<=12255,"Ideographic Description Characters":r=>r>=12272&&r<=12287,"CJK Symbols and Punctuation":r=>r>=12288&&r<=12351,Hiragana:r=>r>=12352&&r<=12447,Katakana:r=>r>=12448&&r<=12543,Bopomofo:r=>r>=12544&&r<=12591,"Hangul Compatibility Jamo":r=>r>=12592&&r<=12687,Kanbun:r=>r>=12688&&r<=12703,"Bopomofo Extended":r=>r>=12704&&r<=12735,"CJK Strokes":r=>r>=12736&&r<=12783,"Katakana Phonetic Extensions":r=>r>=12784&&r<=12799,"Enclosed CJK Letters and Months":r=>r>=12800&&r<=13055,"CJK Compatibility":r=>r>=13056&&r<=13311,"CJK Unified Ideographs Extension A":r=>r>=13312&&r<=19903,"Yijing Hexagram Symbols":r=>r>=19904&&r<=19967,"CJK Unified Ideographs":r=>r>=19968&&r<=40959,"Yi Syllables":r=>r>=40960&&r<=42127,"Yi Radicals":r=>r>=42128&&r<=42191,"Hangul Jamo Extended-A":r=>r>=43360&&r<=43391,"Hangul Syllables":r=>r>=44032&&r<=55215,"Hangul Jamo Extended-B":r=>r>=55216&&r<=55295,"Private Use Area":r=>r>=57344&&r<=63743,"CJK Compatibility Ideographs":r=>r>=63744&&r<=64255,"Arabic Presentation Forms-A":r=>r>=64336&&r<=65023,"Vertical Forms":r=>r>=65040&&r<=65055,"CJK Compatibility Forms":r=>r>=65072&&r<=65103,"Small Form Variants":r=>r>=65104&&r<=65135,"Arabic Presentation Forms-B":r=>r>=65136&&r<=65279,"Halfwidth and Fullwidth Forms":r=>r>=65280&&r<=65519,Osage:r=>r>=66736&&r<=66815,"CJK Unified Ideographs Extension B":r=>r>=131072&&r<=173791};function qh(r){for(const e of r)if(pl(e.charCodeAt(0)))return!0;return!1}function mf(r){for(const e of r)if(!Id(e.charCodeAt(0)))return!1;return!0}function Id(r){return!(mt.Arabic(r)||mt["Arabic Supplement"](r)||mt["Arabic Extended-A"](r)||mt["Arabic Presentation Forms-A"](r)||mt["Arabic Presentation Forms-B"](r))}function pl(r){return!(r!==746&&r!==747&&(r<4352||!(mt["Bopomofo Extended"](r)||mt.Bopomofo(r)||mt["CJK Compatibility Forms"](r)&&!(r>=65097&&r<=65103)||mt["CJK Compatibility Ideographs"](r)||mt["CJK Compatibility"](r)||mt["CJK Radicals Supplement"](r)||mt["CJK Strokes"](r)||!(!mt["CJK Symbols and Punctuation"](r)||r>=12296&&r<=12305||r>=12308&&r<=12319||r===12336)||mt["CJK Unified Ideographs Extension A"](r)||mt["CJK Unified Ideographs"](r)||mt["Enclosed CJK Letters and Months"](r)||mt["Hangul Compatibility Jamo"](r)||mt["Hangul Jamo Extended-A"](r)||mt["Hangul Jamo Extended-B"](r)||mt["Hangul Jamo"](r)||mt["Hangul Syllables"](r)||mt.Hiragana(r)||mt["Ideographic Description Characters"](r)||mt.Kanbun(r)||mt["Kangxi Radicals"](r)||mt["Katakana Phonetic Extensions"](r)||mt.Katakana(r)&&r!==12540||!(!mt["Halfwidth and Fullwidth Forms"](r)||r===65288||r===65289||r===65293||r>=65306&&r<=65310||r===65339||r===65341||r===65343||r>=65371&&r<=65503||r===65507||r>=65512&&r<=65519)||!(!mt["Small Form Variants"](r)||r>=65112&&r<=65118||r>=65123&&r<=65126)||mt["Unified Canadian Aboriginal Syllabics"](r)||mt["Unified Canadian Aboriginal Syllabics Extended"](r)||mt["Vertical Forms"](r)||mt["Yijing Hexagram Symbols"](r)||mt["Yi Syllables"](r)||mt["Yi Radicals"](r))))}function Ad(r){return!(pl(r)||function(e){return!!(mt["Latin-1 Supplement"](e)&&(e===167||e===169||e===174||e===177||e===188||e===189||e===190||e===215||e===247)||mt["General Punctuation"](e)&&(e===8214||e===8224||e===8225||e===8240||e===8241||e===8251||e===8252||e===8258||e===8263||e===8264||e===8265||e===8273)||mt["Letterlike Symbols"](e)||mt["Number Forms"](e)||mt["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||e===9003||e>=9085&&e<=9114||e>=9150&&e<=9165||e===9167||e>=9169&&e<=9179||e>=9186&&e<=9215)||mt["Control Pictures"](e)&&e!==9251||mt["Optical Character Recognition"](e)||mt["Enclosed Alphanumerics"](e)||mt["Geometric Shapes"](e)||mt["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||mt["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||mt["CJK Symbols and Punctuation"](e)||mt.Katakana(e)||mt["Private Use Area"](e)||mt["CJK Compatibility Forms"](e)||mt["Small Form Variants"](e)||mt["Halfwidth and Fullwidth Forms"](e)||e===8734||e===8756||e===8757||e>=9984&&e<=10087||e>=10102&&e<=10131||e===65532||e===65533)}(r))}function _f(r){return mt.Arabic(r)||mt["Arabic Supplement"](r)||mt["Arabic Extended-A"](r)||mt["Arabic Presentation Forms-A"](r)||mt["Arabic Presentation Forms-B"](r)}function Md(r){return r>=1424&&r<=2303||mt["Arabic Presentation Forms-A"](r)||mt["Arabic Presentation Forms-B"](r)}function gf(r,e){return!(!e&&Md(r)||r>=2304&&r<=3583||r>=3840&&r<=4255||mt.Khmer(r))}function yf(r){for(const e of r)if(Md(e.charCodeAt(0)))return!0;return!1}const Hh="deferred",Wh="loading",Zh="loaded";let Xh=null,oo="unavailable",Vs=null;const An=function(r){r&&typeof r=="string"&&r.indexOf("NetworkError")>-1&&(oo="error"),Xh&&Xh(r)};function Sc(){Ec.fire(new Cs("pluginStateChange",{pluginStatus:oo,pluginURL:Vs}))}const Ec=new pn,pa=function(){return oo},Cd=function(){if(oo!==Hh||!Vs)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");oo=Wh,Sc(),Vs&&Zn({url:Vs},r=>{r?An(r):(oo=Zh,Sc())})},xo={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>oo===Zh||xo.applyArabicShaping!=null,isLoading:()=>oo===Wh,setState(r){oo=r.pluginStatus,Vs=r.pluginURL},isParsed:()=>xo.applyArabicShaping!=null&&xo.processBidirectionalText!=null&&xo.processStyledBidirectionalText!=null,getPluginURL:()=>Vs};class ai{constructor(e,i){this.zoom=e,i?(this.now=i.now,this.fadeDuration=i.fadeDuration,this.transition=i.transition,this.pitch=i.pitch,this.brightness=i.brightness):(this.now=0,this.fadeDuration=0,this.transition={},this.pitch=0,this.brightness=0)}isSupportedScript(e){return function(i,s){for(const a of i)if(!gf(a.charCodeAt(0),s))return!1;return!0}(e,xo.isLoaded())}}class fl{constructor(e,i,s,a){this.property=e,this.value=i,this.expression=function(h,u,f,_){if(xc(h))return new hl(h,u);if(bc(h)||Array.isArray(h)&&h.length>0){const g=cl(h,u,f,_);if(g.result==="error")throw new Error(g.value.map(v=>`${v.key}: ${v.message}`).join(", "));return g.value}{let g=h;return typeof h=="string"&&u.type==="color"&&(g=Jt.parse(h)),{kind:"constant",configDependencies:new Set,evaluate:()=>g}}}(i===void 0?e.specification.default:i,e.specification,s,a)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(e,i,s){return this.property.possiblyEvaluate(this,e,i,s)}}class Us{constructor(e,i,s){this.property=e,this.value=new fl(e,void 0,i,s)}transitioned(e,i){return new zd(this.property,this.value,i,ye({},e.transition,this.transition),e.now)}untransitioned(){return new zd(this.property,this.value,null,{},0)}}class Pd{constructor(e,i,s){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._scope=i,this._options=s,this.configDependencies=new Set}getValue(e){return Ft(this._values[e].value.value)}setValue(e,i){this._values.hasOwnProperty(e)||(this._values[e]=new Us(this._values[e].property,this._scope,this._options)),this._values[e].value=new fl(this._values[e].property,i===null?void 0:Ft(i),this._scope,this._options),this._values[e].value.expression.configDependencies&&(this.configDependencies=new Set([...this.configDependencies,...this._values[e].value.expression.configDependencies]))}setTransitionOrValue(e,i){i&&(this._options=i);const s=this._properties.properties;if(e)for(const a in e){const h=e[a];if(a.endsWith("-transition")){const u=a.slice(0,-11);s[u]&&this.setTransition(u,h)}else s.hasOwnProperty(a)&&this.setValue(a,h)}}getTransition(e){return Ft(this._values[e].transition)}setTransition(e,i){this._values.hasOwnProperty(e)||(this._values[e]=new Us(this._values[e].property)),this._values[e].transition=Ft(i)||void 0}serialize(){const e={};for(const i of Object.keys(this._values)){const s=this.getValue(i);s!==void 0&&(e[i]=s);const a=this.getTransition(i);a!==void 0&&(e[`${i}-transition`]=a)}return e}transitioned(e,i){const s=new Dd(this._properties);for(const a of Object.keys(this._values))s._values[a]=this._values[a].transitioned(e,i._values[a]);return s}untransitioned(){const e=new Dd(this._properties);for(const i of Object.keys(this._values))e._values[i]=this._values[i].untransitioned();return e}}class zd{constructor(e,i,s,a,h){const u=a.delay||0,f=a.duration||0;h=h||0,this.property=e,this.value=i,this.begin=h+u,this.end=this.begin+f,e.specification.transition&&(a.delay||a.duration)&&(this.prior=s)}possiblyEvaluate(e,i,s){const a=e.now||0,h=this.value.possiblyEvaluate(e,i,s),u=this.prior;if(u){if(a>this.end)return this.prior=null,h;if(this.value.isDataDriven())return this.prior=null,h;if(a<this.begin)return u.possiblyEvaluate(e,i,s);{const f=(a-this.begin)/(this.end-this.begin);return this.property.interpolate(u.possiblyEvaluate(e,i,s),h,se(f))}}return h}}class Dd{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,i,s){const a=new Mn(this._properties);for(const h of Object.keys(this._values))a._values[h]=this._values[h].possiblyEvaluate(e,i,s);return a}hasTransition(){for(const e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class xf{constructor(e,i,s){this._properties=e,this._values=Object.create(e.defaultPropertyValues),this._scope=i,this._options=s,this.configDependencies=new Set}getValue(e){return Ft(this._values[e].value)}setValue(e,i){this._values[e]=new fl(this._values[e].property,i===null?void 0:Ft(i),this._scope,this._options),this._values[e].expression.configDependencies&&(this.configDependencies=new Set([...this.configDependencies,...this._values[e].expression.configDependencies]))}serialize(){const e={};for(const i of Object.keys(this._values)){const s=this.getValue(i);s!==void 0&&(e[i]=s)}return e}possiblyEvaluate(e,i,s){const a=new Mn(this._properties);for(const h of Object.keys(this._values))a._values[h]=this._values[h].possiblyEvaluate(e,i,s);return a}}class fa{constructor(e,i,s){this.property=e,this.value=i,this.parameters=s}isConstant(){return this.value.kind==="constant"}constantOr(e){return this.value.kind==="constant"?this.value.value:e}evaluate(e,i,s,a){return this.property.evaluate(this.value,this.parameters,e,i,s,a)}}class Mn{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class qe{constructor(e){this.specification=e}possiblyEvaluate(e,i){return e.expression.evaluate(i)}interpolate(e,i,s){const a=$l[this.specification.type];return a?a(e,i,s):e}}class tt{constructor(e,i){this.specification=e,this.overrides=i}possiblyEvaluate(e,i,s,a){return new fa(this,e.expression.kind==="constant"||e.expression.kind==="camera"?{kind:"constant",value:e.expression.evaluate(i,null,{},s,a)}:e.expression,i)}interpolate(e,i,s){if(e.value.kind!=="constant"||i.value.kind!=="constant")return e;if(e.value.value===void 0||i.value.value===void 0)return new fa(this,{kind:"constant",value:void 0},e.parameters);const a=$l[this.specification.type];return a?new fa(this,{kind:"constant",value:a(e.value.value,i.value.value,s)},e.parameters):e}evaluate(e,i,s,a,h,u){return e.kind==="constant"?e.value:e.evaluate(i,s,a,h,u)}}class Cn{constructor(e){this.specification=e}possiblyEvaluate(e,i,s,a){return!!e.expression.evaluate(i,null,{},s,a)}interpolate(){return!1}}class Xi{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];const i=new ai(0,{});for(const s in e){const a=e[s];a.specification.overridable&&this.overridableProperties.push(s);const h=this.defaultPropertyValues[s]=new fl(a,void 0),u=this.defaultTransitionablePropertyValues[s]=new Us(a);this.defaultTransitioningPropertyValues[s]=u.untransitioned(),this.defaultPossiblyEvaluatedValues[s]=h.possiblyEvaluate(i)}}}it(tt,"DataDrivenProperty"),it(qe,"DataConstantProperty"),it(Cn,"ColorRampProperty");var me=JSON.parse('{"$version":8,"$root":{"version":{"type":"enum","values":[8]},"fragment":{"type":"boolean"},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360},"pitch":{"type":"number","default":0},"light":{"type":"light"},"lights":{"type":"array","value":"light-3d"},"terrain":{"type":"terrain","optional":true},"fog":{"type":"fog"},"snow":{"type":"snow"},"rain":{"type":"rain"},"camera":{"type":"camera"},"color-theme":{"type":"colorTheme"},"indoor":{"type":"indoor"},"imports":{"type":"array","value":"import"},"iconsets":{"type":"iconsets"},"schema":{"type":"schema"},"sources":{"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string","default":"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"type":"array","value":"layer"},"models":{"type":"models"},"featuresets":{"type":"featuresets"}},"featuresets":{"*":{"type":"featureset"}},"featureset":{"metadata":{"type":"*"},"selectors":{"type":"array","value":"selector"}},"selector":{"layer":{"type":"string"},"properties":{"type":"selectorProperty"},"featureNamespace":{"type":"string"},"_uniqueFeatureID":{"type":"boolean"}},"selectorProperty":{"*":{"type":"*"}},"model":{"type":"string"},"import":{"id":{"type":"string"},"url":{"type":"string"},"config":{"type":"config"},"data":{"type":"$root"},"color-theme":{"type":"colorTheme","optional":true}},"config":{"*":{"type":"*"}},"schema":{"*":{"type":"option"}},"option":{"default":{"type":"*","expression":{}},"type":{"type":"enum","values":{"string":1,"number":1,"boolean":1,"color":1}},"array":{"type":"boolean"},"minValue":{"type":"number"},"maxValue":{"type":"number"},"stepValue":{"type":"number"},"values":{"type":"array","value":"*"},"metadata":{"type":"*"}},"models":{"*":{"type":"model"}},"light-3d":{"id":{"type":"string"},"properties":{"type":"properties"},"type":{"type":"enum","values":{"ambient":{},"directional":{},"flat":{}}}},"properties":["properties_light_directional","properties_light_ambient","properties_light_flat"],"properties_light_directional":{"direction":{"type":"array","default":[210,30],"minimum":[0,0],"maximum":[360,90],"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"cast-shadows":{"type":"boolean","default":false},"shadow-quality":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"parameters":["zoom"]}},"shadow-intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_ambient":{"color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_flat":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"iconsets":{"*":{"type":"iconset"}},"iconset":["iconset_sprite","iconset_source"],"iconset_sprite":{"type":{"type":"enum","values":{"sprite":1}},"url":{"type":"string"}},"iconset_source":{"type":{"type":"enum","values":{"source":1}},"source":{"type":"string"}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_raster_array","source_geojson","source_video","source_image","source_model"],"source_vector":{"type":{"type":"enum","values":{"vector":1}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"extra_bounds":{"type":"array","value":{"type":"array","value":"number","length":4}},"scheme":{"type":"enum","values":{"xyz":1,"tms":1},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"type":"enum","values":{"raster":1}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"extra_bounds":{"type":"array","value":{"type":"array","value":"number","length":4}},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512},"scheme":{"type":"enum","values":{"xyz":1,"tms":1},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"type":"enum","values":{"raster-dem":1}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"extra_bounds":{"type":"array","value":{"type":"array","value":"number","length":4}},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":1,"mapbox":1},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_array":{"type":{"type":"enum","values":{"raster-array":1}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"extra_bounds":{"type":"array","value":{"type":"array","value":"number","length":4}},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512},"attribution":{"type":"string"},"rasterLayers":{"type":"*"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_geojson":{"type":{"type":"enum","values":{"geojson":1}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"minzoom":{"type":"number","default":0},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"},"dynamic":{"type":"boolean","default":false}},"source_video":{"type":{"type":"enum","values":{"video":1}},"urls":{"type":"array","value":"string"},"coordinates":{"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"type":"enum","values":{"image":1}},"url":{"type":"string"},"coordinates":{"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_model":{"type":{"type":"enum","values":{"model":1,"batched-model":1}},"maxzoom":{"type":"number","default":18},"minzoom":{"type":"number","default":0},"tiles":{"type":"array","value":"string"}},"layer":{"id":{"type":"string"},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"building":{},"raster":{},"raster-particle":{},"hillshade":{},"model":{},"background":{},"sky":{},"slot":{},"clip":{}}},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"slot":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":24},"maxzoom":{"type":"number","minimum":0,"maximum":24},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"}},"layout":["layout_clip","layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_building","layout_symbol","layout_raster","layout_raster-particle","layout_hillshade","layout_background","layout_sky","layout_model"],"layout_background":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"layout_model":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}},"model-id":{"type":"string","default":"","property-type":"data-driven","expression":{"parameters":["zoom","feature"]}}},"layout_clip":{"clip-layer-types":{"type":"array","value":"enum","values":{"model":1,"symbol":1},"default":[],"expression":{}},"clip-layer-scope":{"type":"array","value":"string","default":[],"expression":{}}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}},"fill-elevation-reference":{"type":"enum","values":{"none":1,"hd-road-base":1,"hd-road-markup":1},"default":"none","expression":{}},"fill-construct-bridge-guard-rail":{"type":"boolean","default":"true","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"circle-elevation-reference":{"type":"enum","values":{"none":1,"hd-road-markup":1},"default":"none","expression":{}},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}},"fill-extrusion-edge-radius":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{}}},"layout_building":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}},"building-roof-shape":{"type":"enum","values":{"flat":1,"hipped":1,"gabled":1,"parapet":1,"mansard":1,"skillion":1,"pyramidal":1},"default":"flat","expression":{"parameters":["feature"]},"property-type":"data-driven"},"building-height":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{},"property-type":"data-driven"},"building-base":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{},"property-type":"data-driven"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":1,"round":1,"square":1},"default":"butt","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":1,"round":1,"miter":1,"none":1},"default":"miter","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"expression":{"interpolated":true,"parameters":["zoom"]}},"line-round-limit":{"type":"number","default":1.05,"expression":{"interpolated":true,"parameters":["zoom"]}},"line-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-z-offset":{"type":"number","default":0,"expression":{"parameters":["zoom","feature","line-progress"]},"property-type":"data-driven"},"line-elevation-reference":{"type":"enum","values":{"none":1,"sea":1,"ground":1,"hd-road-markup":1},"default":"none","expression":{}},"line-cross-slope":{"type":"number","expression":{}},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}},"line-width-unit":{"type":"enum","values":{"pixels":1,"meters":1},"default":"pixels","expression":{"parameters":["zoom"]}}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":1,"line":1,"line-center":1},"default":"point","expression":{"parameters":["zoom"]}},"symbol-spacing":{"type":"number","default":250,"minimum":1,"expression":{"interpolated":true,"parameters":["zoom"]}},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"symbol-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":1,"viewport-y":1,"source":1},"default":"auto","expression":{"parameters":["zoom"]}},"symbol-z-elevate":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"symbol-elevation-reference":{"type":"enum","values":{"sea":1,"ground":1,"hd-road-markup":1},"default":"ground","expression":{"parameters":["zoom"]}},"icon-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"icon-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"icon-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"icon-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]}},"icon-size":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-size-scale-range":{"type":"array","value":"number","length":2,"default":[0.8,2],"minimum":0.1,"maximum":10,"expression":{}},"icon-text-fit":{"type":"enum","values":{"none":1,"width":1,"height":1,"both":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]}},"icon-keep-upright":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]}},"text-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]}},"text-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]}},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size-scale-range":{"type":"array","value":"number","length":2,"default":[0.8,2],"minimum":0.1,"maximum":10,"expression":{}},"text-max-width":{"type":"number","default":10,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":1,"left":1,"center":1,"right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","default":0,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"expression":{"parameters":["zoom"]}},"text-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"expression":{"interpolated":true,"parameters":["zoom"]}},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":1,"vertical":1},"expression":{"parameters":["zoom"]}},"text-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]}},"text-keep-upright":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"text-transform":{"type":"enum","values":{"none":1,"uppercase":1,"lowercase":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"text-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"text-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"layout_raster-particle":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_hillshade":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_raster":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_raster-particle":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_clip":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_model":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_building":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":1,"!=":1,">":1,">=":1,"<":1,"<=":1,"in":1,"!in":1,"all":1,"any":1,"none":1,"has":1,"!has":1}},"geometry_type":{"type":"enum","values":{"Point":1,"LineString":1,"Polygon":1}},"function":{"expression":{"type":"expression"},"stops":{"type":"array","value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":{"identity":1,"exponential":1,"interval":1,"categorical":1},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":1,"lab":1,"hcl":1},"default":"rgb"},"default":{"type":"*"}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"high-color":{"type":"color","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"space-color":{"type":"color","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"horizon-blend":{"type":"number","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"star-intensity":{"type":"number","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vertical-range":{"type":"array","default":[0,0],"minimum":0,"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}}},"snow":{"density":{"type":"number","default":["interpolate",["linear"],["zoom"],11,0,13,0.85],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette":{"type":"number","default":["interpolate",["linear"],["zoom"],11,0,13,0.3],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette-color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"center-thinning":{"type":"number","default":0.4,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"direction":{"type":"array","default":[0,50],"minimum":0,"maximum":360,"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"flake-size":{"type":"number","default":0.71,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true}},"rain":{"density":{"type":"number","default":["interpolate",["linear"],["zoom"],11,0,13,0.5],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"color":{"type":"color","default":["interpolate",["linear"],["measure-light","brightness"],0,"#03113d",0.3,"#a8adbc"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"opacity":{"type":"number","default":["interpolate",["linear"],["measure-light","brightness"],0,0.88,1,0.7],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette":{"type":"number","default":["interpolate",["linear"],["zoom"],11,0,13,1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette-color":{"type":"color","default":["interpolate",["linear"],["measure-light","brightness"],0,"#001736",0.3,"#464646"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"center-thinning":{"type":"number","default":0.57,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"direction":{"type":"array","default":[0,80],"minimum":0,"maximum":360,"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"droplet-size":{"type":"array","default":[2.6,18.2],"minimum":0,"maximum":50,"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"distortion-strength":{"type":"number","default":0.7,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true}},"camera":{"camera-projection":{"type":"enum","values":{"perspective":1,"orthographic":1},"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"default":"perspective"}},"colorTheme":{"data":{"type":"string","expression":{}}},"indoor":{"floorplanFeaturesetId":{"type":"string","expression":{}},"buildingFeaturesetId":{"type":"string","expression":{}}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":1,"equalEarth":1,"equirectangular":1,"lambertConformalConic":1,"mercator":1,"naturalEarth":1,"winkelTripel":1,"globe":1},"default":"mercator"},"center":{"type":"array","length":2,"value":"number","minimum":[-180,-90],"maximum":[180,90]},"parallels":{"type":"array","length":2,"value":"number","minimum":[-90,-90],"maximum":[90,90]}},"terrain":{"source":{"type":"string"},"exaggeration":{"type":"number","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_building","paint_symbol","paint_raster","paint_raster-particle","paint_hillshade","paint_background","paint_sky","paint_model"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"fill-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-pattern-cross-fade":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"transition":true},"fill-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-z-offset":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-bridge-guard-rail-color":{"type":"color","default":"rgba(241, 236, 225, 255)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature"]},"property-type":"data-driven"},"fill-tunnel-structure-color":{"type":"color","default":"rgba(241, 236, 225, 255)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"fill-extrusion-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-pattern-cross-fade":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"transition":true},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-height-alignment":{"type":"enum","values":{"terrain":1,"flat":1},"default":"flat"},"fill-extrusion-base-alignment":{"type":"enum","values":{"terrain":1,"flat":1},"default":"terrain"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"fill-extrusion-ambient-occlusion-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-wall-radius":{"type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-radius":{"type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-attenuation":{"type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-flood-light-color":{"type":"color","default":"#ffffff","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-wall-radius":{"property-type":"data-driven","type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-radius":{"property-type":"data-driven","type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-attenuation":{"type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-vertical-scale":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-rounded-roof":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"fill-extrusion-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{}},"fill-extrusion-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature-state"]},"property-type":"data-driven"},"fill-extrusion-line-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-extrusion-cast-shadows":{"type":"boolean","default":true}},"paint_building":{"building-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"building-ambient-occlusion-wall-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"building-ambient-occlusion-ground-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"building-ambient-occlusion-ground-radius":{"type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"building-ambient-occlusion-ground-attenuation":{"type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"building-vertical-scale":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"building-cast-shadows":{"type":"boolean","default":true},"building-color":{"type":"color","default":"rgba(193, 154, 127, 1)","expression":{"interpolated":true,"parameters":["feature","feature-state"]},"property-type":"data-driven"},"building-emissive-strength":{"type":"number","default":0,"minimum":0,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"property-type":"data-driven"}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"line-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light","line-progress"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern-cross-fade":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"transition":true},"line-gradient":{"type":"color","expression":{"interpolated":true,"parameters":["line-progress"]}},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1]},"line-trim-fade-range":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"line-trim-color":{"type":"color","default":"transparent","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"line-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"line-border-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-border-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-occlusion-opacity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"circle-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"circle-pitch-scale":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"circle-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]}},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"expression":{"interpolated":true,"parameters":["heatmap-density"]}},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-occlusion-opacity":{"type":"number","minimum":0,"maximum":1,"default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature-state"]},"property-type":"data-driven"},"text-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"icon-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"icon-image-cross-fade":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"transition":true},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-occlusion-opacity":{"type":"number","minimum":0,"maximum":1,"default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"text-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"icon-color-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"expression":{}},"icon-color-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"expression":{}},"icon-color-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{}},"icon-color-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{}},"symbol-z-offset":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-color":{"type":"color","expression":{"interpolated":true,"parameters":["raster-value"]}},"raster-color-mix":{"type":"array","default":[0.2126,0.7152,0.0722,0],"length":4,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-color-range":{"type":"array","length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-resampling":{"type":"enum","values":{"linear":1,"nearest":1},"default":"linear","expression":{"parameters":["zoom"]}},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"raster-array-band":{"type":"string"},"raster-elevation":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}}},"paint_raster-particle":{"raster-particle-array-band":{"type":"string"},"raster-particle-count":{"type":"number","default":512,"minimum":1},"raster-particle-color":{"type":"color","expression":{"interpolated":true,"parameters":["raster-particle-speed"]}},"raster-particle-max-speed":{"type":"number","default":1,"minimum":1},"raster-particle-speed-factor":{"type":"number","default":0.2,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-particle-fade-opacity-factor":{"type":"number","default":0.98,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-particle-reset-rate-factor":{"type":"number","default":0.8,"minimum":0,"maximum":1},"raster-particle-elevation":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"expression":{"interpolated":true,"parameters":["zoom"]}},"hillshade-illumination-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]}},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"hillshade-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}}},"paint_background":{"background-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":[]}},"background-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"background-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom"]}},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"background-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":1,"atmosphere":1},"default":"atmosphere","expression":{"parameters":["zoom"]}},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]}},"sky-atmosphere-sun-intensity":{"type":"number","default":10,"minimum":0,"maximum":100},"sky-gradient-center":{"type":"array","value":"number","default":[0,0],"length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]}},"sky-gradient-radius":{"type":"number","default":90,"minimum":0,"maximum":180,"expression":{"parameters":["zoom"]}},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]}},"sky-atmosphere-halo-color":{"type":"color","default":"white"},"sky-atmosphere-color":{"type":"color","default":"white"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}}},"paint_model":{"model-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"property-type":"data-driven"},"model-rotation":{"type":"array","value":"number","length":3,"default":[0,0,0],"period":360,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-scale":{"type":"array","value":"number","length":3,"default":[1,1,1],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-translation":{"type":"array","value":"number","length":3,"default":[0,0,0],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-color":{"type":"color","default":"#ffffff","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light","zoom"]},"transition":true},"model-color-mix-intensity":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-type":{"type":"enum","values":{"common-3d":1,"location-indicator":1},"default":"common-3d"},"model-cast-shadows":{"type":"boolean","default":true},"model-receive-shadows":{"type":"boolean","default":true},"model-ambient-occlusion-intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"model-emissive-strength":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-roughness":{"type":"number","default":1,"minimum":0,"maximum":1,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state"]},"transition":true},"model-height-based-emissive-strength-multiplier":{"type":"array","default":[1,1,1,1,0],"length":5,"value":"number","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{}},"model-front-cutoff":{"type":"array","value":"number","expression":{"interpolated":true,"parameters":["zoom"]},"length":3,"default":[0,0,1],"minimum":[0,0,0],"maximum":[1,1,1]}},"transition":{"duration":{"type":"number","default":300,"minimum":0},"delay":{"type":"number","default":0,"minimum":0}},"promoteId":{"*":{"type":"*"}}}');function Co(r){return r instanceof Number||r instanceof String||r instanceof Boolean?r.valueOf():r}function Ic(r){if(Array.isArray(r))return r.map(Ic);if(r instanceof Object&&!(r instanceof Number||r instanceof String||r instanceof Boolean)){const e={};for(const i in r)e[i]=Ic(r[i]);return e}return Co(r)}function Ac(r){if(r===!0||r===!1)return!0;if(!Array.isArray(r)||r.length===0)return!1;switch(r[0]){case"has":return r.length>=2&&r[1]!=="$id"&&r[1]!=="$type";case"in":return r.length>=3&&(typeof r[1]!="string"||Array.isArray(r[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return r.length!==3||Array.isArray(r[1])||Array.isArray(r[2]);case"any":case"all":for(const e of r.slice(1))if(!Ac(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function $h(r,e="",i=null,s="fill"){if(r==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};Ac(r)||(r=Mc(r));const a=r;let h=!0;try{h=function(v){if(!ma(v))return v;let b=Ic(v);return Ld(b),b=Rd(b),b}(a)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const eb=require("./index-C_F8-HpP.js");function tb(rh,Zp){for(var Ys=0;Ys<Zp.length;Ys++){const $o=Zp[Ys];if(typeof $o!="string"&&!Array.isArray($o)){for(const Ks in $o)if(Ks!=="default"&&!(Ks in rh)){const La=Object.getOwnPropertyDescriptor($o,Ks);La&&Object.defineProperty(rh,Ks,La.get?La:{enumerable:!0,get:()=>$o[Ks]})}}}return Object.freeze(Object.defineProperty(rh,Symbol.toStringTag,{value:"Module"}))}var Wp={exports:{}},ib=Wp.exports,Nx;function rb(){return Nx||(Nx=1,function(rh,Zp){(function(Ys,$o){rh.exports=$o()})(ib,function(){"use strict";var Ys,$o,Ks;function La(n,Rr){if(!Ys)Ys=Rr;else if(!$o)$o=Rr;else{var qi="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+Ys+")(sharedChunk); ("+$o+")(sharedChunk); self.onerror = null;",Yo={};Ys(Yo),Ks=Rr(Yo),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(Ks.workerUrl=window.URL.createObjectURL(new Blob([qi],{type:"text/javascript"})))}}La(["exports"],function(n){var Rr=1e-6,qi=typeof Float32Array<"u"?Float32Array:Array;function Yo(r,e){var i=e[0],s=e[1],a=e[2],h=e[3],u=i*h-a*s;return u?(r[0]=h*(u=1/u),r[1]=-s*u,r[2]=-a*u,r[3]=i*u,r):null}function Fl(){var r=new qi(9);return qi!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r}function Qs(r,e){var i=e[0],s=e[1],a=e[2],h=e[3],u=e[4],f=e[5],_=e[6],g=e[7],v=e[8];return r[0]=u*v-f*g,r[1]=a*g-s*v,r[2]=s*f-a*u,r[3]=f*_-h*v,r[4]=i*v-a*_,r[5]=a*h-i*f,r[6]=h*g-u*_,r[7]=s*_-i*g,r[8]=i*u-s*h,r}function Fo(r,e,i){var s=e[0],a=e[1],h=e[2],u=e[3],f=e[4],_=e[5],g=e[6],v=e[7],b=e[8],T=i[0],A=i[1],M=i[2],P=i[3],k=i[4],F=i[5],q=i[6],j=i[7],z=i[8];return r[0]=T*s+A*u+M*g,r[1]=T*a+A*f+M*v,r[2]=T*h+A*_+M*b,r[3]=P*s+k*u+F*g,r[4]=P*a+k*f+F*v,r[5]=P*h+k*_+F*b,r[6]=q*s+j*u+z*g,r[7]=q*a+j*f+z*v,r[8]=q*h+j*_+z*b,r}function Js(){var r=new qi(16);return qi!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0),r[0]=1,r[5]=1,r[10]=1,r[15]=1,r}function Ut(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function Wr(r,e){var i=e[0],s=e[1],a=e[2],h=e[3],u=e[4],f=e[5],_=e[6],g=e[7],v=e[8],b=e[9],T=e[10],A=e[11],M=e[12],P=e[13],k=e[14],F=e[15],q=i*f-s*u,j=i*_-a*u,z=i*g-h*u,N=s*_-a*f,G=s*g-h*f,Z=a*g-h*_,re=v*P-b*M,ne=v*k-T*M,ae=v*F-A*M,de=b*k-T*P,xe=b*F-A*P,Ve=T*F-A*k,De=q*Ve-j*xe+z*de+N*ae-G*ne+Z*re;return De?(r[0]=(f*Ve-_*xe+g*de)*(De=1/De),r[1]=(a*xe-s*Ve-h*de)*De,r[2]=(P*Z-k*G+F*N)*De,r[3]=(T*G-b*Z-A*N)*De,r[4]=(_*ae-u*Ve-g*ne)*De,r[5]=(i*Ve-a*ae+h*ne)*De,r[6]=(k*z-M*Z-F*j)*De,r[7]=(v*Z-T*z+A*j)*De,r[8]=(u*xe-f*ae+g*re)*De,r[9]=(s*ae-i*xe-h*re)*De,r[10]=(M*G-P*z+F*q)*De,r[11]=(b*z-v*G-A*q)*De,r[12]=(f*ne-u*de-_*re)*De,r[13]=(i*de-s*ne+a*re)*De,r[14]=(P*j-M*N-k*q)*De,r[15]=(v*N-b*j+T*q)*De,r):null}function Ni(r,e,i){var s=e[0],a=e[1],h=e[2],u=e[3],f=e[4],_=e[5],g=e[6],v=e[7],b=e[8],T=e[9],A=e[10],M=e[11],P=e[12],k=e[13],F=e[14],q=e[15],j=i[0],z=i[1],N=i[2],G=i[3];return r[0]=j*s+z*f+N*b+G*P,r[1]=j*a+z*_+N*T+G*k,r[2]=j*h+z*g+N*A+G*F,r[3]=j*u+z*v+N*M+G*q,r[4]=(j=i[4])*s+(z=i[5])*f+(N=i[6])*b+(G=i[7])*P,r[5]=j*a+z*_+N*T+G*k,r[6]=j*h+z*g+N*A+G*F,r[7]=j*u+z*v+N*M+G*q,r[8]=(j=i[8])*s+(z=i[9])*f+(N=i[10])*b+(G=i[11])*P,r[9]=j*a+z*_+N*T+G*k,r[10]=j*h+z*g+N*A+G*F,r[11]=j*u+z*v+N*M+G*q,r[12]=(j=i[12])*s+(z=i[13])*f+(N=i[14])*b+(G=i[15])*P,r[13]=j*a+z*_+N*T+G*k,r[14]=j*h+z*g+N*A+G*F,r[15]=j*u+z*v+N*M+G*q,r}function Lr(r,e,i){var s,a,h,u,f,_,g,v,b,T,A,M,P=i[0],k=i[1],F=i[2];return e===r?(r[12]=e[0]*P+e[4]*k+e[8]*F+e[12],r[13]=e[1]*P+e[5]*k+e[9]*F+e[13],r[14]=e[2]*P+e[6]*k+e[10]*F+e[14],r[15]=e[3]*P+e[7]*k+e[11]*F+e[15]):(a=e[1],h=e[2],u=e[3],f=e[4],_=e[5],g=e[6],v=e[7],b=e[8],T=e[9],A=e[10],M=e[11],r[0]=s=e[0],r[1]=a,r[2]=h,r[3]=u,r[4]=f,r[5]=_,r[6]=g,r[7]=v,r[8]=b,r[9]=T,r[10]=A,r[11]=M,r[12]=s*P+f*k+b*F+e[12],r[13]=a*P+_*k+T*F+e[13],r[14]=h*P+g*k+A*F+e[14],r[15]=u*P+v*k+M*F+e[15]),r}function Mr(r,e,i){var s=i[0],a=i[1],h=i[2];return r[0]=e[0]*s,r[1]=e[1]*s,r[2]=e[2]*s,r[3]=e[3]*s,r[4]=e[4]*a,r[5]=e[5]*a,r[6]=e[6]*a,r[7]=e[7]*a,r[8]=e[8]*h,r[9]=e[9]*h,r[10]=e[10]*h,r[11]=e[11]*h,r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}function bs(r,e,i){var s=Math.sin(i),a=Math.cos(i),h=e[4],u=e[5],f=e[6],_=e[7],g=e[8],v=e[9],b=e[10],T=e[11];return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[4]=h*a+g*s,r[5]=u*a+v*s,r[6]=f*a+b*s,r[7]=_*a+T*s,r[8]=g*a-h*s,r[9]=v*a-u*s,r[10]=b*a-f*s,r[11]=T*a-_*s,r}function Ko(r,e,i){var s=Math.sin(i),a=Math.cos(i),h=e[0],u=e[1],f=e[2],_=e[3],g=e[8],v=e[9],b=e[10],T=e[11];return e!==r&&(r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=h*a-g*s,r[1]=u*a-v*s,r[2]=f*a-b*s,r[3]=_*a-T*s,r[8]=h*s+g*a,r[9]=u*s+v*a,r[10]=f*s+b*a,r[11]=_*s+T*a,r}function ws(r,e,i){var s=Math.sin(i),a=Math.cos(i),h=e[0],u=e[1],f=e[2],_=e[3],g=e[4],v=e[5],b=e[6],T=e[7];return e!==r&&(r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=h*a+g*s,r[1]=u*a+v*s,r[2]=f*a+b*s,r[3]=_*a+T*s,r[4]=g*a-h*s,r[5]=v*a-u*s,r[6]=b*a-f*s,r[7]=T*a-_*s,r}function Qo(r,e){return r[0]=e[0],r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=e[1],r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=e[2],r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function Jo(r,e,i){var s,a,h,u=i[0],f=i[1],_=i[2],g=Math.hypot(u,f,_);return g<Rr?null:(u*=g=1/g,f*=g,_*=g,s=Math.sin(e),a=Math.cos(e),r[0]=u*u*(h=1-a)+a,r[1]=f*u*h+_*s,r[2]=_*u*h-f*s,r[3]=0,r[4]=u*f*h-_*s,r[5]=f*f*h+a,r[6]=_*f*h+u*s,r[7]=0,r[8]=u*_*h+f*s,r[9]=f*_*h-u*s,r[10]=_*_*h+a,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r)}function en(r,e){var i=e[0],s=e[1],a=e[2],h=e[3],u=i+i,f=s+s,_=a+a,g=i*u,v=s*u,b=s*f,T=a*u,A=a*f,M=a*_,P=h*u,k=h*f,F=h*_;return r[0]=1-b-M,r[1]=v+F,r[2]=T-k,r[3]=0,r[4]=v-F,r[5]=1-g-M,r[6]=A+P,r[7]=0,r[8]=T+k,r[9]=A-P,r[10]=1-g-b,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}Math.hypot||(Math.hypot=function(){for(var r=0,e=arguments.length;e--;)r+=arguments[e]*arguments[e];return Math.sqrt(r)});var ka=Ni;function ir(){var r=new qi(3);return qi!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r}function Ts(r){var e=new qi(3);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}function kr(r){return Math.hypot(r[0],r[1],r[2])}function Vi(r,e,i){var s=new qi(3);return s[0]=r,s[1]=e,s[2]=i,s}function ar(r,e,i){return r[0]=e[0]+i[0],r[1]=e[1]+i[1],r[2]=e[2]+i[2],r}function br(r,e,i){return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],r}function wo(r,e,i){return r[0]=e[0]*i[0],r[1]=e[1]*i[1],r[2]=e[2]*i[2],r}function Bo(r,e,i){return r[0]=Math.min(e[0],i[0]),r[1]=Math.min(e[1],i[1]),r[2]=Math.min(e[2],i[2]),r}function No(r,e,i){return r[0]=Math.max(e[0],i[0]),r[1]=Math.max(e[1],i[1]),r[2]=Math.max(e[2],i[2]),r}function gi(r,e,i){return r[0]=e[0]*i,r[1]=e[1]*i,r[2]=e[2]*i,r}function po(r,e,i,s){return r[0]=e[0]+i[0]*s,r[1]=e[1]+i[1]*s,r[2]=e[2]+i[2]*s,r}function Bn(r,e){var i=e[0]-r[0],s=e[1]-r[1],a=e[2]-r[2];return i*i+s*s+a*a}function Nn(r){var e=r[0],i=r[1],s=r[2];return e*e+i*i+s*s}function tn(r,e){return r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r}function Di(r,e){var i=e[0],s=e[1],a=e[2],h=i*i+s*s+a*a;return h>0&&(h=1/Math.sqrt(h)),r[0]=e[0]*h,r[1]=e[1]*h,r[2]=e[2]*h,r}function Ui(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function rr(r,e,i){var s=e[0],a=e[1],h=e[2],u=i[0],f=i[1],_=i[2];return r[0]=a*_-h*f,r[1]=h*u-s*_,r[2]=s*f-a*u,r}function Vn(r,e,i,s){var a=e[0],h=e[1],u=e[2];return r[0]=a+s*(i[0]-a),r[1]=h+s*(i[1]-h),r[2]=u+s*(i[2]-u),r}function Yi(r,e,i){var s=e[0],a=e[1],h=e[2],u=i[3]*s+i[7]*a+i[11]*h+i[15];return r[0]=(i[0]*s+i[4]*a+i[8]*h+i[12])/(u=u||1),r[1]=(i[1]*s+i[5]*a+i[9]*h+i[13])/u,r[2]=(i[2]*s+i[6]*a+i[10]*h+i[14])/u,r}function Un(r,e,i){var s=e[0],a=e[1],h=e[2];return r[0]=s*i[0]+a*i[3]+h*i[6],r[1]=s*i[1]+a*i[4]+h*i[7],r[2]=s*i[2]+a*i[5]+h*i[8],r}function Ss(r,e,i){var s=i[0],a=i[1],h=i[2],u=e[0],f=e[1],_=e[2],g=a*_-h*f,v=h*u-s*_,b=s*f-a*u,T=a*b-h*v,A=h*g-s*b,M=s*v-a*g,P=2*i[3];return v*=P,b*=P,A*=2,M*=2,r[0]=u+(g*=P)+(T*=2),r[1]=f+v+A,r[2]=_+b+M,r}function ao(r,e){return r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]}var Qi=br,oh=wo,rn=kr;function Or(){var r=new qi(4);return qi!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0,r[3]=0),r}function es(r,e,i){return r[0]=e[0]*i,r[1]=e[1]*i,r[2]=e[2]*i,r[3]=e[3]*i,r}function Es(r,e){var i=e[0],s=e[1],a=e[2],h=e[3],u=i*i+s*s+a*a+h*h;return u>0&&(u=1/Math.sqrt(u)),r[0]=i*u,r[1]=s*u,r[2]=a*u,r[3]=h*u,r}function eo(r,e,i){var s=e[0],a=e[1],h=e[2],u=e[3];return r[0]=i[0]*s+i[4]*a+i[8]*h+i[12]*u,r[1]=i[1]*s+i[5]*a+i[9]*h+i[13]*u,r[2]=i[2]*s+i[6]*a+i[10]*h+i[14]*u,r[3]=i[3]*s+i[7]*a+i[11]*h+i[15]*u,r}function To(){var r=new qi(4);return qi!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r[3]=1,r}function Is(r){return r[0]=0,r[1]=0,r[2]=0,r[3]=1,r}function ts(r,e,i){i*=.5;var s=e[0],a=e[1],h=e[2],u=e[3],f=Math.sin(i),_=Math.cos(i);return r[0]=s*_+u*f,r[1]=a*_+h*f,r[2]=h*_-a*f,r[3]=u*_-s*f,r}function on(r,e,i){i*=.5;var s=e[0],a=e[1],h=e[2],u=e[3],f=Math.sin(i),_=Math.cos(i);return r[0]=s*_-h*f,r[1]=a*_+u*f,r[2]=h*_+s*f,r[3]=u*_-a*f,r}ir(),Or();var Zr,lo,Oa,sn,jn,Vo=Es,is=(Zr=ir(),lo=Vi(1,0,0),Oa=Vi(0,1,0),function(r,e,i){var s=Ui(e,i);return s<-.999999?(rr(Zr,lo,e),rn(Zr)<1e-6&&rr(Zr,Oa,e),Di(Zr,Zr),function(a,h,u){u*=.5;var f=Math.sin(u);a[0]=f*h[0],a[1]=f*h[1],a[2]=f*h[2],a[3]=Math.cos(u)}(r,Zr,Math.PI),r):s>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(rr(Zr,e,i),r[0]=Zr[0],r[1]=Zr[1],r[2]=Zr[2],r[3]=1+s,Vo(r,r))});function Xr(){var r=new qi(2);return qi!=Float32Array&&(r[0]=0,r[1]=0),r}function nn(r,e){var i=new qi(2);return i[0]=r,i[1]=e,i}function As(r,e,i){return r[0]=e[0]+i[0],r[1]=e[1]+i[1],r}function Uo(r,e,i){return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r}function an(r,e,i){return r[0]=e[0]*i,r[1]=e[1]*i,r}function ln(r){return Math.hypot(r[0],r[1])}function Fa(r,e){var i=e[0],s=e[1],a=i*i+s*s;return a>0&&(a=1/Math.sqrt(a)),r[0]=e[0]*a,r[1]=e[1]*a,r}function Ri(r,e){return r[0]*e[0]+r[1]*e[1]}function jo(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}To(),To(),Fl(),Xr();var Gn,fo,Ba=function(){if(jn)return sn;function r(e,i,s,a){this.cx=3*e,this.bx=3*(s-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(a-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=i,this.p2x=s,this.p2y=a}return jn=1,sn=r,r.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,i){if(i===void 0&&(i=1e-6),e<0)return 0;if(e>1)return 1;for(var s=e,a=0;a<8;a++){var h=this.sampleCurveX(s)-e;if(Math.abs(h)<i)return s;var u=this.sampleCurveDerivativeX(s);if(Math.abs(u)<1e-6)break;s-=h/u}var f=0,_=1;for(s=e,a=0;a<20&&(h=this.sampleCurveX(s),!(Math.abs(h-e)<i));a++)e>h?f=s:_=s,s=.5*(_-f)+f;return s},solve:function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))}},sn}(),Bl=jo(Ba);function Na(){if(fo)return Gn;function r(e,i){this.x=e,this.y=i}return fo=1,Gn=r,r.prototype={clone:function(){return new r(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,i){return this.clone()._rotateAround(e,i)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var i=e.x-this.x,s=e.y-this.y;return i*i+s*s},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,i){return Math.atan2(this.x*i-this.y*e,this.x*e+this.y*i)},_matMult:function(e){var i=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=i,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var i=Math.cos(e),s=Math.sin(e),a=s*this.x+i*this.y;return this.x=i*this.x-s*this.y,this.y=a,this},_rotateAround:function(e,i){var s=Math.cos(e),a=Math.sin(e),h=i.y+a*(this.x-i.x)+s*(this.y-i.y);return this.x=i.x+s*(this.x-i.x)-a*(this.y-i.y),this.y=h,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},r.convert=function(e){return e instanceof r?e:Array.isArray(e)?new r(e[0],e[1]):e},Gn}var We=jo(Na());function rs(r,e){if(Array.isArray(r)){if(!Array.isArray(e)||r.length!==e.length)return!1;for(let i=0;i<r.length;i++)if(!rs(r[i],e[i]))return!1;return!0}if(typeof r=="object"&&r!==null&&e!==null){if(typeof e!="object"||Object.keys(r).length!==Object.keys(e).length)return!1;for(const i in r)if(!rs(r[i],e[i]))return!1;return!0}return r===e}const Nl=Math.PI/180,Ie=180/Math.PI;function L(r){return r*Nl}function V(r){return r*Ie}const K=[[0,0],[1,0],[1,1],[0,1]];function se(r){if(r<=0)return 0;if(r>=1)return 1;const e=r*r,i=e*r;return 4*(r<.5?i:3*(r-e)+i-.75)}function ie(r,e,i,s){const a=new Bl(r,e,i,s);return function(h){return a.solve(h)}}const ce=ie(.25,.1,.25,1);function he(r,e,i){return Math.min(i,Math.max(e,r))}function ue(r,e,i){return(i=he((i-r)/(e-r),0,1))*i*(3-2*i)}function ve(r,e,i){const s=i-e,a=((r-e)%s+s)%s+e;return a===e?i:a}function Ce(r,e,i){if(!r.length)return i(null,[]);let s=r.length;const a=new Array(r.length);let h=null;r.forEach((u,f)=>{e(u,(_,g)=>{_&&(h=_),a[f]=g,--s==0&&i(h,a)})})}function ye(r,...e){for(const i of e)for(const s in i)r[s]=i[s];return r}let Ze=1;function et(){return Ze++}function lt(r){return r<=1?1:Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function St(r,e){r.forEach(i=>{e[i]&&(e[i]=e[i].bind(e))})}function At(r,e,i){const s={};for(const a in r)s[a]=e.call(this,r[a],a,r);return s}function Pt(r,e,i){const s={};for(const a in r)e.call(this,r[a],a,r)&&(s[a]=r[a]);return s}function Ft(r){return Array.isArray(r)?r.map(Ft):typeof r=="object"&&r?At(r,Ft):r}const ji={};function Nt(r){ji[r]||(typeof console<"u"&&console.warn(r),ji[r]=!0)}function pi(r,e,i){return(i.y-r.y)*(e.x-r.x)>(e.y-r.y)*(i.x-r.x)}function Kt(r){let e=0;for(let i,s,a=0,h=r.length,u=h-1;a<h;u=a++)i=r[a],s=r[u],e+=(s.x-i.x)*(i.y+s.y);return e}function fi([r,e,i]){const s=L(e+90),a=L(i);return{x:r*Math.cos(s)*Math.sin(a),y:r*Math.sin(s)*Math.sin(a),z:r*Math.cos(a),azimuthal:e,polar:i}}function yi(r){return(typeof self<"u"||r!==void 0)&&typeof WorkerGlobalScope<"u"&&(r!==void 0?r:self)instanceof WorkerGlobalScope}function Ji(r){const e={};if(r.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(i,s,a,h)=>{const u=a||h;return e[s]=!u||u.toLowerCase(),""}),e["max-age"]){const i=parseInt(e["max-age"],10);isNaN(i)?delete e["max-age"]:e["max-age"]=i}return e}let lr=null;function mr(r,e){return[r[4*e],r[4*e+1],r[4*e+2],r[4*e+3]]}function wr(r,e,i,s){for(;e<i;){const a=e+i>>1;r[a]<s?e=a+1:i=a}return e}function os(r,e,i,s){for(;e<i;){const a=e+i>>1;r[a]<=s?e=a+1:i=a}return e}function Cr(r){return r>0?1/(1.001-r):1+r}function Pr(r){return r>0?1-1/(1.001-r):-r}function xr(r,e,i){return(r-e.min)*(i.max-i.min)/(e.max-e.min)+i.min}const Sr={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){if(!Sr.API_URL)return null;try{const r=new URL(Sr.API_URL);return r.hostname==="api.mapbox.cn"?"https://events.mapbox.cn/events/v2":r.hostname==="api.mapbox.com"?"https://events.mapbox.com/events/v2":null}catch{return null}},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",RASTERARRAYS_URL_PREFIX:"rasterarrays/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,DEFAULT_STYLE:"mapbox://styles/mapbox/standard",MAX_PARALLEL_IMAGE_REQUESTS:16,DRACO_URL:"https://api.mapbox.com/mapbox-gl-js/draco_decoder_gltf_v1.5.6.wasm",MESHOPT_URL:"https://api.mapbox.com/mapbox-gl-js/meshopt_base_v0.20.wasm",MESHOPT_SIMD_URL:"https://api.mapbox.com/mapbox-gl-js/meshopt_simd_v0.20.wasm",GLYPHS_URL:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf",TILES3D_URL_PREFIX:"3dtiles/v1"};function Go(r){return Sr.API_URL_REGEX.test(r)}function cn(r){return Sr.API_SPRITE_REGEX.test(r)}let Va,qn,Vl,Ua,hn,ja;function sh(){return Va==null&&(Va=self.OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),Va}const So={now:()=>Ua!==void 0?Ua:performance.now(),setNow(r){Ua=r},restoreNow(){Ua=void 0},frame(r){const e=requestAnimationFrame(r);return{cancel:()=>cancelAnimationFrame(e)}},getImageData(r,e=0){const{width:i,height:s}=r;hn||(hn=document.createElement("canvas"));const a=hn.getContext("2d",{willReadFrequently:!0});if(!a)throw new Error("failed to create canvas 2d context");return(i>hn.width||s>hn.height)&&(hn.width=i,hn.height=s),a.clearRect(-e,-e,i+2*e,s+2*e),a.drawImage(r,0,0,i,s),a.getImageData(-e,-e,i+2*e,s+2*e)},resolveURL:r=>(qn||(qn=document.createElement("a")),qn.href=r,qn.href),get devicePixelRatio(){return window.devicePixelRatio},get prefersReducedMotion(){return!!window.matchMedia&&(Vl==null&&(Vl=window.matchMedia("(prefers-reduced-motion: reduce)")),Vl.matches)},hasCanvasFingerprintNoise(){if(ja!==void 0)return ja;if(!sh())return ja=!1,!1;const r=new OffscreenCanvas(85,1),e=r.getContext("2d",{willReadFrequently:!0});let i=0;for(let a=0;a<r.width;++a)e.fillStyle=`rgba(${i++},${i++},${i++}, 255)`,e.fillRect(a,0,1,1);const s=e.getImageData(0,0,r.width,r.height);i=0;for(let a=0;a<s.data.length;++a)if(a%4!=3&&i++!==s.data[a])return ja=!0,!0;return ja=!1,!1}};function nh(r,e){const i=r.indexOf("?");if(i<0)return`${r}?${new URLSearchParams(e).toString()}`;const s=new URLSearchParams(r.slice(i));for(const a in e)s.set(a,e[a]);return`${r.slice(0,i)}?${s.toString()}`}function to(r,e={persistentParams:[]}){const i=r.indexOf("?");if(i<0)return r;const s=new URLSearchParams,a=new URLSearchParams(r.slice(i));for(const u of e.persistentParams){const f=a.get(u);f&&s.set(u,f)}const h=s.toString();return`${r.slice(0,i)}${h.length>0?`?${h}`:""}`}const Eo="mapbox-tiles";let ss=500,Io=50;const ns=["language","worldview","jobid"];let mo,Ga;function ah(){try{return caches}catch{}}function as(){const r=ah();r&&mo==null&&(mo=r.open(Eo))}let qa=1/0;const lh={supported:!1,testSupport:function(r){!Ul&&Fr&&(jl?Zu(r):Ha=r)}};let Ha,Fr,Ul=!1,jl=!1;const Hn=typeof self<"u"?self:{};function Zu(r){const e=r.createTexture();r.bindTexture(r.TEXTURE_2D,e);try{if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,Fr),r.isContextLost())return;lh.supported=!0}catch{}r.deleteTexture(e),Ul=!0}Hn.document&&(Fr=Hn.document.createElement("img"),Fr.onload=function(){Ha&&Zu(Ha),Ha=null,jl=!0},Fr.onerror=function(){Ul=!0,Ha=null},Fr.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const Gl={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Iconset:"Iconset",Image:"Image",Model:"Model"};typeof Object.freeze=="function"&&Object.freeze(Gl);class ql extends Error{constructor(e,i,s){i===401&&Go(s)&&(e+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(e),this.status=i,this.url=s}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const $t=yi()?()=>self.worker.referrer:()=>(location.protocol==="blob:"?parent:self).location.href,Wn=function(r,e){if(!(/^file:/.test(i=r.url)||/^file:/.test($t())&&!/^\w+:/.test(i))){if(self.fetch&&self.Request&&self.AbortController&&Request.prototype.hasOwnProperty("signal"))return function(s,a){const h=new AbortController,u=new Request(s.url,{method:s.method||"GET",body:s.body,credentials:s.credentials,headers:s.headers,referrer:$t(),referrerPolicy:s.referrerPolicy,signal:h.signal});let f=!1,_=!1;const g=(v=u.url).indexOf("sku=")>0&&Go(v);var v;s.type==="json"&&u.headers.set("Accept","application/json");const b=(A,M,P)=>{if(_)return;if(A&&A.message!=="SecurityError"&&Nt(A.toString()),M&&P)return T(M);const k=Date.now();fetch(u).then(F=>{if(F.ok){const q=g?F.clone():null;return T(F,q,k)}return a(new ql(F.statusText,F.status,s.url))}).catch(F=>{F.name!=="AbortError"&&a(new Error(`${F.message} ${s.url}`))})},T=(A,M,P)=>{(s.type==="arrayBuffer"?A.arrayBuffer():s.type==="json"?A.json():A.text()).then(k=>{_||(M&&P&&function(F,q,j){if(as(),mo==null)return;const z=Ji(q.headers.get("Cache-Control")||"");if(z["no-store"])return;const N={status:q.status,statusText:q.statusText,headers:new Headers};q.headers.forEach((re,ne)=>N.headers.set(ne,re)),z["max-age"]&&N.headers.set("Expires",new Date(j+1e3*z["max-age"]).toUTCString());const G=N.headers.get("Expires");if(!G||new Date(G).getTime()-j<42e4)return;let Z=to(F.url,{persistentParams:ns});if(q.status===206){const re=F.headers.get("Range");if(!re)return;N.status=200,Z=nh(Z,{range:re})}(function(re,ne){if(Ga===void 0)try{new Response(new ReadableStream),Ga=!0}catch{Ga=!1}Ga?ne(re.body):re.blob().then(ne).catch(ae=>Nt(ae.message))})(q,re=>{const ne=new Response((ae=q.status)!==200&&ae!==404&&[101,103,204,205,304].includes(ae)?null:re,N);var ae;as(),mo!=null&&mo.then(de=>de.put(Z,ne)).catch(de=>Nt(de.message))})}(u,M,P),f=!0,a(null,k,A.headers.get("Cache-Control"),A.headers.get("Expires")))}).catch(k=>{_||a(new Error(k.message))})};return g?function(A,M){if(as(),mo==null)return M(null);mo.then(P=>{let k=to(A.url,{persistentParams:ns});const F=A.headers.get("Range");F&&(k=nh(k,{range:F})),P.match(k).then(q=>{const j=function(z){if(!z)return!1;const N=new Date(z.headers.get("Expires")||0),G=Ji(z.headers.get("Cache-Control")||"");return Number(N)>Date.now()&&!G["no-cache"]}(q);P.delete(k).catch(M),j&&P.put(k,q.clone()).catch(M),M(null,q,j)}).catch(M)}).catch(M)}(u,b):b(null,null),{cancel:()=>{_=!0,f||h.abort()}}}(r,e);if(yi(self)&&self.worker.actor)return self.worker.actor.send("getResource",r,e,void 0,!0)}var i;return function(s,a){const h=new XMLHttpRequest;h.open(s.method||"GET",s.url,!0),s.type==="arrayBuffer"&&(h.responseType="arraybuffer");for(const u in s.headers)h.setRequestHeader(u,s.headers[u]);return s.type==="json"&&(h.responseType="text",h.setRequestHeader("Accept","application/json")),h.withCredentials=s.credentials==="include",h.onerror=()=>{a(new Error(h.statusText))},h.onload=()=>{if((h.status>=200&&h.status<300||h.status===0)&&h.response!==null){let u=h.response;if(s.type==="json")try{u=JSON.parse(h.response)}catch(f){return a(f)}a(null,u,h.getResponseHeader("Cache-Control"),h.getResponseHeader("Expires"))}else a(new ql(h.statusText,h.status,s.url))},h.send(s.body),{cancel:()=>h.abort()}}(r,e)},Zn=function(r,e){return Wn(ye(r,{type:"arrayBuffer"}),e)};function Xp(r){const e=document.createElement("a");return e.href=r,e.protocol===location.protocol&&e.host===location.host}const Xu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let un,Ms;un=[],Ms=0;const Xn=function(r,e){if(lh.supported&&(r.headers||(r.headers={}),r.headers.accept="image/webp,*/*"),Ms>=Sr.MAX_PARALLEL_IMAGE_REQUESTS){const h={requestParameters:r,callback:e,cancelled:!1,cancel(){this.cancelled=!0}};return un.push(h),h}Ms++;let i=!1;const s=()=>{if(!i)for(i=!0,Ms--;un.length&&Ms<Sr.MAX_PARALLEL_IMAGE_REQUESTS;){const h=un.shift(),{requestParameters:u,callback:f,cancelled:_}=h;_||(h.cancel=Xn(u,f).cancel)}},a=Zn(r,(h,u,f,_)=>{s(),h?e(h):u&&(self.createImageBitmap?function(g,v){const b=new Blob([new Uint8Array(g)],{type:"image/png"});createImageBitmap(b).then(T=>{v(null,T)}).catch(T=>{v(new Error(`Could not load image because of ${T.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(u,(g,v)=>e(g,v,f,_)):function(g,v){const b=new Image;b.onload=()=>{v(null,b),URL.revokeObjectURL(b.src),b.onload=null,requestAnimationFrame(()=>{b.src=Xu})},b.onerror=()=>v(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const T=new Blob([new Uint8Array(g)],{type:"image/png"});b.src=g.byteLength?URL.createObjectURL(T):Xu}(u,(g,v)=>e(g,v,f,_)))});return{cancel:()=>{a.cancel(),s()}}};var $u,ch,dn,Wa={exports:{}},$n={exports:{}},Hl={exports:{}},hh=function(){if(dn)return Wa.exports;dn=1;var r=($u||($u=1,$n.exports=function(i,s){var a,h,u,f,_,g,v,b;for(h=i.length-(a=3&i.length),u=s,_=3432918353,g=461845907,b=0;b<h;)v=255&i.charCodeAt(b)|(255&i.charCodeAt(++b))<<8|(255&i.charCodeAt(++b))<<16|(255&i.charCodeAt(++b))<<24,++b,u=27492+(65535&(f=5*(65535&(u=(u^=v=(65535&(v=(v=(65535&v)*_+(((v>>>16)*_&65535)<<16)&4294967295)<<15|v>>>17))*g+(((v>>>16)*g&65535)<<16)&4294967295)<<13|u>>>19))+((5*(u>>>16)&65535)<<16)&4294967295))+((58964+(f>>>16)&65535)<<16);switch(v=0,a){case 3:v^=(255&i.charCodeAt(b+2))<<16;case 2:v^=(255&i.charCodeAt(b+1))<<8;case 1:u^=v=(65535&(v=(v=(65535&(v^=255&i.charCodeAt(b)))*_+(((v>>>16)*_&65535)<<16)&4294967295)<<15|v>>>17))*g+(((v>>>16)*g&65535)<<16)&4294967295}return u^=i.length,u=2246822507*(65535&(u^=u>>>16))+((2246822507*(u>>>16)&65535)<<16)&4294967295,u=3266489909*(65535&(u^=u>>>13))+((3266489909*(u>>>16)&65535)<<16)&4294967295,(u^=u>>>16)>>>0}),$n.exports),e=(ch||(ch=1,Hl.exports=function(i,s){for(var a,h=i.length,u=s^h,f=0;h>=4;)a=1540483477*(65535&(a=255&i.charCodeAt(f)|(255&i.charCodeAt(++f))<<8|(255&i.charCodeAt(++f))<<16|(255&i.charCodeAt(++f))<<24))+((1540483477*(a>>>16)&65535)<<16),u=1540483477*(65535&u)+((1540483477*(u>>>16)&65535)<<16)^(a=1540483477*(65535&(a^=a>>>24))+((1540483477*(a>>>16)&65535)<<16)),h-=4,++f;switch(h){case 3:u^=(255&i.charCodeAt(f+2))<<16;case 2:u^=(255&i.charCodeAt(f+1))<<8;case 1:u=1540483477*(65535&(u^=255&i.charCodeAt(f)))+((1540483477*(u>>>16)&65535)<<16)}return u=1540483477*(65535&(u^=u>>>13))+((1540483477*(u>>>16)&65535)<<16),(u^=u>>>15)>>>0}),Hl.exports);return Wa.exports=r,Wa.exports.murmur3=r,Wa.exports.murmur2=e,Wa.exports}(),io=jo(hh);class Cs{constructor(e,...i){ye(this,i[0]||{}),this.type=e}}class uh extends Cs{constructor(e,i={}){super("error",ye({error:e},i))}}function dh(r,e,i){i[r]&&i[r].indexOf(e)!==-1||(i[r]=i[r]||[],i[r].push(e))}function Wl(r,e,i){if(i&&i[r]){const s=i[r].indexOf(e);s!==-1&&i[r].splice(s,1)}}class pn{on(e,i){return this._listeners=this._listeners||{},dh(e,i,this._listeners),this}off(e,i){return Wl(e,i,this._listeners),Wl(e,i,this._oneTimeListeners),this}once(e,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},dh(e,i,this._oneTimeListeners),this):new Promise(s=>{this.once(e,s)})}fire(e,i){const s=typeof e=="string"?new Cs(e,i):e,a=s.type;if(this.listens(a)){s.target=this;const h=this._listeners&&this._listeners[a]?this._listeners[a].slice():[];for(const _ of h)_.call(this,s);const u=this._oneTimeListeners&&this._oneTimeListeners[a]?this._oneTimeListeners[a].slice():[];for(const _ of u)Wl(a,_,this._oneTimeListeners),_.call(this,s);const f=this._eventedParent;f&&(ye(s,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),f.fire(s))}else s instanceof uh&&console.error(s.error);return this}listens(e){return!!(this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e))}setEventedParent(e,i){return this._eventedParent=e,this._eventedParentData=i,this}}class ro{constructor(e){typeof e=="string"?this.name=e:(this.name=e.name,this.iconsetId=e.iconsetId)}static from(e){return new ro(e)}static toString(e){return e.iconsetId?`${e.name}${e.iconsetId}`:e.name}static parse(e){const[i,s]=e.split("");return new ro({name:i,iconsetId:s})}static isEqual(e,i){return e.name===i.name&&e.iconsetId===i.iconsetId}toString(){return ro.toString(this)}serialize(){return{name:this.name,iconsetId:this.iconsetId}}}var ph,Zl={},Za=function(){if(ph)return Zl;ph=1;var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function e(h){return(h=Math.round(h))<0?0:h>255?255:h}function i(h){return e(h[h.length-1]==="%"?parseFloat(h)/100*255:parseInt(h))}function s(h){return(u=h[h.length-1]==="%"?parseFloat(h)/100:parseFloat(h))<0?0:u>1?1:u;var u}function a(h,u,f){return f<0?f+=1:f>1&&(f-=1),6*f<1?h+(u-h)*f*6:2*f<1?u:3*f<2?h+(u-h)*(2/3-f)*6:h}try{Zl.parseCSSColor=function(h){var u,f=h.replace(/ /g,"").toLowerCase();if(f in r)return r[f].slice();if(f[0]==="#")return f.length===4?(u=parseInt(f.substr(1),16))>=0&&u<=4095?[(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1]:null:f.length===7&&(u=parseInt(f.substr(1),16))>=0&&u<=16777215?[(16711680&u)>>16,(65280&u)>>8,255&u,1]:null;var _=f.indexOf("("),g=f.indexOf(")");if(_!==-1&&g+1===f.length){var v=f.substr(0,_),b=f.substr(_+1,g-(_+1)).split(","),T=1;switch(v){case"rgba":if(b.length!==4)return null;T=s(b.pop());case"rgb":return b.length!==3?null:[i(b[0]),i(b[1]),i(b[2]),T];case"hsla":if(b.length!==4)return null;T=s(b.pop());case"hsl":if(b.length!==3)return null;var A=(parseFloat(b[0])%360+360)%360/360,M=s(b[1]),P=s(b[2]),k=P<=.5?P*(M+1):P+M-P*M,F=2*P-k;return[e(255*a(F,k,A+1/3)),e(255*a(F,k,A)),e(255*a(F,k,A-1/3)),T];default:return null}}return null}}catch{}return Zl}();class Jt{constructor(e,i,s,a=1){this.r=e,this.g=i,this.b=s,this.a=a}static parse(e){if(!e)return;if(e instanceof Jt)return e;if(typeof e!="string")return;const i=Za.parseCSSColor(e);return i?new Jt(i[0]/255*i[3],i[1]/255*i[3],i[2]/255*i[3],i[3]):void 0}toStringPremultipliedAlpha(){const[e,i,s,a]=this.a===0?[0,0,0,0]:[255*this.r/this.a,255*this.g/this.a,255*this.b/this.a,this.a];return`rgba(${Math.round(e)},${Math.round(i)},${Math.round(s)},${a})`}toString(){const[e,i,s,a]=[this.r,this.g,this.b,this.a];return`rgba(${Math.round(255*e)},${Math.round(255*i)},${Math.round(255*s)},${a})`}toRenderColor(e){const{r:i,g:s,b:a,a:h}=this;return new Yu(e,i,s,a,h)}clone(){return new Jt(this.r,this.g,this.b,this.a)}}class Yu{constructor(e,i,s,a,h){if(e){const u=e.image.height,f=u*u;i=h===0?0:i/h*(u-1),s=h===0?0:s/h*(u-1),a=h===0?0:a/h*(u-1);const _=Math.floor(i),g=Math.floor(s),v=Math.floor(a),b=Math.ceil(i),T=Math.ceil(s),A=Math.ceil(a),M=i-_,P=s-g,k=a-v,F=e.image.data,q=4*(_+g*f+v*u),j=4*(_+g*f+A*u),z=4*(_+T*f+v*u),N=4*(_+T*f+A*u),G=4*(b+g*f+v*u),Z=4*(b+g*f+A*u),re=4*(b+T*f+v*u),ne=4*(b+T*f+A*u);if(q<0||ne>=F.length)throw new Error("out of range");this.r=ft(ft(ft(F[q],F[j],k),ft(F[z],F[N],k),P),ft(ft(F[G],F[Z],k),ft(F[re],F[ne],k),P),M)/255*h,this.g=ft(ft(ft(F[q+1],F[j+1],k),ft(F[z+1],F[N+1],k),P),ft(ft(F[G+1],F[Z+1],k),ft(F[re+1],F[ne+1],k),P),M)/255*h,this.b=ft(ft(ft(F[q+2],F[j+2],k),ft(F[z+2],F[N+2],k),P),ft(ft(F[G+2],F[Z+2],k),ft(F[re+2],F[ne+2],k),P),M)/255*h,this.a=h}else this.r=i,this.g=s,this.b=a,this.a=h}toArray(){const{r:e,g:i,b:s,a}=this;return a===0?[0,0,0,0]:[255*e/a,255*i/a,255*s/a,a]}toHslaArray(){if(this.a===0)return[0,0,0,0];const{r:e,g:i,b:s,a}=this,h=Math.min(Math.max(e/a,0),1),u=Math.min(Math.max(i/a,0),1),f=Math.min(Math.max(s/a,0),1),_=Math.min(h,u,f),g=Math.max(h,u,f),v=(_+g)/2;if(_===g)return[0,0,100*v,a];const b=g-_,T=v>.5?b/(2-g-_):b/(g+_);let A=0;return g===h?A=(u-f)/b+(u<f?6:0):g===u?A=(f-h)/b+2:g===f&&(A=(h-u)/b+4),A*=60,[Math.min(Math.max(A,0),360),Math.min(Math.max(100*T,0),100),Math.min(Math.max(100*v,0),100),a]}toArray01(){const{r:e,g:i,b:s,a}=this;return a===0?[0,0,0,0]:[e/a,i/a,s/a,a]}toArray01Scaled(e){const{r:i,g:s,b:a,a:h}=this;return h===0?[0,0,0]:[i/h*e,s/h*e,a/h*e]}toArray01PremultipliedAlpha(){const{r:e,g:i,b:s,a}=this;return[e,i,s,a]}toArray01Linear(){const{r:e,g:i,b:s,a}=this;return a===0?[0,0,0,0]:[Math.pow(e/a,2.2),Math.pow(i/a,2.2),Math.pow(s/a,2.2),a]}}function ft(r,e,i){return r*(1-i)+e*i}function Ku(r,e,i){return r.map((s,a)=>ft(s,e[a],i))}function Xl(r){return r*r*r*r*r}Jt.black=new Jt(0,0,0,1),Jt.white=new Jt(1,1,1,1),Jt.transparent=new Jt(0,0,0,0),Jt.red=new Jt(1,0,0,1),Jt.blue=new Jt(0,0,1,1);var $l=Object.freeze({__proto__:null,array:Ku,color:function(r,e,i){return new Jt(ft(r.r,e.r,i),ft(r.g,e.g,i),ft(r.b,e.b,i),ft(r.a,e.a,i))},easeIn:Xl,number:ft});function Xa(r,...e){for(const i of e)for(const s in i)r[s]=i[s];return r}class _o extends Error{constructor(e,i){super(i),this.message=i,this.key=e}}class fn{constructor(e,i=[]){this.parent=e,this.bindings={};for(const[s,a]of i)this.bindings[s]=a}concat(e){return new fn(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}const Ps={kind:"null"},dt={kind:"number"},ui={kind:"string"},ri={kind:"boolean"},$r={kind:"color"},zs={kind:"object"},ti={kind:"value"},mn={kind:"collator"},$a={kind:"formatted"},Ya={kind:"resolvedImage"};function Br(r,e){return{kind:"array",itemType:r,N:e}}function cr(r){if(r.kind==="array"){const e=cr(r.itemType);return typeof r.N=="number"?`array<${e}, ${r.N}>`:r.itemType.kind==="value"?"array":`array<${e}>`}return r.kind}const $p=[Ps,dt,ui,ri,$r,$a,zs,Br(ti),Ya];function Ka(r,e){if(e.kind==="error")return null;if(r.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!Ka(r.itemType,e.itemType))&&(typeof r.N!="number"||r.N===e.N))return null}else{if(r.kind===e.kind)return null;if(r.kind==="value"){for(const i of $p)if(!Ka(i,e))return null}}return`Expected ${cr(r)} but found ${cr(e)} instead.`}function fh(r,e){return e.some(i=>i.kind===r.kind)}function Yn(r,e){return e.some(i=>i==="null"?r===null:i==="array"?Array.isArray(r):i==="object"?r&&!Array.isArray(r)&&typeof r=="object":i===typeof r)}class Ds{constructor(e,i,s){this.sensitivity=e?i?"variant":"case":i?"accent":"base",this.locale=s,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,i){return this.collator.compare(e,i)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Yl{constructor(e,i,s,a,h){this.text=e.normalize?e.normalize():e,this.image=i,this.scale=s,this.fontStack=a,this.textColor=h}}class Nr{constructor(e){this.sections=e}static fromString(e){return new Nr([new Yl(e,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||!!e.image&&e.image.hasPrimary())}static factory(e){return e instanceof Nr?e:Nr.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const i of this.sections){if(i.image){const a=i.image.getPrimary().id.toString();e.push(["image",a]);continue}e.push(i.text);const s={};i.fontStack&&(s["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(s["font-scale"]=i.scale),i.textColor&&(s["text-color"]=["rgba"].concat(i.textColor.toRenderColor(null).toArray())),e.push(s)}return e}}class Ao{constructor(e,i={}){if(this.id=ro.from(e),this.options=Object.assign({},i),i.transform){const{a:s,b:a,c:h,d:u,e:f,f:_}=i.transform;this.options.transform=new DOMMatrix([s,a,h,u,f,_])}else this.options.transform=new DOMMatrix([1,0,0,1,0,0])}toString(){const{a:e,b:i,c:s,d:a,e:h,f:u}=this.options.transform;return JSON.stringify({name:this.id.name,iconsetId:this.id.iconsetId,params:this.options.params,transform:{a:e,b:i,c:s,d:a,e:h,f:u}})}static parse(e){let i,s,a,h;try{({name:i,iconsetId:s,params:a,transform:h}=JSON.parse(e)||{})}catch{return null}if(!i)return null;const{a:u,b:f,c:_,d:g,e:v,f:b}=h||{};return new Ao({name:i,iconsetId:s},{params:a,transform:new DOMMatrix([u,f,_,g,v,b])})}scaleSelf(e,i){return this.options.transform.scaleSelf(e,i),this}}class Yr{constructor(e,i,s,a,h=!1){this.primaryId=ro.from(e),this.primaryOptions=i,s&&(this.secondaryId=ro.from(s)),this.secondaryOptions=a,this.available=h}toString(){return this.primaryId&&this.secondaryId?`[${this.primaryId.name},${this.secondaryId.name}]`:this.primaryId.name}hasPrimary(){return!!this.primaryId}getPrimary(){return new Ao(this.primaryId,this.primaryOptions)}hasSecondary(){return!!this.secondaryId}getSecondary(){return this.secondaryId?new Ao(this.secondaryId,this.secondaryOptions):null}static from(e){return typeof e=="string"?Yr.build({name:e}):e}static build(e,i,s,a){return!e||typeof e=="object"&&!("name"in e)?null:new Yr(e,s,i,a)}}function Qu(r,e,i,s){return typeof r=="number"&&r>=0&&r<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof i=="number"&&i>=0&&i<=255?s===void 0||typeof s=="number"&&s>=0&&s<=1?null:`Invalid rgba value [${[r,e,i,s].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof s=="number"?[r,e,i,s]:[r,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Kn(r){if(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number"||r instanceof Jt||r instanceof Ds||r instanceof Nr||r instanceof Yr)return!0;if(Array.isArray(r)){for(const e of r)if(!Kn(e))return!1;return!0}if(typeof r=="object"){for(const e in r)if(!Kn(r[e]))return!1;return!0}return!1}function pr(r){if(r===null)return Ps;if(typeof r=="string")return ui;if(typeof r=="boolean")return ri;if(typeof r=="number")return dt;if(r instanceof Jt)return $r;if(r instanceof Ds)return mn;if(r instanceof Nr)return $a;if(r instanceof Yr)return Ya;if(Array.isArray(r)){const e=r.length;let i;for(const s of r){const a=pr(s);if(i){if(i===a)continue;i=ti;break}i=a}return Br(i||ti,e)}return zs}function Vr(r){const e=typeof r;return r===null?"":e==="string"||e==="number"||e==="boolean"?String(r):r instanceof Jt?r.toStringPremultipliedAlpha():r instanceof Nr||r instanceof Yr?r.toString():JSON.stringify(r)}class zt{constructor(e,i){this.type=e,this.value=i}static parse(e,i){if(e.length!==2)return i.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!Kn(e[1]))return i.error("invalid value");const s=e[1];let a=pr(s);const h=i.expectedType;return a.kind!=="array"||a.N!==0||!h||h.kind!=="array"||typeof h.N=="number"&&h.N!==0||(a=h),new zt(a,s)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Jt?["rgba"].concat(this.value.toRenderColor(null).toArray()):this.value instanceof Nr?this.value.serialize():this.value}}class rt{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}const Qa={string:ui,number:dt,boolean:ri,object:zs};class vt{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");let s,a=1;const h=e[0];if(h==="array"){let f,_;if(e.length>2){const g=e[1];if(typeof g!="string"||!(g in Qa)||g==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);f=Qa[g],a++}else f=ti;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return i.error('The length argument to "array" must be a positive integer literal',2);_=e[2],a++}s=Br(f,_)}else s=Qa[h];const u=[];for(;a<e.length;a++){const f=i.parse(e[a],a,ti);if(!f)return null;u.push(f)}return new vt(s,u)}evaluate(e){for(let i=0;i<this.args.length;i++){const s=this.args[i].evaluate(e);if(!Ka(this.type,pr(s)))return s;if(i===this.args.length-1)throw new rt(`The expression ${JSON.stringify(this.args[i].serialize())} evaluated to ${cr(pr(s))} but was expected to be of type ${cr(this.type)}.`)}return null}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=this.type,i=[e.kind];if(e.kind==="array"){const s=e.itemType;if(s.kind==="string"||s.kind==="number"||s.kind==="boolean"){i.push(s.kind);const a=e.N;(typeof a=="number"||this.args.length>1)&&i.push(a)}}return i.concat(this.args.map(s=>s.serialize()))}}class _n{constructor(e){this.type=$a,this.sections=e}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const s=e[1];if(!Array.isArray(s)&&typeof s=="object")return i.error("First argument must be an image or text section.");const a=[];let h=!1;for(let u=1;u<=e.length-1;++u){const f=e[u];if(h&&typeof f=="object"&&!Array.isArray(f)){h=!1;let _=null;if(f["font-scale"]&&(_=i.parseObjectValue(f["font-scale"],u,"font-scale",dt),!_))return null;let g=null;if(f["text-font"]&&(g=i.parseObjectValue(f["text-font"],u,"text-font",Br(ui)),!g))return null;let v=null;if(f["text-color"]&&(v=i.parseObjectValue(f["text-color"],u,"text-color",$r),!v))return null;const b=a[a.length-1];b.scale=_,b.font=g,b.textColor=v}else{const _=i.parse(e[u],u,ti);if(!_)return null;const g=_.type.kind;if(g!=="string"&&g!=="value"&&g!=="null"&&g!=="resolvedImage")return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");h=!0,a.push({content:_,scale:null,font:null,textColor:null})}}return new _n(a)}evaluate(e){return new Nr(this.sections.map(i=>{const s=i.content.evaluate(e);return pr(s)===Ya?new Yl("",s,null,null,null):new Yl(Vr(s),null,i.scale?i.scale.evaluate(e):null,i.font?i.font.evaluate(e).join(","):null,i.textColor?i.textColor.evaluate(e):null)}))}eachChild(e){for(const i of this.sections)e(i.content),i.scale&&e(i.scale),i.font&&e(i.font),i.textColor&&e(i.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const i of this.sections){e.push(i.content.serialize());const s={};i.scale&&(s["font-scale"]=i.scale.serialize()),i.font&&(s["text-font"]=i.font.serialize()),i.textColor&&(s["text-color"]=i.textColor.serialize()),e.push(s)}return e}}class Qn{constructor(e,i,s,a){this._imageWarnHistory={},this.type=Ya,this.namePrimary=e,this.nameSecondary=i,s&&(this.paramsPrimary=s.params,this.iconsetIdPrimary=s.iconset?s.iconset.id:void 0),a&&(this.paramsSecondary=a.params,this.iconsetIdSecondary=a.iconset?a.iconset.id:void 0)}static parse(e,i){if(e.length<2)return i.error("Expected two or more arguments.");let s=1;const a=[];function h(){if(s<e.length){const f=i.parse(e[s],s++,ui);return f?(a.push({image:f,options:{}}),!0):(i.error(a.length?"Secondary image variant is not a string.":"No image name provided."),!1)}return!0}function u(){if(s<e.length){const _=e[s];if((f=_)===null||typeof f!="object"||Array.isArray(f))return!0;const g=_.params,v=_.iconset,b=i.concat(s);if(!g&&!v)return s++,!0;if(g){if(typeof g!="object"||g.constructor!==Object)return b.error('Image options "params" should be an object'),!1;const T={},A=b.concat(void 0,"params");for(const M in g){if(!M)return A.error("Image parameter name should be non-empty"),!1;const P=A.concat(void 0,M).parse(g[M],void 0,$r,void 0,{typeAnnotation:"coerce"});if(!P)return!1;T[M]=P}a[a.length-1].options.params=T}if(v){if(typeof v!="object"||v.constructor!==Object)return b.error('Image options "iconset" should be an object'),!1;if(!v.id)return b.error('Image options "iconset" should have an "id" property'),!1;a[a.length-1].options.iconset=v}return s++,!0}var f;return!0}for(let f=0;f<2;f++)if(!h()||!u())return;return new Qn(a[0].image,a[1]?a[1].image:void 0,a[0].options,a[1]?a[1].options:void 0)}evaluateParams(e,i){const s={};if(i){for(const a in i)if(i[a])try{s[a]=i[a].evaluate(e)}catch{continue}if(Object.keys(s).length!==0)return{params:s}}}evaluate(e){const i={name:this.namePrimary.evaluate(e),iconsetId:this.iconsetIdPrimary},s=this.nameSecondary?{name:this.nameSecondary.evaluate(e),iconsetId:this.iconsetIdSecondary}:void 0,a=Yr.build(i,s,this.paramsPrimary?this.evaluateParams(e,this.paramsPrimary):void 0,this.paramsSecondary?this.evaluateParams(e,this.paramsSecondary):void 0);if(a&&e.availableImages){const h=a.getPrimary().id;if(a.available=e.availableImages.some(u=>ro.isEqual(u,h)),a.available){const u=a.getSecondary()?a.getSecondary().id:null;u&&(a.available=e.availableImages.some(f=>ro.isEqual(f,u)))}}return a}eachChild(e){if(e(this.namePrimary),this.paramsPrimary)for(const i in this.paramsPrimary)this.paramsPrimary[i]&&e(this.paramsPrimary[i]);if(this.nameSecondary&&(e(this.nameSecondary),this.paramsSecondary))for(const i in this.paramsSecondary)this.paramsSecondary[i]&&e(this.paramsSecondary[i])}outputDefined(){return!1}serializeOptions(e,i){const s={};if(i&&(s.iconset={id:i}),e){s.params={};for(const a in e)e[a]&&(s.params[a]=e[a].serialize())}return Object.keys(s).length>0?s:void 0}serialize(){const e=["image",this.namePrimary.serialize()];if(this.paramsPrimary||this.iconsetIdPrimary){const i=this.serializeOptions(this.paramsPrimary,this.iconsetIdPrimary);i&&e.push(i)}if(this.nameSecondary&&(e.push(this.nameSecondary.serialize()),this.paramsSecondary||this.iconsetIdSecondary)){const i=this.serializeOptions(this.paramsSecondary,this.iconsetIdSecondary);i&&e.push(i)}return e}}function bt(r){return r instanceof Number?"number":r instanceof String?"string":r instanceof Boolean?"boolean":Array.isArray(r)?"array":r===null?"null":typeof r}const Ju={"to-boolean":ri,"to-color":$r,"to-number":dt,"to-string":ui};class Mo{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const s=e[0],a=[];let h=Ps;if(s==="to-array"){if(!Array.isArray(e[1]))return null;const u=e[1].length;if(i.expectedType){if(i.expectedType.kind!=="array")return i.error(`Expected ${i.expectedType.kind} but found array.`);h=Br(i.expectedType.itemType,u)}else{if(!(u>0&&Kn(e[1][0])))return null;h=Br(pr(e[1][0]),u)}for(let f=0;f<u;f++){const _=e[1][f];let g;if(bt(_)==="array")g=i.parse(_,void 0,h.itemType);else{const v=bt(_);if(v!==h.itemType.kind)return i.error(`Expected ${h.itemType.kind} but found ${v}.`);g=i.registry.literal.parse(["literal",_===void 0?null:_],i)}if(!g)return null;a.push(g)}}else{if((s==="to-boolean"||s==="to-string")&&e.length!==2)return i.error("Expected one argument.");h=Ju[s];for(let u=1;u<e.length;u++){const f=i.parse(e[u],u,ti);if(!f)return null;a.push(f)}}return new Mo(h,a)}evaluate(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){let i,s;for(const a of this.args){if(i=a.evaluate(e),s=null,i instanceof Jt)return i;if(typeof i=="string"){const h=e.parseColor(i);if(h)return h}else if(Array.isArray(i)&&(s=i.length<3||i.length>4?`Invalid rbga value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:Qu(i[0],i[1],i[2],i[3]),!s))return new Jt(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new rt(s||`Could not parse color from value '${typeof i=="string"?i:String(JSON.stringify(i))}'`)}if(this.type.kind==="number"){let i=null;for(const s of this.args){if(i=s.evaluate(e),i===null)return 0;const a=Number(i);if(!isNaN(a))return a}throw new rt(`Could not convert ${JSON.stringify(i)} to number.`)}return this.type.kind==="formatted"?Nr.fromString(Vr(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?Yr.build(Vr(this.args[0].evaluate(e))):this.type.kind==="array"?this.args.map(i=>i.evaluate(e)):Vr(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if(this.type.kind==="formatted")return new _n([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Qn(this.args[0]).serialize();const e=this.type.kind==="array"?[]:[`to-${this.type.kind}`];return this.eachChild(i=>{e.push(i.serialize())}),e}}const ed=["Unknown","Point","LineString","Polygon"];class Kl{constructor(e,i){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null,this.scope=e,this.options=i}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?ed[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}measureLight(e){return this.globals.brightness||0}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const e=this.featureDistanceData.center,i=this.featureDistanceData.scale,{x:s,y:a}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(s*i-e[0])+this.featureDistanceData.bearing[1]*(a*i-e[1])}return 0}parseColor(e){let i=this._parseColorCache[e];return i||(i=this._parseColorCache[e]=Jt.parse(e)),i}getConfig(e){return this.options?this.options.get(e):null}}class zr{constructor(e,i,s,a,h){this.name=e,this.type=i,this._evaluate=s,this.args=a,this._overloadIndex=h}evaluate(e){if(!this._evaluate){const i=zr.definitions[this.name];this._evaluate=Array.isArray(i)?i[2]:i.overloads[this._overloadIndex][1]}return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,i){const s=e[0],a=zr.definitions[s];if(!a)return i.error(`Unknown expression "${s}". If you wanted a literal array, use ["literal", [...]].`,0);const h=Array.isArray(a)?a[0]:a.type,u=Array.isArray(a)?[[a[1],a[2]]]:a.overloads,f=[];let _=null,g=-1;for(const[v,b]of u){if(Array.isArray(v)&&v.length!==e.length-1)continue;f.push(v),g++,_=new hd(i.registry,i.path,null,i.scope,void 0,i._scope,i.options);const T=[];let A=!1;for(let M=1;M<e.length;M++){const P=e[M],k=Array.isArray(v)?v[M-1]:v.type,F=_.parse(P,1+T.length,k);if(!F){A=!0;break}T.push(F)}if(!A)if(Array.isArray(v)&&v.length!==T.length)_.error(`Expected ${v.length} arguments, but found ${T.length} instead.`);else{for(let M=0;M<T.length;M++){const P=Array.isArray(v)?v[M]:v.type,k=T[M];_.concat(M+1).checkSubtype(P,k.type)}if(_.errors.length===0)return new zr(s,h,b,T,g)}}if(f.length===1)i.errors.push(..._.errors);else{const v=(f.length?f:u.map(([T])=>T)).map(Ur).join(" | "),b=[];for(let T=1;T<e.length;T++){const A=i.parse(e[T],1+b.length);if(!A)return null;b.push(cr(A.type))}i.error(`Expected arguments of type ${v}, but found (${b.join(", ")}) instead.`)}return null}static register(e,i){zr.definitions=i;for(const s in i)e[s]=zr}}function Ur(r){return Array.isArray(r)?`(${r.map(cr).join(", ")})`:`(${cr(r.type)}...)`}class Jn{constructor(e,i,s){this.type=mn,this.locale=s,this.caseSensitive=e,this.diacriticSensitive=i}static parse(e,i){if(e.length!==2)return i.error("Expected one argument.");const s=e[1];if(typeof s!="object"||Array.isArray(s))return i.error("Collator options argument must be an object.");const a=s["case-sensitive"]===void 0?i.parse(!1,1,ri):i.parseObjectValue(s["case-sensitive"],1,"case-sensitive",ri);if(!a)return null;const h=s["diacritic-sensitive"]===void 0?i.parse(!1,1,ri):i.parseObjectValue(s["diacritic-sensitive"],1,"diacritic-sensitive",ri);if(!h)return null;let u=null;return s.locale&&(u=i.parseObjectValue(s.locale,1,"locale",ui),!u)?null:new Jn(a,h,u)}evaluate(e){return new Ds(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}serialize(){const e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]}}function Rs(r,e,i=0,s=r.length-1,a=yn){for(;s>i;){if(s-i>600){const _=s-i+1,g=e-i+1,v=Math.log(_),b=.5*Math.exp(2*v/3),T=.5*Math.sqrt(v*b*(_-b)/_)*(g-_/2<0?-1:1);Rs(r,e,Math.max(i,Math.floor(e-g*b/_+T)),Math.min(s,Math.floor(e+(_-g)*b/_+T)),a)}const h=r[e];let u=i,f=s;for(gn(r,i,e),a(r[s],h)>0&&gn(r,i,s);u<f;){for(gn(r,u,f),u++,f--;a(r[u],h)<0;)u++;for(;a(r[f],h)>0;)f--}a(r[i],h)===0?gn(r,i,f):(f++,gn(r,f,s)),f<=e&&(i=f+1),e<=f&&(s=f-1)}}function gn(r,e,i){const s=r[e];r[e]=r[i],r[i]=s}function yn(r,e){return r<e?-1:r>e?1:0}function jr(r){let e=0;for(let i,s,a=0,h=r.length,u=h-1;a<h;u=a++)i=r[a],s=r[u],e+=(s.x-i.x)*(i.y+s.y);return e}function Ja(r,e){r[0]=Math.min(r[0],e[0]),r[1]=Math.min(r[1],e[1]),r[2]=Math.max(r[2],e[0]),r[3]=Math.max(r[3],e[1])}function el(r,e){return!(r[0]<=e[0]||r[2]>=e[2]||r[1]<=e[1]||r[3]>=e[3])}function Yp(r,e,i){const s=r[0]-e[0],a=r[1]-e[1],h=r[0]-i[0],u=r[1]-i[1];return s*u-h*a==0&&s*h<=0&&a*u<=0}function ls(r,e,i=!1){let s=!1;for(let f=0,_=e.length;f<_;f++){const g=e[f];for(let v=0,b=g.length,T=b-1;v<b;T=v++){const A=g[T],M=g[v];if(Yp(r,A,M))return i;(h=A)[1]>(a=r)[1]!=(u=M)[1]>a[1]&&a[0]<(u[0]-h[0])*(a[1]-h[1])/(u[1]-h[1])+h[0]&&(s=!s)}}var a,h,u;return s}function mh(r,e,i,s){const a=s[0]-i[0],h=s[1]-i[1],u=(r[0]-i[0])*h-a*(r[1]-i[1]),f=(e[0]-i[0])*h-a*(e[1]-i[1]);return u>0&&f<0||u<0&&f>0}function qo(r,e,i,s){return(a=[s[0]-i[0],s[1]-i[1]])[0]*(h=[e[0]-r[0],e[1]-r[1]])[1]-a[1]*h[0]!=0&&!(!mh(r,e,i,s)||!mh(i,s,r,e));var a,h}function _h(r){const e=new We(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),i=new We(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);for(const s of r[0])e.x>s.x&&(e.x=s.x),e.y>s.y&&(e.y=s.y),i.x<s.x&&(i.x=s.x),i.y<s.y&&(i.y=s.y);return{min:e,max:i}}const Ls=8192;function Kp(r,e){const i=(180+r[0])/360,s=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r[1]*Math.PI/360)))/360,a=Math.pow(2,e.z);return[Math.round(i*a*Ls),Math.round(s*a*Ls)]}function Qp(r,e){for(let i=0;i<e.length;i++)if(ls(r,e[i]))return!0;return!1}function td(r,e,i){for(const s of i)for(let a=0,h=s.length,u=h-1;a<h;u=a++)if(qo(r,e,s[u],s[a]))return!0;return!1}function id(r,e){for(let i=0;i<r.length;++i)if(!ls(r[i],e))return!1;for(let i=0;i<r.length-1;++i)if(td(r[i],r[i+1],e))return!1;return!0}function Jp(r,e){for(let i=0;i<e.length;i++)if(id(r,e[i]))return!0;return!1}function Ql(r,e,i){const s=[];for(let a=0;a<r.length;a++){const h=[];for(let u=0;u<r[a].length;u++){const f=Kp(r[a][u],i);Ja(e,f),h.push(f)}s.push(h)}return s}function rd(r,e,i){const s=[];for(let a=0;a<r.length;a++){const h=Ql(r[a],e,i);s.push(h)}return s}function ks(r,e,i,s){if(r[0]<i[0]||r[0]>i[2]){const a=.5*s;let h=r[0]-i[0]>a?-s:i[0]-r[0]>a?s:0;h===0&&(h=r[0]-i[2]>a?-s:i[2]-r[0]>a?s:0),r[0]+=h}Ja(e,r)}function od(r,e,i,s){const a=Math.pow(2,s.z)*Ls,h=[s.x*Ls,s.y*Ls],u=[];if(!r)return u;for(const f of r)for(const _ of f){const g=[_.x+h[0],_.y+h[1]];ks(g,e,i,a),u.push(g)}return u}function sd(r,e,i,s){const a=Math.pow(2,s.z)*Ls,h=[s.x*Ls,s.y*Ls],u=[];if(!r)return u;for(const _ of r){const g=[];for(const v of _){const b=[v.x+h[0],v.y+h[1]];Ja(e,b),g.push(b)}u.push(g)}if(e[2]-e[0]<=a/2){(f=e)[0]=f[1]=1/0,f[2]=f[3]=-1/0;for(const _ of u)for(const g of _)ks(g,e,i,a)}var f;return u}class cs{constructor(e,i){this.type=ri,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(Kn(e[1])){const s=e[1];if(s.type==="FeatureCollection")for(let a=0;a<s.features.length;++a){const h=s.features[a].geometry.type;if(h==="Polygon"||h==="MultiPolygon")return new cs(s,s.features[a].geometry)}else if(s.type==="Feature"){const a=s.geometry.type;if(a==="Polygon"||a==="MultiPolygon")return new cs(s,s.geometry)}else if(s.type==="Polygon"||s.type==="MultiPolygon")return new cs(s,s)}return i.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return function(i,s){const a=[1/0,1/0,-1/0,-1/0],h=[1/0,1/0,-1/0,-1/0],u=i.canonicalID();if(!u)return!1;if(s.type==="Polygon"){const f=Ql(s.coordinates,h,u),_=od(i.geometry(),a,h,u);if(!el(a,h))return!1;for(const g of _)if(!ls(g,f))return!1}if(s.type==="MultiPolygon"){const f=rd(s.coordinates,h,u),_=od(i.geometry(),a,h,u);if(!el(a,h))return!1;for(const g of _)if(!Qp(g,f))return!1}return!0}(e,this.geometries);if(e.geometryType()==="LineString")return function(i,s){const a=[1/0,1/0,-1/0,-1/0],h=[1/0,1/0,-1/0,-1/0],u=i.canonicalID();if(!u)return!1;if(s.type==="Polygon"){const f=Ql(s.coordinates,h,u),_=sd(i.geometry(),a,h,u);if(!el(a,h))return!1;for(const g of _)if(!id(g,f))return!1}if(s.type==="MultiPolygon"){const f=rd(s.coordinates,h,u),_=sd(i.geometry(),a,h,u);if(!el(a,h))return!1;for(const g of _)if(!Jp(g,f))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}const tl={kilometers:1,miles:1e3/1609.344,nauticalmiles:1e3/1852,meters:1e3,metres:1e3,yards:1e3/.9144,feet:1e3/.3048,inches:1e3/.0254},gh=1/298.257223563,go=gh*(2-gh),ea=Math.PI/180;class ta{static fromTile(e,i,s){const a=Math.PI*(1-2*(e+.5)/Math.pow(2,i)),h=Math.atan(.5*(Math.exp(a)-Math.exp(-a)))/ea;return new ta(h,s)}static get units(){return tl}constructor(e,i){if(e===void 0)throw new Error("No latitude given.");if(i&&!tl[i])throw new Error(`Unknown unit ${i}. Use one of: ${Object.keys(tl).join(", ")}`);const s=6378.137*ea*(i?tl[i]:1),a=Math.cos(e*ea),h=1/(1-go*(1-a*a)),u=Math.sqrt(h);this.kx=s*u*a,this.ky=s*u*h*(1-go)}distance(e,i){const s=co(e[0]-i[0])*this.kx,a=(e[1]-i[1])*this.ky;return Math.sqrt(s*s+a*a)}bearing(e,i){const s=co(i[0]-e[0])*this.kx;return Math.atan2(s,(i[1]-e[1])*this.ky)/ea}destination(e,i,s){const a=s*ea;return this.offset(e,Math.sin(a)*i,Math.cos(a)*i)}offset(e,i,s){return[e[0]+i/this.kx,e[1]+s/this.ky]}lineDistance(e){let i=0;for(let s=0;s<e.length-1;s++)i+=this.distance(e[s],e[s+1]);return i}area(e){let i=0;for(let s=0;s<e.length;s++){const a=e[s];for(let h=0,u=a.length,f=u-1;h<u;f=h++)i+=co(a[h][0]-a[f][0])*(a[h][1]+a[f][1])*(s?-1:1)}return Math.abs(i)/2*this.kx*this.ky}along(e,i){let s=0;if(i<=0)return e[0];for(let a=0;a<e.length-1;a++){const h=e[a],u=e[a+1],f=this.distance(h,u);if(s+=f,s>i)return Jl(h,u,(i-(s-f))/f)}return e[e.length-1]}pointToSegmentDistance(e,i,s){let[a,h]=i,u=co(s[0]-a)*this.kx,f=(s[1]-h)*this.ky;if(u!==0||f!==0){const _=(co(e[0]-a)*this.kx*u+(e[1]-h)*this.ky*f)/(u*u+f*f);_>1?(a=s[0],h=s[1]):_>0&&(a+=u/this.kx*_,h+=f/this.ky*_)}return u=co(e[0]-a)*this.kx,f=(e[1]-h)*this.ky,Math.sqrt(u*u+f*f)}pointOnLine(e,i){let s=1/0,a=e[0][0],h=e[0][1],u=0,f=0;for(let _=0;_<e.length-1;_++){let g=e[_][0],v=e[_][1],b=co(e[_+1][0]-g)*this.kx,T=(e[_+1][1]-v)*this.ky,A=0;b===0&&T===0||(A=(co(i[0]-g)*this.kx*b+(i[1]-v)*this.ky*T)/(b*b+T*T),A>1?(g=e[_+1][0],v=e[_+1][1]):A>0&&(g+=b/this.kx*A,v+=T/this.ky*A)),b=co(i[0]-g)*this.kx,T=(i[1]-v)*this.ky;const M=b*b+T*T;M<s&&(s=M,a=g,h=v,u=_,f=A)}return{point:[a,h],index:u,t:Math.max(0,Math.min(1,f))}}lineSlice(e,i,s){let a=this.pointOnLine(s,e),h=this.pointOnLine(s,i);if(a.index>h.index||a.index===h.index&&a.t>h.t){const g=a;a=h,h=g}const u=[a.point],f=a.index+1,_=h.index;!yh(s[f],u[0])&&f<=_&&u.push(s[f]);for(let g=f+1;g<=_;g++)u.push(s[g]);return yh(s[_],h.point)||u.push(h.point),u}lineSliceAlong(e,i,s){let a=0;const h=[];for(let u=0;u<s.length-1;u++){const f=s[u],_=s[u+1],g=this.distance(f,_);if(a+=g,a>e&&h.length===0&&h.push(Jl(f,_,(e-(a-g))/g)),a>=i)return h.push(Jl(f,_,(i-(a-g))/g)),h;a>e&&h.push(_)}return h}bufferPoint(e,i){const s=i/this.ky,a=i/this.kx;return[e[0]-a,e[1]-s,e[0]+a,e[1]+s]}bufferBBox(e,i){const s=i/this.ky,a=i/this.kx;return[e[0]-a,e[1]-s,e[2]+a,e[3]+s]}insideBBox(e,i){return co(e[0]-i[0])>=0&&co(e[0]-i[2])<=0&&e[1]>=i[1]&&e[1]<=i[3]}}function yh(r,e){return r[0]===e[0]&&r[1]===e[1]}function Jl(r,e,i){const s=co(e[0]-r[0]);return[r[0]+s*i,r[1]+(e[1]-r[1])*i]}function co(r){for(;r<-180;)r+=360;for(;r>180;)r-=360;return r}class ec{constructor(e=[],i=(s,a)=>s<a?-1:s>a?1:0){if(this.data=e,this.length=this.data.length,this.compare=i,this.length>0)for(let s=(this.length>>1)-1;s>=0;s--)this._down(s)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)return;const e=this.data[0],i=this.data.pop();return--this.length>0&&(this.data[0]=i,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:i,compare:s}=this,a=i[e];for(;e>0;){const h=e-1>>1,u=i[h];if(s(a,u)>=0)break;i[e]=u,e=h}i[e]=a}_down(e){const{data:i,compare:s}=this,a=this.length>>1,h=i[e];for(;e<a;){let u=1+(e<<1);const f=u+1;if(f<this.length&&s(i[f],i[u])<0&&(u=f),s(i[u],h)>=0)break;i[e]=i[u],e=u}i[e]=h}}var Xe=8192;function xh(r,e){return e.dist-r.dist}const tc=100,ic=50;function vh(r){const e=[1/0,1/0,-1/0,-1/0];if(e.length!==r.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==r[i])return!1;return!0}function xn(r){return r[1]-r[0]+1}function yo(r,e){const i=r[1]>=r[0]&&r[1]<e;return i||console.warn("Distance Expression: Index is out of range"),i}function ia(r,e){if(r[0]>r[1])return[null,null];const i=xn(r);if(e){if(i===2)return[r,null];const s=Math.floor(i/2);return[[r[0],r[0]+s],[r[0]+s,r[1]]]}{if(i===1)return[r,null];const s=Math.floor(i/2)-1;return[[r[0],r[0]+s],[r[0]+s+1,r[1]]]}}function Os(r,e){const i=[1/0,1/0,-1/0,-1/0];if(!yo(e,r.length))return i;for(let s=e[0];s<=e[1];++s)Ja(i,r[s]);return i}function il(r){const e=[1/0,1/0,-1/0,-1/0];for(let i=0;i<r.length;++i)for(let s=0;s<r[i].length;++s)Ja(e,r[i][s]);return e}function vn(r,e,i){if(vh(r)||vh(e))return NaN;let s=0,a=0;return r[2]<e[0]&&(s=e[0]-r[2]),r[0]>e[2]&&(s=r[0]-e[2]),r[1]>e[3]&&(a=r[1]-e[3]),r[3]<e[1]&&(a=e[1]-r[3]),i.distance([0,0],[s,a])}function ra(r){return 360*r-180}function Wt(r){return 360/Math.PI*Math.atan(Math.exp((180-360*r)*Math.PI/180))-90}function bh(r,e){const i=Math.pow(2,e.z),s=(r.y/Xe+e.y)/i;return[ra((r.x/Xe+e.x)/i),Wt(s)]}function ef(r,e){const i=[];for(let s=0;s<r.length;++s)i.push(bh(r[s],e));return i}function nd(r,e,i){const s=i.pointOnLine(e,r).point;return i.distance(r,s)}function wh(r,e,i,s,a){const h=i.slice(s[0],s[1]+1);let u=1/0;for(let f=e[0];f<=e[1];++f)if((u=Math.min(u,nd(r[f],h,a)))===0)return 0;return u}function Th(r,e,i,s,a){const h=Math.min(a.pointToSegmentDistance(r,i,s),a.pointToSegmentDistance(e,i,s)),u=Math.min(a.pointToSegmentDistance(i,r,e),a.pointToSegmentDistance(s,r,e));return Math.min(h,u)}function Gi(r,e,i,s,a){if(!yo(e,r.length)||!yo(s,i.length))return NaN;let h=1/0;for(let u=e[0];u<e[1];++u)for(let f=s[0];f<s[1];++f){if(qo(r[u],r[u+1],i[f],i[f+1]))return 0;h=Math.min(h,Th(r[u],r[u+1],i[f],i[f+1],a))}return h}function tf(r,e,i,s,a){if(!yo(e,r.length)||!yo(s,i.length))return NaN;let h=1/0;for(let u=e[0];u<=e[1];++u)for(let f=s[0];f<=s[1];++f)if((h=Math.min(h,a.distance(r[u],i[f])))===0)return h;return h}function rf(r,e,i){if(ls(r,e,!0))return 0;let s=1/0;for(const a of e){const h=a.length;if(h<2)return console.warn("Distance Expression: Invalid polygon!"),NaN;if(a[0]!==a[h-1]&&(s=Math.min(s,i.pointToSegmentDistance(r,a[h-1],a[0])))===0||(s=Math.min(s,nd(r,a,i)))===0)return s}return s}function of(r,e,i,s){if(!yo(e,r.length))return NaN;for(let h=e[0];h<=e[1];++h)if(ls(r[h],i,!0))return 0;let a=1/0;for(let h=e[0];h<e[1];++h)for(const u of i)for(let f=0,_=u.length,g=_-1;f<_;g=f++){if(qo(r[h],r[h+1],u[g],u[f]))return 0;a=Math.min(a,Th(r[h],r[h+1],u[g],u[f],s))}return a}function ad(r,e){for(const i of r)for(let s=0;s<=i.length-1;++s)if(ls(i[s],e,!0))return!0;return!1}function sf(r,e,i,s=1/0){const a=il(r),h=il(e);if(s!==1/0&&vn(a,h,i)>=s)return s;if(el(a,h)){if(ad(r,e))return 0}else if(ad(e,r))return 0;let u=s;for(const f of r)for(let _=0,g=f.length,v=g-1;_<g;v=_++)for(const b of e)for(let T=0,A=b.length,M=A-1;T<A;M=T++){if(qo(f[v],f[_],b[M],b[T]))return 0;u=Math.min(u,Th(f[v],f[_],b[M],b[T],i))}return u}function rc(r,e,i,s,a,h,u){if(h===null||u===null)return;const f=vn(Os(s,h),Os(a,u),i);f<e&&r.push({dist:f,range1:h,range2:u})}function nf(r,e,i,s,a=1/0){let h=Math.min(s.distance(r[0],i[0][0]),a);if(h===0)return h;const u=new ec([{dist:0,range1:[0,r.length-1],range2:[0,0]}],xh),f=e?ic:tc,_=il(i);for(;u.length;){const g=u.pop();if(g.dist>=h)continue;const v=g.range1;if(xn(v)<=f){if(!yo(v,r.length))return NaN;if(e){const b=of(r,v,i,s);if((h=Math.min(h,b))===0)return h}else for(let b=v[0];b<=v[1];++b){const T=rf(r[b],i,s);if((h=Math.min(h,T))===0)return h}}else{const b=ia(v,e);if(b[0]!==null){const T=vn(Os(r,b[0]),_,s);T<h&&u.push({dist:T,range1:b[0],range2:[0,0]})}if(b[1]!==null){const T=vn(Os(r,b[1]),_,s);T<h&&u.push({dist:T,range1:b[1],range2:[0,0]})}}}return h}function ld(r,e,i,s,a,h=1/0){let u=Math.min(h,a.distance(r[0],i[0]));if(u===0)return u;const f=new ec([{dist:0,range1:[0,r.length-1],range2:[0,i.length-1]}],xh),_=e?ic:tc,g=s?ic:tc;for(;f.length;){const v=f.pop();if(v.dist>=u)continue;const b=v.range1,T=v.range2;if(xn(b)<=_&&xn(T)<=g){if(!yo(b,r.length)||!yo(T,i.length))return NaN;if(e&&s?u=Math.min(u,Gi(r,b,i,T,a)):e||s?e&&!s?u=Math.min(u,wh(i,T,r,b,a)):!e&&s&&(u=Math.min(u,wh(r,b,i,T,a))):u=Math.min(u,tf(r,b,i,T,a)),u===0)return u}else{const A=ia(b,e),M=ia(T,s);rc(f,u,a,r,i,A[0],M[0]),rc(f,u,a,r,i,A[0],M[1]),rc(f,u,a,r,i,A[1],M[0]),rc(f,u,a,r,i,A[1],M[1])}}return u}function Sh(r,e,i,s,a=1/0){let h=a;const u=Os(r,[0,r.length-1]);for(const f of i)if(!(h!==1/0&&vn(u,Os(f,[0,f.length-1]),s)>=h)&&(h=Math.min(h,ld(r,e,f,!0,s,h)),h===0))return h;return h}function oc(r,e,i,s,a=1/0){let h=a;const u=Os(r,[0,r.length-1]);for(const f of i){if(h!==1/0&&vn(u,il(f),s)>=h)continue;const _=nf(r,e,f,s,h);if(isNaN(_))return _;if((h=Math.min(h,_))===0)return h}return h}function Eh(r){return r==="Point"||r==="MultiPoint"||r==="LineString"||r==="MultiLineString"||r==="Polygon"||r==="MultiPolygon"}class bn{constructor(e,i){this.type=dt,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'distance' expression requires either one argument, but found ' ${e.length-1} instead.`);if(Kn(e[1])){const s=e[1];if(s.type==="FeatureCollection"){for(let a=0;a<s.features.length;++a)if(Eh(s.features[a].geometry.type))return new bn(s,s.features[a].geometry)}else if(s.type==="Feature"){if(Eh(s.geometry.type))return new bn(s,s.geometry)}else if(Eh(s.type))return new bn(s,s)}return i.error("'distance' expression needs to be an array with format ['Distance', GeoJSONObj].")}evaluate(e){const i=e.geometry(),s=e.canonicalID();if(i!=null&&s!=null){if(e.geometryType()==="Point")return function(a,h,u){const f=[];for(const g of a)for(const v of g)f.push(bh(v,h));const _=new ta(f[0][1],"meters");return u.type==="Point"||u.type==="MultiPoint"||u.type==="LineString"?ld(f,!1,u.type==="Point"?[u.coordinates]:u.coordinates,u.type==="LineString",_):u.type==="MultiLineString"?Sh(f,!1,u.coordinates,_):u.type==="Polygon"||u.type==="MultiPolygon"?oc(f,!1,u.type==="Polygon"?[u.coordinates]:u.coordinates,_):null}(i,s,this.geometries);if(e.geometryType()==="LineString")return function(a,h,u){const f=[];for(const g of a){const v=[];for(const b of g)v.push(bh(b,h));f.push(v)}const _=new ta(f[0][0][1],"meters");if(u.type==="Point"||u.type==="MultiPoint"||u.type==="LineString")return Sh(u.type==="Point"?[u.coordinates]:u.coordinates,u.type==="LineString",f,_);if(u.type==="MultiLineString"){let g=1/0;for(let v=0;v<u.coordinates.length;v++){const b=Sh(u.coordinates[v],!0,f,_,g);if(isNaN(b))return b;if((g=Math.min(g,b))===0)return g}return g}if(u.type==="Polygon"||u.type==="MultiPolygon"){let g=1/0;for(let v=0;v<f.length;v++){const b=oc(f[v],!0,u.type==="Polygon"?[u.coordinates]:u.coordinates,_,g);if(isNaN(b))return b;if((g=Math.min(g,b))===0)return g}return g}return null}(i,s,this.geometries);if(e.geometryType()==="Polygon")return function(a,h,u){const f=[];for(const g of function(v,b){const T=v.length;if(T<=1)return[v];const A=[];let M,P;for(let k=0;k<T;k++){const F=jr(v[k]);F!==0&&(v[k].area=Math.abs(F),P===void 0&&(P=F<0),P===F<0?(M&&A.push(M),M=[v[k]]):M.push(v[k]))}return M&&A.push(M),A}(a)){const v=[];for(let b=0;b<g.length;++b)v.push(ef(g[b],h));f.push(v)}const _=new ta(f[0][0][0][1],"meters");if(u.type==="Point"||u.type==="MultiPoint"||u.type==="LineString")return oc(u.type==="Point"?[u.coordinates]:u.coordinates,u.type==="LineString",f,_);if(u.type==="MultiLineString"){let g=1/0;for(let v=0;v<u.coordinates.length;v++){const b=oc(u.coordinates[v],!0,f,_,g);if(isNaN(b))return b;if((g=Math.min(g,b))===0)return g}return g}return u.type==="Polygon"||u.type==="MultiPolygon"?function(g,v,b){let T=1/0;for(const A of g)for(const M of v){const P=sf(A,M,b,T);if(isNaN(P))return P;if((T=Math.min(T,P))===0)return T}return T}(u.type==="Polygon"?[u.coordinates]:u.coordinates,f,_):null}(i,s,this.geometries);console.warn("Distance Expression: currently only evaluates valid Point/LineString/Polygon geometries.")}else console.warn("Distance Expression: requirs valid feature and canonical information.");return null}eachChild(){}outputDefined(){return!0}serialize(){return["distance",this.geojson]}}function Ih(r,e){switch(r){case"string":return Vr(e);case"number":return+e;case"boolean":return!!e;case"color":return Jt.parse(e);case"formatted":return Nr.fromString(Vr(e));case"resolvedImage":return Yr.build(Vr(e))}return e}function cd(r,e,i,s){return s!==void 0&&(r=s*Math.round(r/s)),e!==void 0&&r<e&&(r=e),i!==void 0&&r>i&&(r=i),r}class oa{constructor(e,i,s){this.type=e,this.key=i,this.scope=s}static parse(e,i){let s=i.expectedType;if(s==null&&(s=ti),e.length<2||e.length>3)return i.error("Invalid number of arguments for 'config' expression.");const a=i.parse(e[1],1);if(!(a instanceof zt))return i.error("Key name of 'config' expression must be a string literal.");if(e.length>=3){const h=i.parse(e[2],2);return h instanceof zt?new oa(s,Vr(a.value),Vr(h.value)):i.error("Scope of 'config' expression must be a string literal.")}return new oa(s,Vr(a.value))}evaluate(e){const i=[this.key,this.scope,e.scope].filter(Boolean).join(""),s=e.getConfig(i);if(!s)return null;const{type:a,value:h,values:u,minValue:f,maxValue:_,stepValue:g}=s,v=s.default.evaluate(e);let b=v;if(h){const T=e.scope;e.scope=(T||"").split("").slice(1).join(""),b=h.evaluate(e),e.scope=T}return a&&(b=Ih(a,b)),b===void 0||f===void 0&&_===void 0&&g===void 0||(typeof b=="number"?b=cd(b,f,_,g):Array.isArray(b)&&(b=b.map(T=>typeof T=="number"?cd(T,f,_,g):T))),h!==void 0&&b!==void 0&&u&&!u.includes(b)&&(b=v,a&&(b=Ih(a,b))),(a&&a!==this.type||b!==void 0&&pr(b)!==this.type)&&(b=Ih(this.type.kind,b)),b}eachChild(){}outputDefined(){return!1}serialize(){const e=["config",this.key];return this.scope&&e.concat(this.key),e}}function rl(r){if(r instanceof zr&&(r.name==="get"&&r.args.length===1||r.name==="feature-state"||r.name==="has"&&r.args.length===1||r.name==="properties"||r.name==="geometry-type"||r.name==="id"||/^filter-/.test(r.name))||r instanceof cs||r instanceof bn)return!1;let e=!0;return r.eachChild(i=>{e&&!rl(i)&&(e=!1)}),e}function sc(r){if(r instanceof zr&&r.name==="feature-state")return!1;let e=!0;return r.eachChild(i=>{e&&!sc(i)&&(e=!1)}),e}function nc(r){if(r instanceof oa)return new Set([r.key]);let e=new Set;return r.eachChild(i=>{e=new Set([...e,...nc(i)])}),e}function sa(r,e){if(r instanceof zr&&e.indexOf(r.name)>=0)return!1;let i=!0;return r.eachChild(s=>{i&&!sa(s,e)&&(i=!1)}),i}class ac{constructor(e,i){this.type=i.type,this.name=e,this.boundExpression=i}static parse(e,i){if(e.length!==2||typeof e[1]!="string")return i.error("'var' expression requires exactly one string literal argument.");const s=e[1];return i.scope.has(s)?new ac(s,i.scope.get(s)):i.error(`Unknown variable "${s}". Make sure "${s}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}class Ah{constructor(e,i=[],s,a=new fn,h=[],u,f){this.registry=e,this.path=i,this.key=i.map(_=>typeof _=="string"?`['${_}']`:`[${_}]`).join(""),this.scope=a,this.errors=h,this.expectedType=s,this._scope=u,this.options=f}parse(e,i,s,a,h={}){return i||s?this.concat(i,null,s,a)._parse(e,h):this._parse(e,h)}parseObjectValue(e,i,s,a,h,u={}){return this.concat(i,s,a,h)._parse(e,u)}_parse(e,i){function s(a,h,u){return u==="assert"?new vt(h,[a]):u==="coerce"?new Mo(h,[a]):a}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const a=typeof e[0]=="string"?this.registry[e[0]]:void 0;if(a){let h=a.parse(e,this);if(!h)return null;if(this.expectedType){const u=this.expectedType,f=h.type;if(u.kind!=="string"&&u.kind!=="number"&&u.kind!=="boolean"&&u.kind!=="object"&&u.kind!=="array"||f.kind!=="value")if(u.kind!=="color"&&u.kind!=="formatted"&&u.kind!=="resolvedImage"||f.kind!=="value"&&f.kind!=="string"){if(this.checkSubtype(u,f))return null}else h=s(h,u,i.typeAnnotation||"coerce");else h=s(h,u,i.typeAnnotation||"assert")}if(!(h instanceof zt)&&h.type.kind!=="resolvedImage"&&Mh(h)){const u=new Kl(this._scope,this.options);try{h=new zt(h.type,h.evaluate(u))}catch(f){return this.error(f.message),null}}return h}return Mo.parse(["to-array",e],this)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,i,s,a){let h=typeof e=="number"?this.path.concat(e):this.path;h=typeof i=="string"?h.concat(i):h;const u=a?this.scope.concat(a):this.scope;return new Ah(this.registry,h,s||null,u,this.errors,this._scope,this.options)}error(e,...i){const s=`${this.key}${i.map(a=>`[${a}]`).join("")}`;this.errors.push(new _o(s,e))}checkSubtype(e,i){const s=Ka(e,i);return s&&this.error(s),s}}var hd=Ah;function Mh(r){if(r instanceof ac)return Mh(r.boundExpression);if(r instanceof zr&&r.name==="error"||r instanceof Jn||r instanceof cs||r instanceof bn||r instanceof oa)return!1;const e=r instanceof Mo||r instanceof vt;let i=!0;return r.eachChild(s=>{i=e?i&&Mh(s):i&&s instanceof zt}),!!i&&rl(r)&&sa(r,["zoom","heatmap-density","line-progress","raster-value","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center","measure-light","raster-particle-speed"])}function lc(r,e){const i=r.length-1;let s,a,h=0,u=i,f=0;for(;h<=u;)if(f=Math.floor((h+u)/2),s=r[f],a=r[f+1],s<=e){if(f===i||e<a)return f;h=f+1}else{if(!(s>e))throw new rt("Input is not a number.");u=f-1}return 0}class ol{constructor(e,i,s){this.type=e,this.input=i,this.labels=[],this.outputs=[];for(const[a,h]of s)this.labels.push(a),this.outputs.push(h)}static parse(e,i){if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");const s=i.parse(e[1],1,dt);if(!s)return null;const a=[];let h=null;i.expectedType&&i.expectedType.kind!=="value"&&(h=i.expectedType);for(let u=1;u<e.length;u+=2){const f=u===1?-1/0:e[u],_=e[u+1],g=u,v=u+1;if(typeof f!="number")return i.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',g);if(a.length&&a[a.length-1][0]>=f)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',g);const b=i.parse(_,v,h);if(!b)return null;h=h||b.type,a.push([f,b])}return new ol(h,s,a)}evaluate(e){const i=this.labels,s=this.outputs;if(i.length===1)return s[0].evaluate(e);const a=this.input.evaluate(e);if(a<=i[0])return s[0].evaluate(e);const h=i.length;return a>=i[h-1]?s[h-1].evaluate(e):s[lc(i,a)].evaluate(e)}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let i=0;i<this.labels.length;i++)i>0&&e.push(this.labels[i]),e.push(this.outputs[i].serialize());return e}}const ud=.95047,dd=1.08883,pd=4/29,na=6/29,fd=3*na*na,af=na*na*na,Ch=Math.PI/180,lf=180/Math.PI;function cc(r){return r>af?Math.pow(r,1/3):r/fd+pd}function Ph(r){return r>na?r*r*r:fd*(r-pd)}function zh(r){return 255*(r<=.0031308?12.92*r:1.055*Math.pow(r,1/2.4)-.055)}function Dh(r){return(r/=255)<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function Rh(r){const e=Dh(r.r),i=Dh(r.g),s=Dh(r.b),a=cc((.4124564*e+.3575761*i+.1804375*s)/ud),h=cc((.2126729*e+.7151522*i+.072175*s)/1);return{l:116*h-16,a:500*(a-h),b:200*(h-cc((.0193339*e+.119192*i+.9503041*s)/dd)),alpha:r.a}}function Lh(r){let e=(r.l+16)/116,i=isNaN(r.a)?e:e+r.a/500,s=isNaN(r.b)?e:e-r.b/200;return e=1*Ph(e),i=ud*Ph(i),s=dd*Ph(s),new Jt(zh(3.2404542*i-1.5371385*e-.4985314*s),zh(-.969266*i+1.8760108*e+.041556*s),zh(.0556434*i-.2040259*e+1.0572252*s),r.alpha)}function aa(r,e,i){const s=e-r;return r+i*(s>180||s<-180?s-360*Math.round(s/360):s)}const la={forward:Rh,reverse:Lh,interpolate:function(r,e,i){return{l:ft(r.l,e.l,i),a:ft(r.a,e.a,i),b:ft(r.b,e.b,i),alpha:ft(r.alpha,e.alpha,i)}}},ca={forward:function(r){const{l:e,a:i,b:s}=Rh(r),a=Math.atan2(s,i)*lf;return{h:a<0?a+360:a,c:Math.sqrt(i*i+s*s),l:e,alpha:r.a}},reverse:function(r){const e=r.h*Ch,i=r.c;return Lh({l:r.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:r.alpha})},interpolate:function(r,e,i){return{h:aa(r.h,e.h,i),c:ft(r.c,e.c,i),l:ft(r.l,e.l,i),alpha:ft(r.alpha,e.alpha,i)}}};var md=Object.freeze({__proto__:null,hcl:ca,lab:la});class Kr{constructor(e,i,s,a,h){this.type=e,this.operator=i,this.interpolation=s,this.input=a,this.labels=[],this.outputs=[];for(const[u,f]of h)this.labels.push(u),this.outputs.push(f)}static interpolationFactor(e,i,s,a){let h=0;if(e.name==="exponential")h=sl(i,e.base,s,a);else if(e.name==="linear")h=sl(i,1,s,a);else if(e.name==="cubic-bezier"){const u=e.controlPoints;h=new Bl(u[0],u[1],u[2],u[3]).solve(sl(i,1,s,a))}return h}static parse(e,i){let[s,a,h,...u]=e;if(!Array.isArray(a)||a.length===0)return i.error("Expected an interpolation type expression.",1);if(a[0]==="linear")a={name:"linear"};else if(a[0]==="exponential"){const g=a[1];if(typeof g!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);a={name:"exponential",base:g}}else{if(a[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(a[0])}`,1,0);{const g=a.slice(1);if(g.length!==4||g.some(v=>typeof v!="number"||v<0||v>1))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);a={name:"cubic-bezier",controlPoints:g}}}if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length-1>3&&(e.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(h=i.parse(h,2,dt),!h)return null;const f=[];let _=null;s==="interpolate-hcl"||s==="interpolate-lab"?_=$r:i.expectedType&&i.expectedType.kind!=="value"&&(_=i.expectedType);for(let g=0;g<u.length;g+=2){const v=u[g],b=u[g+1],T=g+3,A=g+4;if(typeof v!="number")return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',T);if(f.length&&f[f.length-1][0]>=v)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',T);const M=i.parse(b,A,_);if(!M)return null;_=_||M.type,f.push([v,M])}return _.kind==="number"||_.kind==="color"||_.kind==="array"&&_.itemType.kind==="number"&&typeof _.N=="number"?new Kr(_,s,a,h,f):i.error(`Type ${cr(_)} is not interpolatable.`)}evaluate(e){const i=this.labels,s=this.outputs;if(i.length===1)return s[0].evaluate(e);const a=this.input.evaluate(e);if(a<=i[0])return s[0].evaluate(e);const h=i.length;if(a>=i[h-1])return s[h-1].evaluate(e);const u=lc(i,a),f=Kr.interpolationFactor(this.interpolation,a,i[u],i[u+1]),_=s[u].evaluate(e),g=s[u+1].evaluate(e);return this.operator==="interpolate"?$l[this.type.kind.toLowerCase()](_,g,f):this.operator==="interpolate-hcl"?ca.reverse(ca.interpolate(ca.forward(_),ca.forward(g),f)):la.reverse(la.interpolate(la.forward(_),la.forward(g),f))}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;e=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier",...this.interpolation.controlPoints];const i=[this.operator,e,this.input.serialize()];for(let s=0;s<this.labels.length;s++)i.push(this.labels[s],this.outputs[s].serialize());return i}}function sl(r,e,i,s){const a=s-i,h=r-i;return a===0?0:e===1?h/a:(Math.pow(e,h)-1)/(Math.pow(e,a)-1)}class hc{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expectected at least one argument.");let s=null;const a=i.expectedType;a&&a.kind!=="value"&&(s=a);const h=[];for(const f of e.slice(1)){const _=i.parse(f,1+h.length,s,void 0,{typeAnnotation:"omit"});if(!_)return null;s=s||_.type,h.push(_)}const u=a&&h.some(f=>Ka(a,f.type));return new hc(u?ti:s,h)}evaluate(e){let i,s=null,a=0;for(const h of this.args){if(a++,s=h.evaluate(e),s&&s instanceof Yr&&!s.available&&(i||(i=s),s=null,a===this.args.length))return i;if(s!==null)break}return s}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(i=>{e.push(i.serialize())}),e}}class uc{constructor(e,i){this.type=i.type,this.bindings=[].concat(e),this.result=i}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const i of this.bindings)e(i[1]);e(this.result)}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const s=[];for(let h=1;h<e.length-1;h+=2){const u=e[h];if(typeof u!="string")return i.error(`Expected string, but found ${typeof u} instead.`,h);if(/[^a-zA-Z0-9_]/.test(u))return i.error("Variable names must contain only alphanumeric characters or '_'.",h);const f=i.parse(e[h+1],h+1);if(!f)return null;s.push([u,f])}const a=i.parse(e[e.length-1],e.length-1,i.expectedType,s);return a?new uc(s,a):null}outputDefined(){return this.result.outputDefined()}serialize(){const e=["let"];for(const[i,s]of this.bindings)e.push(i,s.serialize());return e.push(this.result.serialize()),e}}class dc{constructor(e,i,s){this.type=e,this.index=i,this.input=s}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const s=i.parse(e[1],1,dt),a=i.parse(e[2],2,Br(i.expectedType||ti));return s&&a?new dc(a.type.itemType,s,a):null}evaluate(e){const i=this.index.evaluate(e),s=this.input.evaluate(e);if(i<0)throw new rt(`Array index out of bounds: ${i} < 0.`);if(i>=s.length)throw new rt(`Array index out of bounds: ${i} > ${s.length-1}.`);if(i!==Math.floor(i))throw new rt(`Array index must be an integer, but found ${i} instead. Use at-interpolated to retrieve interpolated result with a fractional index.`);return s[i]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}class pc{constructor(e,i,s){this.type=e,this.index=i,this.input=s}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const s=i.parse(e[1],1,dt),a=i.parse(e[2],2,Br(i.expectedType||ti));return s&&a?new pc(a.type.itemType,s,a):null}evaluate(e){const i=this.index.evaluate(e),s=this.input.evaluate(e);if(i<0)throw new rt(`Array index out of bounds: ${i} < 0.`);if(i>s.length-1)throw new rt(`Array index out of bounds: ${i} > ${s.length-1}.`);if(i===Math.floor(i))return s[i];const a=Math.floor(i),h=Math.ceil(i),u=s[a],f=s[h];if(typeof u!="number"||typeof f!="number")throw new rt(`Cannot interpolate between non-number values at index ${i}.`);const _=i-a;return u*(1-_)+f*_}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at-interpolated",this.index.serialize(),this.input.serialize()]}}class kh{constructor(e,i){this.type=ri,this.needle=e,this.haystack=i}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const s=i.parse(e[1],1,ti),a=i.parse(e[2],2,ti);return s&&a?fh(s.type,[ri,ui,dt,Ps,ti])?new kh(s,a):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${cr(s.type)} instead`):null}evaluate(e){const i=this.needle.evaluate(e),s=this.haystack.evaluate(e);if(s==null)return!1;if(!Yn(i,["boolean","string","number","null"]))throw new rt(`Expected first argument to be of type boolean, string, number or null, but found ${cr(pr(i))} instead.`);if(!Yn(s,["string","array"]))throw new rt(`Expected second argument to be of type array or string, but found ${cr(pr(s))} instead.`);return s.indexOf(i)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}class fc{constructor(e,i,s){this.type=dt,this.needle=e,this.haystack=i,this.fromIndex=s}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const s=i.parse(e[1],1,ti),a=i.parse(e[2],2,ti);if(!s||!a)return null;if(!fh(s.type,[ri,ui,dt,Ps,ti]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${cr(s.type)} instead`);if(e.length===4){const h=i.parse(e[3],3,dt);return h?new fc(s,a,h):null}return new fc(s,a)}evaluate(e){const i=this.needle.evaluate(e),s=this.haystack.evaluate(e);if(!Yn(i,["boolean","string","number","null"]))throw new rt(`Expected first argument to be of type boolean, string, number or null, but found ${cr(pr(i))} instead.`);if(!Yn(s,["string","array"]))throw new rt(`Expected second argument to be of type array or string, but found ${cr(pr(s))} instead.`);if(this.fromIndex){const a=this.fromIndex.evaluate(e);return s.indexOf(i,a)}return s.indexOf(i)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}class Oh{constructor(e,i,s,a,h,u){this.inputType=e,this.type=i,this.input=s,this.cases=a,this.outputs=h,this.otherwise=u}static parse(e,i){if(e.length<5)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return i.error("Expected an even number of arguments.");let s,a;i.expectedType&&i.expectedType.kind!=="value"&&(a=i.expectedType);const h={},u=[];for(let g=2;g<e.length-1;g+=2){let v=e[g];const b=e[g+1];Array.isArray(v)||(v=[v]);const T=i.concat(g);if(v.length===0)return T.error("Expected at least one branch label.");for(const M of v){if(typeof M!="number"&&typeof M!="string")return T.error("Branch labels must be numbers or strings.");if(typeof M=="number"&&Math.abs(M)>Number.MAX_SAFE_INTEGER)return T.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof M=="number"&&Math.floor(M)!==M)return T.error("Numeric branch labels must be integer values.");if(s){if(T.checkSubtype(s,pr(M)))return null}else s=pr(M);if(h[String(M)]!==void 0)return T.error("Branch labels must be unique.");h[String(M)]=u.length}const A=i.parse(b,g,a);if(!A)return null;a=a||A.type,u.push(A)}const f=i.parse(e[1],1,ti);if(!f)return null;const _=i.parse(e[e.length-1],e.length-1,a);return _?f.type.kind!=="value"&&i.concat(1).checkSubtype(s,f.type)?null:new Oh(s,a,f,h,u,_):null}evaluate(e){const i=this.input.evaluate(e);return(pr(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],i=Object.keys(this.cases).sort(),s=[],a={};for(const u of i){const f=a[this.cases[u]];f===void 0?(a[this.cases[u]]=s.length,s.push([this.cases[u],[u]])):s[f][1].push(u)}const h=u=>this.inputType.kind==="number"?Number(u):u;for(const[u,f]of s)e.push(f.length===1?h(f[0]):f.map(h)),e.push(this.outputs[u].serialize());return e.push(this.otherwise.serialize()),e}}class mc{constructor(e,i,s){this.type=e,this.branches=i,this.otherwise=s}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return i.error("Expected an odd number of arguments.");let s;i.expectedType&&i.expectedType.kind!=="value"&&(s=i.expectedType);const a=[];for(let u=1;u<e.length-1;u+=2){const f=i.parse(e[u],u,ri);if(!f)return null;const _=i.parse(e[u+1],u+1,s);if(!_)return null;a.push([f,_]),s=s||_.type}const h=i.parse(e[e.length-1],e.length-1,s);return h?new mc(s,a,h):null}evaluate(e){for(const[i,s]of this.branches)if(i.evaluate(e))return s.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[i,s]of this.branches)e(i),e(s);e(this.otherwise)}outputDefined(){return this.branches.every(([e,i])=>i.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(i=>{e.push(i.serialize())}),e}}class nl{constructor(e,i,s,a){this.type=e,this.input=i,this.beginIndex=s,this.endIndex=a}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const s=i.parse(e[1],1,ti),a=i.parse(e[2],2,dt);if(!s||!a)return null;if(!fh(s.type,[Br(ti),ui,ti]))return i.error(`Expected first argument to be of type array or string, but found ${cr(s.type)} instead`);if(e.length===4){const h=i.parse(e[3],3,dt);return h?new nl(s.type,s,a,h):null}return new nl(s.type,s,a)}evaluate(e){const i=this.input.evaluate(e),s=this.beginIndex.evaluate(e);if(!Yn(i,["string","array"]))throw new rt(`Expected first argument to be of type array or string, but found ${cr(pr(i))} instead.`);if(this.endIndex){const a=this.endIndex.evaluate(e);return i.slice(s,a)}return i.slice(s)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}function al(r,e){return r==="=="||r==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function _d(r,e,i,s){return s.compare(e,i)===0}function wn(r,e,i){const s=r!=="=="&&r!=="!=";return class Vx{constructor(h,u,f){this.type=ri,this.lhs=h,this.rhs=u,this.collator=f,this.hasUntypedArgument=h.type.kind==="value"||u.type.kind==="value"}static parse(h,u){if(h.length!==3&&h.length!==4)return u.error("Expected two or three arguments.");const f=h[0];let _=u.parse(h[1],1,ti);if(!_)return null;if(!al(f,_.type))return u.concat(1).error(`"${f}" comparisons are not supported for type '${cr(_.type)}'.`);let g=u.parse(h[2],2,ti);if(!g)return null;if(!al(f,g.type))return u.concat(2).error(`"${f}" comparisons are not supported for type '${cr(g.type)}'.`);if(_.type.kind!==g.type.kind&&_.type.kind!=="value"&&g.type.kind!=="value")return u.error(`Cannot compare types '${cr(_.type)}' and '${cr(g.type)}'.`);s&&(_.type.kind==="value"&&g.type.kind!=="value"?_=new vt(g.type,[_]):_.type.kind!=="value"&&g.type.kind==="value"&&(g=new vt(_.type,[g])));let v=null;if(h.length===4){if(_.type.kind!=="string"&&g.type.kind!=="string"&&_.type.kind!=="value"&&g.type.kind!=="value")return u.error("Cannot use collator to compare non-string types.");if(v=u.parse(h[3],3,mn),!v)return null}return new Vx(_,g,v)}evaluate(h){const u=this.lhs.evaluate(h),f=this.rhs.evaluate(h);if(s&&this.hasUntypedArgument){const _=pr(u),g=pr(f);if(_.kind!==g.kind||_.kind!=="string"&&_.kind!=="number")throw new rt(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${_.kind}, ${g.kind}) instead.`)}if(this.collator&&!s&&this.hasUntypedArgument){const _=pr(u),g=pr(f);if(_.kind!=="string"||g.kind!=="string")return e(h,u,f)}return this.collator?i(h,u,f,this.collator.evaluate(h)):e(h,u,f)}eachChild(h){h(this.lhs),h(this.rhs),this.collator&&h(this.collator)}outputDefined(){return!0}serialize(){const h=[r];return this.eachChild(u=>{h.push(u.serialize())}),h}}}const cf=wn("==",function(r,e,i){return e===i},_d),hf=wn("!=",function(r,e,i){return e!==i},function(r,e,i,s){return!_d(0,e,i,s)}),gd=wn("<",function(r,e,i){return e<i},function(r,e,i,s){return s.compare(e,i)<0}),yd=wn(">",function(r,e,i){return e>i},function(r,e,i,s){return s.compare(e,i)>0}),uf=wn("<=",function(r,e,i){return e<=i},function(r,e,i,s){return s.compare(e,i)<=0}),df=wn(">=",function(r,e,i){return e>=i},function(r,e,i,s){return s.compare(e,i)>=0});class Fh{constructor(e,i,s,a,h,u){this.type=ui,this.number=e,this.locale=i,this.currency=s,this.unit=a,this.minFractionDigits=h,this.maxFractionDigits=u}static parse(e,i){if(e.length!==3)return i.error("Expected two arguments.");const s=i.parse(e[1],1,dt);if(!s)return null;const a=e[2];if(typeof a!="object"||Array.isArray(a))return i.error("NumberFormat options argument must be an object.");let h=null;if(a.locale&&(h=i.parseObjectValue(a.locale,2,"locale",ui),!h))return null;let u=null;if(a.currency&&(u=i.parseObjectValue(a.currency,2,"currency",ui),!u))return null;let f=null;if(a.unit&&(f=i.parseObjectValue(a.unit,2,"unit",ui),!f))return null;let _=null;if(a["min-fraction-digits"]&&(_=i.parseObjectValue(a["min-fraction-digits"],2,"min-fraction-digits",dt),!_))return null;let g=null;return a["max-fraction-digits"]&&(g=i.parseObjectValue(a["max-fraction-digits"],2,"max-fraction-digits",dt),!g)?null:new Fh(s,h,u,f,_,g)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class ll{constructor(e){this.type=dt,this.input=e}static parse(e,i){if(e.length!==2)return i.error(`Expected 1 argument, but found ${e.length-1} instead.`);const s=i.parse(e[1],1);return s?s.type.kind!=="array"&&s.type.kind!=="string"&&s.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${cr(s.type)} instead.`):new ll(s):null}evaluate(e){const i=this.input.evaluate(e);if(typeof i=="string"||Array.isArray(i))return i.length;throw new rt(`Expected value to be of type string or array, but found ${cr(pr(i))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(i=>{e.push(i.serialize())}),e}}function xd(r){return function(){r=1831565813+(r|=0)|0;let e=Math.imul(r^r>>>15,1|r);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}const Tn={"==":cf,"!=":hf,">":yd,"<":gd,">=":df,"<=":uf,array:vt,at:dc,"at-interpolated":pc,boolean:vt,case:mc,coalesce:hc,collator:Jn,format:_n,image:Qn,in:kh,"index-of":fc,interpolate:Kr,"interpolate-hcl":Kr,"interpolate-lab":Kr,length:ll,let:uc,literal:zt,match:Oh,number:vt,"number-format":Fh,object:vt,slice:nl,step:ol,string:vt,"to-boolean":Mo,"to-color":Mo,"to-number":Mo,"to-string":Mo,var:ac,within:cs,distance:bn,config:oa};function vd(r,[e,i,s,a]){e=e.evaluate(r),i=i.evaluate(r),s=s.evaluate(r);const h=a?a.evaluate(r):1,u=Qu(e,i,s,h);if(u)throw new rt(u);return new Jt(e/255*h,i/255*h,s/255*h,h)}function bd(r,[e,i,s,a]){e=e.evaluate(r),i=i.evaluate(r),s=s.evaluate(r);const h=a?a.evaluate(r):1,u=function(g,v,b,T){return typeof g=="number"&&g>=0&&g<=360?typeof v=="number"&&v>=0&&v<=100&&typeof b=="number"&&b>=0&&b<=100?T===void 0||typeof T=="number"&&T>=0&&T<=1?null:`Invalid hsla value [${[g,v,b,T].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid hsla value [${(typeof T=="number"?[g,v,b,T]:[g,v,b]).join(", ")}]: 's', and 'l' must be between 0 and 100.`:`Invalid hsla value [${(typeof T=="number"?[g,v,b,T]:[g,v,b]).join(", ")}]: 'h' must be between 0 and 360.`}(e,i,s,h);if(u)throw new rt(u);const f=`hsla(${e}, ${i}%, ${s}%, ${h})`,_=Jt.parse(f);if(!_)throw new rt(`Failed to parse HSLA color: ${f}`);return _}function Bh(r,e){return r in e}function _c(r,e){const i=e[r];return i===void 0?null:i}function Fs(r){return{type:r}}function wd(r){return{result:"success",value:r}}function ho(r){return{result:"error",value:r}}function Nh(r,e){return!!r&&!!r.parameters&&r.parameters.indexOf(e)>-1}function gc(r){return r["property-type"]==="data-driven"}function Td(r){return Nh(r.expression,"measure-light")}function Vh(r){return Nh(r.expression,"zoom")}function yc(r){return!!r.expression&&r.expression.interpolated}function xc(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Sd(r){return r}function vc(r,e){const i=e.type==="color",s=r.stops&&typeof r.stops[0][0]=="object",a=s||!(s||r.property!==void 0),h=r.type||(yc(e)?"exponential":"interval");if(i&&((r=Xa({},r)).stops&&(r.stops=r.stops.map(g=>[g[0],Jt.parse(g[1])])),r.default=Jt.parse(r.default?r.default:e.default)),r.colorSpace&&r.colorSpace!=="rgb"&&!md[r.colorSpace])throw new Error(`Unknown color space: ${r.colorSpace}`);let u,f,_;if(h==="exponential")u=hs;else if(h==="interval")u=pf;else if(h==="categorical"){u=Ed,f=Object.create(null);for(const g of r.stops)f[g[0]]=g[1];_=typeof r.stops[0][0]}else{if(h!=="identity")throw new Error(`Unknown function type "${h}"`);u=ff}if(s){const g={},v=[];for(let A=0;A<r.stops.length;A++){const M=r.stops[A],P=M[0].zoom;g[P]===void 0&&(g[P]={zoom:P,type:r.type,property:r.property,default:r.default,stops:[]},v.push(P)),g[P].stops.push([M[0].value,M[1]])}const b=[];for(const A of v)b.push([g[A].zoom,vc(g[A],e)]);const T={name:"linear"};return{kind:"composite",interpolationType:T,interpolationFactor:Kr.interpolationFactor.bind(void 0,T),zoomStops:b.map(A=>A[0]),evaluate:({zoom:A},M)=>hs({stops:b,base:r.base},e,A).evaluate(A,M)}}if(a){const g=h==="exponential"?{name:"exponential",base:r.base!==void 0?r.base:1}:null;return{kind:"camera",interpolationType:g,interpolationFactor:Kr.interpolationFactor.bind(void 0,g),zoomStops:r.stops.map(v=>v[0]),evaluate:({zoom:v})=>u(r,e,v,f,_)}}return{kind:"source",evaluate(g,v){const b=v&&v.properties?v.properties[r.property]:void 0;return b===void 0?Sn(r.default,e.default):u(r,e,b,f,_)}}}function Sn(r,e,i){return r!==void 0?r:e!==void 0?e:i!==void 0?i:void 0}function Ed(r,e,i,s,a){return Sn(typeof i===a?s[i]:void 0,r.default,e.default)}function pf(r,e,i){if(bt(i)!=="number")return Sn(r.default,e.default);const s=r.stops.length;if(s===1||i<=r.stops[0][0])return r.stops[0][1];if(i>=r.stops[s-1][0])return r.stops[s-1][1];const a=lc(r.stops.map(h=>h[0]),i);return r.stops[a][1]}function hs(r,e,i){const s=r.base!==void 0?r.base:1;if(bt(i)!=="number")return Sn(r.default,e.default);const a=r.stops.length;if(a===1||i<=r.stops[0][0])return r.stops[0][1];if(i>=r.stops[a-1][0])return r.stops[a-1][1];const h=lc(r.stops.map(v=>v[0]),i),u=function(v,b,T,A){const M=A-T,P=v-T;return M===0?0:b===1?P/M:(Math.pow(b,P)-1)/(Math.pow(b,M)-1)}(i,s,r.stops[h][0],r.stops[h+1][0]),f=r.stops[h][1],_=r.stops[h+1][1];let g=$l[e.type]||Sd;if(r.colorSpace&&r.colorSpace!=="rgb"){const v=md[r.colorSpace];g=(b,T)=>v.reverse(v.interpolate(v.forward(b),v.forward(T),u))}return typeof f.evaluate=="function"?{evaluate(...v){const b=f.evaluate.apply(void 0,v),T=_.evaluate.apply(void 0,v);if(b!==void 0&&T!==void 0)return g(b,T,u)}}:g(f,_,u)}function ff(r,e,i){return e.type==="color"?i=Jt.parse(i):e.type==="formatted"?i=Nr.fromString(i.toString()):e.type==="resolvedImage"?i=Yr.build(i.toString()):bt(i)===e.type||e.type==="enum"&&e.values[i]||(i=void 0),Sn(i,r.default,e.default)}zr.register(Tn,{error:[{kind:"error"},[ui],(r,[e])=>{throw new rt(e.evaluate(r))}],typeof:[ui,[ti],(r,[e])=>cr(pr(e.evaluate(r)))],"to-rgba":[Br(dt,4),[$r],(r,[e])=>e.evaluate(r).toRenderColor(null).toArray()],"to-hsla":[Br(dt,4),[$r],(r,[e])=>e.evaluate(r).toRenderColor(null).toHslaArray()],rgb:[$r,[dt,dt,dt],vd],rgba:[$r,[dt,dt,dt,dt],vd],hsl:[$r,[dt,dt,dt],bd],hsla:[$r,[dt,dt,dt,dt],bd],has:{type:ri,overloads:[[[ui],(r,[e])=>Bh(e.evaluate(r),r.properties())],[[ui,zs],(r,[e,i])=>Bh(e.evaluate(r),i.evaluate(r))]]},get:{type:ti,overloads:[[[ui],(r,[e])=>_c(e.evaluate(r),r.properties())],[[ui,zs],(r,[e,i])=>_c(e.evaluate(r),i.evaluate(r))]]},"feature-state":[ti,[ui],(r,[e])=>_c(e.evaluate(r),r.featureState||{})],properties:[zs,[],r=>r.properties()],"geometry-type":[ui,[],r=>r.geometryType()],id:[ti,[],r=>r.id()],zoom:[dt,[],r=>r.globals.zoom],pitch:[dt,[],r=>r.globals.pitch||0],"distance-from-center":[dt,[],r=>r.distanceFromCenter()],"measure-light":[dt,[ui],(r,[e])=>r.measureLight(e.evaluate(r))],"heatmap-density":[dt,[],r=>r.globals.heatmapDensity||0],"line-progress":[dt,[],r=>r.globals.lineProgress||0],"raster-value":[dt,[],r=>r.globals.rasterValue||0],"raster-particle-speed":[dt,[],r=>r.globals.rasterParticleSpeed||0],"sky-radial-progress":[dt,[],r=>r.globals.skyRadialProgress||0],accumulated:[ti,[],r=>r.globals.accumulated===void 0?null:r.globals.accumulated],"+":[dt,Fs(dt),(r,e)=>{let i=0;for(const s of e)i+=s.evaluate(r);return i}],"*":[dt,Fs(dt),(r,e)=>{let i=1;for(const s of e)i*=s.evaluate(r);return i}],"-":{type:dt,overloads:[[[dt,dt],(r,[e,i])=>e.evaluate(r)-i.evaluate(r)],[[dt],(r,[e])=>-e.evaluate(r)]]},"/":[dt,[dt,dt],(r,[e,i])=>e.evaluate(r)/i.evaluate(r)],"%":[dt,[dt,dt],(r,[e,i])=>e.evaluate(r)%i.evaluate(r)],ln2:[dt,[],()=>Math.LN2],pi:[dt,[],()=>Math.PI],e:[dt,[],()=>Math.E],"^":[dt,[dt,dt],(r,[e,i])=>Math.pow(e.evaluate(r),i.evaluate(r))],sqrt:[dt,[dt],(r,[e])=>Math.sqrt(e.evaluate(r))],log10:[dt,[dt],(r,[e])=>Math.log(e.evaluate(r))/Math.LN10],ln:[dt,[dt],(r,[e])=>Math.log(e.evaluate(r))],log2:[dt,[dt],(r,[e])=>Math.log(e.evaluate(r))/Math.LN2],sin:[dt,[dt],(r,[e])=>Math.sin(e.evaluate(r))],cos:[dt,[dt],(r,[e])=>Math.cos(e.evaluate(r))],tan:[dt,[dt],(r,[e])=>Math.tan(e.evaluate(r))],asin:[dt,[dt],(r,[e])=>Math.asin(e.evaluate(r))],acos:[dt,[dt],(r,[e])=>Math.acos(e.evaluate(r))],atan:[dt,[dt],(r,[e])=>Math.atan(e.evaluate(r))],min:[dt,Fs(dt),(r,e)=>Math.min(...e.map(i=>i.evaluate(r)))],max:[dt,Fs(dt),(r,e)=>Math.max(...e.map(i=>i.evaluate(r)))],abs:[dt,[dt],(r,[e])=>Math.abs(e.evaluate(r))],round:[dt,[dt],(r,[e])=>{const i=e.evaluate(r);return i<0?-Math.round(-i):Math.round(i)}],floor:[dt,[dt],(r,[e])=>Math.floor(e.evaluate(r))],ceil:[dt,[dt],(r,[e])=>Math.ceil(e.evaluate(r))],"filter-==":[ri,[ui,ti],(r,[e,i])=>r.properties()[e.value]===i.value],"filter-id-==":[ri,[ti],(r,[e])=>r.id()===e.value],"filter-type-==":[ri,[ui],(r,[e])=>r.geometryType()===e.value],"filter-<":[ri,[ui,ti],(r,[e,i])=>{const s=r.properties()[e.value],a=i.value;return typeof s==typeof a&&s<a}],"filter-id-<":[ri,[ti],(r,[e])=>{const i=r.id(),s=e.value;return typeof i==typeof s&&i<s}],"filter->":[ri,[ui,ti],(r,[e,i])=>{const s=r.properties()[e.value],a=i.value;return typeof s==typeof a&&s>a}],"filter-id->":[ri,[ti],(r,[e])=>{const i=r.id(),s=e.value;return typeof i==typeof s&&i>s}],"filter-<=":[ri,[ui,ti],(r,[e,i])=>{const s=r.properties()[e.value],a=i.value;return typeof s==typeof a&&s<=a}],"filter-id-<=":[ri,[ti],(r,[e])=>{const i=r.id(),s=e.value;return typeof i==typeof s&&i<=s}],"filter->=":[ri,[ui,ti],(r,[e,i])=>{const s=r.properties()[e.value],a=i.value;return typeof s==typeof a&&s>=a}],"filter-id->=":[ri,[ti],(r,[e])=>{const i=r.id(),s=e.value;return typeof i==typeof s&&i>=s}],"filter-has":[ri,[ti],(r,[e])=>e.value in r.properties()],"filter-has-id":[ri,[],r=>r.id()!==null&&r.id()!==void 0],"filter-type-in":[ri,[Br(ui)],(r,[e])=>e.value.indexOf(r.geometryType())>=0],"filter-id-in":[ri,[Br(ti)],(r,[e])=>e.value.indexOf(r.id())>=0],"filter-in-small":[ri,[ui,Br(ti)],(r,[e,i])=>i.value.indexOf(r.properties()[e.value])>=0],"filter-in-large":[ri,[ui,Br(ti)],(r,[e,i])=>function(s,a,h,u){for(;h<=u;){const f=h+u>>1;if(a[f]===s)return!0;a[f]>s?u=f-1:h=f+1}return!1}(r.properties()[e.value],i.value,0,i.value.length-1)],all:{type:ri,overloads:[[[ri,ri],(r,[e,i])=>e.evaluate(r)&&i.evaluate(r)],[Fs(ri),(r,e)=>{for(const i of e)if(!i.evaluate(r))return!1;return!0}]]},any:{type:ri,overloads:[[[ri,ri],(r,[e,i])=>e.evaluate(r)||i.evaluate(r)],[Fs(ri),(r,e)=>{for(const i of e)if(i.evaluate(r))return!0;return!1}]]},"!":[ri,[ri],(r,[e])=>!e.evaluate(r)],"is-supported-script":[ri,[ui],(r,[e])=>{const i=r.globals&&r.globals.isSupportedScript;return!i||i(e.evaluate(r))}],upcase:[ui,[ui],(r,[e])=>e.evaluate(r).toUpperCase()],downcase:[ui,[ui],(r,[e])=>e.evaluate(r).toLowerCase()],concat:[ui,Fs(ti),(r,e)=>e.map(i=>Vr(i.evaluate(r))).join("")],"resolved-locale":[ui,[mn],(r,[e])=>e.evaluate(r).resolvedLocale()],random:[dt,[dt,dt,ti],(r,e)=>{const[i,s,a]=e.map(u=>u.evaluate(r));if(i>s||i===s)return i;let h;if(typeof a=="string")h=function(u){let f=0;if(u.length===0)return f;for(let _=0;_<u.length;_++)f=(f<<5)-f+u.charCodeAt(_),f|=0;return f}(a);else{if(typeof a!="number")throw new rt(`Invalid seed input: ${a}`);h=a}return i+xd(h)()*(s-i)}]});class Uh{constructor(e,i,s,a){this.expression=e,this._warningHistory={},this._evaluator=new Kl(s,a),this._defaultValue=i?function(h){return h.type==="color"&&(xc(h.default)||Array.isArray(h.default))?new Jt(0,0,0,0):h.type==="color"?Jt.parse(h.default)||null:h.default===void 0?null:h.default}(i):null,this._enumValues=i&&i.type==="enum"?i.values:null,this.configDependencies=nc(e)}evaluateWithoutErrorHandling(e,i,s,a,h,u,f,_){return this._evaluator.globals=e,this._evaluator.feature=i,this._evaluator.featureState=s,this._evaluator.canonical=a||null,this._evaluator.availableImages=h||null,this._evaluator.formattedSection=u,this._evaluator.featureTileCoord=f||null,this._evaluator.featureDistanceData=_||null,this.expression.evaluate(this._evaluator)}evaluate(e,i,s,a,h,u,f,_){this._evaluator.globals=e,this._evaluator.feature=i||null,this._evaluator.featureState=s||null,this._evaluator.canonical=a||null,this._evaluator.availableImages=h||null,this._evaluator.formattedSection=u||null,this._evaluator.featureTileCoord=f||null,this._evaluator.featureDistanceData=_||null;try{const g=this.expression.evaluate(this._evaluator);if(g==null||typeof g=="number"&&g!=g)return this._defaultValue;if(this._enumValues&&!(g in this._enumValues))throw new rt(`Expected value to be one of ${Object.keys(this._enumValues).map(v=>JSON.stringify(v)).join(", ")}, but found ${JSON.stringify(g)} instead.`);return g}catch(g){return this._warningHistory[g.message]||(this._warningHistory[g.message]=!0,typeof console<"u"&&console.warn(`Failed to evaluate expression "${JSON.stringify(this.expression.serialize())}". ${g.message}`)),this._defaultValue}}}function bc(r){return Array.isArray(r)&&r.length>0&&typeof r[0]=="string"&&r[0]in Tn}function ha(r,e,i,s){const a=new hd(Tn,[],e?function(u){const f={color:$r,string:ui,number:dt,enum:ui,boolean:ri,formatted:$a,resolvedImage:Ya};return u.type==="array"?Br(f[u.value]||ti,u.length):f[u.type]}(e):void 0,void 0,void 0,i,s),h=a.parse(r,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return h?wd(new Uh(h,e,i,s)):ho(a.errors)}class En{constructor(e,i,s,a){this.kind=e,this._styleExpression=i,this.isLightConstant=s,this.isLineProgressConstant=a,this.isStateDependent=e!=="constant"&&!sc(i.expression),this.configDependencies=nc(i.expression)}evaluateWithoutErrorHandling(e,i,s,a,h,u){return this._styleExpression.evaluateWithoutErrorHandling(e,i,s,a,h,u)}evaluate(e,i,s,a,h,u){return this._styleExpression.evaluate(e,i,s,a,h,u)}}class ua{constructor(e,i,s,a,h,u){this.kind=e,this.zoomStops=s,this._styleExpression=i,this.isStateDependent=e!=="camera"&&!sc(i.expression),this.isLightConstant=h,this.isLineProgressConstant=u,this.configDependencies=nc(i.expression),this.interpolationType=a}evaluateWithoutErrorHandling(e,i,s,a,h,u){return this._styleExpression.evaluateWithoutErrorHandling(e,i,s,a,h,u)}evaluate(e,i,s,a,h,u){return this._styleExpression.evaluate(e,i,s,a,h,u)}interpolationFactor(e,i,s){return this.interpolationType?Kr.interpolationFactor(this.interpolationType,e,i,s):0}}function cl(r,e,i,s){if((r=ha(r,e,i,s)).result==="error")return r;const a=r.value.expression,h=rl(a);if(!h&&!gc(e))return ho([new _o("","data expressions not supported")]);const u=sa(a,["zoom","pitch","distance-from-center"]);if(!u&&!Vh(e))return ho([new _o("","zoom expressions not supported")]);const f=sa(a,["measure-light"]);if(!f&&!Td(e))return ho([new _o("","measure-light expression not supported")]);const _=sa(a,["line-progress"]);if(!_&&!function(b){return Nh(b.expression,"line-progress")}(e))return ho([new _o("","line-progress expression not supported")]);const g=e.expression&&e.expression.relaxZoomRestriction,v=wc(a);return v||u||g?v instanceof _o?ho([v]):v instanceof Kr&&!yc(e)?ho([new _o("",'"interpolate" expressions cannot be used with this property')]):wd(v?new ua(h&&_?"camera":"composite",r.value,v.labels,v instanceof Kr?v.interpolation:void 0,f,_):new En(h&&_?"constant":"source",r.value,f,_)):ho([new _o("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression, or in the properties of atmosphere.')])}class hl{constructor(e,i){this._parameters=e,this._specification=i,Xa(this,vc(this._parameters,this._specification))}static deserialize(e){return new hl(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function wc(r){let e=null;if(r instanceof uc)e=wc(r.result);else if(r instanceof hc){for(const i of r.args)if(e=wc(i),e)break}else(r instanceof ol||r instanceof Kr)&&r.input instanceof zr&&r.input.name==="zoom"&&(e=r);return e instanceof _o||r.eachChild(i=>{const s=wc(i);s instanceof _o?e=s:e&&s&&e!==s&&(e=new _o("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}var jh,Tc,Gh=function(){if(Tc)return jh;Tc=1,jh=e;var r=3;function e(i,s,a){var h=this.cells=[];if(i instanceof ArrayBuffer){this.arrayBuffer=i;var u=new Int32Array(this.arrayBuffer);i=u[0],this.d=(s=u[1])+2*(a=u[2]);for(var f=0;f<this.d*this.d;f++){var _=u[r+f],g=u[r+f+1];h.push(_===g?null:u.subarray(_,g))}var v=u[r+h.length+1];this.keys=u.subarray(u[r+h.length],v),this.bboxes=u.subarray(v),this.insert=this._insertReadonly}else{this.d=s+2*a;for(var b=0;b<this.d*this.d;b++)h.push([]);this.keys=[],this.bboxes=[]}this.n=s,this.extent=i,this.padding=a,this.scale=s/i,this.uid=0;var T=a/s*i;this.min=-T,this.max=i+T}return e.prototype.insert=function(i,s,a,h,u){this._forEachCell(s,a,h,u,this._insertCell,this.uid++),this.keys.push(i),this.bboxes.push(s),this.bboxes.push(a),this.bboxes.push(h),this.bboxes.push(u)},e.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},e.prototype._insertCell=function(i,s,a,h,u,f){this.cells[u].push(f)},e.prototype.query=function(i,s,a,h,u){var f=this.min,_=this.max;if(i<=f&&s<=f&&_<=a&&_<=h&&!u)return Array.prototype.slice.call(this.keys);var g=[];return this._forEachCell(i,s,a,h,this._queryCell,g,{},u),g},e.prototype._queryCell=function(i,s,a,h,u,f,_,g){var v=this.cells[u];if(v!==null)for(var b=this.keys,T=this.bboxes,A=0;A<v.length;A++){var M=v[A];if(_[M]===void 0){var P=4*M;(g?g(T[P+0],T[P+1],T[P+2],T[P+3]):i<=T[P+2]&&s<=T[P+3]&&a>=T[P+0]&&h>=T[P+1])?(_[M]=!0,f.push(b[M])):_[M]=!1}}},e.prototype._forEachCell=function(i,s,a,h,u,f,_,g){for(var v=this._convertToCellCoord(i),b=this._convertToCellCoord(s),T=this._convertToCellCoord(a),A=this._convertToCellCoord(h),M=v;M<=T;M++)for(var P=b;P<=A;P++){var k=this.d*P+M;if((!g||g(this._convertFromCellCoord(M),this._convertFromCellCoord(P),this._convertFromCellCoord(M+1),this._convertFromCellCoord(P+1)))&&u.call(this,i,s,a,h,k,f,_,g))return}},e.prototype._convertFromCellCoord=function(i){return(i-this.padding)/this.scale},e.prototype._convertToCellCoord=function(i){return Math.max(0,Math.min(this.d-1,Math.floor(i*this.scale)+this.padding))},e.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var i=this.cells,s=r+this.cells.length+1+1,a=0,h=0;h<this.cells.length;h++)a+=this.cells[h].length;var u=new Int32Array(s+a+this.keys.length+this.bboxes.length);u[0]=this.extent,u[1]=this.n,u[2]=this.padding;for(var f=s,_=0;_<i.length;_++){var g=i[_];u[r+_]=f,u.set(g,f),f+=g.length}return u[r+i.length]=f,u.set(this.keys,f),u[r+i.length+1]=f+=this.keys.length,u.set(this.bboxes,f),f+=this.bboxes.length,u.buffer},jh}(),da=jo(Gh);const ul={};function it(r,e,i={}){Object.defineProperty(r,"_classRegistryKey",{value:e,writable:!1}),ul[e]={klass:r,omit:i.omit||[]}}it(Object,"Object"),da.serialize=function(r,e){const i=r.toArrayBuffer();return e&&e.add(i),{buffer:i}},da.deserialize=function(r){return new da(r.buffer)},Object.defineProperty(da,"name",{value:"Grid"}),it(da,"Grid"),typeof DOMMatrix<"u"&&it(DOMMatrix,"DOMMatrix"),it(Jt,"Color"),it(Error,"Error"),it(Nr,"Formatted"),it(Yl,"FormattedSection"),it(ql,"AJAXError"),it(Yr,"ResolvedImage"),it(hl,"StylePropertyFunction"),it(Uh,"StyleExpression",{omit:["_evaluator"]}),it(ro,"ImageId"),it(Ao,"ImageVariant"),it(ua,"ZoomDependentExpression"),it(En,"ZoomConstantExpression"),it(zr,"CompoundExpression",{omit:["_evaluate"]});for(const r in Tn)ul[Tn[r]._classRegistryKey]||it(Tn[r],`Expression${r}`);function dl(r){return r&&typeof ArrayBuffer<"u"&&(r instanceof ArrayBuffer||r.constructor&&r.constructor.name==="ArrayBuffer")}function In(r){return self.ImageBitmap&&r instanceof ImageBitmap}function Bs(r,e){if(r==null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||r instanceof Boolean||r instanceof Number||r instanceof String||r instanceof Date||r instanceof RegExp)return r;if(dl(r)||In(r))return e&&e.add(r),r;if(ArrayBuffer.isView(r))return e&&e.add(r.buffer),r;if(r instanceof ImageData)return e&&e.add(r.data.buffer),r;if(Array.isArray(r)){const i=[];for(const s of r)i.push(Bs(s,e));return i}if(r instanceof Map){const i={$name:"Map",entries:[]};for(const[s,a]of r.entries())i.entries.push(Bs(s),Bs(a,e));return i}if(r instanceof Set){const i={$name:"Set"};let s=0;for(const a of r.values())i[++s]=Bs(a);return i}if(r instanceof DOMMatrix){const i={$name:"DOMMatrix"},s=["is2D","m11","m12","m13","m14","m21","m22","m23","m24","m31","m32","m33","m34","m41","m42","m43","m44","a","b","c","d","e","f"];for(const a of s)i[a]=r[a];return i}if(typeof r=="bigint")return{$name:"BigInt",value:r.toString()};if(typeof r=="object"){const i=r.constructor,s=i._classRegistryKey;if(!s)throw new Error(`Can't serialize object of unregistered class "${i.name}".`);const a=i.serialize?i.serialize(r,e):{};if(!i.serialize){for(const h in r)r.hasOwnProperty(h)&&(ul[s].omit.indexOf(h)>=0||(a[h]=Bs(r[h],e)));r instanceof Error&&(a.message=r.message)}if(a.$name)throw new Error("$name property is reserved for worker serialization logic.");return s!=="Object"&&(a.$name=s),a}throw new Error("can't serialize object of type "+typeof r)}function Ns(r){if(r==null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||r instanceof Boolean||r instanceof Number||r instanceof String||r instanceof Date||r instanceof RegExp||dl(r)||In(r)||ArrayBuffer.isView(r)||r instanceof ImageData)return r;if(Array.isArray(r))return r.map(Ns);if(typeof r=="object"){const e=r.$name||"Object";if(e==="Map"){const a=r.entries||[],h=new Map;for(let u=0;u<a.length;u+=2)h.set(Ns(a[u]),Ns(a[u+1]));return h}if(e==="Set"){const a=new Set;for(const h of Object.keys(r))h!=="$name"&&a.add(Ns(r[h]));return a}if(e==="DOMMatrix"){let a;return a=r.is2D?[r.a,r.b,r.c,r.d,r.e,r.f]:[r.m11,r.m12,r.m13,r.m14,r.m21,r.m22,r.m23,r.m24,r.m31,r.m32,r.m33,r.m34,r.m41,r.m42,r.m43,r.m44],new DOMMatrix(a)}if(e==="BigInt")return BigInt(r.value);const{klass:i}=ul[e];if(!i)throw new Error(`Can't deserialize unregistered class "${e}".`);if(i.deserialize)return i.deserialize(r);const s=Object.create(i.prototype);for(const a of Object.keys(r))a!=="$name"&&(s[a]=Ns(r[a]));return s}throw new Error("can't deserialize object of type "+typeof r)}const mt={"Latin-1 Supplement":r=>r>=128&&r<=255,Arabic:r=>r>=1536&&r<=1791,"Arabic Supplement":r=>r>=1872&&r<=1919,"Arabic Extended-A":r=>r>=2208&&r<=2303,"Hangul Jamo":r=>r>=4352&&r<=4607,"Unified Canadian Aboriginal Syllabics":r=>r>=5120&&r<=5759,Khmer:r=>r>=6016&&r<=6143,"Unified Canadian Aboriginal Syllabics Extended":r=>r>=6320&&r<=6399,"General Punctuation":r=>r>=8192&&r<=8303,"Letterlike Symbols":r=>r>=8448&&r<=8527,"Number Forms":r=>r>=8528&&r<=8591,"Miscellaneous Technical":r=>r>=8960&&r<=9215,"Control Pictures":r=>r>=9216&&r<=9279,"Optical Character Recognition":r=>r>=9280&&r<=9311,"Enclosed Alphanumerics":r=>r>=9312&&r<=9471,"Geometric Shapes":r=>r>=9632&&r<=9727,"Miscellaneous Symbols":r=>r>=9728&&r<=9983,"Miscellaneous Symbols and Arrows":r=>r>=11008&&r<=11263,"CJK Radicals Supplement":r=>r>=11904&&r<=12031,"Kangxi Radicals":r=>r>=12032&&r<=12255,"Ideographic Description Characters":r=>r>=12272&&r<=12287,"CJK Symbols and Punctuation":r=>r>=12288&&r<=12351,Hiragana:r=>r>=12352&&r<=12447,Katakana:r=>r>=12448&&r<=12543,Bopomofo:r=>r>=12544&&r<=12591,"Hangul Compatibility Jamo":r=>r>=12592&&r<=12687,Kanbun:r=>r>=12688&&r<=12703,"Bopomofo Extended":r=>r>=12704&&r<=12735,"CJK Strokes":r=>r>=12736&&r<=12783,"Katakana Phonetic Extensions":r=>r>=12784&&r<=12799,"Enclosed CJK Letters and Months":r=>r>=12800&&r<=13055,"CJK Compatibility":r=>r>=13056&&r<=13311,"CJK Unified Ideographs Extension A":r=>r>=13312&&r<=19903,"Yijing Hexagram Symbols":r=>r>=19904&&r<=19967,"CJK Unified Ideographs":r=>r>=19968&&r<=40959,"Yi Syllables":r=>r>=40960&&r<=42127,"Yi Radicals":r=>r>=42128&&r<=42191,"Hangul Jamo Extended-A":r=>r>=43360&&r<=43391,"Hangul Syllables":r=>r>=44032&&r<=55215,"Hangul Jamo Extended-B":r=>r>=55216&&r<=55295,"Private Use Area":r=>r>=57344&&r<=63743,"CJK Compatibility Ideographs":r=>r>=63744&&r<=64255,"Arabic Presentation Forms-A":r=>r>=64336&&r<=65023,"Vertical Forms":r=>r>=65040&&r<=65055,"CJK Compatibility Forms":r=>r>=65072&&r<=65103,"Small Form Variants":r=>r>=65104&&r<=65135,"Arabic Presentation Forms-B":r=>r>=65136&&r<=65279,"Halfwidth and Fullwidth Forms":r=>r>=65280&&r<=65519,Osage:r=>r>=66736&&r<=66815,"CJK Unified Ideographs Extension B":r=>r>=131072&&r<=173791};function qh(r){for(const e of r)if(pl(e.charCodeAt(0)))return!0;return!1}function mf(r){for(const e of r)if(!Id(e.charCodeAt(0)))return!1;return!0}function Id(r){return!(mt.Arabic(r)||mt["Arabic Supplement"](r)||mt["Arabic Extended-A"](r)||mt["Arabic Presentation Forms-A"](r)||mt["Arabic Presentation Forms-B"](r))}function pl(r){return!(r!==746&&r!==747&&(r<4352||!(mt["Bopomofo Extended"](r)||mt.Bopomofo(r)||mt["CJK Compatibility Forms"](r)&&!(r>=65097&&r<=65103)||mt["CJK Compatibility Ideographs"](r)||mt["CJK Compatibility"](r)||mt["CJK Radicals Supplement"](r)||mt["CJK Strokes"](r)||!(!mt["CJK Symbols and Punctuation"](r)||r>=12296&&r<=12305||r>=12308&&r<=12319||r===12336)||mt["CJK Unified Ideographs Extension A"](r)||mt["CJK Unified Ideographs"](r)||mt["Enclosed CJK Letters and Months"](r)||mt["Hangul Compatibility Jamo"](r)||mt["Hangul Jamo Extended-A"](r)||mt["Hangul Jamo Extended-B"](r)||mt["Hangul Jamo"](r)||mt["Hangul Syllables"](r)||mt.Hiragana(r)||mt["Ideographic Description Characters"](r)||mt.Kanbun(r)||mt["Kangxi Radicals"](r)||mt["Katakana Phonetic Extensions"](r)||mt.Katakana(r)&&r!==12540||!(!mt["Halfwidth and Fullwidth Forms"](r)||r===65288||r===65289||r===65293||r>=65306&&r<=65310||r===65339||r===65341||r===65343||r>=65371&&r<=65503||r===65507||r>=65512&&r<=65519)||!(!mt["Small Form Variants"](r)||r>=65112&&r<=65118||r>=65123&&r<=65126)||mt["Unified Canadian Aboriginal Syllabics"](r)||mt["Unified Canadian Aboriginal Syllabics Extended"](r)||mt["Vertical Forms"](r)||mt["Yijing Hexagram Symbols"](r)||mt["Yi Syllables"](r)||mt["Yi Radicals"](r))))}function Ad(r){return!(pl(r)||function(e){return!!(mt["Latin-1 Supplement"](e)&&(e===167||e===169||e===174||e===177||e===188||e===189||e===190||e===215||e===247)||mt["General Punctuation"](e)&&(e===8214||e===8224||e===8225||e===8240||e===8241||e===8251||e===8252||e===8258||e===8263||e===8264||e===8265||e===8273)||mt["Letterlike Symbols"](e)||mt["Number Forms"](e)||mt["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||e===9003||e>=9085&&e<=9114||e>=9150&&e<=9165||e===9167||e>=9169&&e<=9179||e>=9186&&e<=9215)||mt["Control Pictures"](e)&&e!==9251||mt["Optical Character Recognition"](e)||mt["Enclosed Alphanumerics"](e)||mt["Geometric Shapes"](e)||mt["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||mt["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||mt["CJK Symbols and Punctuation"](e)||mt.Katakana(e)||mt["Private Use Area"](e)||mt["CJK Compatibility Forms"](e)||mt["Small Form Variants"](e)||mt["Halfwidth and Fullwidth Forms"](e)||e===8734||e===8756||e===8757||e>=9984&&e<=10087||e>=10102&&e<=10131||e===65532||e===65533)}(r))}function _f(r){return mt.Arabic(r)||mt["Arabic Supplement"](r)||mt["Arabic Extended-A"](r)||mt["Arabic Presentation Forms-A"](r)||mt["Arabic Presentation Forms-B"](r)}function Md(r){return r>=1424&&r<=2303||mt["Arabic Presentation Forms-A"](r)||mt["Arabic Presentation Forms-B"](r)}function gf(r,e){return!(!e&&Md(r)||r>=2304&&r<=3583||r>=3840&&r<=4255||mt.Khmer(r))}function yf(r){for(const e of r)if(Md(e.charCodeAt(0)))return!0;return!1}const Hh="deferred",Wh="loading",Zh="loaded";let Xh=null,oo="unavailable",Vs=null;const An=function(r){r&&typeof r=="string"&&r.indexOf("NetworkError")>-1&&(oo="error"),Xh&&Xh(r)};function Sc(){Ec.fire(new Cs("pluginStateChange",{pluginStatus:oo,pluginURL:Vs}))}const Ec=new pn,pa=function(){return oo},Cd=function(){if(oo!==Hh||!Vs)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");oo=Wh,Sc(),Vs&&Zn({url:Vs},r=>{r?An(r):(oo=Zh,Sc())})},xo={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>oo===Zh||xo.applyArabicShaping!=null,isLoading:()=>oo===Wh,setState(r){oo=r.pluginStatus,Vs=r.pluginURL},isParsed:()=>xo.applyArabicShaping!=null&&xo.processBidirectionalText!=null&&xo.processStyledBidirectionalText!=null,getPluginURL:()=>Vs};class ai{constructor(e,i){this.zoom=e,i?(this.now=i.now,this.fadeDuration=i.fadeDuration,this.transition=i.transition,this.pitch=i.pitch,this.brightness=i.brightness):(this.now=0,this.fadeDuration=0,this.transition={},this.pitch=0,this.brightness=0)}isSupportedScript(e){return function(i,s){for(const a of i)if(!gf(a.charCodeAt(0),s))return!1;return!0}(e,xo.isLoaded())}}class fl{constructor(e,i,s,a){this.property=e,this.value=i,this.expression=function(h,u,f,_){if(xc(h))return new hl(h,u);if(bc(h)||Array.isArray(h)&&h.length>0){const g=cl(h,u,f,_);if(g.result==="error")throw new Error(g.value.map(v=>`${v.key}: ${v.message}`).join(", "));return g.value}{let g=h;return typeof h=="string"&&u.type==="color"&&(g=Jt.parse(h)),{kind:"constant",configDependencies:new Set,evaluate:()=>g}}}(i===void 0?e.specification.default:i,e.specification,s,a)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(e,i,s){return this.property.possiblyEvaluate(this,e,i,s)}}class Us{constructor(e,i,s){this.property=e,this.value=new fl(e,void 0,i,s)}transitioned(e,i){return new zd(this.property,this.value,i,ye({},e.transition,this.transition),e.now)}untransitioned(){return new zd(this.property,this.value,null,{},0)}}class Pd{constructor(e,i,s){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._scope=i,this._options=s,this.configDependencies=new Set}getValue(e){return Ft(this._values[e].value.value)}setValue(e,i){this._values.hasOwnProperty(e)||(this._values[e]=new Us(this._values[e].property,this._scope,this._options)),this._values[e].value=new fl(this._values[e].property,i===null?void 0:Ft(i),this._scope,this._options),this._values[e].value.expression.configDependencies&&(this.configDependencies=new Set([...this.configDependencies,...this._values[e].value.expression.configDependencies]))}setTransitionOrValue(e,i){i&&(this._options=i);const s=this._properties.properties;if(e)for(const a in e){const h=e[a];if(a.endsWith("-transition")){const u=a.slice(0,-11);s[u]&&this.setTransition(u,h)}else s.hasOwnProperty(a)&&this.setValue(a,h)}}getTransition(e){return Ft(this._values[e].transition)}setTransition(e,i){this._values.hasOwnProperty(e)||(this._values[e]=new Us(this._values[e].property)),this._values[e].transition=Ft(i)||void 0}serialize(){const e={};for(const i of Object.keys(this._values)){const s=this.getValue(i);s!==void 0&&(e[i]=s);const a=this.getTransition(i);a!==void 0&&(e[`${i}-transition`]=a)}return e}transitioned(e,i){const s=new Dd(this._properties);for(const a of Object.keys(this._values))s._values[a]=this._values[a].transitioned(e,i._values[a]);return s}untransitioned(){const e=new Dd(this._properties);for(const i of Object.keys(this._values))e._values[i]=this._values[i].untransitioned();return e}}class zd{constructor(e,i,s,a,h){const u=a.delay||0,f=a.duration||0;h=h||0,this.property=e,this.value=i,this.begin=h+u,this.end=this.begin+f,e.specification.transition&&(a.delay||a.duration)&&(this.prior=s)}possiblyEvaluate(e,i,s){const a=e.now||0,h=this.value.possiblyEvaluate(e,i,s),u=this.prior;if(u){if(a>this.end)return this.prior=null,h;if(this.value.isDataDriven())return this.prior=null,h;if(a<this.begin)return u.possiblyEvaluate(e,i,s);{const f=(a-this.begin)/(this.end-this.begin);return this.property.interpolate(u.possiblyEvaluate(e,i,s),h,se(f))}}return h}}class Dd{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,i,s){const a=new Mn(this._properties);for(const h of Object.keys(this._values))a._values[h]=this._values[h].possiblyEvaluate(e,i,s);return a}hasTransition(){for(const e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class xf{constructor(e,i,s){this._properties=e,this._values=Object.create(e.defaultPropertyValues),this._scope=i,this._options=s,this.configDependencies=new Set}getValue(e){return Ft(this._values[e].value)}setValue(e,i){this._values[e]=new fl(this._values[e].property,i===null?void 0:Ft(i),this._scope,this._options),this._values[e].expression.configDependencies&&(this.configDependencies=new Set([...this.configDependencies,...this._values[e].expression.configDependencies]))}serialize(){const e={};for(const i of Object.keys(this._values)){const s=this.getValue(i);s!==void 0&&(e[i]=s)}return e}possiblyEvaluate(e,i,s){const a=new Mn(this._properties);for(const h of Object.keys(this._values))a._values[h]=this._values[h].possiblyEvaluate(e,i,s);return a}}class fa{constructor(e,i,s){this.property=e,this.value=i,this.parameters=s}isConstant(){return this.value.kind==="constant"}constantOr(e){return this.value.kind==="constant"?this.value.value:e}evaluate(e,i,s,a){return this.property.evaluate(this.value,this.parameters,e,i,s,a)}}class Mn{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class qe{constructor(e){this.specification=e}possiblyEvaluate(e,i){return e.expression.evaluate(i)}interpolate(e,i,s){const a=$l[this.specification.type];return a?a(e,i,s):e}}class tt{constructor(e,i){this.specification=e,this.overrides=i}possiblyEvaluate(e,i,s,a){return new fa(this,e.expression.kind==="constant"||e.expression.kind==="camera"?{kind:"constant",value:e.expression.evaluate(i,null,{},s,a)}:e.expression,i)}interpolate(e,i,s){if(e.value.kind!=="constant"||i.value.kind!=="constant")return e;if(e.value.value===void 0||i.value.value===void 0)return new fa(this,{kind:"constant",value:void 0},e.parameters);const a=$l[this.specification.type];return a?new fa(this,{kind:"constant",value:a(e.value.value,i.value.value,s)},e.parameters):e}evaluate(e,i,s,a,h,u){return e.kind==="constant"?e.value:e.evaluate(i,s,a,h,u)}}class Cn{constructor(e){this.specification=e}possiblyEvaluate(e,i,s,a){return!!e.expression.evaluate(i,null,{},s,a)}interpolate(){return!1}}class Xi{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];const i=new ai(0,{});for(const s in e){const a=e[s];a.specification.overridable&&this.overridableProperties.push(s);const h=this.defaultPropertyValues[s]=new fl(a,void 0),u=this.defaultTransitionablePropertyValues[s]=new Us(a);this.defaultTransitioningPropertyValues[s]=u.untransitioned(),this.defaultPossiblyEvaluatedValues[s]=h.possiblyEvaluate(i)}}}it(tt,"DataDrivenProperty"),it(qe,"DataConstantProperty"),it(Cn,"ColorRampProperty");var me=JSON.parse('{"$version":8,"$root":{"version":{"type":"enum","values":[8]},"fragment":{"type":"boolean"},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360},"pitch":{"type":"number","default":0},"light":{"type":"light"},"lights":{"type":"array","value":"light-3d"},"terrain":{"type":"terrain","optional":true},"fog":{"type":"fog"},"snow":{"type":"snow"},"rain":{"type":"rain"},"camera":{"type":"camera"},"color-theme":{"type":"colorTheme"},"indoor":{"type":"indoor"},"imports":{"type":"array","value":"import"},"iconsets":{"type":"iconsets"},"schema":{"type":"schema"},"sources":{"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string","default":"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"type":"array","value":"layer"},"models":{"type":"models"},"featuresets":{"type":"featuresets"}},"featuresets":{"*":{"type":"featureset"}},"featureset":{"metadata":{"type":"*"},"selectors":{"type":"array","value":"selector"}},"selector":{"layer":{"type":"string"},"properties":{"type":"selectorProperty"},"featureNamespace":{"type":"string"},"_uniqueFeatureID":{"type":"boolean"}},"selectorProperty":{"*":{"type":"*"}},"model":{"type":"string"},"import":{"id":{"type":"string"},"url":{"type":"string"},"config":{"type":"config"},"data":{"type":"$root"},"color-theme":{"type":"colorTheme","optional":true}},"config":{"*":{"type":"*"}},"schema":{"*":{"type":"option"}},"option":{"default":{"type":"*","expression":{}},"type":{"type":"enum","values":{"string":1,"number":1,"boolean":1,"color":1}},"array":{"type":"boolean"},"minValue":{"type":"number"},"maxValue":{"type":"number"},"stepValue":{"type":"number"},"values":{"type":"array","value":"*"},"metadata":{"type":"*"}},"models":{"*":{"type":"model"}},"light-3d":{"id":{"type":"string"},"properties":{"type":"properties"},"type":{"type":"enum","values":{"ambient":{},"directional":{},"flat":{}}}},"properties":["properties_light_directional","properties_light_ambient","properties_light_flat"],"properties_light_directional":{"direction":{"type":"array","default":[210,30],"minimum":[0,0],"maximum":[360,90],"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"cast-shadows":{"type":"boolean","default":false},"shadow-quality":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"parameters":["zoom"]}},"shadow-intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_ambient":{"color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_flat":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"iconsets":{"*":{"type":"iconset"}},"iconset":["iconset_sprite","iconset_source"],"iconset_sprite":{"type":{"type":"enum","values":{"sprite":1}},"url":{"type":"string"}},"iconset_source":{"type":{"type":"enum","values":{"source":1}},"source":{"type":"string"}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_raster_array","source_geojson","source_video","source_image","source_model"],"source_vector":{"type":{"type":"enum","values":{"vector":1}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"extra_bounds":{"type":"array","value":{"type":"array","value":"number","length":4}},"scheme":{"type":"enum","values":{"xyz":1,"tms":1},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"type":"enum","values":{"raster":1}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"extra_bounds":{"type":"array","value":{"type":"array","value":"number","length":4}},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512},"scheme":{"type":"enum","values":{"xyz":1,"tms":1},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"type":"enum","values":{"raster-dem":1}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"extra_bounds":{"type":"array","value":{"type":"array","value":"number","length":4}},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":1,"mapbox":1},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_array":{"type":{"type":"enum","values":{"raster-array":1}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"extra_bounds":{"type":"array","value":{"type":"array","value":"number","length":4}},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512},"attribution":{"type":"string"},"rasterLayers":{"type":"*"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_geojson":{"type":{"type":"enum","values":{"geojson":1}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"minzoom":{"type":"number","default":0},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"},"dynamic":{"type":"boolean","default":false}},"source_video":{"type":{"type":"enum","values":{"video":1}},"urls":{"type":"array","value":"string"},"coordinates":{"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"type":"enum","values":{"image":1}},"url":{"type":"string"},"coordinates":{"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_model":{"type":{"type":"enum","values":{"model":1,"batched-model":1}},"maxzoom":{"type":"number","default":18},"minzoom":{"type":"number","default":0},"tiles":{"type":"array","value":"string"}},"layer":{"id":{"type":"string"},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"building":{},"raster":{},"raster-particle":{},"hillshade":{},"model":{},"background":{},"sky":{},"slot":{},"clip":{}}},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"slot":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":24},"maxzoom":{"type":"number","minimum":0,"maximum":24},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"}},"layout":["layout_clip","layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_building","layout_symbol","layout_raster","layout_raster-particle","layout_hillshade","layout_background","layout_sky","layout_model"],"layout_background":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"layout_model":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}},"model-id":{"type":"string","default":"","property-type":"data-driven","expression":{"parameters":["zoom","feature"]}}},"layout_clip":{"clip-layer-types":{"type":"array","value":"enum","values":{"model":1,"symbol":1},"default":[],"expression":{}},"clip-layer-scope":{"type":"array","value":"string","default":[],"expression":{}}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}},"fill-elevation-reference":{"type":"enum","values":{"none":1,"hd-road-base":1,"hd-road-markup":1},"default":"none","expression":{}},"fill-construct-bridge-guard-rail":{"type":"boolean","default":"true","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"circle-elevation-reference":{"type":"enum","values":{"none":1,"hd-road-markup":1},"default":"none","expression":{}},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}},"fill-extrusion-edge-radius":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{}}},"layout_building":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}},"building-roof-shape":{"type":"enum","values":{"flat":1,"hipped":1,"gabled":1,"parapet":1,"mansard":1,"skillion":1,"pyramidal":1},"default":"flat","expression":{"parameters":["feature"]},"property-type":"data-driven"},"building-height":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{},"property-type":"data-driven"},"building-base":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{},"property-type":"data-driven"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":1,"round":1,"square":1},"default":"butt","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":1,"round":1,"miter":1,"none":1},"default":"miter","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"expression":{"interpolated":true,"parameters":["zoom"]}},"line-round-limit":{"type":"number","default":1.05,"expression":{"interpolated":true,"parameters":["zoom"]}},"line-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-z-offset":{"type":"number","default":0,"expression":{"parameters":["zoom","feature","line-progress"]},"property-type":"data-driven"},"line-elevation-reference":{"type":"enum","values":{"none":1,"sea":1,"ground":1,"hd-road-markup":1},"default":"none","expression":{}},"line-cross-slope":{"type":"number","expression":{}},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}},"line-width-unit":{"type":"enum","values":{"pixels":1,"meters":1},"default":"pixels","expression":{"parameters":["zoom"]}}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":1,"line":1,"line-center":1},"default":"point","expression":{"parameters":["zoom"]}},"symbol-spacing":{"type":"number","default":250,"minimum":1,"expression":{"interpolated":true,"parameters":["zoom"]}},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"symbol-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":1,"viewport-y":1,"source":1},"default":"auto","expression":{"parameters":["zoom"]}},"symbol-z-elevate":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"symbol-elevation-reference":{"type":"enum","values":{"sea":1,"ground":1,"hd-road-markup":1},"default":"ground","expression":{"parameters":["zoom"]}},"icon-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"icon-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"icon-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"icon-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]}},"icon-size":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-size-scale-range":{"type":"array","value":"number","length":2,"default":[0.8,2],"minimum":0.1,"maximum":10,"expression":{}},"icon-text-fit":{"type":"enum","values":{"none":1,"width":1,"height":1,"both":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]}},"icon-keep-upright":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]}},"text-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]}},"text-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]}},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size-scale-range":{"type":"array","value":"number","length":2,"default":[0.8,2],"minimum":0.1,"maximum":10,"expression":{}},"text-max-width":{"type":"number","default":10,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":1,"left":1,"center":1,"right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","default":0,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"expression":{"parameters":["zoom"]}},"text-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"expression":{"interpolated":true,"parameters":["zoom"]}},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":1,"vertical":1},"expression":{"parameters":["zoom"]}},"text-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]}},"text-keep-upright":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"text-transform":{"type":"enum","values":{"none":1,"uppercase":1,"lowercase":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"text-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"text-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]}},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"layout_raster-particle":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{}}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_hillshade":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_raster":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_raster-particle":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_clip":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_model":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_building":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":1,"!=":1,">":1,">=":1,"<":1,"<=":1,"in":1,"!in":1,"all":1,"any":1,"none":1,"has":1,"!has":1}},"geometry_type":{"type":"enum","values":{"Point":1,"LineString":1,"Polygon":1}},"function":{"expression":{"type":"expression"},"stops":{"type":"array","value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":{"identity":1,"exponential":1,"interval":1,"categorical":1},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":1,"lab":1,"hcl":1},"default":"rgb"},"default":{"type":"*"}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"high-color":{"type":"color","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"space-color":{"type":"color","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"horizon-blend":{"type":"number","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"star-intensity":{"type":"number","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vertical-range":{"type":"array","default":[0,0],"minimum":0,"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}}},"snow":{"density":{"type":"number","default":["interpolate",["linear"],["zoom"],11,0,13,0.85],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette":{"type":"number","default":["interpolate",["linear"],["zoom"],11,0,13,0.3],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette-color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"center-thinning":{"type":"number","default":0.4,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"direction":{"type":"array","default":[0,50],"minimum":0,"maximum":360,"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"flake-size":{"type":"number","default":0.71,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true}},"rain":{"density":{"type":"number","default":["interpolate",["linear"],["zoom"],11,0,13,0.5],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"color":{"type":"color","default":["interpolate",["linear"],["measure-light","brightness"],0,"#03113d",0.3,"#a8adbc"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"opacity":{"type":"number","default":["interpolate",["linear"],["measure-light","brightness"],0,0.88,1,0.7],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette":{"type":"number","default":["interpolate",["linear"],["zoom"],11,0,13,1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette-color":{"type":"color","default":["interpolate",["linear"],["measure-light","brightness"],0,"#001736",0.3,"#464646"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"center-thinning":{"type":"number","default":0.57,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"direction":{"type":"array","default":[0,80],"minimum":0,"maximum":360,"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"droplet-size":{"type":"array","default":[2.6,18.2],"minimum":0,"maximum":50,"length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"distortion-strength":{"type":"number","default":0.7,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true}},"camera":{"camera-projection":{"type":"enum","values":{"perspective":1,"orthographic":1},"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"default":"perspective"}},"colorTheme":{"data":{"type":"string","expression":{}}},"indoor":{"floorplanFeaturesetId":{"type":"string","expression":{}},"buildingFeaturesetId":{"type":"string","expression":{}}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":1,"equalEarth":1,"equirectangular":1,"lambertConformalConic":1,"mercator":1,"naturalEarth":1,"winkelTripel":1,"globe":1},"default":"mercator"},"center":{"type":"array","length":2,"value":"number","minimum":[-180,-90],"maximum":[180,90]},"parallels":{"type":"array","length":2,"value":"number","minimum":[-90,-90],"maximum":[90,90]}},"terrain":{"source":{"type":"string"},"exaggeration":{"type":"number","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_building","paint_symbol","paint_raster","paint_raster-particle","paint_hillshade","paint_background","paint_sky","paint_model"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"fill-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-pattern-cross-fade":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"transition":true},"fill-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-z-offset":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-bridge-guard-rail-color":{"type":"color","default":"rgba(241, 236, 225, 255)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature"]},"property-type":"data-driven"},"fill-tunnel-structure-color":{"type":"color","default":"rgba(241, 236, 225, 255)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"fill-extrusion-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-pattern-cross-fade":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"transition":true},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-height-alignment":{"type":"enum","values":{"terrain":1,"flat":1},"default":"flat"},"fill-extrusion-base-alignment":{"type":"enum","values":{"terrain":1,"flat":1},"default":"terrain"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"fill-extrusion-ambient-occlusion-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-wall-radius":{"type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-radius":{"type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-attenuation":{"type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-flood-light-color":{"type":"color","default":"#ffffff","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-wall-radius":{"property-type":"data-driven","type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-radius":{"property-type":"data-driven","type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-attenuation":{"type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-vertical-scale":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-rounded-roof":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"fill-extrusion-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{}},"fill-extrusion-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature-state"]},"property-type":"data-driven"},"fill-extrusion-line-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-extrusion-cast-shadows":{"type":"boolean","default":true}},"paint_building":{"building-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"building-ambient-occlusion-wall-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"building-ambient-occlusion-ground-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"building-ambient-occlusion-ground-radius":{"type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"building-ambient-occlusion-ground-attenuation":{"type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"building-vertical-scale":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"building-cast-shadows":{"type":"boolean","default":true},"building-color":{"type":"color","default":"rgba(193, 154, 127, 1)","expression":{"interpolated":true,"parameters":["feature","feature-state"]},"property-type":"data-driven"},"building-emissive-strength":{"type":"number","default":0,"minimum":0,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"property-type":"data-driven"}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"line-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light","line-progress"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern-cross-fade":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"transition":true},"line-gradient":{"type":"color","expression":{"interpolated":true,"parameters":["line-progress"]}},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1]},"line-trim-fade-range":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"line-trim-color":{"type":"color","default":"transparent","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"line-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"line-border-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-border-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-occlusion-opacity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"circle-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"circle-pitch-scale":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"circle-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]}},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"expression":{"interpolated":true,"parameters":["heatmap-density"]}},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-occlusion-opacity":{"type":"number","minimum":0,"maximum":1,"default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature-state"]},"property-type":"data-driven"},"text-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"icon-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"icon-image-cross-fade":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"transition":true},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-occlusion-opacity":{"type":"number","minimum":0,"maximum":1,"default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"text-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]}},"icon-color-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"expression":{}},"icon-color-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"expression":{}},"icon-color-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{}},"icon-color-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{}},"symbol-z-offset":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-color":{"type":"color","expression":{"interpolated":true,"parameters":["raster-value"]}},"raster-color-mix":{"type":"array","default":[0.2126,0.7152,0.0722,0],"length":4,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-color-range":{"type":"array","length":2,"value":"number","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-resampling":{"type":"enum","values":{"linear":1,"nearest":1},"default":"linear","expression":{"parameters":["zoom"]}},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"raster-array-band":{"type":"string"},"raster-elevation":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}}},"paint_raster-particle":{"raster-particle-array-band":{"type":"string"},"raster-particle-count":{"type":"number","default":512,"minimum":1},"raster-particle-color":{"type":"color","expression":{"interpolated":true,"parameters":["raster-particle-speed"]}},"raster-particle-max-speed":{"type":"number","default":1,"minimum":1},"raster-particle-speed-factor":{"type":"number","default":0.2,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-particle-fade-opacity-factor":{"type":"number","default":0.98,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-particle-reset-rate-factor":{"type":"number","default":0.8,"minimum":0,"maximum":1},"raster-particle-elevation":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"expression":{"interpolated":true,"parameters":["zoom"]}},"hillshade-illumination-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]}},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"hillshade-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}}},"paint_background":{"background-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":[]}},"background-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"background-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom"]}},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"background-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":1,"atmosphere":1},"default":"atmosphere","expression":{"parameters":["zoom"]}},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]}},"sky-atmosphere-sun-intensity":{"type":"number","default":10,"minimum":0,"maximum":100},"sky-gradient-center":{"type":"array","value":"number","default":[0,0],"length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]}},"sky-gradient-radius":{"type":"number","default":90,"minimum":0,"maximum":180,"expression":{"parameters":["zoom"]}},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]}},"sky-atmosphere-halo-color":{"type":"color","default":"white"},"sky-atmosphere-color":{"type":"color","default":"white"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}}},"paint_model":{"model-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"property-type":"data-driven"},"model-rotation":{"type":"array","value":"number","length":3,"default":[0,0,0],"period":360,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-scale":{"type":"array","value":"number","length":3,"default":[1,1,1],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-translation":{"type":"array","value":"number","length":3,"default":[0,0,0],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-color":{"type":"color","default":"#ffffff","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light","zoom"]},"transition":true},"model-color-mix-intensity":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-type":{"type":"enum","values":{"common-3d":1,"location-indicator":1},"default":"common-3d"},"model-cast-shadows":{"type":"boolean","default":true},"model-receive-shadows":{"type":"boolean","default":true},"model-ambient-occlusion-intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"model-emissive-strength":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-roughness":{"type":"number","default":1,"minimum":0,"maximum":1,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state"]},"transition":true},"model-height-based-emissive-strength-multiplier":{"type":"array","default":[1,1,1,1,0],"length":5,"value":"number","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{}},"model-front-cutoff":{"type":"array","value":"number","expression":{"interpolated":true,"parameters":["zoom"]},"length":3,"default":[0,0,1],"minimum":[0,0,0],"maximum":[1,1,1]}},"transition":{"duration":{"type":"number","default":300,"minimum":0},"delay":{"type":"number","default":0,"minimum":0}},"promoteId":{"*":{"type":"*"}}}');function Co(r){return r instanceof Number||r instanceof String||r instanceof Boolean?r.valueOf():r}function Ic(r){if(Array.isArray(r))return r.map(Ic);if(r instanceof Object&&!(r instanceof Number||r instanceof String||r instanceof Boolean)){const e={};for(const i in r)e[i]=Ic(r[i]);return e}return Co(r)}function Ac(r){if(r===!0||r===!1)return!0;if(!Array.isArray(r)||r.length===0)return!1;switch(r[0]){case"has":return r.length>=2&&r[1]!=="$id"&&r[1]!=="$type";case"in":return r.length>=3&&(typeof r[1]!="string"||Array.isArray(r[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return r.length!==3||Array.isArray(r[1])||Array.isArray(r[2]);case"any":case"all":for(const e of r.slice(1))if(!Ac(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function $h(r,e="",i=null,s="fill"){if(r==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};Ac(r)||(r=Mc(r));const a=r;let h=!0;try{h=function(v){if(!ma(v))return v;let b=Ic(v);return Ld(b),b=Rd(b),b}(a)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
|
|
2
2
|
This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md
|
|
3
3
|
and paste the contents of this message in the report.
|
|
4
4
|
Thank you!
|
|
@@ -2658,4 +2658,4 @@ ${c.vertexSource}`,this.forceManualRenderingForInstanceIDShaders&&(C=C.replaceAl
|
|
|
2658
2658
|
translate(${o.x}px,${o.y}px)
|
|
2659
2659
|
`}_calculateXYTransform(){const t=this._pos,o=this._map,c=this.getPitchAlignment();if(!o||!t||c!=="map")return"";if(!o._showingGlobe()){const x=o.getPitch();return x?`rotateX(${x}deg)`:""}const d=n.cJ(n.eL(o.transform,this._lngLat)),p=t.sub(n.eM(o.transform)),m=Math.abs(p.x)+Math.abs(p.y);if(m===0)return"";const y=d/m;return`rotateX(${-p.y*y}deg) rotateY(${p.x*y}deg)`}_calculateZTransform(){const t=this._pos,o=this._map;if(!o||!t)return"";let c=0;const d=this.getRotationAlignment();if(d==="map")if(o._showingGlobe()){const p=o.project(new n.cd(this._lngLat.lng,this._lngLat.lat+.001),this._altitude),m=o.project(new n.cd(this._lngLat.lng,this._lngLat.lat-.001),this._altitude).sub(p);c=n.cJ(Math.atan2(m.y,m.x))-90}else c=-o.getBearing();else if(d==="horizon"){const p=n.af(4,6,o.getZoom()),m=n.eM(o.transform);m.y+=p*o.transform.height;const y=t.sub(m),x=n.cJ(Math.atan2(y.y,y.x));c=(x>90?x-270:x+90)*(1-p)}return c+=this._rotation,c?`rotateZ(${c}deg)`:""}_update(t){cancelAnimationFrame(this._updateFrameId);const o=this._map;o&&(o.transform.renderWorldCopies&&(this._lngLat=Kd(this._lngLat,this._pos,o.transform)),this._pos=o.project(this._lngLat,this._altitude),t===!0?this._updateFrameId=requestAnimationFrame(()=>{this._element&&this._pos&&this._anchor&&(this._pos=this._pos.round(),this._updateDOM())}):this._pos=this._pos.round(),o._requestDomTask(()=>{this._map&&(this._element&&this._pos&&this._anchor&&this._updateDOM(),(o._showingGlobe()||o.getTerrain()||o.getFog())&&!this._fadeTimer&&(this._fadeTimer=window.setTimeout(this._evaluateOpacity.bind(this),60)))}))}getOffset(){return this._offset}setOffset(t){return this._offset=n.P.convert(t),this._update(),this}addClassName(t){return this._element.classList.add(t),this}removeClassName(t){return this._element.classList.remove(t),this}toggleClassName(t){return this._element.classList.toggle(t)}_onMove(t){const o=this._map;if(!o)return;const c=this._pointerdownPos,d=this._positionDelta;if(c&&d){if(!this._isDragging){const p=this._clickTolerance||o._clickTolerance;if(t.point.dist(c)<p)return;this._isDragging=!0}this._pos=t.point.sub(d),this._lngLat=o.unproject(this._pos,this._altitude),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new n.A("dragstart"))),this.fire(new n.A("drag"))}}_onUp(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1;const t=this._map;t&&(t.off("mousemove",this._onMove),t.off("touchmove",this._onMove)),this._state==="active"&&this.fire(new n.A("dragend")),this._state="inactive"}_addDragHandler(t){const o=this._map,c=this._pos;o&&c&&this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(c),this._pointerdownPos=t.point,this._state="pending",o.on("mousemove",this._onMove),o.on("touchmove",this._onMove),o.once("mouseup",this._onUp),o.once("touchend",this._onUp))}setDraggable(t){this._draggable=!!t;const o=this._map;return o&&(t?(o.on("mousedown",this._addDragHandler),o.on("touchstart",this._addDragHandler)):(o.off("mousedown",this._addDragHandler),o.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(t){return this._rotation=t||vo.rotation,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(t){return this._rotationAlignment=t||vo.rotationAlignment,this._update(),this}getRotationAlignment(){return this._rotationAlignment==="auto"||this._rotationAlignment==="horizon"&&this._map&&!this._map._showingGlobe()?"viewport":this._rotationAlignment}setPitchAlignment(t){return this._pitchAlignment=t||vo.pitchAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment==="auto"?this.getRotationAlignment():this._pitchAlignment}setOccludedOpacity(t){return this._occludedOpacity=t||vo.occludedOpacity,this._update(),this}getOccludedOpacity(){return this._occludedOpacity}}const El={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0,showUserHeading:!1},wa={maxWidth:100,unit:"metric"},ps={kilometer:"km",meter:"m",mile:"mi",foot:"ft","nautical-mile":"nm"},zo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",altitude:0},Do=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Hs(l=new n.P(0,0),t="bottom"){if(typeof l=="number"){const o=Math.round(Math.sqrt(.5*Math.pow(l,2)));switch(t){case"top":return new n.P(0,l);case"top-left":return new n.P(o,o);case"top-right":return new n.P(-o,o);case"bottom":return new n.P(0,-l);case"bottom-left":return new n.P(o,-o);case"bottom-right":return new n.P(-o,-o);case"left":return new n.P(l,0);case"right":return new n.P(-l,0)}return new n.P(0,0)}return l instanceof n.P||Array.isArray(l)?n.P.convert(l):n.P.convert(l[t]||[0,0])}return{version:Rr,supported:Js.supported,setRTLTextPlugin:n.eN,getRTLTextPluginStatus:n.eO,Map:class extends $d{constructor(l){Yo.mark(qi.create);const t=l;if((l=n.l({},Yd,l)).minZoom!=null&&l.maxZoom!=null&&l.minZoom>l.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(l.minPitch!=null&&l.maxPitch!=null&&l.minPitch>l.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(l.minPitch!=null&&l.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(l.maxPitch!=null&&l.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(l.antialias&&n.eI(window)&&(l.antialias=!1,n.w("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new gn(l.minZoom,l.maxZoom,l.minPitch,l.maxPitch,l.renderWorldCopies,null,null),l),this._repaint=!!l.repaint,this._interactive=l.interactive,this._minTileCacheSize=l.minTileCacheSize,this._maxTileCacheSize=l.maxTileCacheSize,this._failIfMajorPerformanceCaveat=l.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=l.preserveDrawingBuffer,this._antialias=l.antialias,this._trackResize=l.trackResize,this._bearingSnap=l.bearingSnap,this._refreshExpiredTiles=l.refreshExpiredTiles,this._fadeDuration=l.fadeDuration,this._isInitialLoad=!0,this._crossSourceCollisions=l.crossSourceCollisions,this._collectResourceTiming=l.collectResourceTiming,this._language=this._parseLanguage(l.language),this._worldview=l.worldview,this._renderTaskQueue=new Zo,this._domRenderTaskQueue=new Zo,this._controls=[],this._markers=[],this._popups=[],this._mapId=n.a$(),this._locale=n.l({},tr,l.locale),this._clickTolerance=l.clickTolerance,this._cooperativeGestures=l.cooperativeGestures,this._performanceMetricsCollection=l.performanceMetricsCollection,this._tessellationStep=l.tessellationStep,this._containerWidth=0,this._containerHeight=0,this._showParseStatus=!0,this._precompilePrograms=l.precompilePrograms,this._scaleFactorChanged=!1,this._averageElevationLastSampledAt=-1/0,this._averageElevationExaggeration=0,this._averageElevation=new Bc(0),this._interactionRange=[1/0,-1/0],this._visibilityHidden=0,this._useExplicitProjection=!1,this._frameId=0,this._scaleFactor=l.scaleFactor,this._requestManager=new Vi(l.transformRequest,l.accessToken,l.testMode),this._silenceAuthErrors=!!l.testMode,this._contextCreateOptions=l.contextCreateOptions?Object.assign({},l.contextCreateOptions):{},typeof l.container=="string"){const o=document.getElementById(l.container);if(!o)throw new Error(`Container '${l.container.toString()}' not found.`);this._container=o}else{if(!(l.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=l.container}if(this._container.childNodes.length>0&&n.w("The map container element should be empty, otherwise the map's interactivity will be negatively impacted. If you want to display a message when WebGL is not supported, use the Mapbox GL Supported plugin instead."),l.maxBounds&&this.setMaxBounds(l.maxBounds),this._spriteFormat=l.spriteFormat,n.aV(["_onWindowOnline","_onWindowResize","_onVisibilityChange","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._tp||(this._tp=new Yh),this._tp.registerParameter(this,["Debug"],"showOverdrawInspector"),this._tp.registerParameter(this,["Debug"],"showTileBoundaries"),this._tp.registerParameter(this,["Debug"],"showParseStatus"),this._tp.registerParameter(this,["Debug"],"repaint"),this._tp.registerParameter(this,["Debug"],"showTileAABBs"),this._tp.registerParameter(this,["Debug"],"showPadding"),this._tp.registerParameter(this,["Debug"],"showCollisionBoxes",{noSave:!0}),this._tp.registerParameter(this.transform,["Debug"],"freezeTileCoverage",{noSave:!0},()=>{this._update()}),this._tp.registerParameter(this,["Debug","Wireframe"],"showTerrainWireframe"),this._tp.registerParameter(this,["Debug","Wireframe"],"showLayers2DWireframe"),this._tp.registerParameter(this,["Debug","Wireframe"],"showLayers3DWireframe"),this._tp.registerParameter(this,["Scaling"],"_scaleFactor",{min:.1,max:10,step:.1},()=>{this.setScaleFactor(this._scaleFactor)}),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");if(this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this._fullscreenchangeEvent="onfullscreenchange"in document?"fullscreenchange":"webkitfullscreenchange",window.addEventListener("online",this._onWindowOnline,!1),window.addEventListener("resize",this._onWindowResize,!1),window.addEventListener("orientationchange",this._onWindowResize,!1),window.addEventListener(this._fullscreenchangeEvent,this._onWindowResize,!1),window.addEventListener("visibilitychange",this._onVisibilityChange,!1),this.handlers=new If(this,l),this._localFontFamily=l.localFontFamily,this._localIdeographFontFamily=l.localIdeographFontFamily,(l.style||!l.testMode)&&this.setStyle(l.style||n.e.DEFAULT_STYLE,{config:l.config,localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),l.projection&&this.setProjection(l.projection),this.indoor=new id(this),l.hash&&(this._hash=new _a(typeof l.hash=="string"&&l.hash||void 0).addTo(this)),!this._hash||!this._hash._onHashChange()){t.center==null&&t.zoom==null||(this.transform._unmodified=!1),this.jumpTo({center:l.center,zoom:l.zoom,bearing:l.bearing,pitch:l.pitch});const o=l.bounds;o&&(this.resize(),this.fitBounds(o,n.l({},l.fitBoundsOptions,{duration:0})))}this.resize(),l.attributionControl&&this.addControl(new Fc({customAttribution:l.customAttribution})),this._logoControl=new bl,this.addControl(this._logoControl,l.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this._postStyleLoadEvent()}),this.on("data",o=>{this._update(o.dataType==="style"),this.fire(new n.A(`${o.dataType}data`,o))}),this.on("dataloading",o=>{this.fire(new n.A(`${o.dataType}dataloading`,o))}),this._interactions=new wl(this)}_getMapId(){return this._mapId}addControl(l,t){if(t===void 0&&(t=l.getDefaultPosition?l.getDefaultPosition():"top-right"),!l||!l.onAdd)return this.fire(new n.z(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const o=l.onAdd(this);this._controls.push(l);const c=this._controlPositions[t];return t.indexOf("bottom")!==-1?c.insertBefore(o,c.firstChild):c.appendChild(o),this}removeControl(l){if(!l||!l.onRemove)return this.fire(new n.z(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const t=this._controls.indexOf(l);return t>-1&&this._controls.splice(t,1),l.onRemove(this),this}hasControl(l){return this._controls.indexOf(l)>-1}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}resize(l){if(this._updateContainerDimensions(),this._containerWidth===this.transform.width&&this._containerHeight===this.transform.height)return this;this._resizeCanvas(this._containerWidth,this._containerHeight),this.transform.resize(this._containerWidth,this._containerHeight),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight));const t=!this._moving;return t&&this.fire(new n.A("movestart",l)).fire(new n.A("move",l)),this.fire(new n.A("resize",l)),t&&this.fire(new n.A("moveend",l)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(l){return this.transform.setMaxBounds(n.aG.convert(l)),this._update()}setMinZoom(l){if((l=l??-2)>=-2&&l<=this.transform.maxZoom)return this.transform.minZoom=l,this._update(),this.getZoom()<l?this.setZoom(l):this.fire(new n.A("zoomstart")).fire(new n.A("zoom")).fire(new n.A("zoomend")),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(l){if((l=l??22)>=this.transform.minZoom)return this.transform.maxZoom=l,this._update(),this.getZoom()>l?this.setZoom(l):this.fire(new n.A("zoomstart")).fire(new n.A("zoom")).fire(new n.A("zoomend")),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(l){if((l=l??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(l>=0&&l<=this.transform.maxPitch)return this.transform.minPitch=l,this._update(),this.getPitch()<l?this.setPitch(l):this.fire(new n.A("pitchstart")).fire(new n.A("pitch")).fire(new n.A("pitchend")),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(l){if((l=l??85)>85)throw new Error("maxPitch must be less than or equal to 85");if(l>=this.transform.minPitch)return this.transform.maxPitch=l,this._update(),this.getPitch()>l?this.setPitch(l):this.fire(new n.A("pitchstart")).fire(new n.A("pitch")).fire(new n.A("pitchend")),this;throw new Error("maxPitch must be greater than or equal to minPitch")}getMaxPitch(){return this.transform.maxPitch}getScaleFactor(){return this._scaleFactor}setScaleFactor(l){return this._scaleFactor=l,this.painter.scaleFactor=l,this._tp.refreshUI(),this._scaleFactorChanged=!0,this.style._updateFilteredLayers(t=>t.type==="symbol"),this._update(!0),this}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(l){return this.transform.renderWorldCopies=l,this.transform.renderWorldCopies||this._forceMarkerAndPopupUpdate(!0),this._update()}getLanguage(){return this._language}_parseLanguage(l){return l==="auto"?navigator.language:Array.isArray(l)?l.length===0?void 0:l.map(t=>t==="auto"?navigator.language:t):l}setLanguage(l){const t=this._parseLanguage(l);if(!this.style||t===this._language)return this;this._language=t,this.style.reloadSources();for(const o of this._controls)o._setLanguage&&o._setLanguage(this._language);return this}getWorldview(){return this._worldview}setWorldview(l){return this.style&&l!==this._worldview?(this._worldview=l,this.style.reloadSources(),this):this}getProjection(){return this.transform.mercatorFromTransition?{name:"globe",center:[0,0]}:this.transform.getProjection()}_showingGlobe(){return this.transform.projection.name==="globe"}setProjection(l){return this._lazyInitEmptyStyle(),l?typeof l=="string"&&(l={name:l}):l=null,this._useExplicitProjection=!!l,this._prioritizeAndUpdateProjection(l,this.style.projection)}_updateProjectionTransition(){if(this.getProjection().name!=="globe")return;const l=this.transform,t=l.projection.name;let o;t==="globe"&&l.zoom>=n.cx?(l.setMercatorFromTransition(),o=!0):t==="mercator"&&l.zoom<n.cx&&(l.setProjection({name:"globe"}),o=!0),o&&(this.style.applyProjectionUpdate(),this.style._forceSymbolLayerUpdate())}_prioritizeAndUpdateProjection(l,t){return this._updateProjection(l||t||{name:"mercator"})}_updateProjection(l){let t;return t=l.name==="globe"&&this.transform.zoom>=n.cx?this.transform.setMercatorFromTransition():this.transform.setProjection(l),this.style.applyProjectionUpdate(),t&&(this.painter.clearBackgroundTiles(),this.style.clearSources(),this._update(!0),this._forceMarkerAndPopupUpdate(!0)),this}project(l,t){return this.transform.locationPoint3D(n.cd.convert(l),t)}unproject(l,t){return this.transform.pointLocation3D(n.P.convert(l),t)}isMoving(){return this._moving||this.handlers&&this.handlers.isMoving()||!1}isZooming(){return this._zooming||this.handlers&&this.handlers.isZooming()||!1}isRotating(){return this._rotating||this.handlers&&this.handlers.isRotating()||!1}_isDragging(){return this.handlers&&this.handlers._isDragging()||!1}_createDelegatedListener(l,t,o){const c=d=>{let p=[];if(Array.isArray(t)){const m=t.filter(y=>this.getLayer(y));p=m.length?this.queryRenderedFeatures(d,{layers:m}):[]}else p=this.queryRenderedFeatures(d,{target:t});return p};if(l==="mouseenter"||l==="mouseover"){let d=!1;return{listener:o,targets:t,delegates:{mousemove:p=>{const m=c(p.point);m.length?d||(d=!0,o.call(this,new Qr(l,this,p.originalEvent,{features:m}))):d=!1},mouseout:()=>{d=!1}}}}if(l==="mouseleave"||l==="mouseout"){let d=!1;return{listener:o,targets:t,delegates:{mousemove:p=>{c(p.point).length?d=!0:d&&(d=!1,o.call(this,new Qr(l,this,p.originalEvent)))},mouseout:p=>{d&&(d=!1,o.call(this,new Qr(l,this,p.originalEvent)))}}}}{const d=p=>{const m=c(p.point);m.length&&(p.features=m,o.call(this,p),delete p.features)};return{listener:o,targets:t,delegates:{[l]:d}}}}on(l,t,o){if(typeof t=="function"||o===void 0)return super.on(l,t);if(typeof t=="string"&&(t=[t]),!this._areTargetsValid(t))return this;const c=this._createDelegatedListener(l,t,o);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[l]=this._delegatedListeners[l]||[],this._delegatedListeners[l].push(c);for(const d in c.delegates)this.on(d,c.delegates[d]);return this}once(l,t,o){if(typeof t=="function"||o===void 0)return super.once(l,t);if(typeof t=="string"&&(t=[t]),!this._areTargetsValid(t))return this;const c=this._createDelegatedListener(l,t,o);for(const d in c.delegates)this.once(d,c.delegates[d]);return this}off(l,t,o){if(typeof t=="function"||o===void 0)return super.off(l,t);if(typeof t=="string"&&(t=[t]),!this._areTargetsValid(t))return this;const c=this._delegatedListeners?this._delegatedListeners[l]:void 0;return c&&(d=>{for(let p=0;p<d.length;p++){const m=d[p];if(m.listener===o&&Nc(m.targets,t)){for(const y in m.delegates)this.off(y,m.delegates[y]);return d.splice(p,1),this}}})(c),this}queryRenderedFeatures(l,t){if(!this.style)return[];if(l===void 0||l instanceof n.P||Array.isArray(l)||t!==void 0||(t=l,l=void 0),l=l||[[0,0],[this.transform.width,this.transform.height]],!t){const p=this.style.queryRenderedFeatures(l,void 0,this.transform),m=this.style.queryRenderedFeatureset(l,void 0,this.transform);return p.concat(m)}let o=!0;if(t.target&&(o=this._isTargetValid(t.target),o&&!t.layers))return this.style.queryRenderedFeatureset(l,t,this.transform);let c=!0;if(t.layers&&Array.isArray(t.layers)){for(const p of t.layers)if(!this._isValidId(p)){c=!1;break}if(c&&!t.target)return this.style.queryRenderedFeatures(l,t,this.transform)}let d=[];return c&&(d=d.concat(this.style.queryRenderedFeatures(l,t,this.transform))),o&&(d=d.concat(this.style.queryRenderedFeatureset(l,t,this.transform))),d}querySourceFeatures(l,t){return!l||typeof l=="string"&&!this._isValidId(l)?[]:this.style.querySourceFeatures(l,t)}isPointOnSurface(l){const{name:t}=this.transform.projection;return t!=="globe"&&t!=="mercator"&&n.w(`${t} projection does not support isPointOnSurface, this API may behave unexpectedly.`),this.transform.isPointOnSurface(n.P.convert(l))}addInteraction(l,t){return this._interactions.add(l,t),this}removeInteraction(l){return this._interactions.remove(l),this}getCooperativeGestures(){return this._cooperativeGestures}setCooperativeGestures(l){return this._cooperativeGestures=l,this}setStyle(l,t){return t=n.l({},{localIdeographFontFamily:this._localIdeographFontFamily,localFontFamily:this._localFontFamily},t),this.style&&l&&t.diff!==!1&&t.localFontFamily===this._localFontFamily&&t.localIdeographFontFamily===this._localIdeographFontFamily&&!t.config?(this.style._diffStyle(l,(o,c)=>{if(o){const d=typeof o=="string"?o:o instanceof Error?o.message:o.error;n.w(`Unable to perform style diff: ${d}. Rebuilding the style from scratch.`),this._updateStyle(l,t)}else c&&this._update(!0)},()=>this._postStyleLoadEvent()),this):(this._localIdeographFontFamily=t.localIdeographFontFamily,this._localFontFamily=t.localFontFamily,this._updateStyle(l,t))}_getUIString(l){const t=this._locale[l];if(t==null)throw new Error(`Missing UI string '${l}'`);return t}_updateStyle(l,t){if(this.style&&(this.style.setEventedParent(null),this.style._remove(),this.style=void 0),l){const o=n.l({},t);t&&t.config&&(o.initialConfig=t.config,delete o.config),this.style=new go(this,o).load(l),this.style.setEventedParent(this,{style:this.style})}return this._updateTerrain(),this}_lazyInitEmptyStyle(){this.style||(this.style=new go(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():(n.w("There is no style added to the map."),!1)}_isValidId(l){return l==null?(this.fire(new n.z(new Error("IDs can't be empty."))),!1):!n.d9(l)||(this.fire(new n.z(new Error(`IDs can't contain special symbols: "${l}".`))),!1)}_isTargetValid(l){return"featuresetId"in l?this._isValidId("importId"in l?l.importId:l.featuresetId):"layerId"in l&&this._isValidId(l.layerId)}_areTargetsValid(l){if(Array.isArray(l)){for(const t of l)if(!this._isValidId(t))return!1;return!0}return this._isTargetValid(l)}addSource(l,t){return this._isValidId(l)?(this._lazyInitEmptyStyle(),this.style.addSource(l,t),this._update(!0)):this}isSourceLoaded(l){return!!this._isValidId(l)&&!!this.style&&this.style._isSourceCacheLoaded(l)}areTilesLoaded(){return this.style.areTilesLoaded()}addSourceType(l,t,o){this._lazyInitEmptyStyle(),this.style.addSourceType(l,t,o)}removeSource(l){return this._isValidId(l)?(this.style.removeSource(l),this._updateTerrain(),this._update(!0)):this}getSource(l){return this._isValidId(l)?this.style.getOwnSource(l):null}addImage(l,t,{pixelRatio:o=1,sdf:c=!1,stretchX:d,stretchY:p,content:m}={}){this._lazyInitEmptyStyle();const y=n.I.from(l);if(t instanceof HTMLImageElement||ImageBitmap&&t instanceof ImageBitmap){const{width:x,height:w,data:S}=n.q.getImageData(t);this.style.addImage(y,{data:new n.r({width:x,height:w},S),pixelRatio:o,stretchX:d,stretchY:p,content:m,sdf:c,version:0,usvg:!1})}else if(t.width===void 0||t.height===void 0)this.fire(new n.z(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));else{const{width:x,height:w}=t,S=t;this.style.addImage(y,{data:new n.r({width:x,height:w},new Uint8Array(S.data)),pixelRatio:o,stretchX:d,stretchY:p,content:m,sdf:c,usvg:!1,version:0,userImage:S}),S.onAdd&&S.onAdd(this,l)}}updateImage(l,t){this._lazyInitEmptyStyle();const o=n.I.from(l),c=this.style.getImage(o);if(!c)return void this.fire(new n.z(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const d=t instanceof HTMLImageElement||ImageBitmap&&t instanceof ImageBitmap?n.q.getImageData(t):t,{width:p,height:m,data:y}=d;if(p===void 0||m===void 0)return void this.fire(new n.z(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(p!==(c.usvg?c.icon.usvg_tree.width:c.data.width)||m!==(c.usvg?c.icon.usvg_tree.height:c.data.height))return void this.fire(new n.z(new Error(`The width and height of the updated image (${p}, ${m})
|
|
2660
2660
|
must be that same as the previous version of the image
|
|
2661
|
-
(${c.data.width}, ${c.data.height})`)));const x=!(t instanceof HTMLImageElement||ImageBitmap&&t instanceof ImageBitmap);let w=!1;c.usvg?(c.data=new n.r({width:p,height:m},new Uint8Array(y)),c.usvg=!1,c.icon=void 0,w=!0):c.data.replace(y,x),this.style.updateImage(o,c,w)}hasImage(l){return l?!!this.style&&!!this.style.getImage(n.I.from(l)):(this.fire(new n.z(new Error("Missing required image id"))),!1)}removeImage(l){this.style.removeImage(n.I.from(l))}loadImage(l,t){n.o(this._requestManager.transformRequest(l,n.R.Image),(o,c)=>{t(o,c instanceof HTMLImageElement?n.q.getImageData(c):c)})}listImages(){return this.style.listImages().map(l=>l.name)}addModel(l,t){this._lazyInitEmptyStyle(),this.style.addModel(l,t)}hasModel(l){return l?this.style.hasModel(l):(this.fire(new n.z(new Error("Missing required model id"))),!1)}removeModel(l){this.style.removeModel(l)}listModels(){return this.style.listModels()}addLayer(l,t){return this._isValidId(l.id)?(this._lazyInitEmptyStyle(),this.style.addLayer(l,t),this._update(!0)):this}getSlot(l){const t=this.getLayer(l);return t&&t.slot||null}setSlot(l,t){return this.style.setSlot(l,t),this.style.mergeLayers(),this._update(!0)}addImport(l,t){return this.style.addImport(l,t).catch(o=>this.fire(new n.z(new Error("Failed to add import",o)))),this}updateImport(l,t){return typeof t!="string"&&t.id!==l?(this.removeImport(l),this.addImport(t)):(this.style.updateImport(l,t),this._update(!0))}removeImport(l){return this.style.removeImport(l),this}moveImport(l,t){return this.style.moveImport(l,t),this._update(!0)}moveLayer(l,t){return this._isValidId(l)?(this.style.moveLayer(l,t),this._update(!0)):this}removeLayer(l){return this._isValidId(l)?(this.style.removeLayer(l),this._update(!0)):this}getLayer(l){if(!this._isValidId(l))return null;const t=this.style.getOwnLayer(l);return t?t.type==="custom"?t.implementation:t.serialize():void 0}getSlots(){return this.style.getSlots()}setLayerZoomRange(l,t,o){return this._isValidId(l)?(this.style.setLayerZoomRange(l,t,o),this._update(!0)):this}setFilter(l,t,o={}){return this._isValidId(l)?(this.style.setFilter(l,t,o),this._update(!0)):this}getFilter(l){return this._isValidId(l)?this.style.getFilter(l):null}setPaintProperty(l,t,o,c={}){return this._isValidId(l)?(this.style.setPaintProperty(l,t,o,c),this._update(!0)):this}getPaintProperty(l,t){return this._isValidId(l)?this.style.getPaintProperty(l,t):null}setLayoutProperty(l,t,o,c={}){return this._isValidId(l)?(this.style.setLayoutProperty(l,t,o,c),this._update(!0)):this}getLayoutProperty(l,t){return this._isValidId(l)?this.style.getLayoutProperty(l,t):null}getGlyphsUrl(){return this.style.getGlyphsUrl()}setGlyphsUrl(l){return this.style.setGlyphsUrl(l),this._update(!0)}getSchema(l){return this.style.getSchema(l)}setSchema(l,t){return this.style.setSchema(l,t),this._update(!0)}getConfig(l){return this.style.getConfig(l)}setConfig(l,t){return this.style.setConfig(l,t),this._update(!0)}getConfigProperty(l,t){return this.style.getConfigProperty(l,t)}setConfigProperty(l,t,o){return this.style.setConfigProperty(l,t,o),this._update(!0)}getFeaturesetDescriptors(l){return this.style.getFeaturesetDescriptors(l)}setLights(l){if(this._lazyInitEmptyStyle(),l&&l.length===1&&l[0].type==="flat"){const t=l[0];t.properties?this.style.setFlatLight(t.properties,t.id,{}):this.style.setFlatLight({},"flat")}else this.style.setLights(l),this.painter.terrain&&(this.painter.terrain.invalidateRenderCache=!0);return this._update(!0)}getLights(){const l=this.style.getLights()||[];return l.length===0&&l.push({id:this.style.light.id,type:"flat",properties:this.style.getFlatLight()}),l}setLight(l,t={}){return console.log("The `map.setLight` function is deprecated, prefer using `map.setLights` with `flat` light type instead."),this.setLights([{id:"flat",type:"flat",properties:l}])}getLight(){return console.log("The `map.getLight` function is deprecated, prefer using `map.getLights` instead."),this.style.getFlatLight()}setTerrain(l){return this._lazyInitEmptyStyle(),!l&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(l),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(l){return this._lazyInitEmptyStyle(),this.style.setFog(l),this._update(!0)}getFog(){return this.style?this.style.getFog():null}setSnow(l){return this._lazyInitEmptyStyle(),this.style.setSnow(l),this._update(!0)}getSnow(){return this.style?this.style.getSnow():null}setRain(l){return this._lazyInitEmptyStyle(),this.style.setRain(l),this._update(!0)}getRain(){return this.style?this.style.getRain():null}setColorTheme(l){return this._lazyInitEmptyStyle(),this.style.setColorTheme(l),this._update(!0)}setImportColorTheme(l,t){return this._lazyInitEmptyStyle(),this.style.setImportColorTheme(l,t),this._update(!0)}setCamera(l){return this.style.setCamera(l),this._triggerCameraUpdate(l)}_triggerCameraUpdate(l){return this._update(this.transform.setOrthographicProjectionAtLowPitch(l["camera-projection"]==="orthographic"))}getCamera(){return this.style.camera}_queryFogOpacity(l){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(n.cd.convert(l),this.transform):0}setFeatureState(l,t){return l.source&&!this._isValidId(l.source)?this:(this.style.setFeatureState(l,t),this._update())}removeFeatureState(l,t){return l.source&&!this._isValidId(l.source)?this:(this.style.removeFeatureState(l,t),this._update())}getFeatureState(l){return l.source&&!this._isValidId(l.source)?null:this.style.getFeatureState(l)}_updateContainerDimensions(){if(!this._container)return;const l=this._container.getBoundingClientRect().width||400,t=this._container.getBoundingClientRect().height||300;let o,c,d,p=this._container;for(;p&&(!c||!d);){const m=window.getComputedStyle(p).transform;m&&m!=="none"&&(o=m.match(/matrix.*\((.+)\)/)[1].split(", "),o[0]&&o[0]!=="0"&&o[0]!=="1"&&(c=o[0]),o[3]&&o[3]!=="0"&&o[3]!=="1"&&(d=o[3])),p=p.parentElement}this._containerWidth=c?Math.abs(l/c):l,this._containerHeight=d?Math.abs(t/d):t}_detectMissingCSS(){window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&n.w("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const l=this._container;l.classList.add("mapboxgl-map"),(this._missingCSSCanary=Ut("div","mapboxgl-canary",l)).style.visibility="hidden",this._detectMissingCSS();const t=this._canvasContainer=Ut("div","mapboxgl-canvas-container",l);this._canvas=Ut("canvas","mapboxgl-canvas",t),this._interactive&&(t.classList.add("mapboxgl-interactive"),this._canvas.setAttribute("tabindex","0")),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const o=this._controlContainer=Ut("div","mapboxgl-control-container",l),c=this._controlPositions={};["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"].forEach(d=>{c[d]=Ut("div",`mapboxgl-ctrl-${d}`,o)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(l,t){const o=n.q.devicePixelRatio||1;this._canvas.width=o*Math.ceil(l),this._canvas.height=o*Math.ceil(t),this._canvas.style.width=`${l}px`,this._canvas.style.height=`${t}px`}_addMarker(l){this._markers.push(l)}_removeMarker(l){const t=this._markers.indexOf(l);t!==-1&&this._markers.splice(t,1)}_addPopup(l){this._popups.push(l)}_removePopup(l){const t=this._popups.indexOf(l);t!==-1&&this._popups.splice(t,1)}_setupPainter(){const l=n.l({},Js.supported.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),t=this._canvas.getContext("webgl2",l);t?(ao(t,!0),this.painter=new Pc(t,this._contextCreateOptions,this.transform,this._scaleFactor,this._tp),this.on("data",o=>{o.dataType==="source"&&this.painter.setTileLoadedFlag(!0)}),n.m.testSupport(t)):this.fire(new n.z(new Error("Failed to initialize WebGL")))}_contextLost(l){l.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new n.A("webglcontextlost",{originalEvent:l}))}_contextRestored(l){this._setupPainter(),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight)),this._updateTerrain(),this.style&&(this.style.reloadModels(),this.style.clearSources()),this._update(),this.fire(new n.A("webglcontextrestored",{originalEvent:l}))}_onMapScroll(l){if(l.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}idle(){return!this.isMoving()&&this.loaded()}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}frameReady(){return this.loaded()&&!this._placementDirty}_update(l){return this.style?(this._styleDirty=this._styleDirty||l,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(l){return this._update(),this._renderTaskQueue.add(l)}_cancelRenderFrame(l){this._renderTaskQueue.remove(l)}_requestDomTask(l){!this.loaded()||this.loaded()&&!this.isMoving()?l():this._domRenderTaskQueue.add(l)}_render(l){let t;this.fire(new n.A("renderstart")),++this._frameId;const o=this.painter.context.extTimerQuery,c=n.q.now(),d=this.painter.context.gl;if(this.listens("gpu-timing-frame")&&(t=d.createQuery(),d.beginQuery(o.TIME_ELAPSED_EXT,t)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],performance.now())),this._renderTaskQueue.run(l),this._domRenderTaskQueue.run(l),this._removed)return;this._updateProjectionTransition();const p=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const w=this.transform.zoom,S=this.transform.pitch,I=n.q.now(),E=new n.aa(w,{now:I,fadeDuration:p,pitch:S,transition:this.style.transition});this.style.update(E)}this.style&&this.style.hasFogTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let m=!1;this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),m=this._updateAverageElevation(c),this.style.updateSources(this.transform),this.style.updateImageProviders(),this.isMoving()||this._forceMarkerAndPopupUpdate()):m=this._updateAverageElevation(c);const y=this.style&&this.style._updatePlacement(this.painter,this.painter.transform,this.showCollisionBoxes,p,this._crossSourceCollisions,this.painter.replacementSource,this._scaleFactorChanged);if(this._scaleFactorChanged&&(this._scaleFactorChanged=!1),y&&(this._placementDirty=y.needsRerender),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showParseStatus:this.showParseStatus,wireframe:{terrain:this.showTerrainWireframe,layers2D:this.showLayers2DWireframe,layers3D:this.showLayers3DWireframe},showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:p,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new n.A("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,Yo.mark(qi.load),this.fire(new n.A("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&(this.style.snow||this.style.rain)&&(this._styleDirty=!0),this.style&&this.style.imageManager.hasPatternsInFlight()&&(this._styleDirty=!0),this.style&&!this.style.modelManager.isLoaded()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),t){const w=n.q.now()-c;d.endQuery(o.TIME_ELAPSED_EXT),setTimeout(()=>{const S=d.getQueryParameter(t,d.QUERY_RESULT)/1e6;d.deleteQuery(t),this.fire(new n.A("gpu-timing-frame",{cpuTime:w,gpuTime:S}))},50)}if(this.listens("gpu-timing-layer")){const w=this.painter.collectGpuTimers();setTimeout(()=>{const S=this.painter.queryGpuTimers(w);this.fire(new n.A("gpu-timing-layer",{layerTimes:S}))},50)}if(this.listens("gpu-timing-deferred-render")){const w=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{const S=this.painter.queryGpuTimeDeferredRender(w);this.fire(new n.A("gpu-timing-deferred-render",{gpuTime:S}))},50)}const x=this._sourcesDirty||this._styleDirty||this._placementDirty||m;if(x||this._repaint)this.triggerRepaint();else{const w=this.idle();if(w&&(m=this._updateAverageElevation(c,!0)),m)this.triggerRepaint();else if(this._triggerFrame(!1),w&&(this.fire(new n.A("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const S=this._calculateSpeedIndex();this.fire(new n.A("speedindexcompleted",{speedIndex:S})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||x||(this._fullyLoaded=!0,Yo.mark(qi.fullLoad),this._performanceMetricsCollection&&Vn(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(l){for(const t of this._markers)l&&!this.getRenderWorldCopies()&&(t._lngLat=t._lngLat.wrap()),t._update();for(const t of this._popups)!l||this.getRenderWorldCopies()||t._trackPointer||(t._lngLat=t._lngLat.wrap()),t._update()}_updateAverageElevation(l,t=!1){const o=d=>(this.transform.averageElevation=d,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return this.transform.averageElevation!==0&&o(0);const c=this.transform.elevation&&this.transform.elevation.exaggeration()!==this._averageElevationExaggeration;if(c||(t||l-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(l)){const d=this.transform.averageElevation;let p=this.transform.sampleAverageElevation();this.transform.elevation!=null&&(this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(p)?p=0:this._averageElevationLastSampledAt=l;const m=Math.abs(d-p);if(m>1){if(this._isInitialLoad||c)return this._averageElevation.jumpTo(p),o(p);this._averageElevation.easeTo(p,l,300)}else if(m>1e-4)return this._averageElevation.jumpTo(p),o(p)}return!!this._averageElevation.isEasing(l)&&o(this._averageElevation.getValue(l))}_authenticate(){Un(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,l=>{if(l&&(l.message===kr||l.status===401)){const t=this.painter.context.gl;ao(t,!1),this._logoControl instanceof bl&&this._logoControl._updateLogo(),t&&t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT|t.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new n.z(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),tn(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_postStyleLoadEvent(){this.style.globalId&&Ui(this._requestManager._customAccessToken,{map:this,style:this.style.globalId,importedStyles:this.style.getImportGlobalIds()})}_updateTerrain(){const l=this._isDragging();this.painter.updateTerrain(this.style,l)}_calculateSpeedIndex(){const l=this.painter.canvasCopy(),t=this.painter.getCanvasCopiesAndTimestamps();t.timeStamps.push(performance.now());const o=this.painter.context.gl,c=o.createFramebuffer();function d(p){o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,p,0);const m=new Uint8Array(o.drawingBufferWidth*o.drawingBufferHeight*4);return o.readPixels(0,0,o.drawingBufferWidth,o.drawingBufferHeight,o.RGBA,o.UNSIGNED_BYTE,m),m}return o.bindFramebuffer(o.FRAMEBUFFER,c),this._canvasPixelComparison(d(l),t.canvasCopies.map(d),t.timeStamps)}_canvasPixelComparison(l,t,o){let c=o[1]-o[0];const d=l.length/4;for(let p=0;p<t.length;p++){const m=t[p];let y=0;for(let x=0;x<m.length;x+=4)m[x]===l[x]&&m[x+1]===l[x+1]&&m[x+2]===l[x+2]&&m[x+3]===l[x+3]&&(y+=1);c+=(o[p+2]-o[p+1])*(1-y/d)}return c}remove(){this._hash&&this._hash.remove();for(const t of this._controls)t.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this._domRenderTaskQueue.clear(),this.style&&this.style.destroy(),this.indoor.destroy(),this.painter.destroy(),this.handlers&&this.handlers.destroy(),this.handlers=void 0,this.setStyle(null),window.removeEventListener("resize",this._onWindowResize,!1),window.removeEventListener("orientationchange",this._onWindowResize,!1),window.removeEventListener(this._fullscreenchangeEvent,this._onWindowResize,!1),window.removeEventListener("online",this._onWindowOnline,!1),window.removeEventListener("visibilitychange",this._onVisibilityChange,!1);const l=this.painter.context.gl.getExtension("WEBGL_lose_context");l&&l.loseContext(),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._missingCSSCanary.remove(),this._canvas=void 0,this._canvasContainer=void 0,this._controlContainer=void 0,this._missingCSSCanary=void 0,this._container.classList.remove("mapboxgl-map"),this._container.removeEventListener("scroll",this._onMapScroll,!1),Ss.delete(this.painter.context.gl),Yi.remove(),Nn.remove(),this._removed=!0,this.fire(new n.A("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(l){this._renderNextFrame=this._renderNextFrame||l,this.style&&!this._frame&&(this._frame=n.q.frame(t=>{const o=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,o&&this._render(t)}))}_preloadTiles(l){const t=this.style?this.style.getSourceCaches():[];return n.bt(t,(o,c)=>o._preloadTiles(l,c),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(l){this._trackResize&&this.resize({originalEvent:l})._update()}_onVisibilityChange(){document.visibilityState==="hidden"&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(l){this._showTileBoundaries!==l&&(this._showTileBoundaries=l,this._tp.refreshUI(),this._update())}get showParseStatus(){return!!this._showParseStatus}set showParseStatus(l){this._showParseStatus!==l&&(this._showParseStatus=l,this._tp.refreshUI(),this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(l){this._showTerrainWireframe!==l&&(this._showTerrainWireframe=l,this._tp.refreshUI(),this._update())}get showLayers2DWireframe(){return!!this._showLayers2DWireframe}set showLayers2DWireframe(l){this._showLayers2DWireframe!==l&&(this._showLayers2DWireframe=l,this._tp.refreshUI(),this._update())}get showLayers3DWireframe(){return!!this._showLayers3DWireframe}set showLayers3DWireframe(l){this._showLayers3DWireframe!==l&&(this._showLayers3DWireframe=l,this._tp.refreshUI(),this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(l){this._speedIndexTiming!==l&&(this._speedIndexTiming=l,this._update())}get showPadding(){return!!this._showPadding}set showPadding(l){this._showPadding!==l&&(this._showPadding=l,this._tp.refreshUI(),this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(l){this._showCollisionBoxes!==l&&(this._showCollisionBoxes=l,this._tp.refreshUI(),l?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(l){this._showOverdrawInspector!==l&&(this._showOverdrawInspector=l,this._tp.refreshUI(),this._update())}get repaint(){return!!this._repaint}set repaint(l){this._repaint!==l&&(this._repaint=l,this._tp.refreshUI(),this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(l){this._vertices=l,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(l){this._showTileAABBs!==l&&(this._showTileAABBs=l,this._tp.refreshUI(),l&&this._update())}_setCacheLimits(l,t){n.eJ(l,t)}get version(){return Rr}},NavigationControl:class{constructor(l={}){this.options=n.l({},Af,l),this._container=Ut("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",t=>t.preventDefault()),this.options.showZoom&&(n.aV(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",t=>{this._map&&this._map.zoomIn({},{originalEvent:t})}),Ut("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",t=>{this._map&&this._map.zoomOut({},{originalEvent:t})}),Ut("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(n.aV(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",t=>{const o=this._map;o&&(this.options.visualizePitch?o.resetNorthPitch({},{originalEvent:t}):o.resetNorth({},{originalEvent:t}))}),this._compassIcon=Ut("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const l=this._map;if(!l)return;const t=l.getZoom(),o=t===l.getMaxZoom(),c=t===l.getMinZoom();this._zoomInButton.disabled=o,this._zoomOutButton.disabled=c,this._zoomInButton.setAttribute("aria-disabled",o.toString()),this._zoomOutButton.setAttribute("aria-disabled",c.toString())}_rotateCompassArrow(){const l=this._map;if(!l)return;const t=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(l.transform.pitch*(Math.PI/180)),.5)}) rotateX(${l.transform.pitch}deg) rotateZ(${l.transform.angle*(180/Math.PI)}deg)`:`rotate(${l.transform.angle*(180/Math.PI)}deg)`;l._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=t)})}onAdd(l){return this._map=l,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),l.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&l.on("pitch",this._rotateCompassArrow),l.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Tl(l,this._compass,this.options.visualizePitch)),this._container}onRemove(){const l=this._map;l&&(this._container.remove(),this.options.showZoom&&l.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&l.off("pitch",this._rotateCompassArrow),l.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(l,t){const o=Ut("button",l,this._container);return o.type="button",o.addEventListener("click",t),o}_setButtonTitle(l,t){if(!this._map)return;const o=this._map._getUIString(`NavigationControl.${t}`);l.setAttribute("aria-label",o),l.firstElementChild&&l.firstElementChild.setAttribute("title",o)}},GeolocateControl:class extends n.E{constructor(l={}){super();const t=navigator.geolocation;this.options=n.l({geolocation:t},El,l),n.aV(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=zn(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(l){return this._map=l,this._container=Ut("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){this._geolocationWatchID!==void 0&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(l){const t=(o=!!this.options.geolocation)=>{this._supportsGeolocation=o,l(o)};this._supportsGeolocation!==void 0?l(this._supportsGeolocation):navigator.permissions!==void 0?navigator.permissions.query({name:"geolocation"}).then(o=>t(o.state!=="denied")).catch(()=>t()):t()}_isOutOfMapMaxBounds(l){const t=this._map.getMaxBounds(),o=l.coords;return!!t&&(o.longitude<t.getWest()||o.longitude>t.getEast()||o.latitude<t.getSouth()||o.latitude>t.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(l){if(this._map){if(this._isOutOfMapMaxBounds(l))return this._setErrorState(),this.fire(new n.A("outofmaxbounds",l)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=l,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(l),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(l),this.options.showUserLocation&&this._userLocationDotMarker.removeClassName("mapboxgl-user-location-dot-stale"),this.fire(new n.A("geolocate",l)),this._finish()}}_updateCamera(l){const t=new n.cd(l.coords.longitude,l.coords.latitude),o=l.coords.accuracy,c=this._map.getBearing(),d=n.l({bearing:c},this.options.fitBoundsOptions);this._map.fitBounds(t.toBounds(o),d,{geolocateSource:!0})}_updateMarker(l){if(l){const t=new n.cd(l.coords.longitude,l.coords.latitude);this._accuracyCircleMarker.setLngLat(t).addTo(this._map),this._userLocationDotMarker.setLngLat(t).addTo(this._map),this._accuracy=l.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const l=this._map.transform,t=n.c6(1,l._center.lat)*l.worldSize,o=Math.ceil(2*this._accuracy*t);this._circleElement.style.width=`${o}px`,this._circleElement.style.height=`${o}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&typeof this._heading=="number"?(this._userLocationDotMarker.setRotation(this._heading),this._userLocationDotMarker.addClassName("mapboxgl-user-location-show-heading")):(this._userLocationDotMarker.removeClassName("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(l){if(this._map){if(this.options.trackUserLocation)if(l.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(l.code===3&&this._noTimeout)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._userLocationDotMarker.addClassName("mapboxgl-user-location-dot-stale"),this.fire(new n.A("error",l)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(l){if(this._map!==void 0){if(this._container.addEventListener("contextmenu",t=>t.preventDefault()),this._geolocateButton=Ut("button","mapboxgl-ctrl-geolocate",this._container),Ut("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",l===!1){n.w("Geolocation support is not available so the GeolocateControl will be disabled.");const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t)}else{const t=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=Ut("div","mapboxgl-user-location"),this._dotElement.appendChild(Ut("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(Ut("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new Sl({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=Ut("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Sl({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",t=>{t.geolocateSource||this._watchState!=="ACTIVE_LOCK"||t.originalEvent&&t.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new n.A("trackuserlocationend")))})}}_onDeviceOrientation(l){this._userLocationDotMarker&&(l.webkitCompassHeading?this._heading=l.webkitCompassHeading:l.absolute===!0&&(this._heading=-1*l.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return n.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new n.A("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new n.A("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new n.A("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let l;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(l={maximumAge:6e5,timeout:0},this._noTimeout=!0):(l=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,l),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=window.setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const l=()=>{"ondeviceorientationabsolute"in window?window.addEventListener("deviceorientationabsolute",this._onDeviceOrientation):window.addEventListener("deviceorientation",this._onDeviceOrientation)};typeof DeviceMotionEvent<"u"&&typeof DeviceMotionEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(t=>{t==="granted"&&l()}).catch(console.error):l()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),window.removeEventListener("deviceorientation",this._onDeviceOrientation),window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Fc,ScaleControl:class{constructor(l={}){this.options=n.l({},wa,l),this._isNumberFormatSupported=function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch{return!1}}(),n.aV(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const l=this.options.maxWidth||100,t=this._map,o=t._containerHeight/2,c=t._containerWidth/2-l/2,d=t.unproject([c,o]),p=t.unproject([c+l,o]),m=d.distanceTo(p);if(this.options.unit==="imperial"){const y=3.2808*m;y>5280?this._setScale(l,y/5280,"mile"):this._setScale(l,y,"foot")}else this.options.unit==="nautical"?this._setScale(l,m/1852,"nautical-mile"):m>=1e3?this._setScale(l,m/1e3,"kilometer"):this._setScale(l,m,"meter")}_setScale(l,t,o){this._map._requestDomTask(()=>{const c=function(p){const m=Math.pow(10,`${Math.floor(p)}`.length-1);let y=p/m;return y=y>=10?10:y>=5?5:y>=3?3:y>=2?2:y>=1?1:function(x){const w=Math.pow(10,Math.ceil(-Math.log(x)/Math.LN10));return Math.round(x*w)/w}(y),m*y}(t),d=c/t;this._container.innerHTML=this._isNumberFormatSupported&&o!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:o}).format(c):`${c} ${ps[o]}`,this._container.style.width=l*d+"px"})}onAdd(l){return this._map=l,this._language=l.getLanguage(),this._container=Ut("div","mapboxgl-ctrl mapboxgl-ctrl-scale",l.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(l){this._language=l,this._update()}setUnit(l){this.options.unit=l,this._update()}},FullscreenControl:class{constructor(l={}){this._fullscreen=!1,l&&l.container&&(l.container instanceof HTMLElement?this._container=l.container:n.w("Full screen control 'container' must be a DOM element.")),n.aV(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(l){return this._map=l,this._container||(this._container=this._map.getContainer()),this._controlContainer=Ut("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",n.w("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled)}_setupUI(){const l=this._fullscreenButton=Ut("button","mapboxgl-ctrl-fullscreen",this._controlContainer);Ut("span","mapboxgl-ctrl-icon",l).setAttribute("aria-hidden","true"),l.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const l=this._getTitle();this._fullscreenButton.setAttribute("aria-label",l),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",l)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(document.fullscreenElement||document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},Popup:class extends n.E{constructor(l){super(),this.options=n.l(Object.create(zo),l),this._altitude=this.options.altitude,n.aV(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(l&&l.className?l.className.trim().split(/\s+/):[])}addTo(l){return this._map&&this.remove(),this._map=l,this.options.closeOnClick&&l.on("preclick",this._onClose),this.options.closeOnMove&&l.on("move",this._onClose),l.on("remove",this.remove),this._update(),l._addPopup(this),this._focusFirstElement(),this._trackPointer?(l.on("mousemove",this._onMouseEvent),l.on("mouseup",this._onMouseEvent),l._canvasContainer.classList.add("mapboxgl-track-pointer")):l.on("move",this._update),this.fire(new n.A("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const l=this._map;return l&&(l.off("move",this._update),l.off("move",this._onClose),l.off("preclick",this._onClose),l.off("click",this._onClose),l.off("remove",this.remove),l.off("mousemove",this._onMouseEvent),l.off("mouseup",this._onMouseEvent),l.off("drag",this._onMouseEvent),l._canvasContainer&&l._canvasContainer.classList.remove("mapboxgl-track-pointer"),l._removePopup(this),this._map=void 0),this.fire(new n.A("close")),this}getLngLat(){return this._lngLat}setLngLat(l){this._lngLat=n.cd.convert(l),this._pos=null,this._trackPointer=!1,this._update();const t=this._map;return t&&(t.on("move",this._update),t.off("mousemove",this._onMouseEvent),t._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}getAltitude(){return this._altitude}setAltitude(l){return this._altitude=l,this._update(),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const l=this._map;return l&&(l.off("move",this._update),l.on("mousemove",this._onMouseEvent),l.on("drag",this._onMouseEvent),l._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(l){return this.setDOMContent(document.createTextNode(l))}setHTML(l){const t=document.createDocumentFragment(),o=document.createElement("body");let c;for(o.innerHTML=l;c=o.firstChild,c;)t.appendChild(c);return this.setDOMContent(t)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(l){return this.options.maxWidth=l,this._update(),this}setDOMContent(l){let t=this._content;if(t)for(;t.hasChildNodes();)t.firstChild&&t.removeChild(t.firstChild);else t=this._content=Ut("div","mapboxgl-popup-content",this._container||void 0);if(t.appendChild(l),this.options.closeButton){const o=this._closeButton=Ut("button","mapboxgl-popup-close-button",t);o.type="button",o.setAttribute("aria-label","Close popup"),o.innerHTML='<span aria-hidden="true">×</span>',o.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(l){return this._classList.add(l),this._updateClassList(),this}removeClassName(l){return this._classList.delete(l),this._updateClassList(),this}setOffset(l){return this.options.offset=l,this._update(),this}toggleClassName(l){let t;return this._classList.delete(l)?t=!1:(this._classList.add(l),t=!0),this._updateClassList(),t}_onMouseEvent(l){this._update(l.point)}_getAnchor(l){if(this.options.anchor)return this.options.anchor;const t=this._map,o=this._container,c=this._pos;if(!t||!o||!c)return"bottom";const d=o.offsetWidth,p=o.offsetHeight,m=c.x<d/2,y=c.x>t.transform.width-d/2;if(c.y+l<p)return m?"top-left":y?"top-right":"top";if(c.y>t.transform.height-p){if(m)return"bottom-left";if(y)return"bottom-right"}return m?"left":y?"right":"bottom"}_updateClassList(){const l=this._container;if(!l)return;const t=[...this._classList];t.push("mapboxgl-popup"),this._anchor&&t.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&t.push("mapboxgl-popup-track-pointer"),l.className=t.join(" ")}_update(l){const t=this._map,o=this._content;if(!t||!this._lngLat&&!this._trackPointer||!o)return;let c=this._container;if(c||(c=this._container=Ut("div","mapboxgl-popup",t.getContainer()),this._tip=Ut("div","mapboxgl-popup-tip",c),c.appendChild(o)),this.options.maxWidth&&c.style.maxWidth!==this.options.maxWidth&&(c.style.maxWidth=this.options.maxWidth),t.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Kd(this._lngLat,this._pos,t.transform)),!this._trackPointer||l){const d=this._pos=this._trackPointer&&l instanceof n.P?l:t.project(this._lngLat,this._altitude),p=Hs(this.options.offset),m=this._anchor=this._getAnchor(p.y),y=Hs(this.options.offset,m),x=d.add(y).round();t._requestDomTask(()=>{this._container&&m&&(this._container.style.transform=`${uu[m]} translate(${x.x}px,${x.y}px)`)})}if(!this._marker&&t._showingGlobe()){const d=n.eK(t.transform,this._lngLat)?0:1;this._setOpacity(d)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const l=this._container.querySelector(Do);l&&l.focus()}_onClose(){this.remove()}_setOpacity(l){this._container&&(this._container.style.opacity=`${l}`),this._content&&(this._content.style.pointerEvents=l?"auto":"none")}},Marker:Sl,Style:go,LngLat:n.cd,LngLatBounds:n.aG,Point:n.P,MercatorCoordinate:n.ac,FreeCameraOptions:Kl,Evented:n.E,config:n.e,prewarm:n.eP,clearPrewarmedResources:n.eQ,get accessToken(){return n.e.ACCESS_TOKEN},set accessToken(l){n.e.ACCESS_TOKEN=l},get baseApiUrl(){return n.e.API_URL},set baseApiUrl(l){n.e.API_URL=l},get workerCount(){return n.eR.workerCount},set workerCount(l){n.eR.workerCount=l},get maxParallelImageRequests(){return n.e.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(l){n.e.MAX_PARALLEL_IMAGE_REQUESTS=l},clearStorage(l){n.eS(l)},get workerUrl(){return n.eT.workerUrl},set workerUrl(l){n.eT.workerUrl=l},get workerClass(){return n.eT.workerClass},set workerClass(l){n.eT.workerClass=l},get workerParams(){return n.eT.workerParams},set workerParams(l){n.eT.workerParams=l},get dracoUrl(){return n.eU()},set dracoUrl(l){n.eV(l)},get meshoptUrl(){return n.eW()},set meshoptUrl(l){n.eX(l)},setNow:n.q.setNow,restoreNow:n.q.restoreNow}});var jx=Ks;return jx})}(Wp,Wp.exports)),Wp.exports}var Ux=rb();const ob=eb.vw(Ux),sb=tb({__proto__:null,default:ob},[Ux]);exports.m=sb;
|
|
2661
|
+
(${c.data.width}, ${c.data.height})`)));const x=!(t instanceof HTMLImageElement||ImageBitmap&&t instanceof ImageBitmap);let w=!1;c.usvg?(c.data=new n.r({width:p,height:m},new Uint8Array(y)),c.usvg=!1,c.icon=void 0,w=!0):c.data.replace(y,x),this.style.updateImage(o,c,w)}hasImage(l){return l?!!this.style&&!!this.style.getImage(n.I.from(l)):(this.fire(new n.z(new Error("Missing required image id"))),!1)}removeImage(l){this.style.removeImage(n.I.from(l))}loadImage(l,t){n.o(this._requestManager.transformRequest(l,n.R.Image),(o,c)=>{t(o,c instanceof HTMLImageElement?n.q.getImageData(c):c)})}listImages(){return this.style.listImages().map(l=>l.name)}addModel(l,t){this._lazyInitEmptyStyle(),this.style.addModel(l,t)}hasModel(l){return l?this.style.hasModel(l):(this.fire(new n.z(new Error("Missing required model id"))),!1)}removeModel(l){this.style.removeModel(l)}listModels(){return this.style.listModels()}addLayer(l,t){return this._isValidId(l.id)?(this._lazyInitEmptyStyle(),this.style.addLayer(l,t),this._update(!0)):this}getSlot(l){const t=this.getLayer(l);return t&&t.slot||null}setSlot(l,t){return this.style.setSlot(l,t),this.style.mergeLayers(),this._update(!0)}addImport(l,t){return this.style.addImport(l,t).catch(o=>this.fire(new n.z(new Error("Failed to add import",o)))),this}updateImport(l,t){return typeof t!="string"&&t.id!==l?(this.removeImport(l),this.addImport(t)):(this.style.updateImport(l,t),this._update(!0))}removeImport(l){return this.style.removeImport(l),this}moveImport(l,t){return this.style.moveImport(l,t),this._update(!0)}moveLayer(l,t){return this._isValidId(l)?(this.style.moveLayer(l,t),this._update(!0)):this}removeLayer(l){return this._isValidId(l)?(this.style.removeLayer(l),this._update(!0)):this}getLayer(l){if(!this._isValidId(l))return null;const t=this.style.getOwnLayer(l);return t?t.type==="custom"?t.implementation:t.serialize():void 0}getSlots(){return this.style.getSlots()}setLayerZoomRange(l,t,o){return this._isValidId(l)?(this.style.setLayerZoomRange(l,t,o),this._update(!0)):this}setFilter(l,t,o={}){return this._isValidId(l)?(this.style.setFilter(l,t,o),this._update(!0)):this}getFilter(l){return this._isValidId(l)?this.style.getFilter(l):null}setPaintProperty(l,t,o,c={}){return this._isValidId(l)?(this.style.setPaintProperty(l,t,o,c),this._update(!0)):this}getPaintProperty(l,t){return this._isValidId(l)?this.style.getPaintProperty(l,t):null}setLayoutProperty(l,t,o,c={}){return this._isValidId(l)?(this.style.setLayoutProperty(l,t,o,c),this._update(!0)):this}getLayoutProperty(l,t){return this._isValidId(l)?this.style.getLayoutProperty(l,t):null}getGlyphsUrl(){return this.style.getGlyphsUrl()}setGlyphsUrl(l){return this.style.setGlyphsUrl(l),this._update(!0)}getSchema(l){return this.style.getSchema(l)}setSchema(l,t){return this.style.setSchema(l,t),this._update(!0)}getConfig(l){return this.style.getConfig(l)}setConfig(l,t){return this.style.setConfig(l,t),this._update(!0)}getConfigProperty(l,t){return this.style.getConfigProperty(l,t)}setConfigProperty(l,t,o){return this.style.setConfigProperty(l,t,o),this._update(!0)}getFeaturesetDescriptors(l){return this.style.getFeaturesetDescriptors(l)}setLights(l){if(this._lazyInitEmptyStyle(),l&&l.length===1&&l[0].type==="flat"){const t=l[0];t.properties?this.style.setFlatLight(t.properties,t.id,{}):this.style.setFlatLight({},"flat")}else this.style.setLights(l),this.painter.terrain&&(this.painter.terrain.invalidateRenderCache=!0);return this._update(!0)}getLights(){const l=this.style.getLights()||[];return l.length===0&&l.push({id:this.style.light.id,type:"flat",properties:this.style.getFlatLight()}),l}setLight(l,t={}){return console.log("The `map.setLight` function is deprecated, prefer using `map.setLights` with `flat` light type instead."),this.setLights([{id:"flat",type:"flat",properties:l}])}getLight(){return console.log("The `map.getLight` function is deprecated, prefer using `map.getLights` instead."),this.style.getFlatLight()}setTerrain(l){return this._lazyInitEmptyStyle(),!l&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(l),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(l){return this._lazyInitEmptyStyle(),this.style.setFog(l),this._update(!0)}getFog(){return this.style?this.style.getFog():null}setSnow(l){return this._lazyInitEmptyStyle(),this.style.setSnow(l),this._update(!0)}getSnow(){return this.style?this.style.getSnow():null}setRain(l){return this._lazyInitEmptyStyle(),this.style.setRain(l),this._update(!0)}getRain(){return this.style?this.style.getRain():null}setColorTheme(l){return this._lazyInitEmptyStyle(),this.style.setColorTheme(l),this._update(!0)}setImportColorTheme(l,t){return this._lazyInitEmptyStyle(),this.style.setImportColorTheme(l,t),this._update(!0)}setCamera(l){return this.style.setCamera(l),this._triggerCameraUpdate(l)}_triggerCameraUpdate(l){return this._update(this.transform.setOrthographicProjectionAtLowPitch(l["camera-projection"]==="orthographic"))}getCamera(){return this.style.camera}_queryFogOpacity(l){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(n.cd.convert(l),this.transform):0}setFeatureState(l,t){return l.source&&!this._isValidId(l.source)?this:(this.style.setFeatureState(l,t),this._update())}removeFeatureState(l,t){return l.source&&!this._isValidId(l.source)?this:(this.style.removeFeatureState(l,t),this._update())}getFeatureState(l){return l.source&&!this._isValidId(l.source)?null:this.style.getFeatureState(l)}_updateContainerDimensions(){if(!this._container)return;const l=this._container.getBoundingClientRect().width||400,t=this._container.getBoundingClientRect().height||300;let o,c,d,p=this._container;for(;p&&(!c||!d);){const m=window.getComputedStyle(p).transform;m&&m!=="none"&&(o=m.match(/matrix.*\((.+)\)/)[1].split(", "),o[0]&&o[0]!=="0"&&o[0]!=="1"&&(c=o[0]),o[3]&&o[3]!=="0"&&o[3]!=="1"&&(d=o[3])),p=p.parentElement}this._containerWidth=c?Math.abs(l/c):l,this._containerHeight=d?Math.abs(t/d):t}_detectMissingCSS(){window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&n.w("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const l=this._container;l.classList.add("mapboxgl-map"),(this._missingCSSCanary=Ut("div","mapboxgl-canary",l)).style.visibility="hidden",this._detectMissingCSS();const t=this._canvasContainer=Ut("div","mapboxgl-canvas-container",l);this._canvas=Ut("canvas","mapboxgl-canvas",t),this._interactive&&(t.classList.add("mapboxgl-interactive"),this._canvas.setAttribute("tabindex","0")),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const o=this._controlContainer=Ut("div","mapboxgl-control-container",l),c=this._controlPositions={};["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"].forEach(d=>{c[d]=Ut("div",`mapboxgl-ctrl-${d}`,o)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(l,t){const o=n.q.devicePixelRatio||1;this._canvas.width=o*Math.ceil(l),this._canvas.height=o*Math.ceil(t),this._canvas.style.width=`${l}px`,this._canvas.style.height=`${t}px`}_addMarker(l){this._markers.push(l)}_removeMarker(l){const t=this._markers.indexOf(l);t!==-1&&this._markers.splice(t,1)}_addPopup(l){this._popups.push(l)}_removePopup(l){const t=this._popups.indexOf(l);t!==-1&&this._popups.splice(t,1)}_setupPainter(){const l=n.l({},Js.supported.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),t=this._canvas.getContext("webgl2",l);t?(ao(t,!0),this.painter=new Pc(t,this._contextCreateOptions,this.transform,this._scaleFactor,this._tp),this.on("data",o=>{o.dataType==="source"&&this.painter.setTileLoadedFlag(!0)}),n.m.testSupport(t)):this.fire(new n.z(new Error("Failed to initialize WebGL")))}_contextLost(l){l.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new n.A("webglcontextlost",{originalEvent:l}))}_contextRestored(l){this._setupPainter(),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight)),this._updateTerrain(),this.style&&(this.style.reloadModels(),this.style.clearSources()),this._update(),this.fire(new n.A("webglcontextrestored",{originalEvent:l}))}_onMapScroll(l){if(l.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}idle(){return!this.isMoving()&&this.loaded()}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}frameReady(){return this.loaded()&&!this._placementDirty}_update(l){return this.style?(this._styleDirty=this._styleDirty||l,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(l){return this._update(),this._renderTaskQueue.add(l)}_cancelRenderFrame(l){this._renderTaskQueue.remove(l)}_requestDomTask(l){!this.loaded()||this.loaded()&&!this.isMoving()?l():this._domRenderTaskQueue.add(l)}_render(l){let t;this.fire(new n.A("renderstart")),++this._frameId;const o=this.painter.context.extTimerQuery,c=n.q.now(),d=this.painter.context.gl;if(this.listens("gpu-timing-frame")&&(t=d.createQuery(),d.beginQuery(o.TIME_ELAPSED_EXT,t)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],performance.now())),this._renderTaskQueue.run(l),this._domRenderTaskQueue.run(l),this._removed)return;this._updateProjectionTransition();const p=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const w=this.transform.zoom,S=this.transform.pitch,I=n.q.now(),E=new n.aa(w,{now:I,fadeDuration:p,pitch:S,transition:this.style.transition});this.style.update(E)}this.style&&this.style.hasFogTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let m=!1;this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),m=this._updateAverageElevation(c),this.style.updateSources(this.transform),this.style.updateImageProviders(),this.isMoving()||this._forceMarkerAndPopupUpdate()):m=this._updateAverageElevation(c);const y=this.style&&this.style._updatePlacement(this.painter,this.painter.transform,this.showCollisionBoxes,p,this._crossSourceCollisions,this.painter.replacementSource,this._scaleFactorChanged);if(this._scaleFactorChanged&&(this._scaleFactorChanged=!1),y&&(this._placementDirty=y.needsRerender),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showParseStatus:this.showParseStatus,wireframe:{terrain:this.showTerrainWireframe,layers2D:this.showLayers2DWireframe,layers3D:this.showLayers3DWireframe},showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:p,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new n.A("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,Yo.mark(qi.load),this.fire(new n.A("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&(this.style.snow||this.style.rain)&&(this._styleDirty=!0),this.style&&this.style.imageManager.hasPatternsInFlight()&&(this._styleDirty=!0),this.style&&!this.style.modelManager.isLoaded()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),t){const w=n.q.now()-c;d.endQuery(o.TIME_ELAPSED_EXT),setTimeout(()=>{const S=d.getQueryParameter(t,d.QUERY_RESULT)/1e6;d.deleteQuery(t),this.fire(new n.A("gpu-timing-frame",{cpuTime:w,gpuTime:S}))},50)}if(this.listens("gpu-timing-layer")){const w=this.painter.collectGpuTimers();setTimeout(()=>{const S=this.painter.queryGpuTimers(w);this.fire(new n.A("gpu-timing-layer",{layerTimes:S}))},50)}if(this.listens("gpu-timing-deferred-render")){const w=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{const S=this.painter.queryGpuTimeDeferredRender(w);this.fire(new n.A("gpu-timing-deferred-render",{gpuTime:S}))},50)}const x=this._sourcesDirty||this._styleDirty||this._placementDirty||m;if(x||this._repaint)this.triggerRepaint();else{const w=this.idle();if(w&&(m=this._updateAverageElevation(c,!0)),m)this.triggerRepaint();else if(this._triggerFrame(!1),w&&(this.fire(new n.A("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const S=this._calculateSpeedIndex();this.fire(new n.A("speedindexcompleted",{speedIndex:S})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||x||(this._fullyLoaded=!0,Yo.mark(qi.fullLoad),this._performanceMetricsCollection&&Vn(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(l){for(const t of this._markers)l&&!this.getRenderWorldCopies()&&(t._lngLat=t._lngLat.wrap()),t._update();for(const t of this._popups)!l||this.getRenderWorldCopies()||t._trackPointer||(t._lngLat=t._lngLat.wrap()),t._update()}_updateAverageElevation(l,t=!1){const o=d=>(this.transform.averageElevation=d,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return this.transform.averageElevation!==0&&o(0);const c=this.transform.elevation&&this.transform.elevation.exaggeration()!==this._averageElevationExaggeration;if(c||(t||l-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(l)){const d=this.transform.averageElevation;let p=this.transform.sampleAverageElevation();this.transform.elevation!=null&&(this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(p)?p=0:this._averageElevationLastSampledAt=l;const m=Math.abs(d-p);if(m>1){if(this._isInitialLoad||c)return this._averageElevation.jumpTo(p),o(p);this._averageElevation.easeTo(p,l,300)}else if(m>1e-4)return this._averageElevation.jumpTo(p),o(p)}return!!this._averageElevation.isEasing(l)&&o(this._averageElevation.getValue(l))}_authenticate(){Un(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,l=>{if(l&&(l.message===kr||l.status===401)){const t=this.painter.context.gl;ao(t,!1),this._logoControl instanceof bl&&this._logoControl._updateLogo(),t&&t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT|t.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new n.z(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),tn(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_postStyleLoadEvent(){this.style.globalId&&Ui(this._requestManager._customAccessToken,{map:this,style:this.style.globalId,importedStyles:this.style.getImportGlobalIds()})}_updateTerrain(){const l=this._isDragging();this.painter.updateTerrain(this.style,l)}_calculateSpeedIndex(){const l=this.painter.canvasCopy(),t=this.painter.getCanvasCopiesAndTimestamps();t.timeStamps.push(performance.now());const o=this.painter.context.gl,c=o.createFramebuffer();function d(p){o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,p,0);const m=new Uint8Array(o.drawingBufferWidth*o.drawingBufferHeight*4);return o.readPixels(0,0,o.drawingBufferWidth,o.drawingBufferHeight,o.RGBA,o.UNSIGNED_BYTE,m),m}return o.bindFramebuffer(o.FRAMEBUFFER,c),this._canvasPixelComparison(d(l),t.canvasCopies.map(d),t.timeStamps)}_canvasPixelComparison(l,t,o){let c=o[1]-o[0];const d=l.length/4;for(let p=0;p<t.length;p++){const m=t[p];let y=0;for(let x=0;x<m.length;x+=4)m[x]===l[x]&&m[x+1]===l[x+1]&&m[x+2]===l[x+2]&&m[x+3]===l[x+3]&&(y+=1);c+=(o[p+2]-o[p+1])*(1-y/d)}return c}remove(){this._hash&&this._hash.remove();for(const t of this._controls)t.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this._domRenderTaskQueue.clear(),this.style&&this.style.destroy(),this.indoor.destroy(),this.painter.destroy(),this.handlers&&this.handlers.destroy(),this.handlers=void 0,this.setStyle(null),window.removeEventListener("resize",this._onWindowResize,!1),window.removeEventListener("orientationchange",this._onWindowResize,!1),window.removeEventListener(this._fullscreenchangeEvent,this._onWindowResize,!1),window.removeEventListener("online",this._onWindowOnline,!1),window.removeEventListener("visibilitychange",this._onVisibilityChange,!1);const l=this.painter.context.gl.getExtension("WEBGL_lose_context");l&&l.loseContext(),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._missingCSSCanary.remove(),this._canvas=void 0,this._canvasContainer=void 0,this._controlContainer=void 0,this._missingCSSCanary=void 0,this._container.classList.remove("mapboxgl-map"),this._container.removeEventListener("scroll",this._onMapScroll,!1),Ss.delete(this.painter.context.gl),Yi.remove(),Nn.remove(),this._removed=!0,this.fire(new n.A("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(l){this._renderNextFrame=this._renderNextFrame||l,this.style&&!this._frame&&(this._frame=n.q.frame(t=>{const o=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,o&&this._render(t)}))}_preloadTiles(l){const t=this.style?this.style.getSourceCaches():[];return n.bt(t,(o,c)=>o._preloadTiles(l,c),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(l){this._trackResize&&this.resize({originalEvent:l})._update()}_onVisibilityChange(){document.visibilityState==="hidden"&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(l){this._showTileBoundaries!==l&&(this._showTileBoundaries=l,this._tp.refreshUI(),this._update())}get showParseStatus(){return!!this._showParseStatus}set showParseStatus(l){this._showParseStatus!==l&&(this._showParseStatus=l,this._tp.refreshUI(),this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(l){this._showTerrainWireframe!==l&&(this._showTerrainWireframe=l,this._tp.refreshUI(),this._update())}get showLayers2DWireframe(){return!!this._showLayers2DWireframe}set showLayers2DWireframe(l){this._showLayers2DWireframe!==l&&(this._showLayers2DWireframe=l,this._tp.refreshUI(),this._update())}get showLayers3DWireframe(){return!!this._showLayers3DWireframe}set showLayers3DWireframe(l){this._showLayers3DWireframe!==l&&(this._showLayers3DWireframe=l,this._tp.refreshUI(),this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(l){this._speedIndexTiming!==l&&(this._speedIndexTiming=l,this._update())}get showPadding(){return!!this._showPadding}set showPadding(l){this._showPadding!==l&&(this._showPadding=l,this._tp.refreshUI(),this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(l){this._showCollisionBoxes!==l&&(this._showCollisionBoxes=l,this._tp.refreshUI(),l?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(l){this._showOverdrawInspector!==l&&(this._showOverdrawInspector=l,this._tp.refreshUI(),this._update())}get repaint(){return!!this._repaint}set repaint(l){this._repaint!==l&&(this._repaint=l,this._tp.refreshUI(),this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(l){this._vertices=l,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(l){this._showTileAABBs!==l&&(this._showTileAABBs=l,this._tp.refreshUI(),l&&this._update())}_setCacheLimits(l,t){n.eJ(l,t)}get version(){return Rr}},NavigationControl:class{constructor(l={}){this.options=n.l({},Af,l),this._container=Ut("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",t=>t.preventDefault()),this.options.showZoom&&(n.aV(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",t=>{this._map&&this._map.zoomIn({},{originalEvent:t})}),Ut("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",t=>{this._map&&this._map.zoomOut({},{originalEvent:t})}),Ut("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(n.aV(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",t=>{const o=this._map;o&&(this.options.visualizePitch?o.resetNorthPitch({},{originalEvent:t}):o.resetNorth({},{originalEvent:t}))}),this._compassIcon=Ut("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const l=this._map;if(!l)return;const t=l.getZoom(),o=t===l.getMaxZoom(),c=t===l.getMinZoom();this._zoomInButton.disabled=o,this._zoomOutButton.disabled=c,this._zoomInButton.setAttribute("aria-disabled",o.toString()),this._zoomOutButton.setAttribute("aria-disabled",c.toString())}_rotateCompassArrow(){const l=this._map;if(!l)return;const t=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(l.transform.pitch*(Math.PI/180)),.5)}) rotateX(${l.transform.pitch}deg) rotateZ(${l.transform.angle*(180/Math.PI)}deg)`:`rotate(${l.transform.angle*(180/Math.PI)}deg)`;l._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=t)})}onAdd(l){return this._map=l,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),l.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&l.on("pitch",this._rotateCompassArrow),l.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Tl(l,this._compass,this.options.visualizePitch)),this._container}onRemove(){const l=this._map;l&&(this._container.remove(),this.options.showZoom&&l.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&l.off("pitch",this._rotateCompassArrow),l.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(l,t){const o=Ut("button",l,this._container);return o.type="button",o.addEventListener("click",t),o}_setButtonTitle(l,t){if(!this._map)return;const o=this._map._getUIString(`NavigationControl.${t}`);l.setAttribute("aria-label",o),l.firstElementChild&&l.firstElementChild.setAttribute("title",o)}},GeolocateControl:class extends n.E{constructor(l={}){super();const t=navigator.geolocation;this.options=n.l({geolocation:t},El,l),n.aV(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=zn(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(l){return this._map=l,this._container=Ut("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){this._geolocationWatchID!==void 0&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(l){const t=(o=!!this.options.geolocation)=>{this._supportsGeolocation=o,l(o)};this._supportsGeolocation!==void 0?l(this._supportsGeolocation):navigator.permissions!==void 0?navigator.permissions.query({name:"geolocation"}).then(o=>t(o.state!=="denied")).catch(()=>t()):t()}_isOutOfMapMaxBounds(l){const t=this._map.getMaxBounds(),o=l.coords;return!!t&&(o.longitude<t.getWest()||o.longitude>t.getEast()||o.latitude<t.getSouth()||o.latitude>t.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(l){if(this._map){if(this._isOutOfMapMaxBounds(l))return this._setErrorState(),this.fire(new n.A("outofmaxbounds",l)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=l,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(l),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(l),this.options.showUserLocation&&this._userLocationDotMarker.removeClassName("mapboxgl-user-location-dot-stale"),this.fire(new n.A("geolocate",l)),this._finish()}}_updateCamera(l){const t=new n.cd(l.coords.longitude,l.coords.latitude),o=l.coords.accuracy,c=this._map.getBearing(),d=n.l({bearing:c},this.options.fitBoundsOptions);this._map.fitBounds(t.toBounds(o),d,{geolocateSource:!0})}_updateMarker(l){if(l){const t=new n.cd(l.coords.longitude,l.coords.latitude);this._accuracyCircleMarker.setLngLat(t).addTo(this._map),this._userLocationDotMarker.setLngLat(t).addTo(this._map),this._accuracy=l.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const l=this._map.transform,t=n.c6(1,l._center.lat)*l.worldSize,o=Math.ceil(2*this._accuracy*t);this._circleElement.style.width=`${o}px`,this._circleElement.style.height=`${o}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&typeof this._heading=="number"?(this._userLocationDotMarker.setRotation(this._heading),this._userLocationDotMarker.addClassName("mapboxgl-user-location-show-heading")):(this._userLocationDotMarker.removeClassName("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(l){if(this._map){if(this.options.trackUserLocation)if(l.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(l.code===3&&this._noTimeout)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._userLocationDotMarker.addClassName("mapboxgl-user-location-dot-stale"),this.fire(new n.A("error",l)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(l){if(this._map!==void 0){if(this._container.addEventListener("contextmenu",t=>t.preventDefault()),this._geolocateButton=Ut("button","mapboxgl-ctrl-geolocate",this._container),Ut("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",l===!1){n.w("Geolocation support is not available so the GeolocateControl will be disabled.");const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t)}else{const t=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=Ut("div","mapboxgl-user-location"),this._dotElement.appendChild(Ut("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(Ut("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new Sl({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=Ut("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Sl({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",t=>{t.geolocateSource||this._watchState!=="ACTIVE_LOCK"||t.originalEvent&&t.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new n.A("trackuserlocationend")))})}}_onDeviceOrientation(l){this._userLocationDotMarker&&(l.webkitCompassHeading?this._heading=l.webkitCompassHeading:l.absolute===!0&&(this._heading=-1*l.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return n.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new n.A("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new n.A("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new n.A("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let l;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(l={maximumAge:6e5,timeout:0},this._noTimeout=!0):(l=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,l),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=window.setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const l=()=>{"ondeviceorientationabsolute"in window?window.addEventListener("deviceorientationabsolute",this._onDeviceOrientation):window.addEventListener("deviceorientation",this._onDeviceOrientation)};typeof DeviceMotionEvent<"u"&&typeof DeviceMotionEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(t=>{t==="granted"&&l()}).catch(console.error):l()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),window.removeEventListener("deviceorientation",this._onDeviceOrientation),window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Fc,ScaleControl:class{constructor(l={}){this.options=n.l({},wa,l),this._isNumberFormatSupported=function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch{return!1}}(),n.aV(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const l=this.options.maxWidth||100,t=this._map,o=t._containerHeight/2,c=t._containerWidth/2-l/2,d=t.unproject([c,o]),p=t.unproject([c+l,o]),m=d.distanceTo(p);if(this.options.unit==="imperial"){const y=3.2808*m;y>5280?this._setScale(l,y/5280,"mile"):this._setScale(l,y,"foot")}else this.options.unit==="nautical"?this._setScale(l,m/1852,"nautical-mile"):m>=1e3?this._setScale(l,m/1e3,"kilometer"):this._setScale(l,m,"meter")}_setScale(l,t,o){this._map._requestDomTask(()=>{const c=function(p){const m=Math.pow(10,`${Math.floor(p)}`.length-1);let y=p/m;return y=y>=10?10:y>=5?5:y>=3?3:y>=2?2:y>=1?1:function(x){const w=Math.pow(10,Math.ceil(-Math.log(x)/Math.LN10));return Math.round(x*w)/w}(y),m*y}(t),d=c/t;this._container.innerHTML=this._isNumberFormatSupported&&o!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:o}).format(c):`${c} ${ps[o]}`,this._container.style.width=l*d+"px"})}onAdd(l){return this._map=l,this._language=l.getLanguage(),this._container=Ut("div","mapboxgl-ctrl mapboxgl-ctrl-scale",l.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(l){this._language=l,this._update()}setUnit(l){this.options.unit=l,this._update()}},FullscreenControl:class{constructor(l={}){this._fullscreen=!1,l&&l.container&&(l.container instanceof HTMLElement?this._container=l.container:n.w("Full screen control 'container' must be a DOM element.")),n.aV(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(l){return this._map=l,this._container||(this._container=this._map.getContainer()),this._controlContainer=Ut("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",n.w("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled)}_setupUI(){const l=this._fullscreenButton=Ut("button","mapboxgl-ctrl-fullscreen",this._controlContainer);Ut("span","mapboxgl-ctrl-icon",l).setAttribute("aria-hidden","true"),l.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const l=this._getTitle();this._fullscreenButton.setAttribute("aria-label",l),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",l)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(document.fullscreenElement||document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},Popup:class extends n.E{constructor(l){super(),this.options=n.l(Object.create(zo),l),this._altitude=this.options.altitude,n.aV(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(l&&l.className?l.className.trim().split(/\s+/):[])}addTo(l){return this._map&&this.remove(),this._map=l,this.options.closeOnClick&&l.on("preclick",this._onClose),this.options.closeOnMove&&l.on("move",this._onClose),l.on("remove",this.remove),this._update(),l._addPopup(this),this._focusFirstElement(),this._trackPointer?(l.on("mousemove",this._onMouseEvent),l.on("mouseup",this._onMouseEvent),l._canvasContainer.classList.add("mapboxgl-track-pointer")):l.on("move",this._update),this.fire(new n.A("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const l=this._map;return l&&(l.off("move",this._update),l.off("move",this._onClose),l.off("preclick",this._onClose),l.off("click",this._onClose),l.off("remove",this.remove),l.off("mousemove",this._onMouseEvent),l.off("mouseup",this._onMouseEvent),l.off("drag",this._onMouseEvent),l._canvasContainer&&l._canvasContainer.classList.remove("mapboxgl-track-pointer"),l._removePopup(this),this._map=void 0),this.fire(new n.A("close")),this}getLngLat(){return this._lngLat}setLngLat(l){this._lngLat=n.cd.convert(l),this._pos=null,this._trackPointer=!1,this._update();const t=this._map;return t&&(t.on("move",this._update),t.off("mousemove",this._onMouseEvent),t._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}getAltitude(){return this._altitude}setAltitude(l){return this._altitude=l,this._update(),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const l=this._map;return l&&(l.off("move",this._update),l.on("mousemove",this._onMouseEvent),l.on("drag",this._onMouseEvent),l._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(l){return this.setDOMContent(document.createTextNode(l))}setHTML(l){const t=document.createDocumentFragment(),o=document.createElement("body");let c;for(o.innerHTML=l;c=o.firstChild,c;)t.appendChild(c);return this.setDOMContent(t)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(l){return this.options.maxWidth=l,this._update(),this}setDOMContent(l){let t=this._content;if(t)for(;t.hasChildNodes();)t.firstChild&&t.removeChild(t.firstChild);else t=this._content=Ut("div","mapboxgl-popup-content",this._container||void 0);if(t.appendChild(l),this.options.closeButton){const o=this._closeButton=Ut("button","mapboxgl-popup-close-button",t);o.type="button",o.setAttribute("aria-label","Close popup"),o.innerHTML='<span aria-hidden="true">×</span>',o.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(l){return this._classList.add(l),this._updateClassList(),this}removeClassName(l){return this._classList.delete(l),this._updateClassList(),this}setOffset(l){return this.options.offset=l,this._update(),this}toggleClassName(l){let t;return this._classList.delete(l)?t=!1:(this._classList.add(l),t=!0),this._updateClassList(),t}_onMouseEvent(l){this._update(l.point)}_getAnchor(l){if(this.options.anchor)return this.options.anchor;const t=this._map,o=this._container,c=this._pos;if(!t||!o||!c)return"bottom";const d=o.offsetWidth,p=o.offsetHeight,m=c.x<d/2,y=c.x>t.transform.width-d/2;if(c.y+l<p)return m?"top-left":y?"top-right":"top";if(c.y>t.transform.height-p){if(m)return"bottom-left";if(y)return"bottom-right"}return m?"left":y?"right":"bottom"}_updateClassList(){const l=this._container;if(!l)return;const t=[...this._classList];t.push("mapboxgl-popup"),this._anchor&&t.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&t.push("mapboxgl-popup-track-pointer"),l.className=t.join(" ")}_update(l){const t=this._map,o=this._content;if(!t||!this._lngLat&&!this._trackPointer||!o)return;let c=this._container;if(c||(c=this._container=Ut("div","mapboxgl-popup",t.getContainer()),this._tip=Ut("div","mapboxgl-popup-tip",c),c.appendChild(o)),this.options.maxWidth&&c.style.maxWidth!==this.options.maxWidth&&(c.style.maxWidth=this.options.maxWidth),t.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Kd(this._lngLat,this._pos,t.transform)),!this._trackPointer||l){const d=this._pos=this._trackPointer&&l instanceof n.P?l:t.project(this._lngLat,this._altitude),p=Hs(this.options.offset),m=this._anchor=this._getAnchor(p.y),y=Hs(this.options.offset,m),x=d.add(y).round();t._requestDomTask(()=>{this._container&&m&&(this._container.style.transform=`${uu[m]} translate(${x.x}px,${x.y}px)`)})}if(!this._marker&&t._showingGlobe()){const d=n.eK(t.transform,this._lngLat)?0:1;this._setOpacity(d)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const l=this._container.querySelector(Do);l&&l.focus()}_onClose(){this.remove()}_setOpacity(l){this._container&&(this._container.style.opacity=`${l}`),this._content&&(this._content.style.pointerEvents=l?"auto":"none")}},Marker:Sl,Style:go,LngLat:n.cd,LngLatBounds:n.aG,Point:n.P,MercatorCoordinate:n.ac,FreeCameraOptions:Kl,Evented:n.E,config:n.e,prewarm:n.eP,clearPrewarmedResources:n.eQ,get accessToken(){return n.e.ACCESS_TOKEN},set accessToken(l){n.e.ACCESS_TOKEN=l},get baseApiUrl(){return n.e.API_URL},set baseApiUrl(l){n.e.API_URL=l},get workerCount(){return n.eR.workerCount},set workerCount(l){n.eR.workerCount=l},get maxParallelImageRequests(){return n.e.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(l){n.e.MAX_PARALLEL_IMAGE_REQUESTS=l},clearStorage(l){n.eS(l)},get workerUrl(){return n.eT.workerUrl},set workerUrl(l){n.eT.workerUrl=l},get workerClass(){return n.eT.workerClass},set workerClass(l){n.eT.workerClass=l},get workerParams(){return n.eT.workerParams},set workerParams(l){n.eT.workerParams=l},get dracoUrl(){return n.eU()},set dracoUrl(l){n.eV(l)},get meshoptUrl(){return n.eW()},set meshoptUrl(l){n.eX(l)},setNow:n.q.setNow,restoreNow:n.q.restoreNow}});var jx=Ks;return jx})}(Wp,Wp.exports)),Wp.exports}var Ux=rb();const ob=eb.tC(Ux),sb=tb({__proto__:null,default:ob},[Ux]);exports.m=sb;
|