UNPKG

mapbox-gl

Version:
1 lines 714 kB
var t=1e-6,e="undefined"!=typeof Float32Array?Float32Array:Array;function r(){var t=new e(4);return e!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t}function n(t,e){var r=e[0],n=e[1],i=e[2],s=e[3],a=r*s-i*n;return a?(t[0]=s*(a=1/a),t[1]=-n*a,t[2]=-i*a,t[3]=r*a,t):null}function i(t,e,r){var n=e[0],i=e[1],s=e[2],a=e[3],o=Math.sin(r),l=Math.cos(r);return t[0]=n*l+s*o,t[1]=i*l+a*o,t[2]=n*-o+s*l,t[3]=i*-o+a*l,t}function s(){var t=new e(9);return e!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function o(t,e){var r=e[0],n=e[1],i=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8],h=c*a-o*u,p=-c*s+o*l,d=u*s-a*l,f=r*h+n*p+i*d;return f?(t[0]=h*(f=1/f),t[1]=(-c*n+i*u)*f,t[2]=(o*n-i*a)*f,t[3]=p*f,t[4]=(c*r-i*l)*f,t[5]=(-o*r+i*s)*f,t[6]=d*f,t[7]=(-u*r+n*l)*f,t[8]=(a*r-n*s)*f,t):null}function l(t,e){var r=e[0],n=e[1],i=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8];return t[0]=a*c-o*u,t[1]=i*u-n*c,t[2]=n*o-i*a,t[3]=o*l-s*c,t[4]=r*c-i*l,t[5]=i*s-r*o,t[6]=s*u-a*l,t[7]=n*l-r*u,t[8]=r*a-n*s,t}function u(t,e,r){var n=e[0],i=e[1],s=e[2],a=e[3],o=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=r[0],d=r[1],f=r[2],m=r[3],y=r[4],g=r[5],x=r[6],v=r[7],b=r[8];return t[0]=p*n+d*a+f*u,t[1]=p*i+d*o+f*c,t[2]=p*s+d*l+f*h,t[3]=m*n+y*a+g*u,t[4]=m*i+y*o+g*c,t[5]=m*s+y*l+g*h,t[6]=x*n+v*a+b*u,t[7]=x*i+v*o+b*c,t[8]=x*s+v*l+b*h,t}function c(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function h(){var t=new e(16);return e!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function p(t){var r=new e(16);return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r[6]=t[6],r[7]=t[7],r[8]=t[8],r[9]=t[9],r[10]=t[10],r[11]=t[11],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15],r}function d(t,r,n,i,s,a,o,l,u,c,h,p,d,f,m,y){var g=new e(16);return g[0]=t,g[1]=r,g[2]=n,g[3]=i,g[4]=s,g[5]=a,g[6]=o,g[7]=l,g[8]=u,g[9]=c,g[10]=h,g[11]=p,g[12]=d,g[13]=f,g[14]=m,g[15]=y,g}function f(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function m(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],s=e[6],a=e[7],o=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=s,t[11]=e[14],t[12]=i,t[13]=a,t[14]=o}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function y(t,e){var r=e[0],n=e[1],i=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8],h=e[9],p=e[10],d=e[11],f=e[12],m=e[13],y=e[14],g=e[15],x=r*o-n*a,v=r*l-i*a,b=r*u-s*a,w=n*l-i*o,_=n*u-s*o,A=i*u-s*l,I=c*m-h*f,M=c*y-p*f,S=c*g-d*f,P=h*y-p*m,k=h*g-d*m,B=p*g-d*y,z=x*B-v*k+b*P+w*S-_*M+A*I;return z?(t[0]=(o*B-l*k+u*P)*(z=1/z),t[1]=(i*k-n*B-s*P)*z,t[2]=(m*A-y*_+g*w)*z,t[3]=(p*_-h*A-d*w)*z,t[4]=(l*S-a*B-u*M)*z,t[5]=(r*B-i*S+s*M)*z,t[6]=(y*b-f*A-g*v)*z,t[7]=(c*A-p*b+d*v)*z,t[8]=(a*k-o*S+u*I)*z,t[9]=(n*S-r*k-s*I)*z,t[10]=(f*_-m*b+g*x)*z,t[11]=(h*b-c*_-d*x)*z,t[12]=(o*M-a*P-l*I)*z,t[13]=(r*P-n*M+i*I)*z,t[14]=(m*v-f*w-y*x)*z,t[15]=(c*w-h*v+p*x)*z,t):null}function g(t,e,r){var n=e[0],i=e[1],s=e[2],a=e[3],o=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=e[9],d=e[10],f=e[11],m=e[12],y=e[13],g=e[14],x=e[15],v=r[0],b=r[1],w=r[2],_=r[3];return t[0]=v*n+b*o+w*h+_*m,t[1]=v*i+b*l+w*p+_*y,t[2]=v*s+b*u+w*d+_*g,t[3]=v*a+b*c+w*f+_*x,t[4]=(v=r[4])*n+(b=r[5])*o+(w=r[6])*h+(_=r[7])*m,t[5]=v*i+b*l+w*p+_*y,t[6]=v*s+b*u+w*d+_*g,t[7]=v*a+b*c+w*f+_*x,t[8]=(v=r[8])*n+(b=r[9])*o+(w=r[10])*h+(_=r[11])*m,t[9]=v*i+b*l+w*p+_*y,t[10]=v*s+b*u+w*d+_*g,t[11]=v*a+b*c+w*f+_*x,t[12]=(v=r[12])*n+(b=r[13])*o+(w=r[14])*h+(_=r[15])*m,t[13]=v*i+b*l+w*p+_*y,t[14]=v*s+b*u+w*d+_*g,t[15]=v*a+b*c+w*f+_*x,t}function x(t,e,r){var n,i,s,a,o,l,u,c,h,p,d,f,m=r[0],y=r[1],g=r[2];return e===t?(t[12]=e[0]*m+e[4]*y+e[8]*g+e[12],t[13]=e[1]*m+e[5]*y+e[9]*g+e[13],t[14]=e[2]*m+e[6]*y+e[10]*g+e[14],t[15]=e[3]*m+e[7]*y+e[11]*g+e[15]):(i=e[1],s=e[2],a=e[3],o=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=e[9],d=e[10],f=e[11],t[0]=n=e[0],t[1]=i,t[2]=s,t[3]=a,t[4]=o,t[5]=l,t[6]=u,t[7]=c,t[8]=h,t[9]=p,t[10]=d,t[11]=f,t[12]=n*m+o*y+h*g+e[12],t[13]=i*m+l*y+p*g+e[13],t[14]=s*m+u*y+d*g+e[14],t[15]=a*m+c*y+f*g+e[15]),t}function v(t,e,r){var n=r[0],i=r[1],s=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function b(t,e,r){var n=Math.sin(r),i=Math.cos(r),s=e[4],a=e[5],o=e[6],l=e[7],u=e[8],c=e[9],h=e[10],p=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=s*i+u*n,t[5]=a*i+c*n,t[6]=o*i+h*n,t[7]=l*i+p*n,t[8]=u*i-s*n,t[9]=c*i-a*n,t[10]=h*i-o*n,t[11]=p*i-l*n,t}function w(t,e,r){var n=Math.sin(r),i=Math.cos(r),s=e[0],a=e[1],o=e[2],l=e[3],u=e[8],c=e[9],h=e[10],p=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*i-u*n,t[1]=a*i-c*n,t[2]=o*i-h*n,t[3]=l*i-p*n,t[8]=s*n+u*i,t[9]=a*n+c*i,t[10]=o*n+h*i,t[11]=l*n+p*i,t}function _(t,e,r){var n=Math.sin(r),i=Math.cos(r),s=e[0],a=e[1],o=e[2],l=e[3],u=e[4],c=e[5],h=e[6],p=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*i+u*n,t[1]=a*i+c*n,t[2]=o*i+h*n,t[3]=l*i+p*n,t[4]=u*i-s*n,t[5]=c*i-a*n,t[6]=h*i-o*n,t[7]=p*i-l*n,t}function A(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function I(e,r,n){var i,s,a,o=n[0],l=n[1],u=n[2],c=Math.sqrt(o*o+l*l+u*u);return c<t?null:(o*=c=1/c,l*=c,u*=c,i=Math.sin(r),s=Math.cos(r),e[0]=o*o*(a=1-s)+s,e[1]=l*o*a+u*i,e[2]=u*o*a-l*i,e[3]=0,e[4]=o*l*a-u*i,e[5]=l*l*a+s,e[6]=u*l*a+o*i,e[7]=0,e[8]=o*u*a+l*i,e[9]=l*u*a-o*i,e[10]=u*u*a+s,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function M(t,e){var r=e[0],n=e[1],i=e[2],s=e[4],a=e[5],o=e[6],l=e[8],u=e[9],c=e[10];return t[0]=Math.sqrt(r*r+n*n+i*i),t[1]=Math.sqrt(s*s+a*a+o*o),t[2]=Math.sqrt(l*l+u*u+c*c),t}function S(t,r){var n=new e(3);M(n,r);var i=1/n[0],s=1/n[1],a=1/n[2],o=r[0]*i,l=r[1]*s,u=r[2]*a,c=r[4]*i,h=r[5]*s,p=r[6]*a,d=r[8]*i,f=r[9]*s,m=r[10]*a,y=o+h+m,g=0;return y>0?(g=2*Math.sqrt(y+1),t[3]=.25*g,t[0]=(p-f)/g,t[1]=(d-u)/g,t[2]=(l-c)/g):o>h&&o>m?(g=2*Math.sqrt(1+o-h-m),t[3]=(p-f)/g,t[0]=.25*g,t[1]=(l+c)/g,t[2]=(d+u)/g):h>m?(g=2*Math.sqrt(1+h-o-m),t[3]=(d-u)/g,t[0]=(l+c)/g,t[1]=.25*g,t[2]=(p+f)/g):(g=2*Math.sqrt(1+m-o-h),t[3]=(l-c)/g,t[0]=(d+u)/g,t[1]=(p+f)/g,t[2]=.25*g),t}function P(t,e){var r=e[0],n=e[1],i=e[2],s=e[3],a=r+r,o=n+n,l=i+i,u=r*a,c=n*a,h=n*o,p=i*a,d=i*o,f=i*l,m=s*a,y=s*o,g=s*l;return t[0]=1-h-f,t[1]=c+g,t[2]=p-y,t[3]=0,t[4]=c-g,t[5]=1-u-f,t[6]=d+m,t[7]=0,t[8]=p+y,t[9]=d-m,t[10]=1-u-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}var k=function(t,e,r,n,i){var s=1/Math.tan(e/2);if(t[0]=s/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0){var a=1/(n-i);t[10]=(i+n)*a,t[14]=2*i*n*a}else t[10]=-1,t[14]=-2*n;return t},B=function(t,e,r,n,i,s,a){var o=1/(e-r),l=1/(n-i),u=1/(s-a);return t[0]=-2*o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*o,t[13]=(i+n)*l,t[14]=(a+s)*u,t[15]=1,t},z=g;function T(){var t=new e(3);return e!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function E(t){var r=new e(3);return r[0]=t[0],r[1]=t[1],r[2]=t[2],r}function V(t){var e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}function F(t,r,n){var i=new e(3);return i[0]=t,i[1]=r,i[2]=n,i}function C(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}function D(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}function R(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}function L(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}function O(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}function U(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}function N(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}function j(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}function $(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}function G(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}function q(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}function H(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function X(t,e){var r=e[0],n=e[1],i=e[2],s=r*r+n*n+i*i;return s>0&&(s=1/Math.sqrt(s)),t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t}function Z(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function W(t,e,r){var n=e[0],i=e[1],s=e[2],a=r[0],o=r[1],l=r[2];return t[0]=i*l-s*o,t[1]=s*a-n*l,t[2]=n*o-i*a,t}function Y(t,e,r,n){var i=e[0],s=e[1],a=e[2];return t[0]=i+n*(r[0]-i),t[1]=s+n*(r[1]-s),t[2]=a+n*(r[2]-a),t}function K(t,e,r){var n=e[0],i=e[1],s=e[2],a=r[3]*n+r[7]*i+r[11]*s+r[15];return t[0]=(r[0]*n+r[4]*i+r[8]*s+r[12])/(a=a||1),t[1]=(r[1]*n+r[5]*i+r[9]*s+r[13])/a,t[2]=(r[2]*n+r[6]*i+r[10]*s+r[14])/a,t}function J(t,e,r){var n=e[0],i=e[1],s=e[2];return t[0]=n*r[0]+i*r[3]+s*r[6],t[1]=n*r[1]+i*r[4]+s*r[7],t[2]=n*r[2]+i*r[5]+s*r[8],t}function Q(t,e,r){var n=r[0],i=r[1],s=r[2],a=r[3],o=e[0],l=e[1],u=e[2],c=i*u-s*l,h=s*o-n*u,p=n*l-i*o;return t[0]=o+a*(c+=c)+i*(p+=p)-s*(h+=h),t[1]=l+a*h+s*c-n*p,t[2]=u+a*p+n*h-i*c,t}function tt(t){return t[0]=0,t[1]=0,t[2]=0,t}function et(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}var rt=R,nt=L,it=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t},st=V;function at(){var t=new e(4);return e!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function ot(t,r,n,i){var s=new e(4);return s[0]=t,s[1]=r,s[2]=n,s[3]=i,s}function lt(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}function ut(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}function ct(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}function ht(t,e){var r=e[0],n=e[1],i=e[2],s=e[3],a=r*r+n*n+i*i+s*s;return a>0&&(a=1/Math.sqrt(a)),t[0]=r*a,t[1]=n*a,t[2]=i*a,t[3]=s*a,t}function pt(t,e,r,n){var i=e[0],s=e[1],a=e[2],o=e[3];return t[0]=i+n*(r[0]-i),t[1]=s+n*(r[1]-s),t[2]=a+n*(r[2]-a),t[3]=o+n*(r[3]-o),t}function dt(t,e,r){var n=e[0],i=e[1],s=e[2],a=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*s+r[12]*a,t[1]=r[1]*n+r[5]*i+r[9]*s+r[13]*a,t[2]=r[2]*n+r[6]*i+r[10]*s+r[14]*a,t[3]=r[3]*n+r[7]*i+r[11]*s+r[15]*a,t}function ft(){var t=new e(4);return e!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function mt(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function yt(e,r){var n=2*Math.acos(r[3]),i=Math.sin(n/2);return i>t?(e[0]=r[0]/i,e[1]=r[1]/i,e[2]=r[2]/i):(e[0]=1,e[1]=0,e[2]=0),n}function gt(t,e,r){r*=.5;var n=e[0],i=e[1],s=e[2],a=e[3],o=Math.sin(r),l=Math.cos(r);return t[0]=n*l+a*o,t[1]=i*l+s*o,t[2]=s*l-i*o,t[3]=a*l-n*o,t}function xt(t,e,r){r*=.5;var n=e[0],i=e[1],s=e[2],a=e[3],o=Math.sin(r),l=Math.cos(r);return t[0]=n*l-s*o,t[1]=i*l+a*o,t[2]=s*l+n*o,t[3]=a*l-i*o,t}function vt(t,e,r){r*=.5;var n=e[0],i=e[1],s=e[2],a=e[3],o=Math.sin(r),l=Math.cos(r);return t[0]=n*l+i*o,t[1]=i*l-n*o,t[2]=s*l+a*o,t[3]=a*l-s*o,t}function bt(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}T(),at();var wt,_t,At,It=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)},Mt=ht,St=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},Pt=(wt=T(),_t=F(1,0,0),At=F(0,1,0),function(t,e,r){var n=Z(e,r);return n<-.999999?(W(wt,_t,e),st(wt)<1e-6&&W(wt,At,e),X(wt,wt),function(t,e,r){r*=.5;var n=Math.sin(r);t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r)}(t,wt,Math.PI),t):n>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(W(wt,e,r),t[0]=wt[0],t[1]=wt[1],t[2]=wt[2],t[3]=1+n,Mt(t,t))});function kt(){var t=new e(2);return e!=Float32Array&&(t[0]=0,t[1]=0),t}function Bt(t,r){var n=new e(2);return n[0]=t,n[1]=r,n}function zt(t,e,r){return t[0]=e,t[1]=r,t}function Tt(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function Et(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function Vt(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function Ft(t){var e=t[0],r=t[1];return Math.sqrt(e*e+r*r)}function Ct(t,e){var r=e[0],n=e[1],i=r*r+n*n;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t}function Dt(t,e){return t[0]*e[0]+t[1]*e[1]}ft(),ft(),s();var Rt,Lt,Ot=Et;function Ut(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}kt();var Nt=function(){if(Lt)return Rt;function t(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=e,this.p2x=r,this.p2y=n}return Lt=1,Rt=t,t.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,e){if(void 0===e&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(var r=t,n=0;n<8;n++){var i=this.sampleCurveX(r)-t;if(Math.abs(i)<e)return r;var s=this.sampleCurveDerivativeX(r);if(Math.abs(s)<1e-6)break;r-=i/s}var a=0,o=1;for(r=t,n=0;n<20&&(i=this.sampleCurveX(r),!(Math.abs(i-t)<e));n++)t>i?a=r:o=r,r=.5*(o-a)+a;return r},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},Rt}();const jt=Ut(Nt);function $t(t,e){this.x=t,this.y=e}function Gt(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!Gt(t[r],e[r]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==e){if("object"!=typeof e)return!1;if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(!Gt(t[r],e[r]))return!1;return!0}return t===e}$t.prototype={clone(){return new $t(this.x,this.y)},add(t){return this.clone()._add(t)},sub(t){return this.clone()._sub(t)},multByPoint(t){return this.clone()._multByPoint(t)},divByPoint(t){return this.clone()._divByPoint(t)},mult(t){return this.clone()._mult(t)},div(t){return this.clone()._div(t)},rotate(t){return this.clone()._rotate(t)},rotateAround(t,e){return this.clone()._rotateAround(t,e)},matMult(t){return this.clone()._matMult(t)},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(t){return this.x===t.x&&this.y===t.y},dist(t){return Math.sqrt(this.distSqr(t))},distSqr(t){const e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle(){return Math.atan2(this.y,this.x)},angleTo(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith(t){return this.angleWithSep(t.x,t.y)},angleWithSep(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult(t){const e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,this},_add(t){return this.x+=t.x,this.y+=t.y,this},_sub(t){return this.x-=t.x,this.y-=t.y,this},_mult(t){return this.x*=t,this.y*=t,this},_div(t){return this.x/=t,this.y/=t,this},_multByPoint(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint(t){return this.x/=t.x,this.y/=t.y,this},_unit(){return this._div(this.mag()),this},_perp(){const t=this.y;return this.y=this.x,this.x=-t,this},_rotate(t){const e=Math.cos(t),r=Math.sin(t),n=r*this.x+e*this.y;return this.x=e*this.x-r*this.y,this.y=n,this},_rotateAround(t,e){const r=Math.cos(t),n=Math.sin(t),i=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=e.x+r*(this.x-e.x)-n*(this.y-e.y),this.y=i,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:$t},$t.convert=function(t){if(t instanceof $t)return t;if(Array.isArray(t))return new $t(+t[0],+t[1]);if(void 0!==t.x&&void 0!==t.y)return new $t(+t.x,+t.y);throw new Error("Expected [x, y] or {x, y} point format")};const qt=Math.PI/180,Ht=180/Math.PI;function Xt(t){return t*qt}function Zt(t){return t*Ht}const Wt=[[0,0],[1,0],[1,1],[0,1]];function Yt(t){const e=Math.round((t+45+360)%360/90)%4;return Wt[e]}function Kt(t){if(t<=0)return 0;if(t>=1)return 1;const e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Jt(t){let e=1/0,r=1/0,n=-1/0,i=-1/0;for(const s of t)e=Math.min(e,s.x),r=Math.min(r,s.y),n=Math.max(n,s.x),i=Math.max(i,s.y);return{min:new $t(e,r),max:new $t(n,i)}}function Qt(t,e,r){let n=0;for(let r=0;r<2;++r){const i=0;t[r]>i&&(n+=(t[r]-i)*(t[r]-i)),e[r]<i&&(n+=(i-e[r])*(i-e[r]))}return n}function te(t,e,r=0,n=!0){const i=new $t(r,r),s=t.sub(i),a=e.add(i),o=[s,new $t(a.x,s.y),a,new $t(s.x,a.y)];return n&&o.push(s.clone()),o}function ee(t,e){const r=[];for(let n=0;n<t.length;n++){const i=ae(n-1,-1,t.length-1),s=ae(n+1,-1,t.length-1),a=t[n],o=t[s],l=t[i].sub(a).unit(),u=o.sub(a).unit(),c=u.angleWithSep(l.x,l.y),h=l.add(u).unit().mult(-1*e/Math.sin(c/2));r.push(a.add(h))}return r}function re(t,e,r,n){const i=new jt(t,e,r,n);return function(t){return i.solve(t)}}const ne=re(.25,.1,.25,1);function ie(t,e,r){return Math.min(r,Math.max(e,t))}function se(t,e,r){return(r=ie((r-t)/(e-t),0,1))*r*(3-2*r)}function ae(t,e,r){const n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function oe(t,e,r){if(!t.length)return r(null,[]);let n=t.length;const i=new Array(t.length);let s=null;t.forEach(((t,a)=>{e(t,((t,e)=>{t&&(s=t),i[a]=e,0==--n&&r(s,i)}))}))}function le(t,e){const r=[];for(const n in t)n in e||r.push(n);return r}function ue(t,e){const r={};for(let n=0;n<e.length;n++){const i=e[n];i in t&&(r[i]=t[i])}return r}let ce=1;function he(){return ce++}function pe(){return function t(e){return e?(e^Math.random()*(16>>e/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function de(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log2(t)))}function fe(t){return t<=1?1:Math.pow(2,Math.floor(Math.log2(t)))}function me(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function ye(t,e){t.forEach((t=>{e[t]&&(e[t]=e[t].bind(e))}))}function ge(t,e,r){const n={};for(const r in t)n[r]=e.call(this,t[r],r,t);return n}function xe(t,e,r){const n={};for(const r in t)e.call(this,t[r],r,t)&&(n[r]=t[r]);return n}function ve(t){return Array.isArray(t)?t.map(ve):"object"==typeof t&&t?ge(t,ve):t}function be(t,e,r,n,i){return ie((t-e)/(r-e)*(i-n)+n,n,i)}function we(t,e){for(let r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1}const _e={};function Ae(t){_e[t]||("undefined"!=typeof console&&console.warn(t),_e[t]=!0)}function Ie(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function Me(t){let e=0;for(let r,n,i=0,s=t.length,a=s-1;i<s;a=i++)r=t[i],n=t[a],e+=(n.x-r.x)*(r.y+n.y);return e}function Se([t,e,r]){const n=Xt(e+90),i=Xt(r);return{x:t*Math.cos(n)*Math.sin(i),y:t*Math.sin(n)*Math.sin(i),z:t*Math.cos(i),azimuthal:e,polar:r}}function Pe(t,e,r){const n=Math.sqrt(t*t+e*e+r*r),i=n>0?Math.acos(r/n)*Ht:0;let s=0!==t||0!==e?Math.atan2(-e,-t)*Ht+90:0;return s<0&&(s+=360),[n,s,i]}function ke(t){return("undefined"!=typeof self||void 0!==t)&&"undefined"!=typeof WorkerGlobalScope&&(void 0!==t?t:self)instanceof WorkerGlobalScope}function Be(t){const e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((t,r,n,i)=>{const s=n||i;return e[r]=!s||s.toLowerCase(),""})),e["max-age"]){const t=parseInt(e["max-age"],10);isNaN(t)?delete e["max-age"]:e["max-age"]=t}return e}function ze(t){return t?{cacheControl:t.get("Cache-Control"),expires:t.get("Expires")}:{cacheControl:void 0,expires:void 0}}let Te=null;function Ee(t){const e=t.navigator?t.navigator.userAgent:null;return!!function(t){if(null==Te){const e=t.navigator?t.navigator.userAgent:null;Te=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return Te}(t)&&!(!e||!(e.match("Version/15.4")||e.match("Version/15.5")||e.match(/CPU (OS|iPhone OS) (15_4|15_5) like Mac OS X/)))}function Ve(){return!!document.fullscreenElement||!!document.webkitFullscreenElement}function Fe(t){try{const e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}function Ce(t){return btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,((t,e)=>String.fromCharCode(Number("0x"+e)))))}function De(t){return decodeURIComponent(atob(t).split("").map((t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2))).join(""))}function Re(t,e){return[t[4*e],t[4*e+1],t[4*e+2],t[4*e+3]]}function Le(t,e,r){t[4*e+0]=r[0],t[4*e+1]=r[1],t[4*e+2]=r[2],t[4*e+3]=r[3]}function Oe(t,e){return[Math.pow(t[0],2.2)*e,Math.pow(t[1],2.2)*e,Math.pow(t[2],2.2)*e]}function Ue(t){return[Math.pow(t[0],1/2.2),Math.pow(t[1],1/2.2),Math.pow(t[2],1/2.2)]}function Ne(t,e,r,n){for(;e<r;){const i=e+r>>1;t[i]<n?e=i+1:r=i}return e}function je(t,e,r,n){for(;e<r;){const i=e+r>>1;t[i]<=n?e=i+1:r=i}return e}function $e(t){return t>0?1/(1.001-t):1+t}function Ge(t){return t>0?1-1/(1.001-t):-t}function qe(t,e,r){return(t-e.min)*(r.max-r.min)/(e.max-e.min)+r.min}function He(t){return t*t*t*t*t}const Xe={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(!Xe.API_URL)return null;try{const t=new URL(Xe.API_URL);return"api.mapbox.cn"===t.hostname?"https://events.mapbox.cn/events/v2":"api.mapbox.com"===t.hostname?"https://events.mapbox.com/events/v2":null}catch(t){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 Ze(t){return Xe.API_URL_REGEX.test(t)}function We(t){return 0===t.indexOf("mapbox:")}function Ye(t){return Xe.API_CDN_URL_REGEX.test(t)}function Ke(t){return Xe.API_SPRITE_REGEX.test(t)}function Je(t){return Xe.API_STYLE_REGEX.test(t)&&!Ke(t)}function Qe(t){return Xe.API_TILEJSON_REGEX.test(t)}function tr(t){return Xe.API_FONTS_REGEX.test(t)}let er,rr,nr,ir,sr,ar;function or(){return null==er&&(er=self.OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof self.createImageBitmap),er}const lr={now:()=>void 0!==ir?ir:performance.now(),setNow(t){ir=t},restoreNow(){ir=void 0},frame(t){const e=requestAnimationFrame(t);return{cancel:()=>cancelAnimationFrame(e)}},getImageData(t,e=0){const{width:r,height:n}=t;sr||(sr=document.createElement("canvas"));const i=sr.getContext("2d",{willReadFrequently:!0});if(!i)throw new Error("failed to create canvas 2d context");return(r>sr.width||n>sr.height)&&(sr.width=r,sr.height=n),i.clearRect(-e,-e,r+2*e,n+2*e),i.drawImage(t,0,0,r,n),i.getImageData(-e,-e,r+2*e,n+2*e)},resolveURL:t=>(rr||(rr=document.createElement("a")),rr.href=t,rr.href),get devicePixelRatio(){return window.devicePixelRatio},get prefersReducedMotion(){return!!window.matchMedia&&(null==nr&&(nr=window.matchMedia("(prefers-reduced-motion: reduce)")),nr.matches)},hasCanvasFingerprintNoise(){if(void 0!==ar)return ar;if(!or())return ar=!1,!1;const t=new OffscreenCanvas(85,1),e=t.getContext("2d",{willReadFrequently:!0});let r=0;for(let n=0;n<t.width;++n)e.fillStyle=`rgba(${r++},${r++},${r++}, 255)`,e.fillRect(n,0,1,1);const n=e.getImageData(0,0,t.width,t.height);r=0;for(let t=0;t<n.data.length;++t)if(t%4!=3&&r++!==n.data[t])return ar=!0,!0;return ar=!1,!1}};function ur(t,e){const r=t.indexOf("?");if(r<0)return`${t}?${new URLSearchParams(e).toString()}`;const n=new URLSearchParams(t.slice(r));for(const t in e)n.set(t,e[t]);return`${t.slice(0,r)}?${n.toString()}`}function cr(t,e={persistentParams:[]}){const r=t.indexOf("?");if(r<0)return t;const n=new URLSearchParams,i=new URLSearchParams(t.slice(r));for(const t of e.persistentParams){const e=i.get(t);e&&n.set(t,e)}const s=n.toString();return`${t.slice(0,r)}${s.length>0?`?${s}`:""}`}const hr="mapbox-tiles";let pr=500,dr=50;const fr=["language","worldview","jobid"];let mr,yr;function gr(){try{return caches}catch(t){}}function xr(){const t=gr();t&&null==mr&&(mr=t.open(hr))}let vr=1/0;function br(t){vr++,vr>dr&&(t.getActor().send("enforceCacheSizeLimit",pr),vr=0)}function wr(t){xr(),null!=mr&&mr.then((e=>{e.keys().then((r=>{for(let n=0;n<r.length-t;n++)e.delete(r[n]).catch((t=>Ae(t.message)))})).catch((t=>Ae(t.message)))})).catch((t=>Ae(t.message)))}function _r(t){const e=gr();if(!e)return;const r=e.delete(hr);t&&r.then((()=>t())).catch(t)}function Ar(t,e){pr=t,dr=e}const Ir={supported:!1,testSupport:function(t){!Pr&&Sr&&(kr?zr(t):Mr=t)}};let Mr,Sr,Pr=!1,kr=!1;const Br="undefined"!=typeof self?self:{};function zr(t){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,Sr),t.isContextLost())return;Ir.supported=!0}catch(t){}t.deleteTexture(e),Pr=!0}Br.document&&(Sr=Br.document.createElement("img"),Sr.onload=function(){Mr&&zr(Mr),Mr=null,kr=!0},Sr.onerror=function(){Pr=!0,Mr=null},Sr.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const Tr={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Iconset:"Iconset",Image:"Image",Model:"Model"};"function"==typeof Object.freeze&&Object.freeze(Tr);class Er extends Error{constructor(t,e,r){401===e&&Ze(r)&&(t+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(t),this.status=e,this.url=r}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const Vr=ke()?()=>self.worker.referrer:()=>("blob:"===location.protocol?parent:self).location.href;const Fr=function(t,e){if(!(/^file:/.test(r=t.url)||/^file:/.test(Vr())&&!/^\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&Request.prototype.hasOwnProperty("signal"))return function(t,e){const r=new AbortController,n=new Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:Vr(),referrerPolicy:t.referrerPolicy,signal:r.signal});let i=!1,s=!1;const a=(o=n.url).indexOf("sku=")>0&&Ze(o);var o;"json"===t.type&&n.headers.set("Accept","application/json");const l=(r,i,o)=>{if(s)return;if(r&&"SecurityError"!==r.message&&Ae(r.toString()),i&&o)return u(i);const l=Date.now();fetch(n).then((r=>{if(r.ok){const t=a?r.clone():null;return u(r,t,l)}return e(new Er(r.statusText,r.status,t.url))})).catch((r=>{"AbortError"!==r.name&&e(new Error(`${r.message} ${t.url}`))}))},u=(r,a,o)=>{("arrayBuffer"===t.type?r.arrayBuffer():"json"===t.type?r.json():r.text()).then((t=>{s||(a&&o&&function(t,e,r){if(xr(),null==mr)return;const n=Be(e.headers.get("Cache-Control")||"");if(n["no-store"])return;const i={status:e.status,statusText:e.statusText,headers:new Headers};e.headers.forEach(((t,e)=>i.headers.set(e,t))),n["max-age"]&&i.headers.set("Expires",new Date(r+1e3*n["max-age"]).toUTCString());const s=i.headers.get("Expires");if(!s)return;if(new Date(s).getTime()-r<42e4)return;let a=cr(t.url,{persistentParams:fr});if(206===e.status){const e=t.headers.get("Range");if(!e)return;i.status=200,a=ur(a,{range:e})}!function(t,e){if(void 0===yr)try{new Response(new ReadableStream),yr=!0}catch(t){yr=!1}yr?e(t.body):t.blob().then(e).catch((t=>Ae(t.message)))}(e,(t=>{const r=new Response(200!==(n=e.status)&&404!==n&&[101,103,204,205,304].includes(n)?null:t,i);var n;xr(),null!=mr&&mr.then((t=>t.put(a,r))).catch((t=>Ae(t.message)))}))}(n,a,o),i=!0,e(null,t,r.headers))})).catch((t=>{s||e(new Error(t.message))}))};return a?function(t,e){if(xr(),null==mr)return e(null);mr.then((r=>{let n=cr(t.url,{persistentParams:fr});const i=t.headers.get("Range");i&&(n=ur(n,{range:i})),r.match(n).then((t=>{const i=function(t){if(!t)return!1;const e=new Date(t.headers.get("Expires")||0),r=Be(t.headers.get("Cache-Control")||"");return Number(e)>Date.now()&&!r["no-cache"]}(t);r.delete(n).catch(e),i&&r.put(n,t.clone()).catch(e),e(null,t,i)})).catch(e)})).catch(e)}(n,l):l(null,null),{cancel:()=>{s=!0,i||r.abort()}}}(t,e);if(ke(self)&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var r;return function(t,e){const r=new XMLHttpRequest;r.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(r.responseType="arraybuffer");for(const e in t.headers)r.setRequestHeader(e,t.headers[e]);return"json"===t.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===t.credentials,r.onerror=()=>{e(new Error(r.statusText))},r.onload=()=>{if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){let n=r.response;if("json"===t.type)try{n=JSON.parse(r.response)}catch(t){return e(t)}const i=new Headers;r.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const e=t.split(": "),r=e.shift(),n=e.join(": ");i.append(r,n)})),e(null,n,i)}else e(new Er(r.statusText,r.status,t.url))},r.send(t.body),{cancel:()=>r.abort()}}(t,e)},Cr=function(t,e){return Fr(Object.assign(t,{type:"json"}),e)},Dr=function(t,e){return Fr(Object.assign(t,{type:"arrayBuffer"}),e)},Rr=function(t,e){return Fr(Object.assign(t,{method:"POST"}),e)},Lr=function(t,e){return Fr(Object.assign(t,{method:"GET"}),e)};function Or(t){const e=document.createElement("a");return e.href=t,e.protocol===location.protocol&&e.host===location.host}const Ur="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let Nr,jr;Nr=[],jr=0;const $r=function(t,e){if(Ir.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),jr>=Xe.MAX_PARALLEL_IMAGE_REQUESTS){const r={requestParameters:t,callback:e,cancelled:!1,cancel(){this.cancelled=!0}};return Nr.push(r),r}jr++;let r=!1;const n=()=>{if(!r)for(r=!0,jr--;Nr.length&&jr<Xe.MAX_PARALLEL_IMAGE_REQUESTS;){const t=Nr.shift(),{requestParameters:e,callback:r,cancelled:n}=t;n||(t.cancel=$r(e,r).cancel)}},i=Dr(t,((t,r,i)=>{n(),t?e(t):r&&(self.createImageBitmap?function(t,e){const r=new Blob([new Uint8Array(t)],{type:"image/png"});createImageBitmap(r).then((t=>{e(null,t)})).catch((t=>{e(new Error(`Could not load image because of ${t.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))}))}(r,((t,r)=>e(t,r,i))):function(t,e){const r=new Image;r.onload=()=>{e(null,r),URL.revokeObjectURL(r.src),r.onload=null,requestAnimationFrame((()=>{r.src=Ur}))},r.onerror=()=>e(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 n=new Blob([new Uint8Array(t)],{type:"image/png"});r.src=t.byteLength?URL.createObjectURL(n):Ur}(r,((t,r)=>e(t,r,i))))}));return{cancel:()=>{i.cancel(),n()}}},Gr=function(t,e){const r=document.createElement("video");r.muted=!0,r.onloadstart=function(){e(null,r)};for(let e=0;e<t.length;e++){const n=document.createElement("source");Or(t[e])||(r.crossOrigin="Anonymous"),n.src=t[e],r.appendChild(n)}return{cancel:()=>{}}};var qr,Hr,Xr,Zr={exports:{}},Wr={exports:{}},Yr={exports:{}},Kr=function(){if(Xr)return Zr.exports;Xr=1;var t=(qr||(qr=1,Wr.exports=function(t,e){var r,n,i,s,a,o,l,u;for(n=t.length-(r=3&t.length),i=e,a=3432918353,o=461845907,u=0;u<n;)l=255&t.charCodeAt(u)|(255&t.charCodeAt(++u))<<8|(255&t.charCodeAt(++u))<<16|(255&t.charCodeAt(++u))<<24,++u,i=27492+(65535&(s=5*(65535&(i=(i^=l=(65535&(l=(l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(s>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(u+2))<<16;case 2:l^=(255&t.charCodeAt(u+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*o+(((l>>>16)*o&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}),Wr.exports),e=(Hr||(Hr=1,Yr.exports=function(t,e){for(var r,n=t.length,i=e^n,s=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(s)|(255&t.charCodeAt(++s))<<8|(255&t.charCodeAt(++s))<<16|(255&t.charCodeAt(++s))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++s;switch(n){case 3:i^=(255&t.charCodeAt(s+2))<<16;case 2:i^=(255&t.charCodeAt(s+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(s)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}),Yr.exports);return Zr.exports=t,Zr.exports.murmur3=t,Zr.exports.murmur2=e,Zr.exports}();const Jr=Ut(Kr);class Qr{constructor(t,...e){Object.assign(this,e[0]||{}),this.type=t}}class tn extends Qr{constructor(t,e={}){super("error",Object.assign({error:t},e))}}function en(t,e,r){r[t]&&-1!==r[t].indexOf(e)||(r[t]=r[t]||[],r[t].push(e))}function rn(t,e,r){if(r&&r[t]){const n=r[t].indexOf(e);-1!==n&&r[t].splice(n,1)}}class nn{on(t,e){return this._listeners=this._listeners||{},en(t,e,this._listeners),this}off(t,e){return rn(t,e,this._listeners),rn(t,e,this._oneTimeListeners),this}once(t,e){return e?(this._oneTimeListeners=this._oneTimeListeners||{},en(t,e,this._oneTimeListeners),this):new Promise((e=>{this.once(t,e)}))}fire(t,e){const r="string"==typeof t?new Qr(t,e):t,n=r.type;if(this.listens(n)){r.target=this;const t=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];for(const e of t)e.call(this,r);const e=this._oneTimeListeners&&this._oneTimeListeners[n]?this._oneTimeListeners[n].slice():[];for(const t of e)rn(n,t,this._oneTimeListeners),t.call(this,r);const i=this._eventedParent;if(i){const t="function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData;Object.assign(r,t),i.fire(r)}}else r instanceof tn&&console.error(r.error);return this}listens(t){return!!(this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t))}setEventedParent(t,e){return this._eventedParent=t,this._eventedParentData=e,this}}class sn{constructor(t){"string"==typeof t?this.name=t:(this.name=t.name,this.iconsetId=t.iconsetId)}static from(t){return new sn(t)}static toString(t){return t.iconsetId?`${t.name}${t.iconsetId}`:t.name}static parse(t){const[e,r]=t.split("");return new sn({name:e,iconsetId:r})}static isEqual(t,e){return t.name===e.name&&t.iconsetId===e.iconsetId}toString(){return sn.toString(this)}serialize(){return{name:this.name,iconsetId:this.iconsetId}}}var an,on={},ln=function(){if(an)return on;an=1;var t={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(t){return(t=Math.round(t))<0?0:t>255?255:t}function r(t){return e("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function n(t){return(e="%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))<0?0:e>1?1:e;var e}function i(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{on.parseCSSColor=function(s){var a,o=s.replace(/ /g,"").toLowerCase();if(o in t)return t[o].slice();if("#"===o[0])return 4===o.length?(a=parseInt(o.substr(1),16))>=0&&a<=4095?[(3840&a)>>4|(3840&a)>>8,240&a|(240&a)>>4,15&a|(15&a)<<4,1]:null:7===o.length&&(a=parseInt(o.substr(1),16))>=0&&a<=16777215?[(16711680&a)>>16,(65280&a)>>8,255&a,1]:null;var l=o.indexOf("("),u=o.indexOf(")");if(-1!==l&&u+1===o.length){var c=o.substr(0,l),h=o.substr(l+1,u-(l+1)).split(","),p=1;switch(c){case"rgba":if(4!==h.length)return null;p=n(h.pop());case"rgb":return 3!==h.length?null:[r(h[0]),r(h[1]),r(h[2]),p];case"hsla":if(4!==h.length)return null;p=n(h.pop());case"hsl":if(3!==h.length)return null;var d=(parseFloat(h[0])%360+360)%360/360,f=n(h[1]),m=n(h[2]),y=m<=.5?m*(f+1):m+f-m*f,g=2*m-y;return[e(255*i(g,y,d+1/3)),e(255*i(g,y,d)),e(255*i(g,y,d-1/3)),p];default:return null}}return null}}catch(t){}return on}();class un{constructor(t,e,r,n=1){this.r=t,this.g=e,this.b=r,this.a=n}static parse(t){if(!t)return;if(t instanceof un)return t;if("string"!=typeof t)return;const e=ln.parseCSSColor(t);return e?new un(e[0]/255,e[1]/255,e[2]/255,e[3]):void 0}toString(){const[t,e,r,n]=[this.r,this.g,this.b,this.a];return`rgba(${Math.round(255*t)},${Math.round(255*e)},${Math.round(255*r)},${n})`}toNonPremultipliedRenderColor(t){const{r:e,g:r,b:n,a:i}=this;return new hn(t,e,r,n,i)}toPremultipliedRenderColor(t){const{r:e,g:r,b:n,a:i}=this;return new pn(t,e*i,r*i,n*i,i)}clone(){return new un(this.r,this.g,this.b,this.a)}}class cn{constructor(t,e,r,n,i,s=!1){if(this.premultiplied=!1,this.premultiplied=s,t){const s=t.image.height,a=s*s;this.premultiplied?(e=0===i?0:e/i*(s-1),r=0===i?0:r/i*(s-1),n=0===i?0:n/i*(s-1)):(e*=s-1,r*=s-1,n*=s-1);const o=Math.floor(e),l=Math.floor(r),u=Math.floor(n),c=Math.ceil(e),h=Math.ceil(r),p=Math.ceil(n),d=e-o,f=r-l,m=n-u,y=t.image.data,g=4*(o+l*a+u*s),x=4*(o+l*a+p*s),v=4*(o+h*a+u*s),b=4*(o+h*a+p*s),w=4*(c+l*a+u*s),_=4*(c+l*a+p*s),A=4*(c+h*a+u*s),I=4*(c+h*a+p*s);if(g<0||I>=y.length)throw new Error("out of range");this.r=dn(dn(dn(y[g],y[x],m),dn(y[v],y[b],m),f),dn(dn(y[w],y[_],m),dn(y[A],y[I],m),f),d)/255*(this.premultiplied?i:1),this.g=dn(dn(dn(y[g+1],y[x+1],m),dn(y[v+1],y[b+1],m),f),dn(dn(y[w+1],y[_+1],m),dn(y[A+1],y[I+1],m),f),d)/255*(this.premultiplied?i:1),this.b=dn(dn(dn(y[g+2],y[x+2],m),dn(y[v+2],y[b+2],m),f),dn(dn(y[w+2],y[_+2],m),dn(y[A+2],y[I+2],m),f),d)/255*(this.premultiplied?i:1),this.a=i}else this.r=e,this.g=r,this.b=n,this.a=i}toArray(){const{r:t,g:e,b:r,a:n}=this;return[255*t,255*e,255*r,n]}toHslaArray(){let{r:t,g:e,b:r,a:n}=this;if(this.premultiplied){if(0===n)return[0,0,0,0];const i=1/n;t*=i,e*=i,r*=i}const i=Math.min(Math.max(t,0),1),s=Math.min(Math.max(e,0),1),a=Math.min(Math.max(r,0),1),o=Math.min(i,s,a),l=Math.max(i,s,a),u=l-o,c=.5*(o+l);if(0===u)return[0,0,100*c,n];const h=c>.5?u/(2-l-o):u/(l+o);let p;switch(l){case i:p=60*((s-a)/u+(s<a?6:0));break;case s:p=60*((a-i)/u+2);break;default:p=60*((i-s)/u+4)}return[p,100*h,100*c,n]}toArray01(){const{r:t,g:e,b:r,a:n}=this;return[t,e,r,n]}toArray01Scaled(t){const{r:e,g:r,b:n}=this;return[e*t,r*t,n*t]}toArray01Linear(){const{r:t,g:e,b:r,a:n}=this;return[Math.pow(t,2.2),Math.pow(e,2.2),Math.pow(r,2.2),n]}}class hn extends cn{constructor(t,e,r,n,i){super(t,e,r,n,i,!1)}}class pn extends cn{constructor(t,e,r,n,i){super(t,e,r,n,i,!0)}}function dn(t,e,r){return t*(1-r)+e*r}function fn(t,e,r){return t.map(((t,n)=>dn(t,e[n],r)))}un.black=new un(0,0,0,1),un.white=new un(1,1,1,1),un.transparent=new un(0,0,0,0),un.red=new un(1,0,0,1),un.blue=new un(0,0,1,1);const mn=Object.freeze(Object.defineProperty({__proto__:null,array:fn,color:function(t,e,r){return new un(dn(t.r,e.r,r),dn(t.g,e.g,r),dn(t.b,e.b,r),dn(t.a,e.a,r))},number:dn},Symbol.toStringTag,{value:"Module"}));class yn extends Error{constructor(t,e){super(e),this.message=e,this.key=t}}class gn{constructor(t,e=[]){this.parent=t,this.bindings={};for(const[t,r]of e)this.bindings[t]=r}concat(t){return new gn(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}const xn={kind:"null"},vn={kind:"number"},bn={kind:"string"},wn={kind:"boolean"},_n={kind:"color"},An={kind:"object"},In={kind:"value"},Mn={kind:"collator"},Sn={kind:"formatted"},Pn={kind:"resolvedImage"};function kn(t,e){return{kind:"array",itemType:t,N:e}}function Bn(t){if("array"===t.kind){const e=Bn(t.itemType);return"number"==typeof t.N?`array<${e}, ${t.N}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}const zn=[xn,vn,bn,wn,_n,Sn,An,kn(In),Pn];function Tn(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Tn(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(const t of zn)if(!Tn(t,e))return null}return`Expected ${Bn(t)} but found ${Bn(e)} instead.`}function En(t,e){return e.some((e=>e.kind===t.kind))}function Vn(t,e){return e.some((e=>"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t))}function Fn(t,e){return"array"===t.kind&&"array"===e.kind?t.N===e.N&&Fn(t.itemType,e.itemType):t.kind===e.kind}class Cn{constructor(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Dn{constructor(t,e,r,n,i){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i}}class Rn{constructor(t){this.sections=t}static fromString(t){return new Rn([new Dn(t,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((t=>0!==t.text.length||!!t.image&&t.image.hasPrimary()))}static factory(t){return t instanceof Rn?t:Rn.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map((t=>t.text)).join("")}serialize(){const t=["format"];for(const e of this.sections){if(e.image){const r=e.image.getPrimary().id.toString();t.push(["image",r]);continue}t.push(e.text);const r={};e.fontStack&&(r["text-font"]=["literal",e.fontStack.split(",")]),e.scale&&(r["font-scale"]=e.scale),e.textColor&&(r["text-color"]=["rgba"].concat(e.textColor.toNonPremultipliedRenderColor(null).toArray())),t.push(r)}return t}}class Ln{constructor(t,e={}){this.id=sn.from(t),this.params=e.params,this.sx=e.sx||1,this.sy=e.sy||1}toString(){return JSON.stringify(this)}static parse(t){let e,r,n,i;try{({id:e,params:r,sx:n,sy:i}=JSON.parse(t)||{})}catch(t){return null}return e?new Ln(e,{params:r,sx:n,sy:i}):null}scaleSelf(t,e=t){return this.sx*=t,this.sy*=e,this}}class On{constructor(t,e,r,n,i=!1){this.primaryId=sn.from(t),this.primaryOptions=e,r&&(this.secondaryId=sn.from(r)),this.secondaryOptions=n,this.available=i}toString(){return this.primaryId&&this.secondaryId?`[${this.primaryId.name},${this.secondaryId.name}]`:this.primaryId.name}hasPrimary(){return!!this.primaryId}getPrimary(){return new Ln(this.primaryId,this.primaryOptions)}hasSecondary(){return!!this.secondaryId}getSecondary(){return this.secondaryId?new Ln(this.secondaryId,this.secondaryOptions):null}static from(t){return"string"==typeof t?On.build({name:t}):t}static build(t,e,r,n){return!t||"object"==typeof t&&!("name"in t)?null:new On(t,r,e,n)}}function Un(t,e,r,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[t,e,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Nn(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof un)return!0;if(t instanceof Cn)return!0;if(t instanceof Rn)return!0;if(t instanceof On)return!0;if(Array.isArray(t)){for(const e of t)if(!Nn(e))return!1;return!0}if("object"==typeof t){for(const e in t)if(!Nn(t[e]))return!1;return!0}return!1}function jn(t){if(null===t)return xn;if("string"==typeof t)return bn;if("boolean"==typeof t)return wn;if("number"==typeof t)return vn;if(t instanceof un)return _n;if(t instanceof Cn)return Mn;if(t instanceof Rn)return Sn;if(t instanceof On)return Pn;if(Array.isArray(t)){const e=t.length;let r;for(const e of t){const t=jn(e);if(r){if(r===t)continue;r=In;break}r=t}return kn(r||In,e)}return An}function $n(t){const e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof Rn||t instanceof On||t instanceof un?t.toString():JSON.stringify(t)}class Gn{constructor(t,e){this.type=t,this.value=e}static parse(t,e){if(2!==t.length)return e.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Nn(t[1]))return e.error("invalid value");const r=t[1];let n=jn(r);const i=e.expectedType;return"array"!==n.kind||0!==n.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(n=i),new Gn(n,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof un?["rgba"].concat(this.value.toNonPremultipliedRenderColor(null).toArray()):this.value instanceof Rn?this.value.serialize():this.value}}class qn{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}}const Hn={string:bn,number:vn,boolean:wn,object:An};class Xn{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let r,n=1;const i=t[0];if("array"===i){let i,s;if(t.length>2){const r=t[1];if("string"!=typeof r||!(r in Hn)||"object"===r)return e.error('The item type argument of "array" must be one of string, number, bool