wafields 0.7.0 → 0.9.0

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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Fw=require("./index-B_kBNmCT.js");function Bw(Qu,Yp){for(var Oa=0;Oa<Yp.length;Oa++){const Dn=Yp[Oa];if(typeof Dn!="string"&&!Array.isArray(Dn)){for(const Va in Dn)if(Va!=="default"&&!(Va in Qu)){const nl=Object.getOwnPropertyDescriptor(Dn,Va);nl&&Object.defineProperty(Qu,Va,nl.get?nl:{enumerable:!0,get:()=>Dn[Va]})}}}return Object.freeze(Object.defineProperty(Qu,Symbol.toStringTag,{value:"Module"}))}var Wp={exports:{}},kw=Wp.exports,Z0;function Ow(){return Z0||(Z0=1,(function(Qu,Yp){(function(Oa,Dn){Qu.exports=Dn()})(kw,(function(){"use strict";var Oa,Dn,Va;function nl(a,Yr){if(!Oa)Oa=Yr;else if(!Dn)Dn=Yr;else{var ir="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 = {}; ("+Oa+")(sharedChunk); ("+Dn+")(sharedChunk); self.onerror = null;",Rn={};Oa(Rn),Va=Yr(Rn),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(Va.workerUrl=window.URL.createObjectURL(new Blob([ir],{type:"text/javascript"})))}}nl(["exports"],(function(a){var Yr=1e-6,ir=typeof Float32Array<"u"?Float32Array:Array;function Rn(r,e){var i=e[0],n=e[1],s=e[2],u=e[3],h=i*u-s*n;return h?(r[0]=u*(h=1/h),r[1]=-n*h,r[2]=-s*h,r[3]=i*h,r):null}function lc(){var r=new ir(9);return ir!=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 Ua(r,e){var i=e[0],n=e[1],s=e[2],u=e[3],h=e[4],f=e[5],_=e[6],g=e[7],v=e[8];return r[0]=h*v-f*g,r[1]=s*g-n*v,r[2]=n*f-s*h,r[3]=f*_-u*v,r[4]=i*v-s*_,r[5]=s*u-i*f,r[6]=u*g-h*_,r[7]=n*_-i*g,r[8]=i*h-n*u,r}function dn(r,e,i){var n=e[0],s=e[1],u=e[2],h=e[3],f=e[4],_=e[5],g=e[6],v=e[7],b=e[8],w=i[0],S=i[1],I=i[2],P=i[3],L=i[4],R=i[5],O=i[6],U=i[7],G=i[8];return r[0]=w*n+S*h+I*g,r[1]=w*s+S*f+I*v,r[2]=w*u+S*_+I*b,r[3]=P*n+L*h+R*g,r[4]=P*s+L*f+R*v,r[5]=P*u+L*_+R*b,r[6]=O*n+U*h+G*g,r[7]=O*s+U*f+G*v,r[8]=O*u+U*_+G*b,r}function Na(){var r=new ir(16);return ir!=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 Ei(r){var e=new ir(16);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}function rr(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 Wo(r,e){var i=e[0],n=e[1],s=e[2],u=e[3],h=e[4],f=e[5],_=e[6],g=e[7],v=e[8],b=e[9],w=e[10],S=e[11],I=e[12],P=e[13],L=e[14],R=e[15],O=i*f-n*h,U=i*_-s*h,G=i*g-u*h,K=n*_-s*f,Z=n*g-u*f,te=s*g-u*_,re=v*P-b*I,se=v*L-w*I,we=v*R-S*I,he=b*L-w*P,Te=b*R-S*P,Ae=w*R-S*L,Pe=O*Ae-U*Te+G*he+K*we-Z*se+te*re;return Pe?(r[0]=(f*Ae-_*Te+g*he)*(Pe=1/Pe),r[1]=(s*Te-n*Ae-u*he)*Pe,r[2]=(P*te-L*Z+R*K)*Pe,r[3]=(w*Z-b*te-S*K)*Pe,r[4]=(_*we-h*Ae-g*se)*Pe,r[5]=(i*Ae-s*we+u*se)*Pe,r[6]=(L*G-I*te-R*U)*Pe,r[7]=(v*te-w*G+S*U)*Pe,r[8]=(h*Te-f*we+g*re)*Pe,r[9]=(n*we-i*Te-u*re)*Pe,r[10]=(I*Z-P*G+R*O)*Pe,r[11]=(b*G-v*Z-S*O)*Pe,r[12]=(f*se-h*he-_*re)*Pe,r[13]=(i*he-n*se+s*re)*Pe,r[14]=(P*U-I*K-L*O)*Pe,r[15]=(v*K-b*U+w*O)*Pe,r):null}function qi(r,e,i){var n=e[0],s=e[1],u=e[2],h=e[3],f=e[4],_=e[5],g=e[6],v=e[7],b=e[8],w=e[9],S=e[10],I=e[11],P=e[12],L=e[13],R=e[14],O=e[15],U=i[0],G=i[1],K=i[2],Z=i[3];return r[0]=U*n+G*f+K*b+Z*P,r[1]=U*s+G*_+K*w+Z*L,r[2]=U*u+G*g+K*S+Z*R,r[3]=U*h+G*v+K*I+Z*O,r[4]=(U=i[4])*n+(G=i[5])*f+(K=i[6])*b+(Z=i[7])*P,r[5]=U*s+G*_+K*w+Z*L,r[6]=U*u+G*g+K*S+Z*R,r[7]=U*h+G*v+K*I+Z*O,r[8]=(U=i[8])*n+(G=i[9])*f+(K=i[10])*b+(Z=i[11])*P,r[9]=U*s+G*_+K*w+Z*L,r[10]=U*u+G*g+K*S+Z*R,r[11]=U*h+G*v+K*I+Z*O,r[12]=(U=i[12])*n+(G=i[13])*f+(K=i[14])*b+(Z=i[15])*P,r[13]=U*s+G*_+K*w+Z*L,r[14]=U*u+G*g+K*S+Z*R,r[15]=U*h+G*v+K*I+Z*O,r}function Ao(r,e,i){var n,s,u,h,f,_,g,v,b,w,S,I,P=i[0],L=i[1],R=i[2];return e===r?(r[12]=e[0]*P+e[4]*L+e[8]*R+e[12],r[13]=e[1]*P+e[5]*L+e[9]*R+e[13],r[14]=e[2]*P+e[6]*L+e[10]*R+e[14],r[15]=e[3]*P+e[7]*L+e[11]*R+e[15]):(s=e[1],u=e[2],h=e[3],f=e[4],_=e[5],g=e[6],v=e[7],b=e[8],w=e[9],S=e[10],I=e[11],r[0]=n=e[0],r[1]=s,r[2]=u,r[3]=h,r[4]=f,r[5]=_,r[6]=g,r[7]=v,r[8]=b,r[9]=w,r[10]=S,r[11]=I,r[12]=n*P+f*L+b*R+e[12],r[13]=s*P+_*L+w*R+e[13],r[14]=u*P+g*L+S*R+e[14],r[15]=h*P+v*L+I*R+e[15]),r}function Kr(r,e,i){var n=i[0],s=i[1],u=i[2];return r[0]=e[0]*n,r[1]=e[1]*n,r[2]=e[2]*n,r[3]=e[3]*n,r[4]=e[4]*s,r[5]=e[5]*s,r[6]=e[6]*s,r[7]=e[7]*s,r[8]=e[8]*u,r[9]=e[9]*u,r[10]=e[10]*u,r[11]=e[11]*u,r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}function Ln(r,e,i){var n=Math.sin(i),s=Math.cos(i),u=e[4],h=e[5],f=e[6],_=e[7],g=e[8],v=e[9],b=e[10],w=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]=u*s+g*n,r[5]=h*s+v*n,r[6]=f*s+b*n,r[7]=_*s+w*n,r[8]=g*s-u*n,r[9]=v*s-h*n,r[10]=b*s-f*n,r[11]=w*s-_*n,r}function Mo(r,e,i){var n=Math.sin(i),s=Math.cos(i),u=e[0],h=e[1],f=e[2],_=e[3],g=e[8],v=e[9],b=e[10],w=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]=u*s-g*n,r[1]=h*s-v*n,r[2]=f*s-b*n,r[3]=_*s-w*n,r[8]=u*n+g*s,r[9]=h*n+v*s,r[10]=f*n+b*s,r[11]=_*n+w*s,r}function Yo(r,e,i){var n=Math.sin(i),s=Math.cos(i),u=e[0],h=e[1],f=e[2],_=e[3],g=e[4],v=e[5],b=e[6],w=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]=u*s+g*n,r[1]=h*s+v*n,r[2]=f*s+b*n,r[3]=_*s+w*n,r[4]=g*s-u*n,r[5]=v*s-h*n,r[6]=b*s-f*n,r[7]=w*s-_*n,r}function sa(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 ja(r,e,i){var n,s,u,h=i[0],f=i[1],_=i[2],g=Math.sqrt(h*h+f*f+_*_);return g<Yr?null:(h*=g=1/g,f*=g,_*=g,n=Math.sin(e),s=Math.cos(e),r[0]=h*h*(u=1-s)+s,r[1]=f*h*u+_*n,r[2]=_*h*u-f*n,r[3]=0,r[4]=h*f*u-_*n,r[5]=f*f*u+s,r[6]=_*f*u+h*n,r[7]=0,r[8]=h*_*u+f*n,r[9]=f*_*u-h*n,r[10]=_*_*u+s,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r)}function al(r,e){var i=e[0],n=e[1],s=e[2],u=e[4],h=e[5],f=e[6],_=e[8],g=e[9],v=e[10];return r[0]=Math.sqrt(i*i+n*n+s*s),r[1]=Math.sqrt(u*u+h*h+f*f),r[2]=Math.sqrt(_*_+g*g+v*v),r}function sl(r,e){var i=e[0],n=e[1],s=e[2],u=e[3],h=i+i,f=n+n,_=s+s,g=i*h,v=n*h,b=n*f,w=s*h,S=s*f,I=s*_,P=u*h,L=u*f,R=u*_;return r[0]=1-b-I,r[1]=v+R,r[2]=w-L,r[3]=0,r[4]=v-R,r[5]=1-g-I,r[6]=S+P,r[7]=0,r[8]=w+L,r[9]=S-P,r[10]=1-g-b,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}var ll=qi;function bi(){var r=new ir(3);return ir!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r}function cc(r){var e=new ir(3);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}function Fr(r){var e=r[0],i=r[1],n=r[2];return Math.sqrt(e*e+i*i+n*n)}function nr(r,e,i){var n=new ir(3);return n[0]=r,n[1]=e,n[2]=i,n}function Vi(r,e,i,n){return r[0]=e,r[1]=i,r[2]=n,r}function xr(r,e,i){return r[0]=e[0]+i[0],r[1]=e[1]+i[1],r[2]=e[2]+i[2],r}function fn(r,e,i){return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],r}function Ko(r,e,i){return r[0]=e[0]*i[0],r[1]=e[1]*i[1],r[2]=e[2]*i[2],r}function pn(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 Qo(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 Ki(r,e,i){return r[0]=e[0]*i,r[1]=e[1]*i,r[2]=e[2]*i,r}function Co(r,e,i,n){return r[0]=e[0]+i[0]*n,r[1]=e[1]+i[1]*n,r[2]=e[2]+i[2]*n,r}function uc(r,e){var i=e[0]-r[0],n=e[1]-r[1],s=e[2]-r[2];return Math.sqrt(i*i+n*n+s*s)}function cl(r,e){var i=e[0]-r[0],n=e[1]-r[1],s=e[2]-r[2];return i*i+n*n+s*s}function hc(r){var e=r[0],i=r[1],n=r[2];return e*e+i*i+n*n}function la(r,e){return r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r}function Ri(r,e){var i=e[0],n=e[1],s=e[2],u=i*i+n*n+s*s;return u>0&&(u=1/Math.sqrt(u)),r[0]=e[0]*u,r[1]=e[1]*u,r[2]=e[2]*u,r}function lr(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function Hr(r,e,i){var n=e[0],s=e[1],u=e[2],h=i[0],f=i[1],_=i[2];return r[0]=s*_-u*f,r[1]=u*h-n*_,r[2]=n*f-s*h,r}function Ga(r,e,i,n){var s=e[0],u=e[1],h=e[2];return r[0]=s+n*(i[0]-s),r[1]=u+n*(i[1]-u),r[2]=h+n*(i[2]-h),r}function fr(r,e,i){var n=e[0],s=e[1],u=e[2],h=i[3]*n+i[7]*s+i[11]*u+i[15];return r[0]=(i[0]*n+i[4]*s+i[8]*u+i[12])/(h=h||1),r[1]=(i[1]*n+i[5]*s+i[9]*u+i[13])/h,r[2]=(i[2]*n+i[6]*s+i[10]*u+i[14])/h,r}function ca(r,e,i){var n=e[0],s=e[1],u=e[2];return r[0]=n*i[0]+s*i[3]+u*i[6],r[1]=n*i[1]+s*i[4]+u*i[7],r[2]=n*i[2]+s*i[5]+u*i[8],r}function ua(r,e,i){var n=i[0],s=i[1],u=i[2],h=i[3],f=e[0],_=e[1],g=e[2],v=s*g-u*_,b=u*f-n*g,w=n*_-s*f;return r[0]=f+h*(v+=v)+s*(w+=w)-u*(b+=b),r[1]=_+h*b+u*v-n*w,r[2]=g+h*w+n*b-s*v,r}function To(r){return r[0]=0,r[1]=0,r[2]=0,r}function Qr(r,e){return r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]}var pr=fn,Ju=Ko,Ss=Fr;function Ha(){var r=new ir(4);return ir!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0,r[3]=0),r}function ha(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 da(r,e){var i=e[0],n=e[1],s=e[2],u=e[3],h=i*i+n*n+s*s+u*u;return h>0&&(h=1/Math.sqrt(h)),r[0]=i*h,r[1]=n*h,r[2]=s*h,r[3]=u*h,r}function $r(r,e,i){var n=e[0],s=e[1],u=e[2],h=e[3];return r[0]=i[0]*n+i[4]*s+i[8]*u+i[12]*h,r[1]=i[1]*n+i[5]*s+i[9]*u+i[13]*h,r[2]=i[2]*n+i[6]*s+i[10]*u+i[14]*h,r[3]=i[3]*n+i[7]*s+i[11]*u+i[15]*h,r}function Fn(){var r=new ir(4);return ir!=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 Jo(r,e,i){i*=.5;var n=e[0],s=e[1],u=e[2],h=e[3],f=Math.sin(i),_=Math.cos(i);return r[0]=n*_+h*f,r[1]=s*_+u*f,r[2]=u*_-s*f,r[3]=h*_-n*f,r}function Bn(r,e,i){i*=.5;var n=e[0],s=e[1],u=e[2],h=e[3],f=Math.sin(i),_=Math.cos(i);return r[0]=n*_-u*f,r[1]=s*_+h*f,r[2]=u*_+n*f,r[3]=h*_-s*f,r}bi(),Ha();var oo,$a,Za,qa=da,As=(oo=bi(),$a=nr(1,0,0),Za=nr(0,1,0),function(r,e,i){var n=lr(e,i);return n<-.999999?(Hr(oo,$a,e),Ss(oo)<1e-6&&Hr(oo,Za,e),Ri(oo,oo),(function(s,u,h){h*=.5;var f=Math.sin(h);s[0]=f*u[0],s[1]=f*u[1],s[2]=f*u[2],s[3]=Math.cos(h)})(r,oo,Math.PI),r):n>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(Hr(oo,e,i),r[0]=oo[0],r[1]=oo[1],r[2]=oo[2],r[3]=1+n,qa(r,r))});function Br(){var r=new ir(2);return ir!=Float32Array&&(r[0]=0,r[1]=0),r}function ho(r,e){var i=new ir(2);return i[0]=r,i[1]=e,i}function ul(r,e,i){return r[0]=e,r[1]=i,r}function fa(r,e,i){return r[0]=e[0]+i[0],r[1]=e[1]+i[1],r}function mn(r,e,i){return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r}function kn(r,e,i){return r[0]=e[0]*i,r[1]=e[1]*i,r}function en(r){var e=r[0],i=r[1];return Math.sqrt(e*e+i*i)}function hl(r,e){var i=e[0],n=e[1],s=i*i+n*n;return s>0&&(s=1/Math.sqrt(s)),r[0]=e[0]*s,r[1]=e[1]*s,r}function Xa(r,e){return r[0]*e[0]+r[1]*e[1]}Fn(),Fn(),lc();var Xi,Nr,dc=mn;function Wa(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}Br();var tn=(function(){if(Nr)return Xi;function r(e,i,n,s){this.cx=3*e,this.bx=3*(n-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(s-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=i,this.p2x=n,this.p2y=s}return Nr=1,Xi=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 n=e,s=0;s<8;s++){var u=this.sampleCurveX(n)-e;if(Math.abs(u)<i)return n;var h=this.sampleCurveDerivativeX(n);if(Math.abs(h)<1e-6)break;n-=u/h}var f=0,_=1;for(n=e,s=0;s<20&&(u=this.sampleCurveX(n),!(Math.abs(u-e)<i));s++)e>u?f=n:_=n,n=.5*(_-f)+f;return n},solve:function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))}},Xi})(),fc=Wa(tn);function Be(r,e){this.x=r,this.y=e}function On(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(!On(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(!On(r[i],e[i]))return!1;return!0}return r===e}Be.prototype={clone(){return new Be(this.x,this.y)},add(r){return this.clone()._add(r)},sub(r){return this.clone()._sub(r)},multByPoint(r){return this.clone()._multByPoint(r)},divByPoint(r){return this.clone()._divByPoint(r)},mult(r){return this.clone()._mult(r)},div(r){return this.clone()._div(r)},rotate(r){return this.clone()._rotate(r)},rotateAround(r,e){return this.clone()._rotateAround(r,e)},matMult(r){return this.clone()._matMult(r)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(r){return this.x===r.x&&this.y===r.y},dist(r){return Math.sqrt(this.distSqr(r))},distSqr(r){const e=r.x-this.x,i=r.y-this.y;return e*e+i*i},angle(){return Math.atan2(this.y,this.x)},angleTo(r){return Math.atan2(this.y-r.y,this.x-r.x)},angleWith(r){return this.angleWithSep(r.x,r.y)},angleWithSep(r,e){return Math.atan2(this.x*e-this.y*r,this.x*r+this.y*e)},_matMult(r){const e=r[2]*this.x+r[3]*this.y;return this.x=r[0]*this.x+r[1]*this.y,this.y=e,this},_add(r){return this.x+=r.x,this.y+=r.y,this},_sub(r){return this.x-=r.x,this.y-=r.y,this},_mult(r){return this.x*=r,this.y*=r,this},_div(r){return this.x/=r,this.y/=r,this},_multByPoint(r){return this.x*=r.x,this.y*=r.y,this},_divByPoint(r){return this.x/=r.x,this.y/=r.y,this},_unit(){return this._div(this.mag()),this},_perp(){const r=this.y;return this.y=this.x,this.x=-r,this},_rotate(r){const e=Math.cos(r),i=Math.sin(r),n=i*this.x+e*this.y;return this.x=e*this.x-i*this.y,this.y=n,this},_rotateAround(r,e){const i=Math.cos(r),n=Math.sin(r),s=e.y+n*(this.x-e.x)+i*(this.y-e.y);return this.x=e.x+i*(this.x-e.x)-n*(this.y-e.y),this.y=s,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:Be},Be.convert=function(r){if(r instanceof Be)return r;if(Array.isArray(r))return new Be(+r[0],+r[1]);if(r.x!==void 0&&r.y!==void 0)return new Be(+r.x,+r.y);throw new Error("Expected [x, y] or {x, y} point format")};const eh=Math.PI/180,Ya=180/Math.PI;function oi(r){return r*eh}function Jr(r){return r*Ya}const th=[[0,0],[1,0],[1,1],[0,1]];function Ka(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 dl(r,e,i,n){const s=new fc(r,e,i,n);return function(u){return s.solve(u)}}const pe=dl(.25,.1,.25,1);function F(r,e,i){return Math.min(i,Math.max(e,r))}function V(r,e,i){return(i=F((i-r)/(e-r),0,1))*i*(3-2*i)}function $(r,e,i){const n=i-e,s=((r-e)%n+n)%n+e;return s===e?i:s}function ne(r,e,i){if(!r.length)return i(null,[]);let n=r.length;const s=new Array(r.length);let u=null;r.forEach(((h,f)=>{e(h,((_,g)=>{_&&(u=_),s[f]=g,--n==0&&i(u,s)}))}))}let ie=1;function ce(){return ie++}function xe(r){return r<=1?1:Math.pow(2,Math.ceil(Math.log2(r)))}function de(r,e){r.forEach((i=>{e[i]&&(e[i]=e[i].bind(e))}))}function ye(r,e,i){const n={};for(const s in r)n[s]=e.call(this,r[s],s,r);return n}function Oe(r,e,i){const n={};for(const s in r)e.call(this,r[s],s,r)&&(n[s]=r[s]);return n}function Ce(r){return Array.isArray(r)?r.map(Ce):typeof r=="object"&&r?ye(r,Ce):r}function rt(r,e){for(let i=0;i<r.length;i++)if(e.indexOf(r[i])>=0)return!0;return!1}const _t={};function tt(r){_t[r]||(typeof console<"u"&&console.warn(r),_t[r]=!0)}function Ot(r,e,i){return(i.y-r.y)*(e.x-r.x)>(e.y-r.y)*(i.x-r.x)}function Ft(r){let e=0;for(let i,n,s=0,u=r.length,h=u-1;s<u;h=s++)i=r[s],n=r[h],e+=(n.x-i.x)*(i.y+n.y);return e}function Rt([r,e,i]){const n=oi(e+90),s=oi(i);return{x:r*Math.cos(n)*Math.sin(s),y:r*Math.sin(n)*Math.sin(s),z:r*Math.cos(s),azimuthal:e,polar:i}}function Kt(r){return(typeof self<"u"||r!==void 0)&&typeof WorkerGlobalScope<"u"&&(r!==void 0?r:self)instanceof WorkerGlobalScope}function Qi(r){const e={};if(r.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((i,n,s,u)=>{const h=s||u;return e[n]=!h||h.toLowerCase(),""})),e["max-age"]){const i=parseInt(e["max-age"],10);isNaN(i)?delete e["max-age"]:e["max-age"]=i}return e}let mr=null;function ar(r,e){return[r[4*e],r[4*e+1],r[4*e+2],r[4*e+3]]}function vr(r,e,i,n){for(;e<i;){const s=e+i>>1;r[s]<n?e=s+1:i=s}return e}function Wi(r,e,i,n){for(;e<i;){const s=e+i>>1;r[s]<=n?e=s+1:i=s}return e}function ei(r){return r>0?1/(1.001-r):1+r}function Yi(r){return r>0?1-1/(1.001-r):-r}function Ii(r,e,i){return(r-e.min)*(i.max-i.min)/(e.max-e.min)+i.min}const Zt={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(!Zt.API_URL)return null;try{const r=new URL(Zt.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",BUILDING_GEN_URL:"https://api.mapbox.com/mapbox-gl-js/building-gen/building_gen_v1.2.4.wasm",GLYPHS_URL:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf",TILES3D_URL_PREFIX:"3dtiles/v1"};function sr(r){return Zt.API_URL_REGEX.test(r)}function jr(r){return Zt.API_SPRITE_REGEX.test(r)}let Zr,fo,Qa,kr,Po,eo;function _n(){return Zr==null&&(Zr=self.OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),Zr}const Cr={now:()=>kr!==void 0?kr:performance.now(),setNow(r){kr=r},restoreNow(){kr=void 0},frame(r){const e=requestAnimationFrame(r);return{cancel:()=>cancelAnimationFrame(e)}},getImageData(r,e=0){const{width:i,height:n}=r;Po||(Po=document.createElement("canvas"));const s=Po.getContext("2d",{willReadFrequently:!0});if(!s)throw new Error("failed to create canvas 2d context");return(i>Po.width||n>Po.height)&&(Po.width=i,Po.height=n),s.clearRect(-e,-e,i+2*e,n+2*e),s.drawImage(r,0,0,i,n),s.getImageData(-e,-e,i+2*e,n+2*e)},resolveURL:r=>(fo||(fo=document.createElement("a")),fo.href=r,fo.href),get devicePixelRatio(){return window.devicePixelRatio},get prefersReducedMotion(){return!!window.matchMedia&&(Qa==null&&(Qa=window.matchMedia("(prefers-reduced-motion: reduce)")),Qa.matches)},hasCanvasFingerprintNoise(){if(eo!==void 0)return eo;if(!_n())return eo=!1,!1;const r=new OffscreenCanvas(85,1),e=r.getContext("2d",{willReadFrequently:!0});let i=0;for(let s=0;s<r.width;++s)e.fillStyle=`rgba(${i++},${i++},${i++}, 255)`,e.fillRect(s,0,1,1);const n=e.getImageData(0,0,r.width,r.height);i=0;for(let s=0;s<n.data.length;++s)if(s%4!=3&&i++!==n.data[s])return eo=!0,!0;return eo=!1,!1}};function Ja(r,e){const i=r.indexOf("?");if(i<0)return`${r}?${new URLSearchParams(e).toString()}`;const n=new URLSearchParams(r.slice(i));for(const s in e)n.set(s,e[s]);return`${r.slice(0,i)}?${n.toString()}`}function Ms(r,e={persistentParams:[]}){const i=r.indexOf("?");if(i<0)return r;const n=new URLSearchParams,s=new URLSearchParams(r.slice(i));for(const h of e.persistentParams){const f=s.get(h);f&&n.set(h,f)}const u=n.toString();return`${r.slice(0,i)}${u.length>0?`?${u}`:""}`}const pc="mapbox-tiles";let mc=500,_c=50;const fl=["language","worldview","jobid"];let gn,po;function rn(){try{return caches}catch{}}function on(){const r=rn();r&&gn==null&&(gn=r.open(pc))}let Oo=1/0;const yn={supported:!1,testSupport:function(r){!gc&&es&&(ts?Yd(r):pa=r)}};let pa,es,gc=!1,ts=!1;const yc=typeof self<"u"?self:{};function Yd(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,es),r.isContextLost())return;yn.supported=!0}catch{}r.deleteTexture(e),gc=!0}yc.document&&(es=yc.document.createElement("img"),es.onload=function(){pa&&Yd(pa),pa=null,ts=!0},es.onerror=function(){gc=!0,pa=null},es.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const pl={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(pl);class Eo extends Error{constructor(e,i,n){i===401&&sr(n)&&(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=n}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const xc=Kt()?()=>self.worker.referrer:()=>(location.protocol==="blob:"?parent:self).location.href,is=function(r,e){if(!(/^file:/.test(i=r.url)||/^file:/.test(xc())&&!/^\w+:/.test(i))){if(self.fetch&&self.Request&&self.AbortController&&Request.prototype.hasOwnProperty("signal"))return(function(n,s){const u=new AbortController,h=new Request(n.url,{method:n.method||"GET",body:n.body,credentials:n.credentials,headers:n.headers,referrer:xc(),referrerPolicy:n.referrerPolicy,signal:u.signal});let f=!1,_=!1;const g=(v=h.url).indexOf("sku=")>0&&sr(v);var v;n.type==="json"&&h.headers.set("Accept","application/json");const b=(S,I,P)=>{if(_)return;if(S&&S.message!=="SecurityError"&&tt(S.toString()),I&&P)return w(I);const L=Date.now();fetch(h).then((R=>{if(R.ok){const O=g?R.clone():null;return w(R,O,L)}return s(new Eo(R.statusText,R.status,n.url))})).catch((R=>{R.name!=="AbortError"&&s(new Error(`${R.message} ${n.url}`))}))},w=(S,I,P)=>{(n.type==="arrayBuffer"?S.arrayBuffer():n.type==="json"?S.json():S.text()).then((L=>{_||(I&&P&&(function(R,O,U){if(on(),gn==null)return;const G=Qi(O.headers.get("Cache-Control")||"");if(G["no-store"])return;const K={status:O.status,statusText:O.statusText,headers:new Headers};O.headers.forEach(((re,se)=>K.headers.set(se,re))),G["max-age"]&&K.headers.set("Expires",new Date(U+1e3*G["max-age"]).toUTCString());const Z=K.headers.get("Expires");if(!Z||new Date(Z).getTime()-U<42e4)return;let te=Ms(R.url,{persistentParams:fl});if(O.status===206){const re=R.headers.get("Range");if(!re)return;K.status=200,te=Ja(te,{range:re})}(function(re,se){if(po===void 0)try{new Response(new ReadableStream),po=!0}catch{po=!1}po?se(re.body):re.blob().then(se).catch((we=>tt(we.message)))})(O,(re=>{const se=new Response((we=O.status)!==200&&we!==404&&[101,103,204,205,304].includes(we)?null:re,K);var we;on(),gn!=null&&gn.then((he=>he.put(te,se))).catch((he=>tt(he.message)))}))})(h,I,P),f=!0,s(null,L,S.headers))})).catch((L=>{_||s(new Error(L.message))}))};return g?(function(S,I){if(on(),gn==null)return I(null);gn.then((P=>{let L=Ms(S.url,{persistentParams:fl});const R=S.headers.get("Range");R&&(L=Ja(L,{range:R})),P.match(L).then((O=>{const U=(function(G){if(!G)return!1;const K=new Date(G.headers.get("Expires")||0),Z=Qi(G.headers.get("Cache-Control")||"");return Number(K)>Date.now()&&!Z["no-cache"]})(O);P.delete(L).catch(I),U&&P.put(L,O.clone()).catch(I),I(null,O,U)})).catch(I)})).catch(I)})(h,b):b(null,null),{cancel:()=>{_=!0,f||u.abort()}}})(r,e);if(Kt(self)&&self.worker.actor)return self.worker.actor.send("getResource",r,e,void 0,!0)}var i;return(function(n,s){const u=new XMLHttpRequest;u.open(n.method||"GET",n.url,!0),n.type==="arrayBuffer"&&(u.responseType="arraybuffer");for(const h in n.headers)u.setRequestHeader(h,n.headers[h]);return n.type==="json"&&(u.responseType="text",u.setRequestHeader("Accept","application/json")),u.withCredentials=n.credentials==="include",u.onerror=()=>{s(new Error(u.statusText))},u.onload=()=>{if((u.status>=200&&u.status<300||u.status===0)&&u.response!==null){let h=u.response;if(n.type==="json")try{h=JSON.parse(u.response)}catch(_){return s(_)}const f=new Headers;u.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((_=>{const g=_.split(": "),v=g.shift(),b=g.join(": ");f.append(v,b)})),s(null,h,f)}else s(new Eo(u.statusText,u.status,n.url))},u.send(n.body),{cancel:()=>u.abort()}})(r,e)},Vn=function(r,e){return is(Object.assign(r,{type:"arrayBuffer"}),e)};function Kp(r){const e=document.createElement("a");return e.href=r,e.protocol===location.protocol&&e.host===location.host}const Kd="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let ml,ti;ml=[],ti=0;const vc=function(r,e){if(yn.supported&&(r.headers||(r.headers={}),r.headers.accept="image/webp,*/*"),ti>=Zt.MAX_PARALLEL_IMAGE_REQUESTS){const u={requestParameters:r,callback:e,cancelled:!1,cancel(){this.cancelled=!0}};return ml.push(u),u}ti++;let i=!1;const n=()=>{if(!i)for(i=!0,ti--;ml.length&&ti<Zt.MAX_PARALLEL_IMAGE_REQUESTS;){const u=ml.shift(),{requestParameters:h,callback:f,cancelled:_}=u;_||(u.cancel=vc(h,f).cancel)}},s=Vn(r,((u,h,f)=>{n(),u?e(u):h&&(self.createImageBitmap?(function(_,g){const v=new Blob([new Uint8Array(_)],{type:"image/png"});createImageBitmap(v).then((b=>{g(null,b)})).catch((b=>{g(new Error(`Could not load image because of ${b.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))}))})(h,((_,g)=>e(_,g,f))):(function(_,g){const v=new Image;v.onload=()=>{g(null,v),URL.revokeObjectURL(v.src),v.onload=null,requestAnimationFrame((()=>{v.src=Kd}))},v.onerror=()=>g(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 b=new Blob([new Uint8Array(_)],{type:"image/png"});v.src=_.byteLength?URL.createObjectURL(b):Kd})(h,((_,g)=>e(_,g,f))))}));return{cancel:()=>{s.cancel(),n()}}};var ih,Qd,Jd,ma={exports:{}},_l={exports:{}},gl={exports:{}},rh=(function(){if(Jd)return ma.exports;Jd=1;var r=(ih||(ih=1,_l.exports=function(i,n){var s,u,h,f,_,g,v,b;for(u=i.length-(s=3&i.length),h=n,_=3432918353,g=461845907,b=0;b<u;)v=255&i.charCodeAt(b)|(255&i.charCodeAt(++b))<<8|(255&i.charCodeAt(++b))<<16|(255&i.charCodeAt(++b))<<24,++b,h=27492+(65535&(f=5*(65535&(h=(h^=v=(65535&(v=(v=(65535&v)*_+(((v>>>16)*_&65535)<<16)&4294967295)<<15|v>>>17))*g+(((v>>>16)*g&65535)<<16)&4294967295)<<13|h>>>19))+((5*(h>>>16)&65535)<<16)&4294967295))+((58964+(f>>>16)&65535)<<16);switch(v=0,s){case 3:v^=(255&i.charCodeAt(b+2))<<16;case 2:v^=(255&i.charCodeAt(b+1))<<8;case 1:h^=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 h^=i.length,h=2246822507*(65535&(h^=h>>>16))+((2246822507*(h>>>16)&65535)<<16)&4294967295,h=3266489909*(65535&(h^=h>>>13))+((3266489909*(h>>>16)&65535)<<16)&4294967295,(h^=h>>>16)>>>0}),_l.exports),e=(Qd||(Qd=1,gl.exports=function(i,n){for(var s,u=i.length,h=n^u,f=0;u>=4;)s=1540483477*(65535&(s=255&i.charCodeAt(f)|(255&i.charCodeAt(++f))<<8|(255&i.charCodeAt(++f))<<16|(255&i.charCodeAt(++f))<<24))+((1540483477*(s>>>16)&65535)<<16),h=1540483477*(65535&h)+((1540483477*(h>>>16)&65535)<<16)^(s=1540483477*(65535&(s^=s>>>24))+((1540483477*(s>>>16)&65535)<<16)),u-=4,++f;switch(u){case 3:h^=(255&i.charCodeAt(f+2))<<16;case 2:h^=(255&i.charCodeAt(f+1))<<8;case 1:h=1540483477*(65535&(h^=255&i.charCodeAt(f)))+((1540483477*(h>>>16)&65535)<<16)}return h=1540483477*(65535&(h^=h>>>13))+((1540483477*(h>>>16)&65535)<<16),(h^=h>>>15)>>>0}),gl.exports);return ma.exports=r,ma.exports.murmur3=r,ma.exports.murmur2=e,ma.exports})(),bc=Wa(rh);class xn{constructor(e,...i){Object.assign(this,i[0]||{}),this.type=e}}class yl extends xn{constructor(e,i={}){super("error",Object.assign({error:e},i))}}function oh(r,e,i){i[r]&&i[r].indexOf(e)!==-1||(i[r]=i[r]||[],i[r].push(e))}function _a(r,e,i){if(i&&i[r]){const n=i[r].indexOf(e);n!==-1&&i[r].splice(n,1)}}class rs{on(e,i){return this._listeners=this._listeners||{},oh(e,i,this._listeners),this}off(e,i){return _a(e,i,this._listeners),_a(e,i,this._oneTimeListeners),this}once(e,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},oh(e,i,this._oneTimeListeners),this):new Promise((n=>{this.once(e,n)}))}fire(e,i){const n=typeof e=="string"?new xn(e,i):e,s=n.type;if(this.listens(s)){n.target=this;const u=this._listeners&&this._listeners[s]?this._listeners[s].slice():[];for(const _ of u)_.call(this,n);const h=this._oneTimeListeners&&this._oneTimeListeners[s]?this._oneTimeListeners[s].slice():[];for(const _ of h)_a(s,_,this._oneTimeListeners),_.call(this,n);const f=this._eventedParent;if(f){const _=typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData;Object.assign(n,_),f.fire(n)}}else n instanceof yl&&console.error(n.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 to{constructor(e){typeof e=="string"?this.name=e:(this.name=e.name,this.iconsetId=e.iconsetId)}static from(e){return new to(e)}static toString(e){return e.iconsetId?`${e.name}${e.iconsetId}`:e.name}static parse(e){const[i,n]=e.split("");return new to({name:i,iconsetId:n})}static isEqual(e,i){return e.name===i.name&&e.iconsetId===i.iconsetId}toString(){return to.toString(this)}serialize(){return{name:this.name,iconsetId:this.iconsetId}}}var wc,xl={},Vo=(function(){if(wc)return xl;wc=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(u){return(u=Math.round(u))<0?0:u>255?255:u}function i(u){return e(u[u.length-1]==="%"?parseFloat(u)/100*255:parseInt(u))}function n(u){return(h=u[u.length-1]==="%"?parseFloat(u)/100:parseFloat(u))<0?0:h>1?1:h;var h}function s(u,h,f){return f<0?f+=1:f>1&&(f-=1),6*f<1?u+(h-u)*f*6:2*f<1?h:3*f<2?u+(h-u)*(2/3-f)*6:u}try{xl.parseCSSColor=function(u){var h,f=u.replace(/ /g,"").toLowerCase();if(f in r)return r[f].slice();if(f[0]==="#")return f.length===4?(h=parseInt(f.substr(1),16))>=0&&h<=4095?[(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1]:null:f.length===7&&(h=parseInt(f.substr(1),16))>=0&&h<=16777215?[(16711680&h)>>16,(65280&h)>>8,255&h,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(","),w=1;switch(v){case"rgba":if(b.length!==4)return null;w=n(b.pop());case"rgb":return b.length!==3?null:[i(b[0]),i(b[1]),i(b[2]),w];case"hsla":if(b.length!==4)return null;w=n(b.pop());case"hsl":if(b.length!==3)return null;var S=(parseFloat(b[0])%360+360)%360/360,I=n(b[1]),P=n(b[2]),L=P<=.5?P*(I+1):P+I-P*I,R=2*P-L;return[e(255*s(R,L,S+1/3)),e(255*s(R,L,S)),e(255*s(R,L,S-1/3)),w];default:return null}}return null}}catch{}return xl})();class mi{constructor(e,i,n,s=1){this.r=e,this.g=i,this.b=n,this.a=s}static parse(e){if(!e)return;if(e instanceof mi)return e;if(typeof e!="string")return;const i=Vo.parseCSSColor(e);return i?new mi(i[0]/255,i[1]/255,i[2]/255,i[3]):void 0}toString(){const[e,i,n,s]=[this.r,this.g,this.b,this.a];return`rgba(${Math.round(255*e)},${Math.round(255*i)},${Math.round(255*n)},${s})`}toNonPremultipliedRenderColor(e){const{r:i,g:n,b:s,a:u}=this;return new tf(e,i,n,s,u)}toPremultipliedRenderColor(e){const{r:i,g:n,b:s,a:u}=this;return new rf(e,i*u,n*u,s*u,u)}clone(){return new mi(this.r,this.g,this.b,this.a)}}class ef{constructor(e,i,n,s,u,h=!1){if(this.premultiplied=!1,this.premultiplied=h,e){const f=e.image.height,_=f*f;this.premultiplied?(i=u===0?0:i/u*(f-1),n=u===0?0:n/u*(f-1),s=u===0?0:s/u*(f-1)):(i*=f-1,n*=f-1,s*=f-1);const g=Math.floor(i),v=Math.floor(n),b=Math.floor(s),w=Math.ceil(i),S=Math.ceil(n),I=Math.ceil(s),P=i-g,L=n-v,R=s-b,O=e.image.data,U=4*(g+v*_+b*f),G=4*(g+v*_+I*f),K=4*(g+S*_+b*f),Z=4*(g+S*_+I*f),te=4*(w+v*_+b*f),re=4*(w+v*_+I*f),se=4*(w+S*_+b*f),we=4*(w+S*_+I*f);if(U<0||we>=O.length)throw new Error("out of range");this.r=bt(bt(bt(O[U],O[G],R),bt(O[K],O[Z],R),L),bt(bt(O[te],O[re],R),bt(O[se],O[we],R),L),P)/255*(this.premultiplied?u:1),this.g=bt(bt(bt(O[U+1],O[G+1],R),bt(O[K+1],O[Z+1],R),L),bt(bt(O[te+1],O[re+1],R),bt(O[se+1],O[we+1],R),L),P)/255*(this.premultiplied?u:1),this.b=bt(bt(bt(O[U+2],O[G+2],R),bt(O[K+2],O[Z+2],R),L),bt(bt(O[te+2],O[re+2],R),bt(O[se+2],O[we+2],R),L),P)/255*(this.premultiplied?u:1),this.a=u}else this.r=i,this.g=n,this.b=s,this.a=u}toArray(){const{r:e,g:i,b:n,a:s}=this;return[255*e,255*i,255*n,s]}toHslaArray(){let{r:e,g:i,b:n,a:s}=this;if(this.premultiplied){if(s===0)return[0,0,0,0];const I=1/s;e*=I,i*=I,n*=I}const u=Math.min(Math.max(e,0),1),h=Math.min(Math.max(i,0),1),f=Math.min(Math.max(n,0),1),_=Math.min(u,h,f),g=Math.max(u,h,f),v=g-_,b=.5*(_+g);if(v===0)return[0,0,100*b,s];const w=b>.5?v/(2-g-_):v/(g+_);let S;switch(g){case u:S=60*((h-f)/v+(h<f?6:0));break;case h:S=60*((f-u)/v+2);break;default:S=60*((u-h)/v+4)}return[S,100*w,100*b,s]}toArray01(){const{r:e,g:i,b:n,a:s}=this;return[e,i,n,s]}toArray01Scaled(e){const{r:i,g:n,b:s}=this;return[i*e,n*e,s*e]}toArray01Linear(){const{r:e,g:i,b:n,a:s}=this;return[Math.pow(e,2.2),Math.pow(i,2.2),Math.pow(n,2.2),s]}}class tf extends ef{constructor(e,i,n,s,u){super(e,i,n,s,u,!1)}}class rf extends ef{constructor(e,i,n,s,u){super(e,i,n,s,u,!0)}}function bt(r,e,i){return r*(1-i)+e*i}function nh(r,e,i){return r.map(((n,s)=>bt(n,e[s],i)))}mi.black=new mi(0,0,0,1),mi.white=new mi(1,1,1,1),mi.transparent=new mi(0,0,0,0),mi.red=new mi(1,0,0,1),mi.blue=new mi(0,0,1,1);var vl=Object.freeze({__proto__:null,array:nh,color:function(r,e,i){return new mi(bt(r.r,e.r,i),bt(r.g,e.g,i),bt(r.b,e.b,i),bt(r.a,e.a,i))},number:bt});class Uo extends Error{constructor(e,i){super(i),this.message=i,this.key=e}}class Cs{constructor(e,i=[]){this.parent=e,this.bindings={};for(const[n,s]of i)this.bindings[n]=s}concat(e){return new Cs(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 nn={kind:"null"},ft={kind:"number"},Yt={kind:"string"},xi={kind:"boolean"},mo={kind:"color"},vn={kind:"object"},di={kind:"value"},Tc={kind:"collator"},bl={kind:"formatted"},wl={kind:"resolvedImage"};function qr(r,e){return{kind:"array",itemType:r,N:e}}function _r(r){if(r.kind==="array"){const e=_r(r.itemType);return typeof r.N=="number"?`array<${e}, ${r.N}>`:r.itemType.kind==="value"?"array":`array<${e}>`}return r.kind}const Qp=[nn,ft,Yt,xi,mo,bl,vn,qr(di),wl];function ga(r,e){if(e.kind==="error")return null;if(r.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!ga(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 Qp)if(!ga(i,e))return null}}return`Expected ${_r(r)} but found ${_r(e)} instead.`}function ah(r,e){return e.some((i=>i.kind===r.kind))}function Tl(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))}function Ec(r,e){return r.kind==="array"&&e.kind==="array"?r.N===e.N&&Ec(r.itemType,e.itemType):r.kind===e.kind}class sh{constructor(e,i,n){this.sensitivity=e?i?"variant":"case":i?"accent":"base",this.locale=n,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 Sc{constructor(e,i,n,s,u){this.text=e.normalize?e.normalize():e,this.image=i,this.scale=n,this.fontStack=s,this.textColor=u}}class no{constructor(e){this.sections=e}static fromString(e){return new no([new Sc(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 no?e:no.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 s=i.image.getPrimary().id.toString();e.push(["image",s]);continue}e.push(i.text);const n={};i.fontStack&&(n["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(n["font-scale"]=i.scale),i.textColor&&(n["text-color"]=["rgba"].concat(i.textColor.toNonPremultipliedRenderColor(null).toArray())),e.push(n)}return e}}class Un{constructor(e,i={}){this.id=to.from(e),this.params=i.params,this.sx=i.sx||1,this.sy=i.sy||1}toString(){return JSON.stringify(this)}static parse(e){let i,n,s,u;try{({id:i,params:n,sx:s,sy:u}=JSON.parse(e)||{})}catch{return null}return i?new Un(i,{params:n,sx:s,sy:u}):null}scaleSelf(e,i=e){return this.sx*=e,this.sy*=i,this}}class ao{constructor(e,i,n,s,u=!1){this.primaryId=to.from(e),this.primaryOptions=i,n&&(this.secondaryId=to.from(n)),this.secondaryOptions=s,this.available=u}toString(){return this.primaryId&&this.secondaryId?`[${this.primaryId.name},${this.secondaryId.name}]`:this.primaryId.name}hasPrimary(){return!!this.primaryId}getPrimary(){return new Un(this.primaryId,this.primaryOptions)}hasSecondary(){return!!this.secondaryId}getSecondary(){return this.secondaryId?new Un(this.secondaryId,this.secondaryOptions):null}static from(e){return typeof e=="string"?ao.build({name:e}):e}static build(e,i,n,s){return!e||typeof e=="object"&&!("name"in e)?null:new ao(e,n,i,s)}}function os(r,e,i,n){return typeof r=="number"&&r>=0&&r<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof i=="number"&&i>=0&&i<=255?n===void 0||typeof n=="number"&&n>=0&&n<=1?null:`Invalid rgba value [${[r,e,i,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof n=="number"?[r,e,i,n]:[r,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ps(r){if(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number"||r instanceof mi||r instanceof sh||r instanceof no||r instanceof ao)return!0;if(Array.isArray(r)){for(const e of r)if(!Ps(e))return!1;return!0}if(typeof r=="object"){for(const e in r)if(!Ps(r[e]))return!1;return!0}return!1}function Pr(r){if(r===null)return nn;if(typeof r=="string")return Yt;if(typeof r=="boolean")return xi;if(typeof r=="number")return ft;if(r instanceof mi)return mo;if(r instanceof sh)return Tc;if(r instanceof no)return bl;if(r instanceof ao)return wl;if(Array.isArray(r)){const e=r.length;let i;for(const n of r){const s=Pr(n);if(i){if(i===s)continue;i=di;break}i=s}return qr(i||di,e)}return vn}function No(r){const e=typeof r;return r===null?"":e==="string"||e==="number"||e==="boolean"?String(r):r instanceof no||r instanceof ao||r instanceof mi?r.toString():JSON.stringify(r)}class Nn{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(!Ps(e[1]))return i.error("invalid value");const n=e[1];let s=Pr(n);const u=i.expectedType;return s.kind!=="array"||s.N!==0||!u||u.kind!=="array"||typeof u.N=="number"&&u.N!==0||(s=u),new Nn(s,n)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof mi?["rgba"].concat(this.value.toNonPremultipliedRenderColor(null).toArray()):this.value instanceof no?this.value.serialize():this.value}}class Ir{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}const lh={string:Yt,number:ft,boolean:xi,object:vn};class an{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 n,s=1;const u=e[0];if(u==="array"){let f,_;if(e.length>2){const g=e[1];if(typeof g!="string"||!(g in lh)||g==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);f=lh[g],s++}else f=di;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],s++}n=qr(f,_)}else n=lh[u];const h=[];for(;s<e.length;s++){const f=i.parse(e[s],s,di);if(!f)return null;h.push(f)}return new an(n,h)}evaluate(e){for(let i=0;i<this.args.length;i++){const n=this.args[i].evaluate(e);if(!ga(this.type,Pr(n)))return n;if(i===this.args.length-1)throw new Ir(`The expression ${JSON.stringify(this.args[i].serialize())} evaluated to ${_r(Pr(n))} but was expected to be of type ${_r(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 n=e.itemType;if(n.kind==="string"||n.kind==="number"||n.kind==="boolean"){i.push(n.kind);const s=e.N;(typeof s=="number"||this.args.length>1)&&i.push(s)}}return i.concat(this.args.map((n=>n.serialize())))}}class bn{constructor(e){this.type=bl,this.sections=e}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const n=e[1];if(!Array.isArray(n)&&typeof n=="object")return i.error("First argument must be an image or text section.");const s=[];let u=!1;for(let h=1;h<=e.length-1;++h){const f=e[h];if(u&&typeof f=="object"&&!Array.isArray(f)){u=!1;let _=null;if(f["font-scale"]&&(_=i.parseObjectValue(f["font-scale"],h,"font-scale",ft),!_))return null;let g=null;if(f["text-font"]&&(g=i.parseObjectValue(f["text-font"],h,"text-font",qr(Yt)),!g))return null;let v=null;if(f["text-color"]&&(v=i.parseObjectValue(f["text-color"],h,"text-color",mo),!v))return null;const b=s[s.length-1];b.scale=_,b.font=g,b.textColor=v}else{const _=i.parse(e[h],h,di);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'.");u=!0,s.push({content:_,scale:null,font:null,textColor:null})}}return new bn(s)}evaluate(e){return new no(this.sections.map((i=>{const n=i.content.evaluate(e);return Ec(Pr(n),wl)?new Sc("",n,null,null,null):new Sc(No(n),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 n={};i.scale&&(n["font-scale"]=i.scale.serialize()),i.font&&(n["text-font"]=i.font.serialize()),i.textColor&&(n["text-color"]=i.textColor.serialize()),e.push(n)}return e}}class Bt{constructor(e,i,n,s){this._imageWarnHistory={},this.type=wl,this.namePrimary=e,this.nameSecondary=i,n&&(this.paramsPrimary=n.params,this.iconsetIdPrimary=n.iconset?n.iconset.id:void 0),s&&(this.paramsSecondary=s.params,this.iconsetIdSecondary=s.iconset?s.iconset.id:void 0)}static parse(e,i){if(e.length<2)return i.error("Expected two or more arguments.");let n=1;const s=[];function u(){if(n<e.length){const f=i.parse(e[n],n++,Yt);return f?(s.push({image:f,options:{}}),!0):(i.error(s.length?"Secondary image variant is not a string.":"No image name provided."),!1)}return!0}function h(){if(n<e.length){const _=e[n];if((f=_)===null||typeof f!="object"||Array.isArray(f))return!0;const g=_.params,v=_.iconset,b=i.concat(n);if(!g&&!v)return n++,!0;if(g){if(typeof g!="object"||g.constructor!==Object)return b.error('Image options "params" should be an object'),!1;const w={},S=b.concat(void 0,"params");for(const I in g){if(!I)return S.error("Image parameter name should be non-empty"),!1;const P=S.concat(void 0,I).parse(g[I],void 0,mo,void 0,{typeAnnotation:"coerce"});if(!P)return!1;w[I]=P}s[s.length-1].options.params=w}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;s[s.length-1].options.iconset=v}return n++,!0}var f;return!0}for(let f=0;f<2;f++)if(!u()||!h())return;return new Bt(s[0].image,s[1]?s[1].image:void 0,s[0].options,s[1]?s[1].options:void 0)}evaluateParams(e,i){const n={};if(i){for(const s in i)if(i[s])try{n[s]=i[s].evaluate(e)}catch{continue}if(Object.keys(n).length!==0)return{params:n}}}evaluate(e){const i={name:this.namePrimary.evaluate(e),iconsetId:this.iconsetIdPrimary},n=this.nameSecondary?{name:this.nameSecondary.evaluate(e),iconsetId:this.iconsetIdSecondary}:void 0,s=ao.build(i,n,this.paramsPrimary?this.evaluateParams(e,this.paramsPrimary):void 0,this.paramsSecondary?this.evaluateParams(e,this.paramsSecondary):void 0);if(s&&e.availableImages){const u=s.getPrimary().id;if(s.available=e.availableImages.some((h=>to.isEqual(h,u))),s.available){const h=s.getSecondary()?s.getSecondary().id:null;h&&(s.available=e.availableImages.some((f=>to.isEqual(f,h))))}}return s}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 n={};if(i&&(n.iconset={id:i}),e){n.params={};for(const s in e)e[s]&&(n.params[s]=e[s].serialize())}return Object.keys(n).length>0?n: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 ht(r){return Et(r)?"string":zs(r)?"number":Ac(r)?"boolean":Array.isArray(r)?"array":r===null?"null":Ic(r)?"object":typeof r}function Ic(r){return r!=null&&!Array.isArray(r)&&typeof r!="function"&&!(r instanceof String||r instanceof Number||r instanceof Boolean)&&typeof r=="object"}function Et(r){return typeof r=="string"||r instanceof String}function zs(r){return typeof r=="number"||r instanceof Number}function Ac(r){return typeof r=="boolean"||r instanceof Boolean}const Tt={"to-boolean":xi,"to-color":mo,"to-number":ft,"to-string":Yt};class wn{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 n=e[0],s=[];let u=nn;if(n==="to-array"){if(!Array.isArray(e[1]))return null;const h=e[1].length;if(i.expectedType){if(i.expectedType.kind!=="array")return i.error(`Expected ${i.expectedType.kind} but found array.`);u=qr(i.expectedType.itemType,h)}else{if(!(h>0&&Ps(e[1][0])))return null;u=qr(Pr(e[1][0]),h)}for(let f=0;f<h;f++){const _=e[1][f];let g;if(Array.isArray(_))g=i.parse(_,void 0,u.itemType);else{const v=ht(_);if(v!==u.itemType.kind)return i.error(`Expected ${u.itemType.kind} but found ${v}.`);g=i.registry.literal.parse(["literal",_===void 0?null:_],i)}if(!g)return null;s.push(g)}}else{if((n==="to-boolean"||n==="to-string")&&e.length!==2)return i.error("Expected one argument.");u=Tt[n];for(let h=1;h<e.length;h++){const f=i.parse(e[h],h,di);if(!f)return null;s.push(f)}}return new wn(u,s)}evaluate(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){let i,n;for(const s of this.args){if(i=s.evaluate(e),n=null,i instanceof mi)return i;if(typeof i=="string"){const u=e.parseColor(i);if(u)return u}else if(Array.isArray(i)&&(n=i.length<3||i.length>4?`Invalid rbga value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:os(i[0],i[1],i[2],i[3]),!n))return new mi(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new Ir(n||`Could not parse color from value '${typeof i=="string"?i:String(JSON.stringify(i))}'`)}if(this.type.kind==="number"){let i=null;for(const n of this.args){if(i=n.evaluate(e),i===null)return 0;const s=Number(i);if(!isNaN(s))return s}throw new Ir(`Could not convert ${JSON.stringify(i)} to number.`)}return this.type.kind==="formatted"?no.fromString(No(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?ao.build(No(this.args[0].evaluate(e))):this.type.kind==="array"?this.args.map((i=>i.evaluate(e))):No(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 bn([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Bt(this.args[0]).serialize();const e=this.type.kind==="array"?[]:[`to-${this.type.kind}`];return this.eachChild((i=>{e.push(i.serialize())})),e}}const ch=["Unknown","Point","LineString","Polygon"];class Mc{constructor(e,i,n){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,this.iconImageUseTheme=n}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?ch[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:n,y:s}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(n*i-e[0])+this.featureDistanceData.bearing[1]*(s*i-e[1])}return 0}parseColor(e){let i=this._parseColorCache[e];return i||(i=this._parseColorCache[e]=mi.parse(e)),i}getConfig(e){return this.options?this.options.get(e):null}}class so{constructor(e,i,n,s,u){this.name=e,this.type=i,this._evaluate=n,this.args=s,this._overloadIndex=u}evaluate(e){if(!this._evaluate){const i=so.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 n=e[0],s=so.definitions[n];if(!s)return i.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0);const u=Array.isArray(s)?s[0]:s.type,h=Array.isArray(s)?[[s[1],s[2]]]:s.overloads,f=[];let _=null,g=-1;for(const[v,b]of h){if(Array.isArray(v)&&v.length!==e.length-1)continue;f.push(v),g++,_=new Uc(i.registry,i.path,null,i.scope,void 0,i._scope,i.options,i.iconImageUseTheme);const w=[];let S=!1;for(let I=1;I<e.length;I++){const P=e[I],L=Array.isArray(v)?v[I-1]:v.type,R=_.parse(P,1+w.length,L);if(!R){S=!0;break}w.push(R)}if(!S)if(Array.isArray(v)&&v.length!==w.length)_.error(`Expected ${v.length} arguments, but found ${w.length} instead.`);else{for(let I=0;I<w.length;I++){const P=Array.isArray(v)?v[I]:v.type,L=w[I];_.concat(I+1).checkSubtype(P,L.type)}if(_.errors.length===0)return new so(n,u,b,w,g)}}if(f.length===1)i.errors.push(..._.errors);else{const v=(f.length?f:h.map((([w])=>w))).map(Cc).join(" | "),b=[];for(let w=1;w<e.length;w++){const S=i.parse(e[w],1+b.length);if(!S)return null;b.push(_r(S.type))}i.error(`Expected arguments of type ${v}, but found (${b.join(", ")}) instead.`)}return null}static register(e,i){so.definitions=i;for(const n in i)e[n]=so}}function Cc(r){return Array.isArray(r)?`(${r.map(_r).join(", ")})`:`(${_r(r.type)}...)`}class Or{constructor(e,i,n){this.type=Tc,this.locale=n,this.caseSensitive=e,this.diacriticSensitive=i}static parse(e,i){if(e.length!==2)return i.error("Expected one argument.");const n=e[1];if(typeof n!="object"||Array.isArray(n))return i.error("Collator options argument must be an object.");const s=n["case-sensitive"]===void 0?i.parse(!1,1,xi):i.parseObjectValue(n["case-sensitive"],1,"case-sensitive",xi);if(!s)return null;const u=n["diacritic-sensitive"]===void 0?i.parse(!1,1,xi):i.parseObjectValue(n["diacritic-sensitive"],1,"diacritic-sensitive",xi);if(!u)return null;let h=null;return n.locale&&(h=i.parseObjectValue(n.locale,1,"locale",Yt),!h)?null:new Or(s,u,h)}evaluate(e){return new sh(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 Pc(r,e,i=0,n=r.length-1,s=uh){for(;n>i;){if(n-i>600){const _=n-i+1,g=e-i+1,v=Math.log(_),b=.5*Math.exp(2*v/3),w=.5*Math.sqrt(v*b*(_-b)/_)*(g-_/2<0?-1:1);Pc(r,e,Math.max(i,Math.floor(e-g*b/_+w)),Math.min(n,Math.floor(e+(_-g)*b/_+w)),s)}const u=r[e];let h=i,f=n;for(sn(r,i,e),s(r[n],u)>0&&sn(r,i,n);h<f;){for(sn(r,h,f),h++,f--;s(r[h],u)<0;)h++;for(;s(r[f],u)>0;)f--}s(r[i],u)===0?sn(r,i,f):(f++,sn(r,f,n)),f<=e&&(i=f+1),e<=f&&(n=f-1)}}function sn(r,e,i){const n=r[e];r[e]=r[i],r[i]=n}function uh(r,e){return r<e?-1:r>e?1:0}function ya(r){let e=0;for(let i,n,s=0,u=r.length,h=u-1;s<u;h=s++)i=r[s],n=r[h],e+=(n.x-i.x)*(i.y+n.y);return e}function jo(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 Jp(r,e,i){const n=r[0]-e[0],s=r[1]-e[1],u=r[0]-i[0],h=r[1]-i[1];return n*h-u*s==0&&n*u<=0&&s*h<=0}function Ds(r,e,i=!1){let n=!1;for(let f=0,_=e.length;f<_;f++){const g=e[f];for(let v=0,b=g.length,w=b-1;v<b;w=v++){const S=g[w],I=g[v];if(Jp(r,S,I))return i;(u=S)[1]>(s=r)[1]!=(h=I)[1]>s[1]&&s[0]<(h[0]-u[0])*(s[1]-u[1])/(h[1]-u[1])+u[0]&&(n=!n)}}var s,u,h;return n}function Sl(r,e,i,n){const s=n[0]-i[0],u=n[1]-i[1],h=(r[0]-i[0])*u-s*(r[1]-i[1]),f=(e[0]-i[0])*u-s*(e[1]-i[1]);return h>0&&f<0||h<0&&f>0}function Il(r,e,i,n){return(s=[n[0]-i[0],n[1]-i[1]])[0]*(u=[e[0]-r[0],e[1]-r[1]])[1]-s[1]*u[0]!=0&&!(!Sl(r,e,i,n)||!Sl(i,n,r,e));var s,u}function jn(r){const e=new Be(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),i=new Be(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);for(const n of r[0])e.x>n.x&&(e.x=n.x),e.y>n.y&&(e.y=n.y),i.x<n.x&&(i.x=n.x),i.y<n.y&&(i.y=n.y);return{min:e,max:i}}const xa=8192;function em(r,e){const i=(180+r[0])/360,n=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r[1]*Math.PI/360)))/360,s=Math.pow(2,e.z);return[Math.round(i*s*xa),Math.round(n*s*xa)]}function hh(r,e){for(let i=0;i<e.length;i++)if(Ds(r,e[i]))return!0;return!1}function tm(r,e,i){for(const n of i)for(let s=0,u=n.length,h=u-1;s<u;h=s++)if(Il(r,e,n[h],n[s]))return!0;return!1}function of(r,e){for(let i=0;i<r.length;++i)if(!Ds(r[i],e))return!1;for(let i=0;i<r.length-1;++i)if(tm(r[i],r[i+1],e))return!1;return!0}function nf(r,e){for(let i=0;i<e.length;i++)if(of(r,e[i]))return!0;return!1}function dh(r,e,i){const n=[];for(let s=0;s<r.length;s++){const u=[];for(let h=0;h<r[s].length;h++){const f=em(r[s][h],i);jo(e,f),u.push(f)}n.push(u)}return n}function va(r,e,i){const n=[];for(let s=0;s<r.length;s++){const u=dh(r[s],e,i);n.push(u)}return n}function af(r,e,i,n){if(r[0]<i[0]||r[0]>i[2]){const s=.5*n;let u=r[0]-i[0]>s?-n:i[0]-r[0]>s?n:0;u===0&&(u=r[0]-i[2]>s?-n:i[2]-r[0]>s?n:0),r[0]+=u}jo(e,r)}function sf(r,e,i,n){const s=Math.pow(2,n.z)*xa,u=[n.x*xa,n.y*xa],h=[];if(!r)return h;for(const f of r)for(const _ of f){const g=[_.x+u[0],_.y+u[1]];af(g,e,i,s),h.push(g)}return h}function zc(r,e,i,n){const s=Math.pow(2,n.z)*xa,u=[n.x*xa,n.y*xa],h=[];if(!r)return h;for(const _ of r){const g=[];for(const v of _){const b=[v.x+u[0],v.y+u[1]];jo(e,b),g.push(b)}h.push(g)}if(e[2]-e[0]<=s/2){(f=e)[0]=f[1]=1/0,f[2]=f[3]=-1/0;for(const _ of h)for(const g of _)af(g,e,i,s)}var f;return h}class ba{constructor(e,i){this.type=xi,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(Ps(e[1])){const n=e[1];if(n.type==="FeatureCollection")for(let s=0;s<n.features.length;++s){const u=n.features[s].geometry.type;if(u==="Polygon"||u==="MultiPolygon")return new ba(n,n.features[s].geometry)}else if(n.type==="Feature"){const s=n.geometry.type;if(s==="Polygon"||s==="MultiPolygon")return new ba(n,n.geometry)}else if(n.type==="Polygon"||n.type==="MultiPolygon")return new ba(n,n)}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,n){const s=[1/0,1/0,-1/0,-1/0],u=[1/0,1/0,-1/0,-1/0],h=i.canonicalID();if(!h)return!1;if(n.type==="Polygon"){const f=dh(n.coordinates,u,h),_=sf(i.geometry(),s,u,h);if(!El(s,u))return!1;for(const g of _)if(!Ds(g,f))return!1}if(n.type==="MultiPolygon"){const f=va(n.coordinates,u,h),_=sf(i.geometry(),s,u,h);if(!El(s,u))return!1;for(const g of _)if(!hh(g,f))return!1}return!0})(e,this.geometries);if(e.geometryType()==="LineString")return(function(i,n){const s=[1/0,1/0,-1/0,-1/0],u=[1/0,1/0,-1/0,-1/0],h=i.canonicalID();if(!h)return!1;if(n.type==="Polygon"){const f=dh(n.coordinates,u,h),_=zc(i.geometry(),s,u,h);if(!El(s,u))return!1;for(const g of _)if(!of(g,f))return!1}if(n.type==="MultiPolygon"){const f=va(n.coordinates,u,h),_=zc(i.geometry(),s,u,h);if(!El(s,u))return!1;for(const g of _)if(!nf(g,f))return!1}return!0})(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}const Al={kilometers:1,miles:1e3/1609.344,nauticalmiles:1e3/1852,meters:1e3,metres:1e3,yards:1e3/.9144,feet:1e3/.3048,inches:1e3/.0254},Go=1/298.257223563,lf=Go*(2-Go),Rs=Math.PI/180;class Ls{static fromTile(e,i,n){const s=Math.PI*(1-2*(e+.5)/Math.pow(2,i)),u=Math.atan(.5*(Math.exp(s)-Math.exp(-s)))/Rs;return new Ls(u,n)}static get units(){return Al}constructor(e,i){if(e===void 0)throw new Error("No latitude given.");if(i&&!Al[i])throw new Error(`Unknown unit ${i}. Use one of: ${Object.keys(Al).join(", ")}`);const n=6378.137*Rs*(i?Al[i]:1),s=Math.cos(e*Rs),u=1/(1-lf*(1-s*s)),h=Math.sqrt(u);this.kx=n*h*s,this.ky=n*h*u*(1-lf)}distance(e,i){const n=zo(e[0]-i[0])*this.kx,s=(e[1]-i[1])*this.ky;return Math.sqrt(n*n+s*s)}bearing(e,i){const n=zo(i[0]-e[0])*this.kx;return Math.atan2(n,(i[1]-e[1])*this.ky)/Rs}destination(e,i,n){const s=n*Rs;return this.offset(e,Math.sin(s)*i,Math.cos(s)*i)}offset(e,i,n){return[e[0]+i/this.kx,e[1]+n/this.ky]}lineDistance(e){let i=0;for(let n=0;n<e.length-1;n++)i+=this.distance(e[n],e[n+1]);return i}area(e){let i=0;for(let n=0;n<e.length;n++){const s=e[n];for(let u=0,h=s.length,f=h-1;u<h;f=u++)i+=zo(s[u][0]-s[f][0])*(s[u][1]+s[f][1])*(n?-1:1)}return Math.abs(i)/2*this.kx*this.ky}along(e,i){let n=0;if(i<=0)return e[0];for(let s=0;s<e.length-1;s++){const u=e[s],h=e[s+1],f=this.distance(u,h);if(n+=f,n>i)return Dc(u,h,(i-(n-f))/f)}return e[e.length-1]}pointToSegmentDistance(e,i,n){let[s,u]=i,h=zo(n[0]-s)*this.kx,f=(n[1]-u)*this.ky;if(h!==0||f!==0){const _=(zo(e[0]-s)*this.kx*h+(e[1]-u)*this.ky*f)/(h*h+f*f);_>1?(s=n[0],u=n[1]):_>0&&(s+=h/this.kx*_,u+=f/this.ky*_)}return h=zo(e[0]-s)*this.kx,f=(e[1]-u)*this.ky,Math.sqrt(h*h+f*f)}pointOnLine(e,i){let n=1/0,s=e[0][0],u=e[0][1],h=0,f=0;for(let _=0;_<e.length-1;_++){let g=e[_][0],v=e[_][1],b=zo(e[_+1][0]-g)*this.kx,w=(e[_+1][1]-v)*this.ky,S=0;b===0&&w===0||(S=(zo(i[0]-g)*this.kx*b+(i[1]-v)*this.ky*w)/(b*b+w*w),S>1?(g=e[_+1][0],v=e[_+1][1]):S>0&&(g+=b/this.kx*S,v+=w/this.ky*S)),b=zo(i[0]-g)*this.kx,w=(i[1]-v)*this.ky;const I=b*b+w*w;I<n&&(n=I,s=g,u=v,h=_,f=S)}return{point:[s,u],index:h,t:Math.max(0,Math.min(1,f))}}lineSlice(e,i,n){let s=this.pointOnLine(n,e),u=this.pointOnLine(n,i);if(s.index>u.index||s.index===u.index&&s.t>u.t){const g=s;s=u,u=g}const h=[s.point],f=s.index+1,_=u.index;!fh(n[f],h[0])&&f<=_&&h.push(n[f]);for(let g=f+1;g<=_;g++)h.push(n[g]);return fh(n[_],u.point)||h.push(u.point),h}lineSliceAlong(e,i,n){let s=0;const u=[];for(let h=0;h<n.length-1;h++){const f=n[h],_=n[h+1],g=this.distance(f,_);if(s+=g,s>e&&u.length===0&&u.push(Dc(f,_,(e-(s-g))/g)),s>=i)return u.push(Dc(f,_,(i-(s-g))/g)),u;s>e&&u.push(_)}return u}bufferPoint(e,i){const n=i/this.ky,s=i/this.kx;return[e[0]-s,e[1]-n,e[0]+s,e[1]+n]}bufferBBox(e,i){const n=i/this.ky,s=i/this.kx;return[e[0]-s,e[1]-n,e[2]+s,e[3]+n]}insideBBox(e,i){return zo(e[0]-i[0])>=0&&zo(e[0]-i[2])<=0&&e[1]>=i[1]&&e[1]<=i[3]}}function fh(r,e){return r[0]===e[0]&&r[1]===e[1]}function Dc(r,e,i){const n=zo(e[0]-r[0]);return[r[0]+n*i,r[1]+(e[1]-r[1])*i]}function zo(r){for(;r<-180;)r+=360;for(;r>180;)r-=360;return r}class Rc{constructor(e=[],i=((n,s)=>n<s?-1:n>s?1:0)){if(this.data=e,this.length=this.data.length,this.compare=i,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}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:n}=this,s=i[e];for(;e>0;){const u=e-1>>1,h=i[u];if(n(s,h)>=0)break;i[e]=h,e=u}i[e]=s}_down(e){const{data:i,compare:n}=this,s=this.length>>1,u=i[e];for(;e<s;){let h=1+(e<<1);const f=h+1;if(f<this.length&&n(i[f],i[h])<0&&(h=f),n(i[h],u)>=0)break;i[e]=i[h],e=h}i[e]=u}}var $e=8192;function ph(r,e){return e.dist-r.dist}const Lc=100,Fc=50;function mh(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 Ml(r){return r[1]-r[0]+1}function Tn(r,e){const i=r[1]>=r[0]&&r[1]<e;return i||console.warn("Distance Expression: Index is out of range"),i}function _h(r,e){if(r[0]>r[1])return[null,null];const i=Ml(r);if(e){if(i===2)return[r,null];const n=Math.floor(i/2);return[[r[0],r[0]+n],[r[0]+n,r[1]]]}{if(i===1)return[r,null];const n=Math.floor(i/2)-1;return[[r[0],r[0]+n],[r[0]+n+1,r[1]]]}}function ns(r,e){const i=[1/0,1/0,-1/0,-1/0];if(!Tn(e,r.length))return i;for(let n=e[0];n<=e[1];++n)jo(i,r[n]);return i}function as(r){const e=[1/0,1/0,-1/0,-1/0];for(let i=0;i<r.length;++i)for(let n=0;n<r[i].length;++n)jo(e,r[i][n]);return e}function wa(r,e,i){if(mh(r)||mh(e))return NaN;let n=0,s=0;return r[2]<e[0]&&(n=e[0]-r[2]),r[0]>e[2]&&(n=r[0]-e[2]),r[1]>e[3]&&(s=r[1]-e[3]),r[3]<e[1]&&(s=e[1]-r[3]),i.distance([0,0],[n,s])}function Bc(r){return 360*r-180}function cf(r){return 360/Math.PI*Math.atan(Math.exp((180-360*r)*Math.PI/180))-90}function kc(r,e){const i=Math.pow(2,e.z),n=(r.y/$e+e.y)/i;return[Bc((r.x/$e+e.x)/i),cf(n)]}function im(r,e){const i=[];for(let n=0;n<r.length;++n)i.push(kc(r[n],e));return i}function uf(r,e,i){const n=i.pointOnLine(e,r).point;return i.distance(r,n)}function gh(r,e,i,n,s){const u=i.slice(n[0],n[1]+1);let h=1/0;for(let f=e[0];f<=e[1];++f)if((h=Math.min(h,uf(r[f],u,s)))===0)return 0;return h}function Ta(r,e,i,n,s){const u=Math.min(s.pointToSegmentDistance(r,i,n),s.pointToSegmentDistance(e,i,n)),h=Math.min(s.pointToSegmentDistance(i,r,e),s.pointToSegmentDistance(n,r,e));return Math.min(u,h)}function Qt(r,e,i,n,s){if(!Tn(e,r.length)||!Tn(n,i.length))return NaN;let u=1/0;for(let h=e[0];h<e[1];++h)for(let f=n[0];f<n[1];++f){if(Il(r[h],r[h+1],i[f],i[f+1]))return 0;u=Math.min(u,Ta(r[h],r[h+1],i[f],i[f+1],s))}return u}function rm(r,e,i,n,s){if(!Tn(e,r.length)||!Tn(n,i.length))return NaN;let u=1/0;for(let h=e[0];h<=e[1];++h)for(let f=n[0];f<=n[1];++f)if((u=Math.min(u,s.distance(r[h],i[f])))===0)return u;return u}function om(r,e,i){if(Ds(r,e,!0))return 0;let n=1/0;for(const s of e){const u=s.length;if(u<2)return console.warn("Distance Expression: Invalid polygon!"),NaN;if(s[0]!==s[u-1]&&(n=Math.min(n,i.pointToSegmentDistance(r,s[u-1],s[0])))===0||(n=Math.min(n,uf(r,s,i)))===0)return n}return n}function nm(r,e,i,n){if(!Tn(e,r.length))return NaN;for(let u=e[0];u<=e[1];++u)if(Ds(r[u],i,!0))return 0;let s=1/0;for(let u=e[0];u<e[1];++u)for(const h of i)for(let f=0,_=h.length,g=_-1;f<_;g=f++){if(Il(r[u],r[u+1],h[g],h[f]))return 0;s=Math.min(s,Ta(r[u],r[u+1],h[g],h[f],n))}return s}function yh(r,e){for(const i of r)for(let n=0;n<=i.length-1;++n)if(Ds(i[n],e,!0))return!0;return!1}function am(r,e,i,n=1/0){const s=as(r),u=as(e);if(n!==1/0&&wa(s,u,i)>=n)return n;if(El(s,u)){if(yh(r,e))return 0}else if(yh(e,r))return 0;let h=n;for(const f of r)for(let _=0,g=f.length,v=g-1;_<g;v=_++)for(const b of e)for(let w=0,S=b.length,I=S-1;w<S;I=w++){if(Il(f[v],f[_],b[I],b[w]))return 0;h=Math.min(h,Ta(f[v],f[_],b[I],b[w],i))}return h}function Ui(r,e,i,n,s,u,h){if(u===null||h===null)return;const f=wa(ns(n,u),ns(s,h),i);f<e&&r.push({dist:f,range1:u,range2:h})}function sm(r,e,i,n,s=1/0){let u=Math.min(n.distance(r[0],i[0][0]),s);if(u===0)return u;const h=new Rc([{dist:0,range1:[0,r.length-1],range2:[0,0]}],ph),f=e?Fc:Lc,_=as(i);for(;h.length;){const g=h.pop();if(g.dist>=u)continue;const v=g.range1;if(Ml(v)<=f){if(!Tn(v,r.length))return NaN;if(e){const b=nm(r,v,i,n);if((u=Math.min(u,b))===0)return u}else for(let b=v[0];b<=v[1];++b){const w=om(r[b],i,n);if((u=Math.min(u,w))===0)return u}}else{const b=_h(v,e);if(b[0]!==null){const w=wa(ns(r,b[0]),_,n);w<u&&h.push({dist:w,range1:b[0],range2:[0,0]})}if(b[1]!==null){const w=wa(ns(r,b[1]),_,n);w<u&&h.push({dist:w,range1:b[1],range2:[0,0]})}}}return u}function hf(r,e,i,n,s,u=1/0){let h=Math.min(u,s.distance(r[0],i[0]));if(h===0)return h;const f=new Rc([{dist:0,range1:[0,r.length-1],range2:[0,i.length-1]}],ph),_=e?Fc:Lc,g=n?Fc:Lc;for(;f.length;){const v=f.pop();if(v.dist>=h)continue;const b=v.range1,w=v.range2;if(Ml(b)<=_&&Ml(w)<=g){if(!Tn(b,r.length)||!Tn(w,i.length))return NaN;if(e&&n?h=Math.min(h,Qt(r,b,i,w,s)):e||n?e&&!n?h=Math.min(h,gh(i,w,r,b,s)):!e&&n&&(h=Math.min(h,gh(r,b,i,w,s))):h=Math.min(h,rm(r,b,i,w,s)),h===0)return h}else{const S=_h(b,e),I=_h(w,n);Ui(f,h,s,r,i,S[0],I[0]),Ui(f,h,s,r,i,S[0],I[1]),Ui(f,h,s,r,i,S[1],I[0]),Ui(f,h,s,r,i,S[1],I[1])}}return h}function xh(r,e,i,n,s=1/0){let u=s;const h=ns(r,[0,r.length-1]);for(const f of i)if(!(u!==1/0&&wa(h,ns(f,[0,f.length-1]),n)>=u)&&(u=Math.min(u,hf(r,e,f,!0,n,u)),u===0))return u;return u}function Oc(r,e,i,n,s=1/0){let u=s;const h=ns(r,[0,r.length-1]);for(const f of i){if(u!==1/0&&wa(h,as(f),n)>=u)continue;const _=sm(r,e,f,n,u);if(isNaN(_))return _;if((u=Math.min(u,_))===0)return u}return u}function vh(r){return r==="Point"||r==="MultiPoint"||r==="LineString"||r==="MultiLineString"||r==="Polygon"||r==="MultiPolygon"}class ss{constructor(e,i){this.type=ft,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(Ps(e[1])){const n=e[1];if(n.type==="FeatureCollection"){for(let s=0;s<n.features.length;++s)if(vh(n.features[s].geometry.type))return new ss(n,n.features[s].geometry)}else if(n.type==="Feature"){if(vh(n.geometry.type))return new ss(n,n.geometry)}else if(vh(n.type))return new ss(n,n)}return i.error("'distance' expression needs to be an array with format ['Distance', GeoJSONObj].")}evaluate(e){const i=e.geometry(),n=e.canonicalID();if(i!=null&&n!=null){if(e.geometryType()==="Point")return(function(s,u,h){const f=[];for(const g of s)for(const v of g)f.push(kc(v,u));const _=new Ls(f[0][1],"meters");return h.type==="Point"||h.type==="MultiPoint"||h.type==="LineString"?hf(f,!1,h.type==="Point"?[h.coordinates]:h.coordinates,h.type==="LineString",_):h.type==="MultiLineString"?xh(f,!1,h.coordinates,_):h.type==="Polygon"||h.type==="MultiPolygon"?Oc(f,!1,h.type==="Polygon"?[h.coordinates]:h.coordinates,_):null})(i,n,this.geometries);if(e.geometryType()==="LineString")return(function(s,u,h){const f=[];for(const g of s){const v=[];for(const b of g)v.push(kc(b,u));f.push(v)}const _=new Ls(f[0][0][1],"meters");if(h.type==="Point"||h.type==="MultiPoint"||h.type==="LineString")return xh(h.type==="Point"?[h.coordinates]:h.coordinates,h.type==="LineString",f,_);if(h.type==="MultiLineString"){let g=1/0;for(let v=0;v<h.coordinates.length;v++){const b=xh(h.coordinates[v],!0,f,_,g);if(isNaN(b))return b;if((g=Math.min(g,b))===0)return g}return g}if(h.type==="Polygon"||h.type==="MultiPolygon"){let g=1/0;for(let v=0;v<f.length;v++){const b=Oc(f[v],!0,h.type==="Polygon"?[h.coordinates]:h.coordinates,_,g);if(isNaN(b))return b;if((g=Math.min(g,b))===0)return g}return g}return null})(i,n,this.geometries);if(e.geometryType()==="Polygon")return(function(s,u,h){const f=[];for(const g of(function(v,b){const w=v.length;if(w<=1)return[v];const S=[];let I,P;for(let L=0;L<w;L++){const R=ya(v[L]);R!==0&&(v[L].area=Math.abs(R),P===void 0&&(P=R<0),P===R<0?(I&&S.push(I),I=[v[L]]):I.push(v[L]))}return I&&S.push(I),S})(s)){const v=[];for(let b=0;b<g.length;++b)v.push(im(g[b],u));f.push(v)}const _=new Ls(f[0][0][0][1],"meters");if(h.type==="Point"||h.type==="MultiPoint"||h.type==="LineString")return Oc(h.type==="Point"?[h.coordinates]:h.coordinates,h.type==="LineString",f,_);if(h.type==="MultiLineString"){let g=1/0;for(let v=0;v<h.coordinates.length;v++){const b=Oc(h.coordinates[v],!0,f,_,g);if(isNaN(b))return b;if((g=Math.min(g,b))===0)return g}return g}return h.type==="Polygon"||h.type==="MultiPolygon"?(function(g,v,b){let w=1/0;for(const S of g)for(const I of v){const P=am(S,I,b,w);if(isNaN(P))return P;if((w=Math.min(w,P))===0)return w}return w})(h.type==="Polygon"?[h.coordinates]:h.coordinates,f,_):null})(i,n,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 Fs(r){if(r instanceof so&&(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 ba||r instanceof ss)return!1;if(r instanceof ks)return r.featureConstant;let e=!0;return r.eachChild((i=>{e&&!Fs(i)&&(e=!1)})),e}function Cl(r){if(r instanceof so&&r.name==="feature-state")return!1;let e=!0;return r.eachChild((i=>{e&&!Cl(i)&&(e=!1)})),e}function Bs(r,e){if(r instanceof so&&e.indexOf(r.name)>=0)return!1;let i=!0;return r.eachChild((n=>{i&&!Bs(n,e)&&(i=!1)})),i}function df(r,e,i){return[r,e,i].filter(Boolean).join("")}function bh(r,e){switch(r){case"string":return No(e);case"number":return+e;case"boolean":return!!e;case"color":return mi.parse(e);case"formatted":return no.fromString(No(e));case"resolvedImage":return ao.build(No(e))}return e}function ff(r,e,i,n){return n!==void 0&&(r=n*Math.round(r/n)),e!==void 0&&r<e&&(r=e),i!==void 0&&r>i&&(r=i),r}class ks{constructor(e,i,n,s=!1){this.type=e,this.key=i,this.scope=n,this.featureConstant=s}static parse(e,i){let n=i.expectedType;if(n==null&&(n=di),e.length<2||e.length>3)return i.error("Invalid number of arguments for 'config' expression.");const s=i.parse(e[1],1);if(!(s instanceof Nn))return i.error("Key name of 'config' expression must be a string literal.");let u,h=!0;const f=No(s.value);if(e.length>=3){const _=i.parse(e[2],2);if(!(_ instanceof Nn))return i.error("Scope of 'config' expression must be a string literal.");u=No(_.value)}if(i.options){const _=df(f,u,i._scope),g=i.options.get(_);g&&(h=Fs(g.value||g.default))}return new ks(n,f,u,h)}evaluate(e){const i=df(this.key,this.scope,e.scope),n=e.getConfig(i);if(!n)return null;const{type:s,value:u,values:h,minValue:f,maxValue:_,stepValue:g}=n,v=n.default.evaluate(e);let b=v;if(u){const w=e.scope;e.scope=(w||"").split("").slice(1).join(""),b=u.evaluate(e),e.scope=w}return s&&(b=bh(s,b)),b===void 0||f===void 0&&_===void 0&&g===void 0||(typeof b=="number"?b=ff(b,f,_,g):Array.isArray(b)&&(b=b.map((w=>typeof w=="number"?ff(w,f,_,g):w)))),u!==void 0&&b!==void 0&&h&&!h.includes(b)&&(b=v,s&&(b=bh(s,b))),(s&&s!==this.type||b!==void 0&&!Ec(Pr(b),this.type))&&(b=bh(this.type.kind,b)),b}eachChild(){}outputDefined(){return!1}serialize(){const e=["config",this.key];return this.scope&&e.concat(this.scope),e}}class Vc{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 n=e[1];return i.scope.has(n)?new Vc(n,i.scope.get(n)):i.error(`Unknown variable "${n}". Make sure "${n}" 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 Uc{constructor(e,i=[],n,s=new Cs,u=[],h,f,_){this.registry=e,this.path=i,this.key=i.map((g=>typeof g=="string"?`['${g}']`:`[${g}]`)).join(""),this.scope=s,this.errors=u,this.expectedType=n,this._scope=h,this.options=f,this.iconImageUseTheme=_}parse(e,i,n,s,u={}){return i||n?this.concat(i,null,n,s)._parse(e,u):this._parse(e,u)}parseObjectValue(e,i,n,s,u,h={}){return this.concat(i,n,s,u)._parse(e,h)}_parse(e,i){function n(s,u,h){return h==="assert"?new an(u,[s]):h==="coerce"?new wn(u,[s]):s}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 s=typeof e[0]=="string"?this.registry[e[0]]:void 0;if(s){let u=s.parse(e,this);if(!u)return null;if(this.expectedType){const h=this.expectedType,f=u.type;if(h.kind!=="string"&&h.kind!=="number"&&h.kind!=="boolean"&&h.kind!=="object"&&h.kind!=="array"||f.kind!=="value")if(h.kind!=="color"&&h.kind!=="formatted"&&h.kind!=="resolvedImage"||f.kind!=="value"&&f.kind!=="string"){if(this.checkSubtype(h,f))return null}else u=n(u,h,i.typeAnnotation||"coerce");else u=n(u,h,i.typeAnnotation||"assert")}if(!(u instanceof Nn)&&u.type.kind!=="resolvedImage"&&wh(u)){const h=new Mc(this._scope,this.options,this.iconImageUseTheme);try{u=new Nn(u.type,u.evaluate(h))}catch(f){return this.error(f.message),null}}return u}return wn.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,n,s){let u=typeof e=="number"?this.path.concat(e):this.path;u=typeof i=="string"?u.concat(i):u;const h=s?this.scope.concat(s):this.scope;return new Uc(this.registry,u,n||null,h,this.errors,this._scope,this.options,this.iconImageUseTheme)}error(e,...i){const n=`${this.key}${i.map((s=>`[${s}]`)).join("")}`;this.errors.push(new Uo(n,e))}checkSubtype(e,i){const n=ga(e,i);return n&&this.error(n),n}}function wh(r){if(r instanceof Vc)return wh(r.boundExpression);if(r instanceof so&&r.name==="error"||r instanceof Or||r instanceof ba||r instanceof ss||r instanceof ks)return!1;const e=r instanceof wn||r instanceof an;let i=!0;return r.eachChild((n=>{i=e?i&&wh(n):i&&n instanceof Nn})),!!i&&Fs(r)&&Bs(r,["zoom","heatmap-density","worldview","line-progress","raster-value","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center","measure-light","raster-particle-speed"])}function Nc(r,e){const i=r.length-1;let n,s,u=0,h=i,f=0;for(;u<=h;)if(f=Math.floor((u+h)/2),n=r[f],s=r[f+1],n<=e){if(f===i||e<s)return f;u=f+1}else{if(!(n>e))throw new Ir("Input is not a number.");h=f-1}return 0}class Pl{constructor(e,i,n){this.type=e,this.input=i,this.labels=[],this.outputs=[];for(const[s,u]of n)this.labels.push(s),this.outputs.push(u)}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 n=i.parse(e[1],1,ft);if(!n)return null;const s=[];let u=null;i.expectedType&&i.expectedType.kind!=="value"&&(u=i.expectedType);for(let h=1;h<e.length;h+=2){const f=h===1?-1/0:e[h],_=e[h+1],g=h,v=h+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(s.length&&s[s.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,u);if(!b)return null;u=u||b.type,s.push([f,b])}return new Pl(u,n,s)}evaluate(e){const i=this.labels,n=this.outputs;if(i.length===1)return n[0].evaluate(e);const s=this.input.evaluate(e);if(s<=i[0])return n[0].evaluate(e);const u=i.length;return s>=i[u-1]?n[u-1].evaluate(e):n[Nc(i,s)].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 pf=.95047,mf=1.08883,_f=4/29,Os=6/29,gf=3*Os*Os,lm=Os*Os*Os,cm=Math.PI/180,um=180/Math.PI;function Th(r){return r>lm?Math.pow(r,1/3):r/gf+_f}function Eh(r){return r>Os?r*r*r:gf*(r-_f)}function Sh(r){return 255*(r<=.0031308?12.92*r:1.055*Math.pow(r,1/2.4)-.055)}function Ih(r){return(r/=255)<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function yf(r){const e=Ih(r.r),i=Ih(r.g),n=Ih(r.b),s=Th((.4124564*e+.3575761*i+.1804375*n)/pf),u=Th((.2126729*e+.7151522*i+.072175*n)/1);return{l:116*u-16,a:500*(s-u),b:200*(u-Th((.0193339*e+.119192*i+.9503041*n)/mf)),alpha:r.a}}function jc(r){let e=(r.l+16)/116,i=isNaN(r.a)?e:e+r.a/500,n=isNaN(r.b)?e:e-r.b/200;return e=1*Eh(e),i=pf*Eh(i),n=mf*Eh(n),new mi(Sh(3.2404542*i-1.5371385*e-.4985314*n),Sh(-.969266*i+1.8760108*e+.041556*n),Sh(.0556434*i-.2040259*e+1.0572252*n),r.alpha)}function Gc(r,e,i){const n=e-r;return r+i*(n>180||n<-180?n-360*Math.round(n/360):n)}const Vs={forward:yf,reverse:jc,interpolate:function(r,e,i){return{l:bt(r.l,e.l,i),a:bt(r.a,e.a,i),b:bt(r.b,e.b,i),alpha:bt(r.alpha,e.alpha,i)}}},zl={forward:function(r){const{l:e,a:i,b:n}=yf(r),s=Math.atan2(n,i)*um;return{h:s<0?s+360:s,c:Math.sqrt(i*i+n*n),l:e,alpha:r.a}},reverse:function(r){const e=r.h*cm,i=r.c;return jc({l:r.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:r.alpha})},interpolate:function(r,e,i){return{h:Gc(r.h,e.h,i),c:bt(r.c,e.c,i),l:bt(r.l,e.l,i),alpha:bt(r.alpha,e.alpha,i)}}};var xf=Object.freeze({__proto__:null,hcl:zl,lab:Vs});class Do{constructor(e,i,n,s,u){this.type=e,this.operator=i,this.interpolation=n,this.input=s,this.labels=[],this.outputs=[];for(const[h,f]of u)this.labels.push(h),this.outputs.push(f)}static interpolationFactor(e,i,n,s){let u=0;if(e.name==="exponential")u=Hc(i,e.base,n,s);else if(e.name==="linear")u=Hc(i,1,n,s);else if(e.name==="cubic-bezier"){const h=e.controlPoints;u=new fc(h[0],h[1],h[2],h[3]).solve(Hc(i,1,n,s))}return u}static parse(e,i){let[n,s,u,...h]=e;if(!Array.isArray(s)||s.length===0)return i.error("Expected an interpolation type expression.",1);if(s[0]==="linear")s={name:"linear"};else if(s[0]==="exponential"){const g=s[1];if(typeof g!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);s={name:"exponential",base:g}}else{if(s[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(s[0])}`,1,0);{const g=s.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);s={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(u=i.parse(u,2,ft),!u)return null;const f=[];let _=null;n==="interpolate-hcl"||n==="interpolate-lab"?_=mo:i.expectedType&&i.expectedType.kind!=="value"&&(_=i.expectedType);for(let g=0;g<h.length;g+=2){const v=h[g],b=h[g+1],w=g+3,S=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.',w);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.',w);const I=i.parse(b,S,_);if(!I)return null;_=_||I.type,f.push([v,I])}return _.kind==="number"||_.kind==="color"||_.kind==="array"&&_.itemType.kind==="number"&&typeof _.N=="number"?new Do(_,n,s,u,f):i.error(`Type ${_r(_)} is not interpolatable.`)}evaluate(e){const i=this.labels,n=this.outputs;if(i.length===1)return n[0].evaluate(e);const s=this.input.evaluate(e);if(s<=i[0])return n[0].evaluate(e);const u=i.length;if(s>=i[u-1])return n[u-1].evaluate(e);const h=Nc(i,s),f=Do.interpolationFactor(this.interpolation,s,i[h],i[h+1]),_=n[h].evaluate(e),g=n[h+1].evaluate(e);return this.operator==="interpolate"?vl[this.type.kind.toLowerCase()](_,g,f):this.operator==="interpolate-hcl"?zl.reverse(zl.interpolate(zl.forward(_),zl.forward(g),f)):Vs.reverse(Vs.interpolate(Vs.forward(_),Vs.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 n=0;n<this.labels.length;n++)i.push(this.labels[n],this.outputs[n].serialize());return i}}function Hc(r,e,i,n){const s=n-i,u=r-i;return s===0?0:e===1?u/s:(Math.pow(e,u)-1)/(Math.pow(e,s)-1)}class Dl{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 n=null;const s=i.expectedType;s&&s.kind!=="value"&&(n=s);const u=[];for(const f of e.slice(1)){const _=i.parse(f,1+u.length,n,void 0,{typeAnnotation:"omit"});if(!_)return null;n=n||_.type,u.push(_)}const h=s&&u.some((f=>ga(s,f.type)));return new Dl(h?di:n,u)}evaluate(e){let i,n=null,s=0;for(const u of this.args){if(s++,n=u.evaluate(e),n&&n instanceof ao&&!n.available&&(i||(i=n),n=null,s===this.args.length))return i;if(n!==null)break}return n}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 Gn{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 n=[];for(let u=1;u<e.length-1;u+=2){const h=e[u];if(typeof h!="string")return i.error(`Expected string, but found ${typeof h} instead.`,u);if(/[^a-zA-Z0-9_]/.test(h))return i.error("Variable names must contain only alphanumeric characters or '_'.",u);const f=i.parse(e[u+1],u+1);if(!f)return null;n.push([h,f])}const s=i.parse(e[e.length-1],e.length-1,i.expectedType,n);return s?new Gn(n,s):null}outputDefined(){return this.result.outputDefined()}serialize(){const e=["let"];for(const[i,n]of this.bindings)e.push(i,n.serialize());return e.push(this.result.serialize()),e}}class $c{constructor(e,i,n){this.type=e,this.index=i,this.input=n}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const n=i.parse(e[1],1,ft),s=i.parse(e[2],2,qr(i.expectedType||di));return n&&s?new $c(s.type.itemType,n,s):null}evaluate(e){const i=this.index.evaluate(e),n=this.input.evaluate(e);if(i<0)throw new Ir("Array index out of bounds: negative index");if(i>=n.length)throw new Ir("Array index out of bounds: index exceeds array size");if(i!==Math.floor(i))throw new Ir("Array index must be an integer. Use at-interpolated for fractional indices");return n[i]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}class Zc{constructor(e,i,n){this.type=e,this.index=i,this.input=n}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const n=i.parse(e[1],1,ft),s=i.parse(e[2],2,qr(i.expectedType||di));return n&&s?new Zc(s.type.itemType,n,s):null}evaluate(e){const i=this.index.evaluate(e),n=this.input.evaluate(e);if(i<0)throw new Ir(`Array index out of bounds: ${i} < 0.`);if(i>n.length-1)throw new Ir(`Array index out of bounds: ${i} > ${n.length-1}.`);if(i===Math.floor(i))return n[i];const s=Math.floor(i),u=Math.ceil(i),h=n[s],f=n[u];if(typeof h!="number"||typeof f!="number")throw new Ir(`Cannot interpolate between non-number values at index ${i}.`);const _=i-s;return h*(1-_)+f*_}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at-interpolated",this.index.serialize(),this.input.serialize()]}}class Ah{constructor(e,i){this.type=xi,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 n=i.parse(e[1],1,di),s=i.parse(e[2],2,di);return n&&s?ah(n.type,[xi,Yt,ft,nn,di])?new Ah(n,s):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${_r(n.type)} instead`):null}evaluate(e){const i=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(n==null)return!1;if(!Tl(i,["boolean","string","number","null"]))throw new Ir(`Expected first argument to be of type boolean, string, number or null, but found ${_r(Pr(i))} instead.`);if(!Tl(n,["string","array"]))throw new Ir(`Expected second argument to be of type array or string, but found ${_r(Pr(n))} instead.`);return n.indexOf(i)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}class Us{constructor(e,i,n){this.type=ft,this.needle=e,this.haystack=i,this.fromIndex=n}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 n=i.parse(e[1],1,di),s=i.parse(e[2],2,di);if(!n||!s)return null;if(!ah(n.type,[xi,Yt,ft,nn,di]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${_r(n.type)} instead`);if(e.length===4){const u=i.parse(e[3],3,ft);return u?new Us(n,s,u):null}return new Us(n,s)}evaluate(e){const i=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!Tl(i,["boolean","string","number","null"]))throw new Ir(`Expected first argument to be of type boolean, string, number or null, but found ${_r(Pr(i))} instead.`);if(!Tl(n,["string","array"]))throw new Ir(`Expected second argument to be of type array or string, but found ${_r(Pr(n))} instead.`);if(this.fromIndex){const s=this.fromIndex.evaluate(e);return n.indexOf(i,s)}return n.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 Rl{constructor(e,i,n,s,u,h){this.inputType=e,this.type=i,this.input=n,this.cases=s,this.outputs=u,this.otherwise=h}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 n,s;i.expectedType&&i.expectedType.kind!=="value"&&(s=i.expectedType);const u={},h=[];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 w=i.concat(g);if(v.length===0)return w.error("Expected at least one branch label.");for(const I of v){if(typeof I!="number"&&typeof I!="string")return w.error("Branch labels must be numbers or strings.");if(typeof I=="number"&&Math.abs(I)>Number.MAX_SAFE_INTEGER)return w.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof I=="number"&&Math.floor(I)!==I)return w.error("Numeric branch labels must be integer values.");if(n){if(w.checkSubtype(n,Pr(I)))return null}else n=Pr(I);if(u[String(I)]!==void 0)return w.error("Branch labels must be unique.");u[String(I)]=h.length}const S=i.parse(b,g,s);if(!S)return null;s=s||S.type,h.push(S)}const f=i.parse(e[1],1,di);if(!f)return null;const _=i.parse(e[e.length-1],e.length-1,s);return _?f.type.kind!=="value"&&i.concat(1).checkSubtype(n,f.type)?null:new Rl(n,s,f,u,h,_):null}evaluate(e){const i=this.input.evaluate(e);return(Ec(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(),n=[],s={};for(const h of i){const f=s[this.cases[h]];f===void 0?(s[this.cases[h]]=n.length,n.push([this.cases[h],[h]])):n[f][1].push(h)}const u=h=>this.inputType.kind==="number"?Number(h):h;for(const[h,f]of n)e.push(f.length===1?u(f[0]):f.map(u)),e.push(this.outputs[h].serialize());return e.push(this.otherwise.serialize()),e}}class Ll{constructor(e,i,n){this.type=e,this.branches=i,this.otherwise=n}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 n;i.expectedType&&i.expectedType.kind!=="value"&&(n=i.expectedType);const s=[];for(let h=1;h<e.length-1;h+=2){const f=i.parse(e[h],h,xi);if(!f)return null;const _=i.parse(e[h+1],h+1,n);if(!_)return null;s.push([f,_]),n=n||_.type}const u=i.parse(e[e.length-1],e.length-1,n);return u?new Ll(n,s,u):null}evaluate(e){for(const[i,n]of this.branches)if(i.evaluate(e))return n.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[i,n]of this.branches)e(i),e(n);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 qc{constructor(e,i,n,s){this.type=e,this.input=i,this.beginIndex=n,this.endIndex=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 n=i.parse(e[1],1,di),s=i.parse(e[2],2,ft);if(!n||!s)return null;if(!ah(n.type,[qr(di),Yt,di]))return i.error(`Expected first argument to be of type array or string, but found ${_r(n.type)} instead`);if(e.length===4){const u=i.parse(e[3],3,ft);return u?new qc(n.type,n,s,u):null}return new qc(n.type,n,s)}evaluate(e){const i=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(!Tl(i,["string","array"]))throw new Ir(`Expected first argument to be of type array or string, but found ${_r(Pr(i))} instead.`);if(this.endIndex){const s=this.endIndex.evaluate(e);return i.slice(n,s)}return i.slice(n)}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()]}}class Mh{constructor(e,i){this.type=qr(Yt),this.str=e,this.delimiter=i}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const n=i.parse(e[1],1,Yt),s=i.parse(e[2],2,Yt);return n&&s?new Mh(n,s):void 0}evaluate(e){const i=this.str.evaluate(e),n=this.delimiter.evaluate(e);return i.split(n)}eachChild(e){e(this.str),e(this.delimiter)}outputDefined(){return!1}serialize(){return["split",this.str.serialize(),this.delimiter.serialize()]}}function Ch(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 Ph(r,e,i,n){return n.compare(e,i)===0}function Ns(r,e,i){const n=r!=="=="&&r!=="!=";return class q0{constructor(u,h,f){this.type=xi,this.lhs=u,this.rhs=h,this.collator=f,this.hasUntypedArgument=u.type.kind==="value"||h.type.kind==="value"}static parse(u,h){if(u.length!==3&&u.length!==4)return h.error("Expected two or three arguments.");const f=u[0];let _=h.parse(u[1],1,di);if(!_)return null;if(!Ch(f,_.type))return h.concat(1).error(`"${f}" comparisons are not supported for type '${_r(_.type)}'.`);let g=h.parse(u[2],2,di);if(!g)return null;if(!Ch(f,g.type))return h.concat(2).error(`"${f}" comparisons are not supported for type '${_r(g.type)}'.`);if(_.type.kind!==g.type.kind&&_.type.kind!=="value"&&g.type.kind!=="value")return h.error(`Cannot compare types '${_r(_.type)}' and '${_r(g.type)}'.`);n&&(_.type.kind==="value"&&g.type.kind!=="value"?_=new an(g.type,[_]):_.type.kind!=="value"&&g.type.kind==="value"&&(g=new an(_.type,[g])));let v=null;if(u.length===4){if(_.type.kind!=="string"&&g.type.kind!=="string"&&_.type.kind!=="value"&&g.type.kind!=="value")return h.error("Cannot use collator to compare non-string types.");if(v=h.parse(u[3],3,Tc),!v)return null}return new q0(_,g,v)}evaluate(u){const h=this.lhs.evaluate(u),f=this.rhs.evaluate(u);if(n&&this.hasUntypedArgument){const _=Pr(h),g=Pr(f);if(_.kind!==g.kind||_.kind!=="string"&&_.kind!=="number")throw new Ir(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${_.kind}, ${g.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const _=Pr(h),g=Pr(f);if(_.kind!=="string"||g.kind!=="string")return e(u,h,f)}return this.collator?i(u,h,f,this.collator.evaluate(u)):e(u,h,f)}eachChild(u){u(this.lhs),u(this.rhs),this.collator&&u(this.collator)}outputDefined(){return!0}serialize(){const u=[r];return this.eachChild((h=>{u.push(h.serialize())})),u}}}const hm=Ns("==",(function(r,e,i){return e===i}),Ph),dm=Ns("!=",(function(r,e,i){return e!==i}),(function(r,e,i,n){return!Ph(0,e,i,n)})),vf=Ns("<",(function(r,e,i){return e<i}),(function(r,e,i,n){return n.compare(e,i)<0})),bf=Ns(">",(function(r,e,i){return e>i}),(function(r,e,i,n){return n.compare(e,i)>0})),Xc=Ns("<=",(function(r,e,i){return e<=i}),(function(r,e,i,n){return n.compare(e,i)<=0})),fm=Ns(">=",(function(r,e,i){return e>=i}),(function(r,e,i,n){return n.compare(e,i)>=0}));class Wc{constructor(e,i,n,s,u,h){this.type=Yt,this.number=e,this.locale=i,this.currency=n,this.unit=s,this.minFractionDigits=u,this.maxFractionDigits=h}static parse(e,i){if(e.length!==3)return i.error("Expected two arguments.");const n=i.parse(e[1],1,ft);if(!n)return null;const s=e[2];if(typeof s!="object"||Array.isArray(s))return i.error("NumberFormat options argument must be an object.");let u=null;if(s.locale&&(u=i.parseObjectValue(s.locale,2,"locale",Yt),!u))return null;let h=null;if(s.currency&&(h=i.parseObjectValue(s.currency,2,"currency",Yt),!h))return null;let f=null;if(s.unit&&(f=i.parseObjectValue(s.unit,2,"unit",Yt),!f))return null;let _=null;if(s["min-fraction-digits"]&&(_=i.parseObjectValue(s["min-fraction-digits"],2,"min-fraction-digits",ft),!_))return null;let g=null;return s["max-fraction-digits"]&&(g=i.parseObjectValue(s["max-fraction-digits"],2,"max-fraction-digits",ft),!g)?null:new Wc(n,u,h,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 zh{constructor(e){this.type=ft,this.input=e}static parse(e,i){if(e.length!==2)return i.error(`Expected 1 argument, but found ${e.length-1} instead.`);const n=i.parse(e[1],1);return n?n.type.kind!=="array"&&n.type.kind!=="string"&&n.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${_r(n.type)} instead.`):new zh(n):null}evaluate(e){const i=this.input.evaluate(e);if(typeof i=="string"||Array.isArray(i))return i.length;throw new Ir(`Expected value to be of type string or array, but found ${_r(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 wf(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 js={"==":hm,"!=":dm,">":bf,"<":vf,">=":fm,"<=":Xc,array:an,at:$c,"at-interpolated":Zc,boolean:an,case:Ll,coalesce:Dl,collator:Or,format:bn,image:Bt,in:Ah,"index-of":Us,interpolate:Do,"interpolate-hcl":Do,"interpolate-lab":Do,length:zh,let:Gn,literal:Nn,match:Rl,number:an,"number-format":Wc,object:an,slice:qc,step:Pl,string:an,"to-boolean":wn,"to-color":wn,"to-number":wn,"to-string":wn,var:Vc,within:ba,distance:ss,config:ks,split:Mh};function Dh(r,[e,i,n,s]){e=e.evaluate(r),i=i.evaluate(r),n=n.evaluate(r);const u=s?s.evaluate(r):1,h=os(e,i,n,u);if(h)throw new Ir(h);return new mi(e/255,i/255,n/255,u)}function Rh(r,[e,i,n,s]){e=e.evaluate(r),i=i.evaluate(r),n=n.evaluate(r);const u=s?s.evaluate(r):1,h=(function(g,v,b,w){return typeof g=="number"&&g>=0&&g<=360?typeof v=="number"&&v>=0&&v<=100&&typeof b=="number"&&b>=0&&b<=100?w===void 0||typeof w=="number"&&w>=0&&w<=1?null:`Invalid hsla value [${[g,v,b,w].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid hsla value [${(typeof w=="number"?[g,v,b,w]:[g,v,b]).join(", ")}]: 's', and 'l' must be between 0 and 100.`:`Invalid hsla value [${(typeof w=="number"?[g,v,b,w]:[g,v,b]).join(", ")}]: 'h' must be between 0 and 360.`})(e,i,n,u);if(h)throw new Ir(h);const f=`hsla(${e}, ${i}%, ${n}%, ${u})`,_=mi.parse(f);if(!_)throw new Ir(`Failed to parse HSLA color: ${f}`);return _}function Tf(r,e){return r in e}function Lh(r,e){const i=e[r];return i===void 0?null:i}function Ea(r){return{type:r}}function ls(r){if(r instanceof ks)return new Set([r.key]);let e=new Set;return r.eachChild((i=>{e=new Set([...e,...ls(i)])})),e}function Yc(r){if(r instanceof so&&r.name==="is-active-floor")return!0;let e=!1;return r.eachChild((i=>{!e&&Yc(i)&&(e=!0)})),e}function Ef(r){return{result:"success",value:r}}function Sa(r){return{result:"error",value:r}}function Fh(r,e){return!!r&&!!r.parameters&&r.parameters.indexOf(e)>-1}function Fl(r){return r["property-type"]==="data-driven"}function Sf(r){return Fh(r.expression,"measure-light")}function If(r){return Fh(r.expression,"zoom")}function Kc(r){return!!r.expression&&r.expression.interpolated}function Qc(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Af(r){return r}function Mf(r,e){const i=e.type==="color",n=r.stops&&typeof r.stops[0][0]=="object",s=n||!(n||r.property!==void 0),u=r.type||(Kc(e)?"exponential":"interval");if(i&&((r=Object.assign({},r)).stops&&(r.stops=r.stops.map((g=>[g[0],mi.parse(g[1])]))),r.default=mi.parse(r.default?r.default:e.default)),r.colorSpace&&r.colorSpace!=="rgb"&&!xf[r.colorSpace])throw new Error(`Unknown color space: ${r.colorSpace}`);let h,f,_;if(u==="exponential")h=Cf;else if(u==="interval")h=mm;else if(u==="categorical"){h=pm,f=Object.create(null);for(const g of r.stops)f[g[0]]=g[1];_=typeof r.stops[0][0]}else{if(u!=="identity")throw new Error(`Unknown function type "${u}"`);h=Pf}if(n){const g={},v=[];for(let S=0;S<r.stops.length;S++){const I=r.stops[S],P=I[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([I[0].value,I[1]])}const b=[];for(const S of v)b.push([g[S].zoom,Mf(g[S],e)]);const w={name:"linear"};return{kind:"composite",interpolationType:w,interpolationFactor:Do.interpolationFactor.bind(void 0,w),zoomStops:b.map((S=>S[0])),evaluate:({zoom:S},I)=>Cf({stops:b,base:r.base},e,S).evaluate(S,I)}}if(s){const g=u==="exponential"?{name:"exponential",base:r.base!==void 0?r.base:1}:null;return{kind:"camera",interpolationType:g,interpolationFactor:Do.interpolationFactor.bind(void 0,g),zoomStops:r.stops.map((v=>v[0])),evaluate:({zoom:v})=>h(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?En(r.default,e.default):h(r,e,b,f,_)}}}function En(r,e,i){return r!==void 0?r:e!==void 0?e:i!==void 0?i:void 0}function pm(r,e,i,n,s){return En(typeof i===s?n[i]:void 0,r.default,e.default)}function mm(r,e,i){if(!zs(i))return En(r.default,e.default);const n=r.stops.length;if(n===1||i<=r.stops[0][0])return r.stops[0][1];if(i>=r.stops[n-1][0])return r.stops[n-1][1];const s=Nc(r.stops.map((u=>u[0])),i);return r.stops[s][1]}function Cf(r,e,i){const n=r.base!==void 0?r.base:1;if(!zs(i))return En(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 u=Nc(r.stops.map((v=>v[0])),i),h=(function(v,b,w,S){const I=S-w,P=v-w;return I===0?0:b===1?P/I:(Math.pow(b,P)-1)/(Math.pow(b,I)-1)})(i,n,r.stops[u][0],r.stops[u+1][0]),f=r.stops[u][1],_=r.stops[u+1][1];let g=vl[e.type]||Af;if(r.colorSpace&&r.colorSpace!=="rgb"){const v=xf[r.colorSpace];g=(b,w)=>v.reverse(v.interpolate(v.forward(b),v.forward(w),h))}return typeof f.evaluate=="function"?{evaluate(...v){const b=f.evaluate.apply(void 0,v),w=_.evaluate.apply(void 0,v);if(b!==void 0&&w!==void 0)return g(b,w,h)}}:g(f,_,h)}function Pf(r,e,i){return e.type==="color"?i=mi.parse(i):e.type==="formatted"?i=no.fromString(i.toString()):e.type==="resolvedImage"?i=ao.build(i.toString()):ht(i)===e.type||e.type==="enum"&&e.values[i]||(i=void 0),En(i,r.default,e.default)}so.register(js,{error:[{kind:"error"},[Yt],(r,[e])=>{throw new Ir(e.evaluate(r))}],typeof:[Yt,[di],(r,[e])=>_r(Pr(e.evaluate(r)))],"to-rgba":[qr(ft,4),[mo],(r,[e])=>e.evaluate(r).toNonPremultipliedRenderColor(null).toArray()],"to-hsla":[qr(ft,4),[mo],(r,[e])=>e.evaluate(r).toNonPremultipliedRenderColor(null).toHslaArray()],rgb:[mo,[ft,ft,ft],Dh],rgba:[mo,[ft,ft,ft,ft],Dh],hsl:[mo,[ft,ft,ft],Rh],hsla:[mo,[ft,ft,ft,ft],Rh],has:{type:xi,overloads:[[[Yt],(r,[e])=>Tf(e.evaluate(r),r.properties())],[[Yt,vn],(r,[e,i])=>Tf(e.evaluate(r),i.evaluate(r))]]},get:{type:di,overloads:[[[Yt],(r,[e])=>Lh(e.evaluate(r),r.properties())],[[Yt,vn],(r,[e,i])=>Lh(e.evaluate(r),i.evaluate(r))]]},"feature-state":[di,[Yt],(r,[e])=>Lh(e.evaluate(r),r.featureState||{})],properties:[vn,[],r=>r.properties()],"geometry-type":[Yt,[],r=>r.geometryType()],worldview:[Yt,[],r=>r.globals.worldview||""],"is-active-floor":[xi,Ea(Yt),(r,e)=>{if(!(r.globals.activeFloors&&r.globals.activeFloors.size>0))return!1;const i=r.globals.activeFloors;return e.some((n=>{const s=n.evaluate(r);return i.has(s)}))}],id:[di,[],r=>r.id()],zoom:[ft,[],r=>r.globals.zoom],pitch:[ft,[],r=>r.globals.pitch||0],"distance-from-center":[ft,[],r=>r.distanceFromCenter()],"measure-light":[ft,[Yt],(r,[e])=>r.measureLight(e.evaluate(r))],"heatmap-density":[ft,[],r=>r.globals.heatmapDensity||0],"line-progress":[ft,[],r=>r.globals.lineProgress||0],"raster-value":[ft,[],r=>r.globals.rasterValue||0],"raster-particle-speed":[ft,[],r=>r.globals.rasterParticleSpeed||0],"sky-radial-progress":[ft,[],r=>r.globals.skyRadialProgress||0],accumulated:[di,[],r=>r.globals.accumulated===void 0?null:r.globals.accumulated],"+":[ft,Ea(ft),(r,e)=>{let i=0;for(const n of e)i+=n.evaluate(r);return i}],"*":[ft,Ea(ft),(r,e)=>{let i=1;for(const n of e)i*=n.evaluate(r);return i}],"-":{type:ft,overloads:[[[ft,ft],(r,[e,i])=>e.evaluate(r)-i.evaluate(r)],[[ft],(r,[e])=>-e.evaluate(r)]]},"/":[ft,[ft,ft],(r,[e,i])=>e.evaluate(r)/i.evaluate(r)],"%":[ft,[ft,ft],(r,[e,i])=>e.evaluate(r)%i.evaluate(r)],ln2:[ft,[],()=>Math.LN2],pi:[ft,[],()=>Math.PI],e:[ft,[],()=>Math.E],"^":[ft,[ft,ft],(r,[e,i])=>Math.pow(e.evaluate(r),i.evaluate(r))],sqrt:[ft,[ft],(r,[e])=>Math.sqrt(e.evaluate(r))],log10:[ft,[ft],(r,[e])=>Math.log(e.evaluate(r))/Math.LN10],ln:[ft,[ft],(r,[e])=>Math.log(e.evaluate(r))],log2:[ft,[ft],(r,[e])=>Math.log2(e.evaluate(r))],sin:[ft,[ft],(r,[e])=>Math.sin(e.evaluate(r))],cos:[ft,[ft],(r,[e])=>Math.cos(e.evaluate(r))],tan:[ft,[ft],(r,[e])=>Math.tan(e.evaluate(r))],asin:[ft,[ft],(r,[e])=>Math.asin(e.evaluate(r))],acos:[ft,[ft],(r,[e])=>Math.acos(e.evaluate(r))],atan:[ft,[ft],(r,[e])=>Math.atan(e.evaluate(r))],min:[ft,Ea(ft),(r,e)=>Math.min(...e.map((i=>i.evaluate(r))))],max:[ft,Ea(ft),(r,e)=>Math.max(...e.map((i=>i.evaluate(r))))],abs:[ft,[ft],(r,[e])=>Math.abs(e.evaluate(r))],round:[ft,[ft],(r,[e])=>{const i=e.evaluate(r);return i<0?-Math.round(-i):Math.round(i)}],floor:[ft,[ft],(r,[e])=>Math.floor(e.evaluate(r))],ceil:[ft,[ft],(r,[e])=>Math.ceil(e.evaluate(r))],"filter-==":[xi,[Yt,di],(r,[e,i])=>r.properties()[e.value]===i.value],"filter-id-==":[xi,[di],(r,[e])=>r.id()===e.value],"filter-type-==":[xi,[Yt],(r,[e])=>r.geometryType()===e.value],"filter-<":[xi,[Yt,di],(r,[e,i])=>{const n=r.properties()[e.value],s=i.value;return typeof n==typeof s&&n<s}],"filter-id-<":[xi,[di],(r,[e])=>{const i=r.id(),n=e.value;return typeof i==typeof n&&i<n}],"filter->":[xi,[Yt,di],(r,[e,i])=>{const n=r.properties()[e.value],s=i.value;return typeof n==typeof s&&n>s}],"filter-id->":[xi,[di],(r,[e])=>{const i=r.id(),n=e.value;return typeof i==typeof n&&i>n}],"filter-<=":[xi,[Yt,di],(r,[e,i])=>{const n=r.properties()[e.value],s=i.value;return typeof n==typeof s&&n<=s}],"filter-id-<=":[xi,[di],(r,[e])=>{const i=r.id(),n=e.value;return typeof i==typeof n&&i<=n}],"filter->=":[xi,[Yt,di],(r,[e,i])=>{const n=r.properties()[e.value],s=i.value;return typeof n==typeof s&&n>=s}],"filter-id->=":[xi,[di],(r,[e])=>{const i=r.id(),n=e.value;return typeof i==typeof n&&i>=n}],"filter-has":[xi,[di],(r,[e])=>e.value in r.properties()],"filter-has-id":[xi,[],r=>r.id()!==null&&r.id()!==void 0],"filter-type-in":[xi,[qr(Yt)],(r,[e])=>e.value.indexOf(r.geometryType())>=0],"filter-id-in":[xi,[qr(di)],(r,[e])=>e.value.indexOf(r.id())>=0],"filter-in-small":[xi,[Yt,qr(di)],(r,[e,i])=>i.value.indexOf(r.properties()[e.value])>=0],"filter-in-large":[xi,[Yt,qr(di)],(r,[e,i])=>(function(n,s,u,h){for(;u<=h;){const f=u+h>>1;if(s[f]===n)return!0;s[f]>n?h=f-1:u=f+1}return!1})(r.properties()[e.value],i.value,0,i.value.length-1)],all:{type:xi,overloads:[[[xi,xi],(r,[e,i])=>e.evaluate(r)&&i.evaluate(r)],[Ea(xi),(r,e)=>{for(const i of e)if(!i.evaluate(r))return!1;return!0}]]},any:{type:xi,overloads:[[[xi,xi],(r,[e,i])=>e.evaluate(r)||i.evaluate(r)],[Ea(xi),(r,e)=>{for(const i of e)if(i.evaluate(r))return!0;return!1}]]},"!":[xi,[xi],(r,[e])=>!e.evaluate(r)],"is-supported-script":[xi,[Yt],(r,[e])=>{const i=r.globals&&r.globals.isSupportedScript;return!i||i(e.evaluate(r))}],upcase:[Yt,[Yt],(r,[e])=>e.evaluate(r).toUpperCase()],downcase:[Yt,[Yt],(r,[e])=>e.evaluate(r).toLowerCase()],concat:[Yt,Ea(di),(r,e)=>e.map((i=>No(i.evaluate(r)))).join("")],"resolved-locale":[Yt,[Tc],(r,[e])=>e.evaluate(r).resolvedLocale()],random:[ft,[ft,ft,di],(r,e)=>{const[i,n,s]=e.map((h=>h.evaluate(r)));if(i>n||i===n)return i;let u;if(typeof s=="string")u=(function(h){let f=0;if(h.length===0)return f;for(let _=0;_<h.length;_++)f=(f<<5)-f+h.charCodeAt(_),f|=0;return f})(s);else{if(typeof s!="number")throw new Ir(`Invalid seed input: ${s}`);u=s}return i+wf(u)()*(n-i)}]});class Jc{constructor(e,i,n,s,u){this.expression=e,this._warningHistory={},this._scope=n,this._options=s,this._iconImageUseTheme=u,this._evaluator=new Mc(n,s,u),this._defaultValue=i?(function(h){return h.type==="color"&&(Qc(h.default)||Array.isArray(h.default))?new mi(0,0,0,0):h.type==="color"?mi.parse(h.default)||null:h.default===void 0?null:h.default})(i):null,this._enumValues=i&&i.type==="enum"?i.values:null,this.configDependencies=ls(e),this.isIndoorDependent=Yc(e)}evaluateWithoutErrorHandling(e,i,n,s,u,h,f,_){return this._evaluator.globals=e,this._evaluator.feature=i,this._evaluator.featureState=n,this._evaluator.canonical=s||null,this._evaluator.availableImages=u||null,this._evaluator.formattedSection=h,this._evaluator.featureTileCoord=f||null,this._evaluator.featureDistanceData=_||null,this.expression.evaluate(this._evaluator)}evaluate(e,i,n,s,u,h,f,_,g){this._evaluator||(this._evaluator=new Mc(this._scope,this._options,this._iconImageUseTheme)),this._evaluator.globals=e,this._evaluator.feature=i||null,this._evaluator.featureState=n||null,this._evaluator.canonical=s||null,this._evaluator.availableImages=u||null,this._evaluator.formattedSection=h||null,this._evaluator.featureTileCoord=f||null,this._evaluator.featureDistanceData=_||null,this._evaluator.iconImageUseTheme=g||null;try{const v=this.expression.evaluate(this._evaluator);if(v==null||typeof v=="number"&&v!=v)return this._defaultValue;if(this._enumValues&&!(v in this._enumValues))throw new Ir(`Expected value to be one of ${Object.keys(this._enumValues).map((b=>JSON.stringify(b))).join(", ")}, but found ${JSON.stringify(v)} instead.`);return v}catch(v){const b=v;return this._warningHistory[b.message]||(this._warningHistory[b.message]=!0,typeof console<"u"&&console.warn(`Failed to evaluate expression "${JSON.stringify(this.expression.serialize())}". ${b.message}`)),this._defaultValue}}}function Bl(r){return Array.isArray(r)&&r.length>0&&typeof r[0]=="string"&&r[0]in js}function Ia(r,e,i,n,s){const u=new Uc(js,[],e?(function(f){const _={color:mo,string:Yt,number:ft,enum:Yt,boolean:xi,formatted:bl,resolvedImage:wl};return f.type==="array"?qr(_[f.value]||di,f.length):_[f.type]})(e):void 0,void 0,void 0,i,n,s),h=u.parse(r,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return h?Ef(new Jc(h,e,i,n,s)):Sa(u.errors)}class Gs{constructor(e,i,n,s){this.kind=e,this._styleExpression=i,this.isLightConstant=n,this.isLineProgressConstant=s,this.isStateDependent=e!=="constant"&&!Cl(i.expression),this.configDependencies=ls(i.expression),this.isIndoorDependent=Yc(i.expression)}evaluateWithoutErrorHandling(e,i,n,s,u,h){return this._styleExpression.evaluateWithoutErrorHandling(e,i,n,s,u,h)}evaluate(e,i,n,s,u,h,f){return this._styleExpression.evaluate(e,i,n,s,u,h,void 0,void 0,f)}}class cs{constructor(e,i,n,s,u,h){this.kind=e,this.zoomStops=n,this._styleExpression=i,this.isStateDependent=e!=="camera"&&!Cl(i.expression),this.isIndoorDependent=Yc(i.expression),this.isLightConstant=u,this.isLineProgressConstant=h,this.configDependencies=ls(i.expression),this.interpolationType=s}evaluateWithoutErrorHandling(e,i,n,s,u,h){return this._styleExpression.evaluateWithoutErrorHandling(e,i,n,s,u,h)}evaluate(e,i,n,s,u,h){return this._styleExpression.evaluate(e,i,n,s,u,h)}interpolationFactor(e,i,n){return this.interpolationType?Do.interpolationFactor(this.interpolationType,e,i,n):0}}function Bh(r,e,i,n,s){if((r=Ia(r,e,i,n,s)).result==="error")return r;const u=r.value.expression,h=Fs(u);if(!h&&!Fl(e))return Sa([new Uo("","data expressions not supported")]);const f=Bs(u,["zoom","pitch","distance-from-center"]);if(!f&&!If(e))return Sa([new Uo("","zoom expressions not supported")]);const _=Bs(u,["measure-light"]);if(!_&&!Sf(e))return Sa([new Uo("","measure-light expression not supported")]);const g=Bs(u,["line-progress"]);if(!g&&!(function(w){return Fh(w.expression,"line-progress")})(e))return Sa([new Uo("","line-progress expression not supported")]);const v=e.expression&&e.expression.relaxZoomRestriction,b=ln(u);return b||f||v?b instanceof Uo?Sa([b]):b instanceof Do&&!Kc(e)?Sa([new Uo("",'"interpolate" expressions cannot be used with this property')]):Ef(b?new cs(h&&g?"camera":"composite",r.value,b.labels,b instanceof Do?b.interpolation:void 0,_,g):new Gs(h&&g?"constant":"source",r.value,_,g)):Sa([new Uo("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression, or in the properties of atmosphere.')])}class eu{constructor(e,i){this._parameters=e,this._specification=i,Object.assign(this,Mf(this._parameters,this._specification))}static deserialize(e){return new eu(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function ln(r){let e=null;if(r instanceof Gn)e=ln(r.result);else if(r instanceof Dl){for(const i of r.args)if(e=ln(i),e)break}else(r instanceof Pl||r instanceof Do)&&r.input instanceof so&&r.input.name==="zoom"&&(e=r);return e instanceof Uo||r.eachChild((i=>{const n=ln(i);n instanceof Uo?e=n:e&&n&&e!==n&&(e=new Uo("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}var kh,zf,Df=(function(){if(zf)return kh;zf=1,kh=e;var r=3;function e(i,n,s){var u=this.cells=[];if(i instanceof ArrayBuffer){this.arrayBuffer=i;var h=new Int32Array(this.arrayBuffer);i=h[0],this.d=(n=h[1])+2*(s=h[2]);for(var f=0;f<this.d*this.d;f++){var _=h[r+f],g=h[r+f+1];u.push(_===g?null:h.subarray(_,g))}var v=h[r+u.length+1];this.keys=h.subarray(h[r+u.length],v),this.bboxes=h.subarray(v),this.insert=this._insertReadonly}else{this.d=n+2*s;for(var b=0;b<this.d*this.d;b++)u.push([]);this.keys=[],this.bboxes=[]}this.n=n,this.extent=i,this.padding=s,this.scale=n/i,this.uid=0;var w=s/n*i;this.min=-w,this.max=i+w}return e.prototype.insert=function(i,n,s,u,h){this._forEachCell(n,s,u,h,this._insertCell,this.uid++),this.keys.push(i),this.bboxes.push(n),this.bboxes.push(s),this.bboxes.push(u),this.bboxes.push(h)},e.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},e.prototype._insertCell=function(i,n,s,u,h,f){this.cells[h].push(f)},e.prototype.query=function(i,n,s,u,h){var f=this.min,_=this.max;if(i<=f&&n<=f&&_<=s&&_<=u&&!h)return Array.prototype.slice.call(this.keys);var g=[];return this._forEachCell(i,n,s,u,this._queryCell,g,{},h),g},e.prototype._queryCell=function(i,n,s,u,h,f,_,g){var v=this.cells[h];if(v!==null)for(var b=this.keys,w=this.bboxes,S=0;S<v.length;S++){var I=v[S];if(_[I]===void 0){var P=4*I;(g?g(w[P+0],w[P+1],w[P+2],w[P+3]):i<=w[P+2]&&n<=w[P+3]&&s>=w[P+0]&&u>=w[P+1])?(_[I]=!0,f.push(b[I])):_[I]=!1}}},e.prototype._forEachCell=function(i,n,s,u,h,f,_,g){for(var v=this._convertToCellCoord(i),b=this._convertToCellCoord(n),w=this._convertToCellCoord(s),S=this._convertToCellCoord(u),I=v;I<=w;I++)for(var P=b;P<=S;P++){var L=this.d*P+I;if((!g||g(this._convertFromCellCoord(I),this._convertFromCellCoord(P),this._convertFromCellCoord(I+1),this._convertFromCellCoord(P+1)))&&h.call(this,i,n,s,u,L,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,n=r+this.cells.length+1+1,s=0,u=0;u<this.cells.length;u++)s+=this.cells[u].length;var h=new Int32Array(n+s+this.keys.length+this.bboxes.length);h[0]=this.extent,h[1]=this.n,h[2]=this.padding;for(var f=n,_=0;_<i.length;_++){var g=i[_];h[r+_]=f,h.set(g,f),f+=g.length}return h[r+i.length]=f,h.set(this.keys,f),h[r+i.length+1]=f+=this.keys.length,h.set(this.bboxes,f),f+=this.bboxes.length,h.buffer},kh})(),Hs=Wa(Df);const us={};function nt(r,e,i={}){Object.defineProperty(r,"_classRegistryKey",{value:e,writable:!1}),us[e]={klass:r,omit:i.omit||[]}}nt(Object,"Object"),Hs.serialize=function(r,e){const i=r.toArrayBuffer();return e&&e.add(i),{buffer:i}},Hs.deserialize=function(r){return new Hs(r.buffer)},Object.defineProperty(Hs,"name",{value:"Grid"}),nt(Hs,"Grid"),delete Be.prototype.constructor,nt(mi,"Color"),nt(Error,"Error"),nt(no,"Formatted"),nt(Sc,"FormattedSection"),nt(Eo,"AJAXError"),nt(ao,"ResolvedImage"),nt(eu,"StylePropertyFunction"),nt(Jc,"StyleExpression",{omit:["_evaluator"]}),nt(to,"ImageId"),nt(Un,"ImageVariant"),nt(cs,"ZoomDependentExpression"),nt(Gs,"ZoomConstantExpression"),nt(so,"CompoundExpression",{omit:["_evaluate"]});for(const r in js)us[js[r]._classRegistryKey]||nt(js[r],`Expression${r}`);function kl(r){return r&&(r instanceof ArrayBuffer||r.constructor&&r.constructor.name==="ArrayBuffer")}function Hn(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(kl(r)||r instanceof ImageBitmap)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 n of r)i.push(Hn(n,e));return i}if(r instanceof Map){const i={$name:"Map",entries:[]};for(const[n,s]of r.entries())i.entries.push(Hn(n),Hn(s,e));return i}if(r instanceof Set){const i={$name:"Set"};let n=0;for(const s of r.values())i[++n]=Hn(s);return i}if(typeof r=="bigint")return{$name:"BigInt",value:r.toString()};if(typeof r=="object"){const i=r.constructor,n=i._classRegistryKey;if(!n)throw new Error(`Can't serialize object of unregistered class "${i.name}".`);const s=i.serialize?i.serialize(r,e):{};if(!i.serialize){for(const u in r)r.hasOwnProperty(u)&&(us[n].omit.indexOf(u)>=0||(s[u]=Hn(r[u],e)));r instanceof Error&&(s.message=r.message)}if(s.$name)throw new Error("$name property is reserved for worker serialization logic.");return n!=="Object"&&(s.$name=n),s}throw new Error("can't serialize object of type "+typeof r)}function Aa(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||kl(r)||r instanceof ImageBitmap||ArrayBuffer.isView(r)||r instanceof ImageData)return r;if(Array.isArray(r))return r.map(Aa);if(typeof r=="object"){const e=r.$name||"Object";if(e==="Map"){const s=r.entries||[],u=new Map;for(let h=0;h<s.length;h+=2)u.set(Aa(s[h]),Aa(s[h+1]));return u}if(e==="Set"){const s=new Set;for(const u of Object.keys(r))u!=="$name"&&s.add(Aa(r[u]));return s}if(e==="BigInt")return BigInt(r.value);const{klass:i}=us[e];if(!i)throw new Error(`Can't deserialize unregistered class "${e}".`);if(i.deserialize)return i.deserialize(r);const n=Object.create(i.prototype);for(const s of Object.keys(r))s!=="$name"&&(n[s]=Aa(r[s]));return n}throw new Error("can't deserialize object of type "+typeof r)}const gt={"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 Ol(r){for(const e of r)if(tu(e.charCodeAt(0)))return!0;return!1}function Oh(r){for(const e of r)if(!Rf(e.charCodeAt(0)))return!1;return!0}function Rf(r){return!(gt.Arabic(r)||gt["Arabic Supplement"](r)||gt["Arabic Extended-A"](r)||gt["Arabic Presentation Forms-A"](r)||gt["Arabic Presentation Forms-B"](r))}function tu(r){return!(r!==746&&r!==747&&(r<4352||!(gt["Bopomofo Extended"](r)||gt.Bopomofo(r)||gt["CJK Compatibility Forms"](r)&&!(r>=65097&&r<=65103)||gt["CJK Compatibility Ideographs"](r)||gt["CJK Compatibility"](r)||gt["CJK Radicals Supplement"](r)||gt["CJK Strokes"](r)||!(!gt["CJK Symbols and Punctuation"](r)||r>=12296&&r<=12305||r>=12308&&r<=12319||r===12336)||gt["CJK Unified Ideographs Extension A"](r)||gt["CJK Unified Ideographs"](r)||gt["Enclosed CJK Letters and Months"](r)||gt["Hangul Compatibility Jamo"](r)||gt["Hangul Jamo Extended-A"](r)||gt["Hangul Jamo Extended-B"](r)||gt["Hangul Jamo"](r)||gt["Hangul Syllables"](r)||gt.Hiragana(r)||gt["Ideographic Description Characters"](r)||gt.Kanbun(r)||gt["Kangxi Radicals"](r)||gt["Katakana Phonetic Extensions"](r)||gt.Katakana(r)&&r!==12540||!(!gt["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)||!(!gt["Small Form Variants"](r)||r>=65112&&r<=65118||r>=65123&&r<=65126)||gt["Unified Canadian Aboriginal Syllabics"](r)||gt["Unified Canadian Aboriginal Syllabics Extended"](r)||gt["Vertical Forms"](r)||gt["Yijing Hexagram Symbols"](r)||gt["Yi Syllables"](r)||gt["Yi Radicals"](r))))}function iu(r){return!(tu(r)||(function(e){return!!(gt["Latin-1 Supplement"](e)&&(e===167||e===169||e===174||e===177||e===188||e===189||e===190||e===215||e===247)||gt["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)||gt["Letterlike Symbols"](e)||gt["Number Forms"](e)||gt["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)||gt["Control Pictures"](e)&&e!==9251||gt["Optical Character Recognition"](e)||gt["Enclosed Alphanumerics"](e)||gt["Geometric Shapes"](e)||gt["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||gt["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||gt["CJK Symbols and Punctuation"](e)||gt.Katakana(e)||gt["Private Use Area"](e)||gt["CJK Compatibility Forms"](e)||gt["Small Form Variants"](e)||gt["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 ru(r){return gt.Arabic(r)||gt["Arabic Supplement"](r)||gt["Arabic Extended-A"](r)||gt["Arabic Presentation Forms-A"](r)||gt["Arabic Presentation Forms-B"](r)}function Vh(r){return r>=1424&&r<=2303||gt["Arabic Presentation Forms-A"](r)||gt["Arabic Presentation Forms-B"](r)}function $n(r,e){return!(!e&&Vh(r)||r>=2304&&r<=3583||r>=3840&&r<=4255||gt.Khmer(r))}function _m(r){for(const e of r)if(Vh(e.charCodeAt(0)))return!0;return!1}const So={unavailable:"unavailable",deferred:"deferred",loading:"loading",parsing:"parsing",parsed:"parsed",loaded:"loaded",error:"error"};let Uh=null,lo=So.unavailable,Zn=null;const Vl=function(r){r&&typeof r=="string"&&r.indexOf("NetworkError")>-1&&(lo=So.error),Uh&&Uh(r)};function ou(){nu.fire(new xn("pluginStateChange",{pluginStatus:lo,pluginURL:Zn}))}const nu=new rs,Ul=function(){return lo},Lf=function(){if(lo!==So.deferred||!Zn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");lo=So.loading,ou(),Zn&&Vn({url:Zn},(r=>{r?Vl(r):(lo=So.loaded,ou())}))},qn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>lo===So.loaded||qn.applyArabicShaping!=null,isLoading:()=>lo===So.loading,setState(r){lo=r.pluginStatus,Zn=r.pluginURL},isParsing:()=>lo===So.parsing,isParsed:()=>lo===So.parsed,getPluginURL:()=>Zn};class zi{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.worldview=i.worldview,this.activeFloors=i.activeFloors):(this.now=0,this.fadeDuration=0,this.transition={},this.pitch=0,this.brightness=0)}isSupportedScript(e){return(function(i,n){for(const s of i)if(!$n(s.charCodeAt(0),n))return!1;return!0})(e,qn.isLoaded())}}class au{constructor(e,i,n,s,u){this.property=e,this.value=i,this.expression=(function(h,f,_,g,v){if(Qc(h))return new eu(h,f);if(Bl(h)||Array.isArray(h)&&h.length>0){const b=Bh(h,f,_,g,v);if(b.result==="error")throw new Error(b.value.map((w=>`${w.key}: ${w.message}`)).join(", "));return b.value}{let b=h;return typeof h=="string"&&f.type==="color"&&(b=mi.parse(h)),{kind:"constant",configDependencies:new Set,isIndoorDependent:!1,evaluate:()=>b}}})(i===void 0?e.specification.default:i,e.specification,n,s,u)}isIndoorDependent(){return this.expression.isIndoorDependent}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(e,i,n,s){return this.property.possiblyEvaluate(this,e,i,n,s)}}class Nh{constructor(e,i,n,s){this.property=e,this.value=new au(e,void 0,i,n,s)}transitioned(e,i){return new Bf(this.property,this.value,i,Object.assign({},e.transition,this.transition),e.now)}untransitioned(){return new Bf(this.property,this.value,null,{},0)}}class Ff{constructor(e,i,n,s){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._scope=i,this._options=n,this._iconImageUseTheme=s,this._isIndoorDependent=!1,this.configDependencies=new Set}getValue(e){return Ce(this._values[e].value.value)}setValue(e,i){this._values.hasOwnProperty(e)||(this._values[e]=new Nh(this._values[e].property,this._scope,this._options,this._iconImageUseTheme)),this._values[e].value=new au(this._values[e].property,i===null?void 0:Ce(i),this._scope,this._options,this._iconImageUseTheme),this._values[e].value.expression.configDependencies&&(this.configDependencies=new Set([...this.configDependencies,...this._values[e].value.expression.configDependencies]),this._isIndoorDependent=this._isIndoorDependent||this._values[e].value.isIndoorDependent())}setTransitionOrValue(e,i){i&&(this._options=i);const n=this._properties.properties;if(e)for(const s in e){const u=e[s];if(s.endsWith("-transition")){const h=s.slice(0,-11);n[h]&&this.setTransition(h,u)}else n.hasOwnProperty(s)&&this.setValue(s,u)}}getTransition(e){return Ce(this._values[e].transition)}setTransition(e,i){this._values.hasOwnProperty(e)||(this._values[e]=new Nh(this._values[e].property)),this._values[e].transition=Ce(i)||void 0}serialize(){const e={};for(const i of Object.keys(this._values)){const n=this.getValue(i);n!==void 0&&(e[i]=n);const s=this.getTransition(i);s!==void 0&&(e[`${i}-transition`]=s)}return e}transitioned(e,i){const n=new kf(this._properties);for(const s of Object.keys(this._values))n._values[s]=this._values[s].transitioned(e,i._values[s]);return n}untransitioned(){const e=new kf(this._properties);for(const i of Object.keys(this._values))e._values[i]=this._values[i].untransitioned();return e}isIndoorDependent(){return this._isIndoorDependent}}class Bf{constructor(e,i,n,s,u){const h=s.delay||0,f=s.duration||0;u=u||0,this.property=e,this.value=i,this.begin=u+h,this.end=this.begin+f,e.specification.transition&&(s.delay||s.duration)&&(this.prior=n)}possiblyEvaluate(e,i,n){const s=e.now||0,u=this.value.possiblyEvaluate(e,i,n),h=this.prior;if(h){if(s>this.end)return this.prior=null,u;if(this.value.isDataDriven())return this.prior=null,u;if(s<this.begin)return h.possiblyEvaluate(e,i,n);{const f=(s-this.begin)/(this.end-this.begin);return this.property.interpolate(h.possiblyEvaluate(e,i,n),u,Ka(f))}}return u}}class kf{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,i,n){const s=new ds(this._properties);for(const u of Object.keys(this._values))s._values[u]=this._values[u].possiblyEvaluate(e,i,n);return s}hasTransition(){for(const e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class Of{constructor(e,i,n,s){this._properties=e,this._values=Object.create(e.defaultPropertyValues),this._scope=i,this._options=n,this._iconImageUseTheme=s,this._isIndoorDependent=!1,this.configDependencies=new Set}getValue(e){return Ce(this._values[e].value)}setValue(e,i){this._values[e]=new au(this._values[e].property,i===null?void 0:Ce(i),this._scope,this._options,this._iconImageUseTheme),this._values[e].expression.configDependencies&&(this.configDependencies=new Set([...this.configDependencies,...this._values[e].expression.configDependencies]),this._isIndoorDependent=this._isIndoorDependent||this._values[e].isIndoorDependent())}serialize(){const e={};for(const i of Object.keys(this._values)){const n=this.getValue(i);n!==void 0&&(e[i]=n)}return e}possiblyEvaluate(e,i,n,s){const u=new ds(this._properties);for(const h of Object.keys(this._values))u._values[h]=this._values[h].possiblyEvaluate(e,i,n,s);return u}isIndoorDependent(){return this._isIndoorDependent}}class hs{constructor(e,i,n,s){this.property=e,this.value=i,this.parameters=n,this.iconImageUseTheme=s}isConstant(){return this.value.kind==="constant"}constantOr(e){return this.value.kind==="constant"?this.value.value:e}evaluate(e,i,n,s){return this.property.evaluate(this.value,this.parameters,e,i,n,s,this.iconImageUseTheme)}}class ds{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class je{constructor(e){this.specification=e}possiblyEvaluate(e,i){return e.expression.evaluate(i)}interpolate(e,i,n){const s=vl[this.specification.type];return s?s(e,i,n):e}}class Ye{constructor(e,i){this.specification=e,this.overrides=i}possiblyEvaluate(e,i,n,s,u){return e.expression.kind==="constant"||e.expression.kind==="camera"?new hs(this,{kind:"constant",value:e.expression.evaluate(i,null,{},n,s,void 0,u)},i):new hs(this,e.expression,i,u)}interpolate(e,i,n){if(e.value.kind!=="constant"||i.value.kind!=="constant")return e;if(e.value.value===void 0||i.value.value===void 0)return new hs(this,{kind:"constant",value:void 0},e.parameters);const s=vl[this.specification.type];return s?new hs(this,{kind:"constant",value:s(e.value.value,i.value.value,n)},e.parameters):e}evaluate(e,i,n,s,u,h,f){return e.kind==="constant"?e.value:e.evaluate(i,n,s,u,h,void 0,f)}}class fs{constructor(e){this.specification=e}possiblyEvaluate(e,i,n,s){return!!e.expression.evaluate(i,null,{},n,s)}interpolate(){return!1}}class Ji{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];const i=new zi(0,{});for(const n in e){const s=e[n];s.specification.overridable&&this.overridableProperties.push(n);const u=this.defaultPropertyValues[n]=new au(s,void 0),h=this.defaultTransitionablePropertyValues[n]=new Nh(s);this.defaultTransitioningPropertyValues[n]=h.untransitioned(),this.defaultPossiblyEvaluatedValues[n]=u.possiblyEvaluate(i)}}}nt(Ye,"DataDrivenProperty"),nt(je,"DataConstantProperty"),nt(fs,"ColorRampProperty");var fe=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"]},"use-theme":true,"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"]},"use-theme":true,"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"]},"use-theme":true,"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"}}},"modelNodeOverride":{"orientation":{"type":"array","value":"number","length":3,"default":[0,0,0],"period":360}},"modelNodeOverrides":{"*":{"type":"modelNodeOverride"}},"modelMaterialOverride":{"model-color":{"type":"color"},"model-color-mix-intensity":{"type":"number"},"model-opacity":{"type":"number"},"model-emissive-strength":{"type":"number"}},"modelMaterialOverrides":{"*":{"type":"modelMaterialOverride"}},"modelSourceModel":{"uri":{"type":"string"},"position":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[-180,-90],"maximum":[180,90]},"orientation":{"type":"array","value":"number","length":3,"default":[0,0,0],"period":360},"nodeOverrides":{"type":"modelNodeOverrides"},"materialOverrides":{"type":"modelMaterialOverrides"},"nodeOverrideNames":{"type":"array","value":"string"},"materialOverrideNames":{"type":"array","value":"string"},"featureProperties":{"type":"*"}},"modelSourceModels":{"*":{"type":"modelSourceModel"}},"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"},"models":{"type":"modelSourceModels"}},"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"},"appearances":{"type":"array","value":"appearance","supported-layer-types":["symbol"]}},"appearance":{"condition":{"type":"boolean","expression":{"interpolated":true,"parameters":["zoom","pitch","feature","feature-state","measure-light","distance-from-center"]},"property-type":"data-driven"},"name":{"type":"string"},"properties":{"type":"*"}},"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-facade":{"type":"boolean","default":false,"expression":{"parameters":["feature"]},"property-type":"data-driven"},"building-facade-floors":{"type":"number","minimum":1,"maximum":200,"default":3,"property-type":"data-driven","expression":{"parameters":["feature"]}},"building-facade-unit-width":{"type":"number","minimum":1,"maximum":20,"default":3.1,"property-type":"data-driven","expression":{"parameters":["feature"]}},"building-facade-window":{"type":"array","length":2,"value":"number","minimum":0.1,"maximum":1,"default":[0.9,0.9],"property-type":"data-driven","expression":{"parameters":["feature"]}},"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"},"building-flood-light-wall-radius":{"property-type":"data-driven","type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"building-flood-light-ground-radius":{"property-type":"data-driven","type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"building-flip-roof-orientation":{"property-type":"data-driven","type":"boolean","default":false,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}}},"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,"appearance":true,"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,0.1],"maximum":[10,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,"appearance":true,"use-theme":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"appearance":true,"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],"appearance":true,"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,"appearance":true,"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,0.1],"maximum":[10,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,"appearance":true,"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],"appearance":true,"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},"use-theme":true,"transition":true},"high-color":{"type":"color","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"use-theme":true,"transition":true},"space-color":{"type":"color","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"use-theme":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},"use-theme":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},"use-theme":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},"use-theme":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},"use-theme":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_source":{"sourceId":{"type":"string"},"sourceLayers":{"type":"array","value":"string"}},"indoor":{"*":{"type":"indoor_source"}},"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"]},"use-theme":true,"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","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","use-theme":true,"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"]}},"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)","use-theme":true,"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)","use-theme":true,"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","use-theme":true,"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"]}},"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","use-theme":true,"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-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"parameters":[]},"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)","use-theme":true,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"property-type":"data-driven"},"building-emissive-strength":{"type":"number","default":0,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"property-type":"data-driven"},"building-facade-emissive-chance":{"type":"number","default":0.35,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["measure-light","zoom"]}},"building-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{}},"building-flood-light-color":{"type":"color","default":"#ffffff","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"building-flood-light-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"building-flood-light-ground-attenuation":{"type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}}},"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","use-theme":true,"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"]}},"line-gradient":{"type":"color","use-theme":true,"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","use-theme":true,"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"]},"property-type":"data-driven"},"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)","use-theme":true,"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","use-theme":true,"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","use-theme":true,"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"],"use-theme":true,"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","use-theme":true,"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)","use-theme":true,"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"]}},"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","use-theme":true,"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)","use-theme":true,"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","use-theme":true,"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","use-theme":true,"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","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"hillshade-accent-color":{"type":"color","default":"#000000","use-theme":true,"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","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"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"],"use-theme":true,"expression":{"interpolated":true,"parameters":["sky-radial-progress"]}},"sky-atmosphere-halo-color":{"type":"color","default":"white","use-theme":true},"sky-atmosphere-color":{"type":"color","default":"white","use-theme":true},"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"]},"use-theme":true,"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]},"model-elevation-reference":{"type":"enum","values":{"sea":1,"ground":1,"hd-road-markup":1},"default":"ground","expression":{}}},"transition":{"duration":{"type":"number","default":300,"minimum":0},"delay":{"type":"number","default":0,"minimum":0}},"promoteId":{"*":{"type":"*"}}}');function Vf(r){return r instanceof Number||r instanceof String||r instanceof Boolean?r.valueOf():r}function su(r){if(Array.isArray(r))return r.map(su);if(r instanceof Object&&!(r instanceof Number||r instanceof String||r instanceof Boolean)){const e={};for(const i in r)e[i]=su(r[i]);return e}return Vf(r)}function Sn(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(!Sn(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function lu(r,e="",i=null,n="fill"){if(r==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};Sn(r)||(r=cu(r));const s=r;let u=!0;try{u=(function(v){if(!$s(v))return v;let b=su(v);return Uf(b),b=ps(b),b})(s)}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 Fw=require("./index-2Q366ESo.js");function Bw(Qu,Yp){for(var Oa=0;Oa<Yp.length;Oa++){const Dn=Yp[Oa];if(typeof Dn!="string"&&!Array.isArray(Dn)){for(const Va in Dn)if(Va!=="default"&&!(Va in Qu)){const nl=Object.getOwnPropertyDescriptor(Dn,Va);nl&&Object.defineProperty(Qu,Va,nl.get?nl:{enumerable:!0,get:()=>Dn[Va]})}}}return Object.freeze(Object.defineProperty(Qu,Symbol.toStringTag,{value:"Module"}))}var Wp={exports:{}},kw=Wp.exports,Z0;function Ow(){return Z0||(Z0=1,(function(Qu,Yp){(function(Oa,Dn){Qu.exports=Dn()})(kw,(function(){"use strict";var Oa,Dn,Va;function nl(a,Yr){if(!Oa)Oa=Yr;else if(!Dn)Dn=Yr;else{var ir="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 = {}; ("+Oa+")(sharedChunk); ("+Dn+")(sharedChunk); self.onerror = null;",Rn={};Oa(Rn),Va=Yr(Rn),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(Va.workerUrl=window.URL.createObjectURL(new Blob([ir],{type:"text/javascript"})))}}nl(["exports"],(function(a){var Yr=1e-6,ir=typeof Float32Array<"u"?Float32Array:Array;function Rn(r,e){var i=e[0],n=e[1],s=e[2],u=e[3],h=i*u-s*n;return h?(r[0]=u*(h=1/h),r[1]=-n*h,r[2]=-s*h,r[3]=i*h,r):null}function lc(){var r=new ir(9);return ir!=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 Ua(r,e){var i=e[0],n=e[1],s=e[2],u=e[3],h=e[4],f=e[5],_=e[6],g=e[7],v=e[8];return r[0]=h*v-f*g,r[1]=s*g-n*v,r[2]=n*f-s*h,r[3]=f*_-u*v,r[4]=i*v-s*_,r[5]=s*u-i*f,r[6]=u*g-h*_,r[7]=n*_-i*g,r[8]=i*h-n*u,r}function dn(r,e,i){var n=e[0],s=e[1],u=e[2],h=e[3],f=e[4],_=e[5],g=e[6],v=e[7],b=e[8],w=i[0],S=i[1],I=i[2],P=i[3],L=i[4],R=i[5],O=i[6],U=i[7],G=i[8];return r[0]=w*n+S*h+I*g,r[1]=w*s+S*f+I*v,r[2]=w*u+S*_+I*b,r[3]=P*n+L*h+R*g,r[4]=P*s+L*f+R*v,r[5]=P*u+L*_+R*b,r[6]=O*n+U*h+G*g,r[7]=O*s+U*f+G*v,r[8]=O*u+U*_+G*b,r}function Na(){var r=new ir(16);return ir!=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 Ei(r){var e=new ir(16);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}function rr(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 Wo(r,e){var i=e[0],n=e[1],s=e[2],u=e[3],h=e[4],f=e[5],_=e[6],g=e[7],v=e[8],b=e[9],w=e[10],S=e[11],I=e[12],P=e[13],L=e[14],R=e[15],O=i*f-n*h,U=i*_-s*h,G=i*g-u*h,K=n*_-s*f,Z=n*g-u*f,te=s*g-u*_,re=v*P-b*I,se=v*L-w*I,we=v*R-S*I,he=b*L-w*P,Te=b*R-S*P,Ae=w*R-S*L,Pe=O*Ae-U*Te+G*he+K*we-Z*se+te*re;return Pe?(r[0]=(f*Ae-_*Te+g*he)*(Pe=1/Pe),r[1]=(s*Te-n*Ae-u*he)*Pe,r[2]=(P*te-L*Z+R*K)*Pe,r[3]=(w*Z-b*te-S*K)*Pe,r[4]=(_*we-h*Ae-g*se)*Pe,r[5]=(i*Ae-s*we+u*se)*Pe,r[6]=(L*G-I*te-R*U)*Pe,r[7]=(v*te-w*G+S*U)*Pe,r[8]=(h*Te-f*we+g*re)*Pe,r[9]=(n*we-i*Te-u*re)*Pe,r[10]=(I*Z-P*G+R*O)*Pe,r[11]=(b*G-v*Z-S*O)*Pe,r[12]=(f*se-h*he-_*re)*Pe,r[13]=(i*he-n*se+s*re)*Pe,r[14]=(P*U-I*K-L*O)*Pe,r[15]=(v*K-b*U+w*O)*Pe,r):null}function qi(r,e,i){var n=e[0],s=e[1],u=e[2],h=e[3],f=e[4],_=e[5],g=e[6],v=e[7],b=e[8],w=e[9],S=e[10],I=e[11],P=e[12],L=e[13],R=e[14],O=e[15],U=i[0],G=i[1],K=i[2],Z=i[3];return r[0]=U*n+G*f+K*b+Z*P,r[1]=U*s+G*_+K*w+Z*L,r[2]=U*u+G*g+K*S+Z*R,r[3]=U*h+G*v+K*I+Z*O,r[4]=(U=i[4])*n+(G=i[5])*f+(K=i[6])*b+(Z=i[7])*P,r[5]=U*s+G*_+K*w+Z*L,r[6]=U*u+G*g+K*S+Z*R,r[7]=U*h+G*v+K*I+Z*O,r[8]=(U=i[8])*n+(G=i[9])*f+(K=i[10])*b+(Z=i[11])*P,r[9]=U*s+G*_+K*w+Z*L,r[10]=U*u+G*g+K*S+Z*R,r[11]=U*h+G*v+K*I+Z*O,r[12]=(U=i[12])*n+(G=i[13])*f+(K=i[14])*b+(Z=i[15])*P,r[13]=U*s+G*_+K*w+Z*L,r[14]=U*u+G*g+K*S+Z*R,r[15]=U*h+G*v+K*I+Z*O,r}function Ao(r,e,i){var n,s,u,h,f,_,g,v,b,w,S,I,P=i[0],L=i[1],R=i[2];return e===r?(r[12]=e[0]*P+e[4]*L+e[8]*R+e[12],r[13]=e[1]*P+e[5]*L+e[9]*R+e[13],r[14]=e[2]*P+e[6]*L+e[10]*R+e[14],r[15]=e[3]*P+e[7]*L+e[11]*R+e[15]):(s=e[1],u=e[2],h=e[3],f=e[4],_=e[5],g=e[6],v=e[7],b=e[8],w=e[9],S=e[10],I=e[11],r[0]=n=e[0],r[1]=s,r[2]=u,r[3]=h,r[4]=f,r[5]=_,r[6]=g,r[7]=v,r[8]=b,r[9]=w,r[10]=S,r[11]=I,r[12]=n*P+f*L+b*R+e[12],r[13]=s*P+_*L+w*R+e[13],r[14]=u*P+g*L+S*R+e[14],r[15]=h*P+v*L+I*R+e[15]),r}function Kr(r,e,i){var n=i[0],s=i[1],u=i[2];return r[0]=e[0]*n,r[1]=e[1]*n,r[2]=e[2]*n,r[3]=e[3]*n,r[4]=e[4]*s,r[5]=e[5]*s,r[6]=e[6]*s,r[7]=e[7]*s,r[8]=e[8]*u,r[9]=e[9]*u,r[10]=e[10]*u,r[11]=e[11]*u,r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}function Ln(r,e,i){var n=Math.sin(i),s=Math.cos(i),u=e[4],h=e[5],f=e[6],_=e[7],g=e[8],v=e[9],b=e[10],w=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]=u*s+g*n,r[5]=h*s+v*n,r[6]=f*s+b*n,r[7]=_*s+w*n,r[8]=g*s-u*n,r[9]=v*s-h*n,r[10]=b*s-f*n,r[11]=w*s-_*n,r}function Mo(r,e,i){var n=Math.sin(i),s=Math.cos(i),u=e[0],h=e[1],f=e[2],_=e[3],g=e[8],v=e[9],b=e[10],w=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]=u*s-g*n,r[1]=h*s-v*n,r[2]=f*s-b*n,r[3]=_*s-w*n,r[8]=u*n+g*s,r[9]=h*n+v*s,r[10]=f*n+b*s,r[11]=_*n+w*s,r}function Yo(r,e,i){var n=Math.sin(i),s=Math.cos(i),u=e[0],h=e[1],f=e[2],_=e[3],g=e[4],v=e[5],b=e[6],w=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]=u*s+g*n,r[1]=h*s+v*n,r[2]=f*s+b*n,r[3]=_*s+w*n,r[4]=g*s-u*n,r[5]=v*s-h*n,r[6]=b*s-f*n,r[7]=w*s-_*n,r}function sa(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 ja(r,e,i){var n,s,u,h=i[0],f=i[1],_=i[2],g=Math.sqrt(h*h+f*f+_*_);return g<Yr?null:(h*=g=1/g,f*=g,_*=g,n=Math.sin(e),s=Math.cos(e),r[0]=h*h*(u=1-s)+s,r[1]=f*h*u+_*n,r[2]=_*h*u-f*n,r[3]=0,r[4]=h*f*u-_*n,r[5]=f*f*u+s,r[6]=_*f*u+h*n,r[7]=0,r[8]=h*_*u+f*n,r[9]=f*_*u-h*n,r[10]=_*_*u+s,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r)}function al(r,e){var i=e[0],n=e[1],s=e[2],u=e[4],h=e[5],f=e[6],_=e[8],g=e[9],v=e[10];return r[0]=Math.sqrt(i*i+n*n+s*s),r[1]=Math.sqrt(u*u+h*h+f*f),r[2]=Math.sqrt(_*_+g*g+v*v),r}function sl(r,e){var i=e[0],n=e[1],s=e[2],u=e[3],h=i+i,f=n+n,_=s+s,g=i*h,v=n*h,b=n*f,w=s*h,S=s*f,I=s*_,P=u*h,L=u*f,R=u*_;return r[0]=1-b-I,r[1]=v+R,r[2]=w-L,r[3]=0,r[4]=v-R,r[5]=1-g-I,r[6]=S+P,r[7]=0,r[8]=w+L,r[9]=S-P,r[10]=1-g-b,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}var ll=qi;function bi(){var r=new ir(3);return ir!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r}function cc(r){var e=new ir(3);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}function Fr(r){var e=r[0],i=r[1],n=r[2];return Math.sqrt(e*e+i*i+n*n)}function nr(r,e,i){var n=new ir(3);return n[0]=r,n[1]=e,n[2]=i,n}function Vi(r,e,i,n){return r[0]=e,r[1]=i,r[2]=n,r}function xr(r,e,i){return r[0]=e[0]+i[0],r[1]=e[1]+i[1],r[2]=e[2]+i[2],r}function fn(r,e,i){return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],r}function Ko(r,e,i){return r[0]=e[0]*i[0],r[1]=e[1]*i[1],r[2]=e[2]*i[2],r}function pn(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 Qo(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 Ki(r,e,i){return r[0]=e[0]*i,r[1]=e[1]*i,r[2]=e[2]*i,r}function Co(r,e,i,n){return r[0]=e[0]+i[0]*n,r[1]=e[1]+i[1]*n,r[2]=e[2]+i[2]*n,r}function uc(r,e){var i=e[0]-r[0],n=e[1]-r[1],s=e[2]-r[2];return Math.sqrt(i*i+n*n+s*s)}function cl(r,e){var i=e[0]-r[0],n=e[1]-r[1],s=e[2]-r[2];return i*i+n*n+s*s}function hc(r){var e=r[0],i=r[1],n=r[2];return e*e+i*i+n*n}function la(r,e){return r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r}function Ri(r,e){var i=e[0],n=e[1],s=e[2],u=i*i+n*n+s*s;return u>0&&(u=1/Math.sqrt(u)),r[0]=e[0]*u,r[1]=e[1]*u,r[2]=e[2]*u,r}function lr(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function Hr(r,e,i){var n=e[0],s=e[1],u=e[2],h=i[0],f=i[1],_=i[2];return r[0]=s*_-u*f,r[1]=u*h-n*_,r[2]=n*f-s*h,r}function Ga(r,e,i,n){var s=e[0],u=e[1],h=e[2];return r[0]=s+n*(i[0]-s),r[1]=u+n*(i[1]-u),r[2]=h+n*(i[2]-h),r}function fr(r,e,i){var n=e[0],s=e[1],u=e[2],h=i[3]*n+i[7]*s+i[11]*u+i[15];return r[0]=(i[0]*n+i[4]*s+i[8]*u+i[12])/(h=h||1),r[1]=(i[1]*n+i[5]*s+i[9]*u+i[13])/h,r[2]=(i[2]*n+i[6]*s+i[10]*u+i[14])/h,r}function ca(r,e,i){var n=e[0],s=e[1],u=e[2];return r[0]=n*i[0]+s*i[3]+u*i[6],r[1]=n*i[1]+s*i[4]+u*i[7],r[2]=n*i[2]+s*i[5]+u*i[8],r}function ua(r,e,i){var n=i[0],s=i[1],u=i[2],h=i[3],f=e[0],_=e[1],g=e[2],v=s*g-u*_,b=u*f-n*g,w=n*_-s*f;return r[0]=f+h*(v+=v)+s*(w+=w)-u*(b+=b),r[1]=_+h*b+u*v-n*w,r[2]=g+h*w+n*b-s*v,r}function To(r){return r[0]=0,r[1]=0,r[2]=0,r}function Qr(r,e){return r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]}var pr=fn,Ju=Ko,Ss=Fr;function Ha(){var r=new ir(4);return ir!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0,r[3]=0),r}function ha(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 da(r,e){var i=e[0],n=e[1],s=e[2],u=e[3],h=i*i+n*n+s*s+u*u;return h>0&&(h=1/Math.sqrt(h)),r[0]=i*h,r[1]=n*h,r[2]=s*h,r[3]=u*h,r}function $r(r,e,i){var n=e[0],s=e[1],u=e[2],h=e[3];return r[0]=i[0]*n+i[4]*s+i[8]*u+i[12]*h,r[1]=i[1]*n+i[5]*s+i[9]*u+i[13]*h,r[2]=i[2]*n+i[6]*s+i[10]*u+i[14]*h,r[3]=i[3]*n+i[7]*s+i[11]*u+i[15]*h,r}function Fn(){var r=new ir(4);return ir!=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 Jo(r,e,i){i*=.5;var n=e[0],s=e[1],u=e[2],h=e[3],f=Math.sin(i),_=Math.cos(i);return r[0]=n*_+h*f,r[1]=s*_+u*f,r[2]=u*_-s*f,r[3]=h*_-n*f,r}function Bn(r,e,i){i*=.5;var n=e[0],s=e[1],u=e[2],h=e[3],f=Math.sin(i),_=Math.cos(i);return r[0]=n*_-u*f,r[1]=s*_+h*f,r[2]=u*_+n*f,r[3]=h*_-s*f,r}bi(),Ha();var oo,$a,Za,qa=da,As=(oo=bi(),$a=nr(1,0,0),Za=nr(0,1,0),function(r,e,i){var n=lr(e,i);return n<-.999999?(Hr(oo,$a,e),Ss(oo)<1e-6&&Hr(oo,Za,e),Ri(oo,oo),(function(s,u,h){h*=.5;var f=Math.sin(h);s[0]=f*u[0],s[1]=f*u[1],s[2]=f*u[2],s[3]=Math.cos(h)})(r,oo,Math.PI),r):n>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(Hr(oo,e,i),r[0]=oo[0],r[1]=oo[1],r[2]=oo[2],r[3]=1+n,qa(r,r))});function Br(){var r=new ir(2);return ir!=Float32Array&&(r[0]=0,r[1]=0),r}function ho(r,e){var i=new ir(2);return i[0]=r,i[1]=e,i}function ul(r,e,i){return r[0]=e,r[1]=i,r}function fa(r,e,i){return r[0]=e[0]+i[0],r[1]=e[1]+i[1],r}function mn(r,e,i){return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r}function kn(r,e,i){return r[0]=e[0]*i,r[1]=e[1]*i,r}function en(r){var e=r[0],i=r[1];return Math.sqrt(e*e+i*i)}function hl(r,e){var i=e[0],n=e[1],s=i*i+n*n;return s>0&&(s=1/Math.sqrt(s)),r[0]=e[0]*s,r[1]=e[1]*s,r}function Xa(r,e){return r[0]*e[0]+r[1]*e[1]}Fn(),Fn(),lc();var Xi,Nr,dc=mn;function Wa(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}Br();var tn=(function(){if(Nr)return Xi;function r(e,i,n,s){this.cx=3*e,this.bx=3*(n-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(s-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=i,this.p2x=n,this.p2y=s}return Nr=1,Xi=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 n=e,s=0;s<8;s++){var u=this.sampleCurveX(n)-e;if(Math.abs(u)<i)return n;var h=this.sampleCurveDerivativeX(n);if(Math.abs(h)<1e-6)break;n-=u/h}var f=0,_=1;for(n=e,s=0;s<20&&(u=this.sampleCurveX(n),!(Math.abs(u-e)<i));s++)e>u?f=n:_=n,n=.5*(_-f)+f;return n},solve:function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))}},Xi})(),fc=Wa(tn);function Be(r,e){this.x=r,this.y=e}function On(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(!On(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(!On(r[i],e[i]))return!1;return!0}return r===e}Be.prototype={clone(){return new Be(this.x,this.y)},add(r){return this.clone()._add(r)},sub(r){return this.clone()._sub(r)},multByPoint(r){return this.clone()._multByPoint(r)},divByPoint(r){return this.clone()._divByPoint(r)},mult(r){return this.clone()._mult(r)},div(r){return this.clone()._div(r)},rotate(r){return this.clone()._rotate(r)},rotateAround(r,e){return this.clone()._rotateAround(r,e)},matMult(r){return this.clone()._matMult(r)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(r){return this.x===r.x&&this.y===r.y},dist(r){return Math.sqrt(this.distSqr(r))},distSqr(r){const e=r.x-this.x,i=r.y-this.y;return e*e+i*i},angle(){return Math.atan2(this.y,this.x)},angleTo(r){return Math.atan2(this.y-r.y,this.x-r.x)},angleWith(r){return this.angleWithSep(r.x,r.y)},angleWithSep(r,e){return Math.atan2(this.x*e-this.y*r,this.x*r+this.y*e)},_matMult(r){const e=r[2]*this.x+r[3]*this.y;return this.x=r[0]*this.x+r[1]*this.y,this.y=e,this},_add(r){return this.x+=r.x,this.y+=r.y,this},_sub(r){return this.x-=r.x,this.y-=r.y,this},_mult(r){return this.x*=r,this.y*=r,this},_div(r){return this.x/=r,this.y/=r,this},_multByPoint(r){return this.x*=r.x,this.y*=r.y,this},_divByPoint(r){return this.x/=r.x,this.y/=r.y,this},_unit(){return this._div(this.mag()),this},_perp(){const r=this.y;return this.y=this.x,this.x=-r,this},_rotate(r){const e=Math.cos(r),i=Math.sin(r),n=i*this.x+e*this.y;return this.x=e*this.x-i*this.y,this.y=n,this},_rotateAround(r,e){const i=Math.cos(r),n=Math.sin(r),s=e.y+n*(this.x-e.x)+i*(this.y-e.y);return this.x=e.x+i*(this.x-e.x)-n*(this.y-e.y),this.y=s,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:Be},Be.convert=function(r){if(r instanceof Be)return r;if(Array.isArray(r))return new Be(+r[0],+r[1]);if(r.x!==void 0&&r.y!==void 0)return new Be(+r.x,+r.y);throw new Error("Expected [x, y] or {x, y} point format")};const eh=Math.PI/180,Ya=180/Math.PI;function oi(r){return r*eh}function Jr(r){return r*Ya}const th=[[0,0],[1,0],[1,1],[0,1]];function Ka(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 dl(r,e,i,n){const s=new fc(r,e,i,n);return function(u){return s.solve(u)}}const pe=dl(.25,.1,.25,1);function F(r,e,i){return Math.min(i,Math.max(e,r))}function V(r,e,i){return(i=F((i-r)/(e-r),0,1))*i*(3-2*i)}function $(r,e,i){const n=i-e,s=((r-e)%n+n)%n+e;return s===e?i:s}function ne(r,e,i){if(!r.length)return i(null,[]);let n=r.length;const s=new Array(r.length);let u=null;r.forEach(((h,f)=>{e(h,((_,g)=>{_&&(u=_),s[f]=g,--n==0&&i(u,s)}))}))}let ie=1;function ce(){return ie++}function xe(r){return r<=1?1:Math.pow(2,Math.ceil(Math.log2(r)))}function de(r,e){r.forEach((i=>{e[i]&&(e[i]=e[i].bind(e))}))}function ye(r,e,i){const n={};for(const s in r)n[s]=e.call(this,r[s],s,r);return n}function Oe(r,e,i){const n={};for(const s in r)e.call(this,r[s],s,r)&&(n[s]=r[s]);return n}function Ce(r){return Array.isArray(r)?r.map(Ce):typeof r=="object"&&r?ye(r,Ce):r}function rt(r,e){for(let i=0;i<r.length;i++)if(e.indexOf(r[i])>=0)return!0;return!1}const _t={};function tt(r){_t[r]||(typeof console<"u"&&console.warn(r),_t[r]=!0)}function Ot(r,e,i){return(i.y-r.y)*(e.x-r.x)>(e.y-r.y)*(i.x-r.x)}function Ft(r){let e=0;for(let i,n,s=0,u=r.length,h=u-1;s<u;h=s++)i=r[s],n=r[h],e+=(n.x-i.x)*(i.y+n.y);return e}function Rt([r,e,i]){const n=oi(e+90),s=oi(i);return{x:r*Math.cos(n)*Math.sin(s),y:r*Math.sin(n)*Math.sin(s),z:r*Math.cos(s),azimuthal:e,polar:i}}function Kt(r){return(typeof self<"u"||r!==void 0)&&typeof WorkerGlobalScope<"u"&&(r!==void 0?r:self)instanceof WorkerGlobalScope}function Qi(r){const e={};if(r.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((i,n,s,u)=>{const h=s||u;return e[n]=!h||h.toLowerCase(),""})),e["max-age"]){const i=parseInt(e["max-age"],10);isNaN(i)?delete e["max-age"]:e["max-age"]=i}return e}let mr=null;function ar(r,e){return[r[4*e],r[4*e+1],r[4*e+2],r[4*e+3]]}function vr(r,e,i,n){for(;e<i;){const s=e+i>>1;r[s]<n?e=s+1:i=s}return e}function Wi(r,e,i,n){for(;e<i;){const s=e+i>>1;r[s]<=n?e=s+1:i=s}return e}function ei(r){return r>0?1/(1.001-r):1+r}function Yi(r){return r>0?1-1/(1.001-r):-r}function Ii(r,e,i){return(r-e.min)*(i.max-i.min)/(e.max-e.min)+i.min}const Zt={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(!Zt.API_URL)return null;try{const r=new URL(Zt.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",BUILDING_GEN_URL:"https://api.mapbox.com/mapbox-gl-js/building-gen/building_gen_v1.2.4.wasm",GLYPHS_URL:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf",TILES3D_URL_PREFIX:"3dtiles/v1"};function sr(r){return Zt.API_URL_REGEX.test(r)}function jr(r){return Zt.API_SPRITE_REGEX.test(r)}let Zr,fo,Qa,kr,Po,eo;function _n(){return Zr==null&&(Zr=self.OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),Zr}const Cr={now:()=>kr!==void 0?kr:performance.now(),setNow(r){kr=r},restoreNow(){kr=void 0},frame(r){const e=requestAnimationFrame(r);return{cancel:()=>cancelAnimationFrame(e)}},getImageData(r,e=0){const{width:i,height:n}=r;Po||(Po=document.createElement("canvas"));const s=Po.getContext("2d",{willReadFrequently:!0});if(!s)throw new Error("failed to create canvas 2d context");return(i>Po.width||n>Po.height)&&(Po.width=i,Po.height=n),s.clearRect(-e,-e,i+2*e,n+2*e),s.drawImage(r,0,0,i,n),s.getImageData(-e,-e,i+2*e,n+2*e)},resolveURL:r=>(fo||(fo=document.createElement("a")),fo.href=r,fo.href),get devicePixelRatio(){return window.devicePixelRatio},get prefersReducedMotion(){return!!window.matchMedia&&(Qa==null&&(Qa=window.matchMedia("(prefers-reduced-motion: reduce)")),Qa.matches)},hasCanvasFingerprintNoise(){if(eo!==void 0)return eo;if(!_n())return eo=!1,!1;const r=new OffscreenCanvas(85,1),e=r.getContext("2d",{willReadFrequently:!0});let i=0;for(let s=0;s<r.width;++s)e.fillStyle=`rgba(${i++},${i++},${i++}, 255)`,e.fillRect(s,0,1,1);const n=e.getImageData(0,0,r.width,r.height);i=0;for(let s=0;s<n.data.length;++s)if(s%4!=3&&i++!==n.data[s])return eo=!0,!0;return eo=!1,!1}};function Ja(r,e){const i=r.indexOf("?");if(i<0)return`${r}?${new URLSearchParams(e).toString()}`;const n=new URLSearchParams(r.slice(i));for(const s in e)n.set(s,e[s]);return`${r.slice(0,i)}?${n.toString()}`}function Ms(r,e={persistentParams:[]}){const i=r.indexOf("?");if(i<0)return r;const n=new URLSearchParams,s=new URLSearchParams(r.slice(i));for(const h of e.persistentParams){const f=s.get(h);f&&n.set(h,f)}const u=n.toString();return`${r.slice(0,i)}${u.length>0?`?${u}`:""}`}const pc="mapbox-tiles";let mc=500,_c=50;const fl=["language","worldview","jobid"];let gn,po;function rn(){try{return caches}catch{}}function on(){const r=rn();r&&gn==null&&(gn=r.open(pc))}let Oo=1/0;const yn={supported:!1,testSupport:function(r){!gc&&es&&(ts?Yd(r):pa=r)}};let pa,es,gc=!1,ts=!1;const yc=typeof self<"u"?self:{};function Yd(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,es),r.isContextLost())return;yn.supported=!0}catch{}r.deleteTexture(e),gc=!0}yc.document&&(es=yc.document.createElement("img"),es.onload=function(){pa&&Yd(pa),pa=null,ts=!0},es.onerror=function(){gc=!0,pa=null},es.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const pl={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(pl);class Eo extends Error{constructor(e,i,n){i===401&&sr(n)&&(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=n}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const xc=Kt()?()=>self.worker.referrer:()=>(location.protocol==="blob:"?parent:self).location.href,is=function(r,e){if(!(/^file:/.test(i=r.url)||/^file:/.test(xc())&&!/^\w+:/.test(i))){if(self.fetch&&self.Request&&self.AbortController&&Request.prototype.hasOwnProperty("signal"))return(function(n,s){const u=new AbortController,h=new Request(n.url,{method:n.method||"GET",body:n.body,credentials:n.credentials,headers:n.headers,referrer:xc(),referrerPolicy:n.referrerPolicy,signal:u.signal});let f=!1,_=!1;const g=(v=h.url).indexOf("sku=")>0&&sr(v);var v;n.type==="json"&&h.headers.set("Accept","application/json");const b=(S,I,P)=>{if(_)return;if(S&&S.message!=="SecurityError"&&tt(S.toString()),I&&P)return w(I);const L=Date.now();fetch(h).then((R=>{if(R.ok){const O=g?R.clone():null;return w(R,O,L)}return s(new Eo(R.statusText,R.status,n.url))})).catch((R=>{R.name!=="AbortError"&&s(new Error(`${R.message} ${n.url}`))}))},w=(S,I,P)=>{(n.type==="arrayBuffer"?S.arrayBuffer():n.type==="json"?S.json():S.text()).then((L=>{_||(I&&P&&(function(R,O,U){if(on(),gn==null)return;const G=Qi(O.headers.get("Cache-Control")||"");if(G["no-store"])return;const K={status:O.status,statusText:O.statusText,headers:new Headers};O.headers.forEach(((re,se)=>K.headers.set(se,re))),G["max-age"]&&K.headers.set("Expires",new Date(U+1e3*G["max-age"]).toUTCString());const Z=K.headers.get("Expires");if(!Z||new Date(Z).getTime()-U<42e4)return;let te=Ms(R.url,{persistentParams:fl});if(O.status===206){const re=R.headers.get("Range");if(!re)return;K.status=200,te=Ja(te,{range:re})}(function(re,se){if(po===void 0)try{new Response(new ReadableStream),po=!0}catch{po=!1}po?se(re.body):re.blob().then(se).catch((we=>tt(we.message)))})(O,(re=>{const se=new Response((we=O.status)!==200&&we!==404&&[101,103,204,205,304].includes(we)?null:re,K);var we;on(),gn!=null&&gn.then((he=>he.put(te,se))).catch((he=>tt(he.message)))}))})(h,I,P),f=!0,s(null,L,S.headers))})).catch((L=>{_||s(new Error(L.message))}))};return g?(function(S,I){if(on(),gn==null)return I(null);gn.then((P=>{let L=Ms(S.url,{persistentParams:fl});const R=S.headers.get("Range");R&&(L=Ja(L,{range:R})),P.match(L).then((O=>{const U=(function(G){if(!G)return!1;const K=new Date(G.headers.get("Expires")||0),Z=Qi(G.headers.get("Cache-Control")||"");return Number(K)>Date.now()&&!Z["no-cache"]})(O);P.delete(L).catch(I),U&&P.put(L,O.clone()).catch(I),I(null,O,U)})).catch(I)})).catch(I)})(h,b):b(null,null),{cancel:()=>{_=!0,f||u.abort()}}})(r,e);if(Kt(self)&&self.worker.actor)return self.worker.actor.send("getResource",r,e,void 0,!0)}var i;return(function(n,s){const u=new XMLHttpRequest;u.open(n.method||"GET",n.url,!0),n.type==="arrayBuffer"&&(u.responseType="arraybuffer");for(const h in n.headers)u.setRequestHeader(h,n.headers[h]);return n.type==="json"&&(u.responseType="text",u.setRequestHeader("Accept","application/json")),u.withCredentials=n.credentials==="include",u.onerror=()=>{s(new Error(u.statusText))},u.onload=()=>{if((u.status>=200&&u.status<300||u.status===0)&&u.response!==null){let h=u.response;if(n.type==="json")try{h=JSON.parse(u.response)}catch(_){return s(_)}const f=new Headers;u.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((_=>{const g=_.split(": "),v=g.shift(),b=g.join(": ");f.append(v,b)})),s(null,h,f)}else s(new Eo(u.statusText,u.status,n.url))},u.send(n.body),{cancel:()=>u.abort()}})(r,e)},Vn=function(r,e){return is(Object.assign(r,{type:"arrayBuffer"}),e)};function Kp(r){const e=document.createElement("a");return e.href=r,e.protocol===location.protocol&&e.host===location.host}const Kd="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let ml,ti;ml=[],ti=0;const vc=function(r,e){if(yn.supported&&(r.headers||(r.headers={}),r.headers.accept="image/webp,*/*"),ti>=Zt.MAX_PARALLEL_IMAGE_REQUESTS){const u={requestParameters:r,callback:e,cancelled:!1,cancel(){this.cancelled=!0}};return ml.push(u),u}ti++;let i=!1;const n=()=>{if(!i)for(i=!0,ti--;ml.length&&ti<Zt.MAX_PARALLEL_IMAGE_REQUESTS;){const u=ml.shift(),{requestParameters:h,callback:f,cancelled:_}=u;_||(u.cancel=vc(h,f).cancel)}},s=Vn(r,((u,h,f)=>{n(),u?e(u):h&&(self.createImageBitmap?(function(_,g){const v=new Blob([new Uint8Array(_)],{type:"image/png"});createImageBitmap(v).then((b=>{g(null,b)})).catch((b=>{g(new Error(`Could not load image because of ${b.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))}))})(h,((_,g)=>e(_,g,f))):(function(_,g){const v=new Image;v.onload=()=>{g(null,v),URL.revokeObjectURL(v.src),v.onload=null,requestAnimationFrame((()=>{v.src=Kd}))},v.onerror=()=>g(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 b=new Blob([new Uint8Array(_)],{type:"image/png"});v.src=_.byteLength?URL.createObjectURL(b):Kd})(h,((_,g)=>e(_,g,f))))}));return{cancel:()=>{s.cancel(),n()}}};var ih,Qd,Jd,ma={exports:{}},_l={exports:{}},gl={exports:{}},rh=(function(){if(Jd)return ma.exports;Jd=1;var r=(ih||(ih=1,_l.exports=function(i,n){var s,u,h,f,_,g,v,b;for(u=i.length-(s=3&i.length),h=n,_=3432918353,g=461845907,b=0;b<u;)v=255&i.charCodeAt(b)|(255&i.charCodeAt(++b))<<8|(255&i.charCodeAt(++b))<<16|(255&i.charCodeAt(++b))<<24,++b,h=27492+(65535&(f=5*(65535&(h=(h^=v=(65535&(v=(v=(65535&v)*_+(((v>>>16)*_&65535)<<16)&4294967295)<<15|v>>>17))*g+(((v>>>16)*g&65535)<<16)&4294967295)<<13|h>>>19))+((5*(h>>>16)&65535)<<16)&4294967295))+((58964+(f>>>16)&65535)<<16);switch(v=0,s){case 3:v^=(255&i.charCodeAt(b+2))<<16;case 2:v^=(255&i.charCodeAt(b+1))<<8;case 1:h^=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 h^=i.length,h=2246822507*(65535&(h^=h>>>16))+((2246822507*(h>>>16)&65535)<<16)&4294967295,h=3266489909*(65535&(h^=h>>>13))+((3266489909*(h>>>16)&65535)<<16)&4294967295,(h^=h>>>16)>>>0}),_l.exports),e=(Qd||(Qd=1,gl.exports=function(i,n){for(var s,u=i.length,h=n^u,f=0;u>=4;)s=1540483477*(65535&(s=255&i.charCodeAt(f)|(255&i.charCodeAt(++f))<<8|(255&i.charCodeAt(++f))<<16|(255&i.charCodeAt(++f))<<24))+((1540483477*(s>>>16)&65535)<<16),h=1540483477*(65535&h)+((1540483477*(h>>>16)&65535)<<16)^(s=1540483477*(65535&(s^=s>>>24))+((1540483477*(s>>>16)&65535)<<16)),u-=4,++f;switch(u){case 3:h^=(255&i.charCodeAt(f+2))<<16;case 2:h^=(255&i.charCodeAt(f+1))<<8;case 1:h=1540483477*(65535&(h^=255&i.charCodeAt(f)))+((1540483477*(h>>>16)&65535)<<16)}return h=1540483477*(65535&(h^=h>>>13))+((1540483477*(h>>>16)&65535)<<16),(h^=h>>>15)>>>0}),gl.exports);return ma.exports=r,ma.exports.murmur3=r,ma.exports.murmur2=e,ma.exports})(),bc=Wa(rh);class xn{constructor(e,...i){Object.assign(this,i[0]||{}),this.type=e}}class yl extends xn{constructor(e,i={}){super("error",Object.assign({error:e},i))}}function oh(r,e,i){i[r]&&i[r].indexOf(e)!==-1||(i[r]=i[r]||[],i[r].push(e))}function _a(r,e,i){if(i&&i[r]){const n=i[r].indexOf(e);n!==-1&&i[r].splice(n,1)}}class rs{on(e,i){return this._listeners=this._listeners||{},oh(e,i,this._listeners),this}off(e,i){return _a(e,i,this._listeners),_a(e,i,this._oneTimeListeners),this}once(e,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},oh(e,i,this._oneTimeListeners),this):new Promise((n=>{this.once(e,n)}))}fire(e,i){const n=typeof e=="string"?new xn(e,i):e,s=n.type;if(this.listens(s)){n.target=this;const u=this._listeners&&this._listeners[s]?this._listeners[s].slice():[];for(const _ of u)_.call(this,n);const h=this._oneTimeListeners&&this._oneTimeListeners[s]?this._oneTimeListeners[s].slice():[];for(const _ of h)_a(s,_,this._oneTimeListeners),_.call(this,n);const f=this._eventedParent;if(f){const _=typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData;Object.assign(n,_),f.fire(n)}}else n instanceof yl&&console.error(n.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 to{constructor(e){typeof e=="string"?this.name=e:(this.name=e.name,this.iconsetId=e.iconsetId)}static from(e){return new to(e)}static toString(e){return e.iconsetId?`${e.name}${e.iconsetId}`:e.name}static parse(e){const[i,n]=e.split("");return new to({name:i,iconsetId:n})}static isEqual(e,i){return e.name===i.name&&e.iconsetId===i.iconsetId}toString(){return to.toString(this)}serialize(){return{name:this.name,iconsetId:this.iconsetId}}}var wc,xl={},Vo=(function(){if(wc)return xl;wc=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(u){return(u=Math.round(u))<0?0:u>255?255:u}function i(u){return e(u[u.length-1]==="%"?parseFloat(u)/100*255:parseInt(u))}function n(u){return(h=u[u.length-1]==="%"?parseFloat(u)/100:parseFloat(u))<0?0:h>1?1:h;var h}function s(u,h,f){return f<0?f+=1:f>1&&(f-=1),6*f<1?u+(h-u)*f*6:2*f<1?h:3*f<2?u+(h-u)*(2/3-f)*6:u}try{xl.parseCSSColor=function(u){var h,f=u.replace(/ /g,"").toLowerCase();if(f in r)return r[f].slice();if(f[0]==="#")return f.length===4?(h=parseInt(f.substr(1),16))>=0&&h<=4095?[(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1]:null:f.length===7&&(h=parseInt(f.substr(1),16))>=0&&h<=16777215?[(16711680&h)>>16,(65280&h)>>8,255&h,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(","),w=1;switch(v){case"rgba":if(b.length!==4)return null;w=n(b.pop());case"rgb":return b.length!==3?null:[i(b[0]),i(b[1]),i(b[2]),w];case"hsla":if(b.length!==4)return null;w=n(b.pop());case"hsl":if(b.length!==3)return null;var S=(parseFloat(b[0])%360+360)%360/360,I=n(b[1]),P=n(b[2]),L=P<=.5?P*(I+1):P+I-P*I,R=2*P-L;return[e(255*s(R,L,S+1/3)),e(255*s(R,L,S)),e(255*s(R,L,S-1/3)),w];default:return null}}return null}}catch{}return xl})();class mi{constructor(e,i,n,s=1){this.r=e,this.g=i,this.b=n,this.a=s}static parse(e){if(!e)return;if(e instanceof mi)return e;if(typeof e!="string")return;const i=Vo.parseCSSColor(e);return i?new mi(i[0]/255,i[1]/255,i[2]/255,i[3]):void 0}toString(){const[e,i,n,s]=[this.r,this.g,this.b,this.a];return`rgba(${Math.round(255*e)},${Math.round(255*i)},${Math.round(255*n)},${s})`}toNonPremultipliedRenderColor(e){const{r:i,g:n,b:s,a:u}=this;return new tf(e,i,n,s,u)}toPremultipliedRenderColor(e){const{r:i,g:n,b:s,a:u}=this;return new rf(e,i*u,n*u,s*u,u)}clone(){return new mi(this.r,this.g,this.b,this.a)}}class ef{constructor(e,i,n,s,u,h=!1){if(this.premultiplied=!1,this.premultiplied=h,e){const f=e.image.height,_=f*f;this.premultiplied?(i=u===0?0:i/u*(f-1),n=u===0?0:n/u*(f-1),s=u===0?0:s/u*(f-1)):(i*=f-1,n*=f-1,s*=f-1);const g=Math.floor(i),v=Math.floor(n),b=Math.floor(s),w=Math.ceil(i),S=Math.ceil(n),I=Math.ceil(s),P=i-g,L=n-v,R=s-b,O=e.image.data,U=4*(g+v*_+b*f),G=4*(g+v*_+I*f),K=4*(g+S*_+b*f),Z=4*(g+S*_+I*f),te=4*(w+v*_+b*f),re=4*(w+v*_+I*f),se=4*(w+S*_+b*f),we=4*(w+S*_+I*f);if(U<0||we>=O.length)throw new Error("out of range");this.r=bt(bt(bt(O[U],O[G],R),bt(O[K],O[Z],R),L),bt(bt(O[te],O[re],R),bt(O[se],O[we],R),L),P)/255*(this.premultiplied?u:1),this.g=bt(bt(bt(O[U+1],O[G+1],R),bt(O[K+1],O[Z+1],R),L),bt(bt(O[te+1],O[re+1],R),bt(O[se+1],O[we+1],R),L),P)/255*(this.premultiplied?u:1),this.b=bt(bt(bt(O[U+2],O[G+2],R),bt(O[K+2],O[Z+2],R),L),bt(bt(O[te+2],O[re+2],R),bt(O[se+2],O[we+2],R),L),P)/255*(this.premultiplied?u:1),this.a=u}else this.r=i,this.g=n,this.b=s,this.a=u}toArray(){const{r:e,g:i,b:n,a:s}=this;return[255*e,255*i,255*n,s]}toHslaArray(){let{r:e,g:i,b:n,a:s}=this;if(this.premultiplied){if(s===0)return[0,0,0,0];const I=1/s;e*=I,i*=I,n*=I}const u=Math.min(Math.max(e,0),1),h=Math.min(Math.max(i,0),1),f=Math.min(Math.max(n,0),1),_=Math.min(u,h,f),g=Math.max(u,h,f),v=g-_,b=.5*(_+g);if(v===0)return[0,0,100*b,s];const w=b>.5?v/(2-g-_):v/(g+_);let S;switch(g){case u:S=60*((h-f)/v+(h<f?6:0));break;case h:S=60*((f-u)/v+2);break;default:S=60*((u-h)/v+4)}return[S,100*w,100*b,s]}toArray01(){const{r:e,g:i,b:n,a:s}=this;return[e,i,n,s]}toArray01Scaled(e){const{r:i,g:n,b:s}=this;return[i*e,n*e,s*e]}toArray01Linear(){const{r:e,g:i,b:n,a:s}=this;return[Math.pow(e,2.2),Math.pow(i,2.2),Math.pow(n,2.2),s]}}class tf extends ef{constructor(e,i,n,s,u){super(e,i,n,s,u,!1)}}class rf extends ef{constructor(e,i,n,s,u){super(e,i,n,s,u,!0)}}function bt(r,e,i){return r*(1-i)+e*i}function nh(r,e,i){return r.map(((n,s)=>bt(n,e[s],i)))}mi.black=new mi(0,0,0,1),mi.white=new mi(1,1,1,1),mi.transparent=new mi(0,0,0,0),mi.red=new mi(1,0,0,1),mi.blue=new mi(0,0,1,1);var vl=Object.freeze({__proto__:null,array:nh,color:function(r,e,i){return new mi(bt(r.r,e.r,i),bt(r.g,e.g,i),bt(r.b,e.b,i),bt(r.a,e.a,i))},number:bt});class Uo extends Error{constructor(e,i){super(i),this.message=i,this.key=e}}class Cs{constructor(e,i=[]){this.parent=e,this.bindings={};for(const[n,s]of i)this.bindings[n]=s}concat(e){return new Cs(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 nn={kind:"null"},ft={kind:"number"},Yt={kind:"string"},xi={kind:"boolean"},mo={kind:"color"},vn={kind:"object"},di={kind:"value"},Tc={kind:"collator"},bl={kind:"formatted"},wl={kind:"resolvedImage"};function qr(r,e){return{kind:"array",itemType:r,N:e}}function _r(r){if(r.kind==="array"){const e=_r(r.itemType);return typeof r.N=="number"?`array<${e}, ${r.N}>`:r.itemType.kind==="value"?"array":`array<${e}>`}return r.kind}const Qp=[nn,ft,Yt,xi,mo,bl,vn,qr(di),wl];function ga(r,e){if(e.kind==="error")return null;if(r.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!ga(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 Qp)if(!ga(i,e))return null}}return`Expected ${_r(r)} but found ${_r(e)} instead.`}function ah(r,e){return e.some((i=>i.kind===r.kind))}function Tl(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))}function Ec(r,e){return r.kind==="array"&&e.kind==="array"?r.N===e.N&&Ec(r.itemType,e.itemType):r.kind===e.kind}class sh{constructor(e,i,n){this.sensitivity=e?i?"variant":"case":i?"accent":"base",this.locale=n,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 Sc{constructor(e,i,n,s,u){this.text=e.normalize?e.normalize():e,this.image=i,this.scale=n,this.fontStack=s,this.textColor=u}}class no{constructor(e){this.sections=e}static fromString(e){return new no([new Sc(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 no?e:no.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 s=i.image.getPrimary().id.toString();e.push(["image",s]);continue}e.push(i.text);const n={};i.fontStack&&(n["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(n["font-scale"]=i.scale),i.textColor&&(n["text-color"]=["rgba"].concat(i.textColor.toNonPremultipliedRenderColor(null).toArray())),e.push(n)}return e}}class Un{constructor(e,i={}){this.id=to.from(e),this.params=i.params,this.sx=i.sx||1,this.sy=i.sy||1}toString(){return JSON.stringify(this)}static parse(e){let i,n,s,u;try{({id:i,params:n,sx:s,sy:u}=JSON.parse(e)||{})}catch{return null}return i?new Un(i,{params:n,sx:s,sy:u}):null}scaleSelf(e,i=e){return this.sx*=e,this.sy*=i,this}}class ao{constructor(e,i,n,s,u=!1){this.primaryId=to.from(e),this.primaryOptions=i,n&&(this.secondaryId=to.from(n)),this.secondaryOptions=s,this.available=u}toString(){return this.primaryId&&this.secondaryId?`[${this.primaryId.name},${this.secondaryId.name}]`:this.primaryId.name}hasPrimary(){return!!this.primaryId}getPrimary(){return new Un(this.primaryId,this.primaryOptions)}hasSecondary(){return!!this.secondaryId}getSecondary(){return this.secondaryId?new Un(this.secondaryId,this.secondaryOptions):null}static from(e){return typeof e=="string"?ao.build({name:e}):e}static build(e,i,n,s){return!e||typeof e=="object"&&!("name"in e)?null:new ao(e,n,i,s)}}function os(r,e,i,n){return typeof r=="number"&&r>=0&&r<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof i=="number"&&i>=0&&i<=255?n===void 0||typeof n=="number"&&n>=0&&n<=1?null:`Invalid rgba value [${[r,e,i,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof n=="number"?[r,e,i,n]:[r,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ps(r){if(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number"||r instanceof mi||r instanceof sh||r instanceof no||r instanceof ao)return!0;if(Array.isArray(r)){for(const e of r)if(!Ps(e))return!1;return!0}if(typeof r=="object"){for(const e in r)if(!Ps(r[e]))return!1;return!0}return!1}function Pr(r){if(r===null)return nn;if(typeof r=="string")return Yt;if(typeof r=="boolean")return xi;if(typeof r=="number")return ft;if(r instanceof mi)return mo;if(r instanceof sh)return Tc;if(r instanceof no)return bl;if(r instanceof ao)return wl;if(Array.isArray(r)){const e=r.length;let i;for(const n of r){const s=Pr(n);if(i){if(i===s)continue;i=di;break}i=s}return qr(i||di,e)}return vn}function No(r){const e=typeof r;return r===null?"":e==="string"||e==="number"||e==="boolean"?String(r):r instanceof no||r instanceof ao||r instanceof mi?r.toString():JSON.stringify(r)}class Nn{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(!Ps(e[1]))return i.error("invalid value");const n=e[1];let s=Pr(n);const u=i.expectedType;return s.kind!=="array"||s.N!==0||!u||u.kind!=="array"||typeof u.N=="number"&&u.N!==0||(s=u),new Nn(s,n)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof mi?["rgba"].concat(this.value.toNonPremultipliedRenderColor(null).toArray()):this.value instanceof no?this.value.serialize():this.value}}class Ir{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}const lh={string:Yt,number:ft,boolean:xi,object:vn};class an{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 n,s=1;const u=e[0];if(u==="array"){let f,_;if(e.length>2){const g=e[1];if(typeof g!="string"||!(g in lh)||g==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);f=lh[g],s++}else f=di;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],s++}n=qr(f,_)}else n=lh[u];const h=[];for(;s<e.length;s++){const f=i.parse(e[s],s,di);if(!f)return null;h.push(f)}return new an(n,h)}evaluate(e){for(let i=0;i<this.args.length;i++){const n=this.args[i].evaluate(e);if(!ga(this.type,Pr(n)))return n;if(i===this.args.length-1)throw new Ir(`The expression ${JSON.stringify(this.args[i].serialize())} evaluated to ${_r(Pr(n))} but was expected to be of type ${_r(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 n=e.itemType;if(n.kind==="string"||n.kind==="number"||n.kind==="boolean"){i.push(n.kind);const s=e.N;(typeof s=="number"||this.args.length>1)&&i.push(s)}}return i.concat(this.args.map((n=>n.serialize())))}}class bn{constructor(e){this.type=bl,this.sections=e}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const n=e[1];if(!Array.isArray(n)&&typeof n=="object")return i.error("First argument must be an image or text section.");const s=[];let u=!1;for(let h=1;h<=e.length-1;++h){const f=e[h];if(u&&typeof f=="object"&&!Array.isArray(f)){u=!1;let _=null;if(f["font-scale"]&&(_=i.parseObjectValue(f["font-scale"],h,"font-scale",ft),!_))return null;let g=null;if(f["text-font"]&&(g=i.parseObjectValue(f["text-font"],h,"text-font",qr(Yt)),!g))return null;let v=null;if(f["text-color"]&&(v=i.parseObjectValue(f["text-color"],h,"text-color",mo),!v))return null;const b=s[s.length-1];b.scale=_,b.font=g,b.textColor=v}else{const _=i.parse(e[h],h,di);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'.");u=!0,s.push({content:_,scale:null,font:null,textColor:null})}}return new bn(s)}evaluate(e){return new no(this.sections.map((i=>{const n=i.content.evaluate(e);return Ec(Pr(n),wl)?new Sc("",n,null,null,null):new Sc(No(n),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 n={};i.scale&&(n["font-scale"]=i.scale.serialize()),i.font&&(n["text-font"]=i.font.serialize()),i.textColor&&(n["text-color"]=i.textColor.serialize()),e.push(n)}return e}}class Bt{constructor(e,i,n,s){this._imageWarnHistory={},this.type=wl,this.namePrimary=e,this.nameSecondary=i,n&&(this.paramsPrimary=n.params,this.iconsetIdPrimary=n.iconset?n.iconset.id:void 0),s&&(this.paramsSecondary=s.params,this.iconsetIdSecondary=s.iconset?s.iconset.id:void 0)}static parse(e,i){if(e.length<2)return i.error("Expected two or more arguments.");let n=1;const s=[];function u(){if(n<e.length){const f=i.parse(e[n],n++,Yt);return f?(s.push({image:f,options:{}}),!0):(i.error(s.length?"Secondary image variant is not a string.":"No image name provided."),!1)}return!0}function h(){if(n<e.length){const _=e[n];if((f=_)===null||typeof f!="object"||Array.isArray(f))return!0;const g=_.params,v=_.iconset,b=i.concat(n);if(!g&&!v)return n++,!0;if(g){if(typeof g!="object"||g.constructor!==Object)return b.error('Image options "params" should be an object'),!1;const w={},S=b.concat(void 0,"params");for(const I in g){if(!I)return S.error("Image parameter name should be non-empty"),!1;const P=S.concat(void 0,I).parse(g[I],void 0,mo,void 0,{typeAnnotation:"coerce"});if(!P)return!1;w[I]=P}s[s.length-1].options.params=w}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;s[s.length-1].options.iconset=v}return n++,!0}var f;return!0}for(let f=0;f<2;f++)if(!u()||!h())return;return new Bt(s[0].image,s[1]?s[1].image:void 0,s[0].options,s[1]?s[1].options:void 0)}evaluateParams(e,i){const n={};if(i){for(const s in i)if(i[s])try{n[s]=i[s].evaluate(e)}catch{continue}if(Object.keys(n).length!==0)return{params:n}}}evaluate(e){const i={name:this.namePrimary.evaluate(e),iconsetId:this.iconsetIdPrimary},n=this.nameSecondary?{name:this.nameSecondary.evaluate(e),iconsetId:this.iconsetIdSecondary}:void 0,s=ao.build(i,n,this.paramsPrimary?this.evaluateParams(e,this.paramsPrimary):void 0,this.paramsSecondary?this.evaluateParams(e,this.paramsSecondary):void 0);if(s&&e.availableImages){const u=s.getPrimary().id;if(s.available=e.availableImages.some((h=>to.isEqual(h,u))),s.available){const h=s.getSecondary()?s.getSecondary().id:null;h&&(s.available=e.availableImages.some((f=>to.isEqual(f,h))))}}return s}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 n={};if(i&&(n.iconset={id:i}),e){n.params={};for(const s in e)e[s]&&(n.params[s]=e[s].serialize())}return Object.keys(n).length>0?n: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 ht(r){return Et(r)?"string":zs(r)?"number":Ac(r)?"boolean":Array.isArray(r)?"array":r===null?"null":Ic(r)?"object":typeof r}function Ic(r){return r!=null&&!Array.isArray(r)&&typeof r!="function"&&!(r instanceof String||r instanceof Number||r instanceof Boolean)&&typeof r=="object"}function Et(r){return typeof r=="string"||r instanceof String}function zs(r){return typeof r=="number"||r instanceof Number}function Ac(r){return typeof r=="boolean"||r instanceof Boolean}const Tt={"to-boolean":xi,"to-color":mo,"to-number":ft,"to-string":Yt};class wn{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 n=e[0],s=[];let u=nn;if(n==="to-array"){if(!Array.isArray(e[1]))return null;const h=e[1].length;if(i.expectedType){if(i.expectedType.kind!=="array")return i.error(`Expected ${i.expectedType.kind} but found array.`);u=qr(i.expectedType.itemType,h)}else{if(!(h>0&&Ps(e[1][0])))return null;u=qr(Pr(e[1][0]),h)}for(let f=0;f<h;f++){const _=e[1][f];let g;if(Array.isArray(_))g=i.parse(_,void 0,u.itemType);else{const v=ht(_);if(v!==u.itemType.kind)return i.error(`Expected ${u.itemType.kind} but found ${v}.`);g=i.registry.literal.parse(["literal",_===void 0?null:_],i)}if(!g)return null;s.push(g)}}else{if((n==="to-boolean"||n==="to-string")&&e.length!==2)return i.error("Expected one argument.");u=Tt[n];for(let h=1;h<e.length;h++){const f=i.parse(e[h],h,di);if(!f)return null;s.push(f)}}return new wn(u,s)}evaluate(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){let i,n;for(const s of this.args){if(i=s.evaluate(e),n=null,i instanceof mi)return i;if(typeof i=="string"){const u=e.parseColor(i);if(u)return u}else if(Array.isArray(i)&&(n=i.length<3||i.length>4?`Invalid rbga value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:os(i[0],i[1],i[2],i[3]),!n))return new mi(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new Ir(n||`Could not parse color from value '${typeof i=="string"?i:String(JSON.stringify(i))}'`)}if(this.type.kind==="number"){let i=null;for(const n of this.args){if(i=n.evaluate(e),i===null)return 0;const s=Number(i);if(!isNaN(s))return s}throw new Ir(`Could not convert ${JSON.stringify(i)} to number.`)}return this.type.kind==="formatted"?no.fromString(No(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?ao.build(No(this.args[0].evaluate(e))):this.type.kind==="array"?this.args.map((i=>i.evaluate(e))):No(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 bn([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Bt(this.args[0]).serialize();const e=this.type.kind==="array"?[]:[`to-${this.type.kind}`];return this.eachChild((i=>{e.push(i.serialize())})),e}}const ch=["Unknown","Point","LineString","Polygon"];class Mc{constructor(e,i,n){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,this.iconImageUseTheme=n}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?ch[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:n,y:s}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(n*i-e[0])+this.featureDistanceData.bearing[1]*(s*i-e[1])}return 0}parseColor(e){let i=this._parseColorCache[e];return i||(i=this._parseColorCache[e]=mi.parse(e)),i}getConfig(e){return this.options?this.options.get(e):null}}class so{constructor(e,i,n,s,u){this.name=e,this.type=i,this._evaluate=n,this.args=s,this._overloadIndex=u}evaluate(e){if(!this._evaluate){const i=so.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 n=e[0],s=so.definitions[n];if(!s)return i.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0);const u=Array.isArray(s)?s[0]:s.type,h=Array.isArray(s)?[[s[1],s[2]]]:s.overloads,f=[];let _=null,g=-1;for(const[v,b]of h){if(Array.isArray(v)&&v.length!==e.length-1)continue;f.push(v),g++,_=new Uc(i.registry,i.path,null,i.scope,void 0,i._scope,i.options,i.iconImageUseTheme);const w=[];let S=!1;for(let I=1;I<e.length;I++){const P=e[I],L=Array.isArray(v)?v[I-1]:v.type,R=_.parse(P,1+w.length,L);if(!R){S=!0;break}w.push(R)}if(!S)if(Array.isArray(v)&&v.length!==w.length)_.error(`Expected ${v.length} arguments, but found ${w.length} instead.`);else{for(let I=0;I<w.length;I++){const P=Array.isArray(v)?v[I]:v.type,L=w[I];_.concat(I+1).checkSubtype(P,L.type)}if(_.errors.length===0)return new so(n,u,b,w,g)}}if(f.length===1)i.errors.push(..._.errors);else{const v=(f.length?f:h.map((([w])=>w))).map(Cc).join(" | "),b=[];for(let w=1;w<e.length;w++){const S=i.parse(e[w],1+b.length);if(!S)return null;b.push(_r(S.type))}i.error(`Expected arguments of type ${v}, but found (${b.join(", ")}) instead.`)}return null}static register(e,i){so.definitions=i;for(const n in i)e[n]=so}}function Cc(r){return Array.isArray(r)?`(${r.map(_r).join(", ")})`:`(${_r(r.type)}...)`}class Or{constructor(e,i,n){this.type=Tc,this.locale=n,this.caseSensitive=e,this.diacriticSensitive=i}static parse(e,i){if(e.length!==2)return i.error("Expected one argument.");const n=e[1];if(typeof n!="object"||Array.isArray(n))return i.error("Collator options argument must be an object.");const s=n["case-sensitive"]===void 0?i.parse(!1,1,xi):i.parseObjectValue(n["case-sensitive"],1,"case-sensitive",xi);if(!s)return null;const u=n["diacritic-sensitive"]===void 0?i.parse(!1,1,xi):i.parseObjectValue(n["diacritic-sensitive"],1,"diacritic-sensitive",xi);if(!u)return null;let h=null;return n.locale&&(h=i.parseObjectValue(n.locale,1,"locale",Yt),!h)?null:new Or(s,u,h)}evaluate(e){return new sh(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 Pc(r,e,i=0,n=r.length-1,s=uh){for(;n>i;){if(n-i>600){const _=n-i+1,g=e-i+1,v=Math.log(_),b=.5*Math.exp(2*v/3),w=.5*Math.sqrt(v*b*(_-b)/_)*(g-_/2<0?-1:1);Pc(r,e,Math.max(i,Math.floor(e-g*b/_+w)),Math.min(n,Math.floor(e+(_-g)*b/_+w)),s)}const u=r[e];let h=i,f=n;for(sn(r,i,e),s(r[n],u)>0&&sn(r,i,n);h<f;){for(sn(r,h,f),h++,f--;s(r[h],u)<0;)h++;for(;s(r[f],u)>0;)f--}s(r[i],u)===0?sn(r,i,f):(f++,sn(r,f,n)),f<=e&&(i=f+1),e<=f&&(n=f-1)}}function sn(r,e,i){const n=r[e];r[e]=r[i],r[i]=n}function uh(r,e){return r<e?-1:r>e?1:0}function ya(r){let e=0;for(let i,n,s=0,u=r.length,h=u-1;s<u;h=s++)i=r[s],n=r[h],e+=(n.x-i.x)*(i.y+n.y);return e}function jo(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 Jp(r,e,i){const n=r[0]-e[0],s=r[1]-e[1],u=r[0]-i[0],h=r[1]-i[1];return n*h-u*s==0&&n*u<=0&&s*h<=0}function Ds(r,e,i=!1){let n=!1;for(let f=0,_=e.length;f<_;f++){const g=e[f];for(let v=0,b=g.length,w=b-1;v<b;w=v++){const S=g[w],I=g[v];if(Jp(r,S,I))return i;(u=S)[1]>(s=r)[1]!=(h=I)[1]>s[1]&&s[0]<(h[0]-u[0])*(s[1]-u[1])/(h[1]-u[1])+u[0]&&(n=!n)}}var s,u,h;return n}function Sl(r,e,i,n){const s=n[0]-i[0],u=n[1]-i[1],h=(r[0]-i[0])*u-s*(r[1]-i[1]),f=(e[0]-i[0])*u-s*(e[1]-i[1]);return h>0&&f<0||h<0&&f>0}function Il(r,e,i,n){return(s=[n[0]-i[0],n[1]-i[1]])[0]*(u=[e[0]-r[0],e[1]-r[1]])[1]-s[1]*u[0]!=0&&!(!Sl(r,e,i,n)||!Sl(i,n,r,e));var s,u}function jn(r){const e=new Be(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),i=new Be(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);for(const n of r[0])e.x>n.x&&(e.x=n.x),e.y>n.y&&(e.y=n.y),i.x<n.x&&(i.x=n.x),i.y<n.y&&(i.y=n.y);return{min:e,max:i}}const xa=8192;function em(r,e){const i=(180+r[0])/360,n=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r[1]*Math.PI/360)))/360,s=Math.pow(2,e.z);return[Math.round(i*s*xa),Math.round(n*s*xa)]}function hh(r,e){for(let i=0;i<e.length;i++)if(Ds(r,e[i]))return!0;return!1}function tm(r,e,i){for(const n of i)for(let s=0,u=n.length,h=u-1;s<u;h=s++)if(Il(r,e,n[h],n[s]))return!0;return!1}function of(r,e){for(let i=0;i<r.length;++i)if(!Ds(r[i],e))return!1;for(let i=0;i<r.length-1;++i)if(tm(r[i],r[i+1],e))return!1;return!0}function nf(r,e){for(let i=0;i<e.length;i++)if(of(r,e[i]))return!0;return!1}function dh(r,e,i){const n=[];for(let s=0;s<r.length;s++){const u=[];for(let h=0;h<r[s].length;h++){const f=em(r[s][h],i);jo(e,f),u.push(f)}n.push(u)}return n}function va(r,e,i){const n=[];for(let s=0;s<r.length;s++){const u=dh(r[s],e,i);n.push(u)}return n}function af(r,e,i,n){if(r[0]<i[0]||r[0]>i[2]){const s=.5*n;let u=r[0]-i[0]>s?-n:i[0]-r[0]>s?n:0;u===0&&(u=r[0]-i[2]>s?-n:i[2]-r[0]>s?n:0),r[0]+=u}jo(e,r)}function sf(r,e,i,n){const s=Math.pow(2,n.z)*xa,u=[n.x*xa,n.y*xa],h=[];if(!r)return h;for(const f of r)for(const _ of f){const g=[_.x+u[0],_.y+u[1]];af(g,e,i,s),h.push(g)}return h}function zc(r,e,i,n){const s=Math.pow(2,n.z)*xa,u=[n.x*xa,n.y*xa],h=[];if(!r)return h;for(const _ of r){const g=[];for(const v of _){const b=[v.x+u[0],v.y+u[1]];jo(e,b),g.push(b)}h.push(g)}if(e[2]-e[0]<=s/2){(f=e)[0]=f[1]=1/0,f[2]=f[3]=-1/0;for(const _ of h)for(const g of _)af(g,e,i,s)}var f;return h}class ba{constructor(e,i){this.type=xi,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(Ps(e[1])){const n=e[1];if(n.type==="FeatureCollection")for(let s=0;s<n.features.length;++s){const u=n.features[s].geometry.type;if(u==="Polygon"||u==="MultiPolygon")return new ba(n,n.features[s].geometry)}else if(n.type==="Feature"){const s=n.geometry.type;if(s==="Polygon"||s==="MultiPolygon")return new ba(n,n.geometry)}else if(n.type==="Polygon"||n.type==="MultiPolygon")return new ba(n,n)}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,n){const s=[1/0,1/0,-1/0,-1/0],u=[1/0,1/0,-1/0,-1/0],h=i.canonicalID();if(!h)return!1;if(n.type==="Polygon"){const f=dh(n.coordinates,u,h),_=sf(i.geometry(),s,u,h);if(!El(s,u))return!1;for(const g of _)if(!Ds(g,f))return!1}if(n.type==="MultiPolygon"){const f=va(n.coordinates,u,h),_=sf(i.geometry(),s,u,h);if(!El(s,u))return!1;for(const g of _)if(!hh(g,f))return!1}return!0})(e,this.geometries);if(e.geometryType()==="LineString")return(function(i,n){const s=[1/0,1/0,-1/0,-1/0],u=[1/0,1/0,-1/0,-1/0],h=i.canonicalID();if(!h)return!1;if(n.type==="Polygon"){const f=dh(n.coordinates,u,h),_=zc(i.geometry(),s,u,h);if(!El(s,u))return!1;for(const g of _)if(!of(g,f))return!1}if(n.type==="MultiPolygon"){const f=va(n.coordinates,u,h),_=zc(i.geometry(),s,u,h);if(!El(s,u))return!1;for(const g of _)if(!nf(g,f))return!1}return!0})(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}const Al={kilometers:1,miles:1e3/1609.344,nauticalmiles:1e3/1852,meters:1e3,metres:1e3,yards:1e3/.9144,feet:1e3/.3048,inches:1e3/.0254},Go=1/298.257223563,lf=Go*(2-Go),Rs=Math.PI/180;class Ls{static fromTile(e,i,n){const s=Math.PI*(1-2*(e+.5)/Math.pow(2,i)),u=Math.atan(.5*(Math.exp(s)-Math.exp(-s)))/Rs;return new Ls(u,n)}static get units(){return Al}constructor(e,i){if(e===void 0)throw new Error("No latitude given.");if(i&&!Al[i])throw new Error(`Unknown unit ${i}. Use one of: ${Object.keys(Al).join(", ")}`);const n=6378.137*Rs*(i?Al[i]:1),s=Math.cos(e*Rs),u=1/(1-lf*(1-s*s)),h=Math.sqrt(u);this.kx=n*h*s,this.ky=n*h*u*(1-lf)}distance(e,i){const n=zo(e[0]-i[0])*this.kx,s=(e[1]-i[1])*this.ky;return Math.sqrt(n*n+s*s)}bearing(e,i){const n=zo(i[0]-e[0])*this.kx;return Math.atan2(n,(i[1]-e[1])*this.ky)/Rs}destination(e,i,n){const s=n*Rs;return this.offset(e,Math.sin(s)*i,Math.cos(s)*i)}offset(e,i,n){return[e[0]+i/this.kx,e[1]+n/this.ky]}lineDistance(e){let i=0;for(let n=0;n<e.length-1;n++)i+=this.distance(e[n],e[n+1]);return i}area(e){let i=0;for(let n=0;n<e.length;n++){const s=e[n];for(let u=0,h=s.length,f=h-1;u<h;f=u++)i+=zo(s[u][0]-s[f][0])*(s[u][1]+s[f][1])*(n?-1:1)}return Math.abs(i)/2*this.kx*this.ky}along(e,i){let n=0;if(i<=0)return e[0];for(let s=0;s<e.length-1;s++){const u=e[s],h=e[s+1],f=this.distance(u,h);if(n+=f,n>i)return Dc(u,h,(i-(n-f))/f)}return e[e.length-1]}pointToSegmentDistance(e,i,n){let[s,u]=i,h=zo(n[0]-s)*this.kx,f=(n[1]-u)*this.ky;if(h!==0||f!==0){const _=(zo(e[0]-s)*this.kx*h+(e[1]-u)*this.ky*f)/(h*h+f*f);_>1?(s=n[0],u=n[1]):_>0&&(s+=h/this.kx*_,u+=f/this.ky*_)}return h=zo(e[0]-s)*this.kx,f=(e[1]-u)*this.ky,Math.sqrt(h*h+f*f)}pointOnLine(e,i){let n=1/0,s=e[0][0],u=e[0][1],h=0,f=0;for(let _=0;_<e.length-1;_++){let g=e[_][0],v=e[_][1],b=zo(e[_+1][0]-g)*this.kx,w=(e[_+1][1]-v)*this.ky,S=0;b===0&&w===0||(S=(zo(i[0]-g)*this.kx*b+(i[1]-v)*this.ky*w)/(b*b+w*w),S>1?(g=e[_+1][0],v=e[_+1][1]):S>0&&(g+=b/this.kx*S,v+=w/this.ky*S)),b=zo(i[0]-g)*this.kx,w=(i[1]-v)*this.ky;const I=b*b+w*w;I<n&&(n=I,s=g,u=v,h=_,f=S)}return{point:[s,u],index:h,t:Math.max(0,Math.min(1,f))}}lineSlice(e,i,n){let s=this.pointOnLine(n,e),u=this.pointOnLine(n,i);if(s.index>u.index||s.index===u.index&&s.t>u.t){const g=s;s=u,u=g}const h=[s.point],f=s.index+1,_=u.index;!fh(n[f],h[0])&&f<=_&&h.push(n[f]);for(let g=f+1;g<=_;g++)h.push(n[g]);return fh(n[_],u.point)||h.push(u.point),h}lineSliceAlong(e,i,n){let s=0;const u=[];for(let h=0;h<n.length-1;h++){const f=n[h],_=n[h+1],g=this.distance(f,_);if(s+=g,s>e&&u.length===0&&u.push(Dc(f,_,(e-(s-g))/g)),s>=i)return u.push(Dc(f,_,(i-(s-g))/g)),u;s>e&&u.push(_)}return u}bufferPoint(e,i){const n=i/this.ky,s=i/this.kx;return[e[0]-s,e[1]-n,e[0]+s,e[1]+n]}bufferBBox(e,i){const n=i/this.ky,s=i/this.kx;return[e[0]-s,e[1]-n,e[2]+s,e[3]+n]}insideBBox(e,i){return zo(e[0]-i[0])>=0&&zo(e[0]-i[2])<=0&&e[1]>=i[1]&&e[1]<=i[3]}}function fh(r,e){return r[0]===e[0]&&r[1]===e[1]}function Dc(r,e,i){const n=zo(e[0]-r[0]);return[r[0]+n*i,r[1]+(e[1]-r[1])*i]}function zo(r){for(;r<-180;)r+=360;for(;r>180;)r-=360;return r}class Rc{constructor(e=[],i=((n,s)=>n<s?-1:n>s?1:0)){if(this.data=e,this.length=this.data.length,this.compare=i,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}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:n}=this,s=i[e];for(;e>0;){const u=e-1>>1,h=i[u];if(n(s,h)>=0)break;i[e]=h,e=u}i[e]=s}_down(e){const{data:i,compare:n}=this,s=this.length>>1,u=i[e];for(;e<s;){let h=1+(e<<1);const f=h+1;if(f<this.length&&n(i[f],i[h])<0&&(h=f),n(i[h],u)>=0)break;i[e]=i[h],e=h}i[e]=u}}var $e=8192;function ph(r,e){return e.dist-r.dist}const Lc=100,Fc=50;function mh(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 Ml(r){return r[1]-r[0]+1}function Tn(r,e){const i=r[1]>=r[0]&&r[1]<e;return i||console.warn("Distance Expression: Index is out of range"),i}function _h(r,e){if(r[0]>r[1])return[null,null];const i=Ml(r);if(e){if(i===2)return[r,null];const n=Math.floor(i/2);return[[r[0],r[0]+n],[r[0]+n,r[1]]]}{if(i===1)return[r,null];const n=Math.floor(i/2)-1;return[[r[0],r[0]+n],[r[0]+n+1,r[1]]]}}function ns(r,e){const i=[1/0,1/0,-1/0,-1/0];if(!Tn(e,r.length))return i;for(let n=e[0];n<=e[1];++n)jo(i,r[n]);return i}function as(r){const e=[1/0,1/0,-1/0,-1/0];for(let i=0;i<r.length;++i)for(let n=0;n<r[i].length;++n)jo(e,r[i][n]);return e}function wa(r,e,i){if(mh(r)||mh(e))return NaN;let n=0,s=0;return r[2]<e[0]&&(n=e[0]-r[2]),r[0]>e[2]&&(n=r[0]-e[2]),r[1]>e[3]&&(s=r[1]-e[3]),r[3]<e[1]&&(s=e[1]-r[3]),i.distance([0,0],[n,s])}function Bc(r){return 360*r-180}function cf(r){return 360/Math.PI*Math.atan(Math.exp((180-360*r)*Math.PI/180))-90}function kc(r,e){const i=Math.pow(2,e.z),n=(r.y/$e+e.y)/i;return[Bc((r.x/$e+e.x)/i),cf(n)]}function im(r,e){const i=[];for(let n=0;n<r.length;++n)i.push(kc(r[n],e));return i}function uf(r,e,i){const n=i.pointOnLine(e,r).point;return i.distance(r,n)}function gh(r,e,i,n,s){const u=i.slice(n[0],n[1]+1);let h=1/0;for(let f=e[0];f<=e[1];++f)if((h=Math.min(h,uf(r[f],u,s)))===0)return 0;return h}function Ta(r,e,i,n,s){const u=Math.min(s.pointToSegmentDistance(r,i,n),s.pointToSegmentDistance(e,i,n)),h=Math.min(s.pointToSegmentDistance(i,r,e),s.pointToSegmentDistance(n,r,e));return Math.min(u,h)}function Qt(r,e,i,n,s){if(!Tn(e,r.length)||!Tn(n,i.length))return NaN;let u=1/0;for(let h=e[0];h<e[1];++h)for(let f=n[0];f<n[1];++f){if(Il(r[h],r[h+1],i[f],i[f+1]))return 0;u=Math.min(u,Ta(r[h],r[h+1],i[f],i[f+1],s))}return u}function rm(r,e,i,n,s){if(!Tn(e,r.length)||!Tn(n,i.length))return NaN;let u=1/0;for(let h=e[0];h<=e[1];++h)for(let f=n[0];f<=n[1];++f)if((u=Math.min(u,s.distance(r[h],i[f])))===0)return u;return u}function om(r,e,i){if(Ds(r,e,!0))return 0;let n=1/0;for(const s of e){const u=s.length;if(u<2)return console.warn("Distance Expression: Invalid polygon!"),NaN;if(s[0]!==s[u-1]&&(n=Math.min(n,i.pointToSegmentDistance(r,s[u-1],s[0])))===0||(n=Math.min(n,uf(r,s,i)))===0)return n}return n}function nm(r,e,i,n){if(!Tn(e,r.length))return NaN;for(let u=e[0];u<=e[1];++u)if(Ds(r[u],i,!0))return 0;let s=1/0;for(let u=e[0];u<e[1];++u)for(const h of i)for(let f=0,_=h.length,g=_-1;f<_;g=f++){if(Il(r[u],r[u+1],h[g],h[f]))return 0;s=Math.min(s,Ta(r[u],r[u+1],h[g],h[f],n))}return s}function yh(r,e){for(const i of r)for(let n=0;n<=i.length-1;++n)if(Ds(i[n],e,!0))return!0;return!1}function am(r,e,i,n=1/0){const s=as(r),u=as(e);if(n!==1/0&&wa(s,u,i)>=n)return n;if(El(s,u)){if(yh(r,e))return 0}else if(yh(e,r))return 0;let h=n;for(const f of r)for(let _=0,g=f.length,v=g-1;_<g;v=_++)for(const b of e)for(let w=0,S=b.length,I=S-1;w<S;I=w++){if(Il(f[v],f[_],b[I],b[w]))return 0;h=Math.min(h,Ta(f[v],f[_],b[I],b[w],i))}return h}function Ui(r,e,i,n,s,u,h){if(u===null||h===null)return;const f=wa(ns(n,u),ns(s,h),i);f<e&&r.push({dist:f,range1:u,range2:h})}function sm(r,e,i,n,s=1/0){let u=Math.min(n.distance(r[0],i[0][0]),s);if(u===0)return u;const h=new Rc([{dist:0,range1:[0,r.length-1],range2:[0,0]}],ph),f=e?Fc:Lc,_=as(i);for(;h.length;){const g=h.pop();if(g.dist>=u)continue;const v=g.range1;if(Ml(v)<=f){if(!Tn(v,r.length))return NaN;if(e){const b=nm(r,v,i,n);if((u=Math.min(u,b))===0)return u}else for(let b=v[0];b<=v[1];++b){const w=om(r[b],i,n);if((u=Math.min(u,w))===0)return u}}else{const b=_h(v,e);if(b[0]!==null){const w=wa(ns(r,b[0]),_,n);w<u&&h.push({dist:w,range1:b[0],range2:[0,0]})}if(b[1]!==null){const w=wa(ns(r,b[1]),_,n);w<u&&h.push({dist:w,range1:b[1],range2:[0,0]})}}}return u}function hf(r,e,i,n,s,u=1/0){let h=Math.min(u,s.distance(r[0],i[0]));if(h===0)return h;const f=new Rc([{dist:0,range1:[0,r.length-1],range2:[0,i.length-1]}],ph),_=e?Fc:Lc,g=n?Fc:Lc;for(;f.length;){const v=f.pop();if(v.dist>=h)continue;const b=v.range1,w=v.range2;if(Ml(b)<=_&&Ml(w)<=g){if(!Tn(b,r.length)||!Tn(w,i.length))return NaN;if(e&&n?h=Math.min(h,Qt(r,b,i,w,s)):e||n?e&&!n?h=Math.min(h,gh(i,w,r,b,s)):!e&&n&&(h=Math.min(h,gh(r,b,i,w,s))):h=Math.min(h,rm(r,b,i,w,s)),h===0)return h}else{const S=_h(b,e),I=_h(w,n);Ui(f,h,s,r,i,S[0],I[0]),Ui(f,h,s,r,i,S[0],I[1]),Ui(f,h,s,r,i,S[1],I[0]),Ui(f,h,s,r,i,S[1],I[1])}}return h}function xh(r,e,i,n,s=1/0){let u=s;const h=ns(r,[0,r.length-1]);for(const f of i)if(!(u!==1/0&&wa(h,ns(f,[0,f.length-1]),n)>=u)&&(u=Math.min(u,hf(r,e,f,!0,n,u)),u===0))return u;return u}function Oc(r,e,i,n,s=1/0){let u=s;const h=ns(r,[0,r.length-1]);for(const f of i){if(u!==1/0&&wa(h,as(f),n)>=u)continue;const _=sm(r,e,f,n,u);if(isNaN(_))return _;if((u=Math.min(u,_))===0)return u}return u}function vh(r){return r==="Point"||r==="MultiPoint"||r==="LineString"||r==="MultiLineString"||r==="Polygon"||r==="MultiPolygon"}class ss{constructor(e,i){this.type=ft,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(Ps(e[1])){const n=e[1];if(n.type==="FeatureCollection"){for(let s=0;s<n.features.length;++s)if(vh(n.features[s].geometry.type))return new ss(n,n.features[s].geometry)}else if(n.type==="Feature"){if(vh(n.geometry.type))return new ss(n,n.geometry)}else if(vh(n.type))return new ss(n,n)}return i.error("'distance' expression needs to be an array with format ['Distance', GeoJSONObj].")}evaluate(e){const i=e.geometry(),n=e.canonicalID();if(i!=null&&n!=null){if(e.geometryType()==="Point")return(function(s,u,h){const f=[];for(const g of s)for(const v of g)f.push(kc(v,u));const _=new Ls(f[0][1],"meters");return h.type==="Point"||h.type==="MultiPoint"||h.type==="LineString"?hf(f,!1,h.type==="Point"?[h.coordinates]:h.coordinates,h.type==="LineString",_):h.type==="MultiLineString"?xh(f,!1,h.coordinates,_):h.type==="Polygon"||h.type==="MultiPolygon"?Oc(f,!1,h.type==="Polygon"?[h.coordinates]:h.coordinates,_):null})(i,n,this.geometries);if(e.geometryType()==="LineString")return(function(s,u,h){const f=[];for(const g of s){const v=[];for(const b of g)v.push(kc(b,u));f.push(v)}const _=new Ls(f[0][0][1],"meters");if(h.type==="Point"||h.type==="MultiPoint"||h.type==="LineString")return xh(h.type==="Point"?[h.coordinates]:h.coordinates,h.type==="LineString",f,_);if(h.type==="MultiLineString"){let g=1/0;for(let v=0;v<h.coordinates.length;v++){const b=xh(h.coordinates[v],!0,f,_,g);if(isNaN(b))return b;if((g=Math.min(g,b))===0)return g}return g}if(h.type==="Polygon"||h.type==="MultiPolygon"){let g=1/0;for(let v=0;v<f.length;v++){const b=Oc(f[v],!0,h.type==="Polygon"?[h.coordinates]:h.coordinates,_,g);if(isNaN(b))return b;if((g=Math.min(g,b))===0)return g}return g}return null})(i,n,this.geometries);if(e.geometryType()==="Polygon")return(function(s,u,h){const f=[];for(const g of(function(v,b){const w=v.length;if(w<=1)return[v];const S=[];let I,P;for(let L=0;L<w;L++){const R=ya(v[L]);R!==0&&(v[L].area=Math.abs(R),P===void 0&&(P=R<0),P===R<0?(I&&S.push(I),I=[v[L]]):I.push(v[L]))}return I&&S.push(I),S})(s)){const v=[];for(let b=0;b<g.length;++b)v.push(im(g[b],u));f.push(v)}const _=new Ls(f[0][0][0][1],"meters");if(h.type==="Point"||h.type==="MultiPoint"||h.type==="LineString")return Oc(h.type==="Point"?[h.coordinates]:h.coordinates,h.type==="LineString",f,_);if(h.type==="MultiLineString"){let g=1/0;for(let v=0;v<h.coordinates.length;v++){const b=Oc(h.coordinates[v],!0,f,_,g);if(isNaN(b))return b;if((g=Math.min(g,b))===0)return g}return g}return h.type==="Polygon"||h.type==="MultiPolygon"?(function(g,v,b){let w=1/0;for(const S of g)for(const I of v){const P=am(S,I,b,w);if(isNaN(P))return P;if((w=Math.min(w,P))===0)return w}return w})(h.type==="Polygon"?[h.coordinates]:h.coordinates,f,_):null})(i,n,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 Fs(r){if(r instanceof so&&(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 ba||r instanceof ss)return!1;if(r instanceof ks)return r.featureConstant;let e=!0;return r.eachChild((i=>{e&&!Fs(i)&&(e=!1)})),e}function Cl(r){if(r instanceof so&&r.name==="feature-state")return!1;let e=!0;return r.eachChild((i=>{e&&!Cl(i)&&(e=!1)})),e}function Bs(r,e){if(r instanceof so&&e.indexOf(r.name)>=0)return!1;let i=!0;return r.eachChild((n=>{i&&!Bs(n,e)&&(i=!1)})),i}function df(r,e,i){return[r,e,i].filter(Boolean).join("")}function bh(r,e){switch(r){case"string":return No(e);case"number":return+e;case"boolean":return!!e;case"color":return mi.parse(e);case"formatted":return no.fromString(No(e));case"resolvedImage":return ao.build(No(e))}return e}function ff(r,e,i,n){return n!==void 0&&(r=n*Math.round(r/n)),e!==void 0&&r<e&&(r=e),i!==void 0&&r>i&&(r=i),r}class ks{constructor(e,i,n,s=!1){this.type=e,this.key=i,this.scope=n,this.featureConstant=s}static parse(e,i){let n=i.expectedType;if(n==null&&(n=di),e.length<2||e.length>3)return i.error("Invalid number of arguments for 'config' expression.");const s=i.parse(e[1],1);if(!(s instanceof Nn))return i.error("Key name of 'config' expression must be a string literal.");let u,h=!0;const f=No(s.value);if(e.length>=3){const _=i.parse(e[2],2);if(!(_ instanceof Nn))return i.error("Scope of 'config' expression must be a string literal.");u=No(_.value)}if(i.options){const _=df(f,u,i._scope),g=i.options.get(_);g&&(h=Fs(g.value||g.default))}return new ks(n,f,u,h)}evaluate(e){const i=df(this.key,this.scope,e.scope),n=e.getConfig(i);if(!n)return null;const{type:s,value:u,values:h,minValue:f,maxValue:_,stepValue:g}=n,v=n.default.evaluate(e);let b=v;if(u){const w=e.scope;e.scope=(w||"").split("").slice(1).join(""),b=u.evaluate(e),e.scope=w}return s&&(b=bh(s,b)),b===void 0||f===void 0&&_===void 0&&g===void 0||(typeof b=="number"?b=ff(b,f,_,g):Array.isArray(b)&&(b=b.map((w=>typeof w=="number"?ff(w,f,_,g):w)))),u!==void 0&&b!==void 0&&h&&!h.includes(b)&&(b=v,s&&(b=bh(s,b))),(s&&s!==this.type||b!==void 0&&!Ec(Pr(b),this.type))&&(b=bh(this.type.kind,b)),b}eachChild(){}outputDefined(){return!1}serialize(){const e=["config",this.key];return this.scope&&e.concat(this.scope),e}}class Vc{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 n=e[1];return i.scope.has(n)?new Vc(n,i.scope.get(n)):i.error(`Unknown variable "${n}". Make sure "${n}" 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 Uc{constructor(e,i=[],n,s=new Cs,u=[],h,f,_){this.registry=e,this.path=i,this.key=i.map((g=>typeof g=="string"?`['${g}']`:`[${g}]`)).join(""),this.scope=s,this.errors=u,this.expectedType=n,this._scope=h,this.options=f,this.iconImageUseTheme=_}parse(e,i,n,s,u={}){return i||n?this.concat(i,null,n,s)._parse(e,u):this._parse(e,u)}parseObjectValue(e,i,n,s,u,h={}){return this.concat(i,n,s,u)._parse(e,h)}_parse(e,i){function n(s,u,h){return h==="assert"?new an(u,[s]):h==="coerce"?new wn(u,[s]):s}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 s=typeof e[0]=="string"?this.registry[e[0]]:void 0;if(s){let u=s.parse(e,this);if(!u)return null;if(this.expectedType){const h=this.expectedType,f=u.type;if(h.kind!=="string"&&h.kind!=="number"&&h.kind!=="boolean"&&h.kind!=="object"&&h.kind!=="array"||f.kind!=="value")if(h.kind!=="color"&&h.kind!=="formatted"&&h.kind!=="resolvedImage"||f.kind!=="value"&&f.kind!=="string"){if(this.checkSubtype(h,f))return null}else u=n(u,h,i.typeAnnotation||"coerce");else u=n(u,h,i.typeAnnotation||"assert")}if(!(u instanceof Nn)&&u.type.kind!=="resolvedImage"&&wh(u)){const h=new Mc(this._scope,this.options,this.iconImageUseTheme);try{u=new Nn(u.type,u.evaluate(h))}catch(f){return this.error(f.message),null}}return u}return wn.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,n,s){let u=typeof e=="number"?this.path.concat(e):this.path;u=typeof i=="string"?u.concat(i):u;const h=s?this.scope.concat(s):this.scope;return new Uc(this.registry,u,n||null,h,this.errors,this._scope,this.options,this.iconImageUseTheme)}error(e,...i){const n=`${this.key}${i.map((s=>`[${s}]`)).join("")}`;this.errors.push(new Uo(n,e))}checkSubtype(e,i){const n=ga(e,i);return n&&this.error(n),n}}function wh(r){if(r instanceof Vc)return wh(r.boundExpression);if(r instanceof so&&r.name==="error"||r instanceof Or||r instanceof ba||r instanceof ss||r instanceof ks)return!1;const e=r instanceof wn||r instanceof an;let i=!0;return r.eachChild((n=>{i=e?i&&wh(n):i&&n instanceof Nn})),!!i&&Fs(r)&&Bs(r,["zoom","heatmap-density","worldview","line-progress","raster-value","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center","measure-light","raster-particle-speed"])}function Nc(r,e){const i=r.length-1;let n,s,u=0,h=i,f=0;for(;u<=h;)if(f=Math.floor((u+h)/2),n=r[f],s=r[f+1],n<=e){if(f===i||e<s)return f;u=f+1}else{if(!(n>e))throw new Ir("Input is not a number.");h=f-1}return 0}class Pl{constructor(e,i,n){this.type=e,this.input=i,this.labels=[],this.outputs=[];for(const[s,u]of n)this.labels.push(s),this.outputs.push(u)}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 n=i.parse(e[1],1,ft);if(!n)return null;const s=[];let u=null;i.expectedType&&i.expectedType.kind!=="value"&&(u=i.expectedType);for(let h=1;h<e.length;h+=2){const f=h===1?-1/0:e[h],_=e[h+1],g=h,v=h+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(s.length&&s[s.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,u);if(!b)return null;u=u||b.type,s.push([f,b])}return new Pl(u,n,s)}evaluate(e){const i=this.labels,n=this.outputs;if(i.length===1)return n[0].evaluate(e);const s=this.input.evaluate(e);if(s<=i[0])return n[0].evaluate(e);const u=i.length;return s>=i[u-1]?n[u-1].evaluate(e):n[Nc(i,s)].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 pf=.95047,mf=1.08883,_f=4/29,Os=6/29,gf=3*Os*Os,lm=Os*Os*Os,cm=Math.PI/180,um=180/Math.PI;function Th(r){return r>lm?Math.pow(r,1/3):r/gf+_f}function Eh(r){return r>Os?r*r*r:gf*(r-_f)}function Sh(r){return 255*(r<=.0031308?12.92*r:1.055*Math.pow(r,1/2.4)-.055)}function Ih(r){return(r/=255)<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function yf(r){const e=Ih(r.r),i=Ih(r.g),n=Ih(r.b),s=Th((.4124564*e+.3575761*i+.1804375*n)/pf),u=Th((.2126729*e+.7151522*i+.072175*n)/1);return{l:116*u-16,a:500*(s-u),b:200*(u-Th((.0193339*e+.119192*i+.9503041*n)/mf)),alpha:r.a}}function jc(r){let e=(r.l+16)/116,i=isNaN(r.a)?e:e+r.a/500,n=isNaN(r.b)?e:e-r.b/200;return e=1*Eh(e),i=pf*Eh(i),n=mf*Eh(n),new mi(Sh(3.2404542*i-1.5371385*e-.4985314*n),Sh(-.969266*i+1.8760108*e+.041556*n),Sh(.0556434*i-.2040259*e+1.0572252*n),r.alpha)}function Gc(r,e,i){const n=e-r;return r+i*(n>180||n<-180?n-360*Math.round(n/360):n)}const Vs={forward:yf,reverse:jc,interpolate:function(r,e,i){return{l:bt(r.l,e.l,i),a:bt(r.a,e.a,i),b:bt(r.b,e.b,i),alpha:bt(r.alpha,e.alpha,i)}}},zl={forward:function(r){const{l:e,a:i,b:n}=yf(r),s=Math.atan2(n,i)*um;return{h:s<0?s+360:s,c:Math.sqrt(i*i+n*n),l:e,alpha:r.a}},reverse:function(r){const e=r.h*cm,i=r.c;return jc({l:r.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:r.alpha})},interpolate:function(r,e,i){return{h:Gc(r.h,e.h,i),c:bt(r.c,e.c,i),l:bt(r.l,e.l,i),alpha:bt(r.alpha,e.alpha,i)}}};var xf=Object.freeze({__proto__:null,hcl:zl,lab:Vs});class Do{constructor(e,i,n,s,u){this.type=e,this.operator=i,this.interpolation=n,this.input=s,this.labels=[],this.outputs=[];for(const[h,f]of u)this.labels.push(h),this.outputs.push(f)}static interpolationFactor(e,i,n,s){let u=0;if(e.name==="exponential")u=Hc(i,e.base,n,s);else if(e.name==="linear")u=Hc(i,1,n,s);else if(e.name==="cubic-bezier"){const h=e.controlPoints;u=new fc(h[0],h[1],h[2],h[3]).solve(Hc(i,1,n,s))}return u}static parse(e,i){let[n,s,u,...h]=e;if(!Array.isArray(s)||s.length===0)return i.error("Expected an interpolation type expression.",1);if(s[0]==="linear")s={name:"linear"};else if(s[0]==="exponential"){const g=s[1];if(typeof g!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);s={name:"exponential",base:g}}else{if(s[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(s[0])}`,1,0);{const g=s.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);s={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(u=i.parse(u,2,ft),!u)return null;const f=[];let _=null;n==="interpolate-hcl"||n==="interpolate-lab"?_=mo:i.expectedType&&i.expectedType.kind!=="value"&&(_=i.expectedType);for(let g=0;g<h.length;g+=2){const v=h[g],b=h[g+1],w=g+3,S=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.',w);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.',w);const I=i.parse(b,S,_);if(!I)return null;_=_||I.type,f.push([v,I])}return _.kind==="number"||_.kind==="color"||_.kind==="array"&&_.itemType.kind==="number"&&typeof _.N=="number"?new Do(_,n,s,u,f):i.error(`Type ${_r(_)} is not interpolatable.`)}evaluate(e){const i=this.labels,n=this.outputs;if(i.length===1)return n[0].evaluate(e);const s=this.input.evaluate(e);if(s<=i[0])return n[0].evaluate(e);const u=i.length;if(s>=i[u-1])return n[u-1].evaluate(e);const h=Nc(i,s),f=Do.interpolationFactor(this.interpolation,s,i[h],i[h+1]),_=n[h].evaluate(e),g=n[h+1].evaluate(e);return this.operator==="interpolate"?vl[this.type.kind.toLowerCase()](_,g,f):this.operator==="interpolate-hcl"?zl.reverse(zl.interpolate(zl.forward(_),zl.forward(g),f)):Vs.reverse(Vs.interpolate(Vs.forward(_),Vs.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 n=0;n<this.labels.length;n++)i.push(this.labels[n],this.outputs[n].serialize());return i}}function Hc(r,e,i,n){const s=n-i,u=r-i;return s===0?0:e===1?u/s:(Math.pow(e,u)-1)/(Math.pow(e,s)-1)}class Dl{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 n=null;const s=i.expectedType;s&&s.kind!=="value"&&(n=s);const u=[];for(const f of e.slice(1)){const _=i.parse(f,1+u.length,n,void 0,{typeAnnotation:"omit"});if(!_)return null;n=n||_.type,u.push(_)}const h=s&&u.some((f=>ga(s,f.type)));return new Dl(h?di:n,u)}evaluate(e){let i,n=null,s=0;for(const u of this.args){if(s++,n=u.evaluate(e),n&&n instanceof ao&&!n.available&&(i||(i=n),n=null,s===this.args.length))return i;if(n!==null)break}return n}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 Gn{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 n=[];for(let u=1;u<e.length-1;u+=2){const h=e[u];if(typeof h!="string")return i.error(`Expected string, but found ${typeof h} instead.`,u);if(/[^a-zA-Z0-9_]/.test(h))return i.error("Variable names must contain only alphanumeric characters or '_'.",u);const f=i.parse(e[u+1],u+1);if(!f)return null;n.push([h,f])}const s=i.parse(e[e.length-1],e.length-1,i.expectedType,n);return s?new Gn(n,s):null}outputDefined(){return this.result.outputDefined()}serialize(){const e=["let"];for(const[i,n]of this.bindings)e.push(i,n.serialize());return e.push(this.result.serialize()),e}}class $c{constructor(e,i,n){this.type=e,this.index=i,this.input=n}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const n=i.parse(e[1],1,ft),s=i.parse(e[2],2,qr(i.expectedType||di));return n&&s?new $c(s.type.itemType,n,s):null}evaluate(e){const i=this.index.evaluate(e),n=this.input.evaluate(e);if(i<0)throw new Ir("Array index out of bounds: negative index");if(i>=n.length)throw new Ir("Array index out of bounds: index exceeds array size");if(i!==Math.floor(i))throw new Ir("Array index must be an integer. Use at-interpolated for fractional indices");return n[i]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}class Zc{constructor(e,i,n){this.type=e,this.index=i,this.input=n}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const n=i.parse(e[1],1,ft),s=i.parse(e[2],2,qr(i.expectedType||di));return n&&s?new Zc(s.type.itemType,n,s):null}evaluate(e){const i=this.index.evaluate(e),n=this.input.evaluate(e);if(i<0)throw new Ir(`Array index out of bounds: ${i} < 0.`);if(i>n.length-1)throw new Ir(`Array index out of bounds: ${i} > ${n.length-1}.`);if(i===Math.floor(i))return n[i];const s=Math.floor(i),u=Math.ceil(i),h=n[s],f=n[u];if(typeof h!="number"||typeof f!="number")throw new Ir(`Cannot interpolate between non-number values at index ${i}.`);const _=i-s;return h*(1-_)+f*_}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at-interpolated",this.index.serialize(),this.input.serialize()]}}class Ah{constructor(e,i){this.type=xi,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 n=i.parse(e[1],1,di),s=i.parse(e[2],2,di);return n&&s?ah(n.type,[xi,Yt,ft,nn,di])?new Ah(n,s):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${_r(n.type)} instead`):null}evaluate(e){const i=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(n==null)return!1;if(!Tl(i,["boolean","string","number","null"]))throw new Ir(`Expected first argument to be of type boolean, string, number or null, but found ${_r(Pr(i))} instead.`);if(!Tl(n,["string","array"]))throw new Ir(`Expected second argument to be of type array or string, but found ${_r(Pr(n))} instead.`);return n.indexOf(i)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}class Us{constructor(e,i,n){this.type=ft,this.needle=e,this.haystack=i,this.fromIndex=n}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 n=i.parse(e[1],1,di),s=i.parse(e[2],2,di);if(!n||!s)return null;if(!ah(n.type,[xi,Yt,ft,nn,di]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${_r(n.type)} instead`);if(e.length===4){const u=i.parse(e[3],3,ft);return u?new Us(n,s,u):null}return new Us(n,s)}evaluate(e){const i=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!Tl(i,["boolean","string","number","null"]))throw new Ir(`Expected first argument to be of type boolean, string, number or null, but found ${_r(Pr(i))} instead.`);if(!Tl(n,["string","array"]))throw new Ir(`Expected second argument to be of type array or string, but found ${_r(Pr(n))} instead.`);if(this.fromIndex){const s=this.fromIndex.evaluate(e);return n.indexOf(i,s)}return n.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 Rl{constructor(e,i,n,s,u,h){this.inputType=e,this.type=i,this.input=n,this.cases=s,this.outputs=u,this.otherwise=h}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 n,s;i.expectedType&&i.expectedType.kind!=="value"&&(s=i.expectedType);const u={},h=[];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 w=i.concat(g);if(v.length===0)return w.error("Expected at least one branch label.");for(const I of v){if(typeof I!="number"&&typeof I!="string")return w.error("Branch labels must be numbers or strings.");if(typeof I=="number"&&Math.abs(I)>Number.MAX_SAFE_INTEGER)return w.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof I=="number"&&Math.floor(I)!==I)return w.error("Numeric branch labels must be integer values.");if(n){if(w.checkSubtype(n,Pr(I)))return null}else n=Pr(I);if(u[String(I)]!==void 0)return w.error("Branch labels must be unique.");u[String(I)]=h.length}const S=i.parse(b,g,s);if(!S)return null;s=s||S.type,h.push(S)}const f=i.parse(e[1],1,di);if(!f)return null;const _=i.parse(e[e.length-1],e.length-1,s);return _?f.type.kind!=="value"&&i.concat(1).checkSubtype(n,f.type)?null:new Rl(n,s,f,u,h,_):null}evaluate(e){const i=this.input.evaluate(e);return(Ec(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(),n=[],s={};for(const h of i){const f=s[this.cases[h]];f===void 0?(s[this.cases[h]]=n.length,n.push([this.cases[h],[h]])):n[f][1].push(h)}const u=h=>this.inputType.kind==="number"?Number(h):h;for(const[h,f]of n)e.push(f.length===1?u(f[0]):f.map(u)),e.push(this.outputs[h].serialize());return e.push(this.otherwise.serialize()),e}}class Ll{constructor(e,i,n){this.type=e,this.branches=i,this.otherwise=n}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 n;i.expectedType&&i.expectedType.kind!=="value"&&(n=i.expectedType);const s=[];for(let h=1;h<e.length-1;h+=2){const f=i.parse(e[h],h,xi);if(!f)return null;const _=i.parse(e[h+1],h+1,n);if(!_)return null;s.push([f,_]),n=n||_.type}const u=i.parse(e[e.length-1],e.length-1,n);return u?new Ll(n,s,u):null}evaluate(e){for(const[i,n]of this.branches)if(i.evaluate(e))return n.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[i,n]of this.branches)e(i),e(n);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 qc{constructor(e,i,n,s){this.type=e,this.input=i,this.beginIndex=n,this.endIndex=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 n=i.parse(e[1],1,di),s=i.parse(e[2],2,ft);if(!n||!s)return null;if(!ah(n.type,[qr(di),Yt,di]))return i.error(`Expected first argument to be of type array or string, but found ${_r(n.type)} instead`);if(e.length===4){const u=i.parse(e[3],3,ft);return u?new qc(n.type,n,s,u):null}return new qc(n.type,n,s)}evaluate(e){const i=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(!Tl(i,["string","array"]))throw new Ir(`Expected first argument to be of type array or string, but found ${_r(Pr(i))} instead.`);if(this.endIndex){const s=this.endIndex.evaluate(e);return i.slice(n,s)}return i.slice(n)}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()]}}class Mh{constructor(e,i){this.type=qr(Yt),this.str=e,this.delimiter=i}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const n=i.parse(e[1],1,Yt),s=i.parse(e[2],2,Yt);return n&&s?new Mh(n,s):void 0}evaluate(e){const i=this.str.evaluate(e),n=this.delimiter.evaluate(e);return i.split(n)}eachChild(e){e(this.str),e(this.delimiter)}outputDefined(){return!1}serialize(){return["split",this.str.serialize(),this.delimiter.serialize()]}}function Ch(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 Ph(r,e,i,n){return n.compare(e,i)===0}function Ns(r,e,i){const n=r!=="=="&&r!=="!=";return class q0{constructor(u,h,f){this.type=xi,this.lhs=u,this.rhs=h,this.collator=f,this.hasUntypedArgument=u.type.kind==="value"||h.type.kind==="value"}static parse(u,h){if(u.length!==3&&u.length!==4)return h.error("Expected two or three arguments.");const f=u[0];let _=h.parse(u[1],1,di);if(!_)return null;if(!Ch(f,_.type))return h.concat(1).error(`"${f}" comparisons are not supported for type '${_r(_.type)}'.`);let g=h.parse(u[2],2,di);if(!g)return null;if(!Ch(f,g.type))return h.concat(2).error(`"${f}" comparisons are not supported for type '${_r(g.type)}'.`);if(_.type.kind!==g.type.kind&&_.type.kind!=="value"&&g.type.kind!=="value")return h.error(`Cannot compare types '${_r(_.type)}' and '${_r(g.type)}'.`);n&&(_.type.kind==="value"&&g.type.kind!=="value"?_=new an(g.type,[_]):_.type.kind!=="value"&&g.type.kind==="value"&&(g=new an(_.type,[g])));let v=null;if(u.length===4){if(_.type.kind!=="string"&&g.type.kind!=="string"&&_.type.kind!=="value"&&g.type.kind!=="value")return h.error("Cannot use collator to compare non-string types.");if(v=h.parse(u[3],3,Tc),!v)return null}return new q0(_,g,v)}evaluate(u){const h=this.lhs.evaluate(u),f=this.rhs.evaluate(u);if(n&&this.hasUntypedArgument){const _=Pr(h),g=Pr(f);if(_.kind!==g.kind||_.kind!=="string"&&_.kind!=="number")throw new Ir(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${_.kind}, ${g.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const _=Pr(h),g=Pr(f);if(_.kind!=="string"||g.kind!=="string")return e(u,h,f)}return this.collator?i(u,h,f,this.collator.evaluate(u)):e(u,h,f)}eachChild(u){u(this.lhs),u(this.rhs),this.collator&&u(this.collator)}outputDefined(){return!0}serialize(){const u=[r];return this.eachChild((h=>{u.push(h.serialize())})),u}}}const hm=Ns("==",(function(r,e,i){return e===i}),Ph),dm=Ns("!=",(function(r,e,i){return e!==i}),(function(r,e,i,n){return!Ph(0,e,i,n)})),vf=Ns("<",(function(r,e,i){return e<i}),(function(r,e,i,n){return n.compare(e,i)<0})),bf=Ns(">",(function(r,e,i){return e>i}),(function(r,e,i,n){return n.compare(e,i)>0})),Xc=Ns("<=",(function(r,e,i){return e<=i}),(function(r,e,i,n){return n.compare(e,i)<=0})),fm=Ns(">=",(function(r,e,i){return e>=i}),(function(r,e,i,n){return n.compare(e,i)>=0}));class Wc{constructor(e,i,n,s,u,h){this.type=Yt,this.number=e,this.locale=i,this.currency=n,this.unit=s,this.minFractionDigits=u,this.maxFractionDigits=h}static parse(e,i){if(e.length!==3)return i.error("Expected two arguments.");const n=i.parse(e[1],1,ft);if(!n)return null;const s=e[2];if(typeof s!="object"||Array.isArray(s))return i.error("NumberFormat options argument must be an object.");let u=null;if(s.locale&&(u=i.parseObjectValue(s.locale,2,"locale",Yt),!u))return null;let h=null;if(s.currency&&(h=i.parseObjectValue(s.currency,2,"currency",Yt),!h))return null;let f=null;if(s.unit&&(f=i.parseObjectValue(s.unit,2,"unit",Yt),!f))return null;let _=null;if(s["min-fraction-digits"]&&(_=i.parseObjectValue(s["min-fraction-digits"],2,"min-fraction-digits",ft),!_))return null;let g=null;return s["max-fraction-digits"]&&(g=i.parseObjectValue(s["max-fraction-digits"],2,"max-fraction-digits",ft),!g)?null:new Wc(n,u,h,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 zh{constructor(e){this.type=ft,this.input=e}static parse(e,i){if(e.length!==2)return i.error(`Expected 1 argument, but found ${e.length-1} instead.`);const n=i.parse(e[1],1);return n?n.type.kind!=="array"&&n.type.kind!=="string"&&n.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${_r(n.type)} instead.`):new zh(n):null}evaluate(e){const i=this.input.evaluate(e);if(typeof i=="string"||Array.isArray(i))return i.length;throw new Ir(`Expected value to be of type string or array, but found ${_r(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 wf(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 js={"==":hm,"!=":dm,">":bf,"<":vf,">=":fm,"<=":Xc,array:an,at:$c,"at-interpolated":Zc,boolean:an,case:Ll,coalesce:Dl,collator:Or,format:bn,image:Bt,in:Ah,"index-of":Us,interpolate:Do,"interpolate-hcl":Do,"interpolate-lab":Do,length:zh,let:Gn,literal:Nn,match:Rl,number:an,"number-format":Wc,object:an,slice:qc,step:Pl,string:an,"to-boolean":wn,"to-color":wn,"to-number":wn,"to-string":wn,var:Vc,within:ba,distance:ss,config:ks,split:Mh};function Dh(r,[e,i,n,s]){e=e.evaluate(r),i=i.evaluate(r),n=n.evaluate(r);const u=s?s.evaluate(r):1,h=os(e,i,n,u);if(h)throw new Ir(h);return new mi(e/255,i/255,n/255,u)}function Rh(r,[e,i,n,s]){e=e.evaluate(r),i=i.evaluate(r),n=n.evaluate(r);const u=s?s.evaluate(r):1,h=(function(g,v,b,w){return typeof g=="number"&&g>=0&&g<=360?typeof v=="number"&&v>=0&&v<=100&&typeof b=="number"&&b>=0&&b<=100?w===void 0||typeof w=="number"&&w>=0&&w<=1?null:`Invalid hsla value [${[g,v,b,w].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid hsla value [${(typeof w=="number"?[g,v,b,w]:[g,v,b]).join(", ")}]: 's', and 'l' must be between 0 and 100.`:`Invalid hsla value [${(typeof w=="number"?[g,v,b,w]:[g,v,b]).join(", ")}]: 'h' must be between 0 and 360.`})(e,i,n,u);if(h)throw new Ir(h);const f=`hsla(${e}, ${i}%, ${n}%, ${u})`,_=mi.parse(f);if(!_)throw new Ir(`Failed to parse HSLA color: ${f}`);return _}function Tf(r,e){return r in e}function Lh(r,e){const i=e[r];return i===void 0?null:i}function Ea(r){return{type:r}}function ls(r){if(r instanceof ks)return new Set([r.key]);let e=new Set;return r.eachChild((i=>{e=new Set([...e,...ls(i)])})),e}function Yc(r){if(r instanceof so&&r.name==="is-active-floor")return!0;let e=!1;return r.eachChild((i=>{!e&&Yc(i)&&(e=!0)})),e}function Ef(r){return{result:"success",value:r}}function Sa(r){return{result:"error",value:r}}function Fh(r,e){return!!r&&!!r.parameters&&r.parameters.indexOf(e)>-1}function Fl(r){return r["property-type"]==="data-driven"}function Sf(r){return Fh(r.expression,"measure-light")}function If(r){return Fh(r.expression,"zoom")}function Kc(r){return!!r.expression&&r.expression.interpolated}function Qc(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Af(r){return r}function Mf(r,e){const i=e.type==="color",n=r.stops&&typeof r.stops[0][0]=="object",s=n||!(n||r.property!==void 0),u=r.type||(Kc(e)?"exponential":"interval");if(i&&((r=Object.assign({},r)).stops&&(r.stops=r.stops.map((g=>[g[0],mi.parse(g[1])]))),r.default=mi.parse(r.default?r.default:e.default)),r.colorSpace&&r.colorSpace!=="rgb"&&!xf[r.colorSpace])throw new Error(`Unknown color space: ${r.colorSpace}`);let h,f,_;if(u==="exponential")h=Cf;else if(u==="interval")h=mm;else if(u==="categorical"){h=pm,f=Object.create(null);for(const g of r.stops)f[g[0]]=g[1];_=typeof r.stops[0][0]}else{if(u!=="identity")throw new Error(`Unknown function type "${u}"`);h=Pf}if(n){const g={},v=[];for(let S=0;S<r.stops.length;S++){const I=r.stops[S],P=I[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([I[0].value,I[1]])}const b=[];for(const S of v)b.push([g[S].zoom,Mf(g[S],e)]);const w={name:"linear"};return{kind:"composite",interpolationType:w,interpolationFactor:Do.interpolationFactor.bind(void 0,w),zoomStops:b.map((S=>S[0])),evaluate:({zoom:S},I)=>Cf({stops:b,base:r.base},e,S).evaluate(S,I)}}if(s){const g=u==="exponential"?{name:"exponential",base:r.base!==void 0?r.base:1}:null;return{kind:"camera",interpolationType:g,interpolationFactor:Do.interpolationFactor.bind(void 0,g),zoomStops:r.stops.map((v=>v[0])),evaluate:({zoom:v})=>h(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?En(r.default,e.default):h(r,e,b,f,_)}}}function En(r,e,i){return r!==void 0?r:e!==void 0?e:i!==void 0?i:void 0}function pm(r,e,i,n,s){return En(typeof i===s?n[i]:void 0,r.default,e.default)}function mm(r,e,i){if(!zs(i))return En(r.default,e.default);const n=r.stops.length;if(n===1||i<=r.stops[0][0])return r.stops[0][1];if(i>=r.stops[n-1][0])return r.stops[n-1][1];const s=Nc(r.stops.map((u=>u[0])),i);return r.stops[s][1]}function Cf(r,e,i){const n=r.base!==void 0?r.base:1;if(!zs(i))return En(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 u=Nc(r.stops.map((v=>v[0])),i),h=(function(v,b,w,S){const I=S-w,P=v-w;return I===0?0:b===1?P/I:(Math.pow(b,P)-1)/(Math.pow(b,I)-1)})(i,n,r.stops[u][0],r.stops[u+1][0]),f=r.stops[u][1],_=r.stops[u+1][1];let g=vl[e.type]||Af;if(r.colorSpace&&r.colorSpace!=="rgb"){const v=xf[r.colorSpace];g=(b,w)=>v.reverse(v.interpolate(v.forward(b),v.forward(w),h))}return typeof f.evaluate=="function"?{evaluate(...v){const b=f.evaluate.apply(void 0,v),w=_.evaluate.apply(void 0,v);if(b!==void 0&&w!==void 0)return g(b,w,h)}}:g(f,_,h)}function Pf(r,e,i){return e.type==="color"?i=mi.parse(i):e.type==="formatted"?i=no.fromString(i.toString()):e.type==="resolvedImage"?i=ao.build(i.toString()):ht(i)===e.type||e.type==="enum"&&e.values[i]||(i=void 0),En(i,r.default,e.default)}so.register(js,{error:[{kind:"error"},[Yt],(r,[e])=>{throw new Ir(e.evaluate(r))}],typeof:[Yt,[di],(r,[e])=>_r(Pr(e.evaluate(r)))],"to-rgba":[qr(ft,4),[mo],(r,[e])=>e.evaluate(r).toNonPremultipliedRenderColor(null).toArray()],"to-hsla":[qr(ft,4),[mo],(r,[e])=>e.evaluate(r).toNonPremultipliedRenderColor(null).toHslaArray()],rgb:[mo,[ft,ft,ft],Dh],rgba:[mo,[ft,ft,ft,ft],Dh],hsl:[mo,[ft,ft,ft],Rh],hsla:[mo,[ft,ft,ft,ft],Rh],has:{type:xi,overloads:[[[Yt],(r,[e])=>Tf(e.evaluate(r),r.properties())],[[Yt,vn],(r,[e,i])=>Tf(e.evaluate(r),i.evaluate(r))]]},get:{type:di,overloads:[[[Yt],(r,[e])=>Lh(e.evaluate(r),r.properties())],[[Yt,vn],(r,[e,i])=>Lh(e.evaluate(r),i.evaluate(r))]]},"feature-state":[di,[Yt],(r,[e])=>Lh(e.evaluate(r),r.featureState||{})],properties:[vn,[],r=>r.properties()],"geometry-type":[Yt,[],r=>r.geometryType()],worldview:[Yt,[],r=>r.globals.worldview||""],"is-active-floor":[xi,Ea(Yt),(r,e)=>{if(!(r.globals.activeFloors&&r.globals.activeFloors.size>0))return!1;const i=r.globals.activeFloors;return e.some((n=>{const s=n.evaluate(r);return i.has(s)}))}],id:[di,[],r=>r.id()],zoom:[ft,[],r=>r.globals.zoom],pitch:[ft,[],r=>r.globals.pitch||0],"distance-from-center":[ft,[],r=>r.distanceFromCenter()],"measure-light":[ft,[Yt],(r,[e])=>r.measureLight(e.evaluate(r))],"heatmap-density":[ft,[],r=>r.globals.heatmapDensity||0],"line-progress":[ft,[],r=>r.globals.lineProgress||0],"raster-value":[ft,[],r=>r.globals.rasterValue||0],"raster-particle-speed":[ft,[],r=>r.globals.rasterParticleSpeed||0],"sky-radial-progress":[ft,[],r=>r.globals.skyRadialProgress||0],accumulated:[di,[],r=>r.globals.accumulated===void 0?null:r.globals.accumulated],"+":[ft,Ea(ft),(r,e)=>{let i=0;for(const n of e)i+=n.evaluate(r);return i}],"*":[ft,Ea(ft),(r,e)=>{let i=1;for(const n of e)i*=n.evaluate(r);return i}],"-":{type:ft,overloads:[[[ft,ft],(r,[e,i])=>e.evaluate(r)-i.evaluate(r)],[[ft],(r,[e])=>-e.evaluate(r)]]},"/":[ft,[ft,ft],(r,[e,i])=>e.evaluate(r)/i.evaluate(r)],"%":[ft,[ft,ft],(r,[e,i])=>e.evaluate(r)%i.evaluate(r)],ln2:[ft,[],()=>Math.LN2],pi:[ft,[],()=>Math.PI],e:[ft,[],()=>Math.E],"^":[ft,[ft,ft],(r,[e,i])=>Math.pow(e.evaluate(r),i.evaluate(r))],sqrt:[ft,[ft],(r,[e])=>Math.sqrt(e.evaluate(r))],log10:[ft,[ft],(r,[e])=>Math.log(e.evaluate(r))/Math.LN10],ln:[ft,[ft],(r,[e])=>Math.log(e.evaluate(r))],log2:[ft,[ft],(r,[e])=>Math.log2(e.evaluate(r))],sin:[ft,[ft],(r,[e])=>Math.sin(e.evaluate(r))],cos:[ft,[ft],(r,[e])=>Math.cos(e.evaluate(r))],tan:[ft,[ft],(r,[e])=>Math.tan(e.evaluate(r))],asin:[ft,[ft],(r,[e])=>Math.asin(e.evaluate(r))],acos:[ft,[ft],(r,[e])=>Math.acos(e.evaluate(r))],atan:[ft,[ft],(r,[e])=>Math.atan(e.evaluate(r))],min:[ft,Ea(ft),(r,e)=>Math.min(...e.map((i=>i.evaluate(r))))],max:[ft,Ea(ft),(r,e)=>Math.max(...e.map((i=>i.evaluate(r))))],abs:[ft,[ft],(r,[e])=>Math.abs(e.evaluate(r))],round:[ft,[ft],(r,[e])=>{const i=e.evaluate(r);return i<0?-Math.round(-i):Math.round(i)}],floor:[ft,[ft],(r,[e])=>Math.floor(e.evaluate(r))],ceil:[ft,[ft],(r,[e])=>Math.ceil(e.evaluate(r))],"filter-==":[xi,[Yt,di],(r,[e,i])=>r.properties()[e.value]===i.value],"filter-id-==":[xi,[di],(r,[e])=>r.id()===e.value],"filter-type-==":[xi,[Yt],(r,[e])=>r.geometryType()===e.value],"filter-<":[xi,[Yt,di],(r,[e,i])=>{const n=r.properties()[e.value],s=i.value;return typeof n==typeof s&&n<s}],"filter-id-<":[xi,[di],(r,[e])=>{const i=r.id(),n=e.value;return typeof i==typeof n&&i<n}],"filter->":[xi,[Yt,di],(r,[e,i])=>{const n=r.properties()[e.value],s=i.value;return typeof n==typeof s&&n>s}],"filter-id->":[xi,[di],(r,[e])=>{const i=r.id(),n=e.value;return typeof i==typeof n&&i>n}],"filter-<=":[xi,[Yt,di],(r,[e,i])=>{const n=r.properties()[e.value],s=i.value;return typeof n==typeof s&&n<=s}],"filter-id-<=":[xi,[di],(r,[e])=>{const i=r.id(),n=e.value;return typeof i==typeof n&&i<=n}],"filter->=":[xi,[Yt,di],(r,[e,i])=>{const n=r.properties()[e.value],s=i.value;return typeof n==typeof s&&n>=s}],"filter-id->=":[xi,[di],(r,[e])=>{const i=r.id(),n=e.value;return typeof i==typeof n&&i>=n}],"filter-has":[xi,[di],(r,[e])=>e.value in r.properties()],"filter-has-id":[xi,[],r=>r.id()!==null&&r.id()!==void 0],"filter-type-in":[xi,[qr(Yt)],(r,[e])=>e.value.indexOf(r.geometryType())>=0],"filter-id-in":[xi,[qr(di)],(r,[e])=>e.value.indexOf(r.id())>=0],"filter-in-small":[xi,[Yt,qr(di)],(r,[e,i])=>i.value.indexOf(r.properties()[e.value])>=0],"filter-in-large":[xi,[Yt,qr(di)],(r,[e,i])=>(function(n,s,u,h){for(;u<=h;){const f=u+h>>1;if(s[f]===n)return!0;s[f]>n?h=f-1:u=f+1}return!1})(r.properties()[e.value],i.value,0,i.value.length-1)],all:{type:xi,overloads:[[[xi,xi],(r,[e,i])=>e.evaluate(r)&&i.evaluate(r)],[Ea(xi),(r,e)=>{for(const i of e)if(!i.evaluate(r))return!1;return!0}]]},any:{type:xi,overloads:[[[xi,xi],(r,[e,i])=>e.evaluate(r)||i.evaluate(r)],[Ea(xi),(r,e)=>{for(const i of e)if(i.evaluate(r))return!0;return!1}]]},"!":[xi,[xi],(r,[e])=>!e.evaluate(r)],"is-supported-script":[xi,[Yt],(r,[e])=>{const i=r.globals&&r.globals.isSupportedScript;return!i||i(e.evaluate(r))}],upcase:[Yt,[Yt],(r,[e])=>e.evaluate(r).toUpperCase()],downcase:[Yt,[Yt],(r,[e])=>e.evaluate(r).toLowerCase()],concat:[Yt,Ea(di),(r,e)=>e.map((i=>No(i.evaluate(r)))).join("")],"resolved-locale":[Yt,[Tc],(r,[e])=>e.evaluate(r).resolvedLocale()],random:[ft,[ft,ft,di],(r,e)=>{const[i,n,s]=e.map((h=>h.evaluate(r)));if(i>n||i===n)return i;let u;if(typeof s=="string")u=(function(h){let f=0;if(h.length===0)return f;for(let _=0;_<h.length;_++)f=(f<<5)-f+h.charCodeAt(_),f|=0;return f})(s);else{if(typeof s!="number")throw new Ir(`Invalid seed input: ${s}`);u=s}return i+wf(u)()*(n-i)}]});class Jc{constructor(e,i,n,s,u){this.expression=e,this._warningHistory={},this._scope=n,this._options=s,this._iconImageUseTheme=u,this._evaluator=new Mc(n,s,u),this._defaultValue=i?(function(h){return h.type==="color"&&(Qc(h.default)||Array.isArray(h.default))?new mi(0,0,0,0):h.type==="color"?mi.parse(h.default)||null:h.default===void 0?null:h.default})(i):null,this._enumValues=i&&i.type==="enum"?i.values:null,this.configDependencies=ls(e),this.isIndoorDependent=Yc(e)}evaluateWithoutErrorHandling(e,i,n,s,u,h,f,_){return this._evaluator.globals=e,this._evaluator.feature=i,this._evaluator.featureState=n,this._evaluator.canonical=s||null,this._evaluator.availableImages=u||null,this._evaluator.formattedSection=h,this._evaluator.featureTileCoord=f||null,this._evaluator.featureDistanceData=_||null,this.expression.evaluate(this._evaluator)}evaluate(e,i,n,s,u,h,f,_,g){this._evaluator||(this._evaluator=new Mc(this._scope,this._options,this._iconImageUseTheme)),this._evaluator.globals=e,this._evaluator.feature=i||null,this._evaluator.featureState=n||null,this._evaluator.canonical=s||null,this._evaluator.availableImages=u||null,this._evaluator.formattedSection=h||null,this._evaluator.featureTileCoord=f||null,this._evaluator.featureDistanceData=_||null,this._evaluator.iconImageUseTheme=g||null;try{const v=this.expression.evaluate(this._evaluator);if(v==null||typeof v=="number"&&v!=v)return this._defaultValue;if(this._enumValues&&!(v in this._enumValues))throw new Ir(`Expected value to be one of ${Object.keys(this._enumValues).map((b=>JSON.stringify(b))).join(", ")}, but found ${JSON.stringify(v)} instead.`);return v}catch(v){const b=v;return this._warningHistory[b.message]||(this._warningHistory[b.message]=!0,typeof console<"u"&&console.warn(`Failed to evaluate expression "${JSON.stringify(this.expression.serialize())}". ${b.message}`)),this._defaultValue}}}function Bl(r){return Array.isArray(r)&&r.length>0&&typeof r[0]=="string"&&r[0]in js}function Ia(r,e,i,n,s){const u=new Uc(js,[],e?(function(f){const _={color:mo,string:Yt,number:ft,enum:Yt,boolean:xi,formatted:bl,resolvedImage:wl};return f.type==="array"?qr(_[f.value]||di,f.length):_[f.type]})(e):void 0,void 0,void 0,i,n,s),h=u.parse(r,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return h?Ef(new Jc(h,e,i,n,s)):Sa(u.errors)}class Gs{constructor(e,i,n,s){this.kind=e,this._styleExpression=i,this.isLightConstant=n,this.isLineProgressConstant=s,this.isStateDependent=e!=="constant"&&!Cl(i.expression),this.configDependencies=ls(i.expression),this.isIndoorDependent=Yc(i.expression)}evaluateWithoutErrorHandling(e,i,n,s,u,h){return this._styleExpression.evaluateWithoutErrorHandling(e,i,n,s,u,h)}evaluate(e,i,n,s,u,h,f){return this._styleExpression.evaluate(e,i,n,s,u,h,void 0,void 0,f)}}class cs{constructor(e,i,n,s,u,h){this.kind=e,this.zoomStops=n,this._styleExpression=i,this.isStateDependent=e!=="camera"&&!Cl(i.expression),this.isIndoorDependent=Yc(i.expression),this.isLightConstant=u,this.isLineProgressConstant=h,this.configDependencies=ls(i.expression),this.interpolationType=s}evaluateWithoutErrorHandling(e,i,n,s,u,h){return this._styleExpression.evaluateWithoutErrorHandling(e,i,n,s,u,h)}evaluate(e,i,n,s,u,h){return this._styleExpression.evaluate(e,i,n,s,u,h)}interpolationFactor(e,i,n){return this.interpolationType?Do.interpolationFactor(this.interpolationType,e,i,n):0}}function Bh(r,e,i,n,s){if((r=Ia(r,e,i,n,s)).result==="error")return r;const u=r.value.expression,h=Fs(u);if(!h&&!Fl(e))return Sa([new Uo("","data expressions not supported")]);const f=Bs(u,["zoom","pitch","distance-from-center"]);if(!f&&!If(e))return Sa([new Uo("","zoom expressions not supported")]);const _=Bs(u,["measure-light"]);if(!_&&!Sf(e))return Sa([new Uo("","measure-light expression not supported")]);const g=Bs(u,["line-progress"]);if(!g&&!(function(w){return Fh(w.expression,"line-progress")})(e))return Sa([new Uo("","line-progress expression not supported")]);const v=e.expression&&e.expression.relaxZoomRestriction,b=ln(u);return b||f||v?b instanceof Uo?Sa([b]):b instanceof Do&&!Kc(e)?Sa([new Uo("",'"interpolate" expressions cannot be used with this property')]):Ef(b?new cs(h&&g?"camera":"composite",r.value,b.labels,b instanceof Do?b.interpolation:void 0,_,g):new Gs(h&&g?"constant":"source",r.value,_,g)):Sa([new Uo("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression, or in the properties of atmosphere.')])}class eu{constructor(e,i){this._parameters=e,this._specification=i,Object.assign(this,Mf(this._parameters,this._specification))}static deserialize(e){return new eu(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function ln(r){let e=null;if(r instanceof Gn)e=ln(r.result);else if(r instanceof Dl){for(const i of r.args)if(e=ln(i),e)break}else(r instanceof Pl||r instanceof Do)&&r.input instanceof so&&r.input.name==="zoom"&&(e=r);return e instanceof Uo||r.eachChild((i=>{const n=ln(i);n instanceof Uo?e=n:e&&n&&e!==n&&(e=new Uo("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}var kh,zf,Df=(function(){if(zf)return kh;zf=1,kh=e;var r=3;function e(i,n,s){var u=this.cells=[];if(i instanceof ArrayBuffer){this.arrayBuffer=i;var h=new Int32Array(this.arrayBuffer);i=h[0],this.d=(n=h[1])+2*(s=h[2]);for(var f=0;f<this.d*this.d;f++){var _=h[r+f],g=h[r+f+1];u.push(_===g?null:h.subarray(_,g))}var v=h[r+u.length+1];this.keys=h.subarray(h[r+u.length],v),this.bboxes=h.subarray(v),this.insert=this._insertReadonly}else{this.d=n+2*s;for(var b=0;b<this.d*this.d;b++)u.push([]);this.keys=[],this.bboxes=[]}this.n=n,this.extent=i,this.padding=s,this.scale=n/i,this.uid=0;var w=s/n*i;this.min=-w,this.max=i+w}return e.prototype.insert=function(i,n,s,u,h){this._forEachCell(n,s,u,h,this._insertCell,this.uid++),this.keys.push(i),this.bboxes.push(n),this.bboxes.push(s),this.bboxes.push(u),this.bboxes.push(h)},e.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},e.prototype._insertCell=function(i,n,s,u,h,f){this.cells[h].push(f)},e.prototype.query=function(i,n,s,u,h){var f=this.min,_=this.max;if(i<=f&&n<=f&&_<=s&&_<=u&&!h)return Array.prototype.slice.call(this.keys);var g=[];return this._forEachCell(i,n,s,u,this._queryCell,g,{},h),g},e.prototype._queryCell=function(i,n,s,u,h,f,_,g){var v=this.cells[h];if(v!==null)for(var b=this.keys,w=this.bboxes,S=0;S<v.length;S++){var I=v[S];if(_[I]===void 0){var P=4*I;(g?g(w[P+0],w[P+1],w[P+2],w[P+3]):i<=w[P+2]&&n<=w[P+3]&&s>=w[P+0]&&u>=w[P+1])?(_[I]=!0,f.push(b[I])):_[I]=!1}}},e.prototype._forEachCell=function(i,n,s,u,h,f,_,g){for(var v=this._convertToCellCoord(i),b=this._convertToCellCoord(n),w=this._convertToCellCoord(s),S=this._convertToCellCoord(u),I=v;I<=w;I++)for(var P=b;P<=S;P++){var L=this.d*P+I;if((!g||g(this._convertFromCellCoord(I),this._convertFromCellCoord(P),this._convertFromCellCoord(I+1),this._convertFromCellCoord(P+1)))&&h.call(this,i,n,s,u,L,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,n=r+this.cells.length+1+1,s=0,u=0;u<this.cells.length;u++)s+=this.cells[u].length;var h=new Int32Array(n+s+this.keys.length+this.bboxes.length);h[0]=this.extent,h[1]=this.n,h[2]=this.padding;for(var f=n,_=0;_<i.length;_++){var g=i[_];h[r+_]=f,h.set(g,f),f+=g.length}return h[r+i.length]=f,h.set(this.keys,f),h[r+i.length+1]=f+=this.keys.length,h.set(this.bboxes,f),f+=this.bboxes.length,h.buffer},kh})(),Hs=Wa(Df);const us={};function nt(r,e,i={}){Object.defineProperty(r,"_classRegistryKey",{value:e,writable:!1}),us[e]={klass:r,omit:i.omit||[]}}nt(Object,"Object"),Hs.serialize=function(r,e){const i=r.toArrayBuffer();return e&&e.add(i),{buffer:i}},Hs.deserialize=function(r){return new Hs(r.buffer)},Object.defineProperty(Hs,"name",{value:"Grid"}),nt(Hs,"Grid"),delete Be.prototype.constructor,nt(mi,"Color"),nt(Error,"Error"),nt(no,"Formatted"),nt(Sc,"FormattedSection"),nt(Eo,"AJAXError"),nt(ao,"ResolvedImage"),nt(eu,"StylePropertyFunction"),nt(Jc,"StyleExpression",{omit:["_evaluator"]}),nt(to,"ImageId"),nt(Un,"ImageVariant"),nt(cs,"ZoomDependentExpression"),nt(Gs,"ZoomConstantExpression"),nt(so,"CompoundExpression",{omit:["_evaluate"]});for(const r in js)us[js[r]._classRegistryKey]||nt(js[r],`Expression${r}`);function kl(r){return r&&(r instanceof ArrayBuffer||r.constructor&&r.constructor.name==="ArrayBuffer")}function Hn(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(kl(r)||r instanceof ImageBitmap)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 n of r)i.push(Hn(n,e));return i}if(r instanceof Map){const i={$name:"Map",entries:[]};for(const[n,s]of r.entries())i.entries.push(Hn(n),Hn(s,e));return i}if(r instanceof Set){const i={$name:"Set"};let n=0;for(const s of r.values())i[++n]=Hn(s);return i}if(typeof r=="bigint")return{$name:"BigInt",value:r.toString()};if(typeof r=="object"){const i=r.constructor,n=i._classRegistryKey;if(!n)throw new Error(`Can't serialize object of unregistered class "${i.name}".`);const s=i.serialize?i.serialize(r,e):{};if(!i.serialize){for(const u in r)r.hasOwnProperty(u)&&(us[n].omit.indexOf(u)>=0||(s[u]=Hn(r[u],e)));r instanceof Error&&(s.message=r.message)}if(s.$name)throw new Error("$name property is reserved for worker serialization logic.");return n!=="Object"&&(s.$name=n),s}throw new Error("can't serialize object of type "+typeof r)}function Aa(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||kl(r)||r instanceof ImageBitmap||ArrayBuffer.isView(r)||r instanceof ImageData)return r;if(Array.isArray(r))return r.map(Aa);if(typeof r=="object"){const e=r.$name||"Object";if(e==="Map"){const s=r.entries||[],u=new Map;for(let h=0;h<s.length;h+=2)u.set(Aa(s[h]),Aa(s[h+1]));return u}if(e==="Set"){const s=new Set;for(const u of Object.keys(r))u!=="$name"&&s.add(Aa(r[u]));return s}if(e==="BigInt")return BigInt(r.value);const{klass:i}=us[e];if(!i)throw new Error(`Can't deserialize unregistered class "${e}".`);if(i.deserialize)return i.deserialize(r);const n=Object.create(i.prototype);for(const s of Object.keys(r))s!=="$name"&&(n[s]=Aa(r[s]));return n}throw new Error("can't deserialize object of type "+typeof r)}const gt={"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 Ol(r){for(const e of r)if(tu(e.charCodeAt(0)))return!0;return!1}function Oh(r){for(const e of r)if(!Rf(e.charCodeAt(0)))return!1;return!0}function Rf(r){return!(gt.Arabic(r)||gt["Arabic Supplement"](r)||gt["Arabic Extended-A"](r)||gt["Arabic Presentation Forms-A"](r)||gt["Arabic Presentation Forms-B"](r))}function tu(r){return!(r!==746&&r!==747&&(r<4352||!(gt["Bopomofo Extended"](r)||gt.Bopomofo(r)||gt["CJK Compatibility Forms"](r)&&!(r>=65097&&r<=65103)||gt["CJK Compatibility Ideographs"](r)||gt["CJK Compatibility"](r)||gt["CJK Radicals Supplement"](r)||gt["CJK Strokes"](r)||!(!gt["CJK Symbols and Punctuation"](r)||r>=12296&&r<=12305||r>=12308&&r<=12319||r===12336)||gt["CJK Unified Ideographs Extension A"](r)||gt["CJK Unified Ideographs"](r)||gt["Enclosed CJK Letters and Months"](r)||gt["Hangul Compatibility Jamo"](r)||gt["Hangul Jamo Extended-A"](r)||gt["Hangul Jamo Extended-B"](r)||gt["Hangul Jamo"](r)||gt["Hangul Syllables"](r)||gt.Hiragana(r)||gt["Ideographic Description Characters"](r)||gt.Kanbun(r)||gt["Kangxi Radicals"](r)||gt["Katakana Phonetic Extensions"](r)||gt.Katakana(r)&&r!==12540||!(!gt["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)||!(!gt["Small Form Variants"](r)||r>=65112&&r<=65118||r>=65123&&r<=65126)||gt["Unified Canadian Aboriginal Syllabics"](r)||gt["Unified Canadian Aboriginal Syllabics Extended"](r)||gt["Vertical Forms"](r)||gt["Yijing Hexagram Symbols"](r)||gt["Yi Syllables"](r)||gt["Yi Radicals"](r))))}function iu(r){return!(tu(r)||(function(e){return!!(gt["Latin-1 Supplement"](e)&&(e===167||e===169||e===174||e===177||e===188||e===189||e===190||e===215||e===247)||gt["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)||gt["Letterlike Symbols"](e)||gt["Number Forms"](e)||gt["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)||gt["Control Pictures"](e)&&e!==9251||gt["Optical Character Recognition"](e)||gt["Enclosed Alphanumerics"](e)||gt["Geometric Shapes"](e)||gt["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||gt["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||gt["CJK Symbols and Punctuation"](e)||gt.Katakana(e)||gt["Private Use Area"](e)||gt["CJK Compatibility Forms"](e)||gt["Small Form Variants"](e)||gt["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 ru(r){return gt.Arabic(r)||gt["Arabic Supplement"](r)||gt["Arabic Extended-A"](r)||gt["Arabic Presentation Forms-A"](r)||gt["Arabic Presentation Forms-B"](r)}function Vh(r){return r>=1424&&r<=2303||gt["Arabic Presentation Forms-A"](r)||gt["Arabic Presentation Forms-B"](r)}function $n(r,e){return!(!e&&Vh(r)||r>=2304&&r<=3583||r>=3840&&r<=4255||gt.Khmer(r))}function _m(r){for(const e of r)if(Vh(e.charCodeAt(0)))return!0;return!1}const So={unavailable:"unavailable",deferred:"deferred",loading:"loading",parsing:"parsing",parsed:"parsed",loaded:"loaded",error:"error"};let Uh=null,lo=So.unavailable,Zn=null;const Vl=function(r){r&&typeof r=="string"&&r.indexOf("NetworkError")>-1&&(lo=So.error),Uh&&Uh(r)};function ou(){nu.fire(new xn("pluginStateChange",{pluginStatus:lo,pluginURL:Zn}))}const nu=new rs,Ul=function(){return lo},Lf=function(){if(lo!==So.deferred||!Zn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");lo=So.loading,ou(),Zn&&Vn({url:Zn},(r=>{r?Vl(r):(lo=So.loaded,ou())}))},qn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>lo===So.loaded||qn.applyArabicShaping!=null,isLoading:()=>lo===So.loading,setState(r){lo=r.pluginStatus,Zn=r.pluginURL},isParsing:()=>lo===So.parsing,isParsed:()=>lo===So.parsed,getPluginURL:()=>Zn};class zi{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.worldview=i.worldview,this.activeFloors=i.activeFloors):(this.now=0,this.fadeDuration=0,this.transition={},this.pitch=0,this.brightness=0)}isSupportedScript(e){return(function(i,n){for(const s of i)if(!$n(s.charCodeAt(0),n))return!1;return!0})(e,qn.isLoaded())}}class au{constructor(e,i,n,s,u){this.property=e,this.value=i,this.expression=(function(h,f,_,g,v){if(Qc(h))return new eu(h,f);if(Bl(h)||Array.isArray(h)&&h.length>0){const b=Bh(h,f,_,g,v);if(b.result==="error")throw new Error(b.value.map((w=>`${w.key}: ${w.message}`)).join(", "));return b.value}{let b=h;return typeof h=="string"&&f.type==="color"&&(b=mi.parse(h)),{kind:"constant",configDependencies:new Set,isIndoorDependent:!1,evaluate:()=>b}}})(i===void 0?e.specification.default:i,e.specification,n,s,u)}isIndoorDependent(){return this.expression.isIndoorDependent}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(e,i,n,s){return this.property.possiblyEvaluate(this,e,i,n,s)}}class Nh{constructor(e,i,n,s){this.property=e,this.value=new au(e,void 0,i,n,s)}transitioned(e,i){return new Bf(this.property,this.value,i,Object.assign({},e.transition,this.transition),e.now)}untransitioned(){return new Bf(this.property,this.value,null,{},0)}}class Ff{constructor(e,i,n,s){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._scope=i,this._options=n,this._iconImageUseTheme=s,this._isIndoorDependent=!1,this.configDependencies=new Set}getValue(e){return Ce(this._values[e].value.value)}setValue(e,i){this._values.hasOwnProperty(e)||(this._values[e]=new Nh(this._values[e].property,this._scope,this._options,this._iconImageUseTheme)),this._values[e].value=new au(this._values[e].property,i===null?void 0:Ce(i),this._scope,this._options,this._iconImageUseTheme),this._values[e].value.expression.configDependencies&&(this.configDependencies=new Set([...this.configDependencies,...this._values[e].value.expression.configDependencies]),this._isIndoorDependent=this._isIndoorDependent||this._values[e].value.isIndoorDependent())}setTransitionOrValue(e,i){i&&(this._options=i);const n=this._properties.properties;if(e)for(const s in e){const u=e[s];if(s.endsWith("-transition")){const h=s.slice(0,-11);n[h]&&this.setTransition(h,u)}else n.hasOwnProperty(s)&&this.setValue(s,u)}}getTransition(e){return Ce(this._values[e].transition)}setTransition(e,i){this._values.hasOwnProperty(e)||(this._values[e]=new Nh(this._values[e].property)),this._values[e].transition=Ce(i)||void 0}serialize(){const e={};for(const i of Object.keys(this._values)){const n=this.getValue(i);n!==void 0&&(e[i]=n);const s=this.getTransition(i);s!==void 0&&(e[`${i}-transition`]=s)}return e}transitioned(e,i){const n=new kf(this._properties);for(const s of Object.keys(this._values))n._values[s]=this._values[s].transitioned(e,i._values[s]);return n}untransitioned(){const e=new kf(this._properties);for(const i of Object.keys(this._values))e._values[i]=this._values[i].untransitioned();return e}isIndoorDependent(){return this._isIndoorDependent}}class Bf{constructor(e,i,n,s,u){const h=s.delay||0,f=s.duration||0;u=u||0,this.property=e,this.value=i,this.begin=u+h,this.end=this.begin+f,e.specification.transition&&(s.delay||s.duration)&&(this.prior=n)}possiblyEvaluate(e,i,n){const s=e.now||0,u=this.value.possiblyEvaluate(e,i,n),h=this.prior;if(h){if(s>this.end)return this.prior=null,u;if(this.value.isDataDriven())return this.prior=null,u;if(s<this.begin)return h.possiblyEvaluate(e,i,n);{const f=(s-this.begin)/(this.end-this.begin);return this.property.interpolate(h.possiblyEvaluate(e,i,n),u,Ka(f))}}return u}}class kf{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,i,n){const s=new ds(this._properties);for(const u of Object.keys(this._values))s._values[u]=this._values[u].possiblyEvaluate(e,i,n);return s}hasTransition(){for(const e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class Of{constructor(e,i,n,s){this._properties=e,this._values=Object.create(e.defaultPropertyValues),this._scope=i,this._options=n,this._iconImageUseTheme=s,this._isIndoorDependent=!1,this.configDependencies=new Set}getValue(e){return Ce(this._values[e].value)}setValue(e,i){this._values[e]=new au(this._values[e].property,i===null?void 0:Ce(i),this._scope,this._options,this._iconImageUseTheme),this._values[e].expression.configDependencies&&(this.configDependencies=new Set([...this.configDependencies,...this._values[e].expression.configDependencies]),this._isIndoorDependent=this._isIndoorDependent||this._values[e].isIndoorDependent())}serialize(){const e={};for(const i of Object.keys(this._values)){const n=this.getValue(i);n!==void 0&&(e[i]=n)}return e}possiblyEvaluate(e,i,n,s){const u=new ds(this._properties);for(const h of Object.keys(this._values))u._values[h]=this._values[h].possiblyEvaluate(e,i,n,s);return u}isIndoorDependent(){return this._isIndoorDependent}}class hs{constructor(e,i,n,s){this.property=e,this.value=i,this.parameters=n,this.iconImageUseTheme=s}isConstant(){return this.value.kind==="constant"}constantOr(e){return this.value.kind==="constant"?this.value.value:e}evaluate(e,i,n,s){return this.property.evaluate(this.value,this.parameters,e,i,n,s,this.iconImageUseTheme)}}class ds{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class je{constructor(e){this.specification=e}possiblyEvaluate(e,i){return e.expression.evaluate(i)}interpolate(e,i,n){const s=vl[this.specification.type];return s?s(e,i,n):e}}class Ye{constructor(e,i){this.specification=e,this.overrides=i}possiblyEvaluate(e,i,n,s,u){return e.expression.kind==="constant"||e.expression.kind==="camera"?new hs(this,{kind:"constant",value:e.expression.evaluate(i,null,{},n,s,void 0,u)},i):new hs(this,e.expression,i,u)}interpolate(e,i,n){if(e.value.kind!=="constant"||i.value.kind!=="constant")return e;if(e.value.value===void 0||i.value.value===void 0)return new hs(this,{kind:"constant",value:void 0},e.parameters);const s=vl[this.specification.type];return s?new hs(this,{kind:"constant",value:s(e.value.value,i.value.value,n)},e.parameters):e}evaluate(e,i,n,s,u,h,f){return e.kind==="constant"?e.value:e.evaluate(i,n,s,u,h,void 0,f)}}class fs{constructor(e){this.specification=e}possiblyEvaluate(e,i,n,s){return!!e.expression.evaluate(i,null,{},n,s)}interpolate(){return!1}}class Ji{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];const i=new zi(0,{});for(const n in e){const s=e[n];s.specification.overridable&&this.overridableProperties.push(n);const u=this.defaultPropertyValues[n]=new au(s,void 0),h=this.defaultTransitionablePropertyValues[n]=new Nh(s);this.defaultTransitioningPropertyValues[n]=h.untransitioned(),this.defaultPossiblyEvaluatedValues[n]=u.possiblyEvaluate(i)}}}nt(Ye,"DataDrivenProperty"),nt(je,"DataConstantProperty"),nt(fs,"ColorRampProperty");var fe=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"]},"use-theme":true,"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"]},"use-theme":true,"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"]},"use-theme":true,"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"}}},"modelNodeOverride":{"orientation":{"type":"array","value":"number","length":3,"default":[0,0,0],"period":360}},"modelNodeOverrides":{"*":{"type":"modelNodeOverride"}},"modelMaterialOverride":{"model-color":{"type":"color"},"model-color-mix-intensity":{"type":"number"},"model-opacity":{"type":"number"},"model-emissive-strength":{"type":"number"}},"modelMaterialOverrides":{"*":{"type":"modelMaterialOverride"}},"modelSourceModel":{"uri":{"type":"string"},"position":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[-180,-90],"maximum":[180,90]},"orientation":{"type":"array","value":"number","length":3,"default":[0,0,0],"period":360},"nodeOverrides":{"type":"modelNodeOverrides"},"materialOverrides":{"type":"modelMaterialOverrides"},"nodeOverrideNames":{"type":"array","value":"string"},"materialOverrideNames":{"type":"array","value":"string"},"featureProperties":{"type":"*"}},"modelSourceModels":{"*":{"type":"modelSourceModel"}},"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"},"models":{"type":"modelSourceModels"}},"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"},"appearances":{"type":"array","value":"appearance","supported-layer-types":["symbol"]}},"appearance":{"condition":{"type":"boolean","expression":{"interpolated":true,"parameters":["zoom","pitch","feature","feature-state","measure-light","distance-from-center"]},"property-type":"data-driven"},"name":{"type":"string"},"properties":{"type":"*"}},"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-facade":{"type":"boolean","default":false,"expression":{"parameters":["feature"]},"property-type":"data-driven"},"building-facade-floors":{"type":"number","minimum":1,"maximum":200,"default":3,"property-type":"data-driven","expression":{"parameters":["feature"]}},"building-facade-unit-width":{"type":"number","minimum":1,"maximum":20,"default":3.1,"property-type":"data-driven","expression":{"parameters":["feature"]}},"building-facade-window":{"type":"array","length":2,"value":"number","minimum":0.1,"maximum":1,"default":[0.9,0.9],"property-type":"data-driven","expression":{"parameters":["feature"]}},"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"},"building-flood-light-wall-radius":{"property-type":"data-driven","type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"building-flood-light-ground-radius":{"property-type":"data-driven","type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"building-flip-roof-orientation":{"property-type":"data-driven","type":"boolean","default":false,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}}},"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,"appearance":true,"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,0.1],"maximum":[10,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,"appearance":true,"use-theme":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"appearance":true,"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],"appearance":true,"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,"appearance":true,"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,0.1],"maximum":[10,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,"appearance":true,"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],"appearance":true,"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},"use-theme":true,"transition":true},"high-color":{"type":"color","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"use-theme":true,"transition":true},"space-color":{"type":"color","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"use-theme":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},"use-theme":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},"use-theme":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},"use-theme":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},"use-theme":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_source":{"sourceId":{"type":"string"},"sourceLayers":{"type":"array","value":"string"}},"indoor":{"*":{"type":"indoor_source"}},"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"]},"use-theme":true,"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","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","use-theme":true,"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"]}},"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)","use-theme":true,"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)","use-theme":true,"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","use-theme":true,"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"]}},"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","use-theme":true,"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-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"parameters":[]},"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)","use-theme":true,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"property-type":"data-driven"},"building-emissive-strength":{"type":"number","default":0,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"property-type":"data-driven"},"building-facade-emissive-chance":{"type":"number","default":0.35,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["measure-light","zoom"]}},"building-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{}},"building-flood-light-color":{"type":"color","default":"#ffffff","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"building-flood-light-intensity":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"building-flood-light-ground-attenuation":{"type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}}},"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","use-theme":true,"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"]}},"line-gradient":{"type":"color","use-theme":true,"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","use-theme":true,"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"]},"property-type":"data-driven"},"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)","use-theme":true,"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","use-theme":true,"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","use-theme":true,"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"],"use-theme":true,"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","use-theme":true,"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)","use-theme":true,"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"]}},"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","use-theme":true,"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)","use-theme":true,"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","use-theme":true,"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","use-theme":true,"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","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"hillshade-accent-color":{"type":"color","default":"#000000","use-theme":true,"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","use-theme":true,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"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"],"use-theme":true,"expression":{"interpolated":true,"parameters":["sky-radial-progress"]}},"sky-atmosphere-halo-color":{"type":"color","default":"white","use-theme":true},"sky-atmosphere-color":{"type":"color","default":"white","use-theme":true},"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"]},"use-theme":true,"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]},"model-elevation-reference":{"type":"enum","values":{"sea":1,"ground":1,"hd-road-markup":1},"default":"ground","expression":{}}},"transition":{"duration":{"type":"number","default":300,"minimum":0},"delay":{"type":"number","default":0,"minimum":0}},"promoteId":{"*":{"type":"*"}}}');function Vf(r){return r instanceof Number||r instanceof String||r instanceof Boolean?r.valueOf():r}function su(r){if(Array.isArray(r))return r.map(su);if(r instanceof Object&&!(r instanceof Number||r instanceof String||r instanceof Boolean)){const e={};for(const i in r)e[i]=su(r[i]);return e}return Vf(r)}function Sn(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(!Sn(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function lu(r,e="",i=null,n="fill"){if(r==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};Sn(r)||(r=cu(r));const s=r;let u=!0;try{u=(function(v){if(!$s(v))return v;let b=su(v);return Uf(b),b=ps(b),b})(s)}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!
@@ -2983,4 +2983,4 @@ ${(d?d.defines():[]).concat(m.map((z=>`#define ${z}`))).join(`
2983
2983
  translate(${o.x}px,${o.y}px)
2984
2984
  `}_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=a.cX(a.f6(o.transform,this._lngLat)),p=t.sub(a.f7(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 a.aT(this._lngLat.lng,this._lngLat.lat+.001),this._altitude),m=o.project(new a.aT(this._lngLat.lng,this._lngLat.lat-.001),this._altitude).sub(p);c=a.cX(Math.atan2(m.y,m.x))-90}else c=-o.getBearing();else if(d==="horizon"){const p=a.ah(4,6,o.getZoom()),m=a.f7(o.transform);m.y+=p*o.transform.height;const y=t.sub(m),x=a.cX(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=ad(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=a.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 a.z("dragstart"))),this.fire(new a.z("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 a.z("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||Ho.rotation,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(t){return this._rotationAlignment=t||Ho.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||Ho.pitchAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment==="auto"?this.getRotationAlignment():this._pitchAlignment}setOccludedOpacity(t){return this._occludedOpacity=t||Ho.occludedOpacity,this._update(),this}getOccludedOpacity(){return this._occludedOpacity}}const Pm={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0,showUserHeading:!1},Ks={maxWidth:100,unit:"metric"},sd={kilometer:"km",meter:"m",mile:"mi",foot:"ft","nautical-mile":"nm"},$o={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",altitude:0},Zo=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function ys(l=new a.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 a.P(0,l);case"top-left":return new a.P(o,o);case"top-right":return new a.P(-o,o);case"bottom":return new a.P(0,-l);case"bottom-left":return new a.P(o,-o);case"bottom-right":return new a.P(-o,-o);case"left":return new a.P(l,0);case"right":return new a.P(-l,0)}return new a.P(0,0)}return l instanceof a.P||Array.isArray(l)?a.P.convert(l):a.P.convert(l[t]||[0,0])}return{version:Yr,supported:Na.supported,setRTLTextPlugin:a.fb,getRTLTextPluginStatus:a.fa,Map:class extends nd{constructor(l){Rn.mark(ir.create);const t=l;if((l=Object.assign({},Am,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&&a.f3(window)&&(l.antialias=!1,a.w("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new uh(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 Yn,this._domRenderTaskQueue=new Yn,this._controls=[],this._markers=[],this._popups=[],this._mapId=a.b2(),this._locale=Object.assign({},Qn,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 Kn(0),this._interactionRange=[1/0,-1/0],this._visibilityHidden=0,this._useExplicitProjection=!1,this._frameId=0,this._scaleFactor=l.scaleFactor,this._requestManager=new cc(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&&a.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,a.aY(["_onWindowOnline","_onWindowResize","_onVisibilityChange","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),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 Sm(this,l),this._localFontFamily=l.localFontFamily,this._localIdeographFontFamily=l.localIdeographFontFamily,(l.style||!l.testMode)&&this.setStyle(l.style||a.e.DEFAULT_STYLE,{config:l.config,localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),l.projection&&this.setProjection(l.projection),l.hash&&(this._hash=new qh(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,Object.assign({},l.fitBoundsOptions,{duration:0})))}this.resize(),l.attributionControl&&this.addControl(new Xl({customAttribution:l.customAttribution})),this._logoControl=new Wl,this.addControl(this._logoControl,l.logoPosition),this.on("style.load",(()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this._postStyleLoadEvent(),this._postStyleWithAppearanceEvent(),this._setupIndoor()})),this.on("data",(o=>{this._update(o.dataType==="style"),this.fire(new a.z(`${o.dataType}data`,o))})),this.on("dataloading",(o=>{this.fire(new a.z(`${o.dataType}dataloading`,o))})),this._interactions=new un(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 a.y(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 a.y(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 a.z("movestart",l)).fire(new a.z("move",l)),this.fire(new a.z("resize",l)),t&&this.fire(new a.z("moveend",l)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(l){return this.transform.setMaxBounds(a.aI.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 a.z("zoomstart")).fire(new a.z("zoom")).fire(new a.z("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 a.z("zoomstart")).fire(new a.z("zoom")).fire(new a.z("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 a.z("pitchstart")).fire(new a.z("pitch")).fire(new a.z("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 a.z("pitchstart")).fire(new a.z("pitch")).fire(new a.z("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._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._styleDirty=!0,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>=a.cL?(l.setMercatorFromTransition(),o=!0):t==="mercator"&&l.zoom<a.cL&&(l.setProjection({name:"globe"}),o=!0),o&&(this.style.applyProjectionUpdate(),this.style._forceSymbolLayerUpdate(),this._update(!0))}_prioritizeAndUpdateProjection(l,t){return this._updateProjection(l||t||{name:"mercator"})}_updateProjection(l){let t;const o=this.transform.mercatorFromTransition;t=l.name==="globe"&&this.transform.zoom>=a.cL?this.transform.setMercatorFromTransition():this.transform.setProjection(l),this.style.applyProjectionUpdate();const c=this.transform.getProjection().name==="mercator"&&o!==this.transform.mercatorFromTransition;return(t||c)&&(this.painter.clearBackgroundTiles(),this.style.clearSources(),this._update(!0),this._forceMarkerAndPopupUpdate(!0)),this}project(l,t){return this.transform.locationPoint3D(a.aT.convert(l),t)}unproject(l,t){return this.transform.pointLocation3D(a.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 go(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 go(l,this,p.originalEvent)))},mouseout:p=>{d&&(d=!1,o.call(this,new go(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&&Im(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 a.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)}queryRasterValue(l,t,o){return this._isValidId(l)?this.style.queryRasterValue(l,t,o):Promise.resolve(null)}isPointOnSurface(l){const{name:t}=this.transform.projection;return t!=="globe"&&t!=="mercator"&&a.w(`${t} projection does not support isPointOnSurface, this API may behave unexpectedly.`),this.transform.isPointOnSurface(a.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=Object.assign({},{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;a.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=Object.assign({},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():(a.w("There is no style added to the map."),!1)}_isValidId(l){return l==null?(this.fire(new a.y(new Error("IDs can't be empty."))),!1):!a.dr(l)||(this.fire(new a.y(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=a.I.from(l);if(t instanceof HTMLImageElement||ImageBitmap&&t instanceof ImageBitmap){const{width:x,height:T,data:E}=a.o.getImageData(t);this.style.addImage(y,{data:new a.q({width:x,height:T},E),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 a.y(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:T}=t,E=t;this.style.addImage(y,{data:new a.q({width:x,height:T},new Uint8Array(E.data)),pixelRatio:o,stretchX:d,stretchY:p,content:m,sdf:c,usvg:!1,version:0,userImage:E}),E.onAdd&&E.onAdd(this,l)}}updateImage(l,t){this._lazyInitEmptyStyle();const o=a.I.from(l),c=this.style.getImage(o);if(!c)return void this.fire(new a.y(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?a.o.getImageData(t):t,{width:p,height:m,data:y}=d;if(p===void 0||m===void 0)return void this.fire(new a.y(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 a.y(new Error(`The width and height of the updated image (${p}, ${m})
2985
2985
  must be that same as the previous version of the image
2986
- (${c.data.width}, ${c.data.height})`)));const x=!(t instanceof HTMLImageElement||ImageBitmap&&t instanceof ImageBitmap);let T=!1;c.usvg?(c.data=new a.q({width:p,height:m},new Uint8Array(y)),c.usvg=!1,c.icon=void 0,T=!0):c.data.replace(y,x),this.style.updateImage(o,c,T)}hasImage(l){return l?!!this.style&&!!this.style.getImage(a.I.from(l)):(this.fire(new a.y(new Error("Missing required image id"))),!1)}removeImage(l){this.style.removeImage(a.I.from(l))}loadImage(l,t){a.n(this._requestManager.transformRequest(l,a.R.Image),((o,c)=>{t(o,c instanceof HTMLImageElement?a.o.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 a.y(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 a.y(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}setLayerProperty(l,t,o,c={}){return this._isValidId(l)?(t==="appearances"&&this._postAddingAppearancesToStyleEvent(),this.style.setLayerProperty(l,t,o,c),this._update(!0)):this}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(a.aT.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)}_selectIndoorFloor(l){this.indoor.selectFloor(l)}_setIndoorActiveFloorsVisibility(l){this.indoor.setActiveFloorsVisibility(l)}_addIndoorControl(){this._indoorControl||(this._indoorControl=new Ys),this.addControl(this._indoorControl,"right")}_removeIndoorControl(){this._indoorControl&&this.removeControl(this._indoorControl)}_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)"&&a.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/.")}_setupIndoor(){this.style.isIndoorEnabled()&&(this.indoor=new lf(this.style),this.on("load",(()=>{this._addIndoorControl(),this.indoor._updateUI(this.transform.zoom,this.transform.center,this.transform.getBounds()),this.on("move",(()=>{this.indoor._updateUI(this.transform.zoom,this.transform.center,this.transform.getBounds())})),this.on("idle",(()=>{this.indoor._updateUI(this.transform.zoom,this.transform.center,this.transform.getBounds())}))})))}_setupContainer(){const l=this._container;l.classList.add("mapboxgl-map"),(this._missingCSSCanary=Ei("div","mapboxgl-canary",l)).style.visibility="hidden",this._detectMissingCSS();const t=this._canvasContainer=Ei("div","mapboxgl-canvas-container",l);this._canvas=Ei("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=Ei("div","mapboxgl-control-container",l),c=this._controlPositions={};["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"].forEach((d=>{c[d]=Ei("div",`mapboxgl-ctrl-${d}`,o)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(l,t){const o=a.o.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=Object.assign({},Na.supported.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),t=this._canvas.getContext("webgl2",l);t?(Qr(t,!0),this.painter=new gu(t,this._contextCreateOptions,this.transform,this._scaleFactor,this._worldview),this.on("data",(o=>{o.dataType==="source"&&this.painter.setTileLoadedFlag(!0)})),a.k.testSupport(t)):this.fire(new a.y(new Error("Failed to initialize WebGL")))}_contextLost(l){l.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new a.z("webglcontextlost",{originalEvent:l}))}_contextRestored(l){this._setupPainter(),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight)),this._updateTerrain(),this.style&&(this.style.clearLayers(),this.style.imageManager.destroyAtlasTextures(),this.style.reloadModels(),this.style.clearSources()),this._update(),this.fire(new a.z("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 a.z("renderstart")),++this._frameId;const o=this.painter.context.extTimerQuery,c=a.o.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 T=this.transform.zoom,E=this.transform.pitch,M=a.o.now(),A=new a.ac(T,{now:M,fadeDuration:p,pitch:E,transition:this.style.transition,worldview:this._worldview});this.style.update(A)}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 a.z("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,Rn.mark(ir.load),this.fire(new a.z("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 T=a.o.now()-c;d.endQuery(o.TIME_ELAPSED_EXT),setTimeout((()=>{const E=d.getQueryParameter(t,d.QUERY_RESULT)/1e6;d.deleteQuery(t),this.fire(new a.z("gpu-timing-frame",{cpuTime:T,gpuTime:E}))}),50)}if(this.listens("gpu-timing-layer")){const T=this.painter.collectGpuTimers();setTimeout((()=>{const E=this.painter.queryGpuTimers(T);this.fire(new a.z("gpu-timing-layer",{layerTimes:E}))}),50)}if(this.listens("gpu-timing-deferred-render")){const T=this.painter.collectDeferredRenderGpuQueries();setTimeout((()=>{const E=this.painter.queryGpuTimeDeferredRender(T);this.fire(new a.z("gpu-timing-deferred-render",{gpuTime:E}))}),50)}const x=this._sourcesDirty||this._styleDirty||this._placementDirty||m;if(x||this._repaint)this.triggerRepaint();else{const T=this.idle();if(T&&(m=this._updateAverageElevation(c,!0)),m)this.triggerRepaint();else if(this._triggerFrame(!1),T&&(this.fire(new a.z("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const E=this._calculateSpeedIndex();this.fire(new a.z("speedindexcompleted",{speedIndex:E})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||x||(this._fullyLoaded=!0,Rn.mark(ir.fullLoad),this._performanceMetricsCollection&&fr(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(){ua(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,(l=>{if(l&&(l.message===bi||l.status===401)){const t=this.painter.context.gl;Qr(t,!1),this._logoControl instanceof Wl&&this._logoControl._updateLogo(),t&&t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT|t.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new a.y(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/")))}})),uc(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,(()=>{}))}_postStyleLoadEvent(){this.style.globalId&&hc(this._requestManager._customAccessToken,{map:this,style:this.style.globalId,importedStyles:this.style.getImportGlobalIds()})}_postStyleWithAppearanceEvent(){this.style.globalId&&this.style.hasAppearances()&&Ri(this._requestManager._customAccessToken)}_postAddingAppearancesToStyleEvent(){Hr(this._requestManager._customAccessToken)}_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&&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),To.delete(this.painter.context.gl),ca.remove(),Co.remove(),this._removed=!0,this.fire(new a.z("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(l){this._renderNextFrame=this._renderNextFrame||l,this.style&&!this._frame&&(this._frame=a.o.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 a.bw(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._update())}get showParseStatus(){return!!this._showParseStatus}set showParseStatus(l){this._showParseStatus!==l&&(this._showParseStatus=l,this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(l){this._showTerrainWireframe!==l&&(this._showTerrainWireframe=l,this._update())}get showLayers2DWireframe(){return!!this._showLayers2DWireframe}set showLayers2DWireframe(l){this._showLayers2DWireframe!==l&&(this._showLayers2DWireframe=l,this._update())}get showLayers3DWireframe(){return!!this._showLayers3DWireframe}set showLayers3DWireframe(l){this._showLayers3DWireframe!==l&&(this._showLayers3DWireframe=l,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._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(l){this._showCollisionBoxes!==l&&(this._showCollisionBoxes=l,this.style&&l?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(l){this._showOverdrawInspector!==l&&(this._showOverdrawInspector=l,this._update())}get repaint(){return!!this._repaint}set repaint(l){this._repaint!==l&&(this._repaint=l,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,l&&this._update())}_setCacheLimits(l,t){a.f4(l,t)}get version(){return Yr}},NavigationControl:class{constructor(l={}){this.options=Object.assign({},Mm,l),this._container=Ei("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(t=>t.preventDefault())),this.options.showZoom&&(a.aY(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",(t=>{this._map&&this._map.zoomIn({},{originalEvent:t})})),Ei("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})})),Ei("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(a.aY(["_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=Ei("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 Cm(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=Ei("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 a.E{constructor(l={}){super();const t=navigator.geolocation;this.options=Object.assign({geolocation:t},Pm,l),a.aY(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=yu(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(l){return this._map=l,this._container=Ei("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 a.z("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 a.z("geolocate",Object.assign({coords:l.coords,timestamp:l.timestamp},l.toJSON?{toJSON:l.toJSON.bind(l)}:{}))),this._finish()}}_updateCamera(l){const t=new a.aT(l.coords.longitude,l.coords.latitude),o=l.coords.accuracy,c=this._map.getBearing(),d=Object.assign({bearing:c},this.options.fitBoundsOptions);this._map.fitBounds(t.toBounds(o),d,{geolocateSource:!0})}_updateMarker(l){if(l){const t=new a.aT(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=a.cf(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 a.z("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=Ei("button","mapboxgl-ctrl-geolocate",this._container),Ei("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",l===!1){a.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=Ei("div","mapboxgl-user-location"),this._dotElement.appendChild(Ei("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(Ei("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new zu({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=Ei("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new zu({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 a.z("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 a.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 a.z("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 a.z("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 a.z("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:Xl,ScaleControl:class{constructor(l={}){this.options=Object.assign({},Ks,l),a.aY(["_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 T=Math.pow(10,Math.ceil(-Math.log(x)/Math.LN10));return Math.round(x*T)/T})(y),m*y})(t),d=c/t;this._container.innerHTML=o!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:o}).format(c):`${c}&nbsp;${sd[o]}`,this._container.style.width=l*d+"px"}))}onAdd(l){return this._map=l,this._language=l.getLanguage(),this._container=Ei("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:a.w("Full screen control 'container' must be a DOM element.")),a.aY(["_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=Ei("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",a.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=Ei("button","mapboxgl-ctrl-fullscreen",this._controlContainer);Ei("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()}},IndoorControl:Ys,Popup:class extends a.E{constructor(l){super(),this.options=Object.assign(Object.create($o),l),this._altitude=this.options.altitude,a.aY(["_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 a.z("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 a.z("close")),this}getLngLat(){return this._lngLat}setLngLat(l){this._lngLat=a.aT.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=Ei("div","mapboxgl-popup-content",this._container||void 0);if(t.appendChild(l),this.options.closeButton){const o=this._closeButton=Ei("button","mapboxgl-popup-close-button",t);o.type="button",o.setAttribute("aria-label","Close popup"),o.innerHTML='<span aria-hidden="true">&#215;</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=Ei("div","mapboxgl-popup",t.getContainer()),this._tip=Ei("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=ad(this._lngLat,this._pos,t.transform)),!this._trackPointer||l){const d=this._pos=this._trackPointer&&l instanceof a.P?l:t.project(this._lngLat,this._altitude),p=ys(this.options.offset),m=this._anchor=this._getAnchor(p.y),y=ys(this.options.offset,m),x=d.add(y).round();t._requestDomTask((()=>{this._container&&m&&(this._container.style.transform=`${Xr[m]} translate(${x.x}px,${x.y}px)`)}))}if(!this._marker&&t._showingGlobe()){const d=a.f5(t.transform,this._lngLat)?0:1;this._setOpacity(d)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const l=this._container.querySelector(Zo);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:zu,Style:Go,LngLat:a.aT,LngLatBounds:a.aI,Point:a.P,MercatorCoordinate:a.ae,FreeCameraOptions:so,Evented:a.E,config:a.e,prewarm:a.f9,clearPrewarmedResources:a.f8,get accessToken(){return a.e.ACCESS_TOKEN},set accessToken(l){a.e.ACCESS_TOKEN=l},get baseApiUrl(){return a.e.API_URL},set baseApiUrl(l){a.e.API_URL=l},get workerCount(){return a.fi.workerCount},set workerCount(l){a.fi.workerCount=l},get maxParallelImageRequests(){return a.e.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(l){a.e.MAX_PARALLEL_IMAGE_REQUESTS=l},clearStorage(l){a.fh(l)},get workerUrl(){return a.fg.workerUrl},set workerUrl(l){a.fg.workerUrl=l},get workerClass(){return a.fg.workerClass},set workerClass(l){a.fg.workerClass=l},get workerParams(){return a.fg.workerParams},set workerParams(l){a.fg.workerParams=l},get dracoUrl(){return a.ff()},set dracoUrl(l){a.fe(l)},get meshoptUrl(){return a.fd()},set meshoptUrl(l){a.fc(l)},setNow:a.o.setNow,restoreNow:a.o.restoreNow}}));var W0=Va;return W0}))})(Wp,Wp.exports)),Wp.exports}var X0=Ow();const Vw=Fw.xn(X0),Uw=Bw({__proto__:null,default:Vw},[X0]);exports.m=Uw;
2986
+ (${c.data.width}, ${c.data.height})`)));const x=!(t instanceof HTMLImageElement||ImageBitmap&&t instanceof ImageBitmap);let T=!1;c.usvg?(c.data=new a.q({width:p,height:m},new Uint8Array(y)),c.usvg=!1,c.icon=void 0,T=!0):c.data.replace(y,x),this.style.updateImage(o,c,T)}hasImage(l){return l?!!this.style&&!!this.style.getImage(a.I.from(l)):(this.fire(new a.y(new Error("Missing required image id"))),!1)}removeImage(l){this.style.removeImage(a.I.from(l))}loadImage(l,t){a.n(this._requestManager.transformRequest(l,a.R.Image),((o,c)=>{t(o,c instanceof HTMLImageElement?a.o.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 a.y(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 a.y(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}setLayerProperty(l,t,o,c={}){return this._isValidId(l)?(t==="appearances"&&this._postAddingAppearancesToStyleEvent(),this.style.setLayerProperty(l,t,o,c),this._update(!0)):this}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(a.aT.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)}_selectIndoorFloor(l){this.indoor.selectFloor(l)}_setIndoorActiveFloorsVisibility(l){this.indoor.setActiveFloorsVisibility(l)}_addIndoorControl(){this._indoorControl||(this._indoorControl=new Ys),this.addControl(this._indoorControl,"right")}_removeIndoorControl(){this._indoorControl&&this.removeControl(this._indoorControl)}_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)"&&a.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/.")}_setupIndoor(){this.style.isIndoorEnabled()&&(this.indoor=new lf(this.style),this.on("load",(()=>{this._addIndoorControl(),this.indoor._updateUI(this.transform.zoom,this.transform.center,this.transform.getBounds()),this.on("move",(()=>{this.indoor._updateUI(this.transform.zoom,this.transform.center,this.transform.getBounds())})),this.on("idle",(()=>{this.indoor._updateUI(this.transform.zoom,this.transform.center,this.transform.getBounds())}))})))}_setupContainer(){const l=this._container;l.classList.add("mapboxgl-map"),(this._missingCSSCanary=Ei("div","mapboxgl-canary",l)).style.visibility="hidden",this._detectMissingCSS();const t=this._canvasContainer=Ei("div","mapboxgl-canvas-container",l);this._canvas=Ei("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=Ei("div","mapboxgl-control-container",l),c=this._controlPositions={};["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"].forEach((d=>{c[d]=Ei("div",`mapboxgl-ctrl-${d}`,o)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(l,t){const o=a.o.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=Object.assign({},Na.supported.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),t=this._canvas.getContext("webgl2",l);t?(Qr(t,!0),this.painter=new gu(t,this._contextCreateOptions,this.transform,this._scaleFactor,this._worldview),this.on("data",(o=>{o.dataType==="source"&&this.painter.setTileLoadedFlag(!0)})),a.k.testSupport(t)):this.fire(new a.y(new Error("Failed to initialize WebGL")))}_contextLost(l){l.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new a.z("webglcontextlost",{originalEvent:l}))}_contextRestored(l){this._setupPainter(),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight)),this._updateTerrain(),this.style&&(this.style.clearLayers(),this.style.imageManager.destroyAtlasTextures(),this.style.reloadModels(),this.style.clearSources()),this._update(),this.fire(new a.z("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 a.z("renderstart")),++this._frameId;const o=this.painter.context.extTimerQuery,c=a.o.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 T=this.transform.zoom,E=this.transform.pitch,M=a.o.now(),A=new a.ac(T,{now:M,fadeDuration:p,pitch:E,transition:this.style.transition,worldview:this._worldview});this.style.update(A)}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 a.z("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,Rn.mark(ir.load),this.fire(new a.z("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 T=a.o.now()-c;d.endQuery(o.TIME_ELAPSED_EXT),setTimeout((()=>{const E=d.getQueryParameter(t,d.QUERY_RESULT)/1e6;d.deleteQuery(t),this.fire(new a.z("gpu-timing-frame",{cpuTime:T,gpuTime:E}))}),50)}if(this.listens("gpu-timing-layer")){const T=this.painter.collectGpuTimers();setTimeout((()=>{const E=this.painter.queryGpuTimers(T);this.fire(new a.z("gpu-timing-layer",{layerTimes:E}))}),50)}if(this.listens("gpu-timing-deferred-render")){const T=this.painter.collectDeferredRenderGpuQueries();setTimeout((()=>{const E=this.painter.queryGpuTimeDeferredRender(T);this.fire(new a.z("gpu-timing-deferred-render",{gpuTime:E}))}),50)}const x=this._sourcesDirty||this._styleDirty||this._placementDirty||m;if(x||this._repaint)this.triggerRepaint();else{const T=this.idle();if(T&&(m=this._updateAverageElevation(c,!0)),m)this.triggerRepaint();else if(this._triggerFrame(!1),T&&(this.fire(new a.z("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const E=this._calculateSpeedIndex();this.fire(new a.z("speedindexcompleted",{speedIndex:E})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||x||(this._fullyLoaded=!0,Rn.mark(ir.fullLoad),this._performanceMetricsCollection&&fr(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(){ua(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,(l=>{if(l&&(l.message===bi||l.status===401)){const t=this.painter.context.gl;Qr(t,!1),this._logoControl instanceof Wl&&this._logoControl._updateLogo(),t&&t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT|t.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new a.y(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/")))}})),uc(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,(()=>{}))}_postStyleLoadEvent(){this.style.globalId&&hc(this._requestManager._customAccessToken,{map:this,style:this.style.globalId,importedStyles:this.style.getImportGlobalIds()})}_postStyleWithAppearanceEvent(){this.style.globalId&&this.style.hasAppearances()&&Ri(this._requestManager._customAccessToken)}_postAddingAppearancesToStyleEvent(){Hr(this._requestManager._customAccessToken)}_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&&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),To.delete(this.painter.context.gl),ca.remove(),Co.remove(),this._removed=!0,this.fire(new a.z("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(l){this._renderNextFrame=this._renderNextFrame||l,this.style&&!this._frame&&(this._frame=a.o.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 a.bw(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._update())}get showParseStatus(){return!!this._showParseStatus}set showParseStatus(l){this._showParseStatus!==l&&(this._showParseStatus=l,this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(l){this._showTerrainWireframe!==l&&(this._showTerrainWireframe=l,this._update())}get showLayers2DWireframe(){return!!this._showLayers2DWireframe}set showLayers2DWireframe(l){this._showLayers2DWireframe!==l&&(this._showLayers2DWireframe=l,this._update())}get showLayers3DWireframe(){return!!this._showLayers3DWireframe}set showLayers3DWireframe(l){this._showLayers3DWireframe!==l&&(this._showLayers3DWireframe=l,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._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(l){this._showCollisionBoxes!==l&&(this._showCollisionBoxes=l,this.style&&l?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(l){this._showOverdrawInspector!==l&&(this._showOverdrawInspector=l,this._update())}get repaint(){return!!this._repaint}set repaint(l){this._repaint!==l&&(this._repaint=l,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,l&&this._update())}_setCacheLimits(l,t){a.f4(l,t)}get version(){return Yr}},NavigationControl:class{constructor(l={}){this.options=Object.assign({},Mm,l),this._container=Ei("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(t=>t.preventDefault())),this.options.showZoom&&(a.aY(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",(t=>{this._map&&this._map.zoomIn({},{originalEvent:t})})),Ei("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})})),Ei("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(a.aY(["_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=Ei("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 Cm(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=Ei("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 a.E{constructor(l={}){super();const t=navigator.geolocation;this.options=Object.assign({geolocation:t},Pm,l),a.aY(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=yu(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(l){return this._map=l,this._container=Ei("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 a.z("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 a.z("geolocate",Object.assign({coords:l.coords,timestamp:l.timestamp},l.toJSON?{toJSON:l.toJSON.bind(l)}:{}))),this._finish()}}_updateCamera(l){const t=new a.aT(l.coords.longitude,l.coords.latitude),o=l.coords.accuracy,c=this._map.getBearing(),d=Object.assign({bearing:c},this.options.fitBoundsOptions);this._map.fitBounds(t.toBounds(o),d,{geolocateSource:!0})}_updateMarker(l){if(l){const t=new a.aT(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=a.cf(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 a.z("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=Ei("button","mapboxgl-ctrl-geolocate",this._container),Ei("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",l===!1){a.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=Ei("div","mapboxgl-user-location"),this._dotElement.appendChild(Ei("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(Ei("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new zu({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=Ei("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new zu({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 a.z("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 a.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 a.z("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 a.z("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 a.z("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:Xl,ScaleControl:class{constructor(l={}){this.options=Object.assign({},Ks,l),a.aY(["_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 T=Math.pow(10,Math.ceil(-Math.log(x)/Math.LN10));return Math.round(x*T)/T})(y),m*y})(t),d=c/t;this._container.innerHTML=o!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:o}).format(c):`${c}&nbsp;${sd[o]}`,this._container.style.width=l*d+"px"}))}onAdd(l){return this._map=l,this._language=l.getLanguage(),this._container=Ei("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:a.w("Full screen control 'container' must be a DOM element.")),a.aY(["_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=Ei("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",a.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=Ei("button","mapboxgl-ctrl-fullscreen",this._controlContainer);Ei("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()}},IndoorControl:Ys,Popup:class extends a.E{constructor(l){super(),this.options=Object.assign(Object.create($o),l),this._altitude=this.options.altitude,a.aY(["_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 a.z("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 a.z("close")),this}getLngLat(){return this._lngLat}setLngLat(l){this._lngLat=a.aT.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=Ei("div","mapboxgl-popup-content",this._container||void 0);if(t.appendChild(l),this.options.closeButton){const o=this._closeButton=Ei("button","mapboxgl-popup-close-button",t);o.type="button",o.setAttribute("aria-label","Close popup"),o.innerHTML='<span aria-hidden="true">&#215;</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=Ei("div","mapboxgl-popup",t.getContainer()),this._tip=Ei("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=ad(this._lngLat,this._pos,t.transform)),!this._trackPointer||l){const d=this._pos=this._trackPointer&&l instanceof a.P?l:t.project(this._lngLat,this._altitude),p=ys(this.options.offset),m=this._anchor=this._getAnchor(p.y),y=ys(this.options.offset,m),x=d.add(y).round();t._requestDomTask((()=>{this._container&&m&&(this._container.style.transform=`${Xr[m]} translate(${x.x}px,${x.y}px)`)}))}if(!this._marker&&t._showingGlobe()){const d=a.f5(t.transform,this._lngLat)?0:1;this._setOpacity(d)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const l=this._container.querySelector(Zo);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:zu,Style:Go,LngLat:a.aT,LngLatBounds:a.aI,Point:a.P,MercatorCoordinate:a.ae,FreeCameraOptions:so,Evented:a.E,config:a.e,prewarm:a.f9,clearPrewarmedResources:a.f8,get accessToken(){return a.e.ACCESS_TOKEN},set accessToken(l){a.e.ACCESS_TOKEN=l},get baseApiUrl(){return a.e.API_URL},set baseApiUrl(l){a.e.API_URL=l},get workerCount(){return a.fi.workerCount},set workerCount(l){a.fi.workerCount=l},get maxParallelImageRequests(){return a.e.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(l){a.e.MAX_PARALLEL_IMAGE_REQUESTS=l},clearStorage(l){a.fh(l)},get workerUrl(){return a.fg.workerUrl},set workerUrl(l){a.fg.workerUrl=l},get workerClass(){return a.fg.workerClass},set workerClass(l){a.fg.workerClass=l},get workerParams(){return a.fg.workerParams},set workerParams(l){a.fg.workerParams=l},get dracoUrl(){return a.ff()},set dracoUrl(l){a.fe(l)},get meshoptUrl(){return a.fd()},set meshoptUrl(l){a.fc(l)},setNow:a.o.setNow,restoreNow:a.o.restoreNow}}));var W0=Va;return W0}))})(Wp,Wp.exports)),Wp.exports}var X0=Ow();const Vw=Fw.Cn(X0),Uw=Bw({__proto__:null,default:Vw},[X0]);exports.m=Uw;