1 |
- define(["./createTaskProcessorWorker","./when-92c6cf3c","./ComponentDatatype-81047f82","./IndexDatatype-4c0e98b8","./WebGLConstants-71f10989","./Buffer-1d0f8963","./RenderState-94064c70","./Cartesian4-ad128b5d","./WindingOrder-1b9c8a87","./Check-52a7d806","./Math-92c3b5f7","./BoundingRectangle-418864a2","./Cartesian2-6033fa5d","./Cartographic-67e73ef9","./Intersect-b97e930a","./Rectangle-bab7abf0","./Color-45274500","./FeatureDetection-067cb23c"],(function(t,e,r,n,i,o,a,s,u,l,c,p,f,h,y,d,v,m){"use strict";var g=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,l=u>>1,c=-7,p=r?i-1:0,f=r?-1:1,h=t[e+p];for(p+=f,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+t[e+p],p+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+p],p+=f,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=l}return(h?-1:1)*a*Math.pow(2,o-n)},x=function(t,e,r,n,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,p=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,y=n?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+p>=1?f/u:f*Math.pow(2,1-p))*u>=2&&(a++,u/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(e*u-1)*Math.pow(2,i),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;t[r+h]=255&s,h+=y,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[r+h]=255&a,h+=y,a/=256,l-=8);t[r+h-y]|=128*d};function b(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}b.Varint=0,b.Fixed64=1,b.Bytes=2,b.Fixed32=5;var _=4294967296,w=1/_;function S(t){return t.type===b.Bytes?t.readVarint()+t.pos:t.pos+1}function A(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function k(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function I(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function B(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function z(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function V(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function P(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function C(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function F(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function $(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function E(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function O(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function M(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}b.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>3,o=this.pos;this.type=7&n,t(i,e,this),this.pos===o&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=E(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=M(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=E(this.buf,this.pos)+E(this.buf,this.pos+4)*_;return this.pos+=8,t},readSFixed64:function(){var t=E(this.buf,this.pos)+M(this.buf,this.pos+4)*_;return this.pos+=8,t},readFloat:function(){var t=g(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=g(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128||(e|=(127&(r=n[this.pos++]))<<7,r<128)||(e|=(127&(r=n[this.pos++]))<<14,r<128)||(e|=(127&(r=n[this.pos++]))<<21,r<128)?e:function(t,e,r){var n,i,o=r.buf;if(i=o[r.pos++],n=(112&i)>>4,i<128||(i=o[r.pos++],n|=(127&i)<<3,i<128)||(i=o[r.pos++],n|=(127&i)<<10,i<128)||(i=o[r.pos++],n|=(127&i)<<17,i<128)||(i=o[r.pos++],n|=(127&i)<<24,i<128)||(i=o[r.pos++],n|=(1&i)<<31,i<128))return function(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[this.pos]))<<28,t,this)},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,r){for(var n="",i=e;i<r;){var o,a,s,u=t[i],l=null,c=u>239?4:u>223?3:u>191?2:1;if(i+c>r)break;1===c?u<128&&(l=u):2===c?128==(192&(o=t[i+1]))&&((l=(31&u)<<6|63&o)<=127&&(l=null)):3===c?(o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(((l=(15&u)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null))):4===c&&(o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(((l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null))),null===l?(l=65533,c=1):l>65535&&(l-=65536,n+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),n+=String.fromCharCode(l),i+=c}return n}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var r=S(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=S(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=S(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=S(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=S(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=S(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=S(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=S(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=S(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===b.Varint)for(;this.buf[this.pos++]>127;);else if(e===b.Bytes)this.pos=this.readVarint()+this.pos;else if(e===b.Fixed32)this.pos+=4;else{if(e!==b.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),O(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),O(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),O(this.buf,-1&t,this.pos),O(this.buf,Math.floor(t*w),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),O(this.buf,-1&t,this.pos),O(this.buf,Math.floor(t*w),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,o=0;o<e.length;o++){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){n>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&A(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),x(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),x(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var n=this.pos-r;n>=128&&A(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,b.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,k,e)},writePackedSVarint:function(t,e){this.writeMessage(t,I,e)},writePackedBoolean:function(t,e){this.writeMessage(t,V,e)},writePackedFloat:function(t,e){this.writeMessage(t,B,e)},writePackedDouble:function(t,e){this.writeMessage(t,z,e)},writePackedFixed32:function(t,e){this.writeMessage(t,P,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,C,e)},writePackedFixed64:function(t,e){this.writeMessage(t,F,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,$,e)},writeBytesField:function(t,e){this.writeTag(t,b.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,b.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,b.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,b.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,b.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,b.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,b.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,b.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,b.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,b.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var T,D=(T=!0,function(t,e){var r=T?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return T=!1,r}),L=D(void 0,(function(){return L.toString().search("(((.+)+)+)+$").toString().constructor(L).search("(((.+)+)+)+$")}));function U(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}}L(),U.prototype.encode=function(t){return this._stringToNumber[t]},U.prototype.decode=function(t){return this._numberToString[t]};var j,q=(j=!0,function(t,e){var r=j?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return j=!1,r}),N=q(void 0,(function(){return N.toString().search("(((.+)+)+)+$").toString().constructor(N).search("(((.+)+)+)+$")}));N();var R={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};function G(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map((function(t){var i,o=(i=t.type,R[i].BYTES_PER_ELEMENT),a=r=X(r,Math.max(e,o)),s=t.components||1;return n=Math.max(n,o),r+=o*s,{name:t.name,type:t.type,components:s,offset:a}})),size:X(r,Math.max(n,e)),alignment:e}}function X(t,e){return Math.ceil(t/e)*e}var Y,H=(Y=!0,function(t,e){var r=Y?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Y=!1,r}),Z=H(void 0,(function(){return Z.toString().search("(((.+)+)+)+$").toString().constructor(Z).search("(((.+)+)+)+$")}));Z();var J=function(t,e){var r=e.pixelRatio,n=e.version,i=e.stretchX,o=e.stretchY,a=e.content;this.paddedRect=t,this.pixelRatio=r,this.stretchX=i,this.stretchY=o,this.content=a,this.version=n},K={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};K.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},K.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},K.tlbr.get=function(){return this.tl.concat(this.br)},K.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(J.prototype,K);var W,Q=(W=!0,function(t,e){var r=W?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return W=!1,r}),tt=Q(void 0,(function(){return tt.toString().search("(((.+)+)+)+$").toString().constructor(tt).search("(((.+)+)+)+$")}));tt();var et=function(t,e){rt(this,t,4,e)};function rt(t,e,r,n){var i=e.width,o=e.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==i*o*r)throw new RangeError("mismatched image size")}else n=new Uint8Array(i*o*r);return t.width=i,t.height=o,t.data=n,t}function nt(t,e,r,n,i,o){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)return console.log("out of range source coordinates for image copy"),e;if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)return console.log("out of range destination coordinates for image copy"),e;for(var a=t.data,s=e.data,u=0;u<i.height;u++)for(var l=((r.y+u)*t.width+r.x)*o,c=((n.y+u)*e.width+n.x)*o,p=0;p<i.width*o;p++)s[c+p]=a[l+p];return e}et.prototype.resize=function(t){!function(t,e,r){var n=e.width,i=e.height;if(n===t.width&&i===t.height)return;var o=rt({},{width:n,height:i},r);nt(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,n),height:Math.min(t.height,i)},r),t.width=n,t.height=i,t.data=o.data}(this,t,4)},et.prototype.replace=function(t,e){e?this.data.set(t):t instanceof Uint8ClampedArray?this.data=new Uint8Array(t.buffer):this.data=t},et.prototype.clone=function(){return new et({width:this.width,height:this.height},new Uint8Array(this.data))},et.copy=function(t,e,r,n,i){nt(t,e,r,n,i,4)};var it,ot=(it=!0,function(t,e){var r=it?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return it=!1,r}),at=ot(void 0,(function(){return at.toString().search("(((.+)+)+)+$").toString().constructor(at).search("(((.+)+)+)+$")}));at();var st=function(t,e){var r={},n={};this.haveRenderCallbacks=[];var i=[];this.addImages(t,r,i),this.addImages(e,n,i);var o=function(t){for(var e=0,r=0,n=0,i=t;n<i.length;n+=1){var o=i[n];e+=o.w*o.h,r=Math.max(r,o.w)}t.sort((function(t,e){return e.h-t.h}));for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}],s=0,u=0,l=0,c=t;l<c.length;l+=1)for(var p=c[l],f=a.length-1;f>=0;f--){var h=a[f];if(!(p.w>h.w||p.h>h.h)){if(p.x=h.x,p.y=h.y,u=Math.max(u,p.y+p.h),s=Math.max(s,p.x+p.w),p.w===h.w&&p.h===h.h){var y=a.pop();f<a.length&&(a[f]=y)}else p.h===h.h?(h.x+=p.w,h.w-=p.w):p.w===h.w?(h.y+=p.h,h.h-=p.h):(a.push({x:h.x+p.w,y:h.y,w:h.w-p.w,h:p.h}),h.y+=p.h,h.h-=p.h);break}}return{w:s,h:u,fill:e/(s*u)||0}}(i),a=o.w,s=o.h,u=new et({width:a||1,height:s||1});for(var l in t){var c=t[l],p=r[l].paddedRect;et.copy(c.data,u,{x:0,y:0},{x:p.x+1,y:p.y+1},c.data)}for(var f in e){var h=e[f],y=n[f].paddedRect,d=y.x+1,v=y.y+1,m=h.data.width,g=h.data.height;et.copy(h.data,u,{x:0,y:0},{x:d,y:v},h.data),et.copy(h.data,u,{x:0,y:g-1},{x:d,y:v-1},{width:m,height:1}),et.copy(h.data,u,{x:0,y:0},{x:d,y:v+g},{width:m,height:1}),et.copy(h.data,u,{x:m-1,y:0},{x:d-1,y:v},{width:1,height:g}),et.copy(h.data,u,{x:0,y:0},{x:d+m,y:v},{width:1,height:g})}this.image=u,this.iconPositions=r,this.patternPositions=n};st.prototype.addImages=function(t,e,r){for(var n in t){var i=t[n],o={x:0,y:0,w:i.data.width+2,h:i.data.height+2};r.push(o),e[n]=new J(o,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},st.prototype.patchUpdatedImages=function(t,e){for(var r in t.dispatchRenderCallbacks(this.haveRenderCallbacks),t.updatedImages)this.patchUpdatedImage(this.iconPositions[r],t.getImage(r),e),this.patchUpdatedImage(this.patternPositions[r],t.getImage(r),e)},st.prototype.patchUpdatedImage=function(t,e,r){if(t&&e&&t.version!==e.version){t.version=e.version;var n=t.tl,i=n[0],o=n[1];r.update(e.data,void 0,{x:i,y:o})}};var ut,lt=(ut=!0,function(t,e){var r=ut?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return ut=!1,r}),ct=lt(void 0,(function(){return ct.toString().search("(((.+)+)+)+$").toString().constructor(ct).search("(((.+)+)+)+$")}));ct();var pt={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 ft(t){return(t=Math.round(t))<0?0:t>255?255:t}function ht(t){return t<0?0:t>1?1:t}function yt(t){return"%"===t[t.length-1]?ft(parseFloat(t)/100*255):ft(parseInt(t))}function dt(t){return"%"===t[t.length-1]?ht(parseFloat(t)/100):ht(parseFloat(t))}function vt(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}const mt=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),gt=mt(void 0,(function(){return gt.toString().search("(((.+)+)+)+$").toString().constructor(gt).search("(((.+)+)+)+$")}));gt();class xt{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 xt)return t;if("string"!=typeof t)return;const e=function(t){var e,r=t.replace(/ /g,"").toLowerCase();if(r in pt)return pt[r].slice();if("#"===r[0])return 4===r.length?(e=parseInt(r.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===r.length&&(e=parseInt(r.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var n=r.indexOf("("),i=r.indexOf(")");if(-1!==n&&i+1===r.length){var o=r.substr(0,n),a=r.substr(n+1,i-(n+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=dt(a.pop());case"rgb":return 3!==a.length?null:[yt(a[0]),yt(a[1]),yt(a[2]),s];case"hsla":if(4!==a.length)return null;s=dt(a.pop());case"hsl":if(3!==a.length)return null;var u=(parseFloat(a[0])%360+360)%360/360,l=dt(a[1]),c=dt(a[2]),p=c<=.5?c*(l+1):c+l-c*l,f=2*c-p;return[ft(255*vt(f,p,u+1/3)),ft(255*vt(f,p,u)),ft(255*vt(f,p,u-1/3)),s];default:return null}}return null}(t);return e?new xt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3]):void 0}toString(){const[t,e,r,n]=this.toArray();return"rgba("+Math.round(t)+","+Math.round(e)+","+Math.round(r)+","+n+")"}toArray(){const{r:t,g:e,b:r,a:n}=this;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*r/n,n]}}xt.black=new xt(0,0,0,1),xt.white=new xt(1,1,1,1),xt.transparent=new xt(0,0,0,0),xt.red=new xt(1,0,0,1);function bt(t){if("array"===t.kind){var e=bt(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var _t=[{kind:"null"},{kind:"number"},{kind:"string"},{kind:"boolean"},{kind:"color"},{kind:"formatted"},{kind:"object"},function(t,e){var r,n=(r=!0,function(t,e){var n=r?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return r=!1,n}),i=n(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));return i(),{kind:"array",itemType:t,N:e}}({kind:"value"}),{kind:"resolvedImage"}];function wt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!wt(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(var r=0,n=_t;r<n.length;r+=1){if(!wt(n[r],e))return null}}return"Expected "+bt(t)+" but found "+bt(e)+" instead."}var St,At=(St=!0,function(t,e){var r=St?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return St=!1,r}),kt=At(void 0,(function(){return kt.toString().search("(((.+)+)+)+$").toString().constructor(kt).search("(((.+)+)+)+$")}));kt();var It=function(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"})};It.prototype.compare=function(t,e){return this.collator.compare(t,e)},It.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Bt,zt=(Bt=!0,function(t,e){var r=Bt?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Bt=!1,r}),Vt=zt(void 0,(function(){return Vt.toString().search("(((.+)+)+)+$").toString().constructor(Vt).search("(((.+)+)+)+$")}));Vt();var Pt,Ct=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},Ft=(Pt=!0,function(t,e){var r=Pt?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Pt=!1,r}),$t=Ft(void 0,(function(){return $t.toString().search("(((.+)+)+)+$").toString().constructor($t).search("(((.+)+)+)+$")}));$t();var Et=function(t){this.sections=t};Et.fromString=function(t){return new Et([new Ct(t,null,null,null,null)])},Et.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},Et.factory=function(t){return t instanceof Et?t:Et.fromString(t)},Et.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},Et.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var n=r[e];if(n.image)t.push(["image",n.image.name]);else{t.push(n.text);var i={};n.fontStack&&(i["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(i["font-scale"]=n.scale),n.textColor&&(i["text-color"]=["rgba"].concat(n.textColor.toArray())),t.push(i)}}return t};var Ot,Mt=(Ot=!0,function(t,e){var r=Ot?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Ot=!1,r}),Tt=Mt(void 0,(function(){return Tt.toString().search("(((.+)+)+)+$").toString().constructor(Tt).search("(((.+)+)+)+$")}));Tt();var Dt=function(t){this.name=t.name,this.available=t.available};Dt.prototype.toString=function(){return this.name},Dt.fromString=function(t){return new Dt({name:t,available:!1})},Dt.prototype.serialize=function(){return["image",this.name]};var Lt,Ut=(Lt=!0,function(t,e){var r=Lt?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Lt=!1,r}),jt=Ut(void 0,(function(){return jt.toString().search("(((.+)+)+)+$").toString().constructor(jt).search("(((.+)+)+)+$")}));jt();var qt={kind:"null"},Nt={kind:"number"},Rt={kind:"string"},Gt={kind:"boolean"},Xt={kind:"color"},Yt={kind:"object"},Ht={kind:"value"},Zt={kind:"collator"},Jt={kind:"formatted"},Kt={kind:"resolvedImage"};function Wt(){}Wt.validateRGBA=function(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."},Wt.isValue=function(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 xt)return!0;if(t instanceof It)return!0;if(t instanceof Et)return!0;if(t instanceof Dt)return!0;if(Array.isArray(t)){for(var e=0,r=t;e<r.length;e+=1){var n=r[e];if(!Wt.isValue(n))return!1}return!0}if("object"==typeof t){for(var i in t)if(!Wt.isValue(t[i]))return!1;return!0}return!1},Wt.typeOf=function(t){if(null===t)return qt;if("string"==typeof t)return Rt;if("boolean"==typeof t)return Gt;if("number"==typeof t)return Nt;if(t instanceof xt)return Xt;if(t instanceof It)return Zt;if(t instanceof Et)return Jt;if(t instanceof Dt)return Kt;if(Array.isArray(t)){for(var e,r=t.length,n=0,i=t;n<i.length;n+=1){var o=i[n],a=Wt.typeOf(o);if(e){if(e===a)continue;e=Ht;break}e=a}return{kind:"array",itemType:e||Ht,N:r}}return Yt},Wt.toString$1=function(t){var e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof xt||t instanceof Et||t instanceof Dt?t.toString():JSON.stringify(t)};var Qt,te=(Qt=!0,function(t,e){var r=Qt?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Qt=!1,r}),ee=te(void 0,(function(){return ee.toString().search("(((.+)+)+)+$").toString().constructor(ee).search("(((.+)+)+)+$")}));ee();var re={kind:"value"};var ne={string:{kind:"string"},number:{kind:"number"},boolean:{kind:"boolean"},object:{kind:"object"}},ie=function(t,e){this.type=t,this.args=e};ie.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r,n=1,i=t[0];if("array"===i){var o,a;if(t.length>2){var s=t[1];if("string"!=typeof s||!(s in ne)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=ne[s],n++}else o=re;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=t[2],n++}r={kind:"array",itemType:o,N:a}}else r=ne[i];for(var u=[];n<t.length;n++){var l=e.parse(t[n],n,re);if(!l)return null;u.push(l)}return new ie(r,u)},ie.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var r=this.args[e].evaluate(t);if(!wt(this.type,Wt.typeOf(r)))return r;if(e===this.args.length-1)throw new RuntimeError("Expected value to be of type "+toString(this.type)+", but found "+toString(Wt.typeOf(r))+" instead.")}return null},ie.prototype.eachChild=function(t){this.args.forEach(t)},ie.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.args.map((function(t){return t.possibleOutputs()})))},ie.prototype.serialize=function(){var t=this.type,e=[t.kind];if("array"===t.kind){var r=t.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){e.push(r.kind);var n=t.N;("number"==typeof n||this.args.length>1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var oe,ae=(oe=!0,function(t,e){var r=oe?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return oe=!1,r}),se=ae(void 0,(function(){return se.toString().search("(((.+)+)+)+$").toString().constructor(se).search("(((.+)+)+)+$")}));se();var ue={kind:"number"},le={kind:"value"};var ce=function(t,e,r){this.type=t,this.index=e,this.input=r};ce.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r,n=e.parse(t[1],1,ue),i=e.parse(t[2],2,{kind:"array",itemType:e.expectedType||le,N:r});if(!n||!i)return null;var o=i.type;return new ce(o.itemType,n,i)},ce.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new RuntimeError("Array index out of bounds: "+e+" < 0.");if(e>=r.length)throw new RuntimeError("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new RuntimeError("Array index must be an integer, but found "+e+" instead.");return r[e]},ce.prototype.eachChild=function(t){t(this.index),t(this.input)},ce.prototype.possibleOutputs=function(){return[void 0]},ce.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var pe,fe=(pe=!0,function(t,e){var r=pe?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return pe=!1,r}),he=fe(void 0,(function(){return he.toString().search("(((.+)+)+)+$").toString().constructor(he).search("(((.+)+)+)+$")}));he();var ye={kind:"boolean"},de=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};de.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var n=[],i=1;i<t.length-1;i+=2){var o=e.parse(t[i],i,ye);if(!o)return null;var a=e.parse(t[i+1],i+1,r);if(!a)return null;n.push([o,a]),r=r||a.type}var s=e.parse(t[t.length-1],t.length-1,r);return s?new de(r,n,s):null},de.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],o=n[1];if(i.evaluate(t))return o.evaluate(t)}return this.otherwise.evaluate(t)},de.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],o=n[1];t(i),t(o)}t(this.otherwise)},de.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.branches.map((function(t){return t[0],t[1].possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},de.prototype.serialize=function(){var t=["case"];return this.eachChild((function(e){t.push(e.serialize())})),t};var ve,me=(ve=!0,function(t,e){var r=ve?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return ve=!1,r}),ge=me(void 0,(function(){return ge.toString().search("(((.+)+)+)+$").toString().constructor(ge).search("(((.+)+)+)+$")}));ge();var xe={kind:"value"},be=function(t,e){this.type=t,this.args=e};be.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var r=null,n=e.expectedType;n&&"value"!==n.kind&&(r=n);for(var i=[],o=0,a=t.slice(1);o<a.length;o+=1){var s=a[o],u=e.parse(s,1+i.length,r,void 0,{typeAnnotation:"omit"});if(!u)return null;r=r||u.type,i.push(u)}var l=n&&i.some((function(t){return wt(n,t.type)}));return new be(l?xe:r,i)},be.prototype.evaluate=function(t){for(var e,r=null,n=0,i=0,o=this.args;i<o.length;i+=1){if(n++,(r=o[i].evaluate(t))&&r instanceof Dt&&!r.available&&(!e&&(e=r.name),r=null,n===this.args.length&&(r=e)),null!==r)break}return r},be.prototype.eachChild=function(t){this.args.forEach(t)},be.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.args.map((function(t){return t.possibleOutputs()})))},be.prototype.serialize=function(){var t=["coalesce"];return this.eachChild((function(e){t.push(e.serialize())})),t};var _e,we=(_e=!0,function(t,e){var r=_e?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return _e=!1,r}),Se=we(void 0,(function(){return Se.toString().search("(((.+)+)+)+$").toString().constructor(Se).search("(((.+)+)+)+$")}));Se();var Ae={kind:"value"},ke={"to-boolean":{kind:"boolean"},"to-color":{kind:"color"},"to-number":{kind:"number"},"to-string":{kind:"string"}},Ie=function(t,e){this.type=t,this.args=e};Ie.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");for(var n=ke[r],i=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,Ae);if(!a)return null;i.push(a)}return new Ie(n,i)},Ie.prototype.evaluate=function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){for(var e,r,n=0,i=this.args;n<i.length;n+=1){if(r=null,(e=i[n].evaluate(t))instanceof xt)return e;if("string"==typeof e){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(r=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":validateRGBA(e[0],e[1],e[2],e[3])))return new xt(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new RuntimeError(r||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,u=this.args;s<u.length;s+=1){if(null===(a=u[s].evaluate(t)))return 0;var l=Number(a);if(!isNaN(l))return l}throw new RuntimeError("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?Formatted.fromString(Wt.toString$1(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?Dt.fromString(Wt.toString$1(this.args[0].evaluate(t))):Wt.toString$1(this.args[0].evaluate(t))},Ie.prototype.eachChild=function(t){this.args.forEach(t)},Ie.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.args.map((function(t){return t.possibleOutputs()})))},Ie.prototype.serialize=function(){if("formatted"===this.type.kind)return new FormatExpression([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new ImageExpression(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild((function(e){t.push(e.serialize())})),t};var Be,ze=(Be=!0,function(t,e){var r=Be?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Be=!1,r}),Ve=ze(void 0,(function(){return Ve.toString().search("(((.+)+)+)+$").toString().constructor(Ve).search("(((.+)+)+)+$")}));Ve();var Pe={kind:"string"},Ce={kind:"boolean"},Fe={kind:"collator"},$e=function(t,e,r){this.type=Fe,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};$e.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");var n=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,Ce);if(!n)return null;var i=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,Ce);if(!i)return null;var o=null;return r.locale&&!(o=e.parse(r.locale,1,Pe))?null:new $e(n,i,o)},$e.prototype.evaluate=function(t){return new It(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},$e.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},$e.prototype.possibleOutputs=function(){return[void 0]},$e.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var Ee={kind:"boolean"},Oe={kind:"value"},Me={kind:"collator"};function Te(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function De(t,e,r,n){return 0===n.compare(e,r)}function Le(t,e,r){var n,i=(n=!0,function(t,e){var r=n?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return n=!1,r}),o="=="!==t&&"!="!==t;return function(){var n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function a(t,e,r){this.type=Ee,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return n(),a.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var r=t[0],n=e.parse(t[1],1,Oe);if(!n)return null;if(!Te(r,n.type))return e.concat(1).error('"'+r+"\" comparisons are not supported for type '"+toString(n.type)+"'.");var i=e.parse(t[2],2,Oe);if(!i)return null;if(!Te(r,i.type))return e.concat(2).error('"'+r+"\" comparisons are not supported for type '"+toString(i.type)+"'.");if(n.type.kind!==i.type.kind&&"value"!==n.type.kind&&"value"!==i.type.kind)return e.error("Cannot compare types '"+toString(n.type)+"' and '"+toString(i.type)+"'.");o&&("value"===n.type.kind&&"value"!==i.type.kind?n=new ie(i.type,[n]):"value"!==n.type.kind&&"value"===i.type.kind&&(i=new ie(n.type,[i])));var s=null;if(4===t.length){if("string"!==n.type.kind&&"string"!==i.type.kind&&"value"!==n.type.kind&&"value"!==i.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(s=e.parse(t[3],3,Me)))return null}return new a(n,i,s)},a.prototype.evaluate=function(n){var i=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(o&&this.hasUntypedArgument){var s=Wt.typeOf(i),u=Wt.typeOf(a);if(s.kind!==u.kind||"string"!==s.kind&&"number"!==s.kind)throw new RuntimeError('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+u.kind+") instead.")}if(this.collator&&!o&&this.hasUntypedArgument){var l=Wt.typeOf(i),c=Wt.typeOf(a);if("string"!==l.kind||"string"!==c.kind)return e(n,i,a)}return this.collator?r(n,i,a,this.collator.evaluate(n)):e(n,i,a)},a.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},a.prototype.possibleOutputs=function(){return[!0,!1]},a.prototype.serialize=function(){var e=[t];return this.eachChild((function(t){e.push(t.serialize())})),e},a}()}var Ue={};Ue.Equals=Le("==",(function(t,e,r){return e===r}),De),Ue.NotEquals=Le("!=",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!De(0,e,r,n)})),Ue.LessThan=Le("<",(function(t,e,r){return e<r}),(function(t,e,r,n){return n.compare(e,r)<0})),Ue.GreaterThan=Le(">",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),Ue.LessThanOrEqual=Le("<=",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),Ue.GreaterThanOrEqual=Le(">=",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0}));var je,qe=(je=!0,function(t,e){var r=je?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return je=!1,r}),Ne=qe(void 0,(function(){return Ne.toString().search("(((.+)+)+)+$").toString().constructor(Ne).search("(((.+)+)+)+$")}));Ne();var Re={kind:"number"},Ge={kind:"string"},Xe={kind:"color"},Ye={kind:"value"},He={kind:"formatted"},Ze={kind:"resolvedImage"};var Je=function(t){this.type=He,this.sections=t};Je.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");for(var n=[],i=!1,o=1;o<=t.length-1;++o){var a=t[o];if(i&&"object"==typeof a&&!Array.isArray(a)){i=!1;var s=null;if(a["font-scale"]&&!(s=e.parse(a["font-scale"],1,Re)))return null;var u=null;if(a["text-font"]&&!(u=e.parse(a["text-font"],1,{kind:"array",itemType:Ge,N:void 0})))return null;var l=null;if(a["text-color"]&&!(l=e.parse(a["text-color"],1,Xe)))return null;var c=n[n.length-1];c.scale=s,c.font=u,c.textColor=l}else{var p=e.parse(t[o],1,Ye);if(!p)return null;var f=p.type.kind;if("string"!==f&&"value"!==f&&"null"!==f&&"resolvedImage"!==f)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:p,scale:null,font:null,textColor:null})}}return new Je(n)},Je.prototype.evaluate=function(t){return new Et(this.sections.map((function(e){var r=e.content.evaluate(t);return Wt.typeOf(r)===Ze?new Ct("",r,null,null,null):new Ct(Wt.toString$1(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},Je.prototype.eachChild=function(t){for(var e=0,r=this.sections;e<r.length;e+=1){var n=r[e];t(n.content),n.scale&&t(n.scale),n.font&&t(n.font),n.textColor&&t(n.textColor)}},Je.prototype.possibleOutputs=function(){return[void 0]},Je.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var n=r[e];t.push(n.content.serialize());var i={};n.scale&&(i["font-scale"]=n.scale.serialize()),n.font&&(i["text-font"]=n.font.serialize()),n.textColor&&(i["text-color"]=n.textColor.serialize()),t.push(i)}return t};var Ke,We=(Ke=!0,function(t,e){var r=Ke?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Ke=!1,r}),Qe=We(void 0,(function(){return Qe.toString().search("(((.+)+)+)+$").toString().constructor(Qe).search("(((.+)+)+)+$")}));Qe();var tr={kind:"string"},er={kind:"resolvedImage"},rr=function(t){this.type=er,this.input=t};rr.parse=function(t,e){if(2!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,tr);return r?new rr(r):e.error("No image name provided.")},rr.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=!1;return t.availableImages&&t.availableImages.indexOf(e)>-1&&(r=!0),new Dt({name:e,available:r})},rr.prototype.eachChild=function(t){t(this.input)},rr.prototype.possibleOutputs=function(){return[void 0]},rr.prototype.serialize=function(){return["image",this.input.serialize()]};var nr,ir=(nr=!0,function(t,e){var r=nr?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return nr=!1,r}),or=ir(void 0,(function(){return or.toString().search("(((.+)+)+)+$").toString().constructor(or).search("(((.+)+)+)+$")}));or();var ar=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=i;o<a.length;o+=1){var s=a[o],u=s[0],l=s[1];this.labels.push(u),this.outputs.push(l)}},sr={kind:"number"},ur={kind:"color"};function lr(t,e,r,n){var i=n-r,o=t-r;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}ar.interpolationFactor=function(t,e,r,n){var i=0;if("exponential"===t.name)i=lr(e,t.base,r,n);else if("linear"===t.name)i=lr(e,1,r,n);else if("cubic-bezier"===t.name){var o=t.controlPoints;i=new unitbezier(o[0],o[1],o[2],o[3]).solve(lr(e,1,r,n))}return i},ar.parse=function(t,e){var r=t[0],n=t[1],i=t[2],o=t.slice(3);if(!Array.isArray(n)||0===n.length)return e.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var a=n[1];if("number"!=typeof a)return e.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:a}}else{if("cubic-bezier"!==n[0])return e.error("Unknown interpolation type "+String(n[0]),1,0);var s=n.slice(1);if(4!==s.length||s.some((function(t){return"number"!=typeof t||t<0||t>1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(i=e.parse(i,2,sr)))return null;var u=[],l=null;"interpolate-hcl"===r||"interpolate-lab"===r?l=ur:e.expectedType&&"value"!==e.expectedType.kind&&(l=e.expectedType);for(var c=0;c<o.length;c+=2){var p=o[c],f=o[c+1],h=c+3,y=c+4;if("number"!=typeof p)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',h);if(u.length&&u[u.length-1][0]>=p)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',h);var d=e.parse(f,y,l);if(!d)return null;l=l||d.type,u.push([p,d])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new ar(l,r,n,i,u):e.error("Type "+toString(l)+" is not interpolatable.")},ar.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);var o=findStopLessThanOrEqualTo(e,n),a=e[o],s=e[o+1],u=ar.interpolationFactor(this.interpolation,n,a,s),l=r[o].evaluate(t),c=r[o+1].evaluate(t);return"interpolate"===this.operator?interpolate[this.type.kind.toLowerCase()](l,c,u):"interpolate-hcl"===this.operator?hcl.reverse(hcl.interpolate(hcl.forward(l),hcl.forward(c),u)):lab.reverse(lab.interpolate(lab.forward(l),lab.forward(c),u))},ar.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1){t(r[e])}},ar.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map((function(t){return t.possibleOutputs()})))},ar.prototype.serialize=function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],r=0;r<this.labels.length;r++)e.push(this.labels[r],this.outputs[r].serialize());return e};var cr,pr=(cr=!0,function(t,e){var r=cr?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return cr=!1,r}),fr=pr(void 0,(function(){return fr.toString().search("(((.+)+)+)+$").toString().constructor(fr).search("(((.+)+)+)+$")}));fr();var hr={kind:"boolean"},yr={kind:"value"};var dr=function(t,e){this.type=hr,this.needle=t,this.haystack=e};dr.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r,n=e.parse(t[1],1,yr),i=e.parse(t[2],2,yr);return n&&i?"boolean"!==(r=n.type).kind&&"string"!==r.kind&&"number"!==r.kind&&"null"!==r.kind&&"value"!==r.kind?e.error("Expected first argument to be of type boolean, string, number or null, but found "+toString(n.type)+" instead"):new dr(n,i):null},dr.prototype.evaluate=function(t){var e,r,n=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!n||!i)return!1;if("boolean"!=typeof(e=n)&&"string"!=typeof e&&"number"!=typeof e)throw new RuntimeError("Expected first argument to be of type boolean, string or number, but found "+toString(typeOf(n))+" instead.");if(r=i,!Array.isArray(r)&&"string"!=typeof r)throw new RuntimeError("Expected second argument to be of type array or string, but found "+toString(typeOf(i))+" instead.");return i.indexOf(n)>=0},dr.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},dr.prototype.possibleOutputs=function(){return[!0,!1]},dr.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var vr,mr=(vr=!0,function(t,e){var r=vr?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return vr=!1,r}),gr=mr(void 0,(function(){return gr.toString().search("(((.+)+)+)+$").toString().constructor(gr).search("(((.+)+)+)+$")}));gr();var xr=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};xr.prototype.evaluate=function(t){return this.result.evaluate(t)},xr.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1){t(r[e][1])}t(this.result)},xr.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var r=[],n=1;n<t.length-1;n+=2){var i=t[n];if("string"!=typeof i)return e.error("Expected string, but found "+typeof i+" instead.",n);if(/[^a-zA-Z0-9_]/.test(i))return e.error("Variable names must contain only alphanumeric characters or '_'.",n);var o=e.parse(t[n+1],n+1);if(!o)return null;r.push([i,o])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,r);return a?new xr(r,a):null},xr.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},xr.prototype.serialize=function(){for(var t=["let"],e=0,r=this.bindings;e<r.length;e+=1){var n=r[e],i=n[0],o=n[1];t.push(i,o.serialize())}return t.push(this.result.serialize()),t};var br,_r=(br=!0,function(t,e){var r=br?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return br=!1,r}),wr=_r(void 0,(function(){return wr.toString().search("(((.+)+)+)+$").toString().constructor(wr).search("(((.+)+)+)+$")}));wr();var Sr={kind:"number"},Ar=function(t){this.type=Sr,this.input=t};Ar.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found "+toString(r.type)+" instead."):new Ar(r):null},Ar.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new RuntimeError("Expected value to be of type string or array, but found "+toString(typeOf(e))+" instead.")},Ar.prototype.eachChild=function(t){t(this.input)},Ar.prototype.possibleOutputs=function(){return[void 0]},Ar.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var kr,Ir=(kr=!0,function(t,e){var r=kr?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return kr=!1,r}),Br=Ir(void 0,(function(){return Br.toString().search("(((.+)+)+)+$").toString().constructor(Br).search("(((.+)+)+)+$")}));Br();var zr=function(t,e){this.type=t,this.value=e};zr.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!Wt.isValue(t[1]))return e.error("invalid value");var r=t[1],n=Wt.typeOf(r),i=e.expectedType;return"array"===n.kind&&0===n.N&&i&&"array"===i.kind&&("number"!=typeof i.N||0===i.N)&&(n=i),new zr(n,r)},zr.prototype.evaluate=function(){return this.value},zr.prototype.eachChild=function(){},zr.prototype.possibleOutputs=function(){return[this.value]},zr.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Color?["rgba"].concat(this.value.toArray()):this.value instanceof Et?this.value.serialize():this.value};var Vr,Pr=(Vr=!0,function(t,e){var r=Vr?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Vr=!1,r}),Cr=Pr(void 0,(function(){return Cr.toString().search("(((.+)+)+)+$").toString().constructor(Cr).search("(((.+)+)+)+$")}));Cr();var Fr={kind:"value"},$r=function(t,e,r,n,i,o){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=o};$r.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var i={},o=[],a=2;a<t.length-1;a+=2){var s=t[a],u=t[a+1];!Array.isArray(s)&&(s=[s]);var l=e.concat(a);if(0===s.length)return l.error("Expected at least one branch label.");for(var c=0,p=s;c<p.length;c+=1){var f=p[c];if("number"!=typeof f&&"string"!=typeof f)return l.error("Branch labels must be numbers or strings.");if("number"==typeof f&&Math.abs(f)>Number.MAX_SAFE_INTEGER)return l.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof f&&Math.floor(f)!==f)return l.error("Numeric branch labels must be integer values.");if(r){if(l.checkSubtype(r,Wt.typeOf(f)))return null}else r=Wt.typeOf(f);if(void 0!==i[String(f)])return l.error("Branch labels must be unique.");i[String(f)]=o.length}var h=e.parse(u,a,n);if(!h)return null;n=n||h.type,o.push(h)}var y=e.parse(t[1],1,Fr);if(!y)return null;var d=e.parse(t[t.length-1],t.length-1,n);return d?"value"!==y.type.kind&&e.concat(1).checkSubtype(r,y.type)?null:new $r(r,n,y,i,o,d):null},$r.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(Wt.typeOf(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},$r.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},$r.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map((function(t){return t.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},$r.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],n={},i=0,o=Object.keys(this.cases).sort();i<o.length;i+=1){var a=o[i];void 0===(p=n[this.cases[a]])?(n[this.cases[a]]=r.length,r.push([this.cases[a],[a]])):r[p][1].push(a)}for(var s=function(e){return"number"===t.inputType.kind?Number(e):e},u=0,l=r;u<l.length;u+=1){var c=l[u],p=c[0],f=c[1];1===f.length?e.push(s(f[0])):e.push(f.map(s)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var Er,Or=(Er=!0,function(t,e){var r=Er?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Er=!1,r}),Mr=Or(void 0,(function(){return Mr.toString().search("(((.+)+)+)+$").toString().constructor(Mr).search("(((.+)+)+)+$")}));Mr();var Tr={kind:"number"},Dr={kind:"string"},Lr=function(t,e,r,n,i){this.type=Dr,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};Lr.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,Tr);if(!r)return null;var n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,Dr)))return null;var o=null;if(n.currency&&!(o=e.parse(n.currency,1,Dr)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=e.parse(n["min-fraction-digits"],1,Tr)))return null;var s=null;return n["max-fraction-digits"]&&!(s=e.parse(n["max-fraction-digits"],1,Tr))?null:new Lr(r,i,o,a,s)},Lr.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},Lr.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},Lr.prototype.possibleOutputs=function(){return[void 0]},Lr.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var Ur,jr=(Ur=!0,function(t,e){var r=Ur?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Ur=!1,r}),qr=jr(void 0,(function(){return qr.toString().search("(((.+)+)+)+$").toString().constructor(qr).search("(((.+)+)+)+$")}));function Nr(t,e){for(var r,n,i=t.length-1,o=0,a=i,s=0;o<=a;)if(r=t[s=Math.floor((o+a)/2)],n=t[s+1],r<=e){if(s===i||e<n)return s;o=s+1}else{if(!(r>e))throw new RuntimeError("Input is not a number.");a=s-1}return 0}qr();var Rr,Gr=(Rr=!0,function(t,e){var r=Rr?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Rr=!1,r}),Xr=Gr(void 0,(function(){return Xr.toString().search("(((.+)+)+)+$").toString().constructor(Xr).search("(((.+)+)+)+$")}));Xr();var Yr={kind:"number"},Hr=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n<i.length;n+=1){var o=i[n],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};Hr.parse=function(t,e){if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");var r=e.parse(t[1],1,Yr);if(!r)return null;var n=[],i=null;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var o=1;o<t.length;o+=2){var a=1===o?-1/0:t[o],s=t[o+1],u=o,l=o+1;if("number"!=typeof a)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',u);if(n.length&&n[n.length-1][0]>=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var c=e.parse(s,l,i);if(!c)return null;i=i||c.type,n.push([a,c])}return new Hr(i,r,n)},Hr.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[Nr(e,n)].evaluate(t)},Hr.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1){t(r[e])}},Hr.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map((function(t){return t.possibleOutputs()})))},Hr.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Zr,Jr=(Zr=!0,function(t,e){var r=Zr?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Zr=!1,r}),Kr=Jr(void 0,(function(){return Kr.toString().search("(((.+)+)+)+$").toString().constructor(Kr).search("(((.+)+)+)+$")}));Kr();var Wr=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Wr.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new Wr(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},Wr.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Wr.prototype.eachChild=function(){},Wr.prototype.possibleOutputs=function(){return[void 0]},Wr.prototype.serialize=function(){return["var",this.name]};var Qr,tn=(Qr=!0,function(t,e){var r=Qr?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Qr=!1,r}),en=tn(void 0,(function(){return en.toString().search("(((.+)+)+)+$").toString().constructor(en).search("(((.+)+)+)+$")}));en();var rn,nn={"==":Ue.Equals,"!=":Ue.NotEquals,">":Ue.GreaterThan,"<":Ue.LessThan,">=":Ue.GreaterThanOrEqual,"<=":Ue.LessThanOrEqual,array:ie,at:ce,boolean:ie,case:de,coalesce:be,collator:$e,format:Je,image:rr,in:dr,interpolate:ar,"interpolate-hcl":ar,"interpolate-lab":ar,length:Ar,let:xr,literal:zr,match:$r,number:ie,"number-format":Lr,object:ie,step:Hr,string:ie,"to-boolean":Ie,"to-color":Ie,"to-number":Ie,"to-string":Ie,var:Wr},on=(rn=!0,function(t,e){var r=rn?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return rn=!1,r}),an=on(void 0,(function(){return an.toString().search("(((.+)+)+)+$").toString().constructor(an).search("(((.+)+)+)+$")}));function sn(){}an();var un={};for(var ln in sn.register=function(t,e,r){void 0===r&&(r={}),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),un[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}},sn.register("Object",Object),sn.register("Color",xt),sn.register("Error",Error),sn.register("ResolvedImage",Dt),sn.register("ImageAtlas",st),sn.register("ImagePosition",J),sn.register("RGBAImage",et),sn.register("Formatted",Et),sn.register("FormattedSection",Ct),nn)nn[ln]._classRegistryKey||sn.register("Expression_"+ln,nn[ln]);function cn(t){return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&"ArrayBuffer"===t.constructor.name)}sn.serialize=function(t,e){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(cn(t))return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var r=t;return e&&e.push(r.buffer),r}if(t instanceof ImageData)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var n=[],i=0,o=t;i<o.length;i+=1){var a=o[i];n.push(sn.serialize(a,e))}return n}if("object"==typeof t){var s=t.constructor,u=s._classRegistryKey;if(!u)throw new Error("can't serialize object of unregistered class");var l=s.serialize?s.serialize(t,e):{};if(!s.serialize){for(var c in t)if(t.hasOwnProperty(c)&&!(un[u].omit.indexOf(c)>=0)){var p=t[c];"function"!=typeof p&&(l[c]=un[u].shallow.indexOf(c)>=0?p:sn.serialize(p,e))}t instanceof Error&&(l.message=t.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==u&&(l.$name=u),l}throw new Error("can't serialize object of type "+typeof t)},sn.deserialize=function(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||cn(t)||ArrayBuffer.isView(t)||t instanceof ImageData)return t;if(Array.isArray(t))return t.map(sn.deserialize);if("object"==typeof t){var e=t.$name||"Object",r=un[e].klass;if(!r)throw new Error("can't deserialize unregistered class "+e);if(r.deserialize)return r.deserialize(t);for(var n=Object.create(r.prototype),i=0,o=Object.keys(t);i<o.length;i+=1){var a=o[i];if("$name"!==a){var s=t[a];n[a]=un[e].shallow.indexOf(a)>=0?s:sn.deserialize(s)}}return n}throw new Error("can't deserialize object of type "+typeof t)};var pn,fn=(pn=!0,function(t,e){var r=pn?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return pn=!1,r}),hn=fn(void 0,(function(){return hn.toString().search("(((.+)+)+)+$").toString().constructor(hn).search("(((.+)+)+)+$")}));hn();var yn=function(){this.first=!0};yn.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=r,!0))},sn.register("ZoomHistory",yn);var dn,vn=(dn=!0,function(t,e){var r=dn?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return dn=!1,r}),mn=vn(void 0,(function(){return mn.toString().search("(((.+)+)+)+$").toString().constructor(mn).search("(((.+)+)+)+$")}));mn();var gn=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new yn,this.transition={})};gn.prototype.isSupportedScript=function(t){return!1},gn.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},gn.prototype.getCrossfadeParameters=function(){var t=this.zoom,e=t-Math.floor(t),r=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}},sn.register("EvaluationParameters",gn);var xn,bn=(xn=!0,function(t,e){var r=xn?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return xn=!1,r}),_n=bn(void 0,(function(){return _n.toString().search("(((.+)+)+)+$").toString().constructor(_n).search("(((.+)+)+)+$")}));_n();var wn=8192;function Sn(t,e,r){return Math.min(r,Math.max(e,t))}var An=function(t){var e,r=(e=!0,function(t,r){var n=e?function(){if(r){var e=r.apply(t,arguments);return r=null,e}}:function(){};return e=!1,n}),n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),{min:-1*Math.pow(2,t-1),max:Math.pow(2,t-1)-1}}(15);function kn(t){for(var e=wn/t.extent,r=t.loadGeometry(),n=0;n<r.length;n++)for(var i=r[n],o=0;o<i.length;o++){var a=i[o];a.x=Math.round(a.x*e),a.y=wn-Math.round(a.y*e),(a.x<An.min||a.x>An.max||a.y<An.min||a.y>An.max)&&(a.x=Sn(a.x,An.min,An.max),a.y=Sn(a.y,An.min,An.max))}return r}var In,Bn=(In=!0,function(t,e){var r=In?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return In=!1,r}),zn=Bn(void 0,(function(){return zn.toString().search("(((.+)+)+)+$").toString().constructor(zn).search("(((.+)+)+)+$")}));zn();var Vn=function(t){void 0===t&&(t=[]),this.segments=t};Vn.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return(!i||i.vertexLength+t>Vn.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},Vn.prototype.get=function(){return this.segments},Vn.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var r=e[t];for(var n in r.cesiumVaos)r.cesiumVaos[n].destroy()}},Vn.simpleSegment=function(t,e,r,n){return new Vn([{vertexOffset:t,primitiveOffset:e,vertexLength:r,primitiveLength:n,vaos:{},cesiumVaos:{},drawCommands:{},sortKey:0}])},Vn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,sn.register("SegmentVector",Vn);const Pn=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),Cn=Pn(void 0,(function(){return Cn.toString().search("(((.+)+)+)+$").toString().constructor(Cn).search("(((.+)+)+)+$")}));Cn();var Fn=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8};var $n=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};$n.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},$n.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},$n.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},$n.prototype.clear=function(){this.length=0},$n.prototype.resize=function(t){this.reserve(t),this.length=t},$n.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&(0==e.length&&console.log("oldUint8Array.length == 0"),this.uint8.set(e))}},$n.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var En,On=(En=!0,function(t,e){var r=En?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return En=!1,r}),Mn=On(void 0,(function(){return Mn.toString().search("(((.+)+)+)+$").toString().constructor(Mn).search("(((.+)+)+)+$")}));function Tn(t,e){this.x=t,this.y=e}Mn(),Tn.prototype={clone:function(){return new Tn(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),o=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Tn.convert=function(t){return t instanceof Tn?t:Array.isArray(t)?new Tn(t[0],t[1]):t};var Dn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t},e}($n);Dn.prototype.bytesPerElement=4,sn.register("StructArrayLayout2i4",Dn);var Ln=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var o=4*t;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=n,this.int16[o+3]=i,t},e}($n);Ln.prototype.bytesPerElement=8,sn.register("StructArrayLayout4i8",Ln);var Un=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,o)},e.prototype.emplace=function(t,e,r,n,i,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,t},e}($n);Un.prototype.bytesPerElement=12,sn.register("StructArrayLayout2i4i12",Un);var jn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,o)},e.prototype.emplace=function(t,e,r,n,i,o,a){var s=4*t,u=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[u+4]=n,this.uint8[u+5]=i,this.uint8[u+6]=o,this.uint8[u+7]=a,t},e}($n);jn.prototype.bytesPerElement=8,sn.register("StructArrayLayout2i4ub8",jn);var qn=function(t){var e,r=(e=!0,function(t,r){var n=e?function(){if(r){var e=r.apply(t,arguments);return r=null,e}}:function(){};return e=!1,n}),n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function i(){t.apply(this,arguments)}return n(),t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},i.prototype.emplaceBack=function(t,e,r,n,i,o,a,s){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,o,a,s)},i.prototype.emplace=function(t,e,r,n,i,o,a,s,u){var l=8*t;return this.uint16[l+0]=e,this.uint16[l+1]=r,this.uint16[l+2]=n,this.uint16[l+3]=i,this.uint16[l+4]=o,this.uint16[l+5]=a,this.uint16[l+6]=s,this.uint16[l+7]=u,t},i}($n);qn.prototype.bytesPerElement=16,sn.register("StructArrayLayout8ui16",qn);var Nn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s,u,l,c,p){var f=this.length;return this.resize(f+1),this.emplace(f,t,e,r,n,i,o,a,s,u,l,c,p)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,u,l,c,p,f){var h=12*t;return this.int16[h+0]=e,this.int16[h+1]=r,this.int16[h+2]=n,this.int16[h+3]=i,this.uint16[h+4]=o,this.uint16[h+5]=a,this.uint16[h+6]=s,this.uint16[h+7]=u,this.int16[h+8]=l,this.int16[h+9]=c,this.int16[h+10]=p,this.int16[h+11]=f,t},e}($n);Nn.prototype.bytesPerElement=24,sn.register("StructArrayLayout4i4ui4i24",Nn);var Rn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t},e}($n);Rn.prototype.bytesPerElement=12,sn.register("StructArrayLayout3f12",Rn);var Gn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint32[r+0]=e,t},e}($n);Gn.prototype.bytesPerElement=4,sn.register("StructArrayLayout1ul4",Gn);var Xn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s,u,l,c){var p=this.length;return this.resize(p+1),this.emplace(p,t,e,r,n,i,o,a,s,u,l,c)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,u,l,c,p){var f=12*t,h=6*t;return this.int16[f+0]=e,this.int16[f+1]=r,this.int16[f+2]=n,this.int16[f+3]=i,this.int16[f+4]=o,this.int16[f+5]=a,this.uint32[h+3]=s,this.uint16[f+8]=u,this.uint16[f+9]=l,this.int16[f+10]=c,this.int16[f+11]=p,t},e}($n);Xn.prototype.bytesPerElement=24,sn.register("StructArrayLayout6i1ul2ui2i24",Xn);var Yn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,o)},e.prototype.emplace=function(t,e,r,n,i,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,t},e}($n);Yn.prototype.bytesPerElement=12,sn.register("StructArrayLayout2i2i2i12",Yn);var Hn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var o=12*t,a=3*t;return this.uint8[o+0]=e,this.uint8[o+1]=r,this.float32[a+1]=n,this.float32[a+2]=i,t},e}($n);Hn.prototype.bytesPerElement=12,sn.register("StructArrayLayout2ub2f12",Hn);var Zn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s,u,l,c,p,f,h,y,d,v){var m=this.length;return this.resize(m+1),this.emplace(m,t,e,r,n,i,o,a,s,u,l,c,p,f,h,y,d,v)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,u,l,c,p,f,h,y,d,v,m){var g=24*t,x=12*t,b=48*t;return this.int16[g+0]=e,this.int16[g+1]=r,this.uint16[g+2]=n,this.uint16[g+3]=i,this.uint32[x+2]=o,this.uint32[x+3]=a,this.uint32[x+4]=s,this.uint16[g+10]=u,this.uint16[g+11]=l,this.uint16[g+12]=c,this.float32[x+7]=p,this.float32[x+8]=f,this.uint8[b+36]=h,this.uint8[b+37]=y,this.uint8[b+38]=d,this.uint32[x+10]=v,this.int16[g+22]=m,t},e}($n);Zn.prototype.bytesPerElement=48,sn.register("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Zn);var Jn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s,u,l,c,p,f,h,y,d,v,m,g,x,b,_,w,S,A,k){var I=this.length;return this.resize(I+1),this.emplace(I,t,e,r,n,i,o,a,s,u,l,c,p,f,h,y,d,v,m,g,x,b,_,w,S,A,k)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,u,l,c,p,f,h,y,d,v,m,g,x,b,_,w,S,A,k,I){var B=30*t,z=15*t;return this.int16[B+0]=e,this.int16[B+1]=r,this.int16[B+2]=n,this.int16[B+3]=i,this.int16[B+4]=o,this.int16[B+5]=a,this.int16[B+6]=s,this.int16[B+7]=u,this.uint16[B+8]=l,this.uint16[B+9]=c,this.uint16[B+10]=p,this.uint16[B+11]=f,this.uint16[B+12]=h,this.uint16[B+13]=y,this.uint16[B+14]=d,this.uint16[B+15]=v,this.uint16[B+16]=m,this.uint16[B+17]=g,this.uint16[B+18]=x,this.uint16[B+19]=b,this.uint16[B+20]=_,this.uint16[B+21]=w,this.uint32[z+11]=S,this.float32[z+12]=A,this.float32[z+13]=k,this.float32[z+14]=I,t},e}($n);Jn.prototype.bytesPerElement=60,sn.register("StructArrayLayout8i14ui1ul3f60",Jn);var Kn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}($n);Kn.prototype.bytesPerElement=4,sn.register("StructArrayLayout1f4",Kn);var Wn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t},e}($n);Wn.prototype.bytesPerElement=6,sn.register("StructArrayLayout3i6",Wn);var Qn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=2*t,o=4*t;return this.uint32[i+0]=e,this.uint16[o+2]=r,this.uint16[o+3]=n,t},e}($n);Qn.prototype.bytesPerElement=8,sn.register("StructArrayLayout1ul2ui8",Qn);var ti=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t},e.prototype.get=function(t){var e=3*t;return[this.uint16[e+0],this.uint16[e+1],this.uint16[e+2]]},e}($n);ti.prototype.bytesPerElement=6,sn.register("StructArrayLayout3ui6",ti);var ei=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint32[i+0]=e,this.uint32[i+1]=r,this.uint32[i+2]=n,t},e.prototype.copyFrom3ui6=function(t){if(!(t instanceof ti))throw new Error("expect array to be type of StructArrayLayout3ui6");this.clear();for(let e=0;e<t.length;e++){let r=t.get(e);this.emplaceBack(r[0],r[1],r[2])}},e}($n);ei.prototype.bytesPerElement=12,sn.register("StructArrayLayout3ul12",ei);var ri=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t},e.prototype.get=function(t){var e=2*t;return[this.uint16[e+0],this.uint16[e+1]]},e}($n);ri.prototype.bytesPerElement=4,sn.register("StructArrayLayout2ui4",ri);var ni=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint32[n+0]=e,this.uint32[n+1]=r,t},e.prototype.copyFrom2ui4=function(t){if(!(t instanceof ri))throw new Error("expect array to be type of StructArrayLayout2ui4");this.clear();for(let e=0;e<t.length;e++){let r=t.get(e);this.emplaceBack(r[0],r[1])}},e}($n);ni.prototype.bytesPerElement=8,sn.register("StructArrayLayout2ul8",ni);var ii=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint16[r+0]=e,t},e}($n);ii.prototype.bytesPerElement=2,sn.register("StructArrayLayout1ui2",ii);var oi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t},e}($n);oi.prototype.bytesPerElement=8,sn.register("StructArrayLayout2f8",oi);var ai=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var o=4*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=n,this.float32[o+3]=i,t},e}($n);ai.prototype.bytesPerElement=16,sn.register("StructArrayLayout4f16",ai);var si=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,o)},e.prototype.emplace=function(t,e,r,n,i,o,a){var s=6*t;return this.float32[s+0]=e,this.float32[s+1]=r,this.float32[s+2]=n,this.float32[s+3]=i,this.float32[s+4]=o,this.float32[s+5]=a,t},e}($n);si.prototype.bytesPerElement=24,sn.register("StructArrayLayout6f24",si);var ui=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,o,a,s)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,u){var l=8*t;return this.float32[l+0]=e,this.float32[l+1]=r,this.float32[l+2]=n,this.float32[l+3]=i,this.float32[l+4]=o,this.float32[l+5]=a,this.float32[l+6]=s,this.float32[l+7]=u,t},e}($n);ui.prototype.bytesPerElement=32,sn.register("StructArrayLayout8f32",ui);var li=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s,u,l,c,p){var f=this.length;return this.resize(f+1),this.emplace(f,t,e,r,n,i,o,a,s,u,l,c,p)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,u,l,c,p,f){var h=12*t;return this.float32[h+0]=e,this.float32[h+1]=r,this.float32[h+2]=n,this.float32[h+3]=i,this.float32[h+4]=o,this.float32[h+5]=a,this.float32[h+6]=s,this.float32[h+7]=u,this.float32[h+8]=l,this.float32[h+9]=c,this.float32[h+10]=p,this.float32[h+11]=f,t},e}($n);li.prototype.bytesPerElement=48,sn.register("StructArrayLayout12f48",li);var ci=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},r.anchorPoint.get=function(){return new pointGeometry(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Fn);ci.prototype.size=24;var pi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new ci(this,t)},e}(Xn);sn.register("CollisionBoxArray",pi);var fi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},r.associatedIconIndex.set=function(t){this._structArray.int16[this._pos2+22]=t},Object.defineProperties(e.prototype,r),e}(Fn);fi.prototype.size=48;var hi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new fi(this,t)},e}(Zn);sn.register("PlacedSymbolArray",hi);var yi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.rightJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+2]=t},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.centerJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+3]=t},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.leftJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+4]=t},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.verticalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+5]=t},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.placedIconSymbolIndex.set=function(t){this._structArray.int16[this._pos2+6]=t},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.verticalPlacedIconSymbolIndex.set=function(t){this._structArray.int16[this._pos2+7]=t},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.key.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.textBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.verticalTextBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+13]=t},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.iconBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+14]=t},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+15]=t},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.verticalIconBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+16]=t},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.featureIndex.set=function(t){this._structArray.uint16[this._pos2+17]=t},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numHorizontalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+18]=t},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numVerticalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+19]=t},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numIconVertices.set=function(t){this._structArray.uint16[this._pos2+20]=t},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.numVerticalIconVertices.set=function(t){this._structArray.uint16[this._pos2+21]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+11]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+11]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+12]},r.textBoxScale.set=function(t){this._structArray.float32[this._pos4+12]=t},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.set=function(t){this._structArray.float32[this._pos4+13]=t},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.set=function(t){this._structArray.float32[this._pos4+14]=t},Object.defineProperties(e.prototype,r),e}(Fn);yi.prototype.size=60;var di=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new yi(this,t)},e}(Jn);sn.register("SymbolInstanceArray",di);var vi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,r),e}(Fn);vi.prototype.size=4;var mi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new vi(this,t)},e}(Kn);sn.register("GlyphOffsetArray",mi);var gi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(t){this._structArray.int16[this._pos2+0]=t},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(t){this._structArray.int16[this._pos2+1]=t},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,r),e}(Fn);gi.prototype.size=6;var xi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new gi(this,t)},e}(Wn);sn.register("SymbolLineVertexArray",xi);var bi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,r),e}(Fn);bi.prototype.size=8;var _i=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new bi(this,t)},e}(Qn);sn.register("FeatureIndexArray",_i);var wi,Si=(wi=!0,function(t,e){var r=wi?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return wi=!1,r}),Ai=Si(void 0,(function(){return Ai.toString().search("(((.+)+)+)+$").toString().constructor(Ai).search("(((.+)+)+)+$")}));Ai();var ki=function(t,e,r){this.property=t,this.value=e,this.parameters=r};ki.prototype.isConstant=function(){return"constant"===this.value.kind},ki.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},ki.prototype.evaluate=function(t,e,r){return this.property.evaluate(this.value,this.parameters,t,e,r)};var Ii,Bi=(Ii=!0,function(t,e){var r=Ii?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Ii=!1,r}),zi=Bi(void 0,(function(){return zi.toString().search("(((.+)+)+)+$").toString().constructor(zi).search("(((.+)+)+)+$")}));function Vi(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function Pi(t){return!!t.expression&&t.expression.interpolated}zi();var Ci={},Fi=function(t,e){this.gl=t.gl,this.location=e};Ci.Uniform1i=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(Fi),Ci.Uniform1f=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(Fi),Ci.Uniform2f=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){(t[0]!==this.current[0]||t[1]!==this.current[1])&&(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},e}(Fi),Ci.Uniform3f=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){(t[0]!==this.current[0]||t[1]!==this.current[1]||t[2]!==this.current[2])&&(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},e}(Fi),Ci.Uniform4f=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){(t[0]!==this.current[0]||t[1]!==this.current[1]||t[2]!==this.current[2]||t[3]!==this.current[3])&&(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},e}(Fi),Ci.UniformColor=function(t){function e(e,r){t.call(this,e,r),this.current=xt.transparent}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){(t.r!==this.current.r||t.g!==this.current.g||t.b!==this.current.b||t.a!==this.current.a)&&(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},e}(Fi);var $i=new Float32Array(16);Ci.UniformMatrix4f=function(t){var e,r=(e=!0,function(t,r){var n=e?function(){if(r){var e=r.apply(t,arguments);return r=null,e}}:function(){};return e=!1,n}),n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function i(e,r){t.call(this,e,r),this.current=$i}return n(),t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.set=function(t){this.gl.uniformMatrix4fv(this.location,!1,t)},i}(Fi);var Ei,Oi=(Ei=!0,function(t,e){var r=Ei?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Ei=!1,r}),Mi=Oi(void 0,(function(){return Mi.toString().search("(((.+)+)+)+$").toString().constructor(Mi).search("(((.+)+)+)+$")}));function Ti(){}Mi(),Ti.toVertexBuffer=function(t,e,r,n){var i=o.h.createVertexBuffer({context:t,typedArray:e.arrayBuffer,usage:n?o.A.DYNAMIC_DRAW:o.A.STATIC_DRAW});return i.vertexArrayDestroyable=!1,i.bytesPerElement=e.bytesPerElement,i.length=e.length,i.attributes=r,i.itemSize=e.bytesPerElement,i.dynamicDraw=n,!n&&delete e.arrayBuffer,i},Ti.toIndexBuffer=function(t,e,r){if(0!==e.length){var i=o.h.createIndexBuffer({context:t,typedArray:e.arrayBuffer,usage:o.A.STATIC_DRAW,indexDatatype:void 0!==e.uint16?n.IndexDatatype.UNSIGNED_SHORT:n.IndexDatatype.UNSIGNED_INT});return i.vertexArrayDestroyable=!1,i.dynamicDraw=r,!i.dynamicDraw&&delete e.arrayBuffer,i}},Ti.toRenderState=function(t,e,r){var n=a._0x438131.DISABLED;t.blendFunction[0]==i.B.ONE&&t.blendFunction[1]==i.B.ONE_MINUS_SRC_ALPHA&&(n=a._0x438131.ALPHA_BLEND);var o={frontFace:r.frontFace,cull:{enabled:r.enable,face:r.mode},depthRange:{near:e.range[0],far:e.range[1]},depthTest:{enabled:e.func!==i.B.ALWAYS,func:e.func},depthMask:e.mask,colorMask:{red:t.mask[0],green:t.mask[1],blue:t.mask[2],alpha:t.mask[3]},blending:n};return a.u.fromCache(o)},Ti.toComponentDatatype=function(t){switch(t){case"Int8":return r.ComponentDatatype.BYTE;case"Uint8":return r.ComponentDatatype.UNSIGNED_BYTE;case"Int16":return r.ComponentDatatype.SHORT;case"Uint16":return r.ComponentDatatype.UNSIGNED_SHORT;case"Int32":return r.ComponentDatatype.INT;case"Uint32":return r.ComponentDatatype.UNSIGNED_INT;default:return r.ComponentDatatype.FLOAT}},Ti.mbxAttributeToCesiumVertexArrtribute=function(t,e,n,i){var o=this.toComponentDatatype(t.type);r.ComponentDatatype.getSizeInBytes(o);var a=e.bytesPerElement,s=t.offset+a*(i||0);return{name:t.name,index:n,vertexBuffer:e,componentsPerAttribute:t.components,componentDatatype:o,offsetInBytes:s,strideInBytes:a,normalize:!1}};var Di,Li=(Di=!0,function(t,e){var r=Di?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Di=!1,r}),Ui=Li(void 0,(function(){return Ui.toString().search("(((.+)+)+)+$").toString().constructor(Ui).search("(((.+)+)+)+$")}));Ui();var ji=function(){this.ids=[],this.positions=[],this.indexed=!1};function qi(t,e,r,n){if(!(r>=n)){for(var i=t[r+n>>1],o=r-1,a=n+1;;){do{o++}while(t[o]<i);do{a--}while(t[a]>i);if(o>=a)break;Ni(t,o,a),Ni(e,3*o,3*a),Ni(e,3*o+1,3*a+1),Ni(e,3*o+2,3*a+2)}qi(t,e,r,a),qi(t,e,a+1,n)}}function Ni(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}ji.prototype.add=function(t,e,r,n){this.ids.push(t),this.positions.push(e,r,n)},ji.prototype.getPositions=function(t){for(var e=0,r=this.ids.length-1;e<r;){var n=e+r>>1;this.ids[n]>=t?r=n:e=n+1}for(var i=[];this.ids[e]===t;){var o=this.positions[3*e],a=this.positions[3*e+1],s=this.positions[3*e+2];i.push({index:o,start:a,end:s}),e++}return i},ji.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return qi(r,n,0,r.length-1),e&&e.push(r.buffer,n.buffer),{ids:r,positions:n}},ji.deserialize=function(t){var e=new ji;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e},sn.register("FeaturePositionMap",ji);var Ri,Gi=(Ri=!0,function(t,e){var r=Ri?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Ri=!1,r}),Xi=Gi(void 0,(function(){return Xi.toString().search("(((.+)+)+)+$").toString().constructor(Xi).search("(((.+)+)+)+$")}));function Yi(t,e,r){return Math.min(r,Math.max(e,t))}function Hi(t,e){return 256*(t=Yi(Math.floor(t),0,255))+(e=Yi(Math.floor(e),0,255))}function Zi(t){return[Hi(255*t.r,255*t.g),Hi(255*t.b,255*t.a)]}Xi();var Ji=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map((function(t){return"u_"+t})),this.type=r,this.maxValue=-1/0};Ji.prototype.defines=function(){return this.names.map((function(t){return"HAS_UNIFORM_u_"+t}))},Ji.prototype.setConstantPatternPositions=function(){},Ji.prototype.populatePaintArray=function(){},Ji.prototype.updatePaintArray=function(){},Ji.prototype.upload=function(){},Ji.prototype.destroy=function(){},Ji.prototype.setUniforms=function(t,e,r,n){e.set(n.constantOr(this.value))},Ji.prototype.getBinding=function(t,e){return"color"===this.type?new Ci.UniformColor(t,e):new Ci.Uniform1f(t,e)},Ji.prototype.setUniformMap=function(t,e,r,n){var i=this;t[e]=function(){var t=n.get(r).constantOr(i.value);return"color"===i.type&&(t.red=t.r,t.green=t.g,t.blue=t.b,t.alpha=t.a),t}},Ji.serialize=function(t){var e=t.value,r=t.names,n=t.type;return{value:sn.serialize(e),names:r,type:n}},Ji.deserialize=function(t){var e=t.value,r=t.names,n=t.type;return new Ji(sn.deserialize(e),r,n)};var Ki=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map((function(t){return"u_"+t})),this.type=r,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};Ki.prototype.defines=function(){return this.names.map((function(t){return"HAS_UNIFORM_u_"+t}))},Ki.prototype.populatePaintArray=function(){},Ki.prototype.updatePaintArray=function(){},Ki.prototype.upload=function(){},Ki.prototype.destroy=function(){},Ki.prototype.setConstantPatternPositions=function(t,e){this.patternPositions.patternTo=t.tlbr,this.patternPositions.patternFrom=e.tlbr},Ki.prototype.setUniforms=function(t,e,r,n,i){var o=this.patternPositions;"u_pattern_to"===i&&o.patternTo&&e.set(s.e(o.patternTo[0],o.patternTo[1],o.patternTo[2],o.patternTo[3])),"u_pattern_from"===i&&o.patternFrom&&e.set(s.e(o.patternFrom[0],o.patternFrom[1],o.patternFrom[2],o.patternFrom[3]))},Ki.prototype.getBinding=function(t,e){return new Ci.Uniform4f(t,e)},Ki.prototype.setUniformMap=function(t,e,r,n){var i=this.patternPositions;t[e]=function(){return"u_pattern_to"===e&&i.patternTo?new s.e(i.patternTo[0],i.patternTo[1],i.patternTo[2],i.patternTo[3]):"u_pattern_from"===e&&i.patternFrom?new s.e(i.patternFrom[0],i.patternFrom[1],i.patternFrom[2],i.patternFrom[3]):void console.log("CrossFadedConstantBinder is not support")}};var Wi=function(t,e,r,n){this.expression=t,this.names=e,this.type=r,this.uniformNames=this.names.map((function(t){return"a_"+t})),this.maxValue=-1/0,this.paintVertexAttributes=e.map((function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?2:1,offset:0}})),this.paintVertexArray=new n};Wi.prototype.defines=function(){return[]},Wi.prototype.setConstantPatternPositions=function(){},Wi.prototype.populatePaintArray=function(t,e,r,n){var i=this.paintVertexArray,o=i.length;i.reserve(t);var a=this.expression.evaluate(new gn(0),e,{},[],n);if("color"===this.type)for(var s=Zi(a),u=o;u<t;u++)i.emplaceBack(s[0],s[1]);else{for(var l=o;l<t;l++)i.emplaceBack(a);this.maxValue=Math.max(this.maxValue,a)}},Wi.prototype.updatePaintArray=function(t,e,r,n){var i=this.paintVertexArray,o=this.expression.evaluate({zoom:0},r,n);if("color"===this.type)for(var a=Zi(o),s=t;s<e;s++)i.emplace(s,a[0],a[1]);else{for(var u=t;u<e;u++)i.emplace(u,o);this.maxValue=Math.max(this.maxValue,o)}},Wi.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=Ti.toVertexBuffer(t,this.paintVertexArray,this.paintVertexAttributes))},Wi.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Wi.prototype.setUniforms=function(t,e){e.set(0)},Wi.prototype.getBinding=function(t,e){return new Ci.Uniform1f(t,e)},Wi.prototype.setUniformMap=function(t,e,r,n){t[e]=function(){return 0}};var Qi=function(t,e,r,n,i,o){this.expression=t,this.names=e,this.uniformNames=this.names.map((function(t){return"u_"+t+"_t"})),this.type=r,this.useIntegerZoom=n,this.zoom=i,this.maxValue=-1/0;var a=o;this.paintVertexAttributes=e.map((function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?4:2,offset:0}})),this.paintVertexArray=new a};Qi.prototype.defines=function(){return[]},Qi.prototype.setConstantPatternPositions=function(){},Qi.prototype.populatePaintArray=function(t,e,r,n){var i=this.paintVertexArray,o=i.length;i.reserve(t);var a=this.expression.evaluate(new gn(this.zoom),e,{},[],n),s=this.expression.evaluate(new gn(this.zoom+1),e,{},[],n);if("color"===this.type)for(var u=Zi(a),l=Zi(s),c=o;c<t;c++)i.emplaceBack(u[0],u[1],l[0],l[1]);else{for(var p=o;p<t;p++)i.emplaceBack(a,s);this.maxValue=Math.max(this.maxValue,a,s)}},Qi.prototype.updatePaintArray=function(t,e,r,n){var i=this.paintVertexArray,o=this.expression.evaluate({zoom:this.zoom},r,n),a=this.expression.evaluate({zoom:this.zoom+1},r,n);if("color"===this.type)for(var s=Zi(o),u=Zi(a),l=t;l<e;l++)i.emplace(l,s[0],s[1],u[0],u[1]);else{for(var c=t;c<e;c++)i.emplace(c,o,a);this.maxValue=Math.max(this.maxValue,o,a)}},Qi.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=Ti.toVertexBuffer(t,this.paintVertexArray,this.paintVertexAttributes))},Qi.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Qi.prototype.interpolationFactor=function(t){return this.useIntegerZoom&&(t=Math.floor(t)),Yi(this.expression.interpolationFactor(t,this.zoom,this.zoom+1),0,1)},Qi.prototype.setUniforms=function(t,e,r){e.set(this.interpolationFactor(r.zoom))},Qi.prototype.getBinding=function(t,e){return new Ci.Uniform1f(t,e)},Qi.prototype.setUniformMap=function(t,e,r,n){var i=this;t[e]=function(){return i.interpolationFactor(0)}};var to=function(t,e,r,n,i,o,a){this.expression=t,this.names=e,this.type=r,this.uniformNames=this.names.map((function(t){return"u_"+t+"_t"})),this.useIntegerZoom=n,this.zoom=i,this.maxValue=-1/0,this.layerId=a,this.paintVertexAttributes=e.map((function(t){return{name:"a_"+t,type:"Float32",components:4,offset:0}})),this.zoomInPaintVertexArray=new o,this.zoomOutPaintVertexArray=new o};to.prototype.defines=function(){return[]},to.prototype.setConstantPatternPositions=function(){},to.prototype.populatePaintArray=function(t,e,r){var n=this.zoomInPaintVertexArray,i=this.zoomOutPaintVertexArray,o=this.layerId,a=n.length;if(n.reserve(t),i.reserve(t),r&&e.patterns&&e.patterns[o]){var s=e.patterns[o],u=s.min,l=s.mid,c=s.max,p=r[u],f=r[l],h=r[c];if(!p||!f||!h)return;for(var y=a;y<t;y++)n.emplaceBack(f.tl[0],f.tl[1],f.br[0],f.br[1],p.tl[0],p.tl[1],p.br[0],p.br[1]),i.emplaceBack(f.tl[0],f.tl[1],f.br[0],f.br[1],h.tl[0],h.tl[1],h.br[0],h.br[1])}},to.prototype.updatePaintArray=function(t,e,r,n,i){var o=this.zoomInPaintVertexArray,a=this.zoomOutPaintVertexArray,s=this.layerId;if(i&&r.patterns&&r.patterns[s]){var u=r.patterns[s],l=u.min,c=u.mid,p=u.max,f=i[l],h=i[c],y=i[p];if(!f||!h||!y)return;for(var d=t;d<e;d++)o.emplace(d,h.tl[0],h.tl[1],h.br[0],h.br[1],f.tl[0],f.tl[1],f.br[0],f.br[1]),a.emplace(d,h.tl[0],h.tl[1],h.br[0],h.br[1],y.tl[0],y.tl[1],y.br[0],y.br[1])}},to.prototype.upload=function(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomInPaintVertexArray.length>0&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray.length>0&&(this.zoomInPaintVertexBuffer=Ti.toVertexBuffer(t,this.zoomInPaintVertexArray,this.paintVertexAttributes),this.zoomOutPaintVertexBuffer=Ti.toVertexBuffer(t,this.zoomOutPaintVertexArray,this.paintVertexAttributes))},to.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},to.prototype.setUniforms=function(t,e){e.set(0)},to.prototype.getBinding=function(t,e){return new Uniform1f(t,e)},to.prototype.setUniformMap=function(t,e,r,n){t[e]=function(){return 0}};class eo{constructor(){this.binders={},this.cacheKey="",this._buffers=[]}static createDynamic(t,e,r){const n=new eo,i=[];for(const s in t.paint._values){if(!r(s))continue;const u=t.paint.get(s);if(!(u instanceof ki&&Vi(u.property.specification)))continue;const l=(o=s,a=t.type,void 0,{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"text-show-background":["show-background"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]},{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"text-show-background":["show-background"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[o]||[o.replace(a+"-","").replace(/-/g,"_")]),c=u.property.specification.type,p=u.property.useIntegerZoom;if("cross-faded"===u.property.specification["property-type"]||"cross-faded-data-driven"===u.property.specification["property-type"])if("constant"===u.value.kind)n.binders[s]=new Ki(u.value.value,l,c),i.push("/u_"+s);else{const r=no(s,c,"source");n.binders[s]=new to(u.value,l,c,p,e,r,t.id),i.push("/a_"+s)}else if("constant"===u.value.kind)n.binders[s]=new Ji(u.value.value,l,c),i.push("/u_"+s);else if("source"===u.value.kind){const t=no(s,c,"source");n.binders[s]=new Wi(u.value,l,c,t),i.push("/a_"+s)}else{const t=no(s,c,"composite");n.binders[s]=new Qi(u.value,l,c,p,e,t),i.push("/z_"+s)}}var o,a;return n.cacheKey=i.sort().join(""),n}populatePaintArrays(t,e,r,n,i){for(const r in this.binders){this.binders[r].populatePaintArray(t,e,n,i)}}setConstantPatternPositions(t,e){for(const r in this.binders){this.binders[r].setConstantPatternPositions(t,e)}}updatePaintArrays(t,e,r,n,i){let o=!1;for(const a in t){const s=e.getPositions(+a);for(const e of s){const s=r.feature(e.index);for(const r in this.binders){const u=this.binders[r];if(!(u instanceof Ji||u instanceof Ki)&&!0===u.expression.isStateDependent){const l=n.paint.get(r);u.expression=l.value,u.updatePaintArray(e.start,e.end,s,t[a],i),o=!0}}}}return o}defines(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t,e){const r=[];for(const n in this.binders){const i=this.binders[n];for(const o of i.uniformNames)if(e[o]){const a=i.getBinding(t,e[o]);r.push({name:o,property:n,binding:a})}}return r}setUniforms(t,e,r,n){for(const{name:i,property:o,binding:a}of e)this.binders[o].setUniforms(t,a,n,r.get(o),i)}updatePatternPaintBuffers(t){const e=[];for(const r in this.binders){const n=this.binders[r];if(n instanceof to){const r=2===t.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;r&&e.push(r)}else(n instanceof Wi||n instanceof Qi)&&n.paintVertexBuffer&&e.push(n.paintVertexBuffer)}this._buffers=e}upload(t){for(const e in this.binders)this.binders[e].upload(t);const e=[];for(const t in this.binders){const r=this.binders[t];(r instanceof Wi||r instanceof Qi)&&r.paintVertexBuffer&&e.push(r.paintVertexBuffer)}this._buffers=e}getAttributeLocation(){for(var t=0,e={},r=0;r<this.layoutAttributes.length;r++){e[this.layoutAttributes[r].name]=r,t++}for(var n=this.getPaintVertexBuffers(),i=0;n&&i<n.length;i++)for(var o=n[i],a=0;a<o.attributes.length;a++){e[o.attributes[a].name]=t++}return e}getUniformMaps(t,e,r){for(var n in this.binders)for(var i=this.binders[n],o=0,a=i.uniformNames;o<a.length;o+=1){var s=a[o];t[s]&&i.setUniformMap(r,s,n,e)}for(var u in t)!r[u]&&u.indexOf("_t")>-1&&(r[u]=function(){return 0});return r}destroy(){for(const t in this.binders)this.binders[t].destroy()}}class ro{constructor(t,e,r,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(const i of e)this.programConfigurations[i.id]=eo.createDynamic(i,r,n),this.programConfigurations[i.id].layoutAttributes=t;this.needsUpload=!1,this._featureMap=new ji,this._bufferOffset=0}populatePaintArrays(t,e,r,n,i){for(const o in this.programConfigurations)this.programConfigurations[o].populatePaintArrays(t,e,r,n,i);void 0!==e.id&&this._featureMap.add(+e.id,r,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,e,r,n){for(const i of r)this.needsUpload=this.programConfigurations[i.id].updatePaintArrays(t,this._featureMap,e,i,n)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}function no(t,e,r){var n={color:{source:oi,composite:ai},number:{source:Kn,composite:oi}},i={"line-pattern":{source:ui,composite:ui},"fill-pattern":{source:ui,composite:ui},"fill-extrusion-pattern":{source:ui,composite:ui}}[t];return i&&i[r]||n[e][r]}sn.register("ConstantBinder",Ji),sn.register("CrossFadedConstantBinder",Ki),sn.register("SourceExpressionBinder",Wi),sn.register("CrossFadedCompositeBinder",to),sn.register("CompositeExpressionBinder",Qi),sn.register("ProgramConfiguration",eo,{omit:["_buffers"]}),sn.register("ProgramConfigurationSet",ro);var io,oo=(io=!0,function(t,e){var r=io?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return io=!1,r}),ao=oo(void 0,(function(){return ao.toString().search("(((.+)+)+)+$").toString().constructor(ao).search("(((.+)+)+)+$")}));function so(t,e,r,n,i){for(var o=i.patternDependencies,a=0,s=e;a<s.length;a+=1){var u=s[a],l=u.paint.get(t+"-pattern").value;if("constant"!==l.kind){var c=l.evaluate({zoom:n-1},r,{},i.availableImages),p=l.evaluate({zoom:n},r,{},i.availableImages),f=l.evaluate({zoom:n+1},r,{},i.availableImages);c=c&&c.name?c.name:c,p=p&&p.name?p.name:p,f=f&&f.name?f.name:f,o[c]=!0,o[p]=!0,o[f]=!0,r.patterns[u.id]={min:c,mid:p,max:f}}}return r}ao();var uo,lo=(uo=!0,function(t,e){var r=uo?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return uo=!1,r}),co=lo(void 0,(function(){return co.toString().search("(((.+)+)+)+$").toString().constructor(co).search("(((.+)+)+)+$")}));co();var po=["Unknown","Point","LineString","Polygon"],fo=G([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,ho=Math.cos(Math.PI/180*37.5),yo=Math.pow(2,14)/.5,vo=function(t){this.zoom=t.zoom,this.overscaling=1,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new jn,this.indexArray=new ti,this.programConfigurations=new ro(fo,t.layers,t.zoom),this.segments=new Vn,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function mo(t,e,r,n,i){go(t,e,r||0,n||t.length-1,i||bo)}function go(t,e,r,n,i){for(;n>r;){if(n-r>600){var o=n-r+1,a=e-r+1,s=Math.log(o),u=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*u*(o-u)/o)*(a-o/2<0?-1:1);go(t,e,Math.max(r,Math.floor(e-a*u/o+l)),Math.min(n,Math.floor(e+(o-a)*u/o+l)),i)}var c=t[e],p=r,f=n;for(xo(t,r,e),i(t[n],c)>0&&xo(t,r,n);p<f;){for(xo(t,p,f),p++,f--;i(t[p],c)<0;)p++;for(;i(t[f],c)>0;)f--}0===i(t[r],c)?xo(t,r,f):xo(t,++f,n),f<=e&&(r=f+1),e<=f&&(n=f-1)}}function xo(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function bo(t,e){return t<e?-1:t>e?1:0}vo.prototype.populate=function(t,e){this.hasPattern=!1;for(var r=this.layers[0].layout.get("line-sort-key"),n=[],i=0,o=t;i<o.length;i+=1){var a=o[i],s=a.feature,u=a.index,l=a.sourceLayerIndex;if(this.layers[0]._featureFilter(new gn(0),s)){var c=kn(s),p=r?r.evaluate(s,{}):void 0,f={id:s.id,properties:s.properties,type:s.type,sourceLayerIndex:l,index:u,geometry:c,patterns:{},sortKey:p};n.push(f)}}r&&n.sort((function(t,e){return t.sortKey-e.sortKey}));for(var h=0,y=n;h<y.length;h+=1){var d=y[h],v=d,m=v.geometry,g=v.index,x=v.sourceLayerIndex;if(this.hasPattern){var b=so("line",this.layers,d,this.zoom,e);this.patternFeatures.push(b)}else this.addFeature(d,m,g,{});var _=t[g].feature;e.featureIndex.insert(_,m,g,x,this.index)}},vo.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},vo.prototype.addFeatures=function(t,e){for(var r=0,n=this.patternFeatures;r<n.length;r+=1){var i=n[r];this.addFeature(i,i.geometry,i.index,e)}},vo.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},vo.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},vo.prototype.upload=function(t){if(!this.uploaded){if(null==this.layoutVertexArray)return;var e=fo;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=Ti.toVertexBuffer(t,this.layoutVertexArray,e),this.cesiumIndexBuffer=Ti.toIndexBuffer(t,this.indexArray))}this.programConfigurations.upload(t),this.uploaded=!0},vo.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy()),this.programConfigurations.destroy(),this.segments.destroy())},vo.prototype.clear=function(){e.e(this.layoutVertexArray)&&(this.layoutVertexArray=null),e.e(this.indexArray)&&(this.indexArray=null)},vo.prototype.addFeature=function(t,e,r,n){for(var i=this.layers[0].layout,o=i.get("line-join").evaluate(t,{}),a=i.get("line-cap"),s=i.get("line-miter-limit"),u=i.get("line-round-limit"),l=0,c=e;l<c.length;l+=1){var p=c[l];this.addLine(p,t,o,a,s,u,r,n)}},vo.prototype.addLine=function(t,e,r,n,i,o,a,s){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+e.properties.mapbox_clip_start,this.clipEnd=+e.properties.mapbox_clip_end;for(var u=0;u<t.length-1;u++)this.totalDistance+=t[u].dist(t[u+1])}for(var l="Polygon"===po[e.type],c=t.length;c>=2&&t[c-1].equals(t[c-2]);)c--;for(var p=0;p<c-1&&t[p].equals(t[p+1]);)p++;if(!(c<(l?3:2))){"bevel"===r&&(i=1.05);var f=this.overscaling<=16?122880/(512*this.overscaling):0;if(10*c>Vn.MAX_VERTEX_ARRAY_LENGTH&&this.indexArray instanceof ti){let t=this.indexArray;this.indexArray=new ei,this.indexArray.copyFrom3ui6(t)}var h,y=this.segments.prepareSegment(10*c,this.layoutVertexArray,this.indexArray),d=void 0,v=void 0,m=void 0,g=void 0;this.e1=this.e2=-1,l&&(h=t[c-2],g=t[p].sub(h)._unit()._perp());for(var x=p;x<c;x++)if(!(v=l&&x===c-1?t[p+1]:t[x+1])||!t[x].equals(v)){g&&(m=g),h&&(d=h),h=t[x],g=v?v.sub(h)._unit()._perp():m;var b=(m=m||g).add(g);(0!==b.x||0!==b.y)&&b._unit();var _=m.x*g.x+m.y*g.y,w=b.x*g.x+b.y*g.y,S=0!==w?1/w:1/0,A=2*Math.sqrt(2-2*w),k=w<ho&&d&&v,I=m.x*g.y-m.y*g.x>0;if(k&&x>p){var B=h.dist(d);if(B>2*f){var z=h.sub(h.sub(d)._mult(f/B)._round());this.updateDistance(d,z),this.addCurrentVertex(z,m,0,0,y),d=z}}var V=d&&v,P=V?r:l?"butt":n;if(V&&"round"===P&&(S<o?P="miter":S<=2&&(P="fakeround")),"miter"===P&&S>i&&(P="bevel"),"bevel"===P&&(S>2&&(P="flipbevel"),S<i&&(P="miter")),d&&this.updateDistance(d,h),"miter"===P)b._mult(S),this.addCurrentVertex(h,b,0,0,y);else if("flipbevel"===P){if(S>100)b=g.mult(-1);else{var C=S*m.add(g).mag()/m.sub(g).mag();b._perp()._mult(C*(I?-1:1))}this.addCurrentVertex(h,b,0,0,y),this.addCurrentVertex(h,b.mult(-1),0,0,y)}else if("bevel"===P||"fakeround"===P){var F=-Math.sqrt(S*S-1),$=I?F:0,E=I?0:F;if(d&&this.addCurrentVertex(h,m,$,E,y),"fakeround"===P)for(var O=Math.round(180*A/Math.PI/20),M=1;M<O;M++){var T=M/O;if(.5!==T){var D=T-.5;T+=T*D*(T-1)*((1.0904+_*(_*(3.55645-1.43519*_)-3.2452))*D*D+(.848013+_*(.215638*_-1.06021)))}var L=g.sub(m)._mult(T)._add(m)._unit()._mult(I?-1:1);this.addHalfVertex(h,L.x,L.y,!1,I,0,y)}v&&this.addCurrentVertex(h,g,-$,-E,y)}else if("butt"===P)this.addCurrentVertex(h,b,0,0,y);else if("square"===P){var U=d?1:-1;this.addCurrentVertex(h,b,U,U,y)}else"round"===P&&(d&&(this.addCurrentVertex(h,m,0,0,y),this.addCurrentVertex(h,m,1,1,y,!0)),v&&(this.addCurrentVertex(h,g,-1,-1,y,!0),this.addCurrentVertex(h,g,0,0,y)));if(k&&x<c-1){var j=h.dist(v);if(j>2*f){var q=h.add(v.sub(h)._mult(f/j)._round());this.updateDistance(h,q),this.addCurrentVertex(q,g,0,0,y),h=q}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,a,s)}},vo.prototype.addCurrentVertex=function(t,e,r,n,i,o){void 0===o&&(o=!1);var a=e.x+e.y*r,s=e.y-e.x*r,u=-e.x+e.y*n,l=-e.y-e.x*n;this.addHalfVertex(t,a,s,o,!1,r,i),this.addHalfVertex(t,u,l,o,!0,-n,i),this.distance>yo/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,o))},vo.prototype.addHalfVertex=function(t,e,r,n,i,o,a){var s=t.x,u=t.y,l=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(u<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===o?0:o<0?-1:1)|(63&l)<<2,l>>6);var c=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),a.primitiveLength++),i?this.e2=c:this.e1=c},vo.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(yo-1):this.distance},sn.register("LineBucket",vo,{omit:["layers","patternFeatures"]});var _o,wo=(_o=!0,function(t,e){var r=_o?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return _o=!1,r}),So=wo(void 0,(function(){return So.toString().search("(((.+)+)+)+$").toString().constructor(So).search("(((.+)+)+)+$")}));function Ao(t){for(var e=0,r=0,n=t.length,i=n-1,o=void 0,a=void 0;r<n;i=r++)o=t[r],e+=((a=t[i]).x-o.x)*(o.y+a.y);return e}function ko(t,e){return e.area-t.area}So();var Io,Bo=(Io=!0,function(t,e){var r=Io?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Io=!1,r}),zo=Bo(void 0,(function(){return zo.toString().search("(((.+)+)+)+$").toString().constructor(zo).search("(((.+)+)+)+$")}));zo();var Vo,Po=(Vo=!0,function(t,e){var r=Vo?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Vo=!1,r}),Co=Po(void 0,(function(){return Co.toString().search("(((.+)+)+)+$").toString().constructor(Co).search("(((.+)+)+)+$")}));Co();var Fo=G([{name:"a_pos",components:2,type:"Int16"}],4).members,$o=function(t){this.zoom=t.zoom,this.overscaling=1,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Dn,this.indexArray=new ti,this.indexArray2=new ri,this.programConfigurations=new ro(Fo,t.layers,t.zoom),this.segments=new Vn,this.segments2=new Vn,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};$o.prototype.populate=function(t,e){this.hasPattern=function(t,e,r){for(var n=r.patternDependencies,i=!1,o=0,a=e;o<a.length;o+=1){var s=a[o].paint.get(t+"-pattern");!s.isConstant()&&(i=!0);var u=s.constantOr(null);u&&(i=!0,n[u.to]=!0,n[u.from]=!0)}return i}("fill",this.layers,e);for(var r=[],n=0,i=t;n<i.length;n+=1){var o=i[n],a=o.feature,s=o.index,u=o.sourceLayerIndex;if(this.layers[0]._featureFilter(new gn(0),a)){var l=kn(a),c={id:a.id,properties:a.properties,type:a.type,sourceLayerIndex:u,index:s,geometry:l,patterns:{},sortKey:undefined};r.push(c)}}for(var p=0,f=r;p<f.length;p+=1){var h=f[p],y=h,d=y.geometry,v=y.index,m=y.sourceLayerIndex;if(this.hasPattern){var g=so("fill",this.layers,h,this.zoom,e);this.patternFeatures.push(g)}else this.addFeature(h,d,v,{},e.indexData);var x=t[v].feature;e.featureIndex.insert(x,d,v,m,this.index)}},$o.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},$o.prototype.addFeatures=function(t,e){for(var r=0,n=this.patternFeatures;r<n.length;r+=1){var i=n[r];this.addFeature(i,i.geometry,i.index,e)}},$o.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},$o.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},$o.prototype.upload=function(t){if(!this.uploaded){if(null==this.layoutVertexArray)return;var e=Fo;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=Ti.toVertexBuffer(t,this.layoutVertexArray,e),this.cesiumIndexBuffer=Ti.toIndexBuffer(t,this.indexArray),this.cesiumIndexBuffer2=Ti.toIndexBuffer(t,this.indexArray2))}this.programConfigurations.upload(t),this.uploaded=!0},$o.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer&&this.cesiumIndexBuffer.destroy(),this.cesiumIndexBuffer2&&this.cesiumIndexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},$o.prototype.clear=function(){e.e(this.layoutVertexArray)&&(this.layoutVertexArray=null),e.e(this.indexArray)&&(this.indexArray=null),e.e(this.indexArray2)&&(this.indexArray2=null)},$o.prototype.addFeature=function(t,r,n,i,o){for(var a=0,s=function(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,o=[],a=0;a<r;a++){var s=Ao(t[a]);0!==s&&(t[a].area=Math.abs(s),void 0===i&&(i=s<0),i===s<0?(n&&o.push(n),n=[t[a]]):n.push(t[a]))}if(n&&o.push(n),e>1)for(var u=0;u<o.length;u++)o[u].length<=e||(mo(o[u],e,1,o[u].length-1,ko),o[u]=o[u].slice(0,e));return o}(r,500);a<s.length;a+=1){for(var l=s[a],c=0,p=0,f=l;p<f.length;p+=1){var h=f[p];c+=h.length}for(var y,d=this.segments.prepareSegment(c,this.layoutVertexArray,this.indexArray),v=d.vertexLength,m=[],g=[],x=0,b=l;x<b.length;x+=1){var _=b[x];if(0!==_.length){if(_!==l[0]&&g.push(m.length/2),h.length>Vn.MAX_VERTEX_ARRAY_LENGTH&&this.indexArray instanceof ti){let t=this.indexArray,e=this.indexArray2;this.indexArray=new ei,this.indexArray2=new ni,this.indexArray.copyFrom3ui6(t),this.indexArray2.copyFrom2ui4(e)}var w=this.segments2.prepareSegment(_.length,this.layoutVertexArray,this.indexArray2),S=w.vertexLength;this.layoutVertexArray.emplaceBack(_[0].x,_[0].y),this.indexArray2.emplaceBack(S+_.length-1,S),m.push(_[0].x),m.push(_[0].y);for(var A=1;A<_.length;A++)this.layoutVertexArray.emplaceBack(_[A].x,_[A].y),this.indexArray2.emplaceBack(S+A-1,S+A),m.push(_[A].x),m.push(_[A].y);w.vertexLength+=_.length,w.primitiveLength+=_.length}}y=e.e(o)&&e.e(o[t.id])?o[t.id]:u.z(m,g);for(var k=0;k<y.length;k+=3)this.indexArray.emplaceBack(v+y[k],v+y[k+1],v+y[k+2]);d.vertexLength+=c,d.primitiveLength+=y.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,i)},sn.register("FillBucket",$o,{omit:["layers","patternFeatures"]});var Eo,Oo=(Eo=!0,function(t,e){var r=Eo?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Eo=!1,r}),Mo=Oo(void 0,(function(){return Mo.toString().search("(((.+)+)+)+$").toString().constructor(Mo).search("(((.+)+)+)+$")}));function To(t,e,r,n,i){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=i,t.readFields(Do,this,e)}function Do(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){var r=t.readVarint()+t.pos;for(;t.pos<r;){var n=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[n]=i}}(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function Lo(t){for(var e,r,n=0,i=0,o=t.length,a=o-1;i<o;a=i++)e=t[i],n+=((r=t[a]).x-e.x)*(e.y+r.y);return n}Mo(),To.types=["Unknown","Point","LineString","Polygon"],To.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,n=1,i=0,o=0,a=0,s=[];t.pos<r;){if(i<=0){var u=t.readVarint();n=7&u,i=u>>3}i--,1===n||2===n?(o+=t.readSVarint(),a+=t.readSVarint(),1===n&&(e&&s.push(e),e=[]),e.push(new Tn(o,a))):7===n?e&&e.push(e[0].clone()):console.log("VectorTileFeature loadGeometry unknown command "+n)}return e&&s.push(e),s},To.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,o=0,a=1/0,s=-1/0,u=1/0,l=-1/0;t.pos<e;){if(n<=0){var c=t.readVarint();r=7&c,n=c>>3}if(n--,1===r||2===r)(i+=t.readSVarint())<a&&(a=i),i>s&&(s=i),(o+=t.readSVarint())<u&&(u=o),o>l&&(l=o);else if(7!==r)throw new Error("unknown command "+r)}return[a,u,s,l]},To.prototype.toGeoJSON=function(t,e,r){var n,i,o=this.extent*Math.pow(2,r),a=this.extent*t,s=this.extent*e,u=this.loadGeometry(),l=To.types[this.type];function c(t){for(var e=0;e<t.length;e++){var r=t[e],n=180-360*(r.y+s)/o;t[e]=[360*(r.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var p=[];for(n=0;n<u.length;n++)p[n]=u[n][0];c(u=p);break;case 2:for(n=0;n<u.length;n++)c(u[n]);break;case 3:for(u=function(t){var e=t.length;if(e<=1)return[t];for(var r,n,i=[],o=0;o<e;o++){var a=Lo(t[o]);0!==a&&(void 0===n&&(n=a<0),n===a<0?(r&&i.push(r),r=[t[o]]):r.push(t[o]))}r&&i.push(r);return i}(u),n=0;n<u.length;n++)for(i=0;i<u[n].length;i++)c(u[n][i])}1===u.length?u=u[0]:l="Multi"+l;var f={type:"Feature",geometry:{type:l,coordinates:u},properties:this.properties};return"id"in this&&(f.id=this.id),f};var Uo,jo=(Uo=!0,function(t,e){var r=Uo?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Uo=!1,r}),qo=jo(void 0,(function(){return qo.toString().search("(((.+)+)+)+$").toString().constructor(qo).search("(((.+)+)+)+$")}));function No(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(Ro,this,e),this.length=this._features.length}function Ro(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){var e=null,r=t.readVarint()+t.pos;for(;t.pos<r;){var n=t.readVarint()>>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(r))}qo(),No.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new To(this._pbf,e,this.extent,this._keys,this._values)};var Go,Xo=(Go=!0,function(t,e){var r=Go?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Go=!1,r}),Yo=Xo(void 0,(function(){return Yo.toString().search("(((.+)+)+)+$").toString().constructor(Yo).search("(((.+)+)+)+$")}));function Ho(t,e){this.layers=t.readFields(Zo,{},e)}function Zo(t,e,r){if(3===t){var n=new No(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}Yo();var Jo,Ko=(Jo=!0,function(t,e){var r=Jo?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Jo=!1,r}),Wo=Ko(void 0,(function(){return Wo.toString().search("(((.+)+)+)+$").toString().constructor(Wo).search("(((.+)+)+)+$")}));Wo();function Qo(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var i=new Int32Array(this.arrayBuffer);t=i[0],e=i[1],r=i[2],this.d=e+2*r;for(var o=0;o<this.d*this.d;o++){var a=i[3+o],s=i[3+o+1];n.push(a===s?null:i.subarray(a,s))}var u=i[3+n.length],l=i[3+n.length+1];this.keys=i.subarray(u,l),this.bboxes=i.subarray(l),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var c=0;c<this.d*this.d;c++)n.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var p=r/e*t;this.min=-p,this.max=t+p}Qo.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},Qo.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},Qo.prototype._insertCell=function(t,e,r,n,i,o){this.cells[i].push(o)},Qo.prototype.query=function(t,e,r,n,i){var o=this.min,a=this.max;if(t<=o&&e<=o&&a<=r&&a<=n&&!i)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(t,e,r,n,this._queryCell,s,{},i),s},Qo.prototype._queryCell=function(t,e,r,n,i,o,a,s){var u=this.cells[i];if(null!==u)for(var l=this.keys,c=this.bboxes,p=0;p<u.length;p++){var f=u[p];if(void 0===a[f]){var h=4*f;(s?s(c[h+0],c[h+1],c[h+2],c[h+3]):t<=c[h+2]&&e<=c[h+3]&&r>=c[h+0]&&n>=c[h+1])?(a[f]=!0,o.push(l[f])):a[f]=!1}}},Qo.prototype._forEachCell=function(t,e,r,n,i,o,a,s){for(var u=this._convertToCellCoord(t),l=this._convertToCellCoord(e),c=this._convertToCellCoord(r),p=this._convertToCellCoord(n),f=u;f<=c;f++)for(var h=l;h<=p;h++){var y=this.d*h+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(h),this._convertFromCellCoord(f+1),this._convertFromCellCoord(h+1)))&&i.call(this,t,e,r,n,y,o,a,s))return}},Qo.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Qo.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Qo.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,r=0,n=0;n<this.cells.length;n++)r+=this.cells[n].length;var i=new Int32Array(e+r+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;for(var o=e,a=0;a<t.length;a++){var s=t[a];i[3+a]=o,i.set(s,o),o+=s.length}return i[3+t.length]=o,i.set(this.keys,o),o+=this.keys.length,i[3+t.length+1]=o,i.set(this.bboxes,o),o+=this.bboxes.length,i.buffer},sn.register("GridIndex",Qo,{omit:["layers","patternFeatures"]});const ta=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),ea=ta(void 0,(function(){return ea.toString().search("(((.+)+)+)+$").toString().constructor(ea).search("(((.+)+)+)+$")}));function ra(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var o=i[n];for(var a in o)t[a]=o[a]}return t}function na(t,e){return-1!==t.indexOf(e,t.length-e.length)}function ia(t){return Array.isArray(t)?t.map(ia):"object"==typeof t&&t?function(t,e,r){const n={};for(const i in t)n[i]=e.call(r||this,t[i],i,t);return n}(t,ia):t}function oa(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}ea(),function(t,e,r,n){const i=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),o=i(this,(function(){return o.toString().search("(((.+)+)+)+$").toString().constructor(o).search("(((.+)+)+)+$")}));o()}();var aa,sa=(aa=!0,function(t,e){var r=aa?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return aa=!1,r}),ua=sa(void 0,(function(){return ua.toString().search("(((.+)+)+)+$").toString().constructor(ua).search("(((.+)+)+)+$")}));ua();var la=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,n=e;r<n.length;r+=1){var i=n[r],o=i[0],a=i[1];this.bindings[o]=a}};la.prototype.concat=function(t){return new la(this,t)},la.prototype.get=function(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.")},la.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var ca,pa=function(t){var e,r=(e=!0,function(t,r){var n=e?function(){if(r){var e=r.apply(t,arguments);return r=null,e}}:function(){};return e=!1,n}),n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function i(e,r){t.call(this,r),this.message=r,this.key=e}return n(),t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(Error),fa=(ca=!0,function(t,e){var r=ca?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return ca=!1,r}),ha=fa(void 0,(function(){return ha.toString().search("(((.+)+)+)+$").toString().constructor(ha).search("(((.+)+)+)+$")}));ha();var ya=["Unknown","Point","LineString","Polygon"],da=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null};da.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},da.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?ya[this.feature.type]:this.feature.type:null},da.prototype.properties=function(){return this.feature&&this.feature.properties||{}},da.prototype.parseColor=function(t){var e=this._parseColorCache[t];return!e&&(e=this._parseColorCache[t]=xt.parse(t)),e},sn.register("EvaluationContext",da);var va,ma=(va=!0,function(t,e){var r=va?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return va=!1,r}),ga=ma(void 0,(function(){return ga.toString().search("(((.+)+)+)+$").toString().constructor(ga).search("(((.+)+)+)+$")}));function xa(){}ga(),xa.isFeatureConstant=function(t){if(t instanceof Sa.CompoundExpression){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}var e=!0;return t.eachChild((function(t){e&&!xa.isFeatureConstant(t)&&(e=!1)})),e},xa.isStateConstant=function(t){if(t instanceof Sa.CompoundExpression&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild((function(t){e&&!xa.isStateConstant(t)&&(e=!1)})),e},xa.isGlobalPropertyConstant=function(t,e){if(t instanceof Sa.CompoundExpression&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild((function(t){r&&!xa.isGlobalPropertyConstant(t,e)&&(r=!1)})),r};var ba,_a=(ba=!0,function(t,e){var r=ba?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return ba=!1,r}),wa=_a(void 0,(function(){return wa.toString().search("(((.+)+)+)+$").toString().constructor(wa).search("(((.+)+)+)+$")}));wa();var Sa=function(t,e,r,n,i){void 0===e&&(e=[]),void 0===n&&(n=new la),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map((function(t){return"["+t+"]"})).join(""),this.scope=n,this.errors=i,this.expectedType=r};function Aa(t,e){const r=e[t];return void 0===r?null:r}Sa.prototype.parse=function(t,e,r,n,i){return void 0===i&&(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},Sa.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new ie(e,[t]):"coerce"===r?new Ie(e,[t]):t}if((null===t||"string"==typeof t||"boolean"==typeof t||"number"==typeof t)&&(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[n];if(i){var o=i.parse(t,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=r(o,a,e.typeAnnotation||"coerce");else o=r(o,a,e.typeAnnotation||"assert")}return!(o instanceof zr)&&o.type.kind,o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Sa.prototype.concat=function(t,e,r){var n="number"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new Sa(this.registry,n,e||null,i,this.errors)},Sa.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var n=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new pa(n,t))},Sa.prototype.checkSubtype=function(t,e){var r=wt(t,e);return r&&this.error(r),r};var ka=function(t,e,r,n){this.name=t,this.type=e,this._evaluate=r,this.args=n};ka.prototype.evaluate=function(t,e){return this._evaluate(t,this.args,e)},ka.prototype.eachChild=function(t){this.args.forEach(t)},ka.prototype.possibleOutputs=function(){return[void 0]},ka.prototype.serialize=function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))},ka.parse=function(t,e){var r,n=t[0],i=ka.definitions[n];if(!i)return e.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,s=a.filter((function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1})),u=null,l=0,c=s;l<c.length;l+=1){var p=c[l],f=p[0],h=p[1];u=new Sa(e.registry,e.path,null,e.scope);for(var y=[],d=!1,v=1;v<t.length;v++){var m=t[v],g=Array.isArray(f)?f[v-1]:f.type,x=u.parse(m,1+y.length,g);if(!x){d=!0;break}y.push(x)}if(!d)if(Array.isArray(f)&&f.length!==y.length)u.error("Expected "+f.length+" arguments, but found "+y.length+" instead.");else{for(var b=0;b<y.length;b++){var _=Array.isArray(f)?f[b]:f.type,w=y[b];u.concat(b+1).checkSubtype(_,w.type)}if(0===u.errors.length)return new ka(n,o,h,y)}}if(1===s.length)(r=e.errors).push.apply(r,u.errors);else{for(var S=(s.length?s:a).map((function(t){var e,r=t[0];return e=r,Array.isArray(e)?"("+e.map(toString).join(", ")+")":"("+toString(e.type)+"...)"})).join(" | "),A=[],k=1;k<t.length;k++){var I=e.parse(t[k],1+A.length);if(!I)return null;A.push(toString(I.type))}e.error("Expected arguments of type "+S+", but found ("+A.join(", ")+") instead.")}return null},ka.register=function(t,e){for(var r in ka.definitions=e,e)t[r]=ka},sn.register("CompoundExpression",ka);var Ia={kind:"number"},Ba={kind:"string"},za={kind:"boolean"},Va={kind:"color"},Pa={kind:"object"},Ca={kind:"value"};function Fa(t,e){return{kind:"array",itemType:t,N:e}}function $a(t){return{type:t}}function Ea(t,e){var r=e[0],n=e[1],i=e[2],o=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t);var a=o?o.evaluate(t):1,s=Values.validateRGBA(r,n,i,a);if(s)throw new RuntimeError(s);return new Color(r/255*a,n/255*a,i/255*a,a)}ka.register(nn,{error:[{kind:"error"},[Ba],function(t,e){var r=e[0];throw new RuntimeError(r.evaluate(t))}],typeof:[Ba,[Ca],function(t,e){var r=e[0];return toString(Values.typeOf(r.evaluate(t)))}],"to-rgba":[Fa(Ia,4),[Va],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Va,[Ia,Ia,Ia],Ea],rgba:[Va,[Ia,Ia,Ia,Ia],Ea],has:{type:za,overloads:[[[Ba],function(t,e){var r=e[0];return has(r.evaluate(t),t.properties())}],[[Ba,Pa],function(t,e){var r=e[0],n=e[1];return has(r.evaluate(t),n.evaluate(t))}]]},get:{type:Ca,overloads:[[[Ba],function(t,e){return Aa(e[0].evaluate(t),t.properties())}],[[Ba,Pa],function(t,e){var r=e[0],n=e[1];return Aa(r.evaluate(t),n.evaluate(t))}]]},"feature-state":[Ca,[Ba],function(t,e){return Aa(e[0].evaluate(t),t.featureState||{})}],properties:[Pa,[],function(t){return t.properties()}],"geometry-type":[Ba,[],function(t){return t.geometryType()}],id:[Ca,[],function(t){return t.id()}],zoom:[Ia,[],function(t){return t.globals.zoom}],"heatmap-density":[Ia,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Ia,[],function(t){return t.globals.lineProgress||0}],accumulated:[Ca,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Ia,$a(Ia),function(t,e){for(var r=0,n=0,i=e;n<i.length;n+=1){r+=i[n].evaluate(t)}return r}],"*":[Ia,$a(Ia),function(t,e){for(var r=1,n=0,i=e;n<i.length;n+=1){r*=i[n].evaluate(t)}return r}],"-":{type:Ia,overloads:[[[Ia,Ia],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)-n.evaluate(t)}],[[Ia],function(t,e){return-e[0].evaluate(t)}]]},"/":[Ia,[Ia,Ia],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)/n.evaluate(t)}],"%":[Ia,[Ia,Ia],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)%n.evaluate(t)}],ln2:[Ia,[],function(){return Math.LN2}],pi:[Ia,[],function(){return Math.PI}],e:[Ia,[],function(){return Math.E}],"^":[Ia,[Ia,Ia],function(t,e){var r=e[0],n=e[1];return Math.pow(r.evaluate(t),n.evaluate(t))}],sqrt:[Ia,[Ia],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[Ia,[Ia],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN10}],ln:[Ia,[Ia],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[Ia,[Ia],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN2}],sin:[Ia,[Ia],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[Ia,[Ia],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[Ia,[Ia],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[Ia,[Ia],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[Ia,[Ia],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[Ia,[Ia],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[Ia,$a(Ia),function(t,e){return Math.min.apply(Math,e.map((function(e){return e.evaluate(t)})))}],max:[Ia,$a(Ia),function(t,e){return Math.max.apply(Math,e.map((function(e){return e.evaluate(t)})))}],abs:[Ia,[Ia],function(t,e){var r=e[0];return Math.abs(r.evaluate(t))}],round:[Ia,[Ia],function(t,e){var r=e[0].evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[Ia,[Ia],function(t,e){var r=e[0];return Math.floor(r.evaluate(t))}],ceil:[Ia,[Ia],function(t,e){var r=e[0];return Math.ceil(r.evaluate(t))}],"filter-==":[za,[Ba,Ca],function(t,e,r){var n=e[0],i=e[1];if(r){var o,a,s=n.value,u=i.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var l=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=t.properties()[l[1]],p=l[2],f=t.properties()[l[3]];switch(p){case"+":o=c+f;break;case"-":o=c-f}return o===(a=i.value)}if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var h=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),y=h[1],d=(c=t.properties()[h[2]],h[3]);if(o="left"==y?c.substring(0,d):c.substring(c.length-d),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(u)){var v=u.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),m=v[1],g=(f=t.properties()[v[2]],v[3]);a="left"==m?f.substring(0,g):f.substring(f.length-g)}else a=i.value;return o===a}return t.properties()[n.value]===t.properties()[i.value]}return t.properties()[n.value]===i.value}],"filter-id-==":[za,[Ca],function(t,e){var r=e[0];return t.id()===r.value}],"filter-like":[za,[Ba,Ba],function(t,e){var r=e[0].value,n=e[1].value,i=t.properties();return r in i&&(/^%.*[^%]$/.test(n)?(n=n.replace("%",""),i[r].endsWith(n)):/^(?!%).+%$/.test(n)?(n=n.replace("%",""),i[r].startsWith(n)):(n=n.replace(/%/g,""),i[r].indexOf(n)>-1))}],"filter-type-==":[za,[Ba],function(t,e){var r=e[0];return t.geometryType()===r.value}],"filter-<":[za,[Ba,Ca],function(t,e,r){var n,i,o=e[0],a=e[1],s=o.value,u=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var l=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=t.properties()[l[1]],p=l[2],f=t.properties()[l[3]];switch(p){case"+":n=c+f;break;case"-":n=c-f}i=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var h=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),y=h[1],d=(c=t.properties()[h[2]],h[3]);if(n="left"==y?c.substring(0,d):c.substring(c.length-d),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(u)){var v=u.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),m=v[1],g=(f=t.properties()[v[2]],v[3]);i="left"==m?f.substring(0,g):f.substring(f.length-g)}else i=a.value}else n=t.properties()[o.value],i=a.value,r&&(i=t.properties()[i]);return"number"==typeof i&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof i&&n<i}],"filter-id-<":[za,[Ca],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<i}],"filter->":[za,[Ba,Ca],function(t,e,r){var n,i,o=e[0],a=e[1],s=o.value,u=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var l=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=t.properties()[l[1]],p=l[2],f=t.properties()[l[3]];switch(p){case"+":n=c+f;break;case"-":n=c-f}i=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var h=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),y=h[1],d=(c=t.properties()[h[2]],h[3]);if(n="left"==y?c.substring(0,d):c.substring(c.length-d),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(u)){var v=u.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),m=v[1],g=(f=t.properties()[v[2]],v[3]);i="left"==m?f.substring(0,g):f.substring(f.length-g)}else i=a.value}else n=t.properties()[o.value],i=a.value,r&&(i=t.properties()[i]);return"number"==typeof i&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof i&&n>i}],"filter-id->":[za,[Ca],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[za,[Ba,Ca],function(t,e,r){var n,i,o=e[0],a=e[1],s=o.value,u=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var l=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=t.properties()[l[1]],p=l[2],f=t.properties()[l[3]];switch(p){case"+":n=c+f;break;case"-":n=c-f}i=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var h=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),y=h[1],d=(c=t.properties()[h[2]],h[3]);if(n="left"==y?c.substring(0,d):c.substring(c.length-d),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(u)){var v=u.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),m=v[1],g=(f=t.properties()[v[2]],v[3]);i="left"==m?f.substring(0,g):f.substring(f.length-g)}else i=a.value}else n=t.properties()[o.value],i=a.value,r&&(i=t.properties()[i]);return"number"==typeof i&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof i&&n<=i}],"filter-id-<=":[za,[Ca],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],"filter->=":[za,[Ba,Ca],function(t,e,r){var n,i,o=e[0],a=e[1],s=o.value,u=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var l=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=t.properties()[l[1]],p=l[2],f=t.properties()[l[3]];switch(p){case"+":n=c+f;break;case"-":n=c-f}i=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var h=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),y=h[1],d=(c=t.properties()[h[2]],h[3]);if(n="left"==y?c.substring(0,d):c.substring(c.length-d),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(u)){var v=u.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),m=v[1],g=(f=t.properties()[v[2]],v[3]);i="left"==m?f.substring(0,g):f.substring(f.length-g)}else i=a.value}else n=t.properties()[o.value],i=a.value,r&&(i=t.properties()[i]);return"number"==typeof i&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof i&&n>=i}],"filter-id->=":[za,[Ca],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[za,[Ca],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[za,[],function(t){return null!==t.id()}],"filter-type-in":[za,[Fa(Ba)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[za,[Fa(Ca)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[za,[Ba,Fa(Ca)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[za,[Ba,Fa(Ca)],function(t,e){var r=e[0],n=e[1];return binarySearch(t.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:za,overloads:[[[za,za],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[$a(za),function(t,e){for(var r=0,n=e;r<n.length;r+=1){if(!n[r].evaluate(t))return!1}return!0}]]},crossFields:{type:za,overloads:[[[za,za],function(t,e){var r=e[0],n=e[1];return r.evaluate(t,!0)&&n.evaluate(t,!0)}],[$a(za),function(t,e){for(var r=0,n=e;r<n.length;r+=1){if(!n[r].evaluate(t,!0))return!1}return!0}]]},any:{type:za,overloads:[[[za,za],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)||n.evaluate(t)}],[$a(za),function(t,e){for(var r=0,n=e;r<n.length;r+=1){if(n[r].evaluate(t))return!0}return!1}]]},"!":[za,[za],function(t,e,r){return!e[0].evaluate(t,r)}],"is-supported-script":[za,[Ba],function(t,e){var r=e[0],n=t.globals&&t.globals.isSupportedScript;return!n||n(r.evaluate(t))}],upcase:[Ba,[Ba],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[Ba,[Ba],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[Ba,$a(Ca),function(t,e){return e.map((function(e){return Values.toString$1(e.evaluate(t))})).join("")}],"resolved-locale":[Ba,[{kind:"collator"}],function(t,e){return e[0].evaluate(t).resolvedLocale()}]}),Sa.CompoundExpression=ka;var Oa,Ma=(Oa=!0,function(t,e){var r=Oa?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Oa=!1,r}),Ta=Ma(void 0,(function(){return Ta.toString().search("(((.+)+)+)+$").toString().constructor(Ta).search("(((.+)+)+)+$")}));Ta();var Da=function(t,e){var r,n;this.expression=t,this._warningHistory={},this._evaluator=new da,this._defaultValue=e?"color"!==(r=e).type||("object"!=typeof(n=r.default)||null===n||Array.isArray(n))?"color"===r.type?xt.parse(r.default)||null:void 0===r.default?null:r.default:new xt(0,0,0,0):null,this._enumValues=e&&"enum"===e.type?e.values:null};Da.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=i,this.expression.evaluate(this._evaluator)},Da.prototype.evaluate=function(t,e,r,n,i){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=i||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||"number"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new RuntimeError("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(t){return!this._warningHistory[t.message]&&(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}},sn.register("StyleExpression",Da);var La,Ua=(La=!0,function(t,e){var r=La?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return La=!1,r}),ja=Ua(void 0,(function(){return ja.toString().search("(((.+)+)+)+$").toString().constructor(ja).search("(((.+)+)+)+$")}));function qa(){}function Na(t){return{result:"success",value:t}}function Ra(t){return{result:"error",value:t}}ja(),qa.isExpression=function(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in nn};var Ga={kind:"number"},Xa={kind:"string"},Ya={kind:"boolean"},Ha={kind:"color"},Za={kind:"value"},Ja={kind:"formatted"},Ka={kind:"resolvedImage"};function Wa(t){var e=null;if(t instanceof xr)e=Wa(t.result);else if(t instanceof be){for(var r of t.args)if(e=Wa(r))break}else(t instanceof Hr||t instanceof ar)&&t.input instanceof Sa.CompoundExpression&&"zoom"===t.input.name&&(e=t);return e instanceof pa||t.eachChild((t=>{var r=Wa(t);r instanceof pa?e=r:!e&&r?e=new pa("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&r&&e!==r&&(e=new pa("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}function Qa(t){var e,r,n={color:Ha,string:Xa,number:Ga,enum:Xa,boolean:Ya,formatted:Ja,resolvedImage:Ka};return"array"===t.type?(e=n[t.value]||Za,r=t.length,{kind:"array",itemType:e,N:r}):n[t.type]}function ts(t){return t}function es(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var o=i[n];for(var a in o)t[a]=o[a]}return t}function rs(t,e,r){var n=void 0!==t.base?t.base:1;if("number"!==cs(r))return us(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var o,a,s,u,l,c,p=Nr(t.stops.map((t=>t[0])),r),f=(o=r,a=n,s=t.stops[p][0],u=t.stops[p+1][0],c=o-s,0===(l=u-s)?0:1===a?c/l:(Math.pow(a,c)-1)/(Math.pow(a,l)-1)),h=t.stops[p][1],y=t.stops[p+1][1],d=interpolate[e.type]||ts;if(t.colorSpace&&"rgb"!==t.colorSpace){var v=colorSpaces[t.colorSpace];d=(t,e)=>v.reverse(v.interpolate(v.forward(t),v.forward(e),f))}return"function"==typeof h.evaluate?{evaluate(...t){var e=h.evaluate.apply(void 0,t),r=y.evaluate.apply(void 0,t);if(void 0!==e&&void 0!==r)return d(e,r,f)}}:d(h,y,f)}function ns(t,e,r){return"color"===e.type?r=xt.parse(r):"formatted"===e.type?r=Formatted.fromString(r.toString()):"resolvedImage"===e.type?r=ResolvedImage.fromString(r.toString()):cs(r)!==e.type&&("enum"!==e.type||!e.values[r])&&(r=void 0),us(r,t.default,e.default)}function is(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!xa.isStateConstant(e.expression)}function os(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!xa.isStateConstant(e.expression),this.interpolationType=n}function as(t,e){var r,n,i,o;if(r=t,i=new Sa(nn,[],(n=e)?Qa(n):void 0),"error"===(t=(o=i.parse(r,void 0,void 0,void 0,n&&"string"===n.type?{typeAnnotation:"coerce"}:void 0))?Na(new Da(o,n)):Ra(i.errors)).result)return t;var a=t.value.expression,s=xa.isFeatureConstant(a);if(!s&&!Vi(e))return Ra([new pa("","data expressions not supported")]);var u,l=xa.isGlobalPropertyConstant(a,["zoom"]);if(!(l||(u=e,u.expression&&u.expression.parameters.indexOf("zoom")>-1)))return Ra([new pa("","zoom expressions not supported")]);var c=Wa(a);if(!c&&!l)return Ra([new pa("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(c instanceof pa)return Ra([c]);if(c instanceof ar&&!Pi(e))return Ra([new pa("",'"interpolate" expressions cannot be used with this property')]);if(!c)return Na(new is(s?"constant":"source",t.value));var p=c instanceof ar?c.interpolation:void 0;return Na(new os(s?"camera":"composite",t.value,c.labels,p))}function ss(t,e){var r,n,i,o="color"===e.type,a=t.stops&&"object"==typeof t.stops[0][0],s=a||void 0!==t.property,u=a||!s,l=t.type||(Pi(e)?"exponential":"interval");if(o&&((t=es({},t)).stops&&(t.stops=t.stops.map((function(t){return[t[0],xt.parse(t[1])]}))),t.default?t.default=xt.parse(t.default):t.default=xt.parse(e.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!colorSpaces[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);if("exponential"===l)r=rs;else if("interval"===l)r=evaluateIntervalFunction;else if("categorical"===l){r=evaluateCategoricalFunction,n=Object.create(null);for(var c=0,p=t.stops;c<p.length;c+=1){var f=p[c];n[f[0]]=f[1]}i=typeof t.stops[0][0]}else{if("identity"!==l)throw new Error('Unknown function type "'+l+'"');r=ns}if(a){for(var h={},y=[],d=0;d<t.stops.length;d++){var v=t.stops[d],m=v[0].zoom;void 0===h[m]&&(h[m]={zoom:m,type:t.type,property:t.property,default:t.default,stops:[]},y.push(m)),h[m].stops.push([v[0].value,v[1]])}for(var g=[],x=0,b=y;x<b.length;x+=1){var _=b[x];g.push([h[_].zoom,ss(h[_],e)])}var w={name:"linear"};return{kind:"composite",interpolationType:w,interpolationFactor:ar.interpolationFactor.bind(void 0,w),zoomStops:g.map((function(t){return t[0]})),evaluate:function(r,n){var i=r.zoom;return rs({stops:g,base:t.base},e,i).evaluate(i,n)}}}if(u){var S="exponential"===l?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:S,interpolationFactor:ar.interpolationFactor.bind(void 0,S),zoomStops:t.stops.map((function(t){return t[0]})),evaluate:function(o){var a=o.zoom;return r(t,e,a,n,i)}}}return{kind:"source",evaluate:function(o,a){var s=a&&a.properties?a.properties[t.property]:void 0;return void 0===s?us(t.default,e.default):r(t,e,s,n,i)}}}function us(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}qa.createExpression=function(t,e){var r=new Sa(nn,[],e?Qa(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?Na(new Da(n,e)):Ra(r.errors)},is.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,o)},is.prototype.evaluate=function(t,e,r,n,i,o){return this._styleExpression.evaluate(t,e,r,n,i,o)},sn.register("ZoomConstantExpression",is),os.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,o)},os.prototype.evaluate=function(t,e,r,n,i,o){return this._styleExpression.evaluate(t,e,r,n,i,o)},os.prototype.interpolationFactor=function(t,e,r){return this.interpolationType?ar.interpolationFactor(this.interpolationType,t,e,r):0},sn.register("ZoomDependentExpression",os);var ls=function(t,e){this._parameters=t,this._specification=e,es(this,ss(this._parameters,this._specification))};function cs(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}ls.deserialize=function(t){return new ls(t._parameters,t._specification)},ls.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}},sn.register("StylePropertyFunction",ls),qa.normalizePropertyExpression=function(t,e){if("object"!=typeof(i=t)||null===i||Array.isArray(i)){if(qa.isExpression(t)){var r=as(t,e);if("error"===r.result)throw new Error(r.value.map((function(t){return t.key+": "+t.message})).join(", "));return r.value}var n=t;return"string"==typeof t&&"color"===e.type&&(n=xt.parse(t)),{kind:"constant",evaluate:function(){return n}}}return new ls(t,e);var i};var ps,fs=(ps=!0,function(t,e){var r=ps?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return ps=!1,r}),hs=fs(void 0,(function(){return hs.toString().search("(((.+)+)+)+$").toString().constructor(hs).search("(((.+)+)+)+$")}));function ys(){}hs(),ys.isExpressionFilter=function(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&Array.isArray(t[2]);case"!in":case"!has":case"none":case"crossFields":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":case"like":case"!like":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);e<r.length;e+=1){var n=r[e];if(!ys.isExpressionFilter(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}};var ds={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function vs(t,e){return t<e?-1:t>e?1:0}function ms(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?gs(t[1],t[2],"=="):"!="===r?_s(gs(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?gs(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(ms))):"all"===r?["all"].concat(t.slice(1).map(ms)):"crossFields"===r?["crossFields"].concat(t.slice(1).map(ms)):"none"===r?["all"].concat(t.slice(1).map(ms).map(_s)):"in"===r?xs(t[1],t.slice(2)):"!in"===r?_s(xs(t[1],t.slice(2))):"has"===r?bs(t[1]):"!has"===r?_s(bs(t[1])):"like"===r?gs(t[1],t[2],"like"):"!like"!==r||_s(gs(t[1],t[2],"like"))}function gs(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function xs(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?["filter-in-large",t,["literal",e.sort(vs)]]:["filter-in-small",t,["literal",e]]}}function bs(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function _s(t){return["!",t]}ys.createFilter=function(t){if(null==t)return function(){return!0};!ys.isExpressionFilter(t)&&(t=ms(t));var e=qa.createExpression(t,ds);if("error"===e.result)throw new Error(e.value.map((function(t){return t.key+": "+t.message})).join(", "));return function(t,r){return e.value.evaluate(t,r)}};var ws,Ss=(ws=!0,function(t,e){var r=ws?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return ws=!1,r}),As=Ss(void 0,(function(){return As.toString().search("(((.+)+)+)+$").toString().constructor(As).search("(((.+)+)+)+$")}));As();var ks=function(t,e,r){this.x=t.x,this.y=t.y,this.z=t.z,this.grid=e||new Qo(wn,16,0),this.featureIndexArray=r||new _i};function Is(t,e){return e-t}ks.prototype.insert=function(t,e,r,n,i,o,a){var s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i);var u=this.grid;a=a||0;for(var l=0;l<e.length;l++){for(var c=e[l],p=[1/0,1/0,-1/0,-1/0],f=0;f<c.length;f++){var h=c[f];p[0]=Math.min(p[0],h.x),p[1]=Math.min(p[1],h.y),p[2]=Math.max(p[2],h.x),p[3]=Math.max(p[3],h.y)}p[0]<wn&&p[1]<wn&&p[2]>=0&&p[3]>=0&&u.insert(s,p[0]-a,p[1]-a,p[2]+a,p[3]+a)}},ks.prototype.loadVTLayers=function(){return!this.vtLayers&&(this.vtLayers=new Ho(new b(this.rawTileData)).layers,this.sourceLayerCoder=new U(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},ks.prototype.query=function(t,r,n){var i=this;this.loadVTLayers();var o=t.params||{},a=function(t,r,n){if(e.e(n)&&n.realtime&&e.e(n.zoom)){var i=n.zoom-t,o=wn/(r*Math.pow(2,i));return o*=r/512}return wn/r}(this.z,t.tileSize,o),s=ys.createFilter(o.filter),u=t.queryGeometry,l=5,c=function(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,o=0,a=t;o<a.length;o+=1){var s=a[o];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{minX:e,minY:r,maxX:n,maxY:i}}(u),p=[];e.e(o.selectTolerance)&&(l+=a*o.selectTolerance),(p=this.grid.query(c.minX-l,c.minY-l,c.maxX+l,c.maxY+l)).sort(Is);for(var f,h={},y=function(e){var n=p[e];if(n!==f){f=n;var l=i.featureIndexArray.get(n),c=null;i.loadMatchingFeature(h,l.bucketIndex,l.sourceLayerIndex,l.featureIndex,s,o.layers,r,(function(e,r){!c&&(c=kn(e));return r.queryIntersectsFeature(u,e,{},c,i.z,t.transform,a,t.pixelPosMatrix,t.adjustScale)}))}},d=0;d<p.length;d++)y(d);return h},ks.prototype.loadMatchingFeature=function(t,r,n,i,o,a,s,u){if(e.e(r)&&e.e(n)&&e.e(i)){var l=this.bucketLayerIDs[r];if(!a||function(t,e){for(let r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1}(a,l)){var c=this.sourceLayerCoder.decode(n),p=this.vtLayers[c].feature(i);if(o(new gn(this.z),p))for(var f=0;f<l.length;f++){var h=l[f];if(!(a&&a.indexOf(h)<0)){var y=s[h];if(y){var d=!u||u(p,y);if(d){p.layer=y.serialize();var v=t[h];void 0===v&&(v=t[h]=[]),v.push({featureIndex:i,feature:p,intersectionZ:d})}}}}}}},ks.prototype.lookupSymbolFeatures=function(t,e,r,n,i,o){var a={};this.loadVTLayers();for(var s=createFilter(n),u=0,l=t;u<l.length;u+=1){var c=l[u];this.loadMatchingFeature(a,e,r,c,s,i,o)}return a},ks.prototype.hasLayer=function(t){for(var e=0,r=this.bucketLayerIDs;e<r.length;e+=1)for(var n=0,i=r[e];n<i.length;n+=1){if(t===i[n])return!0}return!1},sn.register("FeatureIndex",ks,{omit:["rawTileData","sourceLayerCoder","vtLayers"]});var Bs,zs=(Bs=!0,function(t,e){var r=Bs?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Bs=!1,r}),Vs=zs(void 0,(function(){return Vs.toString().search("(((.+)+)+)+$").toString().constructor(Vs).search("(((.+)+)+)+$")}));Vs();const Ps=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Cs(t){var e=typeof t;if("number"===e||"boolean"===e||"string"===e||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var r="[",n=0,i=t;n<i.length;n+=1){r+=Cs(i[n])+","}return r+"]"}for(var o=Object.keys(t).sort(),a="{",s=0;s<o.length;s++)a+=JSON.stringify(o[s])+":"+Cs(t[o[s]])+",";return a+"}"}function Fs(t){for(var e="",r=0,n=Ps;r<n.length;r+=1){e+="/"+Cs(t[n[r]])}return e}var $s,Es=($s=!0,function(t,e){var r=$s?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return $s=!1,r}),Os=Es(void 0,(function(){return Os.toString().search("(((.+)+)+)+$").toString().constructor(Os).search("(((.+)+)+)+$")}));Os();var Ms=G([{name:"a_pos",components:2,type:"Int16"}],4).members,Ts=G([{name:"a_pos",components:2,type:"Float32"}],4).members;function Ds(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var Ls=function(t){this.zoom=t.zoom,this.overscaling=1,this.layers=t.layers,this._sourceLayerIds={};var e=this;this.layerIds=this.layers.map((function(t,r){return e._sourceLayerIds[t.sourceLayer]=r,t.sourceLayer})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Dn,this.indexArray=new ti,this.segments=new Vn,this.programConfigurations=new ro(Ms,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};Ls.prototype.populate=function(t,e){var r=this.layers[0],n=[],i=null;"circle"===r.type&&(i=r.layout.get("circle-sort-key"));for(var o=0,a=t;o<a.length;o+=1){var s=a[o],u=s.feature,l=s.index,c=s.sourceLayerIndex,p=s.sourceLayerId,f=this._sourceLayerIds[p],h=this.layers[f];if(h){var y=16*h.paint.get("circle-radius").value.value;if(this.layers[0]._featureFilter(new gn(0),u)){var d=kn(u),v=i?i.evaluate(u,{}):void 0,m={id:u.id,properties:u.properties,type:u.type,sourceLayerIndex:c,index:l,geometry:d,patterns:{},sortKey:v,circleRadius:y};n.push(m)}}}i&&n.sort((function(t,e){return t.sortKey-e.sortKey}));for(var g=0,x=n;g<x.length;g+=1){var b=x[g],_=b,w=_.geometry,S=_.index,A=_.sourceLayerIndex,k=t[S].feature;this.addFeature(b,w,S),e.featureIndex.insert(k,w,S,A,this.index,void 0,_.circleRadius)}},Ls.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},Ls.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Ls.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ls.prototype.upload=function(t){if(!this.uploaded){if(null==this.layoutVertexArray)return;var e=t.webgpu?Ts:Ms;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=Ti.toVertexBuffer(t,this.layoutVertexArray,e),this.cesiumIndexBuffer=Ti.toIndexBuffer(t,this.indexArray))}this.programConfigurations.upload(t),this.uploaded=!0},Ls.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ls.prototype.clear=function(){e.e(this.layoutVertexArray)&&(this.layoutVertexArray=null),e.e(this.indexArray)&&(this.indexArray=null)},Ls.prototype.addFeature=function(t,e,r){for(var n=0,i=e;n<i.length;n+=1)for(var o=0,a=i[n];o<a.length;o+=1){var s=a[o],u=s.x,l=s.y;if(!(u<0||u>=wn||l<0||l>=wn)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),p=c.vertexLength;Ds(this.layoutVertexArray,u,l,-1,-1),Ds(this.layoutVertexArray,u,l,1,-1),Ds(this.layoutVertexArray,u,l,1,1),Ds(this.layoutVertexArray,u,l,-1,1),this.indexArray.emplaceBack(p,p+1,p+2),this.indexArray.emplaceBack(p,p+3,p+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{})},sn.register("CircleBucket",Ls,{omit:["layers"]});var Us,js=(Us=!0,function(t,e){var r=Us?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Us=!1,r}),qs=js(void 0,(function(){return qs.toString().search("(((.+)+)+)+$").toString().constructor(qs).search("(((.+)+)+)+$")}));qs();var Ns=function(t){this.specification=t};Ns.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},Ns.prototype.interpolate=function(t,e,r){var n=interpolate[this.specification.type];return n?n(t,e,r):t},sn.register("DataConstantProperty",Ns);var Rs,Gs=(Rs=!0,function(t,e){var r=Rs?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Rs=!1,r}),Xs=Gs(void 0,(function(){return Xs.toString().search("(((.+)+)+)+$").toString().constructor(Xs).search("(((.+)+)+)+$")}));Xs();var Ys=function(t,e){this.specification=t,this.overrides=e};Ys.prototype.possiblyEvaluate=function(t,e,r){return"constant"===t.expression.kind||"camera"===t.expression.kind?new ki(this,{kind:"constant",value:t.expression.evaluate(e,null,{},r)},e):new ki(this,t.expression,e)},Ys.prototype.interpolate=function(t,e,r){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new ki(this,{kind:"constant",value:void 0},t.parameters);var n=interpolate[this.specification.type];return n?new ki(this,{kind:"constant",value:n(t.value.value,e.value.value,r)},t.parameters):t},Ys.prototype.evaluate=function(t,e,r,n,i){return"constant"===t.kind?t.value:t.evaluate(e,r,n,i)},sn.register("DataDrivenProperty",Ys);var Hs,Zs=(Hs=!0,function(t,e){var r=Hs?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Hs=!1,r}),Js=Zs(void 0,(function(){return Js.toString().search("(((.+)+)+)+$").toString().constructor(Js).search("(((.+)+)+)+$")}));Js();var Ks=function(t,e){this.property=t,this.value=e,this.expression=qa.normalizePropertyExpression(void 0===e?t.specification.default:e,t.specification)};Ks.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Ks.prototype.possiblyEvaluate=function(t,e){return this.property.possiblyEvaluate(this,t,e)};var Ws,Qs=(Ws=!0,function(t,e){var r=Ws?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Ws=!1,r}),tu=Qs(void 0,(function(){return tu.toString().search("(((.+)+)+)+$").toString().constructor(tu).search("(((.+)+)+)+$")}));tu();var eu=function(t,e,r,n,i){this.property=t,this.value=e,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,t.specification.transition&&(n.delay||n.duration)&&(this.prior=r)};eu.prototype.possiblyEvaluate=function(t,e){var r=t.now||0,n=this.value.possiblyEvaluate(t,e),i=this.prior;if(i){if(r>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(r<this.begin)return i.possiblyEvaluate(t,e);var o=(r-this.begin)/(this.end-this.begin);return this.property.interpolate(i.possiblyEvaluate(t,e),n,function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(o))}return n};var ru,nu=(ru=!0,function(t,e){var r=ru?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return ru=!1,r}),iu=nu(void 0,(function(){return iu.toString().search("(((.+)+)+)+$").toString().constructor(iu).search("(((.+)+)+)+$")}));iu();var ou=function(t){this.property=t,this.value=new Ks(t,void 0)};ou.prototype.transitioned=function(t,e){return new eu(this.property,this.value,e,ra({},t.transition,this.transition),t.now)},ou.prototype.untransitioned=function(){return new eu(this.property,this.value,null,{},0)};var au,su=(au=!0,function(t,e){var r=au?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return au=!1,r}),uu=su(void 0,(function(){return uu.toString().search("(((.+)+)+)+$").toString().constructor(uu).search("(((.+)+)+)+$")}));uu();var lu,cu=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var r=t[e];r.specification.overridable&&this.overridableProperties.push(e);var n=this.defaultPropertyValues[e]=new Ks(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new ou(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}},pu=(lu=!0,function(t,e){var r=lu?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return lu=!1,r}),fu=pu(void 0,(function(){return fu.toString().search("(((.+)+)+)+$").toString().constructor(fu).search("(((.+)+)+)+$")}));function hu(){}fu(),hu.getMaximumPaintValue=function(t,e,r){var n=e.paint.get(t).value;return"constant"===n.kind?n.value:r.programConfigurations.get(e.id).binders[t].maxValue},hu.translateDistance=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},hu.translate=function(t,e,r,n,i){if(!e||!e[0]&&!e[1])return t;var o=Tn.convert(e)._mult(i);"viewport"===r&&o._rotate(-n);for(var a=[],s=0;s<t.length;s++){var u=t[s];a.push(u.sub(o))}return a};var yu,du=(yu=!0,function(t,e){var r=yu?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return yu=!1,r}),vu=du(void 0,(function(){return vu.toString().search("(((.+)+)+)+$").toString().constructor(vu).search("(((.+)+)+)+$")}));vu();var mu=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};mu.prototype.get=function(t){return this._values[t]};var gu,xu=(gu=!0,function(t,e){var r=gu?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return gu=!1,r}),bu=xu(void 0,(function(){return bu.toString().search("(((.+)+)+)+$").toString().constructor(bu).search("(((.+)+)+)+$")}));bu();var _u=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};_u.prototype.getValue=function(t){return ia(this._values[t].value)},_u.prototype.setValue=function(t,e){this._values[t]=new Ks(this._values[t].property,null===e?void 0:ia(e))},_u.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&&(t[n]=i)}return t},_u.prototype.possiblyEvaluate=function(t,e){for(var r=new mu(this._properties),n=0,i=Object.keys(this._values);n<i.length;n+=1){var o=i[n];r._values[o]=this._values[o].possiblyEvaluate(t,e)}return r};var wu,Su=(wu=!0,function(t,e){var r=wu?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return wu=!1,r}),Au=Su(void 0,(function(){return Au.toString().search("(((.+)+)+)+$").toString().constructor(Au).search("(((.+)+)+)+$")}));Au();var ku=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};ku.prototype.possiblyEvaluate=function(t,e){for(var r=new mu(this._properties),n=0,i=Object.keys(this._values);n<i.length;n+=1){var o=i[n];r._values[o]=this._values[o].possiblyEvaluate(t,e)}return r},ku.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1){var r=e[t];if(this._values[r].prior)return!0}return!1};var Iu,Bu=(Iu=!0,function(t,e){var r=Iu?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Iu=!1,r}),zu=Bu(void 0,(function(){return zu.toString().search("(((.+)+)+)+$").toString().constructor(zu).search("(((.+)+)+)+$")}));zu();var Vu=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Vu.prototype.getValue=function(t){return ia(this._values[t].value.value)},Vu.prototype.setValue=function(t,e){!this._values.hasOwnProperty(t)&&(this._values[t]=new ou(this._values[t].property)),this._values[t].value=new Ks(this._values[t].property,null===e?void 0:ia(e))},Vu.prototype.getTransition=function(t){return ia(this._values[t].transition)},Vu.prototype.setTransition=function(t,e){!this._values.hasOwnProperty(t)&&(this._values[t]=new ou(this._values[t].property)),this._values[t].transition=ia(e)||void 0},Vu.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&&(t[n]=i);var o=this.getTransition(n);void 0!==o&&(t[n+"-transition"]=o)}return t},Vu.prototype.transitioned=function(t,e){for(var r=new ku(this._properties),n=0,i=Object.keys(this._values);n<i.length;n+=1){var o=i[n];r._values[o]=this._values[o].transitioned(t,e._values[o])}return r},Vu.prototype.untransitioned=function(){for(var t=new ku(this._properties),e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e];t._values[n]=this._values[n].untransitioned()}return t};var Pu,Cu=(Pu=!0,function(t,e){var r=Pu?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Pu=!1,r}),Fu=Cu(void 0,(function(){return Fu.toString().search("(((.+)+)+)+$").toString().constructor(Fu).search("(((.+)+)+)+$")}));Fu();var $u="-transition";function Eu(t,e){if(this.id=t.id,this.type=t.type,"custom"!==t.type&&(t=t,this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),e.layout&&(this._unevaluatedLayout=new _u(e.layout)),e.paint)){for(var r in this._transitionablePaint=new Vu(e.paint),t.paint)this.setPaintProperty(r,t.paint[r],{validate:!1});for(var n in t.layout)this.setLayoutProperty(n,t.layout[n],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}Eu.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},Eu.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},Eu.prototype.setLayoutProperty=function(t,e,r){if(null!=e)this.id;if("visibility"===t)return this.visibility=e,void(this.config&&this.config.layout&&(this.config.layout.visibility=e));this._unevaluatedLayout.setValue(t,e)},Eu.prototype.getPaintProperty=function(t){return na(t,$u)?this._transitionablePaint.getTransition(t.slice(0,-$u.length)):this._transitionablePaint.getValue(t)},Eu.prototype.setPaintProperty=function(t,e,r){if(null!=e)this.id;if(na(t,$u))return this._transitionablePaint.setTransition(t.slice(0,-$u.length),e||void 0),!1;var n=this._transitionablePaint._values[t],i="cross-faded-data-driven"===n.property.specification["property-type"],o=n.value.isDataDriven(),a=n.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var s=this._transitionablePaint._values[t].value;return s.isDataDriven()||o||i||this._handleOverridablePaintPropertyUpdate(t,a,s)},Eu.prototype._handleSpecialPaintPropertyUpdate=function(t){},Eu.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return!1},Eu.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||(!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility)},Eu.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},Eu.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},Eu.prototype.recalculate=function(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,e)},Eu.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),function(t,e,r){const n={};for(const i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n}(t,(function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)}))},Eu.prototype._validate=function(t,e,r,n,i){return!0},Eu.prototype.is3D=function(){return!1},Eu.prototype.isTileClipped=function(){return!1},Eu.prototype.hasOffscreenPass=function(){return!1},Eu.prototype.resize=function(){},Eu.prototype.isStateDependent=function(){return!0};var Ou,Mu=(Ou=!0,function(t,e){var r=Ou?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Ou=!1,r}),Tu=Mu(void 0,(function(){return Tu.toString().search("(((.+)+)+)+$").toString().constructor(Tu).search("(((.+)+)+)+$")}));Tu();var Du,Lu={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Uu={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ju={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},qu={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Nu={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},Ru={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},Gu={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},Xu={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-show-background":{type:"boolean",default:!1,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},Yu=(Du=!0,function(t,e){var r=Du?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Du=!1,r}),Hu=Yu(void 0,(function(){return Hu.toString().search("(((.+)+)+)+$").toString().constructor(Hu).search("(((.+)+)+)+$")}));function Zu(){}function Ju(t,e,r){if(t.length>1){if(Ku(t,e))return!0;for(var n=0;n<e.length;n++)if(Wu(e[n],t,r))return!0}for(var i=0;i<t.length;i++)if(Wu(t[i],e,r))return!0;return!1}function Ku(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r<t.length-1;r++)for(var n=t[r],i=t[r+1],o=0;o<e.length-1;o++){var a=e[o],s=e[o+1];if(l=i,oa(u=n,c=a,p=s)!==oa(l,c,p)&&oa(u,l,c)!==oa(u,l,p))return!0}var u,l,c,p;return!1}function Wu(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])<n;for(var i=1;i<e.length;i++){var o=e[i-1],a=e[i];if(Zu.distToSegmentSquared(t,o,a)<n)return!0}return!1}function Qu(t,e){for(var r,n,i,o=!1,a=0;a<t.length;a++)for(var s=0,u=(r=t[a]).length-1;s<r.length;u=s++)n=r[s],i=r[u],n.y>e.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(o=!o);return o}function tl(t,e){for(var r=!1,n=0,i=t.length-1;n<t.length;i=n++){var o=t[n],a=t[i];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(r=!r)}return r}Hu(),Zu.polygonIntersectsPolygon=function(t,e){for(var r=0;r<t.length;r++)if(tl(e,t[r]))return!0;for(var n=0;n<e.length;n++)if(tl(t,e[n]))return!0;return!!Ku(t,e)},Zu.polygonIntersectsBufferedPoint=function(t,e,r){return!!tl(t,e)||!!Wu(e,t,r)},Zu.polygonIntersectsMultiPolygon=function(t,e){if(1===t.length)return Qu(e,t[0]);for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++)if(tl(t,n[i]))return!0;for(var o=0;o<t.length;o++)if(Qu(e,t[o]))return!0;for(var a=0;a<e.length;a++)if(Ku(t,e[a]))return!0;return!1},Zu.polygonIntersectsBufferedMultiLine=function(t,e,r){for(var n=0;n<e.length;n++){var i=e[n];if(t.length>=3)for(var o=0;o<i.length;o++)if(tl(t,i[o]))return!0;if(Ju(t,i,r))return!0}return!1},Zu.distToSegmentSquared=function(t,e,r){var n=e.distSqr(r);if(0===n)return t.distSqr(e);var i=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/n;return i<0?t.distSqr(e):i>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))},Zu.polygonIntersectPoint=function(t,e){return tl(t,e)};var el=new cu({"circle-sort-key":new Ys(Uu["circle-sort-key"])}),rl={paint:new cu({"circle-radius":new Ys(Gu["circle-radius"]),"circle-color":new Ys(Gu["circle-color"]),"circle-blur":new Ys(Gu["circle-blur"]),"circle-opacity":new Ys(Gu["circle-opacity"]),"circle-translate":new Ns(Gu["circle-translate"]),"circle-translate-anchor":new Ns(Gu["circle-translate-anchor"]),"circle-pitch-scale":new Ns(Gu["circle-pitch-scale"]),"circle-pitch-alignment":new Ns(Gu["circle-pitch-alignment"]),"circle-stroke-width":new Ys(Gu["circle-stroke-width"]),"circle-stroke-color":new Ys(Gu["circle-stroke-color"]),"circle-stroke-opacity":new Ys(Gu["circle-stroke-opacity"])}),layout:el},nl=function(t){var r,n=(r=!0,function(t,e){var n=r?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return r=!1,n}),i=n(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));function o(e){t.call(this,e,rl)}return i(),t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.createBucket=function(t){return new Ls(t)},o.prototype.queryRadius=function(t){var e=t;return hu.getMaximumPaintValue("circle-radius",this,e)+hu.getMaximumPaintValue("circle-stroke-width",this,e)+hu.translateDistance(this.paint.get("circle-translate"))},o.prototype.queryIntersectsFeature=function(t,r,n,i,o,a,s,u,l){var c;(c=new Float32Array(16))[0]=1,c[5]=1,c[10]=1,c[15]=1,u=c;for(var p,f=hu.translate(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),0,s),h=this.paint.get("circle-radius"),y=this.paint.get("circle-stroke-width"),d=(void 0===h?void 0:h.evaluate(r,n))+(void 0===y?void 0:y.evaluate(r,n)),v="map"===this.paint.get("circle-pitch-alignment"),m=v?f:(p=u,f.map((function(t){return il(t,p)}))),g=v?d*s:d,x=0,b=i;x<b.length;x+=1)for(var _=0,w=b[x];_<w.length;_+=1){var S=w[_],A=v?S:il(S,u),k=g;if(ol([],[S.x,S.y,0,1],u),"viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")||"map"===this.paint.get("circle-pitch-scale")&&this.paint.get("circle-pitch-alignment"),l=e.e(l)?l:10,Zu.polygonIntersectsBufferedPoint(m,A,k*l))return!0}return!1},o}(Eu);function il(t,e){var r=ol([],[t.x,t.y,0,1],e);return new Tn(r[0],r[1])}function ol(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[3]*n+r[7]*i+r[11]*o+r[15];return a=a||1,t[0]=(r[0]*n+r[4]*i+r[8]*o+r[12])/a,t[1]=(r[1]*n+r[5]*i+r[9]*o+r[13])/a,t[2]=(r[2]*n+r[6]*i+r[10]*o+r[14])/a,t}var al=function(t){var e,r=(e=!0,function(t,r){var n=e?function(){if(r){var e=r.apply(t,arguments);return r=null,e}}:function(){};return e=!1,n}),n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function i(){t.apply(this,arguments)}return n(),t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.possiblyEvaluate=function(t,e,r){if(void 0===t.value)return new ki(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){var n=t.expression.evaluate(e,null,{},r),i="resolvedImage"===t.property.specification.type&&"string"!=typeof n?n.name:n,o=this._calculate(i,i,i,e);return new ki(this,{kind:"constant",value:o},e)}if("camera"===t.expression.kind){var a=this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e);return new ki(this,{kind:"constant",value:a},e)}return new ki(this,t.expression,e)},i.prototype.evaluate=function(t,e,r,n,i){if("source"===t.kind){var o=t.evaluate(e,r,n,i);return this._calculate(o,o,o,e)}return"composite"===t.kind?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},r,n),t.evaluate({zoom:Math.floor(e.zoom)},r,n),t.evaluate({zoom:Math.floor(e.zoom)+1},r,n),e):t.value},i.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},i.prototype.interpolate=function(t){return t},i}(Ys);sn.register("DataDrivenProperty",Ys);var sl,ul=new cu({"fill-sort-key":new Ys(Lu["fill-sort-key"])}),ll={paint:new cu({"fill-antialias":new Ns(Nu["fill-antialias"]),"fill-opacity":new Ys(Nu["fill-opacity"]),"fill-color":new Ys(Nu["fill-color"]),"fill-outline-color":new Ys(Nu["fill-outline-color"]),"fill-translate":new Ns(Nu["fill-translate"]),"fill-translate-anchor":new Ns(Nu["fill-translate-anchor"]),"fill-pattern":new al(Nu["fill-pattern"])}),layout:ul},cl=function(t){var e,r=(e=!0,function(t,r){var n=e?function(){if(r){var e=r.apply(t,arguments);return r=null,e}}:function(){};return e=!1,n}),n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function i(e){t.call(this,e,ll)}return n(),t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r);var n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},i.prototype.createBucket=function(t){return new $o(t)},i.prototype.queryRadius=function(){return hu.translateDistance(this.paint.get("fill-translate"))},i.prototype.queryIntersectsFeature=function(t,e,r,n,i,o,a){var s=hu.translate(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),0,a);return Zu.polygonIntersectsMultiPolygon(s,n)},i.prototype.isTileClipped=function(){return!0},i}(Eu),pl=(sl=!0,function(t,e){var r=sl?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return sl=!1,r}),fl=pl(void 0,(function(){return fl.toString().search("(((.+)+)+)+$").toString().constructor(fl).search("(((.+)+)+)+$")}));fl();var hl=function(t){this.specification=t};hl.prototype.possiblyEvaluate=function(t,e,r){if(void 0!==t.value){if("constant"===t.expression.kind){var n=t.expression.evaluate(e,null,{},r);return this._calculate(n,n,n,e)}return this._calculate(t.expression.evaluate(new gn(Math.floor(e.zoom-1),e)),t.expression.evaluate(new gn(Math.floor(e.zoom),e)),t.expression.evaluate(new gn(Math.floor(e.zoom+1),e)),e)}},hl.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},hl.prototype.interpolate=function(t){return t},sn.register("CrossFadedProperty",hl);var yl,dl=(yl=!0,function(t,e){var r=yl?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return yl=!1,r}),vl=dl(void 0,(function(){return vl.toString().search("(((.+)+)+)+$").toString().constructor(vl).search("(((.+)+)+)+$")}));vl();var ml=function(t){this.specification=t};ml.prototype.possiblyEvaluate=function(t,e,r){return!!t.expression.evaluate(e,null,{},r)},ml.prototype.interpolate=function(){return!1},sn.register("ColorRampProperty",ml);var gl=new cu({"line-cap":new Ns(ju["line-cap"]),"line-join":new Ys(ju["line-join"]),"line-miter-limit":new Ns(ju["line-miter-limit"]),"line-round-limit":new Ns(ju["line-round-limit"]),"line-sort-key":new Ys(ju["line-sort-key"])}),xl={paint:new cu({"line-opacity":new Ys(Ru["line-opacity"]),"line-color":new Ys(Ru["line-color"]),"line-translate":new Ns(Ru["line-translate"]),"line-translate-anchor":new Ns(Ru["line-translate-anchor"]),"line-width":new Ys(Ru["line-width"]),"line-gap-width":new Ys(Ru["line-gap-width"]),"line-offset":new Ys(Ru["line-offset"]),"line-blur":new Ys(Ru["line-blur"]),"line-dasharray":new hl(Ru["line-dasharray"]),"line-pattern":new al(Ru["line-pattern"]),"line-gradient":new ml(Ru["line-gradient"])}),layout:gl},bl=function(t){var e,r=(e=!0,function(t,r){var n=e?function(){if(r){var e=r.apply(t,arguments);return r=null,e}}:function(){};return e=!1,n}),n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function i(){t.apply(this,arguments)}return n(),t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.possiblyEvaluate=function(e,r){return r=new gn(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},i.prototype.evaluate=function(e,r,n,i){return r=extend({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},i}(Ys),_l=new bl(xl.paint.properties["line-width"].specification);_l.useIntegerZoom=!0;var wl=function(t){function e(e){t.call(this,e,xl)}function r(t,e){return e>0?e+2*t:t}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=renderColorRamp(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values["line-floorwidth"]=_l.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new vo(t)},e.prototype.queryRadius=function(t){var e=t,n=r(hu.getMaximumPaintValue("line-width",this,e),hu.getMaximumPaintValue("line-gap-width",this,e)),i=hu.getMaximumPaintValue("line-offset",this,e);return n/2+Math.abs(i)+hu.translateDistance(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,i,o,a,s){var u=hu.translate(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),0,s),l=this.paint.get("line-width"),c=this.paint.get("line-gap-width"),p=r(void 0===l?void 0:l.evaluate(e,n),void 0===c?void 0:c.evaluate(e,n)),f=s/2*(p=Math.max(p,5)),h=this.paint.get("line-offset"),y=void 0===h?void 0:h.evaluate(e,n);return y&&(i=function(t,e){for(var r=[],n=new Tn(0,0),i=0;i<t.length;i++){for(var o=t[i],a=[],s=0;s<o.length;s++){var u=o[s-1],l=o[s],c=o[s+1],p=0===s?n:l.sub(u)._unit()._perp(),f=s===o.length-1?n:c.sub(l)._unit()._perp(),h=p._add(f)._unit(),y=h.x*f.x+h.y*f.y;h._mult(1/y),a.push(h._mult(e)._add(l))}r.push(a)}return r}(i,y*s)),Zu.polygonIntersectsBufferedMultiLine(u,i,f)},e.prototype.isTileClipped=function(){return!0},e}(Eu);const Sl=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),Al=Sl(void 0,(function(){return Al.toString().search("(((.+)+)+)+$").toString().constructor(Al).search("(((.+)+)+)+$")}));Al();const kl=G([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Il=G([{name:"a_projected_pos",components:3,type:"Float32"}],4);G([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),G([{name:"a_fade_opacity",components:1,type:"Float32"}],4);const Bl=G([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);G([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]);const zl=G([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Vl=G([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);G([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),G([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"}]),G([{type:"Float32",name:"offsetX"}]),G([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Pl,Cl=(Pl=!0,function(t,e){var r=Pl?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Pl=!1,r}),Fl=Cl(void 0,(function(){return Fl.toString().search("(((.+)+)+)+$").toString().constructor(Fl).search("(((.+)+)+)+$")}));Fl();var $l=function(t){return t>=4352&&t<=4607},El=function(t){return t>=5120&&t<=5759},Ol=function(t){return t>=6320&&t<=6399},Ml=function(t){return t>=11904&&t<=12031},Tl=function(t){return t>=12032&&t<=12255},Dl=function(t){return t>=12272&&t<=12287},Ll=function(t){return t>=12288&&t<=12351},Ul=function(t){return t>=12352&&t<=12447},jl=function(t){return t>=12448&&t<=12543},ql=function(t){return t>=12544&&t<=12591},Nl=function(t){return t>=12592&&t<=12687},Rl=function(t){return t>=12688&&t<=12703},Gl=function(t){return t>=12704&&t<=12735},Xl=function(t){return t>=12736&&t<=12783},Yl=function(t){return t>=12784&&t<=12799},Hl=function(t){return t>=12800&&t<=13055},Zl=function(t){return t>=13056&&t<=13311},Jl=function(t){return t>=13312&&t<=19903},Kl=function(t){return t>=19904&&t<=19967},Wl=function(t){return t>=19968&&t<=40959},Ql=function(t){return t>=40960&&t<=42127},tc=function(t){return t>=42128&&t<=42191},ec=function(t){return t>=43360&&t<=43391},rc=function(t){return t>=44032&&t<=55215},nc=function(t){return t>=55216&&t<=55295},ic=function(t){return t>=63744&&t<=64255},oc=function(t){return t>=64336&&t<=65023},ac=function(t){return t>=65040&&t<=65055},sc=function(t){return t>=65072&&t<=65103},uc=function(t){return t>=65104&&t<=65135},lc=function(t){return t>=65136&&t<=65279},cc=function(t){return t>=65280&&t<=65519};const pc=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),fc=pc(void 0,(function(){return fc.toString().search("(((.+)+)+)+$").toString().constructor(fc).search("(((.+)+)+)+$")}));function hc(t){for(const e of t)if(yc(e.charCodeAt(0)))return!0;return!1}function yc(t){return 746===t||747===t||!(t<4352)&&(!!Gl(t)||(!!ql(t)||(!(!sc(t)||t>=65097&&t<=65103)||(!!ic(t)||(!!Zl(t)||(!!Ml(t)||(!!Xl(t)||(!(!Ll(t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||(!!Jl(t)||(!!Wl(t)||(!!Hl(t)||(!!Nl(t)||(!!ec(t)||(!!nc(t)||(!!$l(t)||(!!rc(t)||(!!Ul(t)||(!!Dl(t)||(!!Rl(t)||(!!Tl(t)||(!!Yl(t)||(!(!jl(t)||12540===t)||(!(!cc(t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||(!(!uc(t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(!!El(t)||(!!Ol(t)||(!!ac(t)||(!!Kl(t)||(!!Ql(t)||!!tc(t))))))))))))))))))))))))))))))}function dc(t){for(const r of t)if((e=r.charCodeAt(0))>=1424&&e<=2303||oc(e)||lc(e))return!0;var e;return!1}fc();const vc=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),mc=vc(void 0,(function(){return mc.toString().search("(((.+)+)+)+$").toString().constructor(mc).search("(((.+)+)+)+$")}));mc();const gc={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var xc,bc=(xc=!0,function(t,e){var r=xc?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return xc=!1,r}),_c=bc(void 0,(function(){return _c.toString().search("(((.+)+)+)+$").toString().constructor(_c).search("(((.+)+)+)+$")}));_c();var wc,Sc=(wc=!0,function(t,e){var r=wc?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return wc=!1,r}),Ac=Sc(void 0,(function(){return Ac.toString().search("(((.+)+)+)+$").toString().constructor(Ac).search("(((.+)+)+)+$")}));Ac();!function(t){var e,r=(e=!0,function(t,r){var n=e?function(){if(r){var e=r.apply(t,arguments);return r=null,e}}:function(){};return e=!1,n}),n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function i(e,r){void 0===r&&(r={}),t.call(this,"error",ra({error:e},r))}n(),t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i}((function(t,e){void 0===e&&(e={}),ra(this,e),this.type=t}));const kc=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),Ic=kc(void 0,(function(){return Ic.toString().search("(((.+)+)+)+$").toString().constructor(Ic).search("(((.+)+)+)+$")}));Ic();const Bc=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),zc=Bc(void 0,(function(){return zc.toString().search("(((.+)+)+)+$").toString().constructor(zc).search("(((.+)+)+)+$")}));zc();const Vc=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),Pc=Vc(void 0,(function(){return Pc.toString().search("(((.+)+)+)+$").toString().constructor(Pc).search("(((.+)+)+)+$")}));Pc();"function"==typeof Object.freeze&&Object.freeze({Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"}),"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&(self,WorkerGlobalScope);const Cc=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),Fc=Cc(void 0,(function(){return Fc.toString().search("(((.+)+)+)+$").toString().constructor(Fc).search("(((.+)+)+)+$")}));Fc();const $c=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),Ec=$c(void 0,(function(){return Ec.toString().search("(((.+)+)+)+$").toString().constructor(Ec).search("(((.+)+)+)+$")}));Ec();var Oc,Mc=(Oc=!0,function(t,e){var r=Oc?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Oc=!1,r}),Tc=Mc(void 0,(function(){return Tc.toString().search("(((.+)+)+)+$").toString().constructor(Tc).search("(((.+)+)+)+$")}));Tc();var Dc,Lc=(Dc=!0,function(t,e){var r=Dc?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Dc=!1,r}),Uc=Lc(void 0,(function(){return Uc.toString().search("(((.+)+)+)+$").toString().constructor(Uc).search("(((.+)+)+)+$")}));Uc();var jc=function(t,e){qc(this,t,1,e)};function qc(t,e,r,n){var i=e.width,o=e.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==i*o*r)throw new RangeError("mismatched image size")}else n=new Uint8Array(i*o*r);return t.width=i,t.height=o,t.data=n,t}function Nc(t,e,r,n,i,o){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,u=0;u<i.height;u++)for(var l=((r.y+u)*t.width+r.x)*o,c=((n.y+u)*e.width+n.x)*o,p=0;p<i.width*o;p++)s[c+p]=a[l+p];return e}jc.prototype.resize=function(t){!function(t,e,r){var n=e.width,i=e.height;if(n===t.width&&i===t.height)return;var o=qc({},{width:n,height:i},r);Nc(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,n),height:Math.min(t.height,i)},r),t.width=n,t.height=i,t.data=o.data}(this,t,1)},jc.prototype.clone=function(){return new jc({width:this.width,height:this.height},new Uint8Array(this.data))},jc.copy=function(t,e,r,n,i){Nc(t,e,r,n,i,1)},sn.register("AlphaImage",jc);const Rc=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),Gc=Rc(void 0,(function(){return Gc.toString().search("(((.+)+)+)+$").toString().constructor(Gc).search("(((.+)+)+)+$")}));Gc();const Xc=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),Yc=Xc(void 0,(function(){return Yc.toString().search("(((.+)+)+)+$").toString().constructor(Yc).search("(((.+)+)+)+$")}));Yc();const Hc={horizontal:1,vertical:2,horizontalOnly:3};var Zc,Jc=(Zc=!0,function(t,e){var r=Zc?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Zc=!1,r}),Kc=Jc(void 0,(function(){return Kc.toString().search("(((.+)+)+)+$").toString().constructor(Kc).search("(((.+)+)+)+$")}));Kc();const Wc=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),Qc=Wc(void 0,(function(){return Qc.toString().search("(((.+)+)+)+$").toString().constructor(Qc).search("(((.+)+)+)+$")}));Qc();function tp(t,e){const{expression:r}=e;if("constant"===r.kind){return{kind:"constant",layoutSize:r.evaluate(new gn(t+1))}}if("source"===r.kind)return{kind:"source"};{const{zoomStops:e,interpolationType:n}=r;let i=0;for(;i<e.length&&e[i]<=t;)i++;i=Math.max(0,i-1);let o=i;for(;o<e.length&&e[o]<t+1;)o++;o=Math.min(e.length-1,o);const a=e[i],s=e[o];if("composite"===r.kind)return{kind:"composite",minZoom:a,maxZoom:s,interpolationType:n};return{kind:"camera",minZoom:a,maxZoom:s,minSize:r.evaluate(new gn(a)),maxSize:r.evaluate(new gn(s)),interpolationType:n}}}var ep=function(t){var e,r=(e=!0,function(t,r){var n=e?function(){if(r){var e=r.apply(t,arguments);return r=null,e}}:function(){};return e=!1,n}),n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function i(e,r,n,i){t.call(this,e,r),this.angle=n,void 0!==i&&(this.segment=i)}return n(),t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.clone=function(){return new i(this.x,this.y,this.angle,this.segment)},i}(Tn);sn.register("Anchor",ep);var rp,np=(rp=!0,function(t,e){var r=rp?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return rp=!1,r}),ip=np(void 0,(function(){return ip.toString().search("(((.+)+)+)+$").toString().constructor(ip).search("(((.+)+)+)+$")}));ip();var op,ap=(op=!0,function(t,e){var r=op?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return op=!1,r}),sp=ap(void 0,(function(){return sp.toString().search("(((.+)+)+)+$").toString().constructor(sp).search("(((.+)+)+)+$")}));sp();var up,lp=(up=!0,function(t,e){var r=up?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return up=!1,r}),cp=lp(void 0,(function(){return cp.toString().search("(((.+)+)+)+$").toString().constructor(cp).search("(((.+)+)+)+$")}));cp();var pp,fp=(pp=!0,function(t,e){var r=pp?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return pp=!1,r}),hp=fp(void 0,(function(){return hp.toString().search("(((.+)+)+)+$").toString().constructor(hp).search("(((.+)+)+)+$")}));hp();var yp,dp=(yp=!0,function(t,e){var r=yp?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return yp=!1,r}),vp=dp(void 0,(function(){return vp.toString().search("(((.+)+)+)+$").toString().constructor(vp).search("(((.+)+)+)+$")}));vp();var mp,gp=(mp=!0,function(t,e){var r=mp?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return mp=!1,r}),xp=gp(void 0,(function(){return xp.toString().search("(((.+)+)+)+$").toString().constructor(xp).search("(((.+)+)+)+$")}));xp();var bp,_p=(bp=!0,function(t,e){var r=bp?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return bp=!1,r}),wp=_p(void 0,(function(){return wp.toString().search("(((.+)+)+)+$").toString().constructor(wp).search("(((.+)+)+)+$")}));wp();const Sp=function(){let t=!0;return function(e,r){const n=t?function(){if(r){const t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}}(),Ap=Sp(void 0,(function(){return Ap.toString().search("(((.+)+)+)+$").toString().constructor(Ap).search("(((.+)+)+)+$")}));Ap();var kp,Ip=(kp=!0,function(t,e){var r=kp?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return kp=!1,r}),Bp=Ip(void 0,(function(){return Bp.toString().search("(((.+)+)+)+$").toString().constructor(Bp).search("(((.+)+)+)+$")}));function zp(t,e,r){return t.sections.forEach((function(t){var n,i,o;t.text=(n=t.text,i=r,"uppercase"===(o=e.layout.get("text-transform").evaluate(i,{}))?n=n.toLocaleUpperCase():"lowercase"===o&&(n=n.toLocaleLowerCase()),n)})),t}Bp();var Vp,Pp=(Vp=!0,function(t,e){var r=Vp?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Vp=!1,r}),Cp=Pp(void 0,(function(){return Cp.toString().search("(((.+)+)+)+$").toString().constructor(Cp).search("(((.+)+)+)+$")}));Cp();var Fp=["Unknown","Point","LineString","Polygon"],$p=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Ep(t,e,r,n,i,o,a,s,u,l,c,p,f){var h=s?Math.min(32640,Math.round(s[0])):0,y=s?Math.min(32640,Math.round(s[1])):0;t.emplaceBack(e,r,Math.round(32*n),Math.round(32*i),o,a,(h<<1)+(u?1:0),y,16*l,16*c,256*p,256*f)}function Op(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r)}function Mp(t){for(var e=0,r=t.sections;e<r.length;e+=1){if(dc(r[e].text))return!0}return!1}var Tp=function(t){this.layoutVertexArray=new Nn,this.indexArray=new ti,this.programConfigurations=t,this.segments=new Vn,this.dynamicLayoutVertexArray=new Rn,this.opacityVertexArray=new Gn,this.placedSymbolArray=new hi};Tp.prototype.upload=function(t,e,r,n){r&&(this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=Ti.toVertexBuffer(t,this.layoutVertexArray,kl.members)),this.indexArray.length>0&&(this.indexBuffer=Ti.toIndexBuffer(t,this.indexArray,e)),this.dynamicLayoutVertexArray.length>0&&(this.dynamicLayoutVertexBuffer=Ti.toVertexBuffer(t,this.dynamicLayoutVertexArray,Il.members,!0)),this.opacityVertexArray.length>0&&(this.opacityVertexBuffer=Ti.toVertexBuffer(t,this.opacityVertexArray,$p,!0),this.opacityVertexBuffer.itemSize=1)),(r||n)&&this.programConfigurations.upload(t)},Tp.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.dynamicLayoutVertexBuffer&&(this.dynamicLayoutVertexBuffer.destroy(),this.dynamicLayoutVertexBuffer=null),this.opacityVertexBuffer&&(this.opacityVertexBuffer.destroy(),this.opacityVertexBuffer=null),this.programConfigurations.destroy(),this.segments.destroy()},Tp.prototype.clear=function(){},sn.register("SymbolBuffers",Tp);var Dp=function(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new Vn,this.collisionVertexArray=new Hn};Dp.prototype.upload=function(t){this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=Ti.toVertexBuffer(t,this.layoutVertexArray,this.layoutAttributes)),this.indexArray.length>0&&(this.indexBuffer=Ti.toIndexBuffer(t,this.indexArray)),this.collisionVertexArray.length>0&&(this.collisionVertexBuffer=Ti.toVertexBuffer(t,this.collisionVertexArray,Bl.members,!0))},Dp.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.collisionVertexBuffer&&(this.collisionVertexBuffer.destroy(),this.collisionVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.segments.destroy()},sn.register("CollisionBuffers",Dp);var Lp=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=1,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasPaintOverrides=!1,this.hasRTLText=!1;var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=tp(this.zoom,e["text-size"]),this.iconSizeData=tp(this.zoom,e["icon-size"]);var r=this.layers[0].layout,n=r.get("symbol-sort-key"),i=r.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==i&&void 0!==n.constantOr(1);var o="viewport-y"===i||"auto"===i&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(r.get("text-allow-overlap")||r.get("icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement")),"point"===r.get("symbol-placement")&&(this.writingModes=r.get("text-writing-mode").map((function(t){return Hc[t]}))),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id})),this.sourceID=t.sourceID,this.overscaling=1};Lp.prototype.createArrays=function(){const t=this.layers[0].layout;this.hasPaintOverrides=Hp.hasPaintOverrides(t);var e=kl.members;this.text=new Tp(new ro(e,this.layers,this.zoom,(t=>/^text/.test(t)))),this.icon=new Tp(new ro(e,this.layers,this.zoom,(t=>/^icon/.test(t)))),this.textCollisionBox=new Dp(Yn,zl.members,ri),this.iconCollisionBox=new Dp(Yn,zl.members,ri),this.textCollisionCircle=new Dp(Yn,Vl.members,ti),this.iconCollisionCircle=new Dp(Yn,Vl.members,ti),this.glyphOffsetArray=new mi,this.lineVertexArray=new xi,this.symbolInstances=new di},Lp.prototype.calculateGlyphDependencies=function(t,e,r,n,i){for(let o=0;o<t.length;o++)if(e[t.charCodeAt(o)]=!0,(r||n)&&i){const r=gc[t.charAt(o)];r&&(e[r.charCodeAt(0)]=!0)}},Lp.prototype.populate=function(t,e){var r=this.layers[0],n=r.layout,i=n.get("text-font"),o=n.get("text-field"),a=n.get("icon-image"),s=("constant"!==o.value.kind||o.value.value instanceof Et&&!o.value.value.isEmpty()||o.value.value.toString().length>0)&&("constant"!==i.value.kind||i.value.value.length>0),u=("constant"!==a.value.kind||!!a.value.value)&&Object.keys(a.parameters).length>0,l=n.get("symbol-sort-key");if(this.features=[],s||u){for(var c=e.iconDependencies,p=e.glyphDependencies,f=e.availableImages,h=new gn(this.zoom),y=0,d=t;y<d.length;y+=1){var v=d[y],m=v.feature,g=v.index,x=v.sourceLayerIndex;if(r._featureFilter(h,m)){var b=void 0;if(s){var _=r.getValueAndResolveTokens("text-field",m,f),w=Et.factory(_);Mp(w)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===getRTLTextPluginStatus()||this.hasRTLText&&plugin.isParsed())&&(b=zp(w,r,m))}var S=void 0;if(u){var A=r.getValueAndResolveTokens("icon-image",m,f);S=A instanceof Dt?A:Dt.fromString(A)}if(b||S){var k=this.sortFeaturesByKey?l.evaluate(m,{}):void 0,I={text:b,icon:S,index:g,sourceLayerIndex:x,geometry:kn(m),properties:m.properties,type:Fp[m.type],sortKey:k};if(void 0!==m.id&&(I.id=m.id),this.features.push(I),S&&(c[S.name]=!0),b){var B=i.evaluate(m,{}).join(","),z="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(Hc.vertical)>=0;for(var V=0,P=b.sections;V<P.length;V+=1){var C=P[V];if(C.image)c[C.image.name]=!0;else{var F=hc(b.toString()),$=C.fontStack||B,E=p[$]=p[$]||{};this.calculateGlyphDependencies(C.text,E,z,this.allowVerticalPlacement,F)}}}}}}if("point"===n.get("symbol-placement"))for(y=0,d=this.features;y<d.length;y+=1){var O=d[y],M=O.geometry,T=O.index,D=O.sourceLayerIndex,L=t[T].feature;e.featureIndex.insert(L,M,T,D,this.index)}"line"===n.get("symbol-placement")&&(this.features=function(t){var e={},r={},n=[],i=0;function o(e){n.push(t[e]),i++}function a(t,e,i){var o=r[t];return delete r[t],r[e]=o,n[o].geometry[0].pop(),n[o].geometry[0]=n[o].geometry[0].concat(i[0]),o}function s(t,r,i){var o=e[r];return delete e[r],e[t]=o,n[o].geometry[0].shift(),n[o].geometry[0]=i[0].concat(n[o].geometry[0]),o}function u(t,e,r){var n=r?e[0][e[0].length-1]:e[0][0];return t+":"+n.x+":"+n.y}for(var l=0;l<t.length;l++){var c=t[l],p=c.geometry,f=c.text?c.text.toString():null;if(f){var h=u(f,p),y=u(f,p,!0);if(h in r&&y in e&&r[h]!==e[y]){var d=s(h,y,p),v=a(h,y,n[d].geometry);delete e[h],delete r[y],r[u(f,n[v].geometry,!0)]=v,n[d].geometry=null}else h in r?a(h,y,p):y in e?s(h,y,p):(o(l),e[h]=i-1,r[y]=i-1)}else o(l)}return n.filter((function(t){return t.geometry}))}(this.features)),this.sortFeaturesByKey&&this.features.sort((function(t,e){return t.sortKey-e.sortKey}))}},Lp.prototype.update=function(t,e,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,r),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,r))},Lp.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},Lp.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Lp.prototype.upload=function(t){this.text&&(!this.uploaded&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t),this.textCollisionCircle.upload(t),this.iconCollisionCircle.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0)},Lp.prototype.destroy=function(){this.text&&(this.text.destroy(),this.icon.destroy(),this.textCollisionBox.destroy(),this.iconCollisionBox.destroy(),this.textCollisionCircle.destroy(),this.iconCollisionCircle.destroy())},Lp.prototype.clear=function(){},Lp.prototype.addToLineVertexArray=function(t,e){var r=this.lineVertexArray.length;if(void 0!==t.segment){for(var n=t.dist(e[t.segment+1]),i=t.dist(e[t.segment]),o={},a=t.segment+1;a<e.length;a++)o[a]={x:e[a].x,y:e[a].y,tileUnitDistanceFromAnchor:n},a<e.length-1&&(n+=e[a+1].dist(e[a]));for(var s=t.segment||0;s>=0;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var u=0;u<e.length;u++){var l=o[u];this.lineVertexArray.emplaceBack(l.x,l.y,l.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},Lp.prototype.addSymbols=function(t,e,r,n,i,o,a,s,u,l,c){var p=this,f=t.indexArray,h=t.layoutVertexArray,y=t.dynamicLayoutVertexArray,d=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray,o.sortKey),v=this.glyphOffsetArray.length,m=d.vertexLength,g=this.allowVerticalPlacement&&a===Hc.vertical?Math.PI/2:0,x=function(t){var e=t.tl,n=t.tr,o=t.bl,u=t.br,l=t.tex,c=t.pixelOffsetTL,v=t.pixelOffsetBR,m=t.minFontScaleX,x=t.minFontScaleY,b=d.vertexLength,_=t.glyphOffset[1];i&&a!==Hc.horizontal?(Ep(h,s.x,s.y,e.x,_+e.y,l.x+l.w,l.y,r,t.isSDF,c.x,c.y,m,x),Ep(h,s.x,s.y,n.x,_+n.y,l.x,l.y,r,t.isSDF,v.x,c.y,m,x),Ep(h,s.x,s.y,o.x,_+o.y,l.x+l.w,l.y+l.h,r,t.isSDF,c.x,v.y,m,x),Ep(h,s.x,s.y,u.x,_+u.y,l.x,l.y+l.h,r,t.isSDF,v.x,v.y,m,x)):(Ep(h,s.x,s.y,e.x,_+e.y,l.x,l.y+l.h,r,t.isSDF,c.x,c.y,m,x),Ep(h,s.x,s.y,n.x,_+n.y,l.x+l.w,l.y+l.h,r,t.isSDF,v.x,c.y,m,x),Ep(h,s.x,s.y,o.x,_+o.y,l.x,l.y,r,t.isSDF,c.x,v.y,m,x),Ep(h,s.x,s.y,u.x,_+u.y,l.x+l.w,l.y,r,t.isSDF,v.x,v.y,m,x)),Op(y,s,g),f.emplaceBack(b,b+1,b+2),f.emplaceBack(b+1,b+2,b+3),d.vertexLength+=4,d.primitiveLength+=2,p.glyphOffsetArray.emplaceBack(t.glyphOffset[0])};if(o.text&&o.text.sections){var b=o.text.sections;if(this.hasPaintOverrides){for(var _,w=function(e,r){void 0!==_&&(_!==e||r)&&t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,o,o.index,{},b[_]),_=e},S=0,A=e;S<A.length;S+=1){var k=A[S];w(k.sectionIndex,!1),x(k)}w(_,!0)}else{for(var I=0,B=e;I<B.length;I+=1){x(B[I])}t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,o,o.index,{},b[0])}}else{for(var z=0,V=e;z<V.length;z+=1){x(V[z])}t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,o,o.index,{})}t.placedSymbolArray.emplaceBack(s.x,s.y,v,this.glyphOffsetArray.length-v,m,u,l,s.segment,r?r[0]:0,r?r[1]:0,n[0],n[1],a,0,!1,0,c)},Lp.prototype._addCollisionDebugVertex=function(t,e,r,n,i,o){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,n,i,Math.round(o.x),Math.round(o.y))},Lp.prototype.addCollisionDebugVertices=function(t,e,r,n,i,o,a,s){var u=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),l=u.vertexLength,c=i.layoutVertexArray,p=i.collisionVertexArray,f=a.anchorX,h=a.anchorY;if(this._addCollisionDebugVertex(c,p,o,f,h,new pointGeometry(t,e)),this._addCollisionDebugVertex(c,p,o,f,h,new pointGeometry(r,e)),this._addCollisionDebugVertex(c,p,o,f,h,new pointGeometry(r,n)),this._addCollisionDebugVertex(c,p,o,f,h,new pointGeometry(t,n)),u.vertexLength+=4,s){var y=i.indexArray;y.emplaceBack(l,l+1,l+2),y.emplaceBack(l,l+2,l+3),u.primitiveLength+=2}else{var d=i.indexArray;d.emplaceBack(l,l+1),d.emplaceBack(l+1,l+2),d.emplaceBack(l+2,l+3),d.emplaceBack(l+3,l),u.primitiveLength+=4}},Lp.prototype.addDebugCollisionBoxes=function(t,e,r,n){for(var i=t;i<e;i++){var o=this.collisionBoxArray.get(i),a=o.x1,s=o.y1,u=o.x2,l=o.y2,c=o.radius>0;this.addCollisionDebugVertices(a,s,u,l,c?n?this.textCollisionCircle:this.iconCollisionCircle:n?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,r,c)}},Lp.prototype.generateCollisionDebugBuffers=function(){for(var t=0;t<this.symbolInstances.length;t++){var e=this.symbolInstances.get(t);this.addDebugCollisionBoxes(e.textBoxStartIndex,e.textBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.verticalTextBoxStartIndex,e.verticalTextBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.iconBoxStartIndex,e.iconBoxEndIndex,e,!1),this.addDebugCollisionBoxes(e.verticalIconBoxStartIndex,e.verticalIconBoxEndIndex,e,!1)}},Lp.prototype._deserializeCollisionBoxesForSymbol=function(t,e,r,n,i,o,a,s,u){for(var l={},c=e;c<r;c++){var p=t.get(c);if(0===p.radius){l.textBox={x1:p.x1,y1:p.y1,x2:p.x2,y2:p.y2,anchorPointX:p.anchorPointX,anchorPointY:p.anchorPointY},l.textFeatureIndex=p.featureIndex;break}!l.textCircles&&(l.textCircles=[],l.textFeatureIndex=p.featureIndex);l.textCircles.push(p.anchorPointX,p.anchorPointY,p.radius,p.signedDistanceFromAnchor,1)}for(var f=n;f<i;f++){var h=t.get(f);if(0===h.radius){l.verticalTextBox={x1:h.x1,y1:h.y1,x2:h.x2,y2:h.y2,anchorPointX:h.anchorPointX,anchorPointY:h.anchorPointY},l.verticalTextFeatureIndex=h.featureIndex;break}}for(var y=o;y<a;y++){var d=t.get(y);if(0===d.radius){l.iconBox={x1:d.x1,y1:d.y1,x2:d.x2,y2:d.y2,anchorPointX:d.anchorPointX,anchorPointY:d.anchorPointY},l.iconFeatureIndex=d.featureIndex;break}}for(var v=s;v<u;v++){var m=t.get(v);if(0===m.radius){l.verticalIconBox={x1:m.x1,y1:m.y1,x2:m.x2,y2:m.y2,anchorPointX:m.anchorPointX,anchorPointY:m.anchorPointY},l.verticalIconFeatureIndex=m.featureIndex;break}}return l},Lp.prototype.deserializeCollisionBoxes=function(t){this.collisionArrays=[];for(var e=0;e<this.symbolInstances.length;e++){var r=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,r.textBoxStartIndex,r.textBoxEndIndex,r.verticalTextBoxStartIndex,r.verticalTextBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex,r.verticalIconBoxStartIndex,r.verticalIconBoxEndIndex))}},Lp.prototype.hasTextData=function(){return this.text.segments.get().length>0},Lp.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Lp.prototype.hasTextCollisionBoxData=function(){return this.textCollisionBox.segments.get().length>0},Lp.prototype.hasIconCollisionBoxData=function(){return this.iconCollisionBox.segments.get().length>0},Lp.prototype.hasTextCollisionCircleData=function(){return this.textCollisionCircle.segments.get().length>0},Lp.prototype.hasIconCollisionCircleData=function(){return this.iconCollisionCircle.segments.get().length>0},Lp.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i<n;i+=4)t.indexArray.emplaceBack(i,i+1,i+2),t.indexArray.emplaceBack(i+1,i+2,i+3)},Lp.prototype.getSortedSymbolIndexes=function(t){if(this.sortedAngle===t&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var e=Math.sin(t),r=Math.cos(t),n=[],i=[],o=[],a=0;a<this.symbolInstances.length;++a){o.push(a);var s=this.symbolInstances.get(a);n.push(0|Math.round(e*s.anchorX+r*s.anchorY)),i.push(s.featureIndex)}return o.sort((function(t,e){return n[t]-n[e]||i[e]-i[t]})),o},Lp.prototype.sortFeatures=function(t){var e=this;if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r<n.length;r+=1){var i=n[r],o=this.symbolInstances.get(i);this.featureSortOrder.push(o.featureIndex),[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(t,r,n){t>=0&&n.indexOf(t)===r&&e.addIndicesForPlacedSymbol(e.text,t)})),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},sn.register("SymbolBucket",Lp,{omit:["layers","collisionBoxArray","compareText"]}),Lp.MAX_GLYPHS=65535,Lp.addDynamicAttributes=Op;var Up,jp=(Up=!0,function(t,e){var r=Up?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Up=!1,r}),qp=jp(void 0,(function(){return qp.toString().search("(((.+)+)+)+$").toString().constructor(qp).search("(((.+)+)+)+$")}));qp();var Np,Rp={kind:"formatted"},Gp=new cu({"symbol-placement":new Ns(qu["symbol-placement"]),"symbol-spacing":new Ns(qu["symbol-spacing"]),"symbol-avoid-edges":new Ns(qu["symbol-avoid-edges"]),"symbol-sort-key":new Ys(qu["symbol-sort-key"]),"symbol-z-order":new Ns(qu["symbol-z-order"]),"icon-allow-overlap":new Ns(qu["icon-allow-overlap"]),"icon-ignore-placement":new Ns(qu["icon-ignore-placement"]),"icon-optional":new Ns(qu["icon-optional"]),"icon-rotation-alignment":new Ns(qu["icon-rotation-alignment"]),"icon-size":new Ys(qu["icon-size"]),"icon-text-fit":new Ns(qu["icon-text-fit"]),"icon-text-fit-padding":new Ns(qu["icon-text-fit-padding"]),"icon-image":new Ys(qu["icon-image"]),"icon-rotate":new Ys(qu["icon-rotate"]),"icon-padding":new Ns(qu["icon-padding"]),"icon-keep-upright":new Ns(qu["icon-keep-upright"]),"icon-offset":new Ys(qu["icon-offset"]),"icon-anchor":new Ys(qu["icon-anchor"]),"icon-pitch-alignment":new Ns(qu["icon-pitch-alignment"]),"text-pitch-alignment":new Ns(qu["text-pitch-alignment"]),"text-rotation-alignment":new Ns(qu["text-rotation-alignment"]),"text-field":new Ys(qu["text-field"]),"text-font":new Ys(qu["text-font"]),"text-size":new Ys(qu["text-size"]),"text-max-width":new Ys(qu["text-max-width"]),"text-line-height":new Ns(qu["text-line-height"]),"text-letter-spacing":new Ys(qu["text-letter-spacing"]),"text-justify":new Ys(qu["text-justify"]),"text-radial-offset":new Ys(qu["text-radial-offset"]),"text-variable-anchor":new Ns(qu["text-variable-anchor"]),"text-anchor":new Ys(qu["text-anchor"]),"text-max-angle":new Ns(qu["text-max-angle"]),"text-writing-mode":new Ns(qu["text-writing-mode"]),"text-rotate":new Ys(qu["text-rotate"]),"text-padding":new Ns(qu["text-padding"]),"text-keep-upright":new Ns(qu["text-keep-upright"]),"text-transform":new Ys(qu["text-transform"]),"text-offset":new Ys(qu["text-offset"]),"text-allow-overlap":new Ns(qu["text-allow-overlap"]),"text-ignore-placement":new Ns(qu["text-ignore-placement"]),"text-optional":new Ns(qu["text-optional"])}),Xp={paint:new cu({"icon-opacity":new Ys(Xu["icon-opacity"]),"icon-color":new Ys(Xu["icon-color"]),"icon-halo-color":new Ys(Xu["icon-halo-color"]),"icon-halo-width":new Ys(Xu["icon-halo-width"]),"icon-halo-blur":new Ys(Xu["icon-halo-blur"]),"icon-translate":new Ns(Xu["icon-translate"]),"icon-translate-anchor":new Ns(Xu["icon-translate-anchor"]),"text-opacity":new Ys(Xu["text-opacity"]),"text-color":new Ys(Xu["text-color"],{runtimeType:{kind:"color"},getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new Ys(Xu["text-halo-color"]),"text-halo-width":new Ys(Xu["text-halo-width"]),"text-halo-blur":new Ys(Xu["text-halo-blur"]),"text-show-background":new Ys(Xu["text-show-background"]),"text-translate":new Ns(Xu["text-translate"]),"text-translate-anchor":new Ns(Xu["text-translate-anchor"])}),layout:Gp},Yp=function(t){var e,r=(e=!0,function(t,r){var n=e?function(){if(r){var e=r.apply(t,arguments);return r=null,e}}:function(){};return e=!1,n}),n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function i(e){t.call(this,e,Xp)}return n(),t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"line"==this.layout.get("symbol-placement")&&"viewport"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="map"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var i=[],o=0,a=n;o<a.length;o+=1){var s=a[o];i.indexOf(s)<0&&i.push(s)}this.layout._values["text-writing-mode"]=i}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},i.prototype.getValueAndResolveTokens=function(t,e,r){var n,i=this.layout.get(t).evaluate(e,{},r),o=this._unevaluatedLayout._values[t];return o.isDataDriven()||qa.isExpression(o.value)||!i?i:(n=e.properties,i.replace(/{([^{}]+)}/g,((t,e)=>e in n?String(n[e]):"")))},i.prototype.createBucket=function(t){return new Lp(t)},i.prototype.queryRadius=function(){return 0},i.prototype.queryIntersectsFeature=function(t,e,r,n,i,o,a){return Zu.polygonIntersectPoint(t,n[0][0])},i.prototype._setPaintOverrides=function(){for(var t=0,e=Xp.paint.overridableProperties;t<e.length;t+=1){var r=e[t];if(i.hasPaintOverride(this.layout,r)){var n=this.paint.get(r);new FormatSectionOverride(n);"constant"===n.value.kind||n.value.kind,this.paint._values[r]=new PossiblyEvaluatedPropertyValue(n.property,null,n.parameters)}}},i.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return!(!this.layout||e.isDataDriven()||r.isDataDriven())&&i.hasPaintOverride(this.layout,t)},i.hasPaintOverride=function(t,e){var r=t.get("text-field"),n=Xp.paint.properties[e],i=!1,o=function(t){for(var e=0,r=t;e<r.length;e+=1){var o=r[e];if(n.overrides&&n.overrides.hasOverride(o))return void(i=!0)}};if("constant"===r.value.kind&&r.value.value instanceof Et)o(r.value.value.sections);else if("source"===r.value.kind){var a=function(t){if(!i)if(t instanceof zr&&Wt.typeOf(t.value)===Rp){var e=t.value;o(e.sections)}else t instanceof Je?o(t.sections):t.eachChild(a)},s=r.value;s._styleExpression&&a(s._styleExpression.expression)}return i},i.hasPaintOverrides=function(t){for(var e=0,r=Xp.paint.overridableProperties;e<r.length;e+=1){var n=r[e];if(i.hasPaintOverride(t,n))return!0}return!1},i}(Eu),Hp=Yp,Zp=(Np=!0,function(t,e){var r=Np?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Np=!1,r}),Jp=Zp(void 0,(function(){return Jp.toString().search("(((.+)+)+)+$").toString().constructor(Jp).search("(((.+)+)+)+$")}));Jp();var Kp={circle:nl,fill:cl,line:wl,symbol:Hp};var Wp,Qp=(Wp=!0,function(t,e){var r=Wp?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return Wp=!1,r}),tf=Qp(void 0,(function(){return tf.toString().search("(((.+)+)+)+$").toString().constructor(tf).search("(((.+)+)+)+$")}));tf();var ef=function(t){this.keyCache={},t&&this.replace(t)};function rf(t,e,r){for(var n=new gn(e),i=0,o=t;i<o.length;i+=1){o[i].recalculate(n,r)}}return ef.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},ef.prototype.update=function(t,e){for(var r,n=this,i=0,o=t;i<o.length;i+=1){var a=o[i];this._layerConfigs[a.id]=a;var s=Kp[(r=a).type]?new Kp[r.type](r):null;null!=s&&(this._layers[a.id]=s,s._featureFilter=ys.createFilter(s.filter),this.keyCache[a.id]&&delete this.keyCache[a.id])}for(var u=0,l=e;u<l.length;u+=1){var c=l[u];delete this.keyCache[c],delete this._layerConfigs[c],delete this._layers[c]}this.familiesBySource={};for(var p=0,f=function(t,e){for(var r={},n=0;n<t.length;n++){var i=e&&e[t[n].id]||Fs(t[n]);e&&(e[t[n].id]=i);var o=r[i];!o&&(o=r[i]=[]),o.push(t[n])}var a=[];for(var s in r)a.push(r[s]);return a}(function(t){var e=[];for(var r in t)e.push(t[r]);return e}(this._layerConfigs),this.keyCache);p<f.length;p+=1){var h=f[p].map((function(t){return n._layers[t.id]})),y=h[0];if(null!=y&&"none"!==y.visibility){var d=y.source||"",v=this.familiesBySource[d];!v&&(v=this.familiesBySource[d]={});var m=y.sourceLayer,g=v[m];!g&&(g=v[m]=[]),g.push(h)}}},sn.register("FeatureIndex",ks,{omit:["rawTileData","sourceLayerCoder"]}),t((function(t,r){var n=t.pbfData,i=t.layers,o=t.imageMap,a=sn.deserialize(t.serializeObj).featureIndex;t.tileID.z,e.e(a)||((a=new ks(t.tileID)).bucketLayerIDs=[]);var s={};try{var u=new ef(i);s=function(t,r,n,i,o,a){var s=new U(Object.keys(t.layers).sort()),u={},l={featureIndex:i,iconDependencies:{},patternDependencies:{},glyphDependencies:{}};for(var c in r.familiesBySource){var p=r.familiesBySource[c];for(var f in p){var h=t.layers[f];if(h){for(var y=s.encode(f),d=[],v=0;v<h.length;v++){var m=h.feature(v);d.push({feature:m,index:v,sourceLayerIndex:y,sourceLayerId:f})}for(var g=0,x=p[f];g<x.length;g+=1){var b=x[g],_=b[0];if("none"!==_.visibility){rf(b,0,null);var w=u[_.id]=_.createBucket({index:i.bucketLayerIDs.length,layers:b,sourceLayerIndex:y});e.e(a)&&e.e(a[_.id])&&(l.indexData=a[_.id]),w.populate(d,l),i.bucketLayerIDs.push(b.map((function(t){return t.id})))}}}}}var S=null;for(var A in u){(w=u[A]).hasPattern&&(w instanceof vo||w instanceof $o)&&(null==S&&(S=new st({},n)),w.addFeatures(l,S.patternPositions))}return{buckets:u,imageAtlas:S,featureIndex:i}}(function(t){if(!e.e(t))return;return new Ho(new b(t))}(n),u,o,a,0,t.indexData),s=sn.serialize(s,r)}catch(t){}return s.pickId=t.pickId,s}))}));
|