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<>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<>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<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>>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>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;i239?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.pos127;);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;e268435455||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;o55295&&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=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;et.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=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();f255?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=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;e2){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=[];n1)&&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;i4?"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",(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-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;o1})))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=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=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;eNumber.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();ie))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=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;e0&&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=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=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.lastFloorZoomthis.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;nAn.max||a.yAn.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;tthis.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=n)){for(var i=t[r+n>>1],o=r-1,a=n+1;;){do{o++}while(t[o]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>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;u0&&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-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;ar;){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);p0;)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 te?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;i0&&(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=2&&t[c-1].equals(t[c-2]);)c--;for(var p=0;pVn.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;x0;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&&(Si&&(P="bevel"),"bevel"===P&&(S>2&&(P="flipbevel"),S100)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;M2*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;r0&&(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;a1)for(var u=0;uVn.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>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>3}if(n--,1===r||2===r)(i+=t.readSVarint())s&&(s=i),(o+=t.readSVarint())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>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=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;n0;)e[r]=arguments[r+1];for(var n=0,i=e;n(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=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-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":[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;r0&&"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=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=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);ee?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=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=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;f0&&(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=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=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=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;ne.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;ne.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=3)for(var o=0;o1?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;xn.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=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;u0&&(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;o0)&&("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=0;for(var V=0,P=b.sections;V=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;u0;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;t0},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;i1||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=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;oe 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