/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var ap=Object.create;var Gl=Object.defineProperty;var lp=Object.getOwnPropertyDescriptor;var cp=Object.getOwnPropertyNames;var hp=Object.getPrototypeOf,up=Object.prototype.hasOwnProperty;var gp=(Ce,le)=>()=>(le||Ce((le={exports:{}}).exports,le),le.exports),dp=(Ce,le)=>{for(var re in le)Gl(Ce,re,{get:le[re],enumerable:!0})},eg=(Ce,le,re,pe)=>{if(le&&typeof le=="object"||typeof le=="function")for(let E of cp(le))!up.call(Ce,E)&&E!==re&&Gl(Ce,E,{get:()=>le[E],enumerable:!(pe=lp(le,E))||pe.enumerable});return Ce};var ch=(Ce,le,re)=>(re=Ce!=null?ap(hp(Ce)):{},eg(le||!Ce||!Ce.__esModule?Gl(re,"default",{value:Ce,enumerable:!0}):re,Ce)),pp=Ce=>eg(Gl({},"__esModule",{value:!0}),Ce);var Pl=gp((hh,uh)=>{(function(Ce,le){typeof hh=="object"&&typeof uh!="undefined"?uh.exports=le():typeof define=="function"&&define.amd?define(le):(Ce=typeof globalThis!="undefined"?globalThis:Ce||self,Ce.maplibregl=le())})(hh,(function(){"use strict";var Ce={},le={};function re(E,l,ue){if(le[E]=ue,E==="index"){var Ue="var sharedModule = {}; ("+le.shared+")(sharedModule); ("+le.worker+")(sharedModule);",Le={};return le.shared(Le),le.index(Ce,Le),typeof window!="undefined"&&Ce.setWorkerUrl(window.URL.createObjectURL(new Blob([Ue],{type:"text/javascript"}))),Ce}}re("shared",["exports"],(function(E){"use strict";function l(A,t,i,n){return new(i||(i=Promise))((function(o,c){function g(_){try{f(n.next(_))}catch(y){c(y)}}function p(_){try{f(n.throw(_))}catch(y){c(y)}}function f(_){var y;_.done?o(_.value):(y=_.value,y instanceof i?y:new i((function(w){w(y)}))).then(g,p)}f((n=n.apply(A,t||[])).next())}))}function ue(A,t){this.x=A,this.y=t}function Ue(A){return A&&A.__esModule&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A}var Le,Oe;typeof SuppressedError=="function"&&SuppressedError,ue.prototype={clone(){return new ue(this.x,this.y)},add(A){return this.clone()._add(A)},sub(A){return this.clone()._sub(A)},multByPoint(A){return this.clone()._multByPoint(A)},divByPoint(A){return this.clone()._divByPoint(A)},mult(A){return this.clone()._mult(A)},div(A){return this.clone()._div(A)},rotate(A){return this.clone()._rotate(A)},rotateAround(A,t){return this.clone()._rotateAround(A,t)},matMult(A){return this.clone()._matMult(A)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(A){return this.x===A.x&&this.y===A.y},dist(A){return Math.sqrt(this.distSqr(A))},distSqr(A){let t=A.x-this.x,i=A.y-this.y;return t*t+i*i},angle(){return Math.atan2(this.y,this.x)},angleTo(A){return Math.atan2(this.y-A.y,this.x-A.x)},angleWith(A){return this.angleWithSep(A.x,A.y)},angleWithSep(A,t){return Math.atan2(this.x*t-this.y*A,this.x*A+this.y*t)},_matMult(A){let t=A[2]*this.x+A[3]*this.y;return this.x=A[0]*this.x+A[1]*this.y,this.y=t,this},_add(A){return this.x+=A.x,this.y+=A.y,this},_sub(A){return this.x-=A.x,this.y-=A.y,this},_mult(A){return this.x*=A,this.y*=A,this},_div(A){return this.x/=A,this.y/=A,this},_multByPoint(A){return this.x*=A.x,this.y*=A.y,this},_divByPoint(A){return this.x/=A.x,this.y/=A.y,this},_unit(){return this._div(this.mag()),this},_perp(){let A=this.y;return this.y=this.x,this.x=-A,this},_rotate(A){let t=Math.cos(A),i=Math.sin(A),n=i*this.x+t*this.y;return this.x=t*this.x-i*this.y,this.y=n,this},_rotateAround(A,t){let i=Math.cos(A),n=Math.sin(A),o=t.y+n*(this.x-t.x)+i*(this.y-t.y);return this.x=t.x+i*(this.x-t.x)-n*(this.y-t.y),this.y=o,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:ue},ue.convert=function(A){if(A instanceof ue)return A;if(Array.isArray(A))return new ue(+A[0],+A[1]);if(A.x!==void 0&&A.y!==void 0)return new ue(+A.x,+A.y);throw new Error("Expected [x, y] or {x, y} point format")};var Se=(function(){if(Oe)return Le;function A(t,i,n,o){this.cx=3*t,this.bx=3*(n-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(o-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=n,this.p2y=o}return Oe=1,Le=A,A.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,i){if(i===void 0&&(i=1e-6),t<0)return 0;if(t>1)return 1;for(var n=t,o=0;o<8;o++){var c=this.sampleCurveX(n)-t;if(Math.abs(c)c?p=n:f=n,n=.5*(f-p)+p;return n},solve:function(t,i){return this.sampleCurveY(this.solveCurveX(t,i))}},Le})(),te=Ue(Se);let ot,lt;function Nt(){return ot==null&&(ot=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),ot}function Ut(){if(lt==null&&(lt=!1,Nt())){let t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let n=0;n<25;n++){let o=4*n;t.fillStyle=`rgb(${o},${o+1},${o+2})`,t.fillRect(n%5,Math.floor(n/5),1,1)}let i=t.getImageData(0,0,5,5).data;for(let n=0;n<100;n++)if(n%4!=3&&i[n]!==n){lt=!0;break}}}return lt||!1}var bt=1e-6,ht=typeof Float32Array!="undefined"?Float32Array:Array;function kt(){var A=new ht(9);return ht!=Float32Array&&(A[1]=0,A[2]=0,A[3]=0,A[5]=0,A[6]=0,A[7]=0),A[0]=1,A[4]=1,A[8]=1,A}function WA(A){return A[0]=1,A[1]=0,A[2]=0,A[3]=0,A[4]=0,A[5]=1,A[6]=0,A[7]=0,A[8]=0,A[9]=0,A[10]=1,A[11]=0,A[12]=0,A[13]=0,A[14]=0,A[15]=1,A}function _A(){var A=new ht(3);return ht!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0),A}function kr(A){var t=A[0],i=A[1],n=A[2];return Math.sqrt(t*t+i*i+n*n)}function Vn(A,t,i){var n=new ht(3);return n[0]=A,n[1]=t,n[2]=i,n}function ln(A,t,i){return A[0]=t[0]+i[0],A[1]=t[1]+i[1],A[2]=t[2]+i[2],A}function Zi(A,t,i){return A[0]=t[0]*i,A[1]=t[1]*i,A[2]=t[2]*i,A}function SA(A,t,i){var n=t[0],o=t[1],c=t[2],g=i[0],p=i[1],f=i[2];return A[0]=o*f-c*p,A[1]=c*g-n*f,A[2]=n*p-o*g,A}var aA,MA=kr;function cn(A,t,i){var n=t[0],o=t[1],c=t[2],g=t[3];return A[0]=i[0]*n+i[4]*o+i[8]*c+i[12]*g,A[1]=i[1]*n+i[5]*o+i[9]*c+i[13]*g,A[2]=i[2]*n+i[6]*o+i[10]*c+i[14]*g,A[3]=i[3]*n+i[7]*o+i[11]*c+i[15]*g,A}function er(){var A=new ht(4);return ht!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0),A[3]=1,A}function tr(A,t,i,n){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",c=Math.PI/360;t*=c,n*=c,i*=c;var g=Math.sin(t),p=Math.cos(t),f=Math.sin(i),_=Math.cos(i),y=Math.sin(n),w=Math.cos(n);switch(o){case"xyz":A[0]=g*_*w+p*f*y,A[1]=p*f*w-g*_*y,A[2]=p*_*y+g*f*w,A[3]=p*_*w-g*f*y;break;case"xzy":A[0]=g*_*w-p*f*y,A[1]=p*f*w-g*_*y,A[2]=p*_*y+g*f*w,A[3]=p*_*w+g*f*y;break;case"yxz":A[0]=g*_*w+p*f*y,A[1]=p*f*w-g*_*y,A[2]=p*_*y-g*f*w,A[3]=p*_*w+g*f*y;break;case"yzx":A[0]=g*_*w+p*f*y,A[1]=p*f*w+g*_*y,A[2]=p*_*y-g*f*w,A[3]=p*_*w-g*f*y;break;case"zxy":A[0]=g*_*w-p*f*y,A[1]=p*f*w+g*_*y,A[2]=p*_*y+g*f*w,A[3]=p*_*w-g*f*y;break;case"zyx":A[0]=g*_*w-p*f*y,A[1]=p*f*w+g*_*y,A[2]=p*_*y-g*f*w,A[3]=p*_*w+g*f*y;break;default:throw new Error("Unknown angle order "+o)}return A}function ir(){var A=new ht(2);return ht!=Float32Array&&(A[0]=0,A[1]=0),A}function qn(A,t){var i=new ht(2);return i[0]=A,i[1]=t,i}_A(),aA=new ht(4),ht!=Float32Array&&(aA[0]=0,aA[1]=0,aA[2]=0,aA[3]=0),_A(),Vn(1,0,0),Vn(0,1,0),er(),er(),kt(),ir();let dt=8192;function Ar(A,t,i){return t*(dt/(A.tileSize*Math.pow(2,i-A.tileID.overscaledZ)))}function pi(A,t){return(A%t+t)%t}function rr(A,t,i){return A*(1-i)+t*i}function lA(A){if(A<=0)return 0;if(A>=1)return 1;let t=A*A,i=t*A;return 4*(A<.5?i:3*(A-t)+i-.75)}function UA(A,t,i,n){let o=new te(A,t,i,n);return c=>o.solve(c)}let nr=UA(.25,.1,.25,1);function bi(A,t,i){return Math.min(i,Math.max(t,A))}function Gr(A,t,i){let n=i-t,o=((A-t)%n+n)%n+t;return o===t?i:o}function Oi(A,...t){for(let i of t)for(let n in i)A[n]=i[n];return A}let Ji=1;function Pr(A,t,i){let n={};for(let o in A)n[o]=t.call(this,A[o],o,A);return n}function Rr(A,t,i){let n={};for(let o in A)t.call(this,A[o],o,A)&&(n[o]=A[o]);return n}function Mi(A){return Array.isArray(A)?A.map(Mi):typeof A=="object"&&A?Pr(A,Mi):A}let Gt={};function zt(A){Gt[A]||(typeof console!="undefined"&&console.warn(A),Gt[A]=!0)}function Vi(A,t,i){return(i.y-A.y)*(t.x-A.x)>(t.y-A.y)*(i.x-A.x)}function cA(A){return typeof WorkerGlobalScope!="undefined"&&A!==void 0&&A instanceof WorkerGlobalScope}let sr=null;function hA(A){return typeof ImageBitmap!="undefined"&&A instanceof ImageBitmap}let uA="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Nr(A,t,i,n,o){return l(this,void 0,void 0,(function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let c=new VideoFrame(A,{timestamp:0});try{let g=c==null?void 0:c.format;if(!g||!g.startsWith("BGR")&&!g.startsWith("RGB"))throw new Error(`Unrecognized format ${g}`);let p=g.startsWith("BGR"),f=new Uint8ClampedArray(n*o*4);if(yield c.copyTo(f,(function(_,y,w,v,F){let D=4*Math.max(-y,0),U=(Math.max(0,w)-w)*v*4+D,k=4*v,N=Math.max(0,y),ee=Math.max(0,w);return{rect:{x:N,y:ee,width:Math.min(_.width,y+v)-N,height:Math.min(_.height,w+F)-ee},layout:[{offset:U,stride:k}]}})(A,t,i,n,o)),p)for(let _=0;_{A.removeEventListener(t,i,n)}}}function or(A){return A*Math.PI/180}function GA(A){return A/Math.PI*180}let PA={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},RA={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},zr="AbortError";function $(){return new Error(zr)}let S={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function M(A){return S.REGISTERED_PROTOCOLS[A.substring(0,A.indexOf("://"))]}let L="global-dispatcher";class j extends Error{constructor(t,i,n,o){super(`AJAXError: ${i} (${t}): ${n}`),this.status=t,this.statusText=i,this.url=n,this.body=o}}let Z=()=>cA(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,W=function(A,t){if(/:\/\//.test(A.url)&&!/^https?:|^file:/.test(A.url)){let n=M(A.url);if(n)return n(A,t);if(cA(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:A,targetMapId:L},t)}if(!(/^file:/.test(i=A.url)||/^file:/.test(Z())&&!/^\w+:/.test(i))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return(function(n,o){return l(this,void 0,void 0,(function*(){let c=new Request(n.url,{method:n.method||"GET",body:n.body,credentials:n.credentials,headers:n.headers,cache:n.cache,referrer:Z(),signal:o.signal}),g,p;n.type!=="json"||c.headers.has("Accept")||c.headers.set("Accept","application/json");try{g=yield fetch(c)}catch(_){throw new j(0,_.message,n.url,new Blob)}if(!g.ok){let _=yield g.blob();throw new j(g.status,g.statusText,n.url,_)}p=n.type==="arrayBuffer"||n.type==="image"?g.arrayBuffer():n.type==="json"?g.json():g.text();let f=yield p;if(o.signal.aborted)throw $();return{data:f,cacheControl:g.headers.get("Cache-Control"),expires:g.headers.get("Expires")}}))})(A,t);if(cA(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:A,mustQueue:!0,targetMapId:L},t)}var i;return(function(n,o){return new Promise(((c,g)=>{var p;let f=new XMLHttpRequest;f.open(n.method||"GET",n.url,!0),n.type!=="arrayBuffer"&&n.type!=="image"||(f.responseType="arraybuffer");for(let _ in n.headers)f.setRequestHeader(_,n.headers[_]);n.type==="json"&&(f.responseType="text",!((p=n.headers)===null||p===void 0)&&p.Accept||f.setRequestHeader("Accept","application/json")),f.withCredentials=n.credentials==="include",f.onerror=()=>{g(new Error(f.statusText))},f.onload=()=>{if(!o.signal.aborted)if((f.status>=200&&f.status<300||f.status===0)&&f.response!==null){let _=f.response;if(n.type==="json")try{_=JSON.parse(f.response)}catch(y){return void g(y)}c({data:_,cacheControl:f.getResponseHeader("Cache-Control"),expires:f.getResponseHeader("Expires")})}else{let _=new Blob([f.response],{type:f.getResponseHeader("Content-Type")});g(new j(f.status,f.statusText,n.url,_))}},o.signal.addEventListener("abort",(()=>{f.abort(),g($())})),f.send(n.body)}))})(A,t)};function ne(A){if(!A||A.indexOf("://")<=0||A.indexOf("data:image/")===0||A.indexOf("blob:")===0)return!0;let t=new URL(A),i=window.location;return t.protocol===i.protocol&&t.host===i.host}function ie(A,t,i){i[A]&&i[A].indexOf(t)!==-1||(i[A]=i[A]||[],i[A].push(t))}function de(A,t,i){if(i&&i[A]){let n=i[A].indexOf(t);n!==-1&&i[A].splice(n,1)}}class Qe{constructor(t,i={}){Oi(this,i),this.type=t}}class me extends Qe{constructor(t,i={}){super("error",Oi({error:t},i))}}class ke{on(t,i){return this._listeners=this._listeners||{},ie(t,i,this._listeners),{unsubscribe:()=>{this.off(t,i)}}}off(t,i){return de(t,i,this._listeners),de(t,i,this._oneTimeListeners),this}once(t,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},ie(t,i,this._oneTimeListeners),this):new Promise((n=>this.once(t,n)))}fire(t,i){typeof t=="string"&&(t=new Qe(t,i||{}));let n=t.type;if(this.listens(n)){t.target=this;let o=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];for(let p of o)p.call(this,t);let c=this._oneTimeListeners&&this._oneTimeListeners[n]?this._oneTimeListeners[n].slice():[];for(let p of c)de(n,p,this._oneTimeListeners),p.call(this,t);let g=this._eventedParent;g&&(Oi(t,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),g.fire(t))}else t instanceof me&&console.error(t.error);return this}listens(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}setEventedParent(t,i){return this._eventedParent=t,this._eventedParentData=i,this}}var Ae={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"array",value:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"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"}},layout_circle:{"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"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"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"}},layout_symbol:{"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",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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:{},"viewport-glyph":{},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-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"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"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"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","feature"]},"property-type":"cross-faded-data-driven"},"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"}},paint_circle:{"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"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"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-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"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let He=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function At(A,t){let i={};for(let n in A)n!=="ref"&&(i[n]=A[n]);return He.forEach((n=>{n in t&&(i[n]=t[n])})),i}function Ne(A,t){if(Array.isArray(A)){if(!Array.isArray(t)||A.length!==t.length)return!1;for(let i=0;i`:A.itemType.kind==="value"?"array":`array<${t}>`}return A.kind}let Ia=[fi,Ie,Ve,We,li,lr,zA,NA,Fi(qe),Wn,Yr,gA,Pt,es];function hn(A,t){if(t.kind==="error")return null;if(A.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!hn(A.itemType,t.itemType))&&(typeof A.N!="number"||A.N===t.N))return null}else{if(A.kind===t.kind)return null;if(A.kind==="value"){for(let i of Ia)if(!hn(i,t))return null}}return`Expected ${ft(A)} but found ${ft(t)} instead.`}function ro(A,t){return t.some((i=>i.kind===A.kind))}function YA(A,t){return t.some((i=>i==="null"?A===null:i==="array"?Array.isArray(A):i==="object"?A&&!Array.isArray(A)&&typeof A=="object":i===typeof A))}function OA(A,t){return A.kind==="array"&&t.kind==="array"?A.itemType.kind===t.itemType.kind&&typeof A.N=="number":A.kind===t.kind}let no=.96422,Ea=.82521,xa=4/29,Or=6/29,va=3*Or*Or,ql=Or*Or*Or,$l=Math.PI/180,Wl=180/Math.PI;function so(A){return(A%=360)<0&&(A+=360),A}function Kr([A,t,i,n]){let o,c,g=ao((.2225045*(A=oo(A))+.7168786*(t=oo(t))+.0606169*(i=oo(i)))/1);A===t&&t===i?o=c=g:(o=ao((.4360747*A+.3850649*t+.1430804*i)/no),c=ao((.0139322*A+.0971045*t+.7141733*i)/Ea));let p=116*g-16;return[p<0?0:p,500*(o-g),200*(g-c),n]}function oo(A){return A<=.04045?A/12.92:Math.pow((A+.055)/1.055,2.4)}function ao(A){return A>ql?Math.pow(A,1/3):A/va+xa}function jr([A,t,i,n]){let o=(A+16)/116,c=isNaN(t)?o:o+t/500,g=isNaN(i)?o:o-i/200;return o=1*co(o),c=no*co(c),g=Ea*co(g),[lo(3.1338561*c-1.6168667*o-.4906146*g),lo(-.9787684*c+1.9161415*o+.033454*g),lo(.0719453*c-.2289914*o+1.4052427*g),n]}function lo(A){return(A=A<=.00304?12.92*A:1.055*Math.pow(A,1/2.4)-.055)<0?0:A>1?1:A}function co(A){return A>Or?A*A*A:va*(A-xa)}let ec=Object.hasOwn||function(A,t){return Object.prototype.hasOwnProperty.call(A,t)};function Xr(A,t){return ec(A,t)?A[t]:void 0}function un(A){return parseInt(A.padEnd(2,A),16)/255}function qi(A,t){return tt(t?A/100:A,0,1)}function tt(A,t,i){return Math.min(Math.max(t,A),i)}function cr(A){return!A.some(Number.isNaN)}let KA={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function yA(A,t,i){return A+i*(t-A)}function hr(A,t,i){return A.map(((n,o)=>yA(n,t[o],i)))}class it{constructor(t,i,n,o=1,c=!0){this.r=t,this.g=i,this.b=n,this.a=o,c||(this.r*=o,this.g*=o,this.b*=o,o||this.overwriteGetter("rgb",[t,i,n,o]))}static parse(t){if(t instanceof it)return t;if(typeof t!="string")return;let i=(function(n){if((n=n.toLowerCase().trim())==="transparent")return[0,0,0,0];let o=Xr(KA,n);if(o){let[g,p,f]=o;return[g/255,p/255,f/255,1]}if(n.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(n)){let g=n.length<6?1:2,p=1;return[un(n.slice(p,p+=g)),un(n.slice(p,p+=g)),un(n.slice(p,p+=g)),un(n.slice(p,p+g)||"ff")]}if(n.startsWith("rgb")){let g=n.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(g){let[p,f,_,y,w,v,F,D,U,k,N,ee]=g,X=[y||" ",F||" ",k].join("");if(X===" "||X===" /"||X===",,"||X===",,,"){let J=[_,v,U].join(""),oe=J==="%%%"?100:J===""?255:0;if(oe){let ge=[tt(+f/oe,0,1),tt(+w/oe,0,1),tt(+D/oe,0,1),N?qi(+N,ee):1];if(cr(ge))return ge}}return}}let c=n.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(c){let[g,p,f,_,y,w,v,F,D]=c,U=[f||" ",y||" ",v].join("");if(U===" "||U===" /"||U===",,"||U===",,,"){let k=[+p,tt(+_,0,100),tt(+w,0,100),F?qi(+F,D):1];if(cr(k))return(function([N,ee,X,J]){function oe(ge){let ye=(ge+N/30)%12,De=ee*Math.min(X,1-X);return X-De*Math.max(-1,Math.min(ye-3,9-ye,1))}return N=so(N),ee/=100,X/=100,[oe(0),oe(8),oe(4),J]})(k)}}})(t);return i?new it(...i,!1):void 0}get rgb(){let{r:t,g:i,b:n,a:o}=this,c=o||1/0;return this.overwriteGetter("rgb",[t/c,i/c,n/c,o])}get hcl(){return this.overwriteGetter("hcl",(function(t){let[i,n,o,c]=Kr(t),g=Math.sqrt(n*n+o*o);return[Math.round(1e4*g)?so(Math.atan2(o,n)*Wl):NaN,g,i,c]})(this.rgb))}get lab(){return this.overwriteGetter("lab",Kr(this.rgb))}overwriteGetter(t,i){return Object.defineProperty(this,t,{value:i}),i}toString(){let[t,i,n,o]=this.rgb;return`rgba(${[t,i,n].map((c=>Math.round(255*c))).join(",")},${o})`}static interpolate(t,i,n,o="rgb"){switch(o){case"rgb":{let[c,g,p,f]=hr(t.rgb,i.rgb,n);return new it(c,g,p,f,!1)}case"hcl":{let[c,g,p,f]=t.hcl,[_,y,w,v]=i.hcl,F,D;if(isNaN(c)||isNaN(_))isNaN(c)?isNaN(_)?F=NaN:(F=_,p!==1&&p!==0||(D=y)):(F=c,w!==1&&w!==0||(D=g));else{let X=_-c;_>c&&X>180?X-=360:_180&&(X+=360),F=c+n*X}let[U,k,N,ee]=(function([X,J,oe,ge]){return X=isNaN(X)?0:X*$l,jr([oe,Math.cos(X)*J,Math.sin(X)*J,ge])})([F,D!=null?D:yA(g,y,n),yA(p,w,n),yA(f,v,n)]);return new it(U,k,N,ee,!1)}case"lab":{let[c,g,p,f]=jr(hr(t.lab,i.lab,n));return new it(c,g,p,f,!1)}}}}it.black=new it(0,0,0,1),it.white=new it(1,1,1,1),it.transparent=new it(0,0,0,0),it.red=new it(1,0,0,1);class ur{constructor(t,i,n){this.sensitivity=t?i?"variant":"case":i?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,i){return this.collator.compare(t,i)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let ts=["bottom","center","top"];class is{constructor(t,i,n,o,c,g){this.text=t,this.image=i,this.scale=n,this.fontStack=o,this.textColor=c,this.verticalAlign=g}}class Ci{constructor(t){this.sections=t}static fromString(t){return new Ci([new is(t,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some((t=>t.text.length!==0||t.image&&t.image.name.length!==0))}static factory(t){return t instanceof Ci?t:Ci.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map((t=>t.text)).join("")}}class ii{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof ii)return t;if(typeof t=="number")return new ii([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(let i of t)if(typeof i!="number")return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new ii(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,i,n){return new ii(hr(t.values,i.values,n))}}class wi{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof wi)return t;if(typeof t=="number")return new wi([t]);if(Array.isArray(t)){for(let i of t)if(typeof i!="number")return;return new wi(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,i,n){return new wi(hr(t.values,i.values,n))}}class Xt{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Xt)return t;if(typeof t=="string"){let n=it.parse(t);return n?new Xt([n]):void 0}if(!Array.isArray(t))return;let i=[];for(let n of t){if(typeof n!="string")return;let o=it.parse(n);if(!o)return;i.push(o)}return new Xt(i)}toString(){return JSON.stringify(this.values)}static interpolate(t,i,n,o="rgb"){let c=[];if(t.values.length!=i.values.length)throw new Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${i.values.length}), cannot interpolate.`);for(let g=0;g=0&&A<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof i=="number"&&i>=0&&i<=255?n===void 0||typeof n=="number"&&n>=0&&n<=1?null:`Invalid rgba value [${[A,t,i,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof n=="number"?[A,t,i,n]:[A,t,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function gr(A){if(A===null||typeof A=="string"||typeof A=="boolean"||typeof A=="number"||A instanceof mi||A instanceof it||A instanceof ur||A instanceof Ci||A instanceof ii||A instanceof wi||A instanceof Xt||A instanceof Ii||A instanceof Ti)return!0;if(Array.isArray(A)){for(let t of A)if(!gr(t))return!1;return!0}if(typeof A=="object"){for(let t in A)if(!gr(A[t]))return!1;return!0}return!1}function Ke(A){if(A===null)return fi;if(typeof A=="string")return Ve;if(typeof A=="boolean")return We;if(typeof A=="number")return Ie;if(A instanceof it)return li;if(A instanceof mi)return lr;if(A instanceof ur)return $n;if(A instanceof Ci)return zA;if(A instanceof ii)return Wn;if(A instanceof wi)return Yr;if(A instanceof Xt)return gA;if(A instanceof Ii)return es;if(A instanceof Ti)return Pt;if(Array.isArray(A)){let t=A.length,i;for(let n of A){let o=Ke(n);if(i){if(i===o)continue;i=qe;break}i=o}return Fi(i||qe,t)}return NA}function Ze(A){let t=typeof A;return A===null?"":t==="string"||t==="number"||t==="boolean"?String(A):A instanceof it||A instanceof mi||A instanceof Ci||A instanceof ii||A instanceof wi||A instanceof Xt||A instanceof Ii||A instanceof Ti?A.toString():JSON.stringify(A)}class QA{constructor(t,i){this.type=t,this.value=i}static parse(t,i){if(t.length!==2)return i.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!gr(t[1]))return i.error("invalid value");let n=t[1],o=Ke(n),c=i.expectedType;return o.kind!=="array"||o.N!==0||!c||c.kind!=="array"||typeof c.N=="number"&&c.N!==0||(o=c),new QA(o,n)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let at={string:Ve,number:Ie,boolean:We,object:NA};class Li{constructor(t,i){this.type=t,this.args=i}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");let n,o=1,c=t[0];if(c==="array"){let p,f;if(t.length>2){let _=t[1];if(typeof _!="string"||!(_ in at)||_==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);p=at[_],o++}else p=qe;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return i.error('The length argument to "array" must be a positive integer literal',2);f=t[2],o++}n=Fi(p,f)}else{if(!at[c])throw new Error(`Types doesn't contain name = ${c}`);n=at[c]}let g=[];for(;ot.outputDefined()))}}let dA={"to-boolean":We,"to-color":li,"to-number":Ie,"to-string":Ve};class pA{constructor(t,i){this.type=t,this.args=i}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");let n=t[0];if(!dA[n])throw new Error(`Can't parse ${n} as it is not part of the known types`);if((n==="to-boolean"||n==="to-string")&&t.length!==2)return i.error("Expected one argument.");let o=dA[n],c=[];for(let g=1;g4?`Invalid rgba value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:Qt(i[0],i[1],i[2],i[3]),!n))return new it(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new mt(n||`Could not parse color from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"padding":{let i;for(let n of this.args){i=n.evaluate(t);let o=ii.parse(i);if(o)return o}throw new mt(`Could not parse padding from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"numberArray":{let i;for(let n of this.args){i=n.evaluate(t);let o=wi.parse(i);if(o)return o}throw new mt(`Could not parse numberArray from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"colorArray":{let i;for(let n of this.args){i=n.evaluate(t);let o=Xt.parse(i);if(o)return o}throw new mt(`Could not parse colorArray from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"variableAnchorOffsetCollection":{let i;for(let n of this.args){i=n.evaluate(t);let o=Ii.parse(i);if(o)return o}throw new mt(`Could not parse variableAnchorOffsetCollection from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"number":{let i=null;for(let n of this.args){if(i=n.evaluate(t),i===null)return 0;let o=Number(i);if(!isNaN(o))return o}throw new mt(`Could not convert ${JSON.stringify(i)} to number.`)}case"formatted":return Ci.fromString(Ze(this.args[0].evaluate(t)));case"resolvedImage":return Ti.fromString(Ze(this.args[0].evaluate(t)));case"projectionDefinition":return this.args[0].evaluate(t);default:return Ze(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}}let As=["Unknown","Point","LineString","Polygon"];class ho{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?As[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let i=this._parseColorCache.get(t);return i||(i=it.parse(t),this._parseColorCache.set(t,i)),i}}class Hr{constructor(t,i,n=[],o,c=new ar,g=[]){this.registry=t,this.path=n,this.key=n.map((p=>`[${p}]`)).join(""),this.scope=c,this.errors=g,this.expectedType=o,this._isConstant=i}parse(t,i,n,o,c={}){return i?this.concat(i,n,o)._parse(t,c):this._parse(t,c)}_parse(t,i){function n(o,c,g){return g==="assert"?new Li(c,[o]):g==="coerce"?new pA(c,[o]):o}if(t!==null&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"||(t=["literal",t]),Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let o=t[0];if(typeof o!="string")return this.error(`Expression name must be a string, but found ${typeof o} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let c=this.registry[o];if(c){let g=c.parse(t,this);if(!g)return null;if(this.expectedType){let p=this.expectedType,f=g.type;if(p.kind!=="string"&&p.kind!=="number"&&p.kind!=="boolean"&&p.kind!=="object"&&p.kind!=="array"||f.kind!=="value"){if(p.kind==="projectionDefinition"&&["string","array"].includes(f.kind)||["color","formatted","resolvedImage"].includes(p.kind)&&["value","string"].includes(f.kind)||["padding","numberArray"].includes(p.kind)&&["value","number","array"].includes(f.kind)||p.kind==="colorArray"&&["value","string","array"].includes(f.kind)||p.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(f.kind))g=n(g,p,i.typeAnnotation||"coerce");else if(this.checkSubtype(p,f))return null}else g=n(g,p,i.typeAnnotation||"assert")}if(!(g instanceof QA)&&g.type.kind!=="resolvedImage"&&this._isConstant(g)){let p=new ho;try{g=new QA(g.type,g.evaluate(p))}catch(f){return this.error(f.message),null}}return g}return this.error(`Unknown expression "${o}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(t===void 0?"'undefined' value invalid. Use null instead.":typeof t=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof t} instead.`)}concat(t,i,n){let o=typeof t=="number"?this.path.concat(t):this.path,c=n?this.scope.concat(n):this.scope;return new Hr(this.registry,this._isConstant,o,i||null,c,this.errors)}error(t,...i){let n=`${this.key}${i.map((o=>`[${o}]`)).join("")}`;this.errors.push(new Ui(n,t))}checkSubtype(t,i){let n=hn(t,i);return n&&this.error(n),n}}class gn{constructor(t,i){this.type=i.type,this.bindings=[].concat(t),this.result=i}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(let i of this.bindings)t(i[1]);t(this.result)}static parse(t,i){if(t.length<4)return i.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);let n=[];for(let c=1;c=n.length)throw new mt(`Array index out of bounds: ${i} > ${n.length-1}.`);if(i!==Math.floor(i))throw new mt(`Array index must be an integer, but found ${i} instead.`);return n[i]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class ss{constructor(t,i){this.type=We,this.needle=t,this.haystack=i}static parse(t,i){if(t.length!==3)return i.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let n=i.parse(t[1],1,qe),o=i.parse(t[2],2,qe);return n&&o?ro(n.type,[We,Ve,Ie,fi,qe])?new ss(n,o):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${ft(n.type)} instead`):null}evaluate(t){let i=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!n)return!1;if(!YA(i,["boolean","string","number","null"]))throw new mt(`Expected first argument to be of type boolean, string, number or null, but found ${ft(Ke(i))} instead.`);if(!YA(n,["string","array"]))throw new mt(`Expected second argument to be of type array or string, but found ${ft(Ke(n))} instead.`);return n.indexOf(i)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class $i{constructor(t,i,n){this.type=Ie,this.needle=t,this.haystack=i,this.fromIndex=n}static parse(t,i){if(t.length<=2||t.length>=5)return i.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let n=i.parse(t[1],1,qe),o=i.parse(t[2],2,qe);if(!n||!o)return null;if(!ro(n.type,[We,Ve,Ie,fi,qe]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${ft(n.type)} instead`);if(t.length===4){let c=i.parse(t[3],3,Ie);return c?new $i(n,o,c):null}return new $i(n,o)}evaluate(t){let i=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!YA(i,["boolean","string","number","null"]))throw new mt(`Expected first argument to be of type boolean, string, number or null, but found ${ft(Ke(i))} instead.`);let o;if(this.fromIndex&&(o=this.fromIndex.evaluate(t)),YA(n,["string"])){let c=n.indexOf(i,o);return c===-1?-1:[...n.slice(0,c)].length}if(YA(n,["array"]))return n.indexOf(i,o);throw new mt(`Expected second argument to be of type array or string, but found ${ft(Ke(n))} instead.`)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class Ai{constructor(t,i,n,o,c,g){this.inputType=t,this.type=i,this.input=n,this.cases=o,this.outputs=c,this.otherwise=g}static parse(t,i){if(t.length<5)return i.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return i.error("Expected an even number of arguments.");let n,o;i.expectedType&&i.expectedType.kind!=="value"&&(o=i.expectedType);let c={},g=[];for(let _=2;_Number.MAX_SAFE_INTEGER)return v.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof D=="number"&&Math.floor(D)!==D)return v.error("Numeric branch labels must be integer values.");if(n){if(v.checkSubtype(n,Ke(D)))return null}else n=Ke(D);if(c[String(D)]!==void 0)return v.error("Branch labels must be unique.");c[String(D)]=g.length}let F=i.parse(w,_,o);if(!F)return null;o=o||F.type,g.push(F)}let p=i.parse(t[1],1,qe);if(!p)return null;let f=i.parse(t[t.length-1],t.length-1,o);return f?p.type.kind!=="value"&&i.concat(1).checkSubtype(n,p.type)?null:new Ai(n,o,p,c,g,f):null}evaluate(t){let i=this.input.evaluate(t);return(Ke(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))&&this.otherwise.outputDefined()}}class Zr{constructor(t,i,n){this.type=t,this.branches=i,this.otherwise=n}static parse(t,i){if(t.length<4)return i.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return i.error("Expected an odd number of arguments.");let n;i.expectedType&&i.expectedType.kind!=="value"&&(n=i.expectedType);let o=[];for(let g=1;gi.outputDefined()))&&this.otherwise.outputDefined()}}class dn{constructor(t,i,n,o){this.type=t,this.input=i,this.beginIndex=n,this.endIndex=o}static parse(t,i){if(t.length<=2||t.length>=5)return i.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let n=i.parse(t[1],1,qe),o=i.parse(t[2],2,Ie);if(!n||!o)return null;if(!ro(n.type,[Fi(qe),Ve,qe]))return i.error(`Expected first argument to be of type array or string, but found ${ft(n.type)} instead`);if(t.length===4){let c=i.parse(t[3],3,Ie);return c?new dn(n.type,n,o,c):null}return new dn(n.type,n,o)}evaluate(t){let i=this.input.evaluate(t),n=this.beginIndex.evaluate(t),o;if(this.endIndex&&(o=this.endIndex.evaluate(t)),YA(i,["string"]))return[...i].slice(n,o).join("");if(YA(i,["array"]))return i.slice(n,o);throw new mt(`Expected first argument to be of type array or string, but found ${ft(Ke(i))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function dr(A,t){let i=A.length-1,n,o,c=0,g=i,p=0;for(;c<=g;)if(p=Math.floor((c+g)/2),n=A[p],o=A[p+1],n<=t){if(p===i||tt))throw new mt("Input is not a number.");g=p-1}return 0}class Rt{constructor(t,i,n){this.type=t,this.input=i,this.labels=[],this.outputs=[];for(let[o,c]of n)this.labels.push(o),this.outputs.push(c)}static parse(t,i){if(t.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return i.error("Expected an even number of arguments.");let n=i.parse(t[1],1,Ie);if(!n)return null;let o=[],c=null;i.expectedType&&i.expectedType.kind!=="value"&&(c=i.expectedType);for(let g=1;g=p)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',_);let w=i.parse(f,y,c);if(!w)return null;c=c||w.type,o.push([p,w])}return new Rt(c,n,o)}evaluate(t){let i=this.labels,n=this.outputs;if(i.length===1)return n[0].evaluate(t);let o=this.input.evaluate(t);if(o<=i[0])return n[0].evaluate(t);let c=i.length;return o>=i[c-1]?n[c-1].evaluate(t):n[dr(i,o)].evaluate(t)}eachChild(t){t(this.input);for(let i of this.outputs)t(i)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}}function Fa(A){return A&&A.__esModule&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A}var pn,uo,tc=(function(){if(uo)return pn;function A(t,i,n,o){this.cx=3*t,this.bx=3*(n-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(o-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=n,this.p2y=o}return uo=1,pn=A,A.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,i){if(i===void 0&&(i=1e-6),t<0)return 0;if(t>1)return 1;for(var n=t,o=0;o<8;o++){var c=this.sampleCurveX(n)-t;if(Math.abs(c)c?p=n:f=n,n=.5*(f-p)+p;return n},solve:function(t,i){return this.sampleCurveY(this.solveCurveX(t,i))}},pn})(),Jr=Fa(tc);class ci{constructor(t,i,n,o,c){this.type=t,this.operator=i,this.interpolation=n,this.input=o,this.labels=[],this.outputs=[];for(let[g,p]of c)this.labels.push(g),this.outputs.push(p)}static interpolationFactor(t,i,n,o){let c=0;if(t.name==="exponential")c=fn(i,t.base,n,o);else if(t.name==="linear")c=fn(i,1,n,o);else if(t.name==="cubic-bezier"){let g=t.controlPoints;c=new Jr(g[0],g[1],g[2],g[3]).solve(fn(i,1,n,o))}return c}static parse(t,i){let[n,o,c,...g]=t;if(!Array.isArray(o)||o.length===0)return i.error("Expected an interpolation type expression.",1);if(o[0]==="linear")o={name:"linear"};else if(o[0]==="exponential"){let _=o[1];if(typeof _!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);o={name:"exponential",base:_}}else{if(o[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(o[0])}`,1,0);{let _=o.slice(1);if(_.length!==4||_.some((y=>typeof y!="number"||y<0||y>1)))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);o={name:"cubic-bezier",controlPoints:_}}}if(t.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(c=i.parse(c,2,Ie),!c)return null;let p=[],f=null;n!=="interpolate-hcl"&&n!=="interpolate-lab"||i.expectedType==gA?i.expectedType&&i.expectedType.kind!=="value"&&(f=i.expectedType):f=li;for(let _=0;_=y)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',v);let D=i.parse(w,F,f);if(!D)return null;f=f||D.type,p.push([y,D])}return OA(f,Ie)||OA(f,lr)||OA(f,li)||OA(f,Wn)||OA(f,Yr)||OA(f,gA)||OA(f,es)||OA(f,Fi(Ie))?new ci(f,n,o,c,p):i.error(`Type ${ft(f)} is not interpolatable.`)}evaluate(t){let i=this.labels,n=this.outputs;if(i.length===1)return n[0].evaluate(t);let o=this.input.evaluate(t);if(o<=i[0])return n[0].evaluate(t);let c=i.length;if(o>=i[c-1])return n[c-1].evaluate(t);let g=dr(i,o),p=ci.interpolationFactor(this.interpolation,o,i[g],i[g+1]),f=n[g].evaluate(t),_=n[g+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return yA(f,_,p);case"color":return it.interpolate(f,_,p);case"padding":return ii.interpolate(f,_,p);case"colorArray":return Xt.interpolate(f,_,p);case"numberArray":return wi.interpolate(f,_,p);case"variableAnchorOffsetCollection":return Ii.interpolate(f,_,p);case"array":return hr(f,_,p);case"projectionDefinition":return mi.interpolate(f,_,p)}case"interpolate-hcl":switch(this.type.kind){case"color":return it.interpolate(f,_,p,"hcl");case"colorArray":return Xt.interpolate(f,_,p,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return it.interpolate(f,_,p,"lab");case"colorArray":return Xt.interpolate(f,_,p,"lab")}}}eachChild(t){t(this.input);for(let i of this.outputs)t(i)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}}function fn(A,t,i,n){let o=n-i,c=A-i;return o===0?0:t===1?c/o:(Math.pow(t,c)-1)/(Math.pow(t,o)-1)}let fA={color:it.interpolate,number:yA,padding:ii.interpolate,numberArray:wi.interpolate,colorArray:Xt.interpolate,variableAnchorOffsetCollection:Ii.interpolate,array:hr};class mn{constructor(t,i){this.type=t,this.args=i}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");let n=null,o=i.expectedType;o&&o.kind!=="value"&&(n=o);let c=[];for(let p of t.slice(1)){let f=i.parse(p,1+c.length,n,void 0,{typeAnnotation:"omit"});if(!f)return null;n=n||f.type,c.push(f)}if(!n)throw new Error("No output type");let g=o&&c.some((p=>hn(o,p.type)));return new mn(g?qe:n,c)}evaluate(t){let i,n=null,o=0;for(let c of this.args)if(o++,n=c.evaluate(t),n&&n instanceof Ti&&!n.available&&(i||(i=n.name),n=null,o===this.args.length&&(n=i)),n!==null)break;return n}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}}function Bn(A,t){return A==="=="||A==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function _n(A,t,i,n){return n.compare(t,i)===0}function Bi(A,t,i){let n=A!=="=="&&A!=="!=";return class tg{constructor(c,g,p){this.type=We,this.lhs=c,this.rhs=g,this.collator=p,this.hasUntypedArgument=c.type.kind==="value"||g.type.kind==="value"}static parse(c,g){if(c.length!==3&&c.length!==4)return g.error("Expected two or three arguments.");let p=c[0],f=g.parse(c[1],1,qe);if(!f)return null;if(!Bn(p,f.type))return g.concat(1).error(`"${p}" comparisons are not supported for type '${ft(f.type)}'.`);let _=g.parse(c[2],2,qe);if(!_)return null;if(!Bn(p,_.type))return g.concat(2).error(`"${p}" comparisons are not supported for type '${ft(_.type)}'.`);if(f.type.kind!==_.type.kind&&f.type.kind!=="value"&&_.type.kind!=="value")return g.error(`Cannot compare types '${ft(f.type)}' and '${ft(_.type)}'.`);n&&(f.type.kind==="value"&&_.type.kind!=="value"?f=new Li(_.type,[f]):f.type.kind!=="value"&&_.type.kind==="value"&&(_=new Li(f.type,[_])));let y=null;if(c.length===4){if(f.type.kind!=="string"&&_.type.kind!=="string"&&f.type.kind!=="value"&&_.type.kind!=="value")return g.error("Cannot use collator to compare non-string types.");if(y=g.parse(c[3],3,$n),!y)return null}return new tg(f,_,y)}evaluate(c){let g=this.lhs.evaluate(c),p=this.rhs.evaluate(c);if(n&&this.hasUntypedArgument){let f=Ke(g),_=Ke(p);if(f.kind!==_.kind||f.kind!=="string"&&f.kind!=="number")throw new mt(`Expected arguments for "${A}" to be (string, string) or (number, number), but found (${f.kind}, ${_.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){let f=Ke(g),_=Ke(p);if(f.kind!=="string"||_.kind!=="string")return t(c,g,p)}return this.collator?i(c,g,p,this.collator.evaluate(c)):t(c,g,p)}eachChild(c){c(this.lhs),c(this.rhs),this.collator&&c(this.collator)}outputDefined(){return!0}}}let Da=Bi("==",(function(A,t,i){return t===i}),_n),os=Bi("!=",(function(A,t,i){return t!==i}),(function(A,t,i,n){return!_n(0,t,i,n)})),ic=Bi("<",(function(A,t,i){return t",(function(A,t,i){return t>i}),(function(A,t,i,n){return n.compare(t,i)>0})),Ac=Bi("<=",(function(A,t,i){return t<=i}),(function(A,t,i,n){return n.compare(t,i)<=0})),rc=Bi(">=",(function(A,t,i){return t>=i}),(function(A,t,i,n){return n.compare(t,i)>=0}));class as{constructor(t,i,n){this.type=$n,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=i}static parse(t,i){if(t.length!==2)return i.error("Expected one argument.");let n=t[1];if(typeof n!="object"||Array.isArray(n))return i.error("Collator options argument must be an object.");let o=i.parse(n["case-sensitive"]!==void 0&&n["case-sensitive"],1,We);if(!o)return null;let c=i.parse(n["diacritic-sensitive"]!==void 0&&n["diacritic-sensitive"],1,We);if(!c)return null;let g=null;return n.locale&&(g=i.parse(n.locale,1,Ve),!g)?null:new as(o,c,g)}evaluate(t){return new ur(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}}class po{constructor(t,i,n,o,c){this.type=Ve,this.number=t,this.locale=i,this.currency=n,this.minFractionDigits=o,this.maxFractionDigits=c}static parse(t,i){if(t.length!==3)return i.error("Expected two arguments.");let n=i.parse(t[1],1,Ie);if(!n)return null;let o=t[2];if(typeof o!="object"||Array.isArray(o))return i.error("NumberFormat options argument must be an object.");let c=null;if(o.locale&&(c=i.parse(o.locale,1,Ve),!c))return null;let g=null;if(o.currency&&(g=i.parse(o.currency,1,Ve),!g))return null;let p=null;if(o["min-fraction-digits"]&&(p=i.parse(o["min-fraction-digits"],1,Ie),!p))return null;let f=null;return o["max-fraction-digits"]&&(f=i.parse(o["max-fraction-digits"],1,Ie),!f)?null:new po(n,c,g,p,f)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class pr{constructor(t){this.type=zA,this.sections=t}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");let n=t[1];if(!Array.isArray(n)&&typeof n=="object")return i.error("First argument must be an image or text section.");let o=[],c=!1;for(let g=1;g<=t.length-1;++g){let p=t[g];if(c&&typeof p=="object"&&!Array.isArray(p)){c=!1;let f=null;if(p["font-scale"]&&(f=i.parse(p["font-scale"],1,Ie),!f))return null;let _=null;if(p["text-font"]&&(_=i.parse(p["text-font"],1,Fi(Ve)),!_))return null;let y=null;if(p["text-color"]&&(y=i.parse(p["text-color"],1,li),!y))return null;let w=null;if(p["vertical-align"]){if(typeof p["vertical-align"]=="string"&&!ts.includes(p["vertical-align"]))return i.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${p["vertical-align"]}' instead.`);if(w=i.parse(p["vertical-align"],1,Ve),!w)return null}let v=o[o.length-1];v.scale=f,v.font=_,v.textColor=y,v.verticalAlign=w}else{let f=i.parse(t[g],1,qe);if(!f)return null;let _=f.type.kind;if(_!=="string"&&_!=="value"&&_!=="null"&&_!=="resolvedImage")return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");c=!0,o.push({content:f,scale:null,font:null,textColor:null,verticalAlign:null})}}return new pr(o)}evaluate(t){return new Ci(this.sections.map((i=>{let n=i.content.evaluate(t);return Ke(n)===Pt?new is("",n,null,null,null,i.verticalAlign?i.verticalAlign.evaluate(t):null):new is(Ze(n),null,i.scale?i.scale.evaluate(t):null,i.font?i.font.evaluate(t).join(","):null,i.textColor?i.textColor.evaluate(t):null,i.verticalAlign?i.verticalAlign.evaluate(t):null)})))}eachChild(t){for(let i of this.sections)t(i.content),i.scale&&t(i.scale),i.font&&t(i.font),i.textColor&&t(i.textColor),i.verticalAlign&&t(i.verticalAlign)}outputDefined(){return!1}}class fo{constructor(t){this.type=Pt,this.input=t}static parse(t,i){if(t.length!==2)return i.error("Expected two arguments.");let n=i.parse(t[1],1,Ve);return n?new fo(n):i.error("No image name provided.")}evaluate(t){let i=this.input.evaluate(t),n=Ti.fromString(i);return n&&t.availableImages&&(n.available=t.availableImages.indexOf(i)>-1),n}eachChild(t){t(this.input)}outputDefined(){return!1}}class ls{constructor(t){this.type=Ie,this.input=t}static parse(t,i){if(t.length!==2)return i.error(`Expected 1 argument, but found ${t.length-1} instead.`);let n=i.parse(t[1],1);return n?n.type.kind!=="array"&&n.type.kind!=="string"&&n.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${ft(n.type)} instead.`):new ls(n):null}evaluate(t){let i=this.input.evaluate(t);if(typeof i=="string")return[...i].length;if(Array.isArray(i))return i.length;throw new mt(`Expected value to be of type string or array, but found ${ft(Ke(i))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}let Wi=8192;function nc(A,t){let i=(180+A[0])/360,n=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+A[1]*Math.PI/360)))/360,o=Math.pow(2,t.z);return[Math.round(i*o*Wi),Math.round(n*o*Wi)]}function cs(A,t){let i=Math.pow(2,t.z);return[(o=(A[0]/Wi+t.x)/i,360*o-180),(n=(A[1]/Wi+t.y)/i,360/Math.PI*Math.atan(Math.exp((180-360*n)*Math.PI/180))-90)];var n,o}function yn(A,t){A[0]=Math.min(A[0],t[0]),A[1]=Math.min(A[1],t[1]),A[2]=Math.max(A[2],t[0]),A[3]=Math.max(A[3],t[1])}function Qn(A,t){return!(A[0]<=t[0]||A[2]>=t[2]||A[1]<=t[1]||A[3]>=t[3])}function sc(A,t,i){let n=A[0]-t[0],o=A[1]-t[1],c=A[0]-i[0],g=A[1]-i[1];return n*g-c*o==0&&n*c<=0&&o*g<=0}function hs(A,t,i,n){return(o=[n[0]-i[0],n[1]-i[1]])[0]*(c=[t[0]-A[0],t[1]-A[1]])[1]-o[1]*c[0]!=0&&!(!Ma(A,t,i,n)||!Ma(i,n,A,t));var o,c}function oc(A,t,i){for(let n of i)for(let o=0;o(o=A)[1]!=(g=p[f+1])[1]>o[1]&&o[0]<(g[0]-c[0])*(o[1]-c[1])/(g[1]-c[1])+c[0]&&(n=!n)}var o,c,g;return n}function Sa(A,t){for(let i of t)if(fr(A,i))return!0;return!1}function mo(A,t){for(let i of A)if(!fr(i,t))return!1;for(let i=0;i0&&p<0||g<0&&p>0}function Bo(A,t,i){let n=[];for(let o=0;oi[2]){let o=.5*n,c=A[0]-i[0]>o?-n:i[0]-A[0]>o?n:0;c===0&&(c=A[0]-i[2]>o?-n:i[2]-A[0]>o?n:0),A[0]+=c}yn(t,A)}function Ta(A,t,i,n){let o=Math.pow(2,n.z)*Wi,c=[n.x*Wi,n.y*Wi],g=[];for(let p of A)for(let f of p){let _=[f.x+c[0],f.y+c[1]];us(_,t,i,o),g.push(_)}return g}function La(A,t,i,n){let o=Math.pow(2,n.z)*Wi,c=[n.x*Wi,n.y*Wi],g=[];for(let f of A){let _=[];for(let y of f){let w=[y.x+c[0],y.y+c[1]];yn(t,w),_.push(w)}g.push(_)}if(t[2]-t[0]<=o/2){(p=t)[0]=p[1]=1/0,p[2]=p[3]=-1/0;for(let f of g)for(let _ of f)us(_,t,i,o)}var p;return g}class mr{constructor(t,i){this.type=We,this.geojson=t,this.geometries=i}static parse(t,i){if(t.length!==2)return i.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(gr(t[1])){let n=t[1];if(n.type==="FeatureCollection"){let o=[];for(let c of n.features){let{type:g,coordinates:p}=c.geometry;g==="Polygon"&&o.push(p),g==="MultiPolygon"&&o.push(...p)}if(o.length)return new mr(n,{type:"MultiPolygon",coordinates:o})}else if(n.type==="Feature"){let o=n.geometry.type;if(o==="Polygon"||o==="MultiPolygon")return new mr(n,n.geometry)}else if(n.type==="Polygon"||n.type==="MultiPolygon")return new mr(n,n)}return i.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return(function(i,n){let o=[1/0,1/0,-1/0,-1/0],c=[1/0,1/0,-1/0,-1/0],g=i.canonicalID();if(n.type==="Polygon"){let p=Bo(n.coordinates,c,g),f=Ta(i.geometry(),o,c,g);if(!Qn(o,c))return!1;for(let _ of f)if(!fr(_,p))return!1}if(n.type==="MultiPolygon"){let p=Ua(n.coordinates,c,g),f=Ta(i.geometry(),o,c,g);if(!Qn(o,c))return!1;for(let _ of f)if(!Sa(_,p))return!1}return!0})(t,this.geometries);if(t.geometryType()==="LineString")return(function(i,n){let o=[1/0,1/0,-1/0,-1/0],c=[1/0,1/0,-1/0,-1/0],g=i.canonicalID();if(n.type==="Polygon"){let p=Bo(n.coordinates,c,g),f=La(i.geometry(),o,c,g);if(!Qn(o,c))return!1;for(let _ of f)if(!mo(_,p))return!1}if(n.type==="MultiPolygon"){let p=Ua(n.coordinates,c,g),f=La(i.geometry(),o,c,g);if(!Qn(o,c))return!1;for(let _ of f)if(!ac(_,p))return!1}return!0})(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let _o=class{constructor(A=[],t=(i,n)=>in?1:0){if(this.data=A,this.length=this.data.length,this.compare=t,this.length>0)for(let i=(this.length>>1)-1;i>=0;i--)this._down(i)}push(A){this.data.push(A),this._up(this.length++)}pop(){if(this.length===0)return;let A=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),A}peek(){return this.data[0]}_up(A){let{data:t,compare:i}=this,n=t[A];for(;A>0;){let o=A-1>>1,c=t[o];if(i(n,c)>=0)break;t[A]=c,A=o}t[A]=n}_down(A){let{data:t,compare:i}=this,n=this.length>>1,o=t[A];for(;A=0)break;t[A]=t[c],A=c}t[A]=o}};function yo(A,t,i=0,n=A.length-1,o=lc){for(;n>i;){if(n-i>600){let f=n-i+1,_=t-i+1,y=Math.log(f),w=.5*Math.exp(2*y/3),v=.5*Math.sqrt(y*w*(f-w)/f)*(_-f/2<0?-1:1);yo(A,t,Math.max(i,Math.floor(t-_*w/f+v)),Math.min(n,Math.floor(t+(f-_)*w/f+v)),o)}let c=A[t],g=i,p=n;for(Cn(A,i,t),o(A[n],c)>0&&Cn(A,i,n);g0;)p--}o(A[i],c)===0?Cn(A,i,p):(p++,Cn(A,p,n)),p<=t&&(i=p+1),t<=p&&(n=p-1)}}function Cn(A,t,i){let n=A[t];A[t]=A[i],A[i]=n}function lc(A,t){return At?1:0}function wn(A,t){if(A.length<=1)return[A];let i=[],n,o;for(let c of A){let g=cc(c);g!==0&&(c.area=Math.abs(g),o===void 0&&(o=g<0),o===g<0?(n&&i.push(n),n=[c]):n.push(c))}if(n&&i.push(n),t>1)for(let c=0;c1?(_=t[f+1][0],y=t[f+1][1]):F>0&&(_+=w/this.kx*F,y+=v/this.ky*F)),w=this.wrap(i[0]-_)*this.kx,v=(i[1]-y)*this.ky;let D=w*w+v*v;D180;)t-=360;return t}}function Ra(A,t){return t[0]-A[0]}function gs(A){return A[1]-A[0]+1}function CA(A,t){return A[1]>=A[0]&&A[1]A[1])return[null,null];let i=gs(A);if(t){if(i===2)return[A,null];let o=Math.floor(i/2);return[[A[0],A[0]+o],[A[0]+o,A[1]]]}if(i===1)return[A,null];let n=Math.floor(i/2)-1;return[[A[0],A[0]+n],[A[0]+n+1,A[1]]]}function wo(A,t){if(!CA(t,A.length))return[1/0,1/0,-1/0,-1/0];let i=[1/0,1/0,-1/0,-1/0];for(let n=t[0];n<=t[1];++n)yn(i,A[n]);return i}function Io(A){let t=[1/0,1/0,-1/0,-1/0];for(let i of A)for(let n of i)yn(t,n);return t}function Na(A){return A[0]!==-1/0&&A[1]!==-1/0&&A[2]!==1/0&&A[3]!==1/0}function Eo(A,t,i){if(!Na(A)||!Na(t))return NaN;let n=0,o=0;return A[2]t[2]&&(n=A[0]-t[2]),A[1]>t[3]&&(o=A[1]-t[3]),A[3]=n)return n;if(Qn(o,c)){if(za(A,t))return 0}else if(za(t,A))return 0;let g=1/0;for(let p of A)for(let f=0,_=p.length,y=_-1;f<_;y=f++){let w=p[y],v=p[f];for(let F of t)for(let D=0,U=F.length,k=U-1;D0;){let f=g.pop();if(f[0]>=c)continue;let _=f[1],y=t?50:100;if(gs(_)<=y){if(!CA(_,A.length))return NaN;if(t){let w=dc(A,_,i,n);if(isNaN(w)||w===0)return w;c=Math.min(c,w)}else for(let w=_[0];w<=_[1];++w){let v=gc(A[w],i,n);if(c=Math.min(c,v),c===0)return 0}}else{let w=ct(_,t);Ya(g,c,n,A,p,w[0]),Ya(g,c,n,A,p,w[1])}}return c}function fs(A,t,i,n,o,c=1/0){let g=Math.min(c,o.distance(A[0],i[0]));if(g===0)return g;let p=new _o([[0,[0,A.length-1],[0,i.length-1]]],Ra);for(;p.length>0;){let f=p.pop();if(f[0]>=g)continue;let _=f[1],y=f[2],w=t?50:100,v=n?50:100;if(gs(_)<=w&&gs(y)<=v){if(!CA(_,A.length)&&CA(y,i.length))return NaN;let F;if(t&&n)F=hc(A,_,i,y,o),g=Math.min(g,F);else if(t&&!n){let D=A.slice(_[0],_[1]+1);for(let U=y[0];U<=y[1];++U)if(F=Br(i[U],D,o),g=Math.min(g,F),g===0)return g}else if(!t&&n){let D=i.slice(y[0],y[1]+1);for(let U=_[0];U<=_[1];++U)if(F=Br(A[U],D,o),g=Math.min(g,F),g===0)return g}else F=uc(A,_,i,y,o),g=Math.min(g,F)}else{let F=ct(_,t),D=ct(y,n);ds(p,g,o,A,i,F[0],D[0]),ds(p,g,o,A,i,F[0],D[1]),ds(p,g,o,A,i,F[1],D[0]),ds(p,g,o,A,i,F[1],D[1])}}return g}function vo(A){return A.type==="MultiPolygon"?A.coordinates.map((t=>({type:"Polygon",coordinates:t}))):A.type==="MultiLineString"?A.coordinates.map((t=>({type:"LineString",coordinates:t}))):A.type==="MultiPoint"?A.coordinates.map((t=>({type:"Point",coordinates:t}))):[A]}class _r{constructor(t,i){this.type=Ie,this.geojson=t,this.geometries=i}static parse(t,i){if(t.length!==2)return i.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(gr(t[1])){let n=t[1];if(n.type==="FeatureCollection")return new _r(n,n.features.map((o=>vo(o.geometry))).flat());if(n.type==="Feature")return new _r(n,vo(n.geometry));if("type"in n&&"coordinates"in n)return new _r(n,vo(n))}return i.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return(function(i,n){let o=i.geometry(),c=o.flat().map((f=>cs([f.x,f.y],i.canonical)));if(o.length===0)return NaN;let g=new Co(c[0][1]),p=1/0;for(let f of n){switch(f.type){case"Point":p=Math.min(p,fs(c,!1,[f.coordinates],!1,g,p));break;case"LineString":p=Math.min(p,fs(c,!1,f.coordinates,!0,g,p));break;case"Polygon":p=Math.min(p,ps(c,!1,f.coordinates,g,p))}if(p===0)return p}return p})(t,this.geometries);if(t.geometryType()==="LineString")return(function(i,n){let o=i.geometry(),c=o.flat().map((f=>cs([f.x,f.y],i.canonical)));if(o.length===0)return NaN;let g=new Co(c[0][1]),p=1/0;for(let f of n){switch(f.type){case"Point":p=Math.min(p,fs(c,!0,[f.coordinates],!1,g,p));break;case"LineString":p=Math.min(p,fs(c,!0,f.coordinates,!0,g,p));break;case"Polygon":p=Math.min(p,ps(c,!0,f.coordinates,g,p))}if(p===0)return p}return p})(t,this.geometries);if(t.geometryType()==="Polygon")return(function(i,n){let o=i.geometry();if(o.length===0||o[0].length===0)return NaN;let c=wn(o,0).map((f=>f.map((_=>_.map((y=>cs([y.x,y.y],i.canonical))))))),g=new Co(c[0][0][0][1]),p=1/0;for(let f of n)for(let _ of c){switch(f.type){case"Point":p=Math.min(p,ps([f.coordinates],!1,_,g,p));break;case"LineString":p=Math.min(p,ps(f.coordinates,!0,_,g,p));break;case"Polygon":p=Math.min(p,pc(_,f.coordinates,g,p))}if(p===0)return p}return p})(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class In{constructor(t){this.type=qe,this.key=t}static parse(t,i){if(t.length!==2)return i.error(`Expected 1 argument, but found ${t.length-1} instead.`);let n=t[1];return n==null?i.error("Global state property must be defined."):typeof n!="string"?i.error(`Global state property must be string, but found ${typeof t[1]} instead.`):new In(n)}evaluate(t){var i;let n=(i=t.globals)===null||i===void 0?void 0:i.globalState;return n&&Object.keys(n).length!==0?Xr(n,this.key):null}eachChild(){}outputDefined(){return!1}}let Vr={"==":Da,"!=":os,">":go,"<":ic,">=":rc,"<=":Ac,array:Li,at:ns,boolean:Li,case:Zr,coalesce:mn,collator:as,format:pr,image:fo,in:ss,"index-of":$i,interpolate:ci,"interpolate-hcl":ci,"interpolate-lab":ci,length:ls,let:gn,literal:QA,match:Ai,number:Li,"number-format":po,object:Li,slice:dn,step:Rt,string:Li,"to-boolean":pA,"to-color":pA,"to-number":pA,"to-string":pA,var:rs,within:mr,distance:_r,"global-state":In};class Ki{constructor(t,i,n,o){this.name=t,this.type=i,this._evaluate=n,this.args=o}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,i){let n=t[0],o=Ki.definitions[n];if(!o)return i.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0);let c=Array.isArray(o)?o[0]:o.type,g=Array.isArray(o)?[[o[1],o[2]]]:o.overloads,p=g.filter((([_])=>!Array.isArray(_)||_.length===t.length-1)),f=null;for(let[_,y]of p){f=new Hr(i.registry,ms,i.path,null,i.scope);let w=[],v=!1;for(let F=1;F{return v=w,Array.isArray(v)?`(${v.map(ft).join(", ")})`:`(${ft(v.type)}...)`;var v})).join(" | "),y=[];for(let w=1;w{i=t?i&&ms(n):i&&n instanceof QA})),!!i&&Bs(A)&&_s(A,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function Bs(A){if(A instanceof Ki&&(A.name==="get"&&A.args.length===1||A.name==="feature-state"||A.name==="has"&&A.args.length===1||A.name==="properties"||A.name==="geometry-type"||A.name==="id"||/^filter-/.test(A.name))||A instanceof mr||A instanceof _r)return!1;let t=!0;return A.eachChild((i=>{t&&!Bs(i)&&(t=!1)})),t}function En(A){if(A instanceof Ki&&A.name==="feature-state")return!1;let t=!0;return A.eachChild((i=>{t&&!En(i)&&(t=!1)})),t}function _s(A,t){if(A instanceof Ki&&t.indexOf(A.name)>=0)return!1;let i=!0;return A.eachChild((n=>{i&&!_s(n,t)&&(i=!1)})),i}function ja(A){return{result:"success",value:A}}function qr(A){return{result:"error",value:A}}function jA(A){return A["property-type"]==="data-driven"||A["property-type"]==="cross-faded-data-driven"}function Xa(A){return!!A.expression&&A.expression.parameters.indexOf("zoom")>-1}function Fo(A){return!!A.expression&&A.expression.interpolated}function rt(A){return A instanceof Number?"number":A instanceof String?"string":A instanceof Boolean?"boolean":Array.isArray(A)?"array":A===null?"null":typeof A}function xn(A){return typeof A=="object"&&A!==null&&!Array.isArray(A)&&Ke(A)===NA}function fc(A){return A}function Ha(A,t){let i=A.stops&&typeof A.stops[0][0]=="object",n=i||!(i||A.property!==void 0),o=A.type||(Fo(t)?"exponential":"interval"),c=(function(y){switch(y.type){case"color":return it.parse;case"padding":return ii.parse;case"numberArray":return wi.parse;case"colorArray":return Xt.parse;default:return null}})(t);if(c&&((A=Kt({},A)).stops&&(A.stops=A.stops.map((y=>[y[0],c(y[1])]))),A.default=c(A.default?A.default:t.default)),A.colorSpace&&(g=A.colorSpace)!=="rgb"&&g!=="hcl"&&g!=="lab")throw new Error(`Unknown color space: "${A.colorSpace}"`);var g;let p=(function(y){switch(y){case"exponential":return Ja;case"interval":return mc;case"categorical":return Za;case"identity":return Bc;default:throw new Error(`Unknown function type "${y}"`)}})(o),f,_;if(o==="categorical"){f=Object.create(null);for(let y of A.stops)f[y[0]]=y[1];_=typeof A.stops[0][0]}if(i){let y={},w=[];for(let D=0;DD[0])),evaluate:({zoom:D},U)=>Ja({stops:v,base:A.base},t,D).evaluate(D,U)}}if(n){let y=o==="exponential"?{name:"exponential",base:A.base!==void 0?A.base:1}:null;return{kind:"camera",interpolationType:y,interpolationFactor:ci.interpolationFactor.bind(void 0,y),zoomStops:A.stops.map((w=>w[0])),evaluate:({zoom:w})=>p(A,t,w,f,_)}}return{kind:"source",evaluate(y,w){let v=w&&w.properties?w.properties[A.property]:void 0;return v===void 0?XA(A.default,t.default):p(A,t,v,f,_)}}}function XA(A,t,i){return A!==void 0?A:t!==void 0?t:i!==void 0?i:void 0}function Za(A,t,i,n,o){return XA(typeof i===o?n[i]:void 0,A.default,t.default)}function mc(A,t,i){if(rt(i)!=="number")return XA(A.default,t.default);let n=A.stops.length;if(n===1||i<=A.stops[0][0])return A.stops[0][1];if(i>=A.stops[n-1][0])return A.stops[n-1][1];let o=dr(A.stops.map((c=>c[0])),i);return A.stops[o][1]}function Ja(A,t,i){let n=A.base!==void 0?A.base:1;if(rt(i)!=="number")return XA(A.default,t.default);let o=A.stops.length;if(o===1||i<=A.stops[0][0])return A.stops[0][1];if(i>=A.stops[o-1][0])return A.stops[o-1][1];let c=dr(A.stops.map((y=>y[0])),i),g=(function(y,w,v,F){let D=F-v,U=y-v;return D===0?0:w===1?U/D:(Math.pow(w,U)-1)/(Math.pow(w,D)-1)})(i,n,A.stops[c][0],A.stops[c+1][0]),p=A.stops[c][1],f=A.stops[c+1][1],_=fA[t.type]||fc;return typeof p.evaluate=="function"?{evaluate(...y){let w=p.evaluate.apply(void 0,y),v=f.evaluate.apply(void 0,y);if(w!==void 0&&v!==void 0)return _(w,v,g,A.colorSpace)}}:_(p,f,g,A.colorSpace)}function Bc(A,t,i){switch(t.type){case"color":i=it.parse(i);break;case"formatted":i=Ci.fromString(i.toString());break;case"resolvedImage":i=Ti.fromString(i.toString());break;case"padding":i=ii.parse(i);break;case"colorArray":i=Xt.parse(i);break;case"numberArray":i=wi.parse(i);break;default:rt(i)===t.type||t.type==="enum"&&t.values[i]||(i=void 0)}return XA(i,A.default,t.default)}Ki.register(Vr,{error:[{kind:"error"},[Ve],(A,[t])=>{throw new mt(t.evaluate(A))}],typeof:[Ve,[qe],(A,[t])=>ft(Ke(t.evaluate(A)))],"to-rgba":[Fi(Ie,4),[li],(A,[t])=>{let[i,n,o,c]=t.evaluate(A).rgb;return[255*i,255*n,255*o,c]}],rgb:[li,[Ie,Ie,Ie],Oa],rgba:[li,[Ie,Ie,Ie,Ie],Oa],has:{type:We,overloads:[[[Ve],(A,[t])=>Ka(t.evaluate(A),A.properties())],[[Ve,NA],(A,[t,i])=>Ka(t.evaluate(A),i.evaluate(A))]]},get:{type:qe,overloads:[[[Ve],(A,[t])=>bo(t.evaluate(A),A.properties())],[[Ve,NA],(A,[t,i])=>bo(t.evaluate(A),i.evaluate(A))]]},"feature-state":[qe,[Ve],(A,[t])=>bo(t.evaluate(A),A.featureState||{})],properties:[NA,[],A=>A.properties()],"geometry-type":[Ve,[],A=>A.geometryType()],id:[qe,[],A=>A.id()],zoom:[Ie,[],A=>A.globals.zoom],"heatmap-density":[Ie,[],A=>A.globals.heatmapDensity||0],elevation:[Ie,[],A=>A.globals.elevation||0],"line-progress":[Ie,[],A=>A.globals.lineProgress||0],accumulated:[qe,[],A=>A.globals.accumulated===void 0?null:A.globals.accumulated],"+":[Ie,yr(Ie),(A,t)=>{let i=0;for(let n of t)i+=n.evaluate(A);return i}],"*":[Ie,yr(Ie),(A,t)=>{let i=1;for(let n of t)i*=n.evaluate(A);return i}],"-":{type:Ie,overloads:[[[Ie,Ie],(A,[t,i])=>t.evaluate(A)-i.evaluate(A)],[[Ie],(A,[t])=>-t.evaluate(A)]]},"/":[Ie,[Ie,Ie],(A,[t,i])=>t.evaluate(A)/i.evaluate(A)],"%":[Ie,[Ie,Ie],(A,[t,i])=>t.evaluate(A)%i.evaluate(A)],ln2:[Ie,[],()=>Math.LN2],pi:[Ie,[],()=>Math.PI],e:[Ie,[],()=>Math.E],"^":[Ie,[Ie,Ie],(A,[t,i])=>Math.pow(t.evaluate(A),i.evaluate(A))],sqrt:[Ie,[Ie],(A,[t])=>Math.sqrt(t.evaluate(A))],log10:[Ie,[Ie],(A,[t])=>Math.log(t.evaluate(A))/Math.LN10],ln:[Ie,[Ie],(A,[t])=>Math.log(t.evaluate(A))],log2:[Ie,[Ie],(A,[t])=>Math.log(t.evaluate(A))/Math.LN2],sin:[Ie,[Ie],(A,[t])=>Math.sin(t.evaluate(A))],cos:[Ie,[Ie],(A,[t])=>Math.cos(t.evaluate(A))],tan:[Ie,[Ie],(A,[t])=>Math.tan(t.evaluate(A))],asin:[Ie,[Ie],(A,[t])=>Math.asin(t.evaluate(A))],acos:[Ie,[Ie],(A,[t])=>Math.acos(t.evaluate(A))],atan:[Ie,[Ie],(A,[t])=>Math.atan(t.evaluate(A))],min:[Ie,yr(Ie),(A,t)=>Math.min(...t.map((i=>i.evaluate(A))))],max:[Ie,yr(Ie),(A,t)=>Math.max(...t.map((i=>i.evaluate(A))))],abs:[Ie,[Ie],(A,[t])=>Math.abs(t.evaluate(A))],round:[Ie,[Ie],(A,[t])=>{let i=t.evaluate(A);return i<0?-Math.round(-i):Math.round(i)}],floor:[Ie,[Ie],(A,[t])=>Math.floor(t.evaluate(A))],ceil:[Ie,[Ie],(A,[t])=>Math.ceil(t.evaluate(A))],"filter-==":[We,[Ve,qe],(A,[t,i])=>A.properties()[t.value]===i.value],"filter-id-==":[We,[qe],(A,[t])=>A.id()===t.value],"filter-type-==":[We,[Ve],(A,[t])=>A.geometryType()===t.value],"filter-<":[We,[Ve,qe],(A,[t,i])=>{let n=A.properties()[t.value],o=i.value;return typeof n==typeof o&&n{let i=A.id(),n=t.value;return typeof i==typeof n&&i":[We,[Ve,qe],(A,[t,i])=>{let n=A.properties()[t.value],o=i.value;return typeof n==typeof o&&n>o}],"filter-id->":[We,[qe],(A,[t])=>{let i=A.id(),n=t.value;return typeof i==typeof n&&i>n}],"filter-<=":[We,[Ve,qe],(A,[t,i])=>{let n=A.properties()[t.value],o=i.value;return typeof n==typeof o&&n<=o}],"filter-id-<=":[We,[qe],(A,[t])=>{let i=A.id(),n=t.value;return typeof i==typeof n&&i<=n}],"filter->=":[We,[Ve,qe],(A,[t,i])=>{let n=A.properties()[t.value],o=i.value;return typeof n==typeof o&&n>=o}],"filter-id->=":[We,[qe],(A,[t])=>{let i=A.id(),n=t.value;return typeof i==typeof n&&i>=n}],"filter-has":[We,[qe],(A,[t])=>t.value in A.properties()],"filter-has-id":[We,[],A=>A.id()!==null&&A.id()!==void 0],"filter-type-in":[We,[Fi(Ve)],(A,[t])=>t.value.indexOf(A.geometryType())>=0],"filter-id-in":[We,[Fi(qe)],(A,[t])=>t.value.indexOf(A.id())>=0],"filter-in-small":[We,[Ve,Fi(qe)],(A,[t,i])=>i.value.indexOf(A.properties()[t.value])>=0],"filter-in-large":[We,[Ve,Fi(qe)],(A,[t,i])=>(function(n,o,c,g){for(;c<=g;){let p=c+g>>1;if(o[p]===n)return!0;o[p]>n?g=p-1:c=p+1}return!1})(A.properties()[t.value],i.value,0,i.value.length-1)],all:{type:We,overloads:[[[We,We],(A,[t,i])=>t.evaluate(A)&&i.evaluate(A)],[yr(We),(A,t)=>{for(let i of t)if(!i.evaluate(A))return!1;return!0}]]},any:{type:We,overloads:[[[We,We],(A,[t,i])=>t.evaluate(A)||i.evaluate(A)],[yr(We),(A,t)=>{for(let i of t)if(i.evaluate(A))return!0;return!1}]]},"!":[We,[We],(A,[t])=>!t.evaluate(A)],"is-supported-script":[We,[Ve],(A,[t])=>{let i=A.globals&&A.globals.isSupportedScript;return!i||i(t.evaluate(A))}],upcase:[Ve,[Ve],(A,[t])=>t.evaluate(A).toUpperCase()],downcase:[Ve,[Ve],(A,[t])=>t.evaluate(A).toLowerCase()],concat:[Ve,yr(qe),(A,t)=>t.map((i=>Ze(i.evaluate(A)))).join("")],"resolved-locale":[Ve,[$n],(A,[t])=>t.evaluate(A).resolvedLocale()]});class Do{constructor(t,i,n){this.expression=t,this._warningHistory={},this._evaluator=new ho,this._defaultValue=i?(function(o){if(o.type==="color"&&xn(o.default))return new it(0,0,0,0);switch(o.type){case"color":return it.parse(o.default)||null;case"padding":return ii.parse(o.default)||null;case"numberArray":return wi.parse(o.default)||null;case"colorArray":return Xt.parse(o.default)||null;case"variableAnchorOffsetCollection":return Ii.parse(o.default)||null;case"projectionDefinition":return mi.parse(o.default)||null;default:return o.default===void 0?null:o.default}})(i):null,this._enumValues=i&&i.type==="enum"?i.values:null,this._globalState=n}evaluateWithoutErrorHandling(t,i,n,o,c,g){return this._globalState&&(t=Qr(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=i,this._evaluator.featureState=n,this._evaluator.canonical=o,this._evaluator.availableImages=c||null,this._evaluator.formattedSection=g,this.expression.evaluate(this._evaluator)}evaluate(t,i,n,o,c,g){this._globalState&&(t=Qr(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=i||null,this._evaluator.featureState=n||null,this._evaluator.canonical=o,this._evaluator.availableImages=c||null,this._evaluator.formattedSection=g||null;try{let p=this.expression.evaluate(this._evaluator);if(p==null||typeof p=="number"&&p!=p)return this._defaultValue;if(this._enumValues&&!(p in this._enumValues))throw new mt(`Expected value to be one of ${Object.keys(this._enumValues).map((f=>JSON.stringify(f))).join(", ")}, but found ${JSON.stringify(p)} instead.`);return p}catch(p){return this._warningHistory[p.message]||(this._warningHistory[p.message]=!0,typeof console!="undefined"&&console.warn(p.message)),this._defaultValue}}}function ys(A){return Array.isArray(A)&&A.length>0&&typeof A[0]=="string"&&A[0]in Vr}function vn(A,t,i){let n=new Hr(Vr,ms,[],t?(function(c){let g={color:li,string:Ve,number:Ie,enum:Ve,boolean:We,formatted:zA,padding:Wn,numberArray:Yr,colorArray:gA,projectionDefinition:lr,resolvedImage:Pt,variableAnchorOffsetCollection:es};return c.type==="array"?Fi(g[c.value]||qe,c.length):g[c.type]})(t):void 0),o=n.parse(A,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return o?ja(new Do(o,t,i)):qr(n.errors)}class bn{constructor(t,i,n){this.kind=t,this._styleExpression=i,this.isStateDependent=t!=="constant"&&!En(i.expression),this.globalStateRefs=Sn(i.expression),this._globalState=n}evaluateWithoutErrorHandling(t,i,n,o,c,g){return this._globalState&&(t=Qr(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,i,n,o,c,g)}evaluate(t,i,n,o,c,g){return this._globalState&&(t=Qr(t,this._globalState)),this._styleExpression.evaluate(t,i,n,o,c,g)}}class So{constructor(t,i,n,o,c){this.kind=t,this.zoomStops=n,this._styleExpression=i,this.isStateDependent=t!=="camera"&&!En(i.expression),this.globalStateRefs=Sn(i.expression),this.interpolationType=o,this._globalState=c}evaluateWithoutErrorHandling(t,i,n,o,c,g){return this._globalState&&(t=Qr(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,i,n,o,c,g)}evaluate(t,i,n,o,c,g){return this._globalState&&(t=Qr(t,this._globalState)),this._styleExpression.evaluate(t,i,n,o,c,g)}interpolationFactor(t,i,n){return this.interpolationType?ci.interpolationFactor(this.interpolationType,t,i,n):0}}function Va(A,t,i){let n=vn(A,t,i);if(n.result==="error")return n;let o=n.value.expression,c=Bs(o);if(!c&&!jA(t))return qr([new Ui("","data expressions not supported")]);let g=_s(o,["zoom"]);if(!g&&!Xa(t))return qr([new Ui("","zoom expressions not supported")]);let p=Dn(o);return p||g?p instanceof Ui?qr([p]):p instanceof ci&&!Fo(t)?qr([new Ui("",'"interpolate" expressions cannot be used with this property')]):ja(p?new So(c?"camera":"composite",n.value,p.labels,p instanceof ci?p.interpolation:void 0,i):new bn(c?"constant":"source",n.value,i)):qr([new Ui("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Fn{constructor(t,i){this._parameters=t,this._specification=i,Kt(this,Ha(this._parameters,this._specification))}static deserialize(t){return new Fn(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function Dn(A){let t=null;if(A instanceof gn)t=Dn(A.result);else if(A instanceof mn){for(let i of A.args)if(t=Dn(i),t)break}else(A instanceof Rt||A instanceof ci)&&A.input instanceof Ki&&A.input.name==="zoom"&&(t=A);return t instanceof Ui||A.eachChild((i=>{let n=Dn(i);n instanceof Ui?t=n:!t&&n?t=new Ui("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&n&&t!==n&&(t=new Ui("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function Sn(A,t=new Set){return A instanceof In&&t.add(A.key),A.eachChild((i=>{Sn(i,t)})),t}function Qr(A,t){let{zoom:i,heatmapDensity:n,elevation:o,lineProgress:c,isSupportedScript:g,accumulated:p}=A!=null?A:{};return{zoom:i,heatmapDensity:n,elevation:o,lineProgress:c,isSupportedScript:g,accumulated:p,globalState:t}}function Mn(A){if(A===!0||A===!1)return!0;if(!Array.isArray(A)||A.length===0)return!1;switch(A[0]){case"has":return A.length>=2&&A[1]!=="$id"&&A[1]!=="$type";case"in":return A.length>=3&&(typeof A[1]!="string"||Array.isArray(A[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return A.length!==3||Array.isArray(A[1])||Array.isArray(A[2]);case"any":case"all":for(let t of A.slice(1))if(!Mn(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}let Mo={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Cr(A,t){if(A==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Mn(A)||(A=Qs(A));let i=vn(A,Mo,t);if(i.result==="error")throw new Error(i.value.map((n=>`${n.key}: ${n.message}`)).join(", "));return{filter:(n,o,c)=>i.value.evaluate(n,o,{},c),needGeometry:Un(A),getGlobalStateRefs:()=>Sn(i.value.expression)}}function Uo(A,t){return At?1:0}function Un(A){if(!Array.isArray(A))return!1;if(A[0]==="within"||A[0]==="distance")return!0;for(let t=1;t"||t==="<="||t===">="?To(A[1],A[2],t):t==="any"?(i=A.slice(1),["any"].concat(i.map(Qs))):t==="all"?["all"].concat(A.slice(1).map(Qs)):t==="none"?["all"].concat(A.slice(1).map(Qs).map(Cs)):t==="in"?qa(A[1],A.slice(2)):t==="!in"?Cs(qa(A[1],A.slice(2))):t==="has"?$a(A[1]):t!=="!has"||Cs($a(A[1]));var i}function To(A,t,i){switch(A){case"$type":return[`filter-type-${i}`,t];case"$id":return[`filter-id-${i}`,t];default:return[`filter-${i}`,A,t]}}function qa(A,t){if(t.length===0)return!1;switch(A){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((i=>typeof i!=typeof t[0]))?["filter-in-large",A,["literal",t.sort(Uo)]]:["filter-in-small",A,["literal",t]]}}function $a(A){switch(A){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",A]}}function Cs(A){return["!",A]}function Lo(A){let t=typeof A;if(t==="number"||t==="boolean"||t==="string"||A==null)return JSON.stringify(A);if(Array.isArray(A)){let o="[";for(let c of A)o+=`${Lo(c)},`;return`${o}]`}let i=Object.keys(A).sort(),n="{";for(let o=0;on.maximum?[new Be(t,i,`${i} is greater than the maximum value ${n.maximum}`)]:[]}function Go(A){let t=A.valueSpec,i=Ft(A.value.type),n,o,c,g={},p=i!=="categorical"&&A.value.property===void 0,f=!p,_=rt(A.value.stops)==="array"&&rt(A.value.stops[0])==="array"&&rt(A.value.stops[0][0])==="object",y=ki({key:A.key,value:A.value,valueSpec:A.styleSpec.function,validateSpec:A.validateSpec,style:A.style,styleSpec:A.styleSpec,objectElementValidators:{stops:function(F){if(i==="identity")return[new Be(F.key,F.value,'identity function may not have a "stops" property')];let D=[],U=F.value;return D=D.concat(ws({key:F.key,value:U,valueSpec:F.valueSpec,validateSpec:F.validateSpec,style:F.style,styleSpec:F.styleSpec,arrayElementValidator:w})),rt(U)==="array"&&U.length===0&&D.push(new Be(F.key,U,"array must have at least one stop")),D},default:function(F){return F.validateSpec({key:F.key,value:F.value,valueSpec:t,validateSpec:F.validateSpec,style:F.style,styleSpec:F.styleSpec})}}});return i==="identity"&&p&&y.push(new Be(A.key,A.value,'missing required property "property"')),i==="identity"||A.value.stops||y.push(new Be(A.key,A.value,'missing required property "stops"')),i==="exponential"&&A.valueSpec.expression&&!Fo(A.valueSpec)&&y.push(new Be(A.key,A.value,"exponential functions not supported")),A.styleSpec.$version>=8&&(f&&!jA(A.valueSpec)?y.push(new Be(A.key,A.value,"property functions not supported")):p&&!Xa(A.valueSpec)&&y.push(new Be(A.key,A.value,"zoom functions not supported"))),i!=="categorical"&&!_||A.value.property!==void 0||y.push(new Be(A.key,A.value,'"property" property is required')),y;function w(F){let D=[],U=F.value,k=F.key;if(rt(U)!=="array")return[new Be(k,U,`array expected, ${rt(U)} found`)];if(U.length!==2)return[new Be(k,U,`array length 2 expected, length ${U.length} found`)];if(_){if(rt(U[0])!=="object")return[new Be(k,U,`object expected, ${rt(U[0])} found`)];if(U[0].zoom===void 0)return[new Be(k,U,"object stop key must have zoom")];if(U[0].value===void 0)return[new Be(k,U,"object stop key must have value")];if(c&&c>Ft(U[0].zoom))return[new Be(k,U[0].zoom,"stop zoom values must appear in ascending order")];Ft(U[0].zoom)!==c&&(c=Ft(U[0].zoom),o=void 0,g={}),D=D.concat(ki({key:`${k}[0]`,value:U[0],valueSpec:{zoom:{}},validateSpec:F.validateSpec,style:F.style,styleSpec:F.styleSpec,objectElementValidators:{zoom:Is,value:v}}))}else D=D.concat(v({key:`${k}[0]`,value:U[0],validateSpec:F.validateSpec,style:F.style,styleSpec:F.styleSpec},U));return ys(wr(U[1]))?D.concat([new Be(`${k}[1]`,U[1],"expressions are not allowed in function stops.")]):D.concat(F.validateSpec({key:`${k}[1]`,value:U[1],valueSpec:t,validateSpec:F.validateSpec,style:F.style,styleSpec:F.styleSpec}))}function v(F,D){let U=rt(F.value),k=Ft(F.value),N=F.value!==null?F.value:D;if(n){if(U!==n)return[new Be(F.key,N,`${U} stop domain type must match previous stop domain type ${n}`)]}else n=U;if(U!=="number"&&U!=="string"&&U!=="boolean")return[new Be(F.key,N,"stop domain value must be a number, string, or boolean")];if(U!=="number"&&i!=="categorical"){let ee=`number expected, ${U} found`;return jA(t)&&i===void 0&&(ee+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Be(F.key,N,ee)]}return i!=="categorical"||U!=="number"||isFinite(k)&&Math.floor(k)===k?i!=="categorical"&&U==="number"&&o!==void 0&&knew Be(`${A.key}${n.key}`,A.value,n.message)));let i=t.value.expression||t.value._styleExpression.expression;if(A.expressionContext==="property"&&A.propertyKey==="text-font"&&!i.outputDefined())return[new Be(A.key,A.value,`Invalid data expression for "${A.propertyKey}". Output values must be contained as literals within the expression.`)];if(A.expressionContext==="property"&&A.propertyType==="layout"&&!En(i))return[new Be(A.key,A.value,'"feature-state" data expressions are not supported with layout properties.')];if(A.expressionContext==="filter"&&!En(i))return[new Be(A.key,A.value,'"feature-state" data expressions are not supported with filters.')];if(A.expressionContext&&A.expressionContext.indexOf("cluster")===0){if(!_s(i,["zoom","feature-state"]))return[new Be(A.key,A.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(A.expressionContext==="cluster-initial"&&!Bs(i))return[new Be(A.key,A.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Er(A){let t=A.key,i=A.value,n=rt(i);return n!=="string"?[new Be(t,i,`color expected, ${n} found`)]:it.parse(String(i))?[]:[new Be(t,i,`color expected, "${i}" found`)]}function Tn(A){let t=A.key,i=A.value,n=A.valueSpec,o=[];return Array.isArray(n.values)?n.values.indexOf(Ft(i))===-1&&o.push(new Be(t,i,`expected one of [${n.values.join(", ")}], ${JSON.stringify(i)} found`)):Object.keys(n.values).indexOf(Ft(i))===-1&&o.push(new Be(t,i,`expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(i)} found`)),o}function Po(A){return Mn(wr(A.value))?Ir(Kt({},A,{expressionContext:"filter",valueSpec:{value:"boolean"}})):el(A)}function el(A){let t=A.value,i=A.key;if(rt(t)!=="array")return[new Be(i,t,`array expected, ${rt(t)} found`)];let n=A.styleSpec,o,c=[];if(t.length<1)return[new Be(i,t,"filter array must have at least 1 element")];switch(c=c.concat(Tn({key:`${i}[0]`,value:t[0],valueSpec:n.filter_operator,style:A.style,styleSpec:A.styleSpec})),Ft(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&Ft(t[1])==="$type"&&c.push(new Be(i,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&c.push(new Be(i,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(o=rt(t[1]),o!=="string"&&c.push(new Be(`${i}[1]`,t[1],`string expected, ${o} found`)));for(let g=2;g{_ in i&&t.push(new Be(n,i[_],`"${_}" is prohibited for ref layers`))})),o.layers.forEach((_=>{Ft(_.id)===p&&(f=_)})),f?f.ref?t.push(new Be(n,i.ref,"ref cannot reference another ref layer")):g=Ft(f.type):t.push(new Be(n,i.ref,`ref layer "${p}" not found`))}else if(g!=="background")if(i.source){let f=o.sources&&o.sources[i.source],_=f&&Ft(f.type);f?_==="vector"&&g==="raster"?t.push(new Be(n,i.source,`layer "${i.id}" requires a raster source`)):_!=="raster-dem"&&g==="hillshade"||_!=="raster-dem"&&g==="color-relief"?t.push(new Be(n,i.source,`layer "${i.id}" requires a raster-dem source`)):_==="raster"&&g!=="raster"?t.push(new Be(n,i.source,`layer "${i.id}" requires a vector source`)):_!=="vector"||i["source-layer"]?_==="raster-dem"&&g!=="hillshade"&&g!=="color-relief"?t.push(new Be(n,i.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):g!=="line"||!i.paint||!i.paint["line-gradient"]||_==="geojson"&&f.lineMetrics||t.push(new Be(n,i,`layer "${i.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new Be(n,i,`layer "${i.id}" must specify a "source-layer"`)):t.push(new Be(n,i.source,`source "${i.source}" not found`))}else t.push(new Be(n,i,'missing required property "source"'));return t=t.concat(ki({key:n,value:i,valueSpec:c.layer,style:A.style,styleSpec:A.styleSpec,validateSpec:A.validateSpec,objectElementValidators:{"*":()=>[],type:()=>A.validateSpec({key:`${n}.type`,value:i.type,valueSpec:c.layer.type,style:A.style,styleSpec:A.styleSpec,validateSpec:A.validateSpec,object:i,objectKey:"type"}),filter:Po,layout:f=>ki({layer:i,key:f.key,value:f.value,style:f.style,styleSpec:f.styleSpec,validateSpec:f.validateSpec,objectElementValidators:{"*":_=>Al(Kt({layerType:g},_))}}),paint:f=>ki({layer:i,key:f.key,value:f.value,style:f.style,styleSpec:f.styleSpec,validateSpec:f.validateSpec,objectElementValidators:{"*":_=>il(Kt({layerType:g},_))}})}})),t}function eA(A){let t=A.value,i=A.key,n=rt(t);return n!=="string"?[new Be(i,t,`string expected, ${n} found`)]:[]}let Di={promoteId:function({key:A,value:t}){if(rt(t)==="string")return eA({key:A,value:t});{let i=[];for(let n in t)i.push(...eA({key:`${A}.${n}`,value:t[n]}));return i}}};function Wr(A){let t=A.value,i=A.key,n=A.styleSpec,o=A.style,c=A.validateSpec;if(!t.type)return[new Be(i,t,'"type" is required')];let g=Ft(t.type),p;switch(g){case"vector":case"raster":return p=ki({key:i,value:t,valueSpec:n[`source_${g.replace("-","_")}`],style:A.style,styleSpec:n,objectElementValidators:Di,validateSpec:c}),p;case"raster-dem":return p=(function(f){var _;let y=(_=f.sourceName)!==null&&_!==void 0?_:"",w=f.value,v=f.styleSpec,F=v.source_raster_dem,D=f.style,U=[],k=rt(w);if(w===void 0)return U;if(k!=="object")return U.push(new Be("source_raster_dem",w,`object expected, ${k} found`)),U;let N=Ft(w.encoding)==="custom",ee=["redFactor","greenFactor","blueFactor","baseShift"],X=f.value.encoding?`"${f.value.encoding}"`:"Default";for(let J in w)!N&&ee.includes(J)?U.push(new Be(J,w[J],`In "${y}": "${J}" is only valid when "encoding" is set to "custom". ${X} encoding found`)):F[J]?U=U.concat(f.validateSpec({key:J,value:w[J],valueSpec:F[J],validateSpec:f.validateSpec,style:D,styleSpec:v})):U.push(new Be(J,w[J],`unknown property "${J}"`));return U})({sourceName:i,value:t,style:A.style,styleSpec:n,validateSpec:c}),p;case"geojson":if(p=ki({key:i,value:t,valueSpec:n.source_geojson,style:o,styleSpec:n,validateSpec:c,objectElementValidators:Di}),t.cluster)for(let f in t.clusterProperties){let[_,y]=t.clusterProperties[f],w=typeof _=="string"?[_,["accumulated"],["get",f]]:_;p.push(...Ir({key:`${i}.${f}.map`,value:y,expressionContext:"cluster-map"})),p.push(...Ir({key:`${i}.${f}.reduce`,value:w,expressionContext:"cluster-reduce"}))}return p;case"video":return ki({key:i,value:t,valueSpec:n.source_video,style:o,validateSpec:c,styleSpec:n});case"image":return ki({key:i,value:t,valueSpec:n.source_image,style:o,validateSpec:c,styleSpec:n});case"canvas":return[new Be(i,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Tn({key:`${i}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Ro(A){let t=A.value,i=A.styleSpec,n=i.light,o=A.style,c=[],g=rt(t);if(t===void 0)return c;if(g!=="object")return c=c.concat([new Be("light",t,`object expected, ${g} found`)]),c;for(let p in t){let f=p.match(/^(.*)-transition$/);c=c.concat(f&&n[f[1]]&&n[f[1]].transition?A.validateSpec({key:p,value:t[p],valueSpec:i.transition,validateSpec:A.validateSpec,style:o,styleSpec:i}):n[p]?A.validateSpec({key:p,value:t[p],valueSpec:n[p],validateSpec:A.validateSpec,style:o,styleSpec:i}):[new Be(p,t[p],`unknown property "${p}"`)])}return c}function rl(A){let t=A.value,i=A.styleSpec,n=i.sky,o=A.style,c=rt(t);if(t===void 0)return[];if(c!=="object")return[new Be("sky",t,`object expected, ${c} found`)];let g=[];for(let p in t)g=g.concat(n[p]?A.validateSpec({key:p,value:t[p],valueSpec:n[p],style:o,styleSpec:i}):[new Be(p,t[p],`unknown property "${p}"`)]);return g}function nl(A){let t=A.value,i=A.styleSpec,n=i.terrain,o=A.style,c=[],g=rt(t);if(t===void 0)return c;if(g!=="object")return c=c.concat([new Be("terrain",t,`object expected, ${g} found`)]),c;for(let p in t)c=c.concat(n[p]?A.validateSpec({key:p,value:t[p],valueSpec:n[p],validateSpec:A.validateSpec,style:o,styleSpec:i}):[new Be(p,t[p],`unknown property "${p}"`)]);return c}function en(A){let t=[],i=A.value,n=A.key;if(Array.isArray(i)){let o=[],c=[];for(let g in i)i[g].id&&o.includes(i[g].id)&&t.push(new Be(n,i,`all the sprites' ids must be unique, but ${i[g].id} is duplicated`)),o.push(i[g].id),i[g].url&&c.includes(i[g].url)&&t.push(new Be(n,i,`all the sprites' URLs must be unique, but ${i[g].url} is duplicated`)),c.push(i[g].url),t=t.concat(ki({key:`${n}[${g}]`,value:i[g],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:A.validateSpec}));return t}return eA({key:n,value:i})}function No(A){return t=A.value,t&&t.constructor===Object?[]:[new Be(A.key,A.value,`object expected, ${rt(A.value)} found`)];var t}let Es={"*":()=>[],array:ws,boolean:function(A){let t=A.value,i=A.key,n=rt(t);return n!=="boolean"?[new Be(i,t,`boolean expected, ${n} found`)]:[]},number:Is,color:Er,constants:ko,enum:Tn,filter:Po,function:Go,layer:$r,object:ki,source:Wr,light:Ro,sky:rl,terrain:nl,projection:function(A){let t=A.value,i=A.styleSpec,n=i.projection,o=A.style,c=rt(t);if(t===void 0)return[];if(c!=="object")return[new Be("projection",t,`object expected, ${c} found`)];let g=[];for(let p in t)g=g.concat(n[p]?A.validateSpec({key:p,value:t[p],valueSpec:n[p],style:o,styleSpec:i}):[new Be(p,t[p],`unknown property "${p}"`)]);return g},projectionDefinition:function(A){let t=A.key,i=A.value;i=i instanceof String?i.valueOf():i;let n=rt(i);return n!=="array"||(function(o){return Array.isArray(o)&&o.length===3&&typeof o[0]=="string"&&typeof o[1]=="string"&&typeof o[2]=="number"})(i)||(function(o){return!!["interpolate","step","literal"].includes(o[0])})(i)?["array","string"].includes(n)?[]:[new Be(t,i,`projection expected, invalid type "${n}" found`)]:[new Be(t,i,`projection expected, invalid array ${JSON.stringify(i)} found`)]},string:eA,formatted:function(A){return eA(A).length===0?[]:Ir(A)},resolvedImage:function(A){return eA(A).length===0?[]:Ir(A)},padding:function(A){let t=A.key,i=A.value;if(rt(i)==="array"){if(i.length<1||i.length>4)return[new Be(t,i,`padding requires 1 to 4 values; ${i.length} values found`)];let n={type:"number"},o=[];for(let c=0;c[]}})),A.constants&&(i=i.concat(ko({key:"constants",value:A.constants}))),sl(i)}function Ei(A){return function(t){return A(Object.assign({},t,{validateSpec:xs}))}}function sl(A){return[].concat(A).sort(((t,i)=>t.line-i.line))}function tA(A){return function(...t){return sl(A.apply(this,t))}}ji.source=tA(Ei(Wr)),ji.sprite=tA(Ei(en)),ji.glyphs=tA(Ei(vs)),ji.light=tA(Ei(Ro)),ji.sky=tA(Ei(rl)),ji.terrain=tA(Ei(nl)),ji.state=tA(Ei(No)),ji.layer=tA(Ei($r)),ji.filter=tA(Ei(Po)),ji.paintProperty=tA(Ei(il)),ji.layoutProperty=tA(Ei(Al));let tn=ji,Ln=tn.light,_c=tn.sky,yc=tn.paintProperty,bs=tn.layoutProperty;function ol(A,t){let i=!1;if(t&&t.length)for(let n of t)A.fire(new me(new Error(n.message))),i=!0;return i}class xr{constructor(t,i,n){let o=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;let g=new Int32Array(this.arrayBuffer);t=g[0],this.d=(i=g[1])+2*(n=g[2]);for(let f=0;f=w[D+0]&&o>=w[D+1])?(p[F]=!0,g.push(y[F])):p[F]=!1}}}}_forEachCell(t,i,n,o,c,g,p,f){let _=this._convertToCellCoord(t),y=this._convertToCellCoord(i),w=this._convertToCellCoord(n),v=this._convertToCellCoord(o);for(let F=_;F<=w;F++)for(let D=y;D<=v;D++){let U=this.d*D+F;if((!f||f(this._convertFromCellCoord(F),this._convertFromCellCoord(D),this._convertFromCellCoord(F+1),this._convertFromCellCoord(D+1)))&&c.call(this,t,i,n,o,U,g,p,f))return}}_convertFromCellCoord(t){return(t-this.padding)/this.scale}_convertToCellCoord(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let t=this.cells,i=3+this.cells.length+1+1,n=0;for(let g=0;g=0)continue;let g=A[c];o[c]=Xi[i].shallow.indexOf(c)>=0?g:vr(g,t)}A instanceof Error&&(o.message=A.message)}if(o.$name)throw new Error("$name property is reserved for worker serialization logic.");return i!=="Object"&&(o.$name=i),o}function An(A){if(Yo(A))return A;if(Array.isArray(A))return A.map(An);if(typeof A!="object")throw new Error("can't deserialize object of type "+typeof A);let t=Fs(A)||"Object";if(!Xi[t])throw new Error(`can't deserialize unregistered class ${t}`);let{klass:i}=Xi[t];if(!i)throw new Error(`can't deserialize unregistered class ${t}`);if(i.deserialize)return i.deserialize(A);let n=Object.create(i.prototype);for(let o of Object.keys(A)){if(o==="$name")continue;let c=A[o];n[o]=Xi[t].shallow.indexOf(o)>=0?c:An(c)}return n}class Oo{constructor(){this.first=!0}update(t,i){let n=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=i):this.lastFloorZoomA>=128&&A<=255,"Hangul Jamo":A=>A>=4352&&A<=4607,Khmer:A=>A>=6016&&A<=6143,"General Punctuation":A=>A>=8192&&A<=8303,"Letterlike Symbols":A=>A>=8448&&A<=8527,"Number Forms":A=>A>=8528&&A<=8591,"Miscellaneous Technical":A=>A>=8960&&A<=9215,"Control Pictures":A=>A>=9216&&A<=9279,"Optical Character Recognition":A=>A>=9280&&A<=9311,"Enclosed Alphanumerics":A=>A>=9312&&A<=9471,"Geometric Shapes":A=>A>=9632&&A<=9727,"Miscellaneous Symbols":A=>A>=9728&&A<=9983,"Miscellaneous Symbols and Arrows":A=>A>=11008&&A<=11263,"Ideographic Description Characters":A=>A>=12272&&A<=12287,"CJK Symbols and Punctuation":A=>A>=12288&&A<=12351,Hiragana:A=>A>=12352&&A<=12447,Katakana:A=>A>=12448&&A<=12543,Kanbun:A=>A>=12688&&A<=12703,"CJK Strokes":A=>A>=12736&&A<=12783,"Enclosed CJK Letters and Months":A=>A>=12800&&A<=13055,"CJK Compatibility":A=>A>=13056&&A<=13311,"Yijing Hexagram Symbols":A=>A>=19904&&A<=19967,"CJK Unified Ideographs":A=>A>=19968&&A<=40959,"Hangul Syllables":A=>A>=44032&&A<=55215,"Private Use Area":A=>A>=57344&&A<=63743,"Vertical Forms":A=>A>=65040&&A<=65055,"CJK Compatibility Forms":A=>A>=65072&&A<=65103,"Small Form Variants":A=>A>=65104&&A<=65135,"Halfwidth and Fullwidth Forms":A=>A>=65280&&A<=65519};function Ko(A){for(let t of A)if(Xo(t.charCodeAt(0)))return!0;return!1}function al(A){for(let t of A)if(!cl(t.charCodeAt(0)))return!1;return!0}function jo(A){let t=A.map((i=>{try{return new RegExp(`\\p{sc=${i}}`,"u").source}catch(n){return null}})).filter((i=>i));return new RegExp(t.join("|"),"u")}let ll=jo(["Arab","Dupl","Mong","Ougr","Syrc"]);function cl(A){return!ll.test(String.fromCodePoint(A))}let hl=jo(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Xo(A){return!(A!==746&&A!==747&&(A<4352||!(nt["CJK Compatibility Forms"](A)&&!(A>=65097&&A<=65103)||nt["CJK Compatibility"](A)||nt["CJK Strokes"](A)||!(!nt["CJK Symbols and Punctuation"](A)||A>=12296&&A<=12305||A>=12308&&A<=12319||A===12336)||nt["Enclosed CJK Letters and Months"](A)||nt["Ideographic Description Characters"](A)||nt.Kanbun(A)||nt.Katakana(A)&&A!==12540||!(!nt["Halfwidth and Fullwidth Forms"](A)||A===65288||A===65289||A===65293||A>=65306&&A<=65310||A===65339||A===65341||A===65343||A>=65371&&A<=65503||A===65507||A>=65512&&A<=65519)||!(!nt["Small Form Variants"](A)||A>=65112&&A<=65118||A>=65123&&A<=65126)||nt["Vertical Forms"](A)||nt["Yijing Hexagram Symbols"](A)||/\p{sc=Cans}/u.test(String.fromCodePoint(A))||/\p{sc=Hang}/u.test(String.fromCodePoint(A))||hl.test(String.fromCodePoint(A)))))}function Ho(A){return!(Xo(A)||(function(t){return!!(nt["Latin-1 Supplement"](t)&&(t===167||t===169||t===174||t===177||t===188||t===189||t===190||t===215||t===247)||nt["General Punctuation"](t)&&(t===8214||t===8224||t===8225||t===8240||t===8241||t===8251||t===8252||t===8258||t===8263||t===8264||t===8265||t===8273)||nt["Letterlike Symbols"](t)||nt["Number Forms"](t)||nt["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||t===9003||t>=9085&&t<=9114||t>=9150&&t<=9165||t===9167||t>=9169&&t<=9179||t>=9186&&t<=9215)||nt["Control Pictures"](t)&&t!==9251||nt["Optical Character Recognition"](t)||nt["Enclosed Alphanumerics"](t)||nt["Geometric Shapes"](t)||nt["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||nt["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||nt["CJK Symbols and Punctuation"](t)||nt.Katakana(t)||nt["Private Use Area"](t)||nt["CJK Compatibility Forms"](t)||nt["Small Form Variants"](t)||nt["Halfwidth and Fullwidth Forms"](t)||t===8734||t===8756||t===8757||t>=9984&&t<=10087||t>=10102&&t<=10131||t===65532||t===65533)})(A))}let ul=jo(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Zo(A){return ul.test(String.fromCodePoint(A))}function gl(A,t){return!(!t&&Zo(A)||A>=2304&&A<=3583||A>=3840&&A<=4255||nt.Khmer(A))}function Ds(A){for(let t of A)if(Zo(t.charCodeAt(0)))return!0;return!1}let HA=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(A){this.pluginStatus=A.pluginStatus,this.pluginURL=A.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(A){if(HA.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=A.applyArabicShaping,this.processBidirectionalText=A.processBidirectionalText,this.processStyledBidirectionalText=A.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(A,t){return l(this,void 0,void 0,(function*(){if(this.isParsed())return this.getState();if(A.pluginStatus!=="loading")return this.setState(A),A;let i=A.pluginURL,n=new Promise((c=>{this.loadScriptResolve=c}));t(i);let o=new Promise((c=>setTimeout((()=>c()),this.TIMEOUT)));if(yield Promise.race([n,o]),this.isParsed()){let c={pluginStatus:"loaded",pluginURL:i};return this.setState(c),c}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${i}`)}))}};class gt{constructor(t,i){this.isSupportedScript=Qc,this.zoom=t,i?(this.now=i.now||0,this.fadeDuration=i.fadeDuration||0,this.zoomHistory=i.zoomHistory||new Oo,this.transition=i.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Oo,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let t=this.zoom,i=t-Math.floor(t),n=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:i+(1-i)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*i}}}function Qc(A){return(function(t,i){for(let n of t)if(!gl(n.charCodeAt(0),i))return!1;return!0})(A,HA.getRTLTextPluginStatus()==="loaded")}class Ss{constructor(t,i,n){this.property=t,this.value=i,this.expression=(function(o,c,g){if(xn(o))return new Fn(o,c);if(ys(o)){let p=Va(o,c,g);if(p.result==="error")throw new Error(p.value.map((f=>`${f.key}: ${f.message}`)).join(", "));return p.value}{let p=o;return c.type==="color"&&typeof o=="string"?p=it.parse(o):c.type!=="padding"||typeof o!="number"&&!Array.isArray(o)?c.type!=="numberArray"||typeof o!="number"&&!Array.isArray(o)?c.type!=="colorArray"||typeof o!="string"&&!Array.isArray(o)?c.type==="variableAnchorOffsetCollection"&&Array.isArray(o)?p=Ii.parse(o):c.type==="projectionDefinition"&&typeof o=="string"&&(p=mi.parse(o)):p=Xt.parse(o):p=wi.parse(o):p=ii.parse(o),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>p}}})(i===void 0?t.specification.default:i,t.specification,n)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(t,i,n){return this.property.possiblyEvaluate(this,t,i,n)}}class Ms{constructor(t,i){this.property=t,this.value=new Ss(t,void 0,i)}transitioned(t,i){return new Vo(this.property,this.value,i,Oi({},t.transition,this.transition),t.now)}untransitioned(){return new Vo(this.property,this.value,null,{},0)}}class Jo{constructor(t,i){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues),this._globalState=i}getValue(t){return Mi(this._values[t].value.value)}setValue(t,i){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new Ms(this._values[t].property,this._globalState)),this._values[t].value=new Ss(this._values[t].property,i===null?void 0:Mi(i),this._globalState)}getTransition(t){return Mi(this._values[t].transition)}setTransition(t,i){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new Ms(this._values[t].property,this._globalState)),this._values[t].transition=Mi(i)||void 0}serialize(){let t={};for(let i of Object.keys(this._values)){let n=this.getValue(i);n!==void 0&&(t[i]=n);let o=this.getTransition(i);o!==void 0&&(t[`${i}-transition`]=o)}return t}transitioned(t,i){let n=new dl(this._properties);for(let o of Object.keys(this._values))n._values[o]=this._values[o].transitioned(t,i._values[o]);return n}untransitioned(){let t=new dl(this._properties);for(let i of Object.keys(this._values))t._values[i]=this._values[i].untransitioned();return t}}class Vo{constructor(t,i,n,o,c){this.property=t,this.value=i,this.begin=c+o.delay||0,this.end=this.begin+o.duration||0,t.specification.transition&&(o.delay||o.duration)&&(this.prior=n)}possiblyEvaluate(t,i,n){let o=t.now||0,c=this.value.possiblyEvaluate(t,i,n),g=this.prior;if(g){if(o>this.end)return this.prior=null,c;if(this.value.isDataDriven())return this.prior=null,c;if(oo.zoomHistory.lastIntegerZoom?{from:t,to:i}:{from:n,to:i}}interpolate(t){return t}}class pl{constructor(t){this.specification=t}possiblyEvaluate(t,i,n,o){if(t.value!==void 0){if(t.expression.kind==="constant"){let c=t.expression.evaluate(i,null,{},n,o);return this._calculate(c,c,c,i)}return this._calculate(t.expression.evaluate(new gt(Math.floor(i.zoom-1),i)),t.expression.evaluate(new gt(Math.floor(i.zoom),i)),t.expression.evaluate(new gt(Math.floor(i.zoom+1),i)),i)}}_calculate(t,i,n,o){return o.zoom>o.zoomHistory.lastIntegerZoom?{from:t,to:i}:{from:n,to:i}}interpolate(t){return t}}class Ts{constructor(t){this.specification=t}possiblyEvaluate(t,i,n,o){return!!t.expression.evaluate(i,null,{},n,o)}interpolate(){return!1}}class _i{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let i in t){let n=t[i];n.specification.overridable&&this.overridableProperties.push(i);let o=this.defaultPropertyValues[i]=new Ss(n,void 0,void 0),c=this.defaultTransitionablePropertyValues[i]=new Ms(n,void 0);this.defaultTransitioningPropertyValues[i]=c.untransitioned(),this.defaultPossiblyEvaluatedValues[i]=o.possiblyEvaluate({})}}}Me("DataDrivenProperty",ze),Me("DataConstantProperty",Pe),Me("CrossFadedDataDrivenProperty",kn),Me("CrossFadedProperty",pl),Me("ColorRampProperty",Ts);let fl="-transition";class iA extends ke{constructor(t,i,n){if(super(),this.id=t.id,this.type=t.type,this._globalState=n,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},t.type!=="custom"&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,t.type!=="background"&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter,this._featureFilter=Cr(t.filter,n)),i.layout&&(this._unevaluatedLayout=new Cc(i.layout,n)),i.paint)){this._transitionablePaint=new Jo(i.paint,n);for(let o in t.paint)this.setPaintProperty(o,t.paint[o],{validate:!1});for(let o in t.layout)this.setLayoutProperty(o,t.layout[o],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Us(i.paint)}}setFilter(t){this.filter=t,this._featureFilter=Cr(t,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){return t==="visibility"?this.visibility:this._unevaluatedLayout.getValue(t)}getLayoutAffectingGlobalStateRefs(){let t=new Set;if(this._unevaluatedLayout)for(let i in this._unevaluatedLayout._values){let n=this._unevaluatedLayout._values[i];for(let o of n.getGlobalStateRefs())t.add(o)}for(let i of this._featureFilter.getGlobalStateRefs())t.add(i);return t}getPaintAffectingGlobalStateRefs(){var t;let i=new globalThis.Map;if(this._transitionablePaint)for(let n in this._transitionablePaint._values){let o=this._transitionablePaint._values[n].value;for(let c of o.getGlobalStateRefs()){let g=(t=i.get(c))!==null&&t!==void 0?t:[];g.push({name:n,value:o.value}),i.set(c,g)}}return i}setLayoutProperty(t,i,n={}){i!=null&&this._validate(bs,`layers.${this.id}.layout.${t}`,t,i,n)||(t!=="visibility"?this._unevaluatedLayout.setValue(t,i):this.visibility=i)}getPaintProperty(t){return t.endsWith(fl)?this._transitionablePaint.getTransition(t.slice(0,-11)):this._transitionablePaint.getValue(t)}setPaintProperty(t,i,n={}){if(i!=null&&this._validate(yc,`layers.${this.id}.paint.${t}`,t,i,n))return!1;if(t.endsWith(fl))return this._transitionablePaint.setTransition(t.slice(0,-11),i||void 0),!1;{let o=this._transitionablePaint._values[t],c=o.property.specification["property-type"]==="cross-faded-data-driven",g=o.value.isDataDriven(),p=o.value;this._transitionablePaint.setValue(t,i),this._handleSpecialPaintPropertyUpdate(t);let f=this._transitionablePaint._values[t].value;return f.isDataDriven()||g||c||this._handleOverridablePaintPropertyUpdate(t,p,f)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,i,n){return!1}isHidden(t){return!!(this.minzoom&&t=this.maxzoom)||this.visibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(t,i){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,i)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,i)}serialize(){let 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),Rr(t,((i,n)=>!(i===void 0||n==="layout"&&!Object.keys(i).length||n==="paint"&&!Object.keys(i).length)))}_validate(t,i,n,o,c={}){return(!c||c.validate!==!1)&&ol(this,t.call(tn,{key:i,layerType:this.type,objectKey:n,value:o,styleSpec:Ae,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let t in this.paint._values){let i=this.paint.get(t);if(i instanceof mA&&jA(i.property.specification)&&(i.value.kind==="source"||i.value.kind==="composite")&&i.value.isStateDependent)return!0}return!1}}let br={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class rn{constructor(t,i){this._structArray=t,this._pos1=i*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Ct{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,i){return t._trim(),i&&(t.isTransferred=!0,i.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){let i=Object.create(this.prototype);return i.arrayBuffer=t.arrayBuffer,i.length=t.length,i.capacity=t.arrayBuffer.byteLength/i.bytesPerElement,i._refreshViews(),i}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let i=this.uint8;this._refreshViews(),i&&this.uint8.set(i)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Tt(A,t=1){let i=0,n=0;return{members:A.map((o=>{let c=br[o.type].BYTES_PER_ELEMENT,g=i=Ls(i,Math.max(t,c)),p=o.components||1;return n=Math.max(n,c),i+=c*p,{name:o.name,type:o.type,components:p,offset:g}})),size:Ls(i,Math.max(n,t)),alignment:t}}function Ls(A,t){return Math.ceil(A/t)*t}class Gn extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i){let n=this.length;return this.resize(n+1),this.emplace(n,t,i)}emplace(t,i,n){let o=2*t;return this.int16[o+0]=i,this.int16[o+1]=n,t}}Gn.prototype.bytesPerElement=4,Me("StructArrayLayout2i4",Gn);class Fr extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,n){let o=this.length;return this.resize(o+1),this.emplace(o,t,i,n)}emplace(t,i,n,o){let c=3*t;return this.int16[c+0]=i,this.int16[c+1]=n,this.int16[c+2]=o,t}}Fr.prototype.bytesPerElement=6,Me("StructArrayLayout3i6",Fr);class Dr extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,n,o){let c=this.length;return this.resize(c+1),this.emplace(c,t,i,n,o)}emplace(t,i,n,o,c){let g=4*t;return this.int16[g+0]=i,this.int16[g+1]=n,this.int16[g+2]=o,this.int16[g+3]=c,t}}Dr.prototype.bytesPerElement=8,Me("StructArrayLayout4i8",Dr);class qo extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,n,o,c,g){let p=this.length;return this.resize(p+1),this.emplace(p,t,i,n,o,c,g)}emplace(t,i,n,o,c,g,p){let f=6*t;return this.int16[f+0]=i,this.int16[f+1]=n,this.int16[f+2]=o,this.int16[f+3]=c,this.int16[f+4]=g,this.int16[f+5]=p,t}}qo.prototype.bytesPerElement=12,Me("StructArrayLayout2i4i12",qo);class ks extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,n,o,c,g){let p=this.length;return this.resize(p+1),this.emplace(p,t,i,n,o,c,g)}emplace(t,i,n,o,c,g,p){let f=4*t,_=8*t;return this.int16[f+0]=i,this.int16[f+1]=n,this.uint8[_+4]=o,this.uint8[_+5]=c,this.uint8[_+6]=g,this.uint8[_+7]=p,t}}ks.prototype.bytesPerElement=8,Me("StructArrayLayout2i4ub8",ks);class wA extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i){let n=this.length;return this.resize(n+1),this.emplace(n,t,i)}emplace(t,i,n){let o=2*t;return this.float32[o+0]=i,this.float32[o+1]=n,t}}wA.prototype.bytesPerElement=8,Me("StructArrayLayout2f8",wA);class $o extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,n,o,c,g,p,f,_,y){let w=this.length;return this.resize(w+1),this.emplace(w,t,i,n,o,c,g,p,f,_,y)}emplace(t,i,n,o,c,g,p,f,_,y,w){let v=10*t;return this.uint16[v+0]=i,this.uint16[v+1]=n,this.uint16[v+2]=o,this.uint16[v+3]=c,this.uint16[v+4]=g,this.uint16[v+5]=p,this.uint16[v+6]=f,this.uint16[v+7]=_,this.uint16[v+8]=y,this.uint16[v+9]=w,t}}$o.prototype.bytesPerElement=20,Me("StructArrayLayout10ui20",$o);class Wo extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,n,o,c,g,p,f){let _=this.length;return this.resize(_+1),this.emplace(_,t,i,n,o,c,g,p,f)}emplace(t,i,n,o,c,g,p,f,_){let y=8*t;return this.uint16[y+0]=i,this.uint16[y+1]=n,this.uint16[y+2]=o,this.uint16[y+3]=c,this.uint16[y+4]=g,this.uint16[y+5]=p,this.uint16[y+6]=f,this.uint16[y+7]=_,t}}Wo.prototype.bytesPerElement=16,Me("StructArrayLayout8ui16",Wo);class Gs extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,n,o,c,g,p,f,_,y,w,v){let F=this.length;return this.resize(F+1),this.emplace(F,t,i,n,o,c,g,p,f,_,y,w,v)}emplace(t,i,n,o,c,g,p,f,_,y,w,v,F){let D=12*t;return this.int16[D+0]=i,this.int16[D+1]=n,this.int16[D+2]=o,this.int16[D+3]=c,this.uint16[D+4]=g,this.uint16[D+5]=p,this.uint16[D+6]=f,this.uint16[D+7]=_,this.int16[D+8]=y,this.int16[D+9]=w,this.int16[D+10]=v,this.int16[D+11]=F,t}}Gs.prototype.bytesPerElement=24,Me("StructArrayLayout4i4ui4i24",Gs);class ea extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i,n){let o=this.length;return this.resize(o+1),this.emplace(o,t,i,n)}emplace(t,i,n,o){let c=3*t;return this.float32[c+0]=i,this.float32[c+1]=n,this.float32[c+2]=o,t}}ea.prototype.bytesPerElement=12,Me("StructArrayLayout3f12",ea);class h extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){let i=this.length;return this.resize(i+1),this.emplace(i,t)}emplace(t,i){return this.uint32[1*t+0]=i,t}}h.prototype.bytesPerElement=4,Me("StructArrayLayout1ul4",h);class e extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,n,o,c,g,p,f,_){let y=this.length;return this.resize(y+1),this.emplace(y,t,i,n,o,c,g,p,f,_)}emplace(t,i,n,o,c,g,p,f,_,y){let w=10*t,v=5*t;return this.int16[w+0]=i,this.int16[w+1]=n,this.int16[w+2]=o,this.int16[w+3]=c,this.int16[w+4]=g,this.int16[w+5]=p,this.uint32[v+3]=f,this.uint16[w+8]=_,this.uint16[w+9]=y,t}}e.prototype.bytesPerElement=20,Me("StructArrayLayout6i1ul2ui20",e);class r extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,n,o,c,g){let p=this.length;return this.resize(p+1),this.emplace(p,t,i,n,o,c,g)}emplace(t,i,n,o,c,g,p){let f=6*t;return this.int16[f+0]=i,this.int16[f+1]=n,this.int16[f+2]=o,this.int16[f+3]=c,this.int16[f+4]=g,this.int16[f+5]=p,t}}r.prototype.bytesPerElement=12,Me("StructArrayLayout2i2i2i12",r);class s extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,n,o,c){let g=this.length;return this.resize(g+1),this.emplace(g,t,i,n,o,c)}emplace(t,i,n,o,c,g){let p=4*t,f=8*t;return this.float32[p+0]=i,this.float32[p+1]=n,this.float32[p+2]=o,this.int16[f+6]=c,this.int16[f+7]=g,t}}s.prototype.bytesPerElement=16,Me("StructArrayLayout2f1f2i16",s);class a extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,n,o,c,g){let p=this.length;return this.resize(p+1),this.emplace(p,t,i,n,o,c,g)}emplace(t,i,n,o,c,g,p){let f=16*t,_=4*t,y=8*t;return this.uint8[f+0]=i,this.uint8[f+1]=n,this.float32[_+1]=o,this.float32[_+2]=c,this.int16[y+6]=g,this.int16[y+7]=p,t}}a.prototype.bytesPerElement=16,Me("StructArrayLayout2ub2f2i16",a);class u extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,n){let o=this.length;return this.resize(o+1),this.emplace(o,t,i,n)}emplace(t,i,n,o){let c=3*t;return this.uint16[c+0]=i,this.uint16[c+1]=n,this.uint16[c+2]=o,t}}u.prototype.bytesPerElement=6,Me("StructArrayLayout3ui6",u);class d extends Ct{_refreshViews(){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)}emplaceBack(t,i,n,o,c,g,p,f,_,y,w,v,F,D,U,k,N){let ee=this.length;return this.resize(ee+1),this.emplace(ee,t,i,n,o,c,g,p,f,_,y,w,v,F,D,U,k,N)}emplace(t,i,n,o,c,g,p,f,_,y,w,v,F,D,U,k,N,ee){let X=24*t,J=12*t,oe=48*t;return this.int16[X+0]=i,this.int16[X+1]=n,this.uint16[X+2]=o,this.uint16[X+3]=c,this.uint32[J+2]=g,this.uint32[J+3]=p,this.uint32[J+4]=f,this.uint16[X+10]=_,this.uint16[X+11]=y,this.uint16[X+12]=w,this.float32[J+7]=v,this.float32[J+8]=F,this.uint8[oe+36]=D,this.uint8[oe+37]=U,this.uint8[oe+38]=k,this.uint32[J+10]=N,this.int16[X+22]=ee,t}}d.prototype.bytesPerElement=48,Me("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",d);class m extends Ct{_refreshViews(){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)}emplaceBack(t,i,n,o,c,g,p,f,_,y,w,v,F,D,U,k,N,ee,X,J,oe,ge,ye,De,xe,be,Re,ve){let Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,t,i,n,o,c,g,p,f,_,y,w,v,F,D,U,k,N,ee,X,J,oe,ge,ye,De,xe,be,Re,ve)}emplace(t,i,n,o,c,g,p,f,_,y,w,v,F,D,U,k,N,ee,X,J,oe,ge,ye,De,xe,be,Re,ve,Fe){let fe=32*t,je=16*t;return this.int16[fe+0]=i,this.int16[fe+1]=n,this.int16[fe+2]=o,this.int16[fe+3]=c,this.int16[fe+4]=g,this.int16[fe+5]=p,this.int16[fe+6]=f,this.int16[fe+7]=_,this.uint16[fe+8]=y,this.uint16[fe+9]=w,this.uint16[fe+10]=v,this.uint16[fe+11]=F,this.uint16[fe+12]=D,this.uint16[fe+13]=U,this.uint16[fe+14]=k,this.uint16[fe+15]=N,this.uint16[fe+16]=ee,this.uint16[fe+17]=X,this.uint16[fe+18]=J,this.uint16[fe+19]=oe,this.uint16[fe+20]=ge,this.uint16[fe+21]=ye,this.uint16[fe+22]=De,this.uint32[je+12]=xe,this.float32[je+13]=be,this.float32[je+14]=Re,this.uint16[fe+30]=ve,this.uint16[fe+31]=Fe,t}}m.prototype.bytesPerElement=64,Me("StructArrayLayout8i15ui1ul2f2ui64",m);class B extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){let i=this.length;return this.resize(i+1),this.emplace(i,t)}emplace(t,i){return this.float32[1*t+0]=i,t}}B.prototype.bytesPerElement=4,Me("StructArrayLayout1f4",B);class Q extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i,n){let o=this.length;return this.resize(o+1),this.emplace(o,t,i,n)}emplace(t,i,n,o){let c=3*t;return this.uint16[6*t+0]=i,this.float32[c+1]=n,this.float32[c+2]=o,t}}Q.prototype.bytesPerElement=12,Me("StructArrayLayout1ui2f12",Q);class C extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,n){let o=this.length;return this.resize(o+1),this.emplace(o,t,i,n)}emplace(t,i,n,o){let c=4*t;return this.uint32[2*t+0]=i,this.uint16[c+2]=n,this.uint16[c+3]=o,t}}C.prototype.bytesPerElement=8,Me("StructArrayLayout1ul2ui8",C);class x extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i){let n=this.length;return this.resize(n+1),this.emplace(n,t,i)}emplace(t,i,n){let o=2*t;return this.uint16[o+0]=i,this.uint16[o+1]=n,t}}x.prototype.bytesPerElement=4,Me("StructArrayLayout2ui4",x);class I extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){let i=this.length;return this.resize(i+1),this.emplace(i,t)}emplace(t,i){return this.uint16[1*t+0]=i,t}}I.prototype.bytesPerElement=2,Me("StructArrayLayout1ui2",I);class b extends Ct{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i,n,o){let c=this.length;return this.resize(c+1),this.emplace(c,t,i,n,o)}emplace(t,i,n,o,c){let g=4*t;return this.float32[g+0]=i,this.float32[g+1]=n,this.float32[g+2]=o,this.float32[g+3]=c,t}}b.prototype.bytesPerElement=16,Me("StructArrayLayout4f16",b);class T extends rn{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new ue(this.anchorPointX,this.anchorPointY)}}T.prototype.size=20;class G extends e{get(t){return new T(this,t)}}Me("CollisionBoxArray",G);class P extends rn{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(t){this._structArray.uint8[this._pos1+37]=t}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}P.prototype.size=48;class R extends d{get(t){return new P(this,t)}}Me("PlacedSymbolArray",R);class z extends rn{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(t){this._structArray.uint32[this._pos4+12]=t}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}z.prototype.size=64;class K extends m{get(t){return new z(this,t)}}Me("SymbolInstanceArray",K);class Y extends B{getoffsetX(t){return this.float32[1*t+0]}}Me("GlyphOffsetArray",Y);class H extends Fr{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}Me("SymbolLineVertexArray",H);class V extends rn{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}V.prototype.size=12;class O extends Q{get(t){return new V(this,t)}}Me("TextAnchorOffsetArray",O);class q extends rn{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}q.prototype.size=8;class ce extends C{get(t){return new q(this,t)}}Me("FeatureIndexArray",ce);class se extends Gn{}class ae extends Gn{}class he extends Gn{}class Ee extends qo{}class we extends ks{}class _e extends wA{}class Te extends $o{}class $e extends Wo{}class ut extends Gs{}class wt extends ea{}class Bt extends h{}class Dt extends r{}class It extends a{}class Wt extends u{}class Et extends x{}let pt=Tt([{name:"a_pos",components:2,type:"Int16"}],4),{members:St}=pt;class et{constructor(t=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=t}prepareSegment(t,i,n,o){let c=this.segments[this.segments.length-1];return t>et.MAX_VERTEX_ARRAY_LENGTH&&zt(`Max vertices per segment is ${et.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${et.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!c||c.vertexLength+t>et.MAX_VERTEX_ARRAY_LENGTH||c.sortKey!==o?this.createNewSegment(i,n,o):c}createNewSegment(t,i,n){let o={vertexOffset:t.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0,vaos:{}};return n!==void 0&&(o.sortKey=n),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(o),o}getOrCreateLatestSegment(t,i,n){return this.prepareSegment(0,t,i,n)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let t of this.segments)for(let i in t.vaos)t.vaos[i].destroy()}static simpleSegment(t,i,n,o){return new et([{vertexOffset:t,primitiveOffset:i,vertexLength:n,primitiveLength:o,vaos:{},sortKey:0}])}}function hi(A,t){return 256*(A=bi(Math.floor(A),0,255))+bi(Math.floor(t),0,255)}et.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Me("SegmentVector",et);let IA=Tt([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),Sr=Tt([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var ZA,Mr,Pn,JA={exports:{}},Ur={exports:{}},Gi={exports:{}},VA=(function(){if(Pn)return JA.exports;Pn=1;var A=(ZA||(ZA=1,Ur.exports=function(i,n){var o,c,g,p,f,_,y,w;for(c=i.length-(o=3&i.length),g=n,f=3432918353,_=461845907,w=0;w>>16)*f&65535)<<16)&4294967295)<<15|y>>>17))*_+(((y>>>16)*_&65535)<<16)&4294967295)<<13|g>>>19))+((5*(g>>>16)&65535)<<16)&4294967295))+((58964+(p>>>16)&65535)<<16);switch(y=0,o){case 3:y^=(255&i.charCodeAt(w+2))<<16;case 2:y^=(255&i.charCodeAt(w+1))<<8;case 1:g^=y=(65535&(y=(y=(65535&(y^=255&i.charCodeAt(w)))*f+(((y>>>16)*f&65535)<<16)&4294967295)<<15|y>>>17))*_+(((y>>>16)*_&65535)<<16)&4294967295}return g^=i.length,g=2246822507*(65535&(g^=g>>>16))+((2246822507*(g>>>16)&65535)<<16)&4294967295,g=3266489909*(65535&(g^=g>>>13))+((3266489909*(g>>>16)&65535)<<16)&4294967295,(g^=g>>>16)>>>0}),Ur.exports),t=(Mr||(Mr=1,Gi.exports=function(i,n){for(var o,c=i.length,g=n^c,p=0;c>=4;)o=1540483477*(65535&(o=255&i.charCodeAt(p)|(255&i.charCodeAt(++p))<<8|(255&i.charCodeAt(++p))<<16|(255&i.charCodeAt(++p))<<24))+((1540483477*(o>>>16)&65535)<<16),g=1540483477*(65535&g)+((1540483477*(g>>>16)&65535)<<16)^(o=1540483477*(65535&(o^=o>>>24))+((1540483477*(o>>>16)&65535)<<16)),c-=4,++p;switch(c){case 3:g^=(255&i.charCodeAt(p+2))<<16;case 2:g^=(255&i.charCodeAt(p+1))<<8;case 1:g=1540483477*(65535&(g^=255&i.charCodeAt(p)))+((1540483477*(g>>>16)&65535)<<16)}return g=1540483477*(65535&(g^=g>>>13))+((1540483477*(g>>>16)&65535)<<16),(g^=g>>>15)>>>0}),Gi.exports);return JA.exports=A,JA.exports.murmur3=A,JA.exports.murmur2=t,JA.exports})(),EA=Ue(VA);class qA{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,i,n,o){this.ids.push(Ht(t)),this.positions.push(i,n,o)}getPositions(t){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let i=Ht(t),n=0,o=this.ids.length-1;for(;n>1;this.ids[g]>=i?o=g:n=g+1}let c=[];for(;this.ids[n]===i;)c.push({index:this.positions[3*n],start:this.positions[3*n+1],end:this.positions[3*n+2]}),n++;return c}static serialize(t,i){let n=new Float64Array(t.ids),o=new Uint32Array(t.positions);return Zt(n,o,0,n.length-1),i&&i.push(n.buffer,o.buffer),{ids:n,positions:o}}static deserialize(t){let i=new qA;return i.ids=t.ids,i.positions=t.positions,i.indexed=!0,i}}function Ht(A){let t=+A;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:EA(String(A))}function Zt(A,t,i,n){for(;i>1],c=i-1,g=n+1;for(;;){do c++;while(A[c]o);if(c>=g)break;xi(A,c,g),xi(t,3*c,3*g),xi(t,3*c+1,3*g+1),xi(t,3*c+2,3*g+2)}g-i`u_${o}`)),this.type=n}setUniform(t,i,n){t.set(n.constantOr(this.value))}getBinding(t,i,n){return this.type==="color"?new Bl(t,i):new Ps(t,i)}}class Pi{constructor(t,i){this.uniformNames=i.map((n=>`u_${n}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,i){this.pixelRatioFrom=i.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=i.tlbr,this.patternTo=t.tlbr}setConstantDashPositions(t,i){this.dashTo=[0,t.y,t.height,t.width],this.dashFrom=[0,i.y,i.height,i.width]}setUniform(t,i,n,o){let c=null;o==="u_pattern_to"?c=this.patternTo:o==="u_pattern_from"?c=this.patternFrom:o==="u_dasharray_to"?c=this.dashTo:o==="u_dasharray_from"?c=this.dashFrom:o==="u_pixel_ratio_to"?c=this.pixelRatioTo:o==="u_pixel_ratio_from"&&(c=this.pixelRatioFrom),c!==null&&t.set(c)}getBinding(t,i,n){return n.substr(0,9)==="u_pattern"||n.substr(0,12)==="u_dasharray_"?new ml(t,i):new Ps(t,i)}}class BA{constructor(t,i,n,o){this.expression=t,this.type=n,this.maxValue=0,this.paintVertexAttributes=i.map((c=>({name:`a_${c}`,type:"Float32",components:n==="color"?2:1,offset:0}))),this.paintVertexArray=new o}populatePaintArray(t,i,n){let o=this.paintVertexArray.length,c=this.expression.evaluate(new gt(0,n),i,{},n.canonical,[],n.formattedSection);this.paintVertexArray.resize(t),this._setPaintValue(o,t,c)}updatePaintArray(t,i,n,o,c){let g=this.expression.evaluate(new gt(0,c),n,o);this._setPaintValue(t,i,g)}_setPaintValue(t,i,n){if(this.type==="color"){let o=ta(n);for(let c=t;c`u_${p}_t`)),this.type=n,this.useIntegerZoom=o,this.zoom=c,this.maxValue=0,this.paintVertexAttributes=i.map((p=>({name:`a_${p}`,type:"Float32",components:n==="color"?4:2,offset:0}))),this.paintVertexArray=new g}populatePaintArray(t,i,n){let o=this.expression.evaluate(new gt(this.zoom,n),i,{},n.canonical,[],n.formattedSection),c=this.expression.evaluate(new gt(this.zoom+1,n),i,{},n.canonical,[],n.formattedSection),g=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(g,t,o,c)}updatePaintArray(t,i,n,o,c){let g=this.expression.evaluate(new gt(this.zoom,c),n,o),p=this.expression.evaluate(new gt(this.zoom+1,c),n,o);this._setPaintValue(t,i,g,p)}_setPaintValue(t,i,n,o){if(this.type==="color"){let c=ta(n),g=ta(o);for(let p=t;p`#define HAS_UNIFORM_${o}`)))}return t}getBinderAttributes(){let t=[];for(let i in this.binders){let n=this.binders[i];if(n instanceof BA||n instanceof Hi)for(let o=0;o!0){this.programConfigurations={};for(let o of t)this.programConfigurations[o.id]=new Ns(o,i,n);this.needsUpload=!1,this._featureMap=new qA,this._bufferOffset=0}populatePaintArrays(t,i,n,o){for(let c in this.programConfigurations)this.programConfigurations[c].populatePaintArrays(t,i,o);i.id!==void 0&&this._featureMap.add(i.id,n,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,i,n,o){for(let c of n)this.needsUpload=this.programConfigurations[c.id].updatePaintArrays(t,this._featureMap,i,c,o)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(let i in this.programConfigurations)this.programConfigurations[i].upload(t);this.needsUpload=!1}}destroy(){for(let t in this.programConfigurations)this.programConfigurations[t].destroy()}}function cg(A,t){return{"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"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[A]||[A.replace(`${t}-`,"").replace(/-/g,"_")]}function Bh(A,t,i){let n={color:{source:wA,composite:b},number:{source:B,composite:wA}},o=(function(c){return{"line-pattern":{source:Te,composite:Te},"fill-pattern":{source:Te,composite:Te},"fill-extrusion-pattern":{source:Te,composite:Te},"line-dasharray":{source:$e,composite:$e}}[c]})(A);return o&&o[i]||n[t][i]}Me("ConstantBinder",Rn),Me("CrossFadedConstantBinder",Pi),Me("SourceExpressionBinder",BA),Me("CrossFadedPatternBinder",Rs),Me("CrossFadedDasharrayBinder",ia),Me("CompositeExpressionBinder",Hi),Me("ProgramConfiguration",Ns,{omit:["_buffers"]}),Me("ProgramConfigurationSet",Nn);let Ic=Math.pow(2,14)-1,_h=-Ic-1;function zn(A){let t=dt/A.extent,i=A.loadGeometry();for(let n=0;ng.x+1||fg.y+1)&&zt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return i}function Yn(A,t){return{type:A.type,id:A.id,properties:A.properties,geometry:t?zn(A):[]}}let yh=-32768;function hg(A,t,i,n,o){A.emplaceBack(yh+8*t+n,yh+8*i+o)}class Ec{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((i=>i.id)),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new ae,this.indexArray=new Wt,this.segments=new et,this.programConfigurations=new Nn(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((i=>i.isStateDependent())).map((i=>i.id))}populate(t,i,n){let o=this.layers[0],c=[],g=null,p=!1,f=o.type==="heatmap";if(o.type==="circle"){let y=o;g=y.layout.get("circle-sort-key"),p=!g.isConstant(),f=f||y.paint.get("circle-pitch-alignment")==="map"}let _=f?i.subdivisionGranularity.circle:1;for(let{feature:y,id:w,index:v,sourceLayerIndex:F}of t){let D=this.layers[0]._featureFilter.needGeometry,U=Yn(y,D);if(!this.layers[0]._featureFilter.filter(new gt(this.zoom),U,n))continue;let k=p?g.evaluate(U,{},n):void 0,N={id:w,properties:y.properties,type:y.type,sourceLayerIndex:F,index:v,geometry:D?U.geometry:zn(y),patterns:{},sortKey:k};c.push(N)}p&&c.sort(((y,w)=>y.sortKey-w.sortKey));for(let y of c){let{geometry:w,index:v,sourceLayerIndex:F}=y,D=t[v].feature;this.addFeature(y,w,v,n,_),i.featureIndex.insert(D,w,v,F,this.index)}}update(t,i,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,{imagePositions:n})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,St),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,i,n,o,c=1){let g;switch(c){case 1:g=[0,7];break;case 3:g=[0,2,5,7];break;case 5:g=[0,1,3,4,6,7];break;case 7:g=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${c}; valid values are 1, 3, 5, 7.`)}let p=g.length;for(let f of i)for(let _ of f){let y=_.x,w=_.y;if(y<0||y>=dt||w<0||w>=dt)continue;let v=this.segments.prepareSegment(p*p,this.layoutVertexArray,this.indexArray,t.sortKey),F=v.vertexLength;for(let D=0;D1){if(xc(A,t))return!0;for(let n=0;n1?i:i.sub(t)._mult(o)._add(t))}function Ih(A,t){let i,n,o,c=!1;for(let g=0;gt.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(c=!c)}return c}function zs(A,t){let i=!1;for(let n=0,o=A.length-1;nt.y!=g.y>t.y&&t.x<(g.x-c.x)*(t.y-c.y)/(g.y-c.y)+c.x&&(i=!i)}return i}function dg(A,t,i){let n=i[0],o=i[2];if(A.xo.x&&t.x>o.x||A.yo.y&&t.y>o.y)return!1;let c=Vi(A,t,i[0]);return c!==Vi(A,t,i[1])||c!==Vi(A,t,i[2])||c!==Vi(A,t,i[3])}function Ys(A,t,i){let n=t.paint.get(A).value;return n.kind==="constant"?n.value:i.programConfigurations.get(t.id).getMaxValue(A)}function yl(A){return Math.sqrt(A[0]*A[0]+A[1]*A[1])}function Ql(A,t,i,n,o){if(!t[0]&&!t[1])return A;let c=ue.convert(t)._mult(o);i==="viewport"&&c._rotate(-n);let g=[];for(let p=0;pbc(X,k,N,ee)))})(_,c,p,f),D=y),Eh({queryGeometry:F,size:D,transform:c,unwrappedTileID:p,getElevation:f,pitchAlignment:v,pitchScale:w},o)}}class bh extends Ec{}let Fh;Me("HeatmapBucket",bh,{omit:["layers"]});var Qg={get paint(){return Fh=Fh||new _i({"heatmap-radius":new ze(Ae.paint_heatmap["heatmap-radius"]),"heatmap-weight":new ze(Ae.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Pe(Ae.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ts(Ae.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Pe(Ae.paint_heatmap["heatmap-opacity"])})}};function Fc(A,{width:t,height:i},n,o){if(o){if(o instanceof Uint8ClampedArray)o=new Uint8Array(o.buffer);else if(o.length!==t*i*n)throw new RangeError(`mismatched image size. expected: ${o.length} but got: ${t*i*n}`)}else o=new Uint8Array(t*i*n);return A.width=t,A.height=i,A.data=o,A}function Dh(A,{width:t,height:i},n){if(t===A.width&&i===A.height)return;let o=Fc({},{width:t,height:i},n);Dc(A,o,{x:0,y:0},{x:0,y:0},{width:Math.min(A.width,t),height:Math.min(A.height,i)},n),A.width=t,A.height=i,A.data=o.data}function Dc(A,t,i,n,o,c){if(o.width===0||o.height===0)return t;if(o.width>A.width||o.height>A.height||i.x>A.width-o.width||i.y>A.height-o.height)throw new RangeError("out of range source coordinates for image copy");if(o.width>t.width||o.height>t.height||n.x>t.width-o.width||n.y>t.height-o.height)throw new RangeError("out of range destination coordinates for image copy");let g=A.data,p=t.data;if(g===p)throw new Error("srcData equals dstData, so image is already copied");for(let f=0;f{t[A.evaluationKey]=f;let _=A.expression.evaluate(t);o.setPixel(g/4/i,p/4,_)};if(A.clips)for(let g=0,p=0;gthis.max&&(this.max=w),w=this.dim+1||i<-1||i>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(i+1)*this.stride+(t+1)}unpack(t,i,n){return t*this.redFactor+i*this.greenFactor+n*this.blueFactor-this.baseShift}pack(t){return Lh(t,this.getUnpackVector())}getPixels(){return new Ri({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(t,i,n){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let o=i*this.dim,c=i*this.dim+this.dim,g=n*this.dim,p=n*this.dim+this.dim;switch(i){case-1:o=c-1;break;case 1:c=o+1}switch(n){case-1:g=p-1;break;case 1:p=g+1}let f=-i*this.dim,_=-n*this.dim;for(let y=g;y0)for(let g=t;g=t;g-=n)c=Nh(g/n|0,A[g],A[g+1],c);return c&&Os(c,c.next)&&(oa(c),c=c.next),c}function On(A,t){if(!A)return A;t||(t=A);let i,n=A;do if(i=!1,n.steiner||!Os(n,n.next)&&jt(n.prev,n,n.next)!==0)n=n.next;else{if(oa(n),n=t=n.prev,n===n.next)break;i=!0}while(i||n!==t);return t}function ra(A,t,i,n,o,c,g){if(!A)return;!g&&c&&(function(f,_,y,w){let v=f;do v.z===0&&(v.z=Tc(v.x,v.y,_,y,w)),v.prevZ=v.prev,v.nextZ=v.next,v=v.next;while(v!==f);v.prevZ.nextZ=null,v.prevZ=null,(function(F){let D,U=1;do{let k,N=F;F=null;let ee=null;for(D=0;N;){D++;let X=N,J=0;for(let ge=0;ge0||oe>0&&X;)J!==0&&(oe===0||!X||N.z<=X.z)?(k=N,N=N.nextZ,J--):(k=X,X=X.nextZ,oe--),ee?ee.nextZ=k:F=k,k.prevZ=ee,ee=k;N=X}ee.nextZ=null,U*=2}while(D>1)})(v)})(A,n,o,c);let p=A;for(;A.prev!==A.next;){let f=A.prev,_=A.next;if(c?Dg(A,n,o,c):Fg(A))t.push(f.i,A.i,_.i),oa(A),A=_.next,p=_.next;else if((A=_)===p){g?g===1?ra(A=Sg(On(A),t),t,i,n,o,c,2):g===2&&Mg(A,t,i,n,o,c):ra(On(A),t,i,n,o,c,1);break}}}function Fg(A){let t=A.prev,i=A,n=A.next;if(jt(t,i,n)>=0)return!1;let o=t.x,c=i.x,g=n.x,p=t.y,f=i.y,_=n.y,y=Math.min(o,c,g),w=Math.min(p,f,_),v=Math.max(o,c,g),F=Math.max(p,f,_),D=n.next;for(;D!==t;){if(D.x>=y&&D.x<=v&&D.y>=w&&D.y<=F&&na(o,p,c,f,g,_,D.x,D.y)&&jt(D.prev,D,D.next)>=0)return!1;D=D.next}return!0}function Dg(A,t,i,n){let o=A.prev,c=A,g=A.next;if(jt(o,c,g)>=0)return!1;let p=o.x,f=c.x,_=g.x,y=o.y,w=c.y,v=g.y,F=Math.min(p,f,_),D=Math.min(y,w,v),U=Math.max(p,f,_),k=Math.max(y,w,v),N=Tc(F,D,t,i,n),ee=Tc(U,k,t,i,n),X=A.prevZ,J=A.nextZ;for(;X&&X.z>=N&&J&&J.z<=ee;){if(X.x>=F&&X.x<=U&&X.y>=D&&X.y<=k&&X!==o&&X!==g&&na(p,y,f,w,_,v,X.x,X.y)&&jt(X.prev,X,X.next)>=0||(X=X.prevZ,J.x>=F&&J.x<=U&&J.y>=D&&J.y<=k&&J!==o&&J!==g&&na(p,y,f,w,_,v,J.x,J.y)&&jt(J.prev,J,J.next)>=0))return!1;J=J.nextZ}for(;X&&X.z>=N;){if(X.x>=F&&X.x<=U&&X.y>=D&&X.y<=k&&X!==o&&X!==g&&na(p,y,f,w,_,v,X.x,X.y)&&jt(X.prev,X,X.next)>=0)return!1;X=X.prevZ}for(;J&&J.z<=ee;){if(J.x>=F&&J.x<=U&&J.y>=D&&J.y<=k&&J!==o&&J!==g&&na(p,y,f,w,_,v,J.x,J.y)&&jt(J.prev,J,J.next)>=0)return!1;J=J.nextZ}return!0}function Sg(A,t){let i=A;do{let n=i.prev,o=i.next.next;!Os(n,o)&&Ph(n,i,i.next,o)&&sa(n,o)&&sa(o,n)&&(t.push(n.i,i.i,o.i),oa(i),oa(i.next),i=A=o),i=i.next}while(i!==A);return On(i)}function Mg(A,t,i,n,o,c){let g=A;do{let p=g.next.next;for(;p!==g.prev;){if(g.i!==p.i&&Gg(g,p)){let f=Rh(g,p);return g=On(g,g.next),f=On(f,f.next),ra(g,t,i,n,o,c,0),void ra(f,t,i,n,o,c,0)}p=p.next}g=g.next}while(g!==A)}function Ug(A,t){let i=A.x-t.x;return i===0&&(i=A.y-t.y,i===0)&&(i=(A.next.y-A.y)/(A.next.x-A.x)-(t.next.y-t.y)/(t.next.x-t.x)),i}function Tg(A,t){let i=(function(o,c){let g=c,p=o.x,f=o.y,_,y=-1/0;if(Os(o,g))return g;do{if(Os(o,g.next))return g.next;if(f<=g.y&&f>=g.next.y&&g.next.y!==g.y){let U=g.x+(f-g.y)*(g.next.x-g.x)/(g.next.y-g.y);if(U<=p&&U>y&&(y=U,_=g.x=g.x&&g.x>=v&&p!==g.x&&Gh(f_.x||g.x===_.x&&Lg(_,g)))&&(_=g,D=U)}g=g.next}while(g!==w);return _})(A,t);if(!i)return t;let n=Rh(i,A);return On(n,n.next),On(i,i.next)}function Lg(A,t){return jt(A.prev,A,t.prev)<0&&jt(t.next,A,A.next)<0}function Tc(A,t,i,n,o){return(A=1431655765&((A=858993459&((A=252645135&((A=16711935&((A=(A-i)*o|0)|A<<8))|A<<4))|A<<2))|A<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*o|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function kg(A){let t=A,i=A;do(t.x=(A-g)*(c-p)&&(A-g)*(n-p)>=(i-g)*(t-p)&&(i-g)*(c-p)>=(o-g)*(n-p)}function na(A,t,i,n,o,c,g,p){return!(A===g&&t===p)&&Gh(A,t,i,n,o,c,g,p)}function Gg(A,t){return A.next.i!==t.i&&A.prev.i!==t.i&&!(function(i,n){let o=i;do{if(o.i!==i.i&&o.next.i!==i.i&&o.i!==n.i&&o.next.i!==n.i&&Ph(o,o.next,i,n))return!0;o=o.next}while(o!==i);return!1})(A,t)&&(sa(A,t)&&sa(t,A)&&(function(i,n){let o=i,c=!1,g=(i.x+n.x)/2,p=(i.y+n.y)/2;do o.y>p!=o.next.y>p&&o.next.y!==o.y&&g<(o.next.x-o.x)*(p-o.y)/(o.next.y-o.y)+o.x&&(c=!c),o=o.next;while(o!==i);return c})(A,t)&&(jt(A.prev,A,t.prev)||jt(A,t.prev,t))||Os(A,t)&&jt(A.prev,A,A.next)>0&&jt(t.prev,t,t.next)>0)}function jt(A,t,i){return(t.y-A.y)*(i.x-t.x)-(t.x-A.x)*(i.y-t.y)}function Os(A,t){return A.x===t.x&&A.y===t.y}function Ph(A,t,i,n){let o=Il(jt(A,t,i)),c=Il(jt(A,t,n)),g=Il(jt(i,n,A)),p=Il(jt(i,n,t));return o!==c&&g!==p||!(o!==0||!wl(A,i,t))||!(c!==0||!wl(A,n,t))||!(g!==0||!wl(i,A,n))||!(p!==0||!wl(i,t,n))}function wl(A,t,i){return t.x<=Math.max(A.x,i.x)&&t.x>=Math.min(A.x,i.x)&&t.y<=Math.max(A.y,i.y)&&t.y>=Math.min(A.y,i.y)}function Il(A){return A>0?1:A<0?-1:0}function sa(A,t){return jt(A.prev,A,A.next)<0?jt(A,t,A.next)>=0&&jt(A,A.prev,t)>=0:jt(A,t,A.prev)<0||jt(A,A.next,t)<0}function Rh(A,t){let i=Lc(A.i,A.x,A.y),n=Lc(t.i,t.x,t.y),o=A.next,c=t.prev;return A.next=t,t.prev=A,i.next=o,o.prev=i,n.next=i,i.prev=n,c.next=n,n.prev=c,n}function Nh(A,t,i,n){let o=Lc(A,t,i);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function oa(A){A.next.prev=A.prev,A.prev.next=A.next,A.prevZ&&(A.prevZ.nextZ=A.nextZ),A.nextZ&&(A.nextZ.prevZ=A.prevZ)}function Lc(A,t,i){return{i:A,x:t,y:i,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class Ks{constructor(t,i){if(i>t)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=i}getGranularityForZoomLevel(t){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||i>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let n=0|Math.round(t),o=0|Math.round(i),c=this._getKey(n,o);if(this._vertexDictionary.has(c))return this._vertexDictionary.get(c);let g=this._vertexBuffer.length/2;return this._vertexDictionary.set(c,g),this._vertexBuffer.push(n,o),g}_subdivideTrianglesScanline(t){if(this._granularity<2)return(function(o,c){let g=[];for(let p=0;p0?(g.push(f),g.push(y),g.push(_)):(g.push(f),g.push(_),g.push(y))}return g})(this._vertexBuffer,t);let i=[],n=t.length;for(let o=0;o=1||oe<=0)||N&&(_c)){w>=o&&w<=c&&g.push(n[(p+1)%3]);continue}!N&&J>0&&g.push(this._vertexToIndex(f+D*J,_+U*J));let ge=f+D*Math.max(J,0),ye=f+D*Math.min(oe,1);k||this._generateIntraEdgeVertices(g,f,_,y,w,ge,ye),!N&&oe<1&&g.push(this._vertexToIndex(f+D*oe,_+U*oe)),(N||w>=o&&w<=c)&&g.push(n[(p+1)%3]),!N&&(w<=o||w>=c)&&this._generateInterEdgeVertices(g,f,_,y,w,v,F,ye,o,c)}return g}_generateIntraEdgeVertices(t,i,n,o,c,g,p){let f=o-i,_=c-n,y=_===0,w=y?Math.min(i,o):Math.min(g,p),v=y?Math.max(i,o):Math.max(g,p),F=Math.floor(w/this._granularityCellSize)+1,D=Math.ceil(v/this._granularityCellSize)-1;if(y?i=F;U--){let k=U*this._granularityCellSize;t.push(this._vertexToIndex(k,n+_*(k-i)/f))}}_generateInterEdgeVertices(t,i,n,o,c,g,p,f,_,y){let w=c-n,v=g-o,F=p-c,D=(_-c)/F,U=(y-c)/F,k=Math.min(D,U),N=Math.max(D,U),ee=o+v*k,X=Math.floor(Math.min(ee,f)/this._granularityCellSize)+1,J=Math.ceil(Math.max(ee,f)/this._granularityCellSize)-1,oe=f=1||N<=0){let De=n-p,xe=g+(i-g)*Math.min((_-p)/De,(y-p)/De);X=Math.floor(Math.min(xe,f)/this._granularityCellSize)+1,J=Math.ceil(Math.max(xe,f)/this._granularityCellSize)-1,oe=f0?y:_;if(oe)for(let De=X;De<=J;De++)t.push(this._vertexToIndex(De*this._granularityCellSize,ye));else for(let De=J;De>=X;De--)t.push(this._vertexToIndex(De*this._granularityCellSize,ye))}_generateOutline(t){let i=[];for(let n of t){let o=Kn(n,this._granularity,!0),c=this._pointArrayToIndices(o),g=[];for(let p=1;pc!=(g===js)?(t.push(i),t.push(n),t.push(this._vertexToIndex(o,g)),t.push(n),t.push(this._vertexToIndex(c,g)),t.push(this._vertexToIndex(o,g))):(t.push(n),t.push(i),t.push(this._vertexToIndex(o,g)),t.push(this._vertexToIndex(c,g)),t.push(n),t.push(this._vertexToIndex(o,g)))}_fillPoles(t,i,n){let o=this._vertexBuffer,c=dt,g=t.length;for(let p=2;p80*w){k=_[0],N=_[1];let X=k,J=N;for(let oe=w;oeX&&(X=ge),ye>J&&(J=ye)}ee=Math.max(X-k,J-N),ee=ee!==0?32767/ee:0}return ra(D,U,w,k,N,ee,0),U})(n,o),f=this._convertIndices(n,p);c=this._subdivideTrianglesScanline(f)}catch(p){console.error(p)}let g=[];return i&&(g=this._generateOutline(t)),this._ensureNoPoleVertices(),this._handlePoles(c),{verticesFlattened:this._vertexBuffer,indicesTriangles:c,indicesLineList:g}}_convertIndices(t,i){let n=[];for(let o=0;o0?(Math.floor(ye/g)+1)*g:(Math.ceil(ye/g)-1)*g,Re=J>0?(Math.floor(De/g)+1)*g:(Math.ceil(De/g)-1)*g,ve=Math.abs(ye-be),Fe=Math.abs(De-Re),fe=Math.abs(ye-U),je=Math.abs(De-k),Xe=N?ve/oe:Number.POSITIVE_INFINITY,Ye=ee?Fe/ge:Number.POSITIVE_INFINITY;if((fe<=ve||!N)&&(je<=Fe||!ee))break;if(Xe=0?g-1:c-1,_=(p+1)%c,y=A[2*t[f]],w=A[2*t[_]],v=A[2*t[g]],F=A[2*t[g]+1],D=A[2*t[p]+1],U=!1;if(yw)U=!1;else{let k=D-F,N=-(A[2*t[p]]-v),ee=F((w-v)*k+(A[2*t[_]+1]-F)*N)*ee&&(U=!0)}if(U){let k=t[f],N=t[g],ee=t[p];k!==N&&k!==ee&&N!==ee&&i.push(ee,N,k),g--,g<0&&(g=c-1)}else{let k=t[_],N=t[g],ee=t[p];k!==N&&k!==ee&&N!==ee&&i.push(ee,N,k),p++,p>=c&&(p=0)}if(f===_)break}}function Yh(A,t,i,n,o,c,g,p,f){let _=o.length/2,y=g&&p&&f;if(_et.MAX_VERTEX_ARRAY_LENGTH&&(J=w.createNewSegment(v,F),X=ee.count,be=!0,Re=!0,ve=!0,oe=0);let Fe=la(N,D,k,ee,ye,be,J),fe=la(N,D,k,ee,De,Re,J),je=la(N,D,k,ee,xe,ve,J);F.emplaceBack(oe+Fe-X,oe+fe-X,oe+je-X),J.primitiveLength++}})(t,i,n,o,c,A),y&&(function(w,v,F,D,U,k){let N=[];for(let ge=0;geet.MAX_VERTEX_ARRAY_LENGTH&&(J=w.createNewSegment(v,F),X=ee.count,Re=!0,ve=!0,oe=0);let Fe=la(N,D,k,ee,xe,Re,J),fe=la(N,D,k,ee,be,ve,J);F.emplaceBack(oe+Fe-X,oe+fe-X),J.primitiveLength++}}})(g,i,p,o,f,A),t.forceNewSegmentOnNextPrepare(),g==null||g.forceNewSegmentOnNextPrepare()}function la(A,t,i,n,o,c,g){if(c){let p=n.count;return i(t[2*o],t[2*o+1]),A[o]=n.count,n.count++,g.vertexLength++,p}return A[o]}class kc{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((i=>i.id)),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new he,this.indexArray=new Wt,this.indexArray2=new Et,this.programConfigurations=new Nn(t.layers,t.zoom),this.segments=new et,this.segments2=new et,this.stateDependentLayerIds=this.layers.filter((i=>i.isStateDependent())).map((i=>i.id))}populate(t,i,n){this.hasDependencies=Cl("fill",this.layers,i);let o=this.layers[0].layout.get("fill-sort-key"),c=!o.isConstant(),g=[];for(let{feature:p,id:f,index:_,sourceLayerIndex:y}of t){let w=this.layers[0]._featureFilter.needGeometry,v=Yn(p,w);if(!this.layers[0]._featureFilter.filter(new gt(this.zoom),v,n))continue;let F=c?o.evaluate(v,{},n,i.availableImages):void 0,D={id:f,properties:p.properties,type:p.type,sourceLayerIndex:y,index:_,geometry:w?v.geometry:zn(p),patterns:{},sortKey:F};g.push(D)}c&&g.sort(((p,f)=>p.sortKey-f.sortKey));for(let p of g){let{geometry:f,index:_,sourceLayerIndex:y}=p;if(this.hasDependencies){let w=Uc("fill",this.layers,p,{zoom:this.zoom},i);this.patternFeatures.push(w)}else this.addFeature(p,f,_,n,{},i.subdivisionGranularity);i.featureIndex.insert(t[_].feature,f,_,y,this.index)}}update(t,i,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,{imagePositions:n})}addFeatures(t,i,n){for(let o of this.patternFeatures)this.addFeature(o,o.geometry,o.index,i,n,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,bg),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(t,i,n,o,c,g){for(let p of wn(i,500)){let f=zh(p,o,g.fill.getGranularityForZoomLevel(o.z)),_=this.layoutVertexArray;Yh(((y,w)=>{_.emplaceBack(y,w)}),this.segments,this.layoutVertexArray,this.indexArray,f.verticesFlattened,f.indicesTriangles,this.segments2,this.indexArray2,f.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,{imagePositions:c,canonical:o})}}let Oh,Kh;Me("FillBucket",kc,{omit:["layers","patternFeatures"]});var Ng={get paint(){return Kh=Kh||new _i({"fill-antialias":new Pe(Ae.paint_fill["fill-antialias"]),"fill-opacity":new ze(Ae.paint_fill["fill-opacity"]),"fill-color":new ze(Ae.paint_fill["fill-color"]),"fill-outline-color":new ze(Ae.paint_fill["fill-outline-color"]),"fill-translate":new Pe(Ae.paint_fill["fill-translate"]),"fill-translate-anchor":new Pe(Ae.paint_fill["fill-translate-anchor"]),"fill-pattern":new kn(Ae.paint_fill["fill-pattern"])})},get layout(){return Oh=Oh||new _i({"fill-sort-key":new ze(Ae.layout_fill["fill-sort-key"])})}};class zg extends iA{constructor(t,i){super(t,Ng,i)}recalculate(t,i){super.recalculate(t,i);let n=this.paint._values["fill-outline-color"];n.value.kind==="constant"&&n.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new kc(t)}queryRadius(){return yl(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:i,transform:n,pixelsToTileUnits:o}){return Ch(Ql(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-n.bearingInRadians,o),i)}isTileClipped(){return!0}}let Yg=Tt([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Og=Tt([{name:"a_centroid",components:2,type:"Int16"}],4),{members:Kg}=Yg;class Xs{constructor(t,i,n,o,c){this.properties={},this.extent=n,this.type=0,this.id=void 0,this._pbf=t,this._geometry=-1,this._keys=o,this._values=c,t.readFields(jg,this,i)}loadGeometry(){let t=this._pbf;t.pos=this._geometry;let i=t.readVarint()+t.pos,n=[],o,c=1,g=0,p=0,f=0;for(;t.pos>3}if(g--,c===1||c===2)p+=t.readSVarint(),f+=t.readSVarint(),c===1&&(o&&n.push(o),o=[]),o&&o.push(new ue(p,f));else{if(c!==7)throw new Error(`unknown command ${c}`);o&&o.push(o[0].clone())}}return o&&n.push(o),n}bbox(){let t=this._pbf;t.pos=this._geometry;let i=t.readVarint()+t.pos,n=1,o=0,c=0,g=0,p=1/0,f=-1/0,_=1/0,y=-1/0;for(;t.pos>3}if(o--,n===1||n===2)c+=t.readSVarint(),g+=t.readSVarint(),cf&&(f=c),g<_&&(_=g),g>y&&(y=g);else if(n!==7)throw new Error(`unknown command ${n}`)}return[p,_,f,y]}toGeoJSON(t,i,n){let o=this.extent*Math.pow(2,n),c=this.extent*t,g=this.extent*i,p=this.loadGeometry();function f(v){return[360*(v.x+c)/o-180,360/Math.PI*Math.atan(Math.exp((1-2*(v.y+g)/o)*Math.PI))-90]}function _(v){return v.map(f)}let y;if(this.type===1){let v=[];for(let D of p)v.push(D[0]);let F=_(v);y=v.length===1?{type:"Point",coordinates:F[0]}:{type:"MultiPoint",coordinates:F}}else if(this.type===2){let v=p.map(_);y=v.length===1?{type:"LineString",coordinates:v[0]}:{type:"MultiLineString",coordinates:v}}else{if(this.type!==3)throw new Error("unknown feature type");{let v=(function(D){let U=D.length;if(U<=1)return[D];let k=[],N,ee;for(let X=0;X=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];let i=this._pbf.readVarint()+this._pbf.pos;return new Xs(this._pbf,i,this.extent,this._keys,this._values)}}function Hg(A,t,i){A===15?t.version=i.readVarint():A===1?t.name=i.readString():A===5?t.extent=i.readVarint():A===2?t._features.push(i.pos):A===3?t._keys.push(i.readString()):A===4&&t._values.push((function(n){let o=null,c=n.readVarint()+n.pos;for(;n.pos>3;o=g===1?n.readString():g===2?n.readFloat():g===3?n.readDouble():g===4?n.readVarint64():g===5?n.readVarint():g===6?n.readSVarint():g===7?n.readBoolean():null}if(o==null)throw new Error("unknown feature value");return o})(i))}class Xh{constructor(t,i){this.layers=t.readFields(Zg,{},i)}}function Zg(A,t,i){if(A===3){let n=new jh(i,i.readVarint()+i.pos);n.length&&(t[n.name]=n)}}let Gc=Math.pow(2,13);function ca(A,t,i,n,o,c,g,p){A.emplaceBack(t,i,2*Math.floor(n*Gc)+g,o*Gc*2,c*Gc*2,Math.round(p))}class Pc{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((i=>i.id)),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new Ee,this.centroidVertexArray=new se,this.indexArray=new Wt,this.programConfigurations=new Nn(t.layers,t.zoom),this.segments=new et,this.stateDependentLayerIds=this.layers.filter((i=>i.isStateDependent())).map((i=>i.id))}populate(t,i,n){this.features=[],this.hasDependencies=Cl("fill-extrusion",this.layers,i);for(let{feature:o,id:c,index:g,sourceLayerIndex:p}of t){let f=this.layers[0]._featureFilter.needGeometry,_=Yn(o,f);if(!this.layers[0]._featureFilter.filter(new gt(this.zoom),_,n))continue;let y={id:c,sourceLayerIndex:p,index:g,geometry:f?_.geometry:zn(o),properties:o.properties,type:o.type,patterns:{}};this.hasDependencies?this.features.push(Uc("fill-extrusion",this.layers,y,{zoom:this.zoom},i)):this.addFeature(y,y.geometry,g,n,{},i.subdivisionGranularity),i.featureIndex.insert(o,y.geometry,g,p,this.index,!0)}}addFeatures(t,i,n){for(let o of this.features){let{geometry:c}=o;this.addFeature(o,c,o.index,i,n,t.subdivisionGranularity)}}update(t,i,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,{imagePositions:n})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Kg),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,Og.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,i,n,o,c,g){for(let p of wn(i,500)){let f={x:0,y:0,sampleCount:0},_=this.layoutVertexArray.length;this.processPolygon(f,o,t,p,g);let y=this.layoutVertexArray.length-_,w=Math.floor(f.x/f.sampleCount),v=Math.floor(f.y/f.sampleCount);for(let F=0;F{ca(y,w,v,0,0,1,1,0)}),this.segments,this.layoutVertexArray,this.indexArray,_.verticesFlattened,_.indicesTriangles)}_generateSideFaces(t,i){let n=0;for(let o=1;oet.MAX_VERTEX_ARRAY_LENGTH&&(i.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let p=c.sub(g)._perp()._unit(),f=g.dist(c);n+f>32768&&(n=0),ca(this.layoutVertexArray,c.x,c.y,p.x,p.y,0,0,n),ca(this.layoutVertexArray,c.x,c.y,p.x,p.y,0,1,n),n+=f,ca(this.layoutVertexArray,g.x,g.y,p.x,p.y,0,0,n),ca(this.layoutVertexArray,g.x,g.y,p.x,p.y,0,1,n);let _=i.segment.vertexLength;this.indexArray.emplaceBack(_,_+2,_+1),this.indexArray.emplaceBack(_+1,_+2,_+3),i.segment.vertexLength+=4,i.segment.primitiveLength+=2}}}function Jg(A,t){for(let i=0;idt)||A.y===t.y&&(A.y<0||A.y>dt)}function Hh(A){return A.every((t=>t.x<0))||A.every((t=>t.x>dt))||A.every((t=>t.y<0))||A.every((t=>t.y>dt))}let Zh;Me("FillExtrusionBucket",Pc,{omit:["layers","features"]});var qg={get paint(){return Zh=Zh||new _i({"fill-extrusion-opacity":new Pe(Ae["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new ze(Ae["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Pe(Ae["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Pe(Ae["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new kn(Ae["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new ze(Ae["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new ze(Ae["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Pe(Ae["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class $g extends iA{constructor(t,i){super(t,qg,i)}createBucket(t){return new Pc(t)}queryRadius(){return yl(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:i,featureState:n,geometry:o,transform:c,pixelsToTileUnits:g,pixelPosMatrix:p}){let f=Ql(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-c.bearingInRadians,g),_=this.paint.get("fill-extrusion-height").evaluate(i,n),y=this.paint.get("fill-extrusion-base").evaluate(i,n),w=(function(F,D){let U=[];for(let k of F){let N=[k.x,k.y,0,1];cn(N,N,D),U.push(new ue(N[0]/N[3],N[1]/N[3]))}return U})(f,p),v=(function(F,D,U,k){let N=[],ee=[],X=k[8]*D,J=k[9]*D,oe=k[10]*D,ge=k[11]*D,ye=k[8]*U,De=k[9]*U,xe=k[10]*U,be=k[11]*U;for(let Re of F){let ve=[],Fe=[];for(let fe of Re){let je=fe.x,Xe=fe.y,Ye=k[0]*je+k[4]*Xe+k[12],Ge=k[1]*je+k[5]*Xe+k[13],st=k[2]*je+k[6]*Xe+k[14],Lt=k[3]*je+k[7]*Xe+k[15],ei=st+oe,Qi=Lt+ge,rA=Ye+ye,Ni=Ge+De,ui=st+xe,Mt=Lt+be,ni=new ue((Ye+X)/Qi,(Ge+J)/Qi);ni.z=ei/Qi,ve.push(ni);let gi=new ue(rA/Mt,Ni/Mt);gi.z=ui/Mt,Fe.push(gi)}N.push(ve),ee.push(Fe)}return[N,ee]})(o,y,_,p);return(function(F,D,U){let k=1/0;Ch(U,D)&&(k=Jh(U,D[0]));for(let N=0;Ni.id)),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((i=>{this.gradients[i.id]={}})),this.layoutVertexArray=new we,this.layoutVertexArray2=new _e,this.indexArray=new Wt,this.programConfigurations=new Nn(t.layers,t.zoom),this.segments=new et,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((i=>i.isStateDependent())).map((i=>i.id))}populate(t,i,n){this.hasDependencies=Cl("line",this.layers,i)||this.hasLineDasharray(this.layers);let o=this.layers[0].layout.get("line-sort-key"),c=!o.isConstant(),g=[];for(let{feature:p,id:f,index:_,sourceLayerIndex:y}of t){let w=this.layers[0]._featureFilter.needGeometry,v=Yn(p,w);if(!this.layers[0]._featureFilter.filter(new gt(this.zoom),v,n))continue;let F=c?o.evaluate(v,{},n):void 0,D={id:f,properties:p.properties,type:p.type,sourceLayerIndex:y,index:_,geometry:w?v.geometry:zn(p),patterns:{},dashes:{},sortKey:F};g.push(D)}c&&g.sort(((p,f)=>p.sortKey-f.sortKey));for(let p of g){let{geometry:f,index:_,sourceLayerIndex:y}=p;this.hasDependencies?(Cl("line",this.layers,i)?Uc("line",this.layers,p,{zoom:this.zoom},i):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,p,this.zoom,i),this.patternFeatures.push(p)):this.addFeature(p,f,_,n,{},{},i.subdivisionGranularity),i.featureIndex.insert(t[_].feature,f,_,y,this.index)}}update(t,i,n,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,{imagePositions:n,dashPositions:o})}addFeatures(t,i,n,o){for(let c of this.patternFeatures)this.addFeature(c,c.geometry,c.index,i,n,o,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,id)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ed),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}addFeature(t,i,n,o,c,g,p){let f=this.layers[0].layout,_=f.get("line-join").evaluate(t,{}),y=f.get("line-cap"),w=f.get("line-miter-limit"),v=f.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(let F of i)this.addLine(F,t,_,y,w,v,o,p);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,{imagePositions:c,dashPositions:g,canonical:o})}addLine(t,i,n,o,c,g,p,f){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t=Kn(t,p?f.line.getGranularityForZoomLevel(p.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let X=0;X=2&&t[y-1].equals(t[y-2]);)y--;let w=0;for(;w0;if(xe&&X>w){let Fe=D.dist(U);if(Fe>2*v){let fe=D.sub(D.sub(U)._mult(v/Fe)._round());this.updateDistance(U,fe),this.addCurrentVertex(fe,N,0,0,F),U=fe}}let Re=U&&k,ve=Re?n:_?"butt":o;if(Re&&ve==="round"&&(yec&&(ve="bevel"),ve==="bevel"&&(ye>2&&(ve="flipbevel"),ye100)J=ee.mult(-1);else{let Fe=ye*N.add(ee).mag()/N.sub(ee).mag();J._perp()._mult(Fe*(be?-1:1))}this.addCurrentVertex(D,J,0,0,F),this.addCurrentVertex(D,J.mult(-1),0,0,F)}else if(ve==="bevel"||ve==="fakeround"){let Fe=-Math.sqrt(ye*ye-1),fe=be?Fe:0,je=be?0:Fe;if(U&&this.addCurrentVertex(D,N,fe,je,F),ve==="fakeround"){let Xe=Math.round(180*De/Math.PI/20);for(let Ye=1;Ye2*v){let fe=D.add(k.sub(D)._mult(v/Fe)._round());this.updateDistance(D,fe),this.addCurrentVertex(fe,ee,0,0,F),D=fe}}}}addCurrentVertex(t,i,n,o,c,g=!1){let p=i.y*o-i.x,f=-i.y-i.x*o;this.addHalfVertex(t,i.x+i.y*n,i.y-i.x*n,g,!1,n,c),this.addHalfVertex(t,p,f,g,!0,-o,c),this.distance>Vh/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,i,n,o,c,g))}addHalfVertex({x:t,y:i},n,o,c,g,p,f){let _=.5*(this.lineClips?this.scaledDistance*(Vh-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(c?1:0),(i<<1)+(g?1:0),Math.round(63*n)+128,Math.round(63*o)+128,1+(p===0?0:p<0?-1:1)|(63&_)<<2,_>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let y=f.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,y,this.e2),f.primitiveLength++),g?this.e2=y:this.e1=y}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,i){this.distance+=t.dist(i),this.updateScaledDistance()}hasLineDasharray(t){for(let i of t){let n=i.paint.get("line-dasharray");if(n&&!n.isConstant())return!0}return!1}addLineDashDependencies(t,i,n,o){for(let c of t){let g=c.paint.get("line-dasharray");if(!g||g.value.kind==="constant")continue;let p=c.layout.get("line-cap")==="round",f={dasharray:g.value.evaluate({zoom:n-1},i,{}),round:p},_={dasharray:g.value.evaluate({zoom:n},i,{}),round:p},y={dasharray:g.value.evaluate({zoom:n+1},i,{}),round:p},w=`${f.dasharray.join(",")},${f.round}`,v=`${_.dasharray.join(",")},${_.round}`,F=`${y.dasharray.join(",")},${y.round}`;o.dashDependencies[w]=f,o.dashDependencies[v]=_,o.dashDependencies[F]=y,i.dashes[c.id]={min:w,mid:v,max:F}}}}let qh,$h;Me("LineBucket",Rc,{omit:["layers","patternFeatures"]});var Wh={get paint(){return $h=$h||new _i({"line-opacity":new ze(Ae.paint_line["line-opacity"]),"line-color":new ze(Ae.paint_line["line-color"]),"line-translate":new Pe(Ae.paint_line["line-translate"]),"line-translate-anchor":new Pe(Ae.paint_line["line-translate-anchor"]),"line-width":new ze(Ae.paint_line["line-width"]),"line-gap-width":new ze(Ae.paint_line["line-gap-width"]),"line-offset":new ze(Ae.paint_line["line-offset"]),"line-blur":new ze(Ae.paint_line["line-blur"]),"line-dasharray":new kn(Ae.paint_line["line-dasharray"]),"line-pattern":new kn(Ae.paint_line["line-pattern"]),"line-gradient":new Ts(Ae.paint_line["line-gradient"])})},get layout(){return qh=qh||new _i({"line-cap":new Pe(Ae.layout_line["line-cap"]),"line-join":new ze(Ae.layout_line["line-join"]),"line-miter-limit":new Pe(Ae.layout_line["line-miter-limit"]),"line-round-limit":new Pe(Ae.layout_line["line-round-limit"]),"line-sort-key":new ze(Ae.layout_line["line-sort-key"])})}};class rd extends ze{possiblyEvaluate(t,i){return i=new gt(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),super.possiblyEvaluate(t,i)}evaluate(t,i,n,o){return i=Oi({},i,{zoom:Math.floor(i.zoom)}),super.evaluate(t,i,n,o)}}let xl;class nd extends iA{constructor(t,i){super(t,Wh,i),this.gradientVersion=0,xl||(xl=new rd(Wh.paint.properties["line-width"].specification),xl.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){let i=this.gradientExpression();this.stepInterpolant=!!(function(n){return n._styleExpression!==void 0})(i)&&i._styleExpression.expression instanceof Rt,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,i){super.recalculate(t,i),this.paint._values["line-floorwidth"]=xl.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Rc(t)}queryRadius(t){let i=t,n=eu(Ys("line-width",this,i),Ys("line-gap-width",this,i)),o=Ys("line-offset",this,i);return n/2+Math.abs(o)+yl(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:i,featureState:n,geometry:o,transform:c,pixelsToTileUnits:g}){let p=Ql(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-c.bearingInRadians,g),f=g/2*eu(this.paint.get("line-width").evaluate(i,n),this.paint.get("line-gap-width").evaluate(i,n)),_=this.paint.get("line-offset").evaluate(i,n);return _&&(o=(function(y,w){let v=[];for(let F=0;F=3){for(let U=0;U0?t+2*A:A}let sd=Tt([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),od=Tt([{name:"a_projected_pos",components:3,type:"Float32"}],4);Tt([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let ad=Tt([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Tt([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let tu=Tt([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),ld=Tt([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function cd(A,t,i){return A.sections.forEach((n=>{n.text=(function(o,c,g){let p=c.layout.get("text-transform").evaluate(g,{});return p==="uppercase"?o=o.toLocaleUpperCase():p==="lowercase"&&(o=o.toLocaleLowerCase()),HA.applyArabicShaping&&(o=HA.applyArabicShaping(o)),o})(n.text,t,i)})),A}Tt([{name:"triangle",components:3,type:"Uint16"}]),Tt([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Tt([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),Tt([{type:"Float32",name:"offsetX"}]),Tt([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Tt([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let ua={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};var ri=24;let Nc=4294967296,iu=1/Nc,Au=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");class zc{constructor(t=new Uint8Array(16)){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(t,i,n=this.length){for(;this.pos>3,g=this.pos;this.type=7&o,t(c,i,this),this.pos===g&&this.skip(o)}return i}readMessage(t,i){return this.readFields(t,i,this.readVarint()+this.pos)}readFixed32(){let t=this.dataView.getUint32(this.pos,!0);return this.pos+=4,t}readSFixed32(){let t=this.dataView.getInt32(this.pos,!0);return this.pos+=4,t}readFixed64(){let t=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*Nc;return this.pos+=8,t}readSFixed64(){let t=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*Nc;return this.pos+=8,t}readFloat(){let t=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,t}readDouble(){let t=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,t}readVarint(t){let i=this.buf,n,o;return o=i[this.pos++],n=127&o,o<128?n:(o=i[this.pos++],n|=(127&o)<<7,o<128?n:(o=i[this.pos++],n|=(127&o)<<14,o<128?n:(o=i[this.pos++],n|=(127&o)<<21,o<128?n:(o=i[this.pos],n|=(15&o)<<28,(function(c,g,p){let f=p.buf,_,y;if(y=f[p.pos++],_=(112&y)>>4,y<128||(y=f[p.pos++],_|=(127&y)<<3,y<128)||(y=f[p.pos++],_|=(127&y)<<10,y<128)||(y=f[p.pos++],_|=(127&y)<<17,y<128)||(y=f[p.pos++],_|=(127&y)<<24,y<128)||(y=f[p.pos++],_|=(1&y)<<31,y<128))return Hs(c,_,g);throw new Error("Expected varint not more than 10 bytes")})(n,t,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let t=this.readVarint();return t%2==1?(t+1)/-2:t/2}readBoolean(){return!!this.readVarint()}readString(){let t=this.readVarint()+this.pos,i=this.pos;return this.pos=t,t-i>=12&&Au?Au.decode(this.buf.subarray(i,t)):(function(n,o,c){let g="",p=o;for(;p239?4:f>223?3:f>191?2:1;if(p+F>c)break;F===1?f<128&&(v=f):F===2?(_=n[p+1],(192&_)==128&&(v=(31&f)<<6|63&_,v<=127&&(v=null))):F===3?(_=n[p+1],y=n[p+2],(192&_)==128&&(192&y)==128&&(v=(15&f)<<12|(63&_)<<6|63&y,(v<=2047||v>=55296&&v<=57343)&&(v=null))):F===4&&(_=n[p+1],y=n[p+2],w=n[p+3],(192&_)==128&&(192&y)==128&&(192&w)==128&&(v=(15&f)<<18|(63&_)<<12|(63&y)<<6|63&w,(v<=65535||v>=1114112)&&(v=null))),v===null?(v=65533,F=1):v>65535&&(v-=65536,g+=String.fromCharCode(v>>>10&1023|55296),v=56320|1023&v),g+=String.fromCharCode(v),p+=F}return g})(this.buf,i,t)}readBytes(){let t=this.readVarint()+this.pos,i=this.buf.subarray(this.pos,t);return this.pos=t,i}readPackedVarint(t=[],i){let n=this.readPackedEnd();for(;this.pos127;);else if(i===2)this.pos=this.readVarint()+this.pos;else if(i===5)this.pos+=4;else{if(i!==1)throw new Error(`Unimplemented type: ${i}`);this.pos+=8}}writeTag(t,i){this.writeVarint(t<<3|i)}realloc(t){let i=this.length||16;for(;i268435455||t<0?(function(i,n){let o,c;if(i>=0?(o=i%4294967296|0,c=i/4294967296|0):(o=~(-i%4294967296),c=~(-i/4294967296),4294967295^o?o=o+1|0:(o=0,c=c+1|0)),i>=18446744073709552e3||i<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");n.realloc(10),(function(g,p,f){f.buf[f.pos++]=127&g|128,g>>>=7,f.buf[f.pos++]=127&g|128,g>>>=7,f.buf[f.pos++]=127&g|128,g>>>=7,f.buf[f.pos++]=127&g|128,f.buf[f.pos]=127&(g>>>=7)})(o,0,n),(function(g,p){let f=(7&g)<<4;p.buf[p.pos++]|=f|((g>>>=3)?128:0),g&&(p.buf[p.pos++]=127&g|((g>>>=7)?128:0),g&&(p.buf[p.pos++]=127&g|((g>>>=7)?128:0),g&&(p.buf[p.pos++]=127&g|((g>>>=7)?128:0),g&&(p.buf[p.pos++]=127&g|((g>>>=7)?128:0),g&&(p.buf[p.pos++]=127&g)))))})(c,n)})(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(t){this.writeVarint(t<0?2*-t-1:2*t)}writeBoolean(t){this.writeVarint(+t)}writeString(t){t=String(t),this.realloc(4*t.length),this.pos++;let i=this.pos;this.pos=(function(o,c,g){for(let p,f,_=0;_55295&&p<57344){if(!f){p>56319||_+1===c.length?(o[g++]=239,o[g++]=191,o[g++]=189):f=p;continue}if(p<56320){o[g++]=239,o[g++]=191,o[g++]=189,f=p;continue}p=f-55296<<10|p-56320|65536,f=null}else f&&(o[g++]=239,o[g++]=191,o[g++]=189,f=null);p<128?o[g++]=p:(p<2048?o[g++]=p>>6|192:(p<65536?o[g++]=p>>12|224:(o[g++]=p>>18|240,o[g++]=p>>12&63|128),o[g++]=p>>6&63|128),o[g++]=63&p|128)}return g})(this.buf,t,this.pos);let n=this.pos-i;n>=128&&ru(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n}writeFloat(t){this.realloc(4),this.dataView.setFloat32(this.pos,t,!0),this.pos+=4}writeDouble(t){this.realloc(8),this.dataView.setFloat64(this.pos,t,!0),this.pos+=8}writeBytes(t){let i=t.length;this.writeVarint(i),this.realloc(i);for(let n=0;n=128&&ru(n,o,this),this.pos=n-1,this.writeVarint(o),this.pos+=o}writeMessage(t,i,n){this.writeTag(t,2),this.writeRawMessage(i,n)}writePackedVarint(t,i){i.length&&this.writeMessage(t,hd,i)}writePackedSVarint(t,i){i.length&&this.writeMessage(t,ud,i)}writePackedBoolean(t,i){i.length&&this.writeMessage(t,pd,i)}writePackedFloat(t,i){i.length&&this.writeMessage(t,gd,i)}writePackedDouble(t,i){i.length&&this.writeMessage(t,dd,i)}writePackedFixed32(t,i){i.length&&this.writeMessage(t,fd,i)}writePackedSFixed32(t,i){i.length&&this.writeMessage(t,md,i)}writePackedFixed64(t,i){i.length&&this.writeMessage(t,Bd,i)}writePackedSFixed64(t,i){i.length&&this.writeMessage(t,_d,i)}writeBytesField(t,i){this.writeTag(t,2),this.writeBytes(i)}writeFixed32Field(t,i){this.writeTag(t,5),this.writeFixed32(i)}writeSFixed32Field(t,i){this.writeTag(t,5),this.writeSFixed32(i)}writeFixed64Field(t,i){this.writeTag(t,1),this.writeFixed64(i)}writeSFixed64Field(t,i){this.writeTag(t,1),this.writeSFixed64(i)}writeVarintField(t,i){this.writeTag(t,0),this.writeVarint(i)}writeSVarintField(t,i){this.writeTag(t,0),this.writeSVarint(i)}writeStringField(t,i){this.writeTag(t,2),this.writeString(i)}writeFloatField(t,i){this.writeTag(t,5),this.writeFloat(i)}writeDoubleField(t,i){this.writeTag(t,1),this.writeDouble(i)}writeBooleanField(t,i){this.writeVarintField(t,+i)}}function Hs(A,t,i){return i?4294967296*t+(A>>>0):4294967296*(t>>>0)+(A>>>0)}function ru(A,t,i){let n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));i.realloc(n);for(let o=i.pos-1;o>=A;o--)i.buf[o+n]=i.buf[o]}function hd(A,t){for(let i=0;ip.h-g.h));let n=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),i),h:1/0}],o=0,c=0;for(let g of A)for(let p=n.length-1;p>=0;p--){let f=n[p];if(!(g.w>f.w||g.h>f.h)){if(g.x=f.x,g.y=f.y,c=Math.max(c,g.y+g.h),o=Math.max(o,g.x+g.w),g.w===f.w&&g.h===f.h){let _=n.pop();_&&p=0&&n>=t&&bl[this.text.charCodeAt(n)];n--)i--;this.text=this.text.substring(t,i),this.sectionIndex=this.sectionIndex.slice(t,i)}substring(t,i){let n=new Zs;return n.text=this.text.substring(t,i),n.sectionIndex=this.sectionIndex.slice(t,i),n.sections=this.sections,n}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((t,i)=>Math.max(t,this.sections[i].scale)),0)}getMaxImageSize(t){let i=0,n=0;for(let o=0;o=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function vl(A,t,i,n,o,c,g,p,f,_,y,w,v,F,D){let U=Zs.fromFeature(A,o),k;w===E.ao.vertical&&U.verticalizePunctuation();let{processBidirectionalText:N,processStyledBidirectionalText:ee}=HA;if(N&&U.sections.length===1){k=[];let oe=N(U.toString(),Oc(U,_,c,t,n,F));for(let ge of oe){let ye=new Zs;ye.text=ge,ye.sections=U.sections;for(let De=0;De=0,_=0;for(let w=0;w_){let y=Math.ceil(c/_);o*=y/g,g=y}return{x1:n,y1:o,x2:n+c,y2:o+g}}function gu(A,t,i,n,o,c){let g=A.image,p;if(g.content){let k=g.content,N=g.pixelRatio||1;p=[k[0]/N,k[1]/N,g.displaySize[0]-k[2]/N,g.displaySize[1]-k[3]/N]}let f=t.left*c,_=t.right*c,y,w,v,F;i==="width"||i==="both"?(F=o[0]+f-n[3],w=o[0]+_+n[1]):(F=o[0]+(f+_-g.displaySize[0])/2,w=F+g.displaySize[0]);let D=t.top*c,U=t.bottom*c;return i==="height"||i==="both"?(y=o[1]+D-n[0],v=o[1]+U+n[2]):(y=o[1]+(D+U-g.displaySize[1])/2,v=y+g.displaySize[1]),{image:g,top:y,right:w,bottom:v,left:F,collisionPadding:p}}let Tr=128,sn=32640;function du(A,t){let{expression:i}=t;if(i.kind==="constant")return{kind:"constant",layoutSize:i.evaluate(new gt(A+1))};if(i.kind==="source")return{kind:"source"};{let{zoomStops:n,interpolationType:o}=i,c=0;for(;cg.id)),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let i=this.layers[0]._unevaluatedLayout._values;this.textSizeData=du(this.zoom,i["text-size"]),this.iconSizeData=du(this.zoom,i["icon-size"]);let n=this.layers[0].layout,o=n.get("symbol-sort-key"),c=n.get("symbol-z-order");this.canOverlap=jc(n,"text-overlap","text-allow-overlap")!=="never"||jc(n,"icon-overlap","icon-allow-overlap")!=="never"||n.get("text-ignore-placement")||n.get("icon-ignore-placement"),this.sortFeaturesByKey=c!=="viewport-y"&&!o.isConstant(),this.sortFeaturesByY=(c==="viewport-y"||c==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,n.get("symbol-placement")==="point"&&(this.writingModes=n.get("text-writing-mode").map((g=>E.ao[g]))),this.stateDependentLayerIds=this.layers.filter((g=>g.isStateDependent())).map((g=>g.id)),this.sourceID=t.sourceID}createArrays(){this.text=new Hc(new Nn(this.layers,this.zoom,(t=>/^text/.test(t)))),this.icon=new Hc(new Nn(this.layers,this.zoom,(t=>/^icon/.test(t)))),this.glyphOffsetArray=new Y,this.lineVertexArray=new H,this.symbolInstances=new K,this.textAnchorOffsets=new O}calculateGlyphDependencies(t,i,n,o,c){for(let g=0;g0)&&(g.value.kind!=="constant"||g.value.value.length>0),y=f.value.kind!=="constant"||!!f.value.value||Object.keys(f.parameters).length>0,w=c.get("symbol-sort-key");if(this.features=[],!_&&!y)return;let v=i.iconDependencies,F=i.glyphDependencies,D=i.availableImages,U=new gt(this.zoom);for(let{feature:k,id:N,index:ee,sourceLayerIndex:X}of t){let J=o._featureFilter.needGeometry,oe=Yn(k,J);if(!o._featureFilter.filter(U,oe,n))continue;let ge,ye;if(J||(oe.geometry=zn(k)),_){let xe=o.getValueAndResolveTokens("text-field",oe,n,D),be=Ci.factory(xe),Re=this.hasRTLText=this.hasRTLText||Ud(be);(!Re||HA.getRTLTextPluginStatus()==="unavailable"||Re&&HA.isParsed())&&(ge=cd(be,o,oe))}if(y){let xe=o.getValueAndResolveTokens("icon-image",oe,n,D);ye=xe instanceof Ti?xe:Ti.fromString(xe)}if(!ge&&!ye)continue;let De=this.sortFeaturesByKey?w.evaluate(oe,{},n):void 0;if(this.features.push({id:N,text:ge,icon:ye,index:ee,sourceLayerIndex:X,geometry:oe.geometry,properties:k.properties,type:Xs.types[k.type],sortKey:De}),ye&&(v[ye.name]=!0),ge){let xe=g.evaluate(oe,{},n).join(","),be=c.get("text-rotation-alignment")!=="viewport"&&c.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(E.ao.vertical)>=0;for(let Re of ge.sections)if(Re.image)v[Re.image.name]=!0;else{let ve=Ko(ge.toString()),Fe=Re.fontStack||xe,fe=F[Fe]=F[Fe]||{};this.calculateGlyphDependencies(Re.text,fe,be,this.allowVerticalPlacement,ve)}}}c.get("symbol-placement")==="line"&&(this.features=(function(k){let N={},ee={},X=[],J=0;function oe(xe){X.push(k[xe]),J++}function ge(xe,be,Re){let ve=ee[xe];return delete ee[xe],ee[be]=ve,X[ve].geometry[0].pop(),X[ve].geometry[0]=X[ve].geometry[0].concat(Re[0]),ve}function ye(xe,be,Re){let ve=N[be];return delete N[be],N[xe]=ve,X[ve].geometry[0].shift(),X[ve].geometry[0]=Re[0].concat(X[ve].geometry[0]),ve}function De(xe,be,Re){let ve=Re?be[0][be[0].length-1]:be[0][0];return`${xe}:${ve.x}:${ve.y}`}for(let xe=0;xexe.geometry))})(this.features)),this.sortFeaturesByKey&&this.features.sort(((k,N)=>k.sortKey-N.sortKey))}update(t,i,n){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,i,this.layers,{imagePositions:n}),this.icon.programConfigurations.updatePaintArrays(t,i,this.layers,{imagePositions:n}))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(t,i){let n=this.lineVertexArray.length;if(t.segment!==void 0){let o=t.dist(i[t.segment+1]),c=t.dist(i[t.segment]),g={};for(let p=t.segment+1;p=0;p--)g[p]={x:i[p].x,y:i[p].y,tileUnitDistanceFromAnchor:c},p>0&&(c+=i[p-1].dist(i[p]));for(let p=0;p0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(t,i){let n=t.placedSymbolArray.get(i),o=n.vertexStartIndex+4*n.numGlyphs;for(let c=n.vertexStartIndex;co[p]-o[f]||c[f]-c[p])),g}addToSortKeyRanges(t,i){let n=this.sortKeyRanges[this.sortKeyRanges.length-1];n&&n.sortKey===i?n.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:i,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let i of this.symbolInstanceIndexes){let n=this.symbolInstances.get(i);this.featureSortOrder.push(n.featureIndex),[n.rightJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.leftJustifiedTextSymbolIndex].forEach(((o,c,g)=>{o>=0&&g.indexOf(o)===c&&this.addIndicesForPlacedSymbol(this.text,o)})),n.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,n.verticalPlacedTextSymbolIndex),n.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,n.placedIconSymbolIndex),n.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,n.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let pu,fu;Me("SymbolBucket",Js,{omit:["layers","collisionBoxArray","features","compareText"]}),Js.MAX_GLYPHS=65535,Js.addDynamicAttributes=Xc;var Jc={get paint(){return fu=fu||new _i({"icon-opacity":new ze(Ae.paint_symbol["icon-opacity"]),"icon-color":new ze(Ae.paint_symbol["icon-color"]),"icon-halo-color":new ze(Ae.paint_symbol["icon-halo-color"]),"icon-halo-width":new ze(Ae.paint_symbol["icon-halo-width"]),"icon-halo-blur":new ze(Ae.paint_symbol["icon-halo-blur"]),"icon-translate":new Pe(Ae.paint_symbol["icon-translate"]),"icon-translate-anchor":new Pe(Ae.paint_symbol["icon-translate-anchor"]),"text-opacity":new ze(Ae.paint_symbol["text-opacity"]),"text-color":new ze(Ae.paint_symbol["text-color"],{runtimeType:li,getOverride:A=>A.textColor,hasOverride:A=>!!A.textColor}),"text-halo-color":new ze(Ae.paint_symbol["text-halo-color"]),"text-halo-width":new ze(Ae.paint_symbol["text-halo-width"]),"text-halo-blur":new ze(Ae.paint_symbol["text-halo-blur"]),"text-translate":new Pe(Ae.paint_symbol["text-translate"]),"text-translate-anchor":new Pe(Ae.paint_symbol["text-translate-anchor"])})},get layout(){return pu=pu||new _i({"symbol-placement":new Pe(Ae.layout_symbol["symbol-placement"]),"symbol-spacing":new Pe(Ae.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Pe(Ae.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new ze(Ae.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Pe(Ae.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Pe(Ae.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Pe(Ae.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Pe(Ae.layout_symbol["icon-ignore-placement"]),"icon-optional":new Pe(Ae.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Pe(Ae.layout_symbol["icon-rotation-alignment"]),"icon-size":new ze(Ae.layout_symbol["icon-size"]),"icon-text-fit":new Pe(Ae.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Pe(Ae.layout_symbol["icon-text-fit-padding"]),"icon-image":new ze(Ae.layout_symbol["icon-image"]),"icon-rotate":new ze(Ae.layout_symbol["icon-rotate"]),"icon-padding":new ze(Ae.layout_symbol["icon-padding"]),"icon-keep-upright":new Pe(Ae.layout_symbol["icon-keep-upright"]),"icon-offset":new ze(Ae.layout_symbol["icon-offset"]),"icon-anchor":new ze(Ae.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Pe(Ae.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Pe(Ae.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Pe(Ae.layout_symbol["text-rotation-alignment"]),"text-field":new ze(Ae.layout_symbol["text-field"]),"text-font":new ze(Ae.layout_symbol["text-font"]),"text-size":new ze(Ae.layout_symbol["text-size"]),"text-max-width":new ze(Ae.layout_symbol["text-max-width"]),"text-line-height":new Pe(Ae.layout_symbol["text-line-height"]),"text-letter-spacing":new ze(Ae.layout_symbol["text-letter-spacing"]),"text-justify":new ze(Ae.layout_symbol["text-justify"]),"text-radial-offset":new ze(Ae.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Pe(Ae.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new ze(Ae.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new ze(Ae.layout_symbol["text-anchor"]),"text-max-angle":new Pe(Ae.layout_symbol["text-max-angle"]),"text-writing-mode":new Pe(Ae.layout_symbol["text-writing-mode"]),"text-rotate":new ze(Ae.layout_symbol["text-rotate"]),"text-padding":new Pe(Ae.layout_symbol["text-padding"]),"text-keep-upright":new Pe(Ae.layout_symbol["text-keep-upright"]),"text-transform":new ze(Ae.layout_symbol["text-transform"]),"text-offset":new ze(Ae.layout_symbol["text-offset"]),"text-allow-overlap":new Pe(Ae.layout_symbol["text-allow-overlap"]),"text-overlap":new Pe(Ae.layout_symbol["text-overlap"]),"text-ignore-placement":new Pe(Ae.layout_symbol["text-ignore-placement"]),"text-optional":new Pe(Ae.layout_symbol["text-optional"])})}};class mu{constructor(t){if(t.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=t.property.overrides?t.property.overrides.runtimeType:fi,this.defaultValue=t}evaluate(t){if(t.formattedSection){let i=this.defaultValue.property.overrides;if(i&&i.hasOverride(t.formattedSection))return i.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Me("FormatSectionOverride",mu,{omit:["defaultValue"]});class Dl extends iA{constructor(t,i){super(t,Jc,i)}recalculate(t,i){if(super.recalculate(t,i),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let n=this.layout.get("text-writing-mode");if(n){let o=[];for(let c of n)o.indexOf(c)<0&&o.push(c);this.layout._values["text-writing-mode"]=o}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,i,n,o){let c=this.layout.get(t).evaluate(i,{},n,o),g=this._unevaluatedLayout._values[t];return g.isDataDriven()||ys(g.value)||!c?c:(function(p,f){return f.replace(/{([^{}]+)}/g,((_,y)=>p&&y in p?String(p[y]):""))})(i.properties,c)}createBucket(t){return new Js(t)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let t of Jc.paint.overridableProperties){if(!Dl.hasPaintOverride(this.layout,t))continue;let i=this.paint.get(t),n=new mu(i),o=new Do(n,i.property.specification),c=null;c=i.value.kind==="constant"||i.value.kind==="source"?new bn("source",o):new So("composite",o,i.value.zoomStops),this.paint._values[t]=new mA(i.property,c,i.parameters)}}_handleOverridablePaintPropertyUpdate(t,i,n){return!(!this.layout||i.isDataDriven()||n.isDataDriven())&&Dl.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,i){let n=t.get("text-field"),o=Jc.paint.properties[i],c=!1,g=p=>{for(let f of p)if(o.overrides&&o.overrides.hasOverride(f))return void(c=!0)};if(n.value.kind==="constant"&&n.value.value instanceof Ci)g(n.value.value.sections);else if(n.value.kind==="source"||n.value.kind==="composite"){let p=_=>{c||(_ instanceof QA&&Ke(_.value)===zA?g(_.value.sections):_ instanceof pr?g(_.sections):_.eachChild(p))},f=n.value;f._styleExpression&&p(f._styleExpression.expression)}return c}}let Bu;var Td={get paint(){return Bu=Bu||new _i({"background-color":new Pe(Ae.paint_background["background-color"]),"background-pattern":new pl(Ae.paint_background["background-pattern"]),"background-opacity":new Pe(Ae.paint_background["background-opacity"])})}};class Ld extends iA{constructor(t,i){super(t,Td,i)}}let _u;var kd={get paint(){return _u=_u||new _i({"raster-opacity":new Pe(Ae.paint_raster["raster-opacity"]),"raster-hue-rotate":new Pe(Ae.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Pe(Ae.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Pe(Ae.paint_raster["raster-brightness-max"]),"raster-saturation":new Pe(Ae.paint_raster["raster-saturation"]),"raster-contrast":new Pe(Ae.paint_raster["raster-contrast"]),"raster-resampling":new Pe(Ae.paint_raster["raster-resampling"]),"raster-fade-duration":new Pe(Ae.paint_raster["raster-fade-duration"])})}};class Gd extends iA{constructor(t,i){super(t,kd,i)}}class Pd extends iA{constructor(t,i){super(t,{},i),this.onAdd=n=>{this.implementation.onAdd&&this.implementation.onAdd(n,n.painter.context.gl)},this.onRemove=n=>{this.implementation.onRemove&&this.implementation.onRemove(n,n.painter.context.gl)},this.implementation=t}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class Rd{constructor(t){this._methodToThrottle=t,this._triggered=!1,typeof MessageChannel!="undefined"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._methodToThrottle()}),0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let Nd={once:!0},Vc=63710088e-1;class on{constructor(t,i){if(isNaN(t)||isNaN(i))throw new Error(`Invalid LngLat object: (${t}, ${i})`);if(this.lng=+t,this.lat=+i,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new on(Gr(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){let i=Math.PI/180,n=this.lat*i,o=t.lat*i,c=Math.sin(n)*Math.sin(o)+Math.cos(n)*Math.cos(o)*Math.cos((t.lng-this.lng)*i);return Vc*Math.acos(Math.min(c,1))}static convert(t){if(t instanceof on)return t;if(Array.isArray(t)&&(t.length===2||t.length===3))return new on(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&typeof t=="object"&&t!==null)return new on(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let yu=2*Math.PI*Vc;function Qu(A){return yu*Math.cos(A*Math.PI/180)}function Cu(A){return(180+A)/360}function wu(A){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+A*Math.PI/360)))/360}function Iu(A,t){return A/Qu(t)}function qc(A){return 360/Math.PI*Math.atan(Math.exp((180-360*A)*Math.PI/180))-90}function Eu(A,t){return A*Qu(qc(t))}class da{constructor(t,i,n=0){this.x=+t,this.y=+i,this.z=+n}static fromLngLat(t,i=0){let n=on.convert(t);return new da(Cu(n.lng),wu(n.lat),Iu(i,n.lat))}toLngLat(){return new on(360*this.x-180,qc(this.y))}toAltitude(){return Eu(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/yu*(t=qc(this.y),1/Math.cos(t*Math.PI/180));var t}}function xu(A,t,i){var n=2*Math.PI*6378137/256/Math.pow(2,i);return[A*n-2*Math.PI*6378137/2,t*n-2*Math.PI*6378137/2]}class $c{constructor(t,i,n){if(!(function(o,c,g){return!(o<0||o>25||g<0||g>=Math.pow(2,o)||c<0||c>=Math.pow(2,o))})(t,i,n))throw new Error(`x=${i}, y=${n}, z=${t} outside of bounds. 0<=x<${Math.pow(2,t)}, 0<=y<${Math.pow(2,t)} 0<=z<=25 `);this.z=t,this.x=i,this.y=n,this.key=Vs(0,t,t,i,n)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,i,n){let o=(g=this.y,p=this.z,f=xu(256*(c=this.x),256*(g=Math.pow(2,p)-g-1),p),_=xu(256*(c+1),256*(g+1),p),f[0]+","+f[1]+","+_[0]+","+_[1]);var c,g,p,f,_;let y=(function(w,v,F){let D,U="";for(let k=w;k>0;k--)D=1<1?"@2x":"").replace(/{quadkey}/g,y).replace(/{bbox-epsg-3857}/g,o)}isChildOf(t){let i=this.z-t.z;return i>0&&t.x===this.x>>i&&t.y===this.y>>i}getTilePoint(t){let i=Math.pow(2,this.z);return new ue((t.x*i-this.x)*dt,(t.y*i-this.y)*dt)}toString(){return`${this.z}/${this.x}/${this.y}`}}class vu{constructor(t,i){this.wrap=t,this.canonical=i,this.key=Vs(t,i.z,i.z,i.x,i.y)}}class AA{constructor(t,i,n,o,c){if(this.terrainRttPosMatrix32f=null,t= z; overscaledZ = ${t}; z = ${n}`);this.overscaledZ=t,this.wrap=i,this.canonical=new $c(n,+o,+c),this.key=Vs(i,t,n,o,c)}clone(){return new AA(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);let i=this.canonical.z-t;return t>this.canonical.z?new AA(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new AA(t,this.wrap,t,this.canonical.x>>i,this.canonical.y>>i)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(t,i){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);let n=this.canonical.z-t;return t>this.canonical.z?Vs(this.wrap*+i,t,this.canonical.z,this.canonical.x,this.canonical.y):Vs(this.wrap*+i,t,t,this.canonical.x>>n,this.canonical.y>>n)}isChildOf(t){if(t.wrap!==this.wrap||this.overscaledZ-t.overscaledZ<=0)return!1;if(t.overscaledZ===0)return this.overscaledZ>0;let i=this.canonical.z-t.canonical.z;return!(i<0)&&t.canonical.x===this.canonical.x>>i&&t.canonical.y===this.canonical.y>>i}children(t){if(this.overscaledZ>=t)return[new AA(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let i=this.canonical.z+1,n=2*this.canonical.x,o=2*this.canonical.y;return[new AA(i,this.wrap,i,n,o),new AA(i,this.wrap,i,n+1,o),new AA(i,this.wrap,i,n,o+1),new AA(i,this.wrap,i,n+1,o+1)]}isLessThan(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.ythis.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(t){return this.expandBy(-t)}map(t){let i=new jn;return i.extend(t(new ue(this.minX,this.minY))),i.extend(t(new ue(this.maxX,this.minY))),i.extend(t(new ue(this.minX,this.maxY))),i.extend(t(new ue(this.maxX,this.maxY))),i}static fromPoints(t){let i=new jn;for(let n of t)i.extend(n);return i}contains(t){return t.x>=this.minX&&t.x<=this.maxX&&t.y>=this.minY&&t.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(t){return!this.empty()&&!t.empty()&&t.minX>=this.minX&&t.maxX<=this.maxX&&t.minY>=this.minY&&t.maxY<=this.maxY}intersects(t){return!this.empty()&&!t.empty()&&t.minX<=this.maxX&&t.maxX>=this.minX&&t.minY<=this.maxY&&t.maxY>=this.minY}}class bu{constructor(t){this._stringToNumber={},this._numberToString=[];for(let i=0;i=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${t} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[t]}}class Fu{constructor(t,i,n,o,c){this.type="Feature",this._vectorTileFeature=t,t._z=i,t._x=n,t._y=o,this.properties=t.properties,this.id=c}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(t){this._geometry=t}toJSON(){let t={geometry:this.geometry};for(let i in this)i!=="_geometry"&&i!=="_vectorTileFeature"&&(t[i]=this[i]);return t}}class Du{constructor(t,i){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new xr(dt,16,0),this.grid3D=new xr(dt,16,0),this.featureIndexArray=new ce,this.promoteId=i}insert(t,i,n,o,c,g){let p=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(n,o,c);let f=g?this.grid3D:this.grid;for(let _=0;_=0&&w[3]>=0&&f.insert(p,w[0],w[1],w[2],w[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Xh(new zc(this.rawTileData)).layers,this.sourceLayerCoder=new bu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(t,i,n,o){this.loadVTLayers();let c=t.params,g=dt/t.tileSize/t.scale,p=Cr(c.filter,c.globalState),f=t.queryGeometry,_=t.queryPadding*g,y=jn.fromPoints(f),w=this.grid.query(y.minX-_,y.minY-_,y.maxX+_,y.maxY+_),v=jn.fromPoints(t.cameraQueryGeometry).expandBy(_),F=this.grid3D.query(v.minX,v.minY,v.maxX,v.maxY,((k,N,ee,X)=>(function(J,oe,ge,ye,De){for(let be of J)if(oe<=be.x&&ge<=be.y&&ye>=be.x&&De>=be.y)return!0;let xe=[new ue(oe,ge),new ue(oe,De),new ue(ye,De),new ue(ye,ge)];if(J.length>2){for(let be of xe)if(zs(J,be))return!0}for(let be=0;be(X||(X=zn(J)),oe.queryIntersectsFeature({queryGeometry:f,feature:J,featureState:ge,geometry:X,zoom:this.z,transform:t.transform,pixelsToTileUnits:g,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation}))))}return D}loadMatchingFeature(t,i,n,o,c,g,p,f,_,y,w){let v=this.bucketLayerIDs[i];if(g&&!v.some((k=>g.has(k))))return;let F=this.sourceLayerCoder.decode(n),D=this.vtLayers[F].feature(o);if(c.needGeometry){let k=Yn(D,!0);if(!c.filter(new gt(this.tileID.overscaledZ),k,this.tileID.canonical))return}else if(!c.filter(new gt(this.tileID.overscaledZ),D))return;let U=this.getId(D,F);for(let k=0;k{let p=t instanceof Us?t.get(g):null;return p&&p.evaluate?p.evaluate(i,n,o):p}))}function zd(A,t){return t-A}function Mu(A,t,i,n,o){let c=[];for(let g=0;g=n&&w.x>=n||(y.x>=n?y=new ue(n,y.y+(n-y.x)/(w.x-y.x)*(w.y-y.y))._round():w.x>=n&&(w=new ue(n,y.y+(n-y.x)/(w.x-y.x)*(w.y-y.y))._round()),y.y>=o&&w.y>=o||(y.y>=o?y=new ue(y.x+(o-y.y)/(w.y-y.y)*(w.x-y.x),o)._round():w.y>=o&&(w=new ue(y.x+(o-y.y)/(w.y-y.y)*(w.x-y.x),o)._round()),f&&y.equals(f[f.length-1])||(f=[y],c.push(f)),f.push(w)))))}}return c}Me("FeatureIndex",Du,{omit:["rawTileData","sourceLayerCoder"]});class an extends ue{constructor(t,i,n,o){super(t,i),this.angle=n,o!==void 0&&(this.segment=o)}clone(){return new an(this.x,this.y,this.angle,this.segment)}}function Uu(A,t,i,n,o){if(t.segment===void 0||i===0)return!0;let c=t,g=t.segment+1,p=0;for(;p>-i/2;){if(g--,g<0)return!1;p-=A[g].dist(c),c=A[g]}p+=A[g].dist(A[g+1]),g++;let f=[],_=0;for(;pn;)_-=f.shift().angleDelta;if(_>o)return!1;g++,p+=y.dist(w)}return!0}function Tu(A){let t=0;for(let i=0;i_){let D=(_-f)/F,U=fA.number(w.x,v.x,D),k=fA.number(w.y,v.y,D),N=new an(U,k,v.angleTo(w),y);return N._round(),!g||Uu(A,N,p,g,t)?N:void 0}f+=F}}function Od(A,t,i,n,o,c,g,p,f){let _=Lu(n,c,g),y=ku(n,o),w=y*g,v=A[0].x===0||A[0].x===f||A[0].y===0||A[0].y===f;return t-w=0&&J=0&&oe=0&&v+_<=y){let ge=new an(J,oe,ee,D);ge._round(),n&&!Uu(A,ge,c,n,o)||F.push(ge)}}w+=N}return p||F.length||g||(F=Gu(A,w/2,i,n,o,c,g,!0,f)),F}function Pu(A,t,i,n){let o=[],c=A.image,g=c.pixelRatio,p=c.paddedRect.w-2,f=c.paddedRect.h-2,_={x1:A.left,y1:A.top,x2:A.right,y2:A.bottom},y=c.stretchX||[[0,p]],w=c.stretchY||[[0,f]],v=(fe,je)=>fe+je[1]-je[0],F=y.reduce(v,0),D=w.reduce(v,0),U=p-F,k=f-D,N=0,ee=F,X=0,J=D,oe=0,ge=U,ye=0,De=k;if(c.content&&n){let fe=c.content,je=fe[2]-fe[0],Xe=fe[3]-fe[1];(c.textFitWidth||c.textFitHeight)&&(_=uu(A)),N=Sl(y,0,fe[0]),X=Sl(w,0,fe[1]),ee=Sl(y,fe[0],fe[2]),J=Sl(w,fe[1],fe[3]),oe=fe[0]-N,ye=fe[1]-X,ge=je-ee,De=Xe-J}let xe=_.x1,be=_.y1,Re=_.x2-xe,ve=_.y2-be,Fe=(fe,je,Xe,Ye)=>{let Ge=Ml(fe.stretch-N,ee,Re,xe),st=Ul(fe.fixed-oe,ge,fe.stretch,F),Lt=Ml(je.stretch-X,J,ve,be),ei=Ul(je.fixed-ye,De,je.stretch,D),Qi=Ml(Xe.stretch-N,ee,Re,xe),rA=Ul(Xe.fixed-oe,ge,Xe.stretch,F),Ni=Ml(Ye.stretch-X,J,ve,be),ui=Ul(Ye.fixed-ye,De,Ye.stretch,D),Mt=new ue(Ge,Lt),ni=new ue(Qi,Lt),gi=new ue(Qi,Ni),di=new ue(Ge,Ni),Si=new ue(st/g,ei/g),nA=new ue(rA/g,ui/g),si=t*Math.PI/180;if(si){let oi=Math.sin(si),ai=Math.cos(si),Jt=[ai,-oi,oi,ai];Mt._matMult(Jt),ni._matMult(Jt),di._matMult(Jt),gi._matMult(Jt)}let zi=fe.stretch+fe.fixed,ti=je.stretch+je.fixed;return{tl:Mt,tr:ni,bl:di,br:gi,tex:{x:c.paddedRect.x+1+zi,y:c.paddedRect.y+1+ti,w:Xe.stretch+Xe.fixed-zi,h:Ye.stretch+Ye.fixed-ti},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Si,pixelOffsetBR:nA,minFontScaleX:ge/g/Re,minFontScaleY:De/g/ve,isSDF:i}};if(n&&(c.stretchX||c.stretchY)){let fe=Ru(y,U,F),je=Ru(w,k,D);for(let Xe=0;Xe0&&(U=Math.max(10,U),this.circleDiameter=U)}else{let v=!((w=g.image)===null||w===void 0)&&w.content&&(g.image.textFitWidth||g.image.textFitHeight)?uu(g):{x1:g.left,y1:g.top,x2:g.right,y2:g.bottom};v.y1=v.y1*p-f[0],v.y2=v.y2*p+f[2],v.x1=v.x1*p-f[3],v.x2=v.x2*p+f[1];let F=g.collisionPadding;if(F&&(v.x1-=F[0]*p,v.y1-=F[1]*p,v.x2+=F[2]*p,v.y2+=F[3]*p),y){let D=new ue(v.x1,v.y1),U=new ue(v.x2,v.y1),k=new ue(v.x1,v.y2),N=new ue(v.x2,v.y2),ee=y*Math.PI/180;D._rotate(ee),U._rotate(ee),k._rotate(ee),N._rotate(ee),v.x1=Math.min(D.x,U.x,k.x,N.x),v.x2=Math.max(D.x,U.x,k.x,N.x),v.y1=Math.min(D.y,U.y,k.y,N.y),v.y2=Math.max(D.y,U.y,k.y,N.y)}t.emplaceBack(i.x,i.y,v.x1,v.y1,v.x2,v.y2,n,o,c)}this.boxEndIndex=t.length}}class Kd{constructor(t=[],i=(n,o)=>no?1:0){if(this.data=t,this.length=this.data.length,this.compare=i,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;let t=this.data[0],i=this.data.pop();return--this.length>0&&(this.data[0]=i,this._down(0)),t}peek(){return this.data[0]}_up(t){let{data:i,compare:n}=this,o=i[t];for(;t>0;){let c=t-1>>1,g=i[c];if(n(o,g)>=0)break;i[t]=g,t=c}i[t]=o}_down(t){let{data:i,compare:n}=this,o=this.length>>1,c=i[t];for(;t=0)break;i[t]=i[g],t=g}i[t]=c}}function jd(A,t=1,i=!1){let n=jn.fromPoints(A[0]),o=Math.min(n.width(),n.height()),c=o/2,g=new Kd([],Xd),{minX:p,minY:f,maxX:_,maxY:y}=n;if(o===0)return new ue(p,f);for(let F=p;F<_;F+=o)for(let D=f;Dw.d||!w.d)&&(w=F,i&&console.log("found best %d after %d probes",Math.round(1e4*F.d)/1e4,v)),F.max-w.d<=t||(c=F.h/2,g.push(new qs(F.p.x-c,F.p.y-c,c,A)),g.push(new qs(F.p.x+c,F.p.y-c,c,A)),g.push(new qs(F.p.x-c,F.p.y+c,c,A)),g.push(new qs(F.p.x+c,F.p.y+c,c,A)),v+=4)}return i&&(console.log(`num probes: ${v}`),console.log(`best distance: ${w.d}`)),w.p}function Xd(A,t){return t.max-A.max}function qs(A,t,i,n){this.p=new ue(A,t),this.h=i,this.d=(function(o,c){let g=!1,p=1/0;for(let f=0;fo.y!=D.y>o.y&&o.x<(D.x-F.x)*(o.y-F.y)/(D.y-F.y)+F.x&&(g=!g),p=Math.min(p,wh(o,F,D))}}return(g?1:-1)*Math.sqrt(p)})(this.p,n),this.max=this.d+this.h*Math.SQRT2}var yi;E.aE=void 0,(yi=E.aE||(E.aE={}))[yi.center=1]="center",yi[yi.left=2]="left",yi[yi.right=3]="right",yi[yi.top=4]="top",yi[yi.bottom=5]="bottom",yi[yi["top-left"]=6]="top-left",yi[yi["top-right"]=7]="top-right",yi[yi["bottom-left"]=8]="bottom-left",yi[yi["bottom-right"]=9]="bottom-right";let Wc=Number.POSITIVE_INFINITY;function Nu(A,t){return t[1]!==Wc?(function(i,n,o){let c=0,g=0;switch(n=Math.abs(n),o=Math.abs(o),i){case"top-right":case"top-left":case"top":g=o-7;break;case"bottom-right":case"bottom-left":case"bottom":g=7-o}switch(i){case"top-right":case"bottom-right":case"right":c=-n;break;case"top-left":case"bottom-left":case"left":c=n}return[c,g]})(A,t[0],t[1]):(function(i,n){let o=0,c=0;n<0&&(n=0);let g=n/Math.SQRT2;switch(i){case"top-right":case"top-left":c=g-7;break;case"bottom-right":case"bottom-left":c=7-g;break;case"bottom":c=7-n;break;case"top":c=n-7}switch(i){case"top-right":case"bottom-right":o=-g;break;case"top-left":case"bottom-left":o=g;break;case"left":o=n;break;case"right":o=-n}return[o,c]})(A,t[0])}function zu(A,t,i){var n;let o=A.layout,c=(n=o.get("text-variable-anchor-offset"))===null||n===void 0?void 0:n.evaluate(t,{},i);if(c){let p=c.values,f=[];for(let _=0;_v*ri));y.startsWith("top")?w[1]-=7:y.startsWith("bottom")&&(w[1]+=7),f[_+1]=w}return new Ii(f)}let g=o.get("text-variable-anchor");if(g){let p;p=A._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[o.get("text-radial-offset").evaluate(t,{},i)*ri,Wc]:o.get("text-offset").evaluate(t,{},i).map((_=>_*ri));let f=[];for(let _ of g)f.push(_,Nu(_,p));return new Ii(f)}return null}function eh(A){switch(A){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Hd(A,t,i,n,o,c,g,p,f,_,y,w){let v=c.textMaxSize.evaluate(t,{});v===void 0&&(v=g);let F=A.layers[0].layout,D=F.get("icon-offset").evaluate(t,{},y),U=Ou(i.horizontal),k=g/24,N=A.tilePixelRatio*k,ee=A.tilePixelRatio*v/24,X=A.tilePixelRatio*p,J=A.tilePixelRatio*F.get("symbol-spacing"),oe=F.get("text-padding")*A.tilePixelRatio,ge=(function(Xe,Ye,Ge,st=1){let Lt=Xe.get("icon-padding").evaluate(Ye,{},Ge),ei=Lt&&Lt.values;return[ei[0]*st,ei[1]*st,ei[2]*st,ei[3]*st]})(F,t,y,A.tilePixelRatio),ye=F.get("text-max-angle")/180*Math.PI,De=F.get("text-rotation-alignment")!=="viewport"&&F.get("symbol-placement")!=="point",xe=F.get("icon-rotation-alignment")==="map"&&F.get("symbol-placement")!=="point",be=F.get("symbol-placement"),Re=J/2,ve=F.get("icon-text-fit"),Fe;n&&ve!=="none"&&(A.allowVerticalPlacement&&i.vertical&&(Fe=gu(n,i.vertical,ve,F.get("icon-text-fit-padding"),D,k)),U&&(n=gu(n,U,ve,F.get("icon-text-fit-padding"),D,k)));let fe=y?w.line.getGranularityForZoomLevel(y.z):1,je=(Xe,Ye)=>{Ye.x<0||Ye.x>=dt||Ye.y<0||Ye.y>=dt||(function(Ge,st,Lt,ei,Qi,rA,Ni,ui,Mt,ni,gi,di,Si,nA,si,zi,ti,oi,ai,Jt,vt,vA,$s,bA,Vd){let Ws=Ge.addToLineVertexArray(st,Lt),Xn,eo,to,io,Hu=0,Zu=0,Ju=0,Vu=0,ah=-1,lh=-1,Lr={},qu=EA("");if(Ge.allowVerticalPlacement&&ei.vertical){let vi=ui.layout.get("text-rotate").evaluate(vt,{},bA)+90;to=new Tl(Mt,st,ni,gi,di,ei.vertical,Si,nA,si,vi),Ni&&(io=new Tl(Mt,st,ni,gi,di,Ni,ti,oi,si,vi))}if(Qi){let vi=ui.layout.get("icon-rotate").evaluate(vt,{}),sA=ui.layout.get("icon-text-fit")!=="none",Hn=Pu(Qi,vi,$s,sA),DA=Ni?Pu(Ni,vi,$s,sA):void 0;eo=new Tl(Mt,st,ni,gi,di,Qi,ti,oi,!1,vi),Hu=4*Hn.length;let Zn=Ge.iconSizeData,$A=null;Zn.kind==="source"?($A=[Tr*ui.layout.get("icon-size").evaluate(vt,{})],$A[0]>sn&&zt(`${Ge.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):Zn.kind==="composite"&&($A=[Tr*vA.compositeIconSizes[0].evaluate(vt,{},bA),Tr*vA.compositeIconSizes[1].evaluate(vt,{},bA)],($A[0]>sn||$A[1]>sn)&&zt(`${Ge.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),Ge.addSymbols(Ge.icon,Hn,$A,Jt,ai,vt,E.ao.none,st,Ws.lineStartIndex,Ws.lineLength,-1,bA),ah=Ge.icon.placedSymbolArray.length-1,DA&&(Zu=4*DA.length,Ge.addSymbols(Ge.icon,DA,$A,Jt,ai,vt,E.ao.vertical,st,Ws.lineStartIndex,Ws.lineLength,-1,bA),lh=Ge.icon.placedSymbolArray.length-1)}let $u=Object.keys(ei.horizontal);for(let vi of $u){let sA=ei.horizontal[vi];if(!Xn){qu=EA(sA.text);let DA=ui.layout.get("text-rotate").evaluate(vt,{},bA);Xn=new Tl(Mt,st,ni,gi,di,sA,Si,nA,si,DA)}let Hn=sA.positionedLines.length===1;if(Ju+=Yu(Ge,st,sA,rA,ui,si,vt,zi,Ws,ei.vertical?E.ao.horizontal:E.ao.horizontalOnly,Hn?$u:[vi],Lr,ah,vA,bA),Hn)break}ei.vertical&&(Vu+=Yu(Ge,st,ei.vertical,rA,ui,si,vt,zi,Ws,E.ao.vertical,["vertical"],Lr,lh,vA,bA));let qd=Xn?Xn.boxStartIndex:Ge.collisionBoxArray.length,$d=Xn?Xn.boxEndIndex:Ge.collisionBoxArray.length,Wd=to?to.boxStartIndex:Ge.collisionBoxArray.length,ep=to?to.boxEndIndex:Ge.collisionBoxArray.length,tp=eo?eo.boxStartIndex:Ge.collisionBoxArray.length,ip=eo?eo.boxEndIndex:Ge.collisionBoxArray.length,Ap=io?io.boxStartIndex:Ge.collisionBoxArray.length,rp=io?io.boxEndIndex:Ge.collisionBoxArray.length,FA=-1,kl=(vi,sA)=>vi&&vi.circleDiameter?Math.max(vi.circleDiameter,sA):sA;FA=kl(Xn,FA),FA=kl(to,FA),FA=kl(eo,FA),FA=kl(io,FA);let Wu=FA>-1?1:0;Wu&&(FA*=Vd/ri),Ge.glyphOffsetArray.length>=Js.MAX_GLYPHS&&zt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),vt.sortKey!==void 0&&Ge.addToSortKeyRanges(Ge.symbolInstances.length,vt.sortKey);let np=zu(ui,vt,bA),[sp,op]=(function(vi,sA){let Hn=vi.length,DA=sA==null?void 0:sA.values;if((DA==null?void 0:DA.length)>0)for(let Zn=0;Zn=0?Lr.right:-1,Lr.center>=0?Lr.center:-1,Lr.left>=0?Lr.left:-1,Lr.vertical||-1,ah,lh,qu,qd,$d,Wd,ep,tp,ip,Ap,rp,ni,Ju,Vu,Hu,Zu,Wu,0,Si,FA,sp,op)})(A,Ye,Xe,i,n,o,Fe,A.layers[0],A.collisionBoxArray,t.index,t.sourceLayerIndex,A.index,N,[oe,oe,oe,oe],De,f,X,ge,xe,D,t,c,_,y,g)};if(be==="line")for(let Xe of Mu(t.geometry,0,0,dt,dt)){let Ye=Kn(Xe,fe),Ge=Od(Ye,J,ye,i.vertical||U,n,24,ee,A.overscaling,dt);for(let st of Ge)U&&Zd(A,U.text,Re,st)||je(Ye,st)}else if(be==="line-center"){for(let Xe of t.geometry)if(Xe.length>1){let Ye=Kn(Xe,fe),Ge=Yd(Ye,ye,i.vertical||U,n,24,ee);Ge&&je(Ye,Ge)}}else if(t.type==="Polygon")for(let Xe of wn(t.geometry,0)){let Ye=jd(Xe,16);je(Kn(Xe[0],fe,!0),new an(Ye.x,Ye.y,0))}else if(t.type==="LineString")for(let Xe of t.geometry){let Ye=Kn(Xe,fe);je(Ye,new an(Ye[0].x,Ye[0].y,0))}else if(t.type==="Point")for(let Xe of t.geometry)for(let Ye of Xe)je([Ye],new an(Ye.x,Ye.y,0))}function Yu(A,t,i,n,o,c,g,p,f,_,y,w,v,F,D){let U=(function(ee,X,J,oe,ge,ye,De,xe){let be=oe.layout.get("text-rotate").evaluate(ye,{})*Math.PI/180,Re=[];for(let ve of X.positionedLines)for(let Fe of ve.positionedGlyphs){if(!Fe.rect)continue;let fe=Fe.rect||{},je=4,Xe=!0,Ye=1,Ge=0,st=(ge||xe)&&Fe.vertical,Lt=Fe.metrics.advance*Fe.scale/2;if(xe&&X.verticalizable&&(Ge=ve.lineOffset/2-(Fe.imageName?-(ri-Fe.metrics.width*Fe.scale)/2:(Fe.scale-1)*ri)),Fe.imageName){let oi=De[Fe.imageName];Xe=oi.sdf,Ye=oi.pixelRatio,je=1/Ye}let ei=ge?[Fe.x+Lt,Fe.y]:[0,0],Qi=ge?[0,0]:[Fe.x+Lt+J[0],Fe.y+J[1]-Ge],rA=[0,0];st&&(rA=Qi,Qi=[0,0]);let Ni=Fe.metrics.isDoubleResolution?2:1,ui=(Fe.metrics.left-je)*Fe.scale-Lt+Qi[0],Mt=(-Fe.metrics.top-je)*Fe.scale+Qi[1],ni=ui+fe.w/Ni*Fe.scale/Ye,gi=Mt+fe.h/Ni*Fe.scale/Ye,di=new ue(ui,Mt),Si=new ue(ni,Mt),nA=new ue(ui,gi),si=new ue(ni,gi);if(st){let oi=new ue(-Lt,Lt- -17),ai=-Math.PI/2,Jt=12-Lt,vt=new ue(22-Jt,-(Fe.imageName?Jt:0)),vA=new ue(...rA);di._rotateAround(ai,oi)._add(vt)._add(vA),Si._rotateAround(ai,oi)._add(vt)._add(vA),nA._rotateAround(ai,oi)._add(vt)._add(vA),si._rotateAround(ai,oi)._add(vt)._add(vA)}if(be){let oi=Math.sin(be),ai=Math.cos(be),Jt=[ai,-oi,oi,ai];di._matMult(Jt),Si._matMult(Jt),nA._matMult(Jt),si._matMult(Jt)}let zi=new ue(0,0),ti=new ue(0,0);Re.push({tl:di,tr:Si,bl:nA,br:si,tex:fe,writingMode:X.writingMode,glyphOffset:ei,sectionIndex:Fe.sectionIndex,isSDF:Xe,pixelOffsetTL:zi,pixelOffsetBR:ti,minFontScaleX:0,minFontScaleY:0})}return Re})(0,i,p,o,c,g,n,A.allowVerticalPlacement),k=A.textSizeData,N=null;k.kind==="source"?(N=[Tr*o.layout.get("text-size").evaluate(g,{})],N[0]>sn&&zt(`${A.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):k.kind==="composite"&&(N=[Tr*F.compositeTextSizes[0].evaluate(g,{},D),Tr*F.compositeTextSizes[1].evaluate(g,{},D)],(N[0]>sn||N[1]>sn)&&zt(`${A.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),A.addSymbols(A.text,U,N,p,c,g,_,t,f.lineStartIndex,f.lineLength,v,D);for(let ee of y)w[ee]=A.text.placedSymbolArray.length-1;return 4*U.length}function Ou(A){for(let t in A)return A[t];return null}function Zd(A,t,i,n){let o=A.compareText;if(t in o){let c=o[t];for(let g=c.length-1;g>=0;g--)if(n.dist(c[g])>4;if(o!==1)throw new Error(`Got v${o} data when expected v1.`);let c=Ku[15&n];if(!c)throw new Error("Unrecognized array type.");let[g]=new Uint16Array(t,2,1),[p]=new Uint32Array(t,4,1);return new th(p,g,c,t)}constructor(t,i=64,n=Float64Array,o){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+i,2),65535),this.ArrayType=n,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let c=Ku.indexOf(this.ArrayType),g=2*t*this.ArrayType.BYTES_PER_ELEMENT,p=t*this.IndexArrayType.BYTES_PER_ELEMENT,f=(8-p%8)%8;if(c<0)throw new Error(`Unexpected typed array class: ${n}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+p+f,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+g+p+f),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+p+f,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+c]),new Uint16Array(this.data,2,1)[0]=i,new Uint32Array(this.data,4,1)[0]=t)}add(t,i){let n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=t,this.coords[this._pos++]=i,n}finish(){let t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return ih(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,i,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:c,coords:g,nodeSize:p}=this,f=[0,c.length-1,0],_=[];for(;f.length;){let y=f.pop()||0,w=f.pop()||0,v=f.pop()||0;if(w-v<=p){for(let k=v;k<=w;k++){let N=g[2*k],ee=g[2*k+1];N>=t&&N<=n&&ee>=i&&ee<=o&&_.push(c[k])}continue}let F=v+w>>1,D=g[2*F],U=g[2*F+1];D>=t&&D<=n&&U>=i&&U<=o&&_.push(c[F]),(y===0?t<=D:i<=U)&&(f.push(v),f.push(F-1),f.push(1-y)),(y===0?n>=D:o>=U)&&(f.push(F+1),f.push(w),f.push(1-y))}return _}within(t,i,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:c,nodeSize:g}=this,p=[0,o.length-1,0],f=[],_=n*n;for(;p.length;){let y=p.pop()||0,w=p.pop()||0,v=p.pop()||0;if(w-v<=g){for(let k=v;k<=w;k++)Xu(c[2*k],c[2*k+1],t,i)<=_&&f.push(o[k]);continue}let F=v+w>>1,D=c[2*F],U=c[2*F+1];Xu(D,U,t,i)<=_&&f.push(o[F]),(y===0?t-n<=D:i-n<=U)&&(p.push(v),p.push(F-1),p.push(1-y)),(y===0?t+n>=D:i+n>=U)&&(p.push(F+1),p.push(w),p.push(1-y))}return f}}function ih(A,t,i,n,o,c){if(o-n<=i)return;let g=n+o>>1;ju(A,t,g,n,o,c),ih(A,t,i,n,g-1,1-c),ih(A,t,i,g+1,o,1-c)}function ju(A,t,i,n,o,c){for(;o>n;){if(o-n>600){let _=o-n+1,y=i-n+1,w=Math.log(_),v=.5*Math.exp(2*w/3),F=.5*Math.sqrt(w*v*(_-v)/_)*(y-_/2<0?-1:1);ju(A,t,i,Math.max(n,Math.floor(i-y*v/_+F)),Math.min(o,Math.floor(i+(_-y)*v/_+F)),c)}let g=t[2*i+c],p=n,f=o;for(fa(A,t,n,i),t[2*o+c]>g&&fa(A,t,n,o);pg;)f--}t[2*n+c]===g?fa(A,t,n,f):(f++,fa(A,t,f,o)),f<=i&&(n=f+1),i<=f&&(o=f-1)}}function fa(A,t,i,n){Ah(A,i,n),Ah(t,2*i,2*n),Ah(t,2*i+1,2*n+1)}function Ah(A,t,i){let n=A[t];A[t]=A[i],A[i]=n}function Xu(A,t,i,n){let o=A-i,c=t-n;return o*o+c*c}var rh;E.cx=void 0,(rh=E.cx||(E.cx={})).create="create",rh.load="load",rh.fullLoad="fullLoad";let Ll=null,ma=[],nh=1e3/60,sh="loadTime",oh="fullLoadTime",Jd={mark(A){performance.mark(A)},frame(A){let t=A;Ll!=null&&ma.push(t-Ll),Ll=t},clearMetrics(){Ll=null,ma=[],performance.clearMeasures(sh),performance.clearMeasures(oh);for(let A in E.cx)performance.clearMarks(E.cx[A])},getPerformanceMetrics(){performance.measure(sh,E.cx.create,E.cx.load),performance.measure(oh,E.cx.create,E.cx.fullLoad);let A=performance.getEntriesByName(sh)[0].duration,t=performance.getEntriesByName(oh)[0].duration,i=ma.length,n=1/(ma.reduce(((c,g)=>c+g),0)/i/1e3),o=ma.filter((c=>c>nh)).reduce(((c,g)=>c+(g-nh)/nh),0);return{loadTime:A,fullLoadTime:t,fps:n,percentDroppedFrames:o/(i+o)*100,totalFrames:i}}};E.$=dt,E.A=ht,E.B=function([A,t,i]){return t+=90,t*=Math.PI/180,i*=Math.PI/180,{x:A*Math.cos(t)*Math.sin(i),y:A*Math.sin(t)*Math.sin(i),z:A*Math.cos(i)}},E.C=fA,E.D=Pe,E.E=ke,E.F=gt,E.G=_c,E.H=function(A){if(sr==null){let t=A.navigator?A.navigator.userAgent:null;sr=!!A.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return sr},E.I=Yc,E.J=class{constructor(A,t){this.target=A,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Rd((()=>this.process())),this.subscription=kA(this.target,"message",(i=>this.receive(i)),!1),this.globalScope=cA(self)?A:window}registerMessageHandler(A,t){this.messageHandlers[A]=t}sendAsync(A,t){return new Promise(((i,n)=>{let o=Math.round(1e18*Math.random()).toString(36).substring(0,10),c=t?kA(t.signal,"abort",(()=>{c==null||c.unsubscribe(),delete this.resolveRejects[o];let f={id:o,type:"",origin:location.origin,targetMapId:A.targetMapId,sourceMapId:this.mapId};this.target.postMessage(f)}),Nd):null;this.resolveRejects[o]={resolve:f=>{c==null||c.unsubscribe(),i(f)},reject:f=>{c==null||c.unsubscribe(),n(f)}};let g=[],p=Object.assign(Object.assign({},A),{id:o,sourceMapId:this.mapId,origin:location.origin,data:vr(A.data,g)});this.target.postMessage(p,{transfer:g})}))}receive(A){let t=A.data,i=t.id;if(!(t.origin!=="file://"&&location.origin!=="file://"&&t.origin!=="resource://android"&&location.origin!=="resource://android"&&t.origin!==location.origin||t.targetMapId&&this.mapId!==t.targetMapId)){if(t.type===""){delete this.tasks[i];let n=this.abortControllers[i];return delete this.abortControllers[i],void(n&&n.abort())}if(cA(self)||t.mustQueue)return this.tasks[i]=t,this.taskQueue.push(i),void this.invoker.trigger();this.processTask(i,t)}}process(){if(this.taskQueue.length===0)return;let A=this.taskQueue.shift(),t=this.tasks[A];delete this.tasks[A],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(A,t)}processTask(A,t){return l(this,void 0,void 0,(function*(){if(t.type===""){let o=this.resolveRejects[A];return delete this.resolveRejects[A],o?void(t.error?o.reject(An(t.error)):o.resolve(An(t.data))):void 0}if(!this.messageHandlers[t.type])return void this.completeTask(A,new Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let i=An(t.data),n=new AbortController;this.abortControllers[A]=n;try{let o=yield this.messageHandlers[t.type](t.sourceMapId,i,n);this.completeTask(A,null,o)}catch(o){this.completeTask(A,o)}}))}completeTask(A,t,i){let n=[];delete this.abortControllers[A];let o={id:A,type:"",sourceMapId:this.mapId,origin:location.origin,error:t?vr(t):null,data:vr(i,n)};this.target.postMessage(o,{transfer:n})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},E.K=L,E.L=function(){var A=new ht(16);return ht!=Float32Array&&(A[1]=0,A[2]=0,A[3]=0,A[4]=0,A[6]=0,A[7]=0,A[8]=0,A[9]=0,A[11]=0,A[12]=0,A[13]=0,A[14]=0),A[0]=1,A[5]=1,A[10]=1,A[15]=1,A},E.M=function(A,t,i){var n,o,c,g,p,f,_,y,w,v,F,D,U=i[0],k=i[1],N=i[2];return t===A?(A[12]=t[0]*U+t[4]*k+t[8]*N+t[12],A[13]=t[1]*U+t[5]*k+t[9]*N+t[13],A[14]=t[2]*U+t[6]*k+t[10]*N+t[14],A[15]=t[3]*U+t[7]*k+t[11]*N+t[15]):(o=t[1],c=t[2],g=t[3],p=t[4],f=t[5],_=t[6],y=t[7],w=t[8],v=t[9],F=t[10],D=t[11],A[0]=n=t[0],A[1]=o,A[2]=c,A[3]=g,A[4]=p,A[5]=f,A[6]=_,A[7]=y,A[8]=w,A[9]=v,A[10]=F,A[11]=D,A[12]=n*U+p*k+w*N+t[12],A[13]=o*U+f*k+v*N+t[13],A[14]=c*U+_*k+F*N+t[14],A[15]=g*U+y*k+D*N+t[15]),A},E.N=function(A,t,i){var n=i[0],o=i[1],c=i[2];return A[0]=t[0]*n,A[1]=t[1]*n,A[2]=t[2]*n,A[3]=t[3]*n,A[4]=t[4]*o,A[5]=t[5]*o,A[6]=t[6]*o,A[7]=t[7]*o,A[8]=t[8]*c,A[9]=t[9]*c,A[10]=t[10]*c,A[11]=t[11]*c,A[12]=t[12],A[13]=t[13],A[14]=t[14],A[15]=t[15],A},E.O=function(A,t,i){var n=t[0],o=t[1],c=t[2],g=t[3],p=t[4],f=t[5],_=t[6],y=t[7],w=t[8],v=t[9],F=t[10],D=t[11],U=t[12],k=t[13],N=t[14],ee=t[15],X=i[0],J=i[1],oe=i[2],ge=i[3];return A[0]=X*n+J*p+oe*w+ge*U,A[1]=X*o+J*f+oe*v+ge*k,A[2]=X*c+J*_+oe*F+ge*N,A[3]=X*g+J*y+oe*D+ge*ee,A[4]=(X=i[4])*n+(J=i[5])*p+(oe=i[6])*w+(ge=i[7])*U,A[5]=X*o+J*f+oe*v+ge*k,A[6]=X*c+J*_+oe*F+ge*N,A[7]=X*g+J*y+oe*D+ge*ee,A[8]=(X=i[8])*n+(J=i[9])*p+(oe=i[10])*w+(ge=i[11])*U,A[9]=X*o+J*f+oe*v+ge*k,A[10]=X*c+J*_+oe*F+ge*N,A[11]=X*g+J*y+oe*D+ge*ee,A[12]=(X=i[12])*n+(J=i[13])*p+(oe=i[14])*w+(ge=i[15])*U,A[13]=X*o+J*f+oe*v+ge*k,A[14]=X*c+J*_+oe*F+ge*N,A[15]=X*g+J*y+oe*D+ge*ee,A},E.P=ue,E.Q=function(A,t){let i={};for(let n=0;n!f.has(y.id)))),p.update&&(p.update=p.update.filter((y=>!f.has(y.id))));let _=new Set(((i=A.add)!==null&&i!==void 0?i:[]).map((y=>y.id)));t.remove=t.remove.filter((y=>!_.has(y)))}if(t.remove){let f=new Set(p.remove?p.remove.concat(t.remove):t.remove);p.remove=Array.from(f.values())}if(t.add){let f=p.add?p.add.concat(t.add):t.add,_=new Map(f.map((y=>[y.id,y])));p.add=Array.from(_.values())}if(t.update){let f=new Map((n=p.update)===null||n===void 0?void 0:n.map((_=>[_.id,_])));for(let _ of t.update){let y=(o=f.get(_.id))!==null&&o!==void 0?o:{id:_.id};_.newGeometry&&(y.newGeometry=_.newGeometry),_.addOrUpdateProperties&&(y.addOrUpdateProperties=((c=y.addOrUpdateProperties)!==null&&c!==void 0?c:[]).concat(_.addOrUpdateProperties)),_.removeProperties&&(y.removeProperties=((g=y.removeProperties)!==null&&g!==void 0?g:[]).concat(_.removeProperties)),_.removeAllProperties&&(y.removeAllProperties=!0),f.set(_.id,y)}p.update=Array.from(f.values())}return p.remove&&p.add&&(p.remove=p.remove.filter((f=>p.add.findIndex((_=>_.id===f))===-1))),p},E.a1=da,E.a2=jn,E.a3=25,E.a4=$c,E.a5=A=>{let t=window.document.createElement("video");return t.muted=!0,new Promise((i=>{t.onloadstart=()=>{i(t)};for(let n of A){let o=window.document.createElement("source");ne(n)||(t.crossOrigin="Anonymous"),o.src=n,t.appendChild(o)}}))},E.a6=Be,E.a7=function(){return Ji++},E.a8=G,E.a9=Js,E.aA=function(A){let t=1/0,i=1/0,n=-1/0,o=-1/0;for(let c of A)t=Math.min(t,c.x),i=Math.min(i,c.y),n=Math.max(n,c.x),o=Math.max(o,c.y);return[t,i,n,o]},E.aB=ri,E.aC=Ar,E.aD=function(A,t,i,n,o=!1){if(!i[0]&&!i[1])return[0,0];let c=o?n==="map"?-A.bearingInRadians:0:n==="viewport"?A.bearingInRadians:0;if(c){let g=Math.sin(c),p=Math.cos(c);i=[i[0]*p-i[1]*g,i[0]*g+i[1]*p]}return[o?i[0]:Ar(t,i[0],A.zoom),o?i[1]:Ar(t,i[1],A.zoom)]},E.aF=jc,E.aG=eh,E.aH=Kc,E.aI=th,E.aJ=Tt,E.aK=El,E.aL=se,E.aM=et,E.aN=Wt,E.aO=Gr,E.aP=GA,E.aQ=Eu,E.aR=Zi,E.aS=ln,E.aT=function(A){var t=new ht(3);return t[0]=A[0],t[1]=A[1],t[2]=A[2],t},E.aU=function(A,t,i){return A[0]=t[0]-i[0],A[1]=t[1]-i[1],A[2]=t[2]-i[2],A},E.aV=function(A,t){var i=t[0],n=t[1],o=t[2],c=i*i+n*n+o*o;return c>0&&(c=1/Math.sqrt(c)),A[0]=t[0]*c,A[1]=t[1]*c,A[2]=t[2]*c,A},E.aW=SA,E.aX=function(A,t){return A[0]*t[0]+A[1]*t[1]+A[2]*t[2]},E.aY=function(A,t,i){return A[0]=t[0]*i[0],A[1]=t[1]*i[1],A[2]=t[2]*i[2],A[3]=t[3]*i[3],A},E.aZ=kr,E.a_=function(A,t,i){let n=t[0]*i[0]+t[1]*i[1]+t[2]*i[2];return n===0?null:(-(A[0]*i[0]+A[1]*i[1]+A[2]*i[2])-i[3])/n},E.aa=Cr,E.ab=Yn,E.ac=Fu,E.ad=function(A){let t={};if(A.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((i,n,o,c)=>{let g=o||c;return t[n]=!g||g.toLowerCase(),""})),t["max-age"]){let i=parseInt(t["max-age"],10);isNaN(i)?delete t["max-age"]:t["max-age"]=i}return t},E.ae=or,E.af=function(A){return Math.pow(2,A)},E.ag=WA,E.ah=bi,E.ai=85.051129,E.aj=Iu,E.ak=function(A){return Math.log(A)/Math.LN2},E.al=function(A){var t=A[0],i=A[1];return t*t+i*i},E.am=function(A,t){let i=[];for(let n in A)n in t||i.push(n);return i},E.an=function(A,t){let i=0,n=0;if(A.kind==="constant")n=A.layoutSize;else if(A.kind!=="source"){let{interpolationType:o,minZoom:c,maxZoom:g}=A,p=o?bi(ci.interpolationFactor(o,t,c,g),0,1):0;A.kind==="camera"?n=fA.number(A.minSize,A.maxSize,p):i=p}return{uSizeT:i,uSize:n}},E.ap=function(A,{uSize:t,uSizeT:i},{lowerSize:n,upperSize:o}){return A.kind==="source"?n/Tr:A.kind==="composite"?fA.number(n/Tr,o/Tr,i):t},E.aq=function(A,t){var i=t[0],n=t[1],o=t[2],c=t[3],g=t[4],p=t[5],f=t[6],_=t[7],y=t[8],w=t[9],v=t[10],F=t[11],D=t[12],U=t[13],k=t[14],N=t[15],ee=i*p-n*g,X=i*f-o*g,J=i*_-c*g,oe=n*f-o*p,ge=n*_-c*p,ye=o*_-c*f,De=y*U-w*D,xe=y*k-v*D,be=y*N-F*D,Re=w*k-v*U,ve=w*N-F*U,Fe=v*N-F*k,fe=ee*Fe-X*ve+J*Re+oe*be-ge*xe+ye*De;return fe?(A[0]=(p*Fe-f*ve+_*Re)*(fe=1/fe),A[1]=(o*ve-n*Fe-c*Re)*fe,A[2]=(U*ye-k*ge+N*oe)*fe,A[3]=(v*ge-w*ye-F*oe)*fe,A[4]=(f*be-g*Fe-_*xe)*fe,A[5]=(i*Fe-o*be+c*xe)*fe,A[6]=(k*J-D*ye-N*X)*fe,A[7]=(y*ye-v*J+F*X)*fe,A[8]=(g*ve-p*be+_*De)*fe,A[9]=(n*be-i*ve-c*De)*fe,A[10]=(D*ge-U*J+N*ee)*fe,A[11]=(w*J-y*ge-F*ee)*fe,A[12]=(p*xe-g*Re-f*De)*fe,A[13]=(i*Re-n*xe+o*De)*fe,A[14]=(U*X-D*oe-k*ee)*fe,A[15]=(y*oe-w*X+v*ee)*fe,A):null},E.ar=ir,E.as=function(A){var t=A[0],i=A[1];return Math.sqrt(t*t+i*i)},E.at=function(A){return A[0]=0,A[1]=0,A},E.au=function(A,t,i){return A[0]=t[0]*i,A[1]=t[1]*i,A},E.av=Xc,E.aw=cn,E.ax=function(A,t,i,n){let o=t.y-A.y,c=t.x-A.x,g=n.y-i.y,p=n.x-i.x,f=g*c-p*o;if(f===0)return null;let _=(p*(A.y-i.y)-g*(A.x-i.x))/f;return new ue(A.x+_*c,A.y+_*o)},E.ay=Mu,E.az=Qh,E.b=hA,E.b$=class extends s{},E.b0=function(A,t,i){return A[0]=t[0]*i,A[1]=t[1]*i,A[2]=t[2]*i,A[3]=t[3]*i,A},E.b1=function(A,t){return A[0]*t[0]+A[1]*t[1]+A[2]*t[2]+A[3]},E.b2=vu,E.b3=Vs,E.b4=function(A,t,i,n,o){var c=1/Math.tan(t/2);if(A[0]=c/i,A[1]=0,A[2]=0,A[3]=0,A[4]=0,A[5]=c,A[6]=0,A[7]=0,A[8]=0,A[9]=0,A[11]=-1,A[12]=0,A[13]=0,A[15]=0,o!=null&&o!==1/0){var g=1/(n-o);A[10]=(o+n)*g,A[14]=2*o*n*g}else A[10]=-1,A[14]=-2*n;return A},E.b5=function(A){var t=new ht(16);return t[0]=A[0],t[1]=A[1],t[2]=A[2],t[3]=A[3],t[4]=A[4],t[5]=A[5],t[6]=A[6],t[7]=A[7],t[8]=A[8],t[9]=A[9],t[10]=A[10],t[11]=A[11],t[12]=A[12],t[13]=A[13],t[14]=A[14],t[15]=A[15],t},E.b6=function(A,t,i){var n=Math.sin(i),o=Math.cos(i),c=t[0],g=t[1],p=t[2],f=t[3],_=t[4],y=t[5],w=t[6],v=t[7];return t!==A&&(A[8]=t[8],A[9]=t[9],A[10]=t[10],A[11]=t[11],A[12]=t[12],A[13]=t[13],A[14]=t[14],A[15]=t[15]),A[0]=c*o+_*n,A[1]=g*o+y*n,A[2]=p*o+w*n,A[3]=f*o+v*n,A[4]=_*o-c*n,A[5]=y*o-g*n,A[6]=w*o-p*n,A[7]=v*o-f*n,A},E.b7=function(A,t,i){var n=Math.sin(i),o=Math.cos(i),c=t[4],g=t[5],p=t[6],f=t[7],_=t[8],y=t[9],w=t[10],v=t[11];return t!==A&&(A[0]=t[0],A[1]=t[1],A[2]=t[2],A[3]=t[3],A[12]=t[12],A[13]=t[13],A[14]=t[14],A[15]=t[15]),A[4]=c*o+_*n,A[5]=g*o+y*n,A[6]=p*o+w*n,A[7]=f*o+v*n,A[8]=_*o-c*n,A[9]=y*o-g*n,A[10]=w*o-p*n,A[11]=v*o-f*n,A},E.b8=function(){let A=new Float32Array(16);return WA(A),A},E.b9=function(){let A=new Float64Array(16);return WA(A),A},E.bA=function(A,t){let i=pi(A,360),n=pi(t,360),o=n-i,c=n>i?o-360:o+360;return Math.abs(o)0?g:-g},E.bD=function(A,t){let i=pi(A,2*Math.PI),n=pi(t,2*Math.PI);return Math.min(Math.abs(i-n),Math.abs(i-n+2*Math.PI),Math.abs(i-n-2*Math.PI))},E.bE=function(){let A={},t=Ae.$version;for(let i in Ae.$root){let n=Ae.$root[i];if(n.required){let o=null;o=i==="version"?t:n.type==="array"?[]:{},o!=null&&(A[i]=o)}}return A},E.bF=Oo,E.bG=Z,E.bH=function A(t,i){if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(let n=0;n{"source"in g&&n[g.source]?i.push({command:"removeLayer",args:[g.id]}):c.push(g)})),i=i.concat(o),(function(g,p,f){p=p||[];let _=(g=g||[]).map(yt),y=p.map(yt),w=g.reduce(Ot,{}),v=p.reduce(Ot,{}),F=_.slice(),D=Object.create(null),U,k,N,ee,X;for(let J=0,oe=0;J<_.length;J++)U=_[J],Object.prototype.hasOwnProperty.call(v,U)?oe++:(Je(f,{command:"removeLayer",args:[U]}),F.splice(F.indexOf(U,oe),1));for(let J=0,oe=0;Jbt?(o=Math.acos(c),g=Math.sin(o),p=Math.sin((1-n)*o)/g,f=Math.sin(n*o)/g):(p=1-n,f=n),A[0]=p*_+f*F,A[1]=p*y+f*D,A[2]=p*w+f*U,A[3]=p*v+f*k,A},E.bd=function(A){let t=new Float64Array(9);var i,n,o,c,g,p,f,_,y,w,v,F,D,U,k,N,ee,X;w=(o=(n=A)[0])*(f=o+o),v=(c=n[1])*f,D=(g=n[2])*f,U=g*(_=c+c),N=(p=n[3])*f,ee=p*_,X=p*(y=g+g),(i=t)[0]=1-(F=c*_)-(k=g*y),i[3]=v-X,i[6]=D+ee,i[1]=v+X,i[4]=1-w-k,i[7]=U-N,i[2]=D-ee,i[5]=U+N,i[8]=1-w-F;let J=GA(-Math.asin(bi(t[2],-1,1))),oe,ge;return Math.hypot(t[5],t[8])<.001?(oe=0,ge=-GA(Math.atan2(t[3],t[4]))):(oe=GA(t[5]===0&&t[8]===0?0:Math.atan2(t[5],t[8])),ge=GA(t[1]===0&&t[0]===0?0:Math.atan2(t[1],t[0]))),{roll:oe,pitch:J+90,bearing:ge}},E.be=function(A,t){return A.roll==t.roll&&A.pitch==t.pitch&&A.bearing==t.bearing},E.bf=it,E.bg=Ps,E.bh=js,E.bi=aa,E.bj=Ks,E.bk=rr,E.bl=lA,E.bm=mi,E.bn=function(A,t,i,n,o){return rr(n,o,bi((A-t)/(i-t),0,1))},E.bo=pi,E.bp=function(){return new Float64Array(3)},E.bq=function(A,t,i,n){return A[0]=t[0]+i[0]*n,A[1]=t[1]+i[1]*n,A[2]=t[2]+i[2]*n,A},E.br=tr,E.bs=function(A,t,i){var n=i[0],o=i[1],c=i[2],g=i[3],p=t[0],f=t[1],_=t[2],y=o*_-c*f,w=c*p-n*_,v=n*f-o*p;return A[0]=p+g*(y+=y)+o*(v+=v)-c*(w+=w),A[1]=f+g*w+c*y-n*v,A[2]=_+g*v+n*w-o*y,A},E.bt=function(A,t,i){let n=(o=[A[0],A[1],A[2],t[0],t[1],t[2],i[0],i[1],i[2]])[0]*((y=o[8])*(g=o[4])-(p=o[5])*(_=o[7]))+o[1]*(-y*(c=o[3])+p*(f=o[6]))+o[2]*(_*c-g*f);var o,c,g,p,f,_,y;if(n===0)return null;let w=SA([],[t[0],t[1],t[2]],[i[0],i[1],i[2]]),v=SA([],[i[0],i[1],i[2]],[A[0],A[1],A[2]]),F=SA([],[A[0],A[1],A[2]],[t[0],t[1],t[2]]),D=Zi([],w,-A[3]);return ln(D,D,Zi([],v,-t[3])),ln(D,D,Zi([],F,-i[3])),Zi(D,D,1/n),D},E.bu=Vc,E.bv=function(){return new Float64Array(4)},E.bw=function(A,t,i,n){var o=[],c=[];return o[0]=t[0]-i[0],o[1]=t[1]-i[1],o[2]=t[2]-i[2],c[0]=o[0]*Math.cos(n)-o[1]*Math.sin(n),c[1]=o[0]*Math.sin(n)+o[1]*Math.cos(n),c[2]=o[2],A[0]=c[0]+i[0],A[1]=c[1]+i[1],A[2]=c[2]+i[2],A},E.bx=function(A,t,i,n){var o=[],c=[];return o[0]=t[0]-i[0],o[1]=t[1]-i[1],o[2]=t[2]-i[2],c[0]=o[0],c[1]=o[1]*Math.cos(n)-o[2]*Math.sin(n),c[2]=o[1]*Math.sin(n)+o[2]*Math.cos(n),A[0]=c[0]+i[0],A[1]=c[1]+i[1],A[2]=c[2]+i[2],A},E.by=function(A,t,i,n){var o=[],c=[];return o[0]=t[0]-i[0],o[1]=t[1]-i[1],o[2]=t[2]-i[2],c[0]=o[2]*Math.sin(n)+o[0]*Math.cos(n),c[1]=o[1],c[2]=o[2]*Math.cos(n)-o[0]*Math.sin(n),A[0]=c[0]+i[0],A[1]=c[1]+i[1],A[2]=c[2]+i[2],A},E.bz=function(A,t,i){var n=Math.sin(i),o=Math.cos(i),c=t[0],g=t[1],p=t[2],f=t[3],_=t[8],y=t[9],w=t[10],v=t[11];return t!==A&&(A[4]=t[4],A[5]=t[5],A[6]=t[6],A[7]=t[7],A[12]=t[12],A[13]=t[13],A[14]=t[14],A[15]=t[15]),A[0]=c*o-_*n,A[1]=g*o-y*n,A[2]=p*o-w*n,A[3]=f*o-v*n,A[8]=c*n+_*o,A[9]=g*n+y*o,A[10]=p*n+w*o,A[11]=f*n+v*o,A},E.c=$,E.c0=ld,E.c1=class extends u{},E.c2=Sc,E.c3=function(A){return A<=1?1:Math.pow(2,Math.ceil(Math.log(A)/Math.LN2))},E.c4=Sh,E.c5=function(A,t,i){var n=t[0],o=t[1],c=t[2],g=i[3]*n+i[7]*o+i[11]*c+i[15];return A[0]=(i[0]*n+i[4]*o+i[8]*c+i[12])/(g=g||1),A[1]=(i[1]*n+i[5]*o+i[9]*c+i[13])/g,A[2]=(i[2]*n+i[6]*o+i[10]*c+i[14])/g,A},E.c6=class extends Dr{},E.c7=class extends I{},E.c8=function(A,t){return A[0]===t[0]&&A[1]===t[1]&&A[2]===t[2]&&A[3]===t[3]&&A[4]===t[4]&&A[5]===t[5]&&A[6]===t[6]&&A[7]===t[7]&&A[8]===t[8]&&A[9]===t[9]&&A[10]===t[10]&&A[11]===t[11]&&A[12]===t[12]&&A[13]===t[13]&&A[14]===t[14]&&A[15]===t[15]},E.c9=function(A,t){var i=A[0],n=A[1],o=A[2],c=A[3],g=A[4],p=A[5],f=A[6],_=A[7],y=A[8],w=A[9],v=A[10],F=A[11],D=A[12],U=A[13],k=A[14],N=A[15],ee=t[0],X=t[1],J=t[2],oe=t[3],ge=t[4],ye=t[5],De=t[6],xe=t[7],be=t[8],Re=t[9],ve=t[10],Fe=t[11],fe=t[12],je=t[13],Xe=t[14],Ye=t[15];return Math.abs(i-ee)<=bt*Math.max(1,Math.abs(i),Math.abs(ee))&&Math.abs(n-X)<=bt*Math.max(1,Math.abs(n),Math.abs(X))&&Math.abs(o-J)<=bt*Math.max(1,Math.abs(o),Math.abs(J))&&Math.abs(c-oe)<=bt*Math.max(1,Math.abs(c),Math.abs(oe))&&Math.abs(g-ge)<=bt*Math.max(1,Math.abs(g),Math.abs(ge))&&Math.abs(p-ye)<=bt*Math.max(1,Math.abs(p),Math.abs(ye))&&Math.abs(f-De)<=bt*Math.max(1,Math.abs(f),Math.abs(De))&&Math.abs(_-xe)<=bt*Math.max(1,Math.abs(_),Math.abs(xe))&&Math.abs(y-be)<=bt*Math.max(1,Math.abs(y),Math.abs(be))&&Math.abs(w-Re)<=bt*Math.max(1,Math.abs(w),Math.abs(Re))&&Math.abs(v-ve)<=bt*Math.max(1,Math.abs(v),Math.abs(ve))&&Math.abs(F-Fe)<=bt*Math.max(1,Math.abs(F),Math.abs(Fe))&&Math.abs(D-fe)<=bt*Math.max(1,Math.abs(D),Math.abs(fe))&&Math.abs(U-je)<=bt*Math.max(1,Math.abs(U),Math.abs(je))&&Math.abs(k-Xe)<=bt*Math.max(1,Math.abs(k),Math.abs(Xe))&&Math.abs(N-Ye)<=bt*Math.max(1,Math.abs(N),Math.abs(Ye))},E.cA=function(A,t){S.REGISTERED_PROTOCOLS[A]=t},E.cB=function(A){delete S.REGISTERED_PROTOCOLS[A]},E.cC=function(A,t){let i={};for(let o=0;oFe*ri))}let xe=g?"center":i.get("text-justify").evaluate(_,{},A.canonical),be=i.get("symbol-placement")==="point"?i.get("text-max-width").evaluate(_,{},A.canonical)*ri:1/0,Re=()=>{A.bucket.allowVerticalPlacement&&Ko(J)&&(D.vertical=vl(U,A.glyphMap,A.glyphPositions,A.imagePositions,y,be,c,ye,"left",ge,N,E.ao.vertical,!0,v,w))};if(!g&&De){let ve=new Set;if(xe==="auto")for(let fe=0;fe0||((o=p.addOrUpdateProperties)===null||o===void 0?void 0:o.length)>0);if((p.newGeometry||p.removeAllProperties||_)&&(f=Object.assign({},f),A.set(p.id,f),_&&(f.properties=Object.assign({},f.properties))),p.newGeometry&&(f.geometry=p.newGeometry),p.removeAllProperties)f.properties={};else if(((c=p.removeProperties)===null||c===void 0?void 0:c.length)>0)for(let y of p.removeProperties)Object.prototype.hasOwnProperty.call(f.properties,y)&&delete f.properties[y];if(((g=p.addOrUpdateProperties)===null||g===void 0?void 0:g.length)>0)for(let{key:y,value:w}of p.addOrUpdateProperties)f.properties[y]=w}},E.cX=HA,E.ca=function(A,t){return A[0]=t[0],A[1]=t[1],A[2]=t[2],A[3]=t[3],A[4]=t[4],A[5]=t[5],A[6]=t[6],A[7]=t[7],A[8]=t[8],A[9]=t[9],A[10]=t[10],A[11]=t[11],A[12]=t[12],A[13]=t[13],A[14]=t[14],A[15]=t[15],A},E.cb=A=>A.type==="symbol",E.cc=A=>A.type==="circle",E.cd=A=>A.type==="heatmap",E.ce=A=>A.type==="line",E.cf=A=>A.type==="fill",E.cg=A=>A.type==="fill-extrusion",E.ch=A=>A.type==="hillshade",E.ci=A=>A.type==="color-relief",E.cj=A=>A.type==="raster",E.ck=A=>A.type==="background",E.cl=A=>A.type==="custom",E.cm=UA,E.cn=function(A,t,i){let n=qn(t.x-i.x,t.y-i.y),o=qn(A.x-i.x,A.y-i.y);var c,g;return GA(Math.atan2(n[0]*o[1]-n[1]*o[0],(c=n)[0]*(g=o)[0]+c[1]*g[1]))},E.co=nr,E.cp=function(A,t){return RA[t]&&(A instanceof MouseEvent||A instanceof WheelEvent)},E.cq=function(A,t){return PA[t]&&"touches"in A},E.cr=function(A){return PA[A]||RA[A]},E.cs=function(A,t,i){var n=t[0],o=t[1];return A[0]=i[0]*n+i[4]*o+i[12],A[1]=i[1]*n+i[5]*o+i[13],A},E.ct=function(A,t){let{x:i,y:n}=da.fromLngLat(t);return!(A<0||A>25||n<0||n>=1||i<0||i>=1)},E.cu=function(A,t){return A[0]=t[0],A[1]=0,A[2]=0,A[3]=0,A[4]=0,A[5]=t[1],A[6]=0,A[7]=0,A[8]=0,A[9]=0,A[10]=t[2],A[11]=0,A[12]=0,A[13]=0,A[14]=0,A[15]=1,A},E.cv=class extends Fr{},E.cw=Jd,E.cy=function(A){return A.message===zr},E.cz=j,E.d=ne,E.e=Oi,E.f=A=>l(void 0,void 0,void 0,(function*(){if(A.byteLength===0)return createImageBitmap(new ImageData(1,1));let t=new Blob([new Uint8Array(A)],{type:"image/png"});try{return createImageBitmap(t)}catch(i){throw new Error(`Could not load image because of ${i.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),E.g=M,E.h=A=>new Promise(((t,i)=>{let n=new Image;n.onload=()=>{t(n),URL.revokeObjectURL(n.src),n.onload=null,window.requestAnimationFrame((()=>{n.src=uA}))},n.onerror=()=>i(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let o=new Blob([new Uint8Array(A)],{type:"image/png"});n.src=A.byteLength?URL.createObjectURL(o):uA})),E.i=cA,E.j=(A,t)=>W(Oi(A,{type:"json"}),t),E.k=me,E.l=Qe,E.m=W,E.n=(A,t)=>W(Oi(A,{type:"arrayBuffer"}),t),E.o=function(A){return new zc(A).readFields(yd,[])},E.p=nu,E.q=Aa,E.r=_i,E.s=kA,E.t=Jo,E.u=nt,E.v=Ae,E.w=zt,E.x=Ln,E.y=ol,E.z=tn})),re("worker",["./shared"],(function(E){"use strict";class l{constructor(S,M){this.keyCache={},S&&this.replace(S,M)}replace(S,M){this._layerConfigs={},this._layers={},this.update(S,[],M)}update(S,M,L){for(let Z of S){this._layerConfigs[Z.id]=Z;let W=this._layers[Z.id]=E.bJ(Z,L);W._featureFilter=E.aa(W.filter,L),this.keyCache[Z.id]&&delete this.keyCache[Z.id]}for(let Z of M)delete this.keyCache[Z],delete this._layerConfigs[Z],delete this._layers[Z];this.familiesBySource={};let j=E.cC(Object.values(this._layerConfigs),this.keyCache);for(let Z of j){let W=Z.map((ke=>this._layers[ke.id])),ne=W[0];if(ne.visibility==="none")continue;let ie=ne.source||"",de=this.familiesBySource[ie];de||(de=this.familiesBySource[ie]={});let Qe=ne.sourceLayer||"_geojsonTileLayer",me=de[Qe];me||(me=de[Qe]=[]),me.push(W)}}}class ue{constructor(S){let M={},L=[];for(let ne in S){let ie=S[ne],de=M[ne]={};for(let Qe in ie){let me=ie[+Qe];if(!me||me.bitmap.width===0||me.bitmap.height===0)continue;let ke={x:0,y:0,w:me.bitmap.width+2,h:me.bitmap.height+2};L.push(ke),de[Qe]={rect:ke,metrics:me.metrics}}}let{w:j,h:Z}=E.p(L),W=new E.q({width:j||1,height:Z||1});for(let ne in S){let ie=S[ne];for(let de in ie){let Qe=ie[+de];if(!Qe||Qe.bitmap.width===0||Qe.bitmap.height===0)continue;let me=M[ne][de].rect;E.q.copy(Qe.bitmap,W,{x:0,y:0},{x:me.x+1,y:me.y+1},Qe.bitmap)}}this.image=W,this.positions=M}}E.cD("GlyphAtlas",ue);class Ue{constructor(S){this.tileID=new E.Z(S.tileID.overscaledZ,S.tileID.wrap,S.tileID.canonical.z,S.tileID.canonical.x,S.tileID.canonical.y),this.uid=S.uid,this.zoom=S.zoom,this.pixelRatio=S.pixelRatio,this.tileSize=S.tileSize,this.source=S.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=S.showCollisionBoxes,this.collectResourceTiming=!!S.collectResourceTiming,this.returnDependencies=!!S.returnDependencies,this.promoteId=S.promoteId,this.inFlightDependencies=[]}parse(S,M,L,j,Z){return E._(this,void 0,void 0,(function*(){this.status="parsing",this.data=S,this.collisionBoxArray=new E.a8;let W=new E.cE(Object.keys(S.layers).sort()),ne=new E.cF(this.tileID,this.promoteId);ne.bucketLayerIDs=[];let ie={},de={featureIndex:ne,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:L,subdivisionGranularity:Z},Qe=M.familiesBySource[this.source];for(let Be in Qe){let Kt=S.layers[Be];if(!Kt)continue;Kt.version===1&&E.w(`Vector tile source "${this.source}" layer "${Be}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let Ui=W.encode(Be),ar=[];for(let fi=0;fi=Ie.maxzoom||Ie.visibility!=="none"&&(Le(fi,this.zoom,L),(ie[Ie.id]=Ie.createBucket({index:ne.bucketLayerIDs.length,layers:fi,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ui,sourceID:this.source})).populate(ar,de,this.tileID.canonical),ne.bucketLayerIDs.push(fi.map((Ve=>Ve.id))))}}let me=E.bN(de.glyphDependencies,(Be=>Object.keys(Be).map(Number)));this.inFlightDependencies.forEach((Be=>Be==null?void 0:Be.abort())),this.inFlightDependencies=[];let ke=Promise.resolve({});if(Object.keys(me).length){let Be=new AbortController;this.inFlightDependencies.push(Be),ke=j.sendAsync({type:"GG",data:{stacks:me,source:this.source,tileID:this.tileID,type:"glyphs"}},Be)}let Ae=Object.keys(de.iconDependencies),He=Promise.resolve({});if(Ae.length){let Be=new AbortController;this.inFlightDependencies.push(Be),He=j.sendAsync({type:"GI",data:{icons:Ae,source:this.source,tileID:this.tileID,type:"icons"}},Be)}let At=Object.keys(de.patternDependencies),Ne=Promise.resolve({});if(At.length){let Be=new AbortController;this.inFlightDependencies.push(Be),Ne=j.sendAsync({type:"GI",data:{icons:At,source:this.source,tileID:this.tileID,type:"patterns"}},Be)}let Je=de.dashDependencies,_t=Promise.resolve({});if(Object.keys(Je).length){let Be=new AbortController;this.inFlightDependencies.push(Be),_t=j.sendAsync({type:"GDA",data:{dashes:Je}},Be)}let[Yt,Vt,qt,$t]=yield Promise.all([ke,He,Ne,_t]),yt=new ue(Yt),Ot=new E.cG(Vt,qt);for(let Be in ie){let Kt=ie[Be];Kt instanceof E.a9?(Le(Kt.layers,this.zoom,L),E.cH({bucket:Kt,glyphMap:Yt,glyphPositions:yt.positions,imageMap:Vt,imagePositions:Ot.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:de.subdivisionGranularity})):Kt.hasDependencies&&(Kt instanceof E.cI||Kt instanceof E.cJ||Kt instanceof E.cK)&&(Le(Kt.layers,this.zoom,L),Kt.addFeatures(de,this.tileID.canonical,Ot.patternPositions,$t))}return this.status="done",{buckets:Object.values(ie).filter((Be=>!Be.isEmpty())),featureIndex:ne,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:yt.image,imageAtlas:Ot,dashPositions:$t,glyphMap:this.returnDependencies?Yt:null,iconMap:this.returnDependencies?Vt:null,glyphPositions:this.returnDependencies?yt.positions:null}}))}}function Le($,S,M){let L=new E.F(S);for(let j of $)j.recalculate(L,M)}class Oe{constructor(S,M,L){this.actor=S,this.layerIndex=M,this.availableImages=L,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(S,M){return E._(this,void 0,void 0,(function*(){let L=yield E.n(S.request,M);try{return{vectorTile:new E.cL(new E.cM(L.data)),rawData:L.data,cacheControl:L.cacheControl,expires:L.expires}}catch(j){let Z=new Uint8Array(L.data),W=`Unable to parse the tile at ${S.request.url}, `;throw W+=Z[0]===31&&Z[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${j.message}`,new Error(W)}}))}loadTile(S){return E._(this,void 0,void 0,(function*(){let M=S.uid,L=!!(S&&S.request&&S.request.collectResourceTiming)&&new E.cN(S.request),j=new Ue(S);this.loading[M]=j;let Z=new AbortController;j.abort=Z;try{let W=yield this.loadVectorTile(S,Z);if(delete this.loading[M],!W)return null;let ne=W.rawData,ie={};W.expires&&(ie.expires=W.expires),W.cacheControl&&(ie.cacheControl=W.cacheControl);let de={};if(L){let me=L.finish();me&&(de.resourceTiming=JSON.parse(JSON.stringify(me)))}j.vectorTile=W.vectorTile;let Qe=j.parse(W.vectorTile,this.layerIndex,this.availableImages,this.actor,S.subdivisionGranularity);this.loaded[M]=j,this.fetching[M]={rawTileData:ne,cacheControl:ie,resourceTiming:de};try{let me=yield Qe;return E.e({rawTileData:ne.slice(0)},me,ie,de)}finally{delete this.fetching[M]}}catch(W){throw delete this.loading[M],j.status="done",this.loaded[M]=j,W}}))}reloadTile(S){return E._(this,void 0,void 0,(function*(){let M=S.uid;if(!this.loaded||!this.loaded[M])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let L=this.loaded[M];if(L.showCollisionBoxes=S.showCollisionBoxes,L.status==="parsing"){let j=yield L.parse(L.vectorTile,this.layerIndex,this.availableImages,this.actor,S.subdivisionGranularity),Z;if(this.fetching[M]){let{rawTileData:W,cacheControl:ne,resourceTiming:ie}=this.fetching[M];delete this.fetching[M],Z=E.e({rawTileData:W.slice(0)},j,ne,ie)}else Z=j;return Z}if(L.status==="done"&&L.vectorTile)return L.parse(L.vectorTile,this.layerIndex,this.availableImages,this.actor,S.subdivisionGranularity)}))}abortTile(S){return E._(this,void 0,void 0,(function*(){let M=this.loading,L=S.uid;M&&M[L]&&M[L].abort&&(M[L].abort.abort(),delete M[L])}))}removeTile(S){return E._(this,void 0,void 0,(function*(){this.loaded&&this.loaded[S.uid]&&delete this.loaded[S.uid]}))}}class Se{constructor(){this.loaded={}}loadTile(S){return E._(this,void 0,void 0,(function*(){let{uid:M,encoding:L,rawImageData:j,redFactor:Z,greenFactor:W,blueFactor:ne,baseShift:ie}=S,de=j.width+2,Qe=j.height+2,me=E.b(j)?new E.R({width:de,height:Qe},yield E.cO(j,-1,-1,de,Qe)):j,ke=new E.cP(M,me,L,Z,W,ne,ie);return this.loaded=this.loaded||{},this.loaded[M]=ke,ke}))}removeTile(S){let M=this.loaded,L=S.uid;M&&M[L]&&delete M[L]}}var te,ot,lt=(function(){if(ot)return te;function $(M,L){if(M.length!==0){S(M[0],L);for(var j=1;j=Math.abs(de)?j-Qe+de:de-Qe+j,j=Qe}j+Z>=0!=!!L&&M.reverse()}return ot=1,te=function M(L,j){var Z,W=L&&L.type;if(W==="FeatureCollection")for(Z=0;Z>31}function Vn($,S){let M=$.loadGeometry(),L=$.type,j=0,Z=0;for(let W of M){let ne=1;L===1&&(ne=W.length),S.writeVarint(_A(1,ne));let ie=L===3?W.length-1:W.length;for(let de=0;de$},SA=Math.fround||(aA=new Float32Array(1),$=>(aA[0]=+$,aA[0]));var aA;class MA{constructor(S){this.options=Object.assign(Object.create(Zi),S),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(S){let{log:M,minZoom:L,maxZoom:j}=this.options;M&&console.time("total time");let Z=`prepare ${S.length} points`;M&&console.time(Z),this.points=S;let W=[];for(let ie=0;ie=L;ie--){let de=+Date.now();ne=this.trees[ie]=this._createTree(this._cluster(ne,ie)),M&&console.log("z%d: %d clusters in %dms",ie,ne.numItems,+Date.now()-de)}return M&&console.timeEnd("total time"),this}getClusters(S,M){let L=((S[0]+180)%360+360)%360-180,j=Math.max(-90,Math.min(90,S[1])),Z=S[2]===180?180:((S[2]+180)%360+360)%360-180,W=Math.max(-90,Math.min(90,S[3]));if(S[2]-S[0]>=360)L=-180,Z=180;else if(L>Z){let me=this.getClusters([L,j,180,W],M),ke=this.getClusters([-180,j,Z,W],M);return me.concat(ke)}let ne=this.trees[this._limitZoom(M)],ie=ne.range(tr(L),ir(W),tr(Z),ir(j)),de=ne.data,Qe=[];for(let me of ie){let ke=this.stride*me;Qe.push(de[ke+5]>1?cn(de,ke,this.clusterProps):this.points[de[ke+3]])}return Qe}getChildren(S){let M=this._getOriginId(S),L=this._getOriginZoom(S),j="No cluster with the specified id.",Z=this.trees[L];if(!Z)throw new Error(j);let W=Z.data;if(M*this.stride>=W.length)throw new Error(j);let ne=this.options.radius/(this.options.extent*Math.pow(2,L-1)),ie=Z.within(W[M*this.stride],W[M*this.stride+1],ne),de=[];for(let Qe of ie){let me=Qe*this.stride;W[me+4]===S&&de.push(W[me+5]>1?cn(W,me,this.clusterProps):this.points[W[me+3]])}if(de.length===0)throw new Error(j);return de}getLeaves(S,M,L){let j=[];return this._appendLeaves(j,S,M=M||10,L=L||0,0),j}getTile(S,M,L){let j=this.trees[this._limitZoom(S)],Z=Math.pow(2,S),{extent:W,radius:ne}=this.options,ie=ne/W,de=(L-ie)/Z,Qe=(L+1+ie)/Z,me={features:[]};return this._addTileFeatures(j.range((M-ie)/Z,de,(M+1+ie)/Z,Qe),j.data,M,L,Z,me),M===0&&this._addTileFeatures(j.range(1-ie/Z,de,1,Qe),j.data,Z,L,Z,me),M===Z-1&&this._addTileFeatures(j.range(0,de,ie/Z,Qe),j.data,-1,L,Z,me),me.features.length?me:null}getClusterExpansionZoom(S){let M=this._getOriginZoom(S)-1;for(;M<=this.options.maxZoom;){let L=this.getChildren(S);if(M++,L.length!==1)break;S=L[0].properties.cluster_id}return M}_appendLeaves(S,M,L,j,Z){let W=this.getChildren(M);for(let ne of W){let ie=ne.properties;if(ie&&ie.cluster?Z+ie.point_count<=j?Z+=ie.point_count:Z=this._appendLeaves(S,ie.cluster_id,L,j,Z):Z1,Qe,me,ke;if(de)Qe=er(M,ie,this.clusterProps),me=M[ie],ke=M[ie+1];else{let At=this.points[M[ie+3]];Qe=At.properties;let[Ne,Je]=At.geometry.coordinates;me=tr(Ne),ke=ir(Je)}let Ae={type:1,geometry:[[Math.round(this.options.extent*(me*Z-L)),Math.round(this.options.extent*(ke*Z-j))]],tags:Qe},He;He=de||this.options.generateId?M[ie+3]:this.points[M[ie+3]].id,He!==void 0&&(Ae.id=He),W.features.push(Ae)}}_limitZoom(S){return Math.max(this.options.minZoom,Math.min(Math.floor(+S),this.options.maxZoom+1))}_cluster(S,M){let{radius:L,extent:j,reduce:Z,minPoints:W}=this.options,ne=L/(j*Math.pow(2,M)),ie=S.data,de=[],Qe=this.stride;for(let me=0;meM&&(Ne+=ie[_t+5])}if(Ne>At&&Ne>=W){let Je,_t=ke*At,Yt=Ae*At,Vt=-1,qt=(me/Qe<<5)+(M+1)+this.points.length;for(let $t of He){let yt=$t*Qe;if(ie[yt+2]<=M)continue;ie[yt+2]=M;let Ot=ie[yt+5];_t+=ie[yt]*Ot,Yt+=ie[yt+1]*Ot,ie[yt+4]=qt,Z&&(Je||(Je=this._map(ie,me,!0),Vt=this.clusterProps.length,this.clusterProps.push(Je)),Z(Je,this._map(ie,yt)))}ie[me+4]=qt,de.push(_t/Ne,Yt/Ne,1/0,qt,-1,Ne),Z&&de.push(Vt)}else{for(let Je=0;Je1)for(let Je of He){let _t=Je*Qe;if(!(ie[_t+2]<=M)){ie[_t+2]=M;for(let Yt=0;Yt>5}_getOriginZoom(S){return(S-this.points.length)%32}_map(S,M,L){if(S[M+5]>1){let W=this.clusterProps[S[M+6]];return L?Object.assign({},W):W}let j=this.points[S[M+3]].properties,Z=this.options.map(j);return L&&Z===j?Object.assign({},Z):Z}}function cn($,S,M){return{type:"Feature",id:$[S+3],properties:er($,S,M),geometry:{type:"Point",coordinates:[(L=$[S],360*(L-.5)),qn($[S+1])]}};var L}function er($,S,M){let L=$[S+5],j=L>=1e4?`${Math.round(L/1e3)}k`:L>=1e3?Math.round(L/100)/10+"k":L,Z=$[S+6],W=Z===-1?{}:Object.assign({},M[Z]);return Object.assign(W,{cluster:!0,cluster_id:$[S+3],point_count:L,point_count_abbreviated:j})}function tr($){return $/360+.5}function ir($){let S=Math.sin($*Math.PI/180),M=.5-.25*Math.log((1+S)/(1-S))/Math.PI;return M<0?0:M>1?1:M}function qn($){let S=(180-360*$)*Math.PI/180;return 360*Math.atan(Math.exp(S))/Math.PI-90}function dt($,S,M,L){let j=L,Z=S+(M-S>>1),W,ne=M-S,ie=$[S],de=$[S+1],Qe=$[M],me=$[M+1];for(let ke=S+3;kej)W=ke,j=Ae;else if(Ae===j){let He=Math.abs(ke-Z);HeL&&(W-S>3&&dt($,S,W,L),$[W+2]=j,M-W>3&&dt($,W,M,L))}function Ar($,S,M,L,j,Z){let W=j-M,ne=Z-L;if(W!==0||ne!==0){let ie=(($-M)*W+(S-L)*ne)/(W*W+ne*ne);ie>1?(M=j,L=Z):ie>0&&(M+=W*ie,L+=ne*ie)}return W=$-M,ne=S-L,W*W+ne*ne}function pi($,S,M,L){let j={id:$==null?null:$,type:S,geometry:M,tags:L,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(S==="Point"||S==="MultiPoint"||S==="LineString")rr(j,M);else if(S==="Polygon")rr(j,M[0]);else if(S==="MultiLineString")for(let Z of M)rr(j,Z);else if(S==="MultiPolygon")for(let Z of M)rr(j,Z[0]);return j}function rr($,S){for(let M=0;M0&&(W+=L?(j*Qe-de*Z)/2:Math.sqrt(Math.pow(de-j,2)+Math.pow(Qe-Z,2))),j=de,Z=Qe}let ne=S.length-3;S[2]=1,dt(S,0,ne,M),S[ne+2]=1,S.size=Math.abs(W),S.start=0,S.end=S.size}function bi($,S,M,L){for(let j=0;j<$.length;j++){let Z=[];nr($[j],Z,M,L),S.push(Z)}}function Gr($){return $/360+.5}function Oi($){let S=Math.sin($*Math.PI/180),M=.5-.25*Math.log((1+S)/(1-S))/Math.PI;return M<0?0:M>1?1:M}function Ji($,S,M,L,j,Z,W,ne){if(L/=S,Z>=(M/=S)&&W=L)return null;let ie=[];for(let de of $){let Qe=de.geometry,me=de.type,ke=j===0?de.minX:de.minY,Ae=j===0?de.maxX:de.maxY;if(ke>=M&&Ae=L)continue;let He=[];if(me==="Point"||me==="MultiPoint")Pr(Qe,He,M,L,j);else if(me==="LineString")Rr(Qe,He,M,L,j,!1,ne.lineMetrics);else if(me==="MultiLineString")Gt(Qe,He,M,L,j,!1);else if(me==="Polygon")Gt(Qe,He,M,L,j,!0);else if(me==="MultiPolygon")for(let At of Qe){let Ne=[];Gt(At,Ne,M,L,j,!0),Ne.length&&He.push(Ne)}if(He.length){if(ne.lineMetrics&&me==="LineString"){for(let At of He)ie.push(pi(de.id,me,At,de.tags));continue}me!=="LineString"&&me!=="MultiLineString"||(He.length===1?(me="LineString",He=He[0]):me="MultiLineString"),me!=="Point"&&me!=="MultiPoint"||(me=He.length===3?"Point":"MultiPoint"),ie.push(pi(de.id,me,He,de.tags))}}return ie.length?ie:null}function Pr($,S,M,L,j){for(let Z=0;Z<$.length;Z+=3){let W=$[Z+j];W>=M&&W<=L&&zt(S,$[Z],$[Z+1],$[Z+2])}}function Rr($,S,M,L,j,Z,W){let ne=Mi($),ie=j===0?Vi:cA,de,Qe,me=$.start;for(let Ne=0;Ne<$.length-3;Ne+=3){let Je=$[Ne],_t=$[Ne+1],Yt=$[Ne+2],Vt=$[Ne+3],qt=$[Ne+4],$t=j===0?Je:_t,yt=j===0?Vt:qt,Ot=!1;W&&(de=Math.sqrt(Math.pow(Je-Vt,2)+Math.pow(_t-qt,2))),$tM&&(Qe=ie(ne,Je,_t,Vt,qt,M),W&&(ne.start=me+de*Qe)):$t>L?yt=M&&(Qe=ie(ne,Je,_t,Vt,qt,M),Ot=!0),yt>L&&$t<=L&&(Qe=ie(ne,Je,_t,Vt,qt,L),Ot=!0),!Z&&Ot&&(W&&(ne.end=me+de*Qe),S.push(ne),ne=Mi($)),W&&(me+=de)}let ke=$.length-3,Ae=$[ke],He=$[ke+1],At=j===0?Ae:He;At>=M&&At<=L&&zt(ne,Ae,He,$[ke+2]),ke=ne.length-3,Z&&ke>=3&&(ne[ke]!==ne[0]||ne[ke+1]!==ne[1])&&zt(ne,ne[0],ne[1],ne[2]),ne.length&&S.push(ne)}function Mi($){let S=[];return S.size=$.size,S.start=$.start,S.end=$.end,S}function Gt($,S,M,L,j,Z){for(let W of $)Rr(W,S,M,L,j,Z,!1)}function zt($,S,M,L){$.push(S,M,L)}function Vi($,S,M,L,j,Z){let W=(Z-S)/(L-S);return zt($,Z,M+(j-M)*W,1),W}function cA($,S,M,L,j,Z){let W=(Z-M)/(j-M);return zt($,S+(L-S)*W,Z,1),W}function sr($,S){let M=[];for(let L=0;L<$.length;L++){let j=$[L],Z=j.type,W;if(Z==="Point"||Z==="MultiPoint"||Z==="LineString")W=hA(j.geometry,S);else if(Z==="MultiLineString"||Z==="Polygon"){W=[];for(let ne of j.geometry)W.push(hA(ne,S))}else if(Z==="MultiPolygon"){W=[];for(let ne of j.geometry){let ie=[];for(let de of ne)ie.push(hA(de,S));W.push(ie)}}M.push(pi(j.id,Z,W,j.tags))}return M}function hA($,S){let M=[];M.size=$.size,$.start!==void 0&&(M.start=$.start,M.end=$.end);for(let L=0;L<$.length;L+=3)M.push($[L]+S,$[L+1],$[L+2]);return M}function uA($,S){if($.transformed)return $;let M=1<<$.z,L=$.x,j=$.y;for(let Z of $.features){let W=Z.geometry,ne=Z.type;if(Z.geometry=[],ne===1)for(let ie=0;ie0&&S.size<(j?W:L))return void(M.numPoints+=S.length/3);let ne=[];for(let ie=0;ieW)&&(M.numSimplified++,ne.push(S[ie],S[ie+1])),M.numPoints++;j&&(function(ie,de){let Qe=0;for(let me=0,ke=ie.length,Ae=ke-2;me0===de)for(let me=0,ke=ie.length;me24)throw new Error("maxZoom should be in the 0-24 range");if(M.promoteId&&M.generateId)throw new Error("promoteId and generateId cannot be used together.");let j=(function(Z,W){let ne=[];if(Z.type==="FeatureCollection")for(let ie=0;ie1&&console.time("creation"),Ae=this.tiles[ke]=TA(S,M,L,j,de),this.tileCoords.push({z:M,x:L,y:j}),Qe)){Qe>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",M,L,j,Ae.numFeatures,Ae.numPoints,Ae.numSimplified),console.timeEnd("creation"));let Ot=`z${M}`;this.stats[Ot]=(this.stats[Ot]||0)+1,this.total++}if(Ae.source=S,Z==null){if(M===de.indexMaxZoom||Ae.numPoints<=de.indexMaxPoints)continue}else{if(M===de.maxZoom||M===Z)continue;if(Z!=null){let Ot=Z-M;if(L!==W>>Ot||j!==ne>>Ot)continue}}if(Ae.source=null,S.length===0)continue;Qe>1&&console.time("clipping");let He=.5*de.buffer/de.extent,At=.5-He,Ne=.5+He,Je=1+He,_t=null,Yt=null,Vt=null,qt=null,$t=Ji(S,me,L-He,L+Ne,0,Ae.minX,Ae.maxX,de),yt=Ji(S,me,L+At,L+Je,0,Ae.minX,Ae.maxX,de);S=null,$t&&(_t=Ji($t,me,j-He,j+Ne,1,Ae.minY,Ae.maxY,de),Yt=Ji($t,me,j+At,j+Je,1,Ae.minY,Ae.maxY,de),$t=null),yt&&(Vt=Ji(yt,me,j-He,j+Ne,1,Ae.minY,Ae.maxY,de),qt=Ji(yt,me,j+At,j+Je,1,Ae.minY,Ae.maxY,de),yt=null),Qe>1&&console.timeEnd("clipping"),ie.push(_t||[],M+1,2*L,2*j),ie.push(Yt||[],M+1,2*L,2*j+1),ie.push(Vt||[],M+1,2*L+1,2*j),ie.push(qt||[],M+1,2*L+1,2*j+1)}}getTile(S,M,L){S=+S,M=+M,L=+L;let j=this.options,{extent:Z,debug:W}=j;if(S<0||S>24)return null;let ne=1<1&&console.log("drilling down to z%d-%d-%d",S,M,L);let de,Qe=S,me=M,ke=L;for(;!de&&Qe>0;)Qe--,me>>=1,ke>>=1,de=this.tiles[PA(Qe,me,ke)];return de&&de.source?(W>1&&(console.log("found parent tile z%d-%d-%d",Qe,me,ke),console.time("drilling down")),this.splitTile(de.source,Qe,me,ke,S,M,L),W>1&&console.timeEnd("drilling down"),this.tiles[ie]?uA(this.tiles[ie],Z):null):null}}function PA($,S,M){return 32*((1<<$)*M+S)+$}class RA extends Oe{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(S,M){return E._(this,void 0,void 0,(function*(){let L=S.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let j=this._geoJSONIndex.getTile(L.z,L.x,L.y);if(!j)return null;let Z=new bt(j.features,{version:2,extent:E.$}),W=(function(ne){let ie=new E.cM;return(function(de,Qe){for(let me in de.layers)Qe.writeMessage(3,ht,de.layers[me])})(ne,ie),ie.finish()})(Z);return W.byteOffset===0&&W.byteLength===W.buffer.byteLength||(W=new Uint8Array(W)),{vectorTile:Z,rawData:W.buffer}}))}loadData(S){return E._(this,void 0,void 0,(function*(){var M;(M=this._pendingRequest)===null||M===void 0||M.abort();let L=!!(S&&S.request&&S.request.collectResourceTiming)&&new E.cN(S.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(S,this._pendingRequest);let j=yield this._pendingData;this._geoJSONIndex=S.cluster?new MA((function({superclusterOptions:W,clusterProperties:ne}){if(!ne||!W)return W;let ie={},de={},Qe={accumulated:null,zoom:0},me={properties:null},ke=Object.keys(ne);for(let Ae of ke){let[He,At]=ne[Ae],Ne=E.cT(At),Je=E.cT(typeof He=="string"?[He,["accumulated"],["get",Ae]]:He);ie[Ae]=Ne.value,de[Ae]=Je.value}return W.map=Ae=>{me.properties=Ae;let He={};for(let At of ke)He[At]=ie[At].evaluate(Qe,me);return He},W.reduce=(Ae,He)=>{me.properties=He;for(let At of ke)Qe.accumulated=Ae[At],Ae[At]=de[At].evaluate(Qe,me)},W})(S)).load(j.features):(function(W,ne){return new GA(W,ne)})(j,S.geojsonVtOptions),this.loaded={};let Z={data:j};if(L){let W=L.finish();W&&(Z.resourceTiming={},Z.resourceTiming[S.source]=JSON.parse(JSON.stringify(W)))}return Z}catch(j){if(delete this._pendingRequest,E.cy(j))return{abandoned:!0};throw j}}))}getData(){return E._(this,void 0,void 0,(function*(){return this._pendingData}))}reloadTile(S){let M=this.loaded;return M&&M[S.uid]?super.reloadTile(S):this.loadTile(S)}loadAndProcessGeoJSON(S,M){return E._(this,void 0,void 0,(function*(){let L=yield this.loadGeoJSON(S,M);if(delete this._pendingRequest,typeof L!="object")throw new Error(`Input data given to '${S.source}' is not a valid GeoJSON object.`);if(Nt(L,!0),S.filter){let j=E.cT(S.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(j.result==="error")throw new Error(j.value.map((W=>`${W.key}: ${W.message}`)).join(", "));L={type:"FeatureCollection",features:L.features.filter((W=>j.value.evaluate({zoom:0},W)))}}return L}))}loadGeoJSON(S,M){return E._(this,void 0,void 0,(function*(){let{promoteId:L}=S;if(S.request){let j=yield E.j(S.request,M);return this._dataUpdateable=E.cV(j.data,L)?E.cU(j.data,L):void 0,j.data}if(typeof S.data=="string")try{let j=JSON.parse(S.data);return this._dataUpdateable=E.cV(j,L)?E.cU(j,L):void 0,j}catch(j){throw new Error(`Input data given to '${S.source}' is not a valid GeoJSON object.`)}if(!S.dataDiff)throw new Error(`Input data given to '${S.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${S.source}`);return E.cW(this._dataUpdateable,S.dataDiff,L),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}}))}removeSource(S){return E._(this,void 0,void 0,(function*(){this._pendingRequest&&this._pendingRequest.abort()}))}getClusterExpansionZoom(S){return this._geoJSONIndex.getClusterExpansionZoom(S.clusterId)}getClusterChildren(S){return this._geoJSONIndex.getChildren(S.clusterId)}getClusterLeaves(S){return this._geoJSONIndex.getLeaves(S.clusterId,S.limit,S.offset)}}class zr{constructor(S){this.self=S,this.actor=new E.J(S),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(M,L)=>{if(this.externalWorkerSourceTypes[M])throw new Error(`Worker source with name "${M}" already registered.`);this.externalWorkerSourceTypes[M]=L},this.self.addProtocol=E.cA,this.self.removeProtocol=E.cB,this.self.registerRTLTextPlugin=M=>{E.cX.setMethods(M)},this.actor.registerMessageHandler("LDT",((M,L)=>this._getDEMWorkerSource(M,L.source).loadTile(L))),this.actor.registerMessageHandler("RDT",((M,L)=>E._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(M,L.source).removeTile(L)})))),this.actor.registerMessageHandler("GCEZ",((M,L)=>E._(this,void 0,void 0,(function*(){return this._getWorkerSource(M,L.type,L.source).getClusterExpansionZoom(L)})))),this.actor.registerMessageHandler("GCC",((M,L)=>E._(this,void 0,void 0,(function*(){return this._getWorkerSource(M,L.type,L.source).getClusterChildren(L)})))),this.actor.registerMessageHandler("GCL",((M,L)=>E._(this,void 0,void 0,(function*(){return this._getWorkerSource(M,L.type,L.source).getClusterLeaves(L)})))),this.actor.registerMessageHandler("LD",((M,L)=>this._getWorkerSource(M,L.type,L.source).loadData(L))),this.actor.registerMessageHandler("GD",((M,L)=>this._getWorkerSource(M,L.type,L.source).getData())),this.actor.registerMessageHandler("LT",((M,L)=>this._getWorkerSource(M,L.type,L.source).loadTile(L))),this.actor.registerMessageHandler("RT",((M,L)=>this._getWorkerSource(M,L.type,L.source).reloadTile(L))),this.actor.registerMessageHandler("AT",((M,L)=>this._getWorkerSource(M,L.type,L.source).abortTile(L))),this.actor.registerMessageHandler("RMT",((M,L)=>this._getWorkerSource(M,L.type,L.source).removeTile(L))),this.actor.registerMessageHandler("RS",((M,L)=>E._(this,void 0,void 0,(function*(){if(!this.workerSources[M]||!this.workerSources[M][L.type]||!this.workerSources[M][L.type][L.source])return;let j=this.workerSources[M][L.type][L.source];delete this.workerSources[M][L.type][L.source],j.removeSource!==void 0&&j.removeSource(L)})))),this.actor.registerMessageHandler("RM",(M=>E._(this,void 0,void 0,(function*(){delete this.layerIndexes[M],delete this.availableImages[M],delete this.workerSources[M],delete this.demWorkerSources[M],this.globalStates.delete(M)})))),this.actor.registerMessageHandler("SR",((M,L)=>E._(this,void 0,void 0,(function*(){this.referrer=L})))),this.actor.registerMessageHandler("SRPS",((M,L)=>this._syncRTLPluginState(M,L))),this.actor.registerMessageHandler("IS",((M,L)=>E._(this,void 0,void 0,(function*(){this.self.importScripts(L)})))),this.actor.registerMessageHandler("SI",((M,L)=>this._setImages(M,L))),this.actor.registerMessageHandler("UL",((M,L)=>E._(this,void 0,void 0,(function*(){this._getLayerIndex(M).update(L.layers,L.removedIds,this._getGlobalState(M))})))),this.actor.registerMessageHandler("UGS",((M,L)=>E._(this,void 0,void 0,(function*(){let j=this._getGlobalState(M);for(let Z in L)j[Z]=L[Z]})))),this.actor.registerMessageHandler("SL",((M,L)=>E._(this,void 0,void 0,(function*(){this._getLayerIndex(M).replace(L,this._getGlobalState(M))}))))}_getGlobalState(S){let M=this.globalStates.get(S);return M||(M={},this.globalStates.set(S,M)),M}_setImages(S,M){return E._(this,void 0,void 0,(function*(){this.availableImages[S]=M;for(let L in this.workerSources[S]){let j=this.workerSources[S][L];for(let Z in j)j[Z].availableImages=M}}))}_syncRTLPluginState(S,M){return E._(this,void 0,void 0,(function*(){return yield E.cX.syncState(M,this.self.importScripts)}))}_getAvailableImages(S){let M=this.availableImages[S];return M||(M=[]),M}_getLayerIndex(S){let M=this.layerIndexes[S];return M||(M=this.layerIndexes[S]=new l),M}_getWorkerSource(S,M,L){if(this.workerSources[S]||(this.workerSources[S]={}),this.workerSources[S][M]||(this.workerSources[S][M]={}),!this.workerSources[S][M][L]){let j={sendAsync:(Z,W)=>(Z.targetMapId=S,this.actor.sendAsync(Z,W))};switch(M){case"vector":this.workerSources[S][M][L]=new Oe(j,this._getLayerIndex(S),this._getAvailableImages(S));break;case"geojson":this.workerSources[S][M][L]=new RA(j,this._getLayerIndex(S),this._getAvailableImages(S));break;default:this.workerSources[S][M][L]=new this.externalWorkerSourceTypes[M](j,this._getLayerIndex(S),this._getAvailableImages(S))}}return this.workerSources[S][M][L]}_getDEMWorkerSource(S,M){return this.demWorkerSources[S]||(this.demWorkerSources[S]={}),this.demWorkerSources[S][M]||(this.demWorkerSources[S][M]=new Se),this.demWorkerSources[S][M]}}return E.i(self)&&(self.worker=new zr(self)),zr})),re("index",["exports","./shared"],(function(E,l){"use strict";var ue="5.8.0";function Ue(){var h=new l.A(4);return l.A!=Float32Array&&(h[1]=0,h[2]=0),h[0]=1,h[3]=1,h}let Le,Oe,Se={now:typeof performance!="undefined"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(h,e,r){let s=requestAnimationFrame((u=>{a(),e(u)})),{unsubscribe:a}=l.s(h.signal,"abort",(()=>{a(),cancelAnimationFrame(s),r(l.c())}),!1)},frameAsync(h){return new Promise(((e,r)=>{this.frame(h,e,r)}))},getImageData(h,e=0){return this.getImageCanvasContext(h).getImageData(-e,-e,h.width+2*e,h.height+2*e)},getImageCanvasContext(h){let e=window.document.createElement("canvas"),r=e.getContext("2d",{willReadFrequently:!0});if(!r)throw new Error("failed to create canvas 2d context");return e.width=h.width,e.height=h.height,r.drawImage(h,0,0,h.width,h.height),r},resolveURL:h=>(Le||(Le=document.createElement("a")),Le.href=h,Le.href),hardwareConcurrency:typeof navigator!="undefined"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(Oe==null&&(Oe=matchMedia("(prefers-reduced-motion: reduce)")),Oe.matches)}};class te{static testProp(e){if(!te.docStyle)return e[0];for(let r=0;r{window.removeEventListener("click",te.suppressClickInternal,!0)}),0)}static getScale(e){let r=e.getBoundingClientRect();return{x:r.width/e.offsetWidth||1,y:r.height/e.offsetHeight||1,boundingClientRect:r}}static getPoint(e,r,s){let a=r.boundingClientRect;return new l.P((s.clientX-a.left)/r.x-e.clientLeft,(s.clientY-a.top)/r.y-e.clientTop)}static mousePos(e,r){let s=te.getScale(e);return te.getPoint(e,s,r)}static touchPos(e,r){let s=[],a=te.getScale(e);for(let u=0;u{lt&&ht(lt),lt=null,bt=!0},Nt.onerror=()=>{Ut=!0,lt=null},Nt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),(function(h){let e,r,s,a;h.resetRequestQueue=()=>{e=[],r=0,s=0,a={}},h.addThrottleControl=B=>{let Q=s++;return a[Q]=B,Q},h.removeThrottleControl=B=>{delete a[B],d()},h.getImage=(B,Q,C=!0)=>new Promise(((x,I)=>{ot.supported&&(B.headers||(B.headers={}),B.headers.accept="image/webp,*/*"),l.e(B,{type:"image"}),e.push({abortController:Q,requestParameters:B,supportImageRefresh:C,state:"queued",onError:b=>{I(b)},onSuccess:b=>{x(b)}}),d()}));let u=B=>l._(this,void 0,void 0,(function*(){B.state="running";let{requestParameters:Q,supportImageRefresh:C,onError:x,onSuccess:I,abortController:b}=B,T=C===!1&&!l.i(self)&&!l.g(Q.url)&&(!Q.headers||Object.keys(Q.headers).reduce(((R,z)=>R&&z==="accept"),!0));r++;let G=T?m(Q,b):l.m(Q,b);try{let R=yield G;delete B.abortController,B.state="completed",R.data instanceof HTMLImageElement||l.b(R.data)?I(R):R.data&&I({data:yield(P=R.data,typeof createImageBitmap=="function"?l.f(P):l.h(P)),cacheControl:R.cacheControl,expires:R.expires})}catch(R){delete B.abortController,x(R)}finally{r--,d()}var P})),d=()=>{let B=(()=>{for(let Q of Object.keys(a))if(a[Q]())return!0;return!1})()?l.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:l.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let Q=r;Q0;Q++){let C=e.shift();C.abortController.signal.aborted?Q--:u(C)}},m=(B,Q)=>new Promise(((C,x)=>{let I=new Image,b=B.url,T=B.credentials;T&&T==="include"?I.crossOrigin="use-credentials":(T&&T==="same-origin"||!l.d(b))&&(I.crossOrigin="anonymous"),Q.signal.addEventListener("abort",(()=>{I.src="",x(l.c())})),I.fetchPriority="high",I.onload=()=>{I.onerror=I.onload=null,C({data:I})},I.onerror=()=>{I.onerror=I.onload=null,Q.signal.aborted||x(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},I.src=b}))})(kt||(kt={})),kt.resetRequestQueue();class WA{constructor(e){this._transformRequestFn=e!=null?e:null}transformRequest(e,r){return this._transformRequestFn&&this._transformRequestFn(e,r)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function _A(h){let e=[];if(typeof h=="string")e.push({id:"default",url:h});else if(h&&h.length>0){let r=[];for(let{id:s,url:a}of h){let u=`${s}${a}`;r.indexOf(u)===-1&&(r.push(u),e.push({id:s,url:a}))}}return e}function kr(h,e,r){try{let s=new URL(h);return s.pathname+=`${e}${r}`,s.toString()}catch(s){throw new Error(`Invalid sprite URL "${h}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function Vn(h){let{userImage:e}=h;return!!(e&&e.render&&e.render())&&(h.data.replace(new Uint8Array(e.data.buffer)),!0)}class ln extends l.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new l.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:r,promiseResolve:s}of this.requestors)s(this._getImagesForIds(r));this.requestors=[]}}getImage(e){let r=this.images[e];if(r&&!r.data&&r.spriteData){let s=r.spriteData;r.data=new l.R({width:s.width,height:s.height},s.context.getImageData(s.x,s.y,s.width,s.height).data),r.spriteData=null}return r}addImage(e,r){if(this.images[e])throw new Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,r)&&(this.images[e]=r)}_validate(e,r){let s=!0,a=r.data||r.spriteData;return this._validateStretch(r.stretchX,a&&a.width)||(this.fire(new l.k(new Error(`Image "${e}" has invalid "stretchX" value`))),s=!1),this._validateStretch(r.stretchY,a&&a.height)||(this.fire(new l.k(new Error(`Image "${e}" has invalid "stretchY" value`))),s=!1),this._validateContent(r.content,r)||(this.fire(new l.k(new Error(`Image "${e}" has invalid "content" value`))),s=!1),s}_validateStretch(e,r){if(!e)return!0;let s=0;for(let a of e){if(a[0]{let a=!0;if(!this.isLoaded())for(let u of e)this.images[u]||(a=!1);this.isLoaded()||a?r(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:r})}))}_getImagesForIds(e){let r={};for(let s of e){let a=this.getImage(s);a||(this.fire(new l.l("styleimagemissing",{id:s})),a=this.getImage(s)),a?r[s]={data:a.data.clone(),pixelRatio:a.pixelRatio,sdf:a.sdf,version:a.version,stretchX:a.stretchX,stretchY:a.stretchY,content:a.content,textFitWidth:a.textFitWidth,textFitHeight:a.textFitHeight,hasRenderCallback:!!(a.userImage&&a.userImage.render)}:l.w(`Image "${s}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return r}getPixelSize(){let{width:e,height:r}=this.atlasImage;return{width:e,height:r}}getPattern(e){let r=this.patterns[e],s=this.getImage(e);if(!s)return null;if(r&&r.position.version===s.version)return r.position;if(r)r.position.version=s.version;else{let a={w:s.data.width+2,h:s.data.height+2,x:0,y:0},u=new l.I(a,s);this.patterns[e]={bin:a,position:u}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){let r=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new l.T(e,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}_updatePatternAtlas(){let e=[];for(let u in this.patterns)e.push(this.patterns[u].bin);let{w:r,h:s}=l.p(e),a=this.atlasImage;a.resize({width:r||1,height:s||1});for(let u in this.patterns){let{bin:d}=this.patterns[u],m=d.x+1,B=d.y+1,Q=this.getImage(u).data,C=Q.width,x=Q.height;l.R.copy(Q,a,{x:0,y:0},{x:m,y:B},{width:C,height:x}),l.R.copy(Q,a,{x:0,y:x-1},{x:m,y:B-1},{width:C,height:1}),l.R.copy(Q,a,{x:0,y:0},{x:m,y:B+x},{width:C,height:1}),l.R.copy(Q,a,{x:C-1,y:0},{x:m-1,y:B},{width:1,height:x}),l.R.copy(Q,a,{x:0,y:0},{x:m+C,y:B},{width:1,height:x})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let r of e){if(this.callbackDispatchedThisFrame[r])continue;this.callbackDispatchedThisFrame[r]=!0;let s=this.getImage(r);s||l.w(`Image with ID: "${r}" was not found`),Vn(s)&&this.updateImage(r,s)}}}let Zi=1e20;function SA(h,e,r,s,a,u,d,m,B){for(let Q=e;Q-1);B++,u[B]=m,d[B]=Q,d[B+1]=Zi}for(let m=0,B=0;m65535)throw new Error("glyphs > 65535 not supported");if(s.ranges[u])return{stack:e,id:r,glyph:a};if(!this.url)throw new Error("glyphsUrl is not set");if(!s.requests[u]){let m=MA.loadGlyphRange(e,u,this.url,this.requestManager);s.requests[u]=m}let d=yield s.requests[u];for(let m in d)this._doesCharSupportLocalGlyph(+m)||(s.glyphs[+m]=d[+m]);return s.ranges[u]=!0,{stack:e,id:r,glyph:d[r]||null}}))}_doesCharSupportLocalGlyph(e){return!!this.localIdeographFontFamily&&(/\p{Ideo}|\p{sc=Hang}|\p{sc=Hira}|\p{sc=Kana}/u.test(String.fromCodePoint(e))||l.u["CJK Unified Ideographs"](e)||l.u["Hangul Syllables"](e)||l.u.Hiragana(e)||l.u.Katakana(e)||l.u["CJK Symbols and Punctuation"](e)||l.u["Halfwidth and Fullwidth Forms"](e))}_tinySDF(e,r,s){let a=this.localIdeographFontFamily;if(!a||!this._doesCharSupportLocalGlyph(s))return;let u=e.tinySDF;if(!u){let m="400";/bold/i.test(r)?m="900":/medium/i.test(r)?m="500":/light/i.test(r)&&(m="200"),u=e.tinySDF=new MA.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,lang:this.lang,fontFamily:a,fontWeight:m})}let d=u.draw(String.fromCharCode(s));return{id:s,bitmap:new l.q({width:d.width||60,height:d.height||60},d.data),metrics:{width:d.glyphWidth/2||24,height:d.glyphHeight/2||24,left:d.glyphLeft/2+.5||0,top:d.glyphTop/2-27.5||-8,advance:d.glyphAdvance/2||24,isDoubleResolution:!0}}}}MA.loadGlyphRange=function(h,e,r,s){return l._(this,void 0,void 0,(function*(){let a=256*e,u=a+255,d=s.transformRequest(r.replace("{fontstack}",h).replace("{range}",`${a}-${u}`),"Glyphs"),m=yield l.n(d,new AbortController);if(!m||!m.data)throw new Error(`Could not load glyph range. range: ${e}, ${a}-${u}`);let B={};for(let Q of l.o(m.data))B[Q.id]=Q;return B}))},MA.TinySDF=class{constructor({fontSize:h=24,buffer:e=3,radius:r=8,cutoff:s=.25,fontFamily:a="sans-serif",fontWeight:u="normal",fontStyle:d="normal",lang:m=null}={}){this.buffer=e,this.cutoff=s,this.radius=r,this.lang=m;let B=this.size=h+4*e,Q=this._createCanvas(B),C=this.ctx=Q.getContext("2d",{willReadFrequently:!0});C.font=`${d} ${u} ${h}px ${a}`,C.textBaseline="alphabetic",C.textAlign="left",C.fillStyle="black",this.gridOuter=new Float64Array(B*B),this.gridInner=new Float64Array(B*B),this.f=new Float64Array(B),this.z=new Float64Array(B+1),this.v=new Uint16Array(B)}_createCanvas(h){let e=document.createElement("canvas");return e.width=e.height=h,e}draw(h){let{width:e,actualBoundingBoxAscent:r,actualBoundingBoxDescent:s,actualBoundingBoxLeft:a,actualBoundingBoxRight:u}=this.ctx.measureText(h),d=Math.ceil(r),m=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(u-a))),B=Math.min(this.size-this.buffer,d+Math.ceil(s)),Q=m+2*this.buffer,C=B+2*this.buffer,x=Math.max(Q*C,0),I=new Uint8ClampedArray(x),b={data:I,width:Q,height:C,glyphWidth:m,glyphHeight:B,glyphTop:d,glyphLeft:0,glyphAdvance:e};if(m===0||B===0)return b;let{ctx:T,buffer:G,gridInner:P,gridOuter:R}=this;this.lang&&(T.lang=this.lang),T.clearRect(G,G,m,B),T.fillText(h,G,G+d);let z=T.getImageData(G,G,m,B);R.fill(Zi,0,x),P.fill(0,0,x);for(let K=0;K0?O*O:0,P[V]=O<0?O*O:0}}SA(R,0,0,Q,C,Q,this.f,this.v,this.z),SA(P,G,G,m,B,Q,this.f,this.v,this.z);for(let K=0;K1&&(B=e[++m]);let C=Math.abs(Q-B.left),x=Math.abs(Q-B.right),I=Math.min(C,x),b,T=u/s*(a+1);if(B.isDash){let G=a-Math.abs(T);b=Math.sqrt(I*I+G*G)}else b=a-Math.sqrt(I*I+T*T);this.data[d+Q]=Math.max(0,Math.min(255,b+128))}}}addRegularDash(e){for(let m=e.length-1;m>=0;--m){let B=e[m],Q=e[m+1];B.zeroLength?e.splice(m,1):Q&&Q.isDash===B.isDash&&(Q.left=B.left,e.splice(m,1))}let r=e[0],s=e[e.length-1];r.isDash===s.isDash&&(r.left=s.left-this.width,s.right=r.right+this.width);let a=this.width*this.nextRow,u=0,d=e[u];for(let m=0;m1&&(d=e[++u]);let B=Math.abs(m-d.left),Q=Math.abs(m-d.right),C=Math.min(B,Q);this.data[a+m]=Math.max(0,Math.min(255,(d.isDash?C:-C)+128))}}addDash(e,r){let s=r?7:0,a=2*s+1;if(this.nextRow+a>this.height)return l.w("LineAtlas out of space"),null;let u=0;for(let m=0;m{r.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[Ar]}numActive(){return Object.keys(this.active).length}}let rr=Math.floor(Se.hardwareConcurrency/2),lA,UA;function nr(){return lA||(lA=new pi),lA}pi.workerCount=l.H(globalThis)?Math.max(Math.min(rr,3),1):1;class bi{constructor(e,r){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=r;let s=this.workerPool.acquire(r);for(let a=0;a{r.remove()})),this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,r){for(let s of this.actors)s.registerMessageHandler(e,r)}}function Gr(){return UA||(UA=new bi(nr(),l.K),UA.registerMessageHandler("GR",((h,e,r)=>l.m(e,r)))),UA}function Oi(h,e){let r=l.L();return l.M(r,r,[1,1,0]),l.N(r,r,[.5*h.width,.5*h.height,1]),h.calculatePosMatrix?l.O(r,r,h.calculatePosMatrix(e.toUnwrapped())):r}function Ji(h,e,r,s,a,u,d){var m;let B=(function(I,b,T){if(I)for(let G of I){let P=b[G];if(P&&P.source===T&&P.type==="fill-extrusion")return!0}else for(let G in b){let P=b[G];if(P.source===T&&P.type==="fill-extrusion")return!0}return!1})((m=a==null?void 0:a.layers)!==null&&m!==void 0?m:null,e,h.id),Q=u.maxPitchScaleFactor(),C=h.tilesIn(s,Q,B);C.sort(Pr);let x=[];for(let I of C)x.push({wrappedTileID:I.tileID.wrapped().key,queryResults:I.tile.queryRenderedFeatures(e,r,h._state,I.queryGeometry,I.cameraQueryGeometry,I.scale,a,u,Q,Oi(h.transform,I.tileID),d?(b,T)=>d(I.tileID,b,T):void 0)});return(function(I,b){for(let T in I)for(let G of I[T])Rr(G,b);return I})((function(I){let b={},T={};for(let G of I){let P=G.queryResults,R=G.wrappedTileID,z=T[R]=T[R]||{};for(let K in P){let Y=P[K],H=z[K]=z[K]||{},V=b[K]=b[K]||[];for(let O of Y)H[O.featureIndex]||(H[O.featureIndex]=!0,V.push(O))}}return b})(x),h)}function Pr(h,e){let r=h.tileID,s=e.tileID;return r.overscaledZ-s.overscaledZ||r.canonical.y-s.canonical.y||r.wrap-s.wrap||r.canonical.x-s.canonical.x}function Rr(h,e){let r=h.feature,s=e.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=s}function Mi(h,e,r){return l._(this,void 0,void 0,(function*(){let s=h;if(h.url?s=(yield l.j(e.transformRequest(h.url,"Source"),r)).data:yield Se.frameAsync(r),!s)return null;let a=l.Q(l.e(s,h),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in s&&s.vector_layers&&(a.vectorLayerIds=s.vector_layers.map((u=>u.id))),a}))}class Gt{constructor(e,r){e&&(r?this.setSouthWest(e).setNorthEast(r):Array.isArray(e)&&(e.length===4?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof l.S?new l.S(e.lng,e.lat):l.S.convert(e),this}setSouthWest(e){return this._sw=e instanceof l.S?new l.S(e.lng,e.lat):l.S.convert(e),this}extend(e){let r=this._sw,s=this._ne,a,u;if(e instanceof l.S)a=e,u=e;else{if(!(e instanceof Gt))return Array.isArray(e)?e.length===4||e.every(Array.isArray)?this.extend(Gt.convert(e)):this.extend(l.S.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(l.S.convert(e)):this;if(a=e._sw,u=e._ne,!a||!u)return this}return r||s?(r.lng=Math.min(a.lng,r.lng),r.lat=Math.min(a.lat,r.lat),s.lng=Math.max(u.lng,s.lng),s.lat=Math.max(u.lat,s.lat)):(this._sw=new l.S(a.lng,a.lat),this._ne=new l.S(u.lng,u.lat)),this}getCenter(){return new l.S((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new l.S(this.getWest(),this.getNorth())}getSouthEast(){return new l.S(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(e){let{lng:r,lat:s}=l.S.convert(e),a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=s&&s<=this._ne.lat&&a}static convert(e){return e instanceof Gt?e:e&&new Gt(e)}static fromLngLat(e,r=0){let s=360*r/40075017,a=s/Math.cos(Math.PI/180*e.lat);return new Gt(new l.S(e.lng-a,e.lat-s),new l.S(e.lng+a,e.lat+s))}adjustAntiMeridian(){let e=new l.S(this._sw.lng,this._sw.lat),r=new l.S(this._ne.lng,this._ne.lat);return new Gt(e,e.lng>r.lng?new l.S(r.lng+360,r.lat):r)}}class zt{constructor(e,r,s){this.bounds=Gt.convert(this.validateBounds(e)),this.minzoom=r||0,this.maxzoom=s||24}validateBounds(e){return Array.isArray(e)&&e.length===4?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){let r=Math.pow(2,e.z),s=Math.floor(l.V(this.bounds.getWest())*r),a=Math.floor(l.U(this.bounds.getNorth())*r),u=Math.ceil(l.V(this.bounds.getEast())*r),d=Math.ceil(l.U(this.bounds.getSouth())*r);return e.x>=s&&e.x=a&&e.y{this._options.tiles=e})),this}setUrl(e){return this.setSourceProperty((()=>{this.url=e,this._options.url=e})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return l.e({},this._options)}loadTile(e){return l._(this,void 0,void 0,(function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),s={request:this.map._requestManager.transformRequest(r,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};s.request.collectResourceTiming=this._collectResourceTiming;let a="RT";if(e.actor&&e.state!=="expired"){if(e.state==="loading")return new Promise(((u,d)=>{e.reloadPromise={resolve:u,reject:d}}))}else e.actor=this.dispatcher.getActor(),a="LT";e.abortController=new AbortController;try{let u=yield e.actor.sendAsync({type:a,data:s},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,u)}catch(u){if(delete e.abortController,e.aborted)return;if(u&&u.status!==404)throw u;this._afterTileLoadWorkerResponse(e,null)}}))}_afterTileLoadWorkerResponse(e,r){if(r&&r.resourceTiming&&(e.resourceTiming=r.resourceTiming),r&&this.map._refreshExpiredTiles&&e.setExpiryData(r),e.loadVectorData(r,this.map.painter),e.reloadPromise){let s=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(s.resolve).catch(s.reject)}}abortTile(e){return l._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))}))}unloadTile(e){return l._(this,void 0,void 0,(function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class cA extends l.E{constructor(e,r,s,a){super(),this.id=e,this.dispatcher=s,this.setEventedParent(a),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=l.e({type:"raster"},r),l.e(this,l.Q(r,["url","scheme","tileSize"]))}load(){return l._(this,arguments,void 0,(function*(e=!1){this._loaded=!1,this.fire(new l.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let r=yield Mi(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,r&&(l.e(this,r),r.bounds&&(this.tileBounds=new zt(r.bounds,this.minzoom,this.maxzoom)),this.fire(new l.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new l.l("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:e})))}catch(r){this._tileJSONRequest=null,this._loaded=!0,this.fire(new l.k(r))}}))}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load(!0)}setTiles(e){return this.setSourceProperty((()=>{this._options.tiles=e})),this}setUrl(e){return this.setSourceProperty((()=>{this.url=e,this._options.url=e})),this}serialize(){return l.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return l._(this,void 0,void 0,(function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{let s=yield kt.getImage(this.map._requestManager.transformRequest(r,"Tile"),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(s&&s.data){this.map._refreshExpiredTiles&&(s.cacheControl||s.expires)&&e.setExpiryData({cacheControl:s.cacheControl,expires:s.expires});let a=this.map.painter.context,u=a.gl,d=s.data;e.texture=this.map.painter.getTileTexture(d.width),e.texture?e.texture.update(d,{useMipmap:!0}):(e.texture=new l.T(a,d,u.RGBA,{useMipmap:!0}),e.texture.bind(u.LINEAR,u.CLAMP_TO_EDGE,u.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(s){if(delete e.abortController,e.aborted)e.state="unloaded";else if(s)throw e.state="errored",s}}))}abortTile(e){return l._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)}))}unloadTile(e){return l._(this,void 0,void 0,(function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)}))}hasTransition(){return!1}}class sr extends cA{constructor(e,r,s,a){super(e,r,s,a),this.type="raster-dem",this.maxzoom=22,this._options=l.e({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox",this.redFactor=r.redFactor,this.greenFactor=r.greenFactor,this.blueFactor=r.blueFactor,this.baseShift=r.baseShift}loadTile(e){return l._(this,void 0,void 0,(function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),s=this.map._requestManager.transformRequest(r,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let a=yield kt.getImage(s,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(a&&a.data){let u=a.data;this.map._refreshExpiredTiles&&(a.cacheControl||a.expires)&&e.setExpiryData({cacheControl:a.cacheControl,expires:a.expires});let d=l.b(u)&&l.W()?u:yield this.readImageNow(u),m={type:this.type,uid:e.uid,source:this.id,rawImageData:d,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!e.actor||e.state==="expired"){e.actor=this.dispatcher.getActor();let B=yield e.actor.sendAsync({type:"LDT",data:m});e.dem=B,e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}}catch(a){if(delete e.abortController,e.aborted)e.state="unloaded";else if(a)throw e.state="errored",a}}))}readImageNow(e){return l._(this,void 0,void 0,(function*(){if(typeof VideoFrame!="undefined"&&l.X()){let r=e.width+2,s=e.height+2;try{return new l.R({width:r,height:s},yield l.Y(e,-1,-1,r,s))}catch(a){}}return Se.getImageData(e,1)}))}_getNeighboringTiles(e){let r=e.canonical,s=Math.pow(2,r.z),a=(r.x-1+s)%s,u=r.x===0?e.wrap-1:e.wrap,d=(r.x+1+s)%s,m=r.x+1===s?e.wrap+1:e.wrap,B={};return B[new l.Z(e.overscaledZ,u,r.z,a,r.y).key]={backfilled:!1},B[new l.Z(e.overscaledZ,m,r.z,d,r.y).key]={backfilled:!1},r.y>0&&(B[new l.Z(e.overscaledZ,u,r.z,a,r.y-1).key]={backfilled:!1},B[new l.Z(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},B[new l.Z(e.overscaledZ,m,r.z,d,r.y-1).key]={backfilled:!1}),r.y+1r.coordinates)).flat(1/0):e.coordinates.flat(1/0)}getBounds(){return l._(this,void 0,void 0,(function*(){let e=new Gt,r=yield this.getData(),s;switch(r.type){case"FeatureCollection":s=r.features.map((a=>this.getCoordinatesFromGeometry(a.geometry))).flat(1/0);break;case"Feature":s=this.getCoordinatesFromGeometry(r.geometry);break;default:s=this.getCoordinatesFromGeometry(r)}if(s.length==0)return e;for(let a=0;a0&&l.e(d,{resourceTiming:u}),this.fire(new l.l("data",Object.assign(Object.assign({},d),{sourceDataType:"metadata"}))),this.fire(new l.l("data",Object.assign(Object.assign({},d),{sourceDataType:"content"})))}catch(a){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new l.l("dataabort",{dataType:"source"}));this.fire(new l.k(a))}finally{(this._pendingWorkerUpdate.data||this._pendingWorkerUpdate.diff)&&this._updateWorkerData()}}))}loaded(){return!this._isUpdatingWorker&&this._pendingWorkerUpdate.data===void 0&&this._pendingWorkerUpdate.diff===void 0}loadTile(e){return l._(this,void 0,void 0,(function*(){let r=e.actor?"RT":"LT";e.actor=this.actor;let s={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};e.abortController=new AbortController;let a=yield this.actor.sendAsync({type:r,data:s},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(a,this.map.painter,r==="RT")}))}abortTile(e){return l._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0}))}unloadTile(e){return l._(this,void 0,void 0,(function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return l.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}class uA extends l.E{constructor(e,r,s,a){super(),this.flippedWindingOrder=!1,this.id=e,this.dispatcher=s,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(a),this.options=r}load(e){return l._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new l.l("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let r=yield kt.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,r&&r.data&&(this.image=r.data,e&&(this.coordinates=e),this._finishLoading())}catch(r){this._request=null,this._loaded=!0,this.fire(new l.k(r))}}))}loaded(){return this._loaded}updateImage(e){return e.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally((()=>{this.texture=null})),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new l.l("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){this.coordinates=e;let r=e.map(l.a1.fromLngLat);var s;return this.tileID=(function(a){let u=l.a2.fromPoints(a),d=u.width(),m=u.height(),B=Math.max(d,m),Q=Math.max(0,Math.floor(-Math.log(B)/Math.LN2)),C=Math.pow(2,Q);return new l.a4(Q,Math.floor((u.minX+u.maxX)/2*C),Math.floor((u.minY+u.maxY)/2*C))})(r),this.terrainTileRanges=this._getOverlappingTileRanges(r),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=r.map((a=>this.tileID.getTilePoint(a)._round())),this.flippedWindingOrder=((s=this.tileCoords)[1].x-s[0].x)*(s[2].y-s[0].y)-(s[1].y-s[0].y)*(s[2].x-s[0].x)<0,this.fire(new l.l("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let e=this.map.painter.context,r=e.gl;this.texture||(this.texture=new l.T(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let s=!1;for(let a in this.tiles){let u=this.tiles[a];u.state!=="loaded"&&(u.state="loaded",u.texture=this.texture,s=!0)}s&&this.fire(new l.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return l._(this,void 0,void 0,(function*(){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(e){let{minX:r,minY:s,maxX:a,maxY:u}=l.a2.fromPoints(e),d={};for(let m=0;m<=l.a3;m++){let B=Math.pow(2,m),Q=Math.floor(r*B),C=Math.floor(s*B),x=Math.floor(a*B),I=Math.floor(u*B);d[m]={minTileX:Q,minTileY:C,maxTileX:x,maxTileY:I}}return d}}class Nr extends uA{constructor(e,r,s,a){super(e,r,s,a),this.roundZoom=!0,this.type="video",this.options=r}load(){return l._(this,void 0,void 0,(function*(){this._loaded=!1;let e=this.options;this.urls=[];for(let r of e.urls)this.urls.push(this.map._requestManager.transformRequest(r,"Source").url);try{let r=yield l.a5(this.urls);if(this._loaded=!0,!r)return;this.video=r,this.video.loop=!0,this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading()}catch(r){this.fire(new l.k(r))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let r=this.video.seekable;er.end(0)?this.fire(new l.k(new l.a6(`sources.${this.id}`,null,`Playback for this video can be set only between the ${r.start(0)} and ${r.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let e=this.map.painter.context,r=e.gl;this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new l.T(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let s=!1;for(let a in this.tiles){let u=this.tiles[a];u.state!=="loaded"&&(u.state="loaded",u.texture=this.texture,s=!0)}s&&this.fire(new l.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class TA extends uA{constructor(e,r,s,a){super(e,r,s,a),r.coordinates?Array.isArray(r.coordinates)&&r.coordinates.length===4&&!r.coordinates.some((u=>!Array.isArray(u)||u.length!==2||u.some((d=>typeof d!="number"))))||this.fire(new l.k(new l.a6(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new l.k(new l.a6(`sources.${e}`,null,'missing required property "coordinates"'))),r.animate&&typeof r.animate!="boolean"&&this.fire(new l.k(new l.a6(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),r.canvas?typeof r.canvas=="string"||r.canvas instanceof HTMLCanvasElement||this.fire(new l.k(new l.a6(`sources.${e}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new l.k(new l.a6(`sources.${e}`,null,'missing required property "canvas"'))),this.options=r,this.animate=r.animate===void 0||r.animate}load(){return l._(this,void 0,void 0,(function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new l.k(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}))}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let r=this.map.painter.context,s=r.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new l.T(r,this.canvas,s.RGBA,{premultiply:!0});let a=!1;for(let u in this.tiles){let d=this.tiles[u];d.state!=="loaded"&&(d.state="loaded",d.texture=this.texture,a=!0)}a&&this.fire(new l.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}let LA={},kA=h=>{switch(h){case"geojson":return hA;case"image":return uA;case"raster":return cA;case"raster-dem":return sr;case"vector":return Vi;case"video":return Nr;case"canvas":return TA}return LA[h]},or="RTLPluginLoaded";class GA extends l.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Gr()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch((r=>{throw this.status="error",r}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return l._(this,arguments,void 0,(function*(r,s=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=Se.resolveURL(r),!this.url)throw new Error(`requested url ${r} is invalid`);if(this.status==="unavailable"){if(!s)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()}))}_requestImport(){return l._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new l.l(or))}))}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let PA=null;function RA(){return PA||(PA=new GA),PA}class zr{constructor(e,r){this.timeAdded=0,this.fadeEndTime=0,this.tileID=e,this.uid=l.a7(),this.uses=0,this.tileSize=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(e){let r=e+this.timeAdded;ru.getLayer(Q))).filter(Boolean);if(B.length!==0){m.layers=B,m.stateDependentLayerIds&&(m.stateDependentLayers=m.stateDependentLayerIds.map((Q=>B.filter((C=>C.id===Q))[0])));for(let Q of B)d[Q.id]=m}}return d})(e.buckets,r==null?void 0:r.style),this.hasSymbolBuckets=!1;for(let a in this.buckets){let u=this.buckets[a];if(u instanceof l.a9){if(this.hasSymbolBuckets=!0,!s)break;u.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let a in this.buckets){let u=this.buckets[a];if(u instanceof l.a9&&u.hasRTLText){this.hasRTLText=!0,RA().lazyLoad();break}}this.queryPadding=0;for(let a in this.buckets){let u=this.buckets[a];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(a).queryRadius(u))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),this.dashPositions=e.dashPositions}else this.collisionBoxArray=new l.a8}unloadVectorData(){for(let e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.dashPositions&&(this.dashPositions=null),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(let s in this.buckets){let a=this.buckets[s];a.uploadPending()&&a.upload(e)}let r=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new l.T(e,this.imageAtlas.image,r.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new l.T(e,this.glyphAtlasImage,r.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,r,s,a,u,d,m,B,Q,C,x){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:a,cameraQueryGeometry:u,scale:d,tileSize:this.tileSize,pixelPosMatrix:C,transform:B,params:m,queryPadding:this.queryPadding*Q,getElevation:x},e,r,s):{}}querySourceFeatures(e,r){let s=this.latestFeatureIndex;if(!s||!s.rawTileData)return;let a=s.loadVTLayers(),u=r&&r.sourceLayer?r.sourceLayer:"",d=a._geojsonTileLayer||a[u];if(!d)return;let m=l.aa(r==null?void 0:r.filter,r==null?void 0:r.globalState),{z:B,x:Q,y:C}=this.tileID.canonical,x={z:B,x:Q,y:C};for(let I=0;Is)a=!1;else if(r)if(this.expirationTime{this.remove(e,u)}),s)),this.data[a].push(u),this.order.push(a),this.order.length>this.max){let d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){let r=this.data[e].shift();return r.timeout&&clearTimeout(r.timeout),this.data[e].length===0&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),r.value}getByKey(e){let r=this.data[e];return r?r[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,r){if(!this.has(e))return this;let s=e.wrapped().key,a=r===void 0?0:this.data[s].indexOf(r),u=this.data[s][a];return this.data[s].splice(a,1),u.timeout&&clearTimeout(u.timeout),this.data[s].length===0&&delete this.data[s],this.onRemove(u.value),this.order.splice(this.order.indexOf(s),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let r=this._getAndRemoveByKey(this.order[0]);r&&this.onRemove(r)}return this}filter(e){let r=[];for(let s in this.data)for(let a of this.data[s])e(a.value)||r.push(a);for(let s of r)this.remove(s.value.tileID,s)}}class S{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(e,r,s){let a=String(r);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][a]=this.stateChanges[e][a]||{},l.e(this.stateChanges[e][a],s),this.deletedStates[e]===null){this.deletedStates[e]={};for(let u in this.state[e])u!==a&&(this.deletedStates[e][u]=null)}else if(this.deletedStates[e]&&this.deletedStates[e][a]===null){this.deletedStates[e][a]={};for(let u in this.state[e][a])s[u]||(this.deletedStates[e][a][u]=null)}else for(let u in s)this.deletedStates[e]&&this.deletedStates[e][a]&&this.deletedStates[e][a][u]===null&&delete this.deletedStates[e][a][u]}removeFeatureState(e,r,s){if(this.deletedStates[e]===null)return;let a=String(r);if(this.deletedStates[e]=this.deletedStates[e]||{},s&&r!==void 0)this.deletedStates[e][a]!==null&&(this.deletedStates[e][a]=this.deletedStates[e][a]||{},this.deletedStates[e][a][s]=null);else if(r!==void 0)if(this.stateChanges[e]&&this.stateChanges[e][a])for(s in this.deletedStates[e][a]={},this.stateChanges[e][a])this.deletedStates[e][a][s]=null;else this.deletedStates[e][a]=null;else this.deletedStates[e]=null}getState(e,r){let s=String(r),a=l.e({},(this.state[e]||{})[s],(this.stateChanges[e]||{})[s]);if(this.deletedStates[e]===null)return{};if(this.deletedStates[e]){let u=this.deletedStates[e][r];if(u===null)return{};for(let d in u)delete a[d]}return a}initializeTileState(e,r){e.setFeatureState(this.state,r)}coalesceChanges(e,r){let s={};for(let a in this.stateChanges){this.state[a]=this.state[a]||{};let u={};for(let d in this.stateChanges[a])this.state[a][d]||(this.state[a][d]={}),l.e(this.state[a][d],this.stateChanges[a][d]),u[d]=this.state[a][d];s[a]=u}for(let a in this.deletedStates){this.state[a]=this.state[a]||{};let u={};if(this.deletedStates[a]===null)for(let d in this.state[a])u[d]={},this.state[a][d]={};else for(let d in this.deletedStates[a]){if(this.deletedStates[a][d]===null)this.state[a][d]={};else for(let m of Object.keys(this.deletedStates[a][d]))delete this.state[a][d][m];u[d]=this.state[a][d]}s[a]=s[a]||{},l.e(s[a],u)}if(this.stateChanges={},this.deletedStates={},Object.keys(s).length!==0)for(let a in e)e[a].setFeatureState(s,r)}}let M=89.25;function L(h,e){let r=l.ah(e.lat,-l.ai,l.ai);return new l.P(l.V(e.lng)*h,l.U(r)*h)}function j(h,e){return new l.a1(e.x/h,e.y/h).toLngLat()}function Z(h){return h.cameraToCenterDistance*Math.min(.85*Math.tan(l.ae(90-h.pitch)),Math.tan(l.ae(M-h.pitch)))}function W(h,e){let r=h.canonical,s=e/l.af(r.z),a=r.x+Math.pow(2,r.z)*h.wrap,u=l.ag(new Float64Array(16));return l.M(u,u,[a*s,r.y*s,0]),l.N(u,u,[s/l.$,s/l.$,1]),u}function ne(h,e,r,s,a){let u=l.a1.fromLngLat(h,e),d=a*l.aj(1,h.lat),m=d*Math.cos(l.ae(r)),B=Math.sqrt(d*d-m*m),Q=B*Math.sin(l.ae(-s)),C=B*Math.cos(l.ae(-s));return new l.a1(u.x+Q,u.y+C,u.z+m)}function ie(h,e,r){let s=e.intersectsFrustum(h);if(!r||s===0)return s;let a=e.intersectsPlane(r);return a===0?0:s===2&&a===2?2:1}function de(h,e,r){let s=0,a=(r-e)/10;for(let u=0;u<10;u++)s+=a*Math.pow(Math.cos(e+(u+.5)/10*(r-e)),h);return s}function Qe(h,e){return function(r,s,a,u,d){let m=2*((h-1)/l.ak(Math.cos(l.ae(M-d))/Math.cos(l.ae(M)))-1),B=Math.acos(a/u),Q=2*de(m-1,0,l.ae(d/2)),C=Math.min(l.ae(M),B+l.ae(d/2)),x=de(m-1,Math.min(C,B-l.ae(d/2)),C),I=Math.atan(s/a),b=Math.hypot(s,a),T=r;return T+=l.ak(u/b/Math.max(.5,Math.cos(l.ae(d/2)))),T+=m*l.ak(Math.cos(I))/2,T-=l.ak(Math.max(1,x/Q/e))/2,T}}let me=Qe(9.314,3);function ke(h,e){let r=(e.roundZoom?Math.round:Math.floor)(h.zoom+l.ak(h.tileSize/e.tileSize));return Math.max(0,r)}function Ae(h,e){let r=h.getCameraFrustum(),s=h.getClippingPlane(),a=h.screenPointToMercatorCoordinate(h.getCameraPoint()),u=l.a1.fromLngLat(h.center,h.elevation);a.z=u.z+Math.cos(h.pitchInRadians)*h.cameraToCenterDistance/h.worldSize;let d=h.getCoveringTilesDetailsProvider(),m=d.allowVariableZoom(h,e),B=ke(h,e),Q=e.minzoom||0,C=e.maxzoom!==void 0?e.maxzoom:h.maxZoom,x=Math.min(Math.max(0,B),C),I=Math.pow(2,x),b=[I*a.x,I*a.y,0],T=[I*u.x,I*u.y,0],G=Math.hypot(u.x-a.x,u.y-a.y),P=Math.abs(u.z-a.z),R=Math.hypot(G,P),z=H=>({zoom:0,x:0,y:0,wrap:H,fullyVisible:!1}),K=[],Y=[];if(h.renderWorldCopies&&d.allowWorldCopies())for(let H=1;H<=3;H++)K.push(z(-H)),K.push(z(H));for(K.push(z(0));K.length>0;){let H=K.pop(),V=H.x,O=H.y,q=H.fullyVisible,ce={x:V,y:O,z:H.zoom},se=d.getTileBoundingVolume(ce,H.wrap,h.elevation,e);if(!q){let we=ie(r,se,s);if(we===0)continue;q=we===2}let ae=d.distanceToTile2d(a.x,a.y,ce,se),he=B;m&&(he=(e.calculateTileZoom||me)(h.zoom+l.ak(h.tileSize/e.tileSize),ae,P,R,h.fov)),he=(e.roundZoom?Math.round:Math.floor)(he),he=Math.max(0,he);let Ee=Math.min(he,C);if(H.wrap=d.getWrap(u,ce,H.wrap),H.zoom>=Ee){if(H.zoom>1),wrap:H.wrap,fullyVisible:q})}return Y.sort(((H,V)=>H.distanceSq-V.distanceSq)).map((H=>H.tileID))}let He=l.a2.fromPoints([new l.P(0,0),new l.P(l.$,l.$)]);class At extends l.E{constructor(e,r,s){super(),this.id=e,this.dispatcher=s,this.on("data",(a=>this._dataHandler(a))),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((a,u,d,m)=>{let B=new(kA(u.type))(a,u,d,m);if(B.id!==a)throw new Error(`Expected Source id to be ${a} instead of ${B.id}`);return B})(e,r,s,this),this._tiles={},this._cache=new $(0,(a=>this._unloadTile(a))),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new S,this._didEmitContent=!1,this._updated=!1}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(e)}onRemove(e){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let e in this._tiles){let r=this._tiles[e];if(r.state!=="loaded"&&r.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,r,s){return l._(this,void 0,void 0,(function*(){try{yield this._source.loadTile(e),this._tileLoaded(e,r,s)}catch(a){e.state="errored",a.status!==404?this._source.fire(new l.k(a,{tile:e})):this.update(this.transform,this.terrain)}}))}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new l.l("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let r in this._tiles){let s=this._tiles[r];s.upload(e),s.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map((e=>e.tileID)).sort(Ne).map((e=>e.key))}getRenderableIds(e){let r=[];for(let s in this._tiles)this._isIdRenderable(s,e)&&r.push(this._tiles[s]);return e?r.sort(((s,a)=>{let u=s.tileID,d=a.tileID,m=new l.P(u.canonical.x,u.canonical.y)._rotate(-this.transform.bearingInRadians),B=new l.P(d.canonical.x,d.canonical.y)._rotate(-this.transform.bearingInRadians);return u.overscaledZ-d.overscaledZ||B.y-m.y||B.x-m.x})).map((s=>s.tileID.key)):r.map((s=>s.tileID)).sort(Ne).map((s=>s.key))}hasRenderableParent(e){let r=this.findLoadedParent(e,0);return!!r&&this._isIdRenderable(r.tileID.key)}_isIdRenderable(e,r){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(r||!this._tiles[e].holdingForFade())}reload(e){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let r in this._tiles)e?this._reloadTile(r,"expired"):this._tiles[r].state!=="errored"&&this._reloadTile(r,"reloading")}}_reloadTile(e,r){return l._(this,void 0,void 0,(function*(){let s=this._tiles[e];s&&(s.state!=="loading"&&(s.state=r),yield this._loadTile(s,e,r))}))}_tileLoaded(e,r,s){e.timeAdded=Se.now(),s==="expired"&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),this.getSource().type==="raster-dem"&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new l.l("data",{dataType:"source",tile:e,coord:e.tileID}))}_backfillDEM(e){let r=this.getRenderableIds();for(let a=0;a1||(Math.abs(d)>1&&(Math.abs(d+B)===1?d+=B:Math.abs(d-B)===1&&(d-=B)),u.dem&&a.dem&&(a.dem.backfillBorder(u.dem,d,m),a.neighboringTiles&&a.neighboringTiles[Q]&&(a.neighboringTiles[Q].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,r){let s=Object.values(e),a=this._getLoadedDescendents(s),u={};for(let d of s){let m=a[d.key];if(!(m!=null&&m.length)){u[d.key]=d;continue}let B=d.overscaledZ+At.maxUnderzooming,Q=m.filter((I=>I.tileID.overscaledZ<=B));if(!Q.length){u[d.key]=d;continue}let C=Math.min(...Q.map((I=>I.tileID.overscaledZ))),x=Q.filter((I=>I.tileID.overscaledZ===C)).map((I=>I.tileID));for(let I of x)r[I.key]=I;this._areDescendentsComplete(x,C,d.overscaledZ)||(u[d.key]=d)}return u}_getLoadedDescendents(e){var r;let s={};for(let a in this._tiles){let u=this._tiles[a];if(u.hasData())for(let d of e)u.tileID.isChildOf(d)&&(s[r=d.key]||(s[r]=[])).push(u)}return s}_areDescendentsComplete(e,r,s){return e.length===1&&e[0].isOverscaled()?e[0].overscaledZ===r:Math.pow(4,r-s)===e.length}findLoadedParent(e,r){if(e.key in this._loadedParentTiles){let s=this._loadedParentTiles[e.key];return s&&s.tileID.overscaledZ>=r?s:null}for(let s=e.overscaledZ-1;s>=r;s--){let a=e.scaledTo(s),u=this._getLoadedTile(a);if(u)return u}}findLoadedSibling(e){return this._getLoadedTile(e)}_getLoadedTile(e){let r=this._tiles[e.key];return r&&r.hasData()?r:this._cache.getByKey(e.wrapped().key)}updateCacheSize(e){let r=Math.ceil(e.width/this._source.tileSize)+1,s=Math.ceil(e.height/this._source.tileSize)+1,a=Math.floor(r*s*(this._maxTileCacheZoomLevels===null?l.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),u=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,a):a;this._cache.setMaxSize(u)}handleWrapJump(e){let r=Math.round((e-(this._prevLng===void 0?e:this._prevLng))/360);if(this._prevLng=e,r){let s={};for(let a in this._tiles){let u=this._tiles[a];u.tileID=u.tileID.unwrapTo(u.tileID.wrap+r),s[u.tileID.key]=u}this._tiles=s;for(let a in this._timers)clearTimeout(this._timers[a]),delete this._timers[a];for(let a in this._tiles)this._setTileReloadTimer(a,this._tiles[a])}}update(e,r){if(!this._sourceLoaded||this._paused)return;let s;this.transform=e,this.terrain=r,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?s=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((Q=>new l.Z(Q.canonical.z,Q.wrap,Q.canonical.z,Q.canonical.x,Q.canonical.y))):(s=Ae(e,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:r,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(s=s.filter((Q=>this._source.hasTile(Q))))):s=[],this.usedForTerrain&&(s=this._addTerrainIdealTiles(s));let a=ke(e,this._source),u=Math.max(a-At.maxOverzooming,this._source.minzoom),d=s.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,d&&this.fire(new l.l("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let m=this._updateRetainedTiles(s,a);Je(this._source.type)&&!r&&this._updateFadingTiles(m,u);for(let Q in m)this._tiles[Q].clearFadeHold();let B=l.am(this._tiles,m);for(let Q of B){let C=this._tiles[Q];C.hasSymbolBuckets&&!C.holdingForFade()?C.setHoldDuration(this.map._fadeDuration):C.hasSymbolBuckets&&!C.symbolFadeFinished()||this._removeTile(Q)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}_addTerrainIdealTiles(e){let r=[];for(let s of e)if(s.canonical.z>this._source.minzoom){let a=s.scaledTo(s.canonical.z-1);r.push(a);let u=s.scaledTo(Math.max(this._source.minzoom,Math.min(s.canonical.z,5)));r.push(u)}return e.concat(r)}releaseSymbolFadeTiles(){for(let e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)}_updateRetainedTiles(e,r){var s;let a={},u={},d=Math.max(r-At.maxOverzooming,this._source.minzoom),m={};for(let B of e){let Q=this._addTile(B);a[B.key]=B,Q.hasData()||(m[B.key]=B)}m=this._retainLoadedChildren(m,a);for(let B in m){let Q=m[B],C=this._tiles[B],x=C==null?void 0:C.wasRequested();for(let I=Q.overscaledZ-1;I>=d;--I){let b=Q.scaledTo(I);if(u[b.key])break;if(u[b.key]=!0,C=this.getTile(b),!C&&x&&(C=this._addTile(b)),C){let T=C.hasData();if((T||!(!((s=this.map)===null||s===void 0)&&s.cancelPendingTileRequestsWhileZooming)||x)&&(a[b.key]=b),x=C.wasRequested(),T)break}}}return a}_updateFadingTiles(e,r){let s={},a={},u=Object.keys(e),d=Se.now();for(let m of u){let B=e[m],Q=this._tiles[m];if(!Q||Q.fadeEndTime!==0&&Q.fadeEndTime<=d)continue;let C=this.findLoadedParent(B,r),x=this.findLoadedSibling(B),I=C||x||null;I&&(this._addTile(I.tileID),s[I.tileID.key]=I.tileID),a[m]=B}this._retainLoadedChildren(a,e);for(let m in s)e[m]||(this._coveredTiles[m]=!0,e[m]=s[m])}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let e in this._tiles){let r=[],s,a=this._tiles[e].tileID;for(;a.overscaledZ>0;){if(a.key in this._loadedParentTiles){s=this._loadedParentTiles[a.key];break}r.push(a.key);let u=a.scaledTo(a.overscaledZ-1);if(s=this._getLoadedTile(u),s)break;a=u}for(let u of r)this._loadedParentTiles[u]=s}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let e in this._tiles){let r=this._tiles[e].tileID,s=this._getLoadedTile(r);this._loadedSiblingTiles[r.key]=s}}_addTile(e){let r=this._tiles[e.key];if(r)return r;r=this._cache.getAndRemove(e),r&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));let s=r;return r||(r=new zr(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,e.key,r.state)),r.uses++,this._tiles[e.key]=r,s||this._source.fire(new l.l("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r}_setTileReloadTimer(e,r){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);let s=r.getExpiryTimeout();s&&(this._timers[e]=setTimeout((()=>{this._reloadTile(e,"expired"),delete this._timers[e]}),s))}refreshTiles(e){for(let r in this._tiles)(this._isIdRenderable(r)||this._tiles[r].state=="errored")&&e.some((s=>s.equals(this._tiles[r].tileID.canonical)))&&this._reloadTile(r,"expired")}_removeTile(e){let r=this._tiles[e];r&&(r.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),r.uses>0||(r.hasData()&&r.state!=="reloading"?this._cache.add(r.tileID,r,r.getExpiryTimeout()):(r.aborted=!0,this._abortTile(r),this._unloadTile(r))))}_dataHandler(e){let r=e.sourceDataType;e.dataType==="source"&&r==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&e.dataType==="source"&&r==="content"&&(this.reload(e.sourceDataChanged),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let e in this._tiles)this._removeTile(e);this._cache.reset()}tilesIn(e,r,s){let a=[],u=this.transform;if(!u)return a;let d=u.getCoveringTilesDetailsProvider().allowWorldCopies(),m=s?u.getCameraQueryGeometry(e):e,B=b=>u.screenPointToMercatorCoordinate(b,this.terrain),Q=this.transformBbox(e,B,!d),C=this.transformBbox(m,B,!d),x=this.getIds(),I=l.a2.fromPoints(C);for(let b=0;bz.getTilePoint(new l.a1(Y.x,Y.y))));if(K.expandBy(R),K.intersects(He)){let Y=Q.map((V=>z.getTilePoint(V))),H=C.map((V=>z.getTilePoint(V)));a.push({tile:T,tileID:d?z:z.unwrapTo(0),queryGeometry:Y,cameraQueryGeometry:H,scale:P})}}}return a}transformBbox(e,r,s){let a=e.map(r);if(s){let u=l.a2.fromPoints(e);u.shrinkBy(.001*Math.min(u.width(),u.height()));let d=u.map(r);l.a2.fromPoints(a).covers(d)||(a=a.map((m=>m.x>.5?new l.a1(m.x-1,m.y,m.z):m)))}return a}getVisibleCoordinates(e){let r=this.getRenderableIds(e).map((s=>this._tiles[s].tileID));return this.transform&&this.transform.populateCache(r),r}hasTransition(){if(this._source.hasTransition())return!0;if(Je(this._source.type)){let e=Se.now();for(let r in this._tiles)if(this._tiles[r].fadeEndTime>=e)return!0}return!1}setFeatureState(e,r,s){this._state.updateState(e=e||"_geojsonTileLayer",r,s)}removeFeatureState(e,r,s){this._state.removeFeatureState(e=e||"_geojsonTileLayer",r,s)}getFeatureState(e,r){return this._state.getState(e=e||"_geojsonTileLayer",r)}setDependencies(e,r,s){let a=this._tiles[e];a&&a.setDependencies(r,s)}reloadTilesForDependencies(e,r){for(let s in this._tiles)this._tiles[s].hasDependency(e,r)&&this._reloadTile(s,"reloading");this._cache.filter((s=>!s.hasDependency(e,r)))}}function Ne(h,e){let r=Math.abs(2*h.wrap)-+(h.wrap<0),s=Math.abs(2*e.wrap)-+(e.wrap<0);return h.overscaledZ-e.overscaledZ||s-r||e.canonical.y-h.canonical.y||e.canonical.x-h.canonical.x}function Je(h){return h==="raster"||h==="image"||h==="video"}At.maxOverzooming=10,At.maxUnderzooming=3;class _t{constructor(e,r){this.reset(e,r)}reset(e,r){this.points=e||[],this._distances=[0];for(let s=1;s0?(a-d)/m:0;return this.points[u].mult(1-B).add(this.points[r].mult(B))}}function Yt(h,e){let r=!0;return h==="always"||h!=="never"&&e!=="never"||(r=!1),r}class Vt{constructor(e,r,s){let a=this.boxCells=[],u=this.circleCells=[];this.xCellCount=Math.ceil(e/s),this.yCellCount=Math.ceil(r/s);for(let d=0;dthis.width||a<0||r>this.height)return[];let B=[];if(e<=0&&r<=0&&this.width<=s&&this.height<=a){if(u)return[{key:null,x1:e,y1:r,x2:s,y2:a}];for(let Q=0;Q0}hitTestCircle(e,r,s,a,u){let d=e-s,m=e+s,B=r-s,Q=r+s;if(m<0||d>this.width||Q<0||B>this.height)return!1;let C=[];return this._forEachCell(d,B,m,Q,this._queryCellCircle,C,{hitTest:!0,overlapMode:a,circle:{x:e,y:r,radius:s},seenUids:{box:{},circle:{}}},u),C.length>0}_queryCell(e,r,s,a,u,d,m,B){let{seenUids:Q,hitTest:C,overlapMode:x}=m,I=this.boxCells[u];if(I!==null){let T=this.bboxes;for(let G of I)if(!Q.box[G]){Q.box[G]=!0;let P=4*G,R=this.boxKeys[G];if(e<=T[P+2]&&r<=T[P+3]&&s>=T[P+0]&&a>=T[P+1]&&(!B||B(R))&&(!C||!Yt(x,R.overlapMode))&&(d.push({key:R,x1:T[P],y1:T[P+1],x2:T[P+2],y2:T[P+3]}),C))return!0}}let b=this.circleCells[u];if(b!==null){let T=this.circles;for(let G of b)if(!Q.circle[G]){Q.circle[G]=!0;let P=3*G,R=this.circleKeys[G];if(this._circleAndRectCollide(T[P],T[P+1],T[P+2],e,r,s,a)&&(!B||B(R))&&(!C||!Yt(x,R.overlapMode))){let z=T[P],K=T[P+1],Y=T[P+2];if(d.push({key:R,x1:z-Y,y1:K-Y,x2:z+Y,y2:K+Y}),C)return!0}}}return!1}_queryCellCircle(e,r,s,a,u,d,m,B){let{circle:Q,seenUids:C,overlapMode:x}=m,I=this.boxCells[u];if(I!==null){let T=this.bboxes;for(let G of I)if(!C.box[G]){C.box[G]=!0;let P=4*G,R=this.boxKeys[G];if(this._circleAndRectCollide(Q.x,Q.y,Q.radius,T[P+0],T[P+1],T[P+2],T[P+3])&&(!B||B(R))&&!Yt(x,R.overlapMode))return d.push(!0),!0}}let b=this.circleCells[u];if(b!==null){let T=this.circles;for(let G of b)if(!C.circle[G]){C.circle[G]=!0;let P=3*G,R=this.circleKeys[G];if(this._circlesCollide(T[P],T[P+1],T[P+2],Q.x,Q.y,Q.radius)&&(!B||B(R))&&!Yt(x,R.overlapMode))return d.push(!0),!0}}}_forEachCell(e,r,s,a,u,d,m,B){let Q=this._convertToXCellCoord(e),C=this._convertToYCellCoord(r),x=this._convertToXCellCoord(s),I=this._convertToYCellCoord(a);for(let b=Q;b<=x;b++)for(let T=C;T<=I;T++)if(u.call(this,e,r,s,a,this.xCellCount*T+b,d,m,B))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,r,s,a,u,d){let m=a-e,B=u-r,Q=s+d;return Q*Q>m*m+B*B}_circleAndRectCollide(e,r,s,a,u,d,m){let B=(d-a)/2,Q=Math.abs(e-(a+B));if(Q>B+s)return!1;let C=(m-u)/2,x=Math.abs(r-(u+C));if(x>C+s)return!1;if(Q<=B||x<=C)return!0;let I=Q-B,b=x-C;return I*I+b*b<=s*s}}function qt(h,e,r){let s=l.L();if(!h){let{vecSouth:x,vecEast:I}=yt(e),b=Ue();b[0]=I[0],b[1]=I[1],b[2]=x[0],b[3]=x[1],a=b,(C=(d=(u=b)[0])*(Q=u[3])-(B=u[2])*(m=u[1]))&&(a[0]=Q*(C=1/C),a[1]=-m*C,a[2]=-B*C,a[3]=d*C),s[0]=b[0],s[1]=b[1],s[4]=b[2],s[5]=b[3]}var a,u,d,m,B,Q,C;return l.N(s,s,[1/r,1/r,1]),s}function $t(h,e,r,s){if(h){let a=l.L();if(!e){let{vecSouth:u,vecEast:d}=yt(r);a[0]=d[0],a[1]=d[1],a[4]=u[0],a[5]=u[1]}return l.N(a,a,[s,s,1]),a}return r.pixelsToClipSpaceMatrix}function yt(h){let e=Math.cos(h.rollInRadians),r=Math.sin(h.rollInRadians),s=Math.cos(h.pitchInRadians),a=Math.cos(h.bearingInRadians),u=Math.sin(h.bearingInRadians),d=l.ar();d[0]=-a*s*r-u*e,d[1]=-u*s*r+a*e;let m=l.as(d);m<1e-9?l.at(d):l.au(d,d,1/m);let B=l.ar();B[0]=a*s*e-u*r,B[1]=u*s*e+a*r;let Q=l.as(B);return Q<1e-9?l.at(B):l.au(B,B,1/Q),{vecEast:B,vecSouth:d}}function Ot(h,e,r,s){let a;s?(a=[h,e,s(h,e),1],l.aw(a,a,r)):(a=[h,e,0,1],Yr(a,a,r));let u=a[3];return{point:new l.P(a[0]/u,a[1]/u),signedDistanceFromCamera:u,isOccluded:!1}}function Be(h,e){return .5+h/e*.5}function Kt(h,e){return h.x>=-e[0]&&h.x<=e[0]&&h.y>=-e[1]&&h.y<=e[1]}function Ui(h,e,r,s,a,u,d,m,B,Q,C,x,I){let b=r?h.textSizeData:h.iconSizeData,T=l.an(b,e.transform.zoom),G=[256/e.width*2+1,256/e.height*2+1],P=r?h.text.dynamicLayoutVertexArray:h.icon.dynamicLayoutVertexArray;P.clear();let R=h.lineVertexArray,z=r?h.text.placedSymbolArray:h.icon.placedSymbolArray,K=e.transform.width/e.transform.height,Y=!1;for(let H=0;HMath.abs(r.x-e.x)*s?{useVertical:!0}:(h===l.ao.vertical?e.yr.x)?{needsFlipping:!0}:null}function Ie(h){let{projectionContext:e,pitchedLabelPlaneMatrixInverse:r,symbol:s,fontSize:a,flip:u,keepUpright:d,glyphOffsetArray:m,dynamicLayoutVertexArray:B,aspectRatio:Q,rotateToLine:C}=h,x=a/24,I=s.lineOffsetX*x,b=s.lineOffsetY*x,T;if(s.numGlyphs>1){let G=s.glyphStartIndex+s.numGlyphs,P=s.lineStartIndex,R=s.lineStartIndex+s.lineLength,z=ar(x,m,I,b,u,s,C,e);if(!z)return{notEnoughRoom:!0};let K=lr(z.first.point.x,z.first.point.y,e,r),Y=lr(z.last.point.x,z.last.point.y,e,r);if(d&&!u){let H=fi(s.writingMode,K,Y,Q);if(H)return H}T=[z.first];for(let H=s.glyphStartIndex+1;H0?K.point:Ve(e.tileAnchorPoint,z,P,1,e),H=lr(P.x,P.y,e,r),V=lr(Y.x,Y.y,e,r),O=fi(s.writingMode,H,V,Q);if(O)return O}let G=zA(x*m.getoffsetX(s.glyphStartIndex),I,b,u,s.segment,s.lineStartIndex,s.lineStartIndex+s.lineLength,e,C);if(!G||e.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};T=[G]}for(let G of T)l.av(B,G.point,G.angle);return{}}function Ve(h,e,r,s,a){let u=h.add(h.sub(e)._unit()),d=li(u.x,u.y,a).point,m=r.sub(d);return r.add(m._mult(s/m.mag()))}function We(h,e,r){let s=e.projectionCache;if(s.projections[h])return s.projections[h];let a=new l.P(e.lineVertexArray.getx(h),e.lineVertexArray.gety(h)),u=li(a.x,a.y,e);if(u.signedDistanceFromCamera>0)return s.projections[h]=u.point,s.anyProjectionOccluded=s.anyProjectionOccluded||u.isOccluded,u.point;let d=h-r.direction;return Ve(r.distanceFromAnchor===0?e.tileAnchorPoint:new l.P(e.lineVertexArray.getx(d),e.lineVertexArray.gety(d)),a,r.previousVertex,r.absOffsetX-r.distanceFromAnchor+1,e)}function li(h,e,r){let s=h+r.translation[0],a=e+r.translation[1],u;return r.pitchWithMap?(u=Ot(s,a,r.pitchedLabelPlaneMatrix,r.getElevation),u.isOccluded=!1):(u=r.transform.projectTileCoordinates(s,a,r.unwrappedTileID,r.getElevation),u.point.x=(.5*u.point.x+.5)*r.width,u.point.y=(.5*-u.point.y+.5)*r.height),u}function lr(h,e,r,s){if(r.pitchWithMap){let a=[h,e,0,1];return l.aw(a,a,s),r.transform.projectTileCoordinates(a[0]/a[3],a[1]/a[3],r.unwrappedTileID,r.getElevation).point}return{x:h/r.width*2-1,y:1-e/r.height*2}}function NA(h,e,r){return r.transform.projectTileCoordinates(h,e,r.unwrappedTileID,r.getElevation)}function qe(h,e,r){return h._unit()._perp()._mult(e*r)}function $n(h,e,r,s,a,u,d,m,B){if(m.projectionCache.offsets[h])return m.projectionCache.offsets[h];let Q=r.add(e);if(h+B.direction=a)return m.projectionCache.offsets[h]=Q,Q;let C=We(h+B.direction,m,B),x=qe(C.sub(r),d,B.direction),I=r.add(x),b=C.add(x);return m.projectionCache.offsets[h]=l.ax(u,Q,I,b)||Q,m.projectionCache.offsets[h]}function zA(h,e,r,s,a,u,d,m,B){let Q=s?h-e:h+e,C=Q>0?1:-1,x=0;s&&(C*=-1,x=Math.PI),C<0&&(x+=Math.PI);let I,b=C>0?u+a:u+a+1;m.projectionCache.cachedAnchorPoint?I=m.projectionCache.cachedAnchorPoint:(I=li(m.tileAnchorPoint.x,m.tileAnchorPoint.y,m).point,m.projectionCache.cachedAnchorPoint=I);let T,G,P=I,R=I,z=0,K=0,Y=Math.abs(Q),H=[],V;for(;z+K<=Y;){if(b+=C,b=d)return null;z+=K,R=P,G=T;let ce={absOffsetX:Y,direction:C,distanceFromAnchor:z,previousVertex:R};if(P=We(b,m,ce),r===0)H.push(R),V=P.sub(R);else{let se,ae=P.sub(R);se=ae.mag()===0?qe(We(b+C,m,ce).sub(P),r,C):qe(ae,r,C),G||(G=R.add(se)),T=$n(b,se,P,u,d,G,r,m,ce),H.push(G),V=T.sub(G)}K=V.mag()}let O=V._mult((Y-z)/K)._add(G||R),q=x+Math.atan2(P.y-R.y,P.x-R.x);return H.push(O),{point:O,angle:B?q:0,path:H}}let Wn=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function gA(h,e){for(let r=0;r=1;$e--)we.push(he.path[$e]);for(let $e=1;$eut.signedDistanceFromCamera<=0))?[]:$e.map((ut=>ut.point))}let Te=[];if(we.length>0){let $e=we[0].clone(),ut=we[0].clone();for(let wt=1;wt=ce.x&&ut.x<=se.x&&$e.y>=ce.y&&ut.y<=se.y?[we]:ut.xse.x||ut.yse.y?[]:l.ay([we],ce.x,ce.y,se.x,se.y)}for(let $e of Te){ae.reset($e,.25*q);let ut=0;ut=ae.length<=.5*q?1:Math.ceil(ae.paddedLength/_e)+1;for(let wt=0;wt{let B=Ot(m.x,m.y,d,u.getElevation),Q=u.transform.projectTileCoordinates(B.point.x,B.point.y,u.unwrappedTileID,u.getElevation);return Q.point.x=(.5*Q.point.x+.5)*u.width,Q.point.y=(.5*-Q.point.y+.5)*u.height,Q}))})(e,r);return(function(a){let u=0,d=0,m=0,B=0;for(let Q=0;Qd&&(d=B,u=m));return a.slice(u,u+d)})(s)}queryRenderedSymbols(e){if(e.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let r=[],s=new l.a2;for(let x of e){let I=new l.P(x.x+Pt,x.y+Pt);s.extend(I),r.push(I)}let{minX:a,minY:u,maxX:d,maxY:m}=s,B=this.grid.query(a,u,d,m).concat(this.ignoredGrid.query(a,u,d,m)),Q={},C={};for(let x of B){let I=x.key;if(Q[I.bucketInstanceId]===void 0&&(Q[I.bucketInstanceId]={}),Q[I.bucketInstanceId][I.featureIndex])continue;let b=[new l.P(x.x1,x.y1),new l.P(x.x2,x.y1),new l.P(x.x2,x.y2),new l.P(x.x1,x.y2)];l.az(r,b)&&(Q[I.bucketInstanceId][I.featureIndex]=!0,C[I.bucketInstanceId]===void 0&&(C[I.bucketInstanceId]=[]),C[I.bucketInstanceId].push(I.featureIndex))}return C}insertCollisionBox(e,r,s,a,u,d){(s?this.ignoredGrid:this.grid).insert({bucketInstanceId:a,featureIndex:u,collisionGroupID:d,overlapMode:r},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,r,s,a,u,d){let m=s?this.ignoredGrid:this.grid,B={bucketInstanceId:a,featureIndex:u,collisionGroupID:d,overlapMode:r};for(let Q=0;Q=this.screenRightBoundary||athis.screenBottomBoundary}isInsideGrid(e,r,s,a){return s>=0&&e=0&&rthis.projectAndGetPerspectiveRatio(_e.x,_e.y,a,Q,x)));Ee=we.some((_e=>!_e.isOccluded)),he=we.map((_e=>new l.P(_e.x,_e.y)))}else Ee=!0;return{box:l.aA(he),allPointsOccluded:!Ee}}}class Fi{constructor(e,r,s,a){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?r:-r))):a&&s?1:0,this.placed=s}isHidden(){return this.opacity===0&&!this.placed}}class ft{constructor(e,r,s,a,u){this.text=new Fi(e?e.text:null,r,s,u),this.icon=new Fi(e?e.icon:null,r,a,u)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Ia{constructor(e,r,s){this.text=e,this.icon=r,this.skipFade=s}}class hn{constructor(e,r,s,a,u){this.bucketInstanceId=e,this.featureIndex=r,this.sourceLayerIndex=s,this.bucketIndex=a,this.tileID=u}}class ro{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let r=++this.maxGroupID;this.collisionGroups[e]={ID:r,predicate:s=>s.collisionGroupID===r}}return this.collisionGroups[e]}}function YA(h,e,r,s,a){let{horizontalAlign:u,verticalAlign:d}=l.aH(h);return new l.P(-(u-.5)*e+s[0]*a,-(d-.5)*r+s[1]*a)}class OA{constructor(e,r,s,a,u){this.transform=e.clone(),this.terrain=r,this.collisionIndex=new es(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=s,this.retainedQueryData={},this.collisionGroups=new ro(a),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=u,u&&(u.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let r=this.terrain;return r?(s,a)=>r.getElevation(e,s,a):null}getBucketParts(e,r,s,a){let u=s.getBucket(r),d=s.latestFeatureIndex;if(!u||!d||r.id!==u.layerIds[0])return;let m=s.collisionBoxArray,B=u.layers[0].layout,Q=u.layers[0].paint,C=Math.pow(2,this.transform.zoom-s.tileID.overscaledZ),x=s.tileSize/l.$,I=s.tileID.toUnwrapped(),b=B.get("text-rotation-alignment")==="map",T=l.aC(s,1,this.transform.zoom),G=l.aD(this.collisionIndex.transform,s,Q.get("text-translate"),Q.get("text-translate-anchor")),P=l.aD(this.collisionIndex.transform,s,Q.get("icon-translate"),Q.get("icon-translate-anchor")),R=qt(b,this.transform,T);this.retainedQueryData[u.bucketInstanceId]=new hn(u.bucketInstanceId,d,u.sourceLayerIndex,u.index,s.tileID);let z={bucket:u,layout:B,translationText:G,translationIcon:P,unwrappedTileID:I,pitchedLabelPlaneMatrix:R,scale:C,textPixelRatio:x,holdingForFade:s.holdingForFade(),collisionBoxArray:m,partiallyEvaluatedTextSize:l.an(u.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(u.sourceID)};if(a)for(let K of u.sortKeyRanges){let{sortKey:Y,symbolInstanceStart:H,symbolInstanceEnd:V}=K;e.push({sortKey:Y,symbolInstanceStart:H,symbolInstanceEnd:V,parameters:z})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:u.symbolInstances.length,parameters:z})}attemptAnchorPlacement(e,r,s,a,u,d,m,B,Q,C,x,I,b,T,G,P,R,z,K,Y){let H=l.aE[e.textAnchor],V=[e.textOffset0,e.textOffset1],O=YA(H,s,a,V,u),q=this.collisionIndex.placeCollisionBox(r,I,B,Q,C,m,d,P,x.predicate,K,O,Y);if((!z||this.collisionIndex.placeCollisionBox(z,I,B,Q,C,m,d,R,x.predicate,K,O,Y).placeable)&&q.placeable){let ce;if(this.prevPlacement&&this.prevPlacement.variableOffsets[b.crossTileID]&&this.prevPlacement.placements[b.crossTileID]&&this.prevPlacement.placements[b.crossTileID].text&&(ce=this.prevPlacement.variableOffsets[b.crossTileID].anchor),b.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[b.crossTileID]={textOffset:V,width:s,height:a,anchor:H,textBoxScale:u,prevAnchor:ce},this.markUsedJustification(T,H,b,G),T.allowVerticalPlacement&&(this.markUsedOrientation(T,G,b),this.placedOrientations[b.crossTileID]=G),{shift:O,placedGlyphBoxes:q}}}placeLayerBucketPart(e,r,s){let{bucket:a,layout:u,translationText:d,translationIcon:m,unwrappedTileID:B,pitchedLabelPlaneMatrix:Q,textPixelRatio:C,holdingForFade:x,collisionBoxArray:I,partiallyEvaluatedTextSize:b,collisionGroup:T}=e.parameters,G=u.get("text-optional"),P=u.get("icon-optional"),R=l.aF(u,"text-overlap","text-allow-overlap"),z=R==="always",K=l.aF(u,"icon-overlap","icon-allow-overlap"),Y=K==="always",H=u.get("text-rotation-alignment")==="map",V=u.get("text-pitch-alignment")==="map",O=u.get("icon-text-fit")!=="none",q=u.get("symbol-z-order")==="viewport-y",ce=z&&(Y||!a.hasIconData()||P),se=Y&&(z||!a.hasTextData()||G);!a.collisionArrays&&I&&a.deserializeCollisionBoxes(I);let ae=this.retainedQueryData[a.bucketInstanceId].tileID,he=this._getTerrainElevationFunc(ae),Ee=this.transform.getFastPathSimpleProjectionMatrix(ae),we=(_e,Te,$e)=>{var ut,wt;if(r[_e.crossTileID])return;if(x)return void(this.placements[_e.crossTileID]=new Ia(!1,!1,!1));let Bt=!1,Dt=!1,It=!0,Wt=null,Et={box:null,placeable:!1,offscreen:null,occluded:!1},pt={placeable:!1},St=null,et=null,hi=null,IA=0,Sr=0,ZA=0;Te.textFeatureIndex?IA=Te.textFeatureIndex:_e.useRuntimeCollisionCircles&&(IA=_e.featureIndex),Te.verticalTextFeatureIndex&&(Sr=Te.verticalTextFeatureIndex);let Mr=Te.textBox;if(Mr){let Gi=Ht=>{let Zt=l.ao.horizontal;if(a.allowVerticalPlacement&&!Ht&&this.prevPlacement){let xi=this.prevPlacement.placedOrientations[_e.crossTileID];xi&&(this.placedOrientations[_e.crossTileID]=xi,Zt=xi,this.markUsedOrientation(a,Zt,_e))}return Zt},VA=(Ht,Zt)=>{if(a.allowVerticalPlacement&&_e.numVerticalGlyphVertices>0&&Te.verticalTextBox){for(let xi of a.writingModes)if(xi===l.ao.vertical?(Et=Zt(),pt=Et):Et=Ht(),Et&&Et.placeable)break}else Et=Ht()},EA=_e.textAnchorOffsetStartIndex,qA=_e.textAnchorOffsetEndIndex;if(qA===EA){let Ht=(Zt,xi)=>{let xt=this.collisionIndex.placeCollisionBox(Zt,R,C,ae,B,V,H,d,T.predicate,he,void 0,Ee);return xt&&xt.placeable&&(this.markUsedOrientation(a,xi,_e),this.placedOrientations[_e.crossTileID]=xi),xt};VA((()=>Ht(Mr,l.ao.horizontal)),(()=>{let Zt=Te.verticalTextBox;return a.allowVerticalPlacement&&_e.numVerticalGlyphVertices>0&&Zt?Ht(Zt,l.ao.vertical):{box:null,offscreen:null}})),Gi(Et&&Et.placeable)}else{let Ht=l.aE[(wt=(ut=this.prevPlacement)===null||ut===void 0?void 0:ut.variableOffsets[_e.crossTileID])===null||wt===void 0?void 0:wt.anchor],Zt=(xt,Ps,ml)=>{let Bl=xt.x2-xt.x1,wc=xt.y2-xt.y1,ta=_e.textBoxScale,Rn=O&&K==="never"?Ps:null,Pi=null,BA=R==="never"?1:2,Hi="never";Ht&&BA++;for(let xA=0;xAZt(Mr,Te.iconBox,l.ao.horizontal)),(()=>{let xt=Te.verticalTextBox;return a.allowVerticalPlacement&&(!Et||!Et.placeable)&&_e.numVerticalGlyphVertices>0&&xt?Zt(xt,Te.verticalIconBox,l.ao.vertical):{box:null,occluded:!0,offscreen:null}})),Et&&(Bt=Et.placeable,It=Et.offscreen);let xi=Gi(Et&&Et.placeable);if(!Bt&&this.prevPlacement){let xt=this.prevPlacement.variableOffsets[_e.crossTileID];xt&&(this.variableOffsets[_e.crossTileID]=xt,this.markUsedJustification(a,xt.anchor,_e,xi))}}}if(St=Et,Bt=St&&St.placeable,It=St&&St.offscreen,_e.useRuntimeCollisionCircles&&_e.centerJustifiedTextSymbolIndex>=0){let Gi=a.text.placedSymbolArray.get(_e.centerJustifiedTextSymbolIndex),VA=l.ap(a.textSizeData,b,Gi),EA=u.get("text-padding");et=this.collisionIndex.placeCollisionCircles(R,Gi,a.lineVertexArray,a.glyphOffsetArray,VA,B,Q,s,V,T.predicate,_e.collisionCircleDiameter,EA,d,he),et.circles.length&&et.collisionDetected&&!s&&l.w("Collisions detected, but collision boxes are not shown"),Bt=z||et.circles.length>0&&!et.collisionDetected,It=It&&et.offscreen}if(Te.iconFeatureIndex&&(ZA=Te.iconFeatureIndex),Te.iconBox){let Gi=VA=>this.collisionIndex.placeCollisionBox(VA,K,C,ae,B,V,H,m,T.predicate,he,O&&Wt?Wt:void 0,Ee);pt&&pt.placeable&&Te.verticalIconBox?(hi=Gi(Te.verticalIconBox),Dt=hi.placeable):(hi=Gi(Te.iconBox),Dt=hi.placeable),It=It&&hi.offscreen}let Pn=G||_e.numHorizontalGlyphVertices===0&&_e.numVerticalGlyphVertices===0,JA=P||_e.numIconVertices===0;Pn||JA?JA?Pn||(Dt=Dt&&Bt):Bt=Dt&&Bt:Dt=Bt=Dt&&Bt;let Ur=Dt&&hi.placeable;if(Bt&&St.placeable&&this.collisionIndex.insertCollisionBox(St.box,R,u.get("text-ignore-placement"),a.bucketInstanceId,pt&&pt.placeable&&Sr?Sr:IA,T.ID),Ur&&this.collisionIndex.insertCollisionBox(hi.box,K,u.get("icon-ignore-placement"),a.bucketInstanceId,ZA,T.ID),et&&Bt&&this.collisionIndex.insertCollisionCircles(et.circles,R,u.get("text-ignore-placement"),a.bucketInstanceId,IA,T.ID),s&&this.storeCollisionData(a.bucketInstanceId,$e,Te,St,hi,et),_e.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(a.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[_e.crossTileID]=new Ia((Bt||ce)&&!(St!=null&&St.occluded),(Dt||se)&&!(hi!=null&&hi.occluded),It||a.justReloaded),r[_e.crossTileID]=!0};if(q){if(e.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let _e=a.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let Te=_e.length-1;Te>=0;--Te){let $e=_e[Te];we(a.symbolInstances.get($e),a.collisionArrays[$e],$e)}}else for(let _e=e.symbolInstanceStart;_e=0&&(e.text.placedSymbolArray.get(m).crossTileID=u>=0&&m!==u?0:s.crossTileID)}markUsedOrientation(e,r,s){let a=r===l.ao.horizontal||r===l.ao.horizontalOnly?r:0,u=r===l.ao.vertical?r:0,d=[s.leftJustifiedTextSymbolIndex,s.centerJustifiedTextSymbolIndex,s.rightJustifiedTextSymbolIndex];for(let m of d)e.text.placedSymbolArray.get(m).placedOrientation=a;s.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(s.verticalPlacedTextSymbolIndex).placedOrientation=u)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;let r=this.prevPlacement,s=!1;this.prevZoomAdjustment=r?r.zoomAdjustment(this.transform.zoom):0;let a=r?r.symbolFadeChange(e):1,u=r?r.opacities:{},d=r?r.variableOffsets:{},m=r?r.placedOrientations:{};for(let B in this.placements){let Q=this.placements[B],C=u[B];C?(this.opacities[B]=new ft(C,a,Q.text,Q.icon),s=s||Q.text!==C.text.placed||Q.icon!==C.icon.placed):(this.opacities[B]=new ft(null,a,Q.text,Q.icon,Q.skipFade),s=s||Q.text||Q.icon)}for(let B in u){let Q=u[B];if(!this.opacities[B]){let C=new ft(Q,a,!1,!1);C.isHidden()||(this.opacities[B]=C,s=s||Q.text.placed||Q.icon.placed)}}for(let B in d)this.variableOffsets[B]||!this.opacities[B]||this.opacities[B].isHidden()||(this.variableOffsets[B]=d[B]);for(let B in m)this.placedOrientations[B]||!this.opacities[B]||this.opacities[B].isHidden()||(this.placedOrientations[B]=m[B]);if(r&&r.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");s?this.lastPlacementChangeTime=e:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=r?r.lastPlacementChangeTime:e)}updateLayerOpacities(e,r){let s={};for(let a of r){let u=a.getBucket(e);u&&a.latestFeatureIndex&&e.id===u.layerIds[0]&&this.updateBucketOpacities(u,a.tileID,s,a.collisionBoxArray)}}updateBucketOpacities(e,r,s,a){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();let u=e.layers[0],d=u.layout,m=new ft(null,0,!1,!1,!0),B=d.get("text-allow-overlap"),Q=d.get("icon-allow-overlap"),C=u._unevaluatedLayout.hasValue("text-variable-anchor")||u._unevaluatedLayout.hasValue("text-variable-anchor-offset"),x=d.get("text-rotation-alignment")==="map",I=d.get("text-pitch-alignment")==="map",b=d.get("icon-text-fit")!=="none",T=new ft(null,0,B&&(Q||!e.hasIconData()||d.get("icon-optional")),Q&&(B||!e.hasTextData()||d.get("text-optional")),!0);!e.collisionArrays&&a&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(a);let G=(R,z,K)=>{for(let Y=0;Y0,q=this.placedOrientations[z.crossTileID],ce=q===l.ao.vertical,se=q===l.ao.horizontal||q===l.ao.horizontalOnly;if(K>0||Y>0){let he=so(V.text);G(e.text,K,ce?Kr:he),G(e.text,Y,se?Kr:he);let Ee=V.text.isHidden();[z.rightJustifiedTextSymbolIndex,z.centerJustifiedTextSymbolIndex,z.leftJustifiedTextSymbolIndex].forEach((Te=>{Te>=0&&(e.text.placedSymbolArray.get(Te).hidden=Ee||ce?1:0)})),z.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(z.verticalPlacedTextSymbolIndex).hidden=Ee||se?1:0);let we=this.variableOffsets[z.crossTileID];we&&this.markUsedJustification(e,we.anchor,z,q);let _e=this.placedOrientations[z.crossTileID];_e&&(this.markUsedJustification(e,"left",z,_e),this.markUsedOrientation(e,_e,z))}if(O){let he=so(V.icon),Ee=!(b&&z.verticalPlacedIconSymbolIndex&&ce);z.placedIconSymbolIndex>=0&&(G(e.icon,z.numIconVertices,Ee?he:Kr),e.icon.placedSymbolArray.get(z.placedIconSymbolIndex).hidden=V.icon.isHidden()),z.verticalPlacedIconSymbolIndex>=0&&(G(e.icon,z.numVerticalIconVertices,Ee?Kr:he),e.icon.placedSymbolArray.get(z.verticalPlacedIconSymbolIndex).hidden=V.icon.isHidden())}let ae=P&&P.has(R)?P.get(R):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let he=e.collisionArrays[R];if(he){let Ee=new l.P(0,0);if(he.textBox||he.verticalTextBox){let we=!0;if(C){let _e=this.variableOffsets[H];_e?(Ee=YA(_e.anchor,_e.width,_e.height,_e.textOffset,_e.textBoxScale),x&&Ee._rotate(I?-this.transform.bearingInRadians:this.transform.bearingInRadians)):we=!1}if(he.textBox||he.verticalTextBox){let _e;he.textBox&&(_e=ce),he.verticalTextBox&&(_e=se),no(e.textCollisionBox.collisionVertexArray,V.text.placed,!we||_e,ae.text,Ee.x,Ee.y)}}if(he.iconBox||he.verticalIconBox){let we=!!(!se&&he.verticalIconBox),_e;he.iconBox&&(_e=we),he.verticalIconBox&&(_e=!we),no(e.iconCollisionBox.collisionVertexArray,V.icon.placed,_e,ae.icon,b?Ee.x:0,b?Ee.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return this.fadeDuration===0?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0}}function no(h,e,r,s,a,u){s&&s.length!==0||(s=[0,0,0,0]);let d=s[0]-Pt,m=s[1]-Pt,B=s[2]-Pt,Q=s[3]-Pt;h.emplaceBack(e?1:0,r?1:0,a||0,u||0,d,m),h.emplaceBack(e?1:0,r?1:0,a||0,u||0,B,m),h.emplaceBack(e?1:0,r?1:0,a||0,u||0,B,Q),h.emplaceBack(e?1:0,r?1:0,a||0,u||0,d,Q)}let Ea=Math.pow(2,25),xa=Math.pow(2,24),Or=Math.pow(2,17),va=Math.pow(2,16),ql=Math.pow(2,9),$l=Math.pow(2,8),Wl=Math.pow(2,1);function so(h){if(h.opacity===0&&!h.placed)return 0;if(h.opacity===1&&h.placed)return 4294967295;let e=h.placed?1:0,r=Math.floor(127*h.opacity);return r*Ea+e*xa+r*Or+e*va+r*ql+e*$l+r*Wl+e}let Kr=0;class oo{constructor(e){this._sortAcrossTiles=e.layout.get("symbol-z-order")!=="viewport-y"&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,r,s,a,u){let d=this._bucketParts;for(;this._currentTileIndexm.sortKey-B.sortKey)));this._currentPartIndex!this._forceFullPlacement&&Se.now()-a>2;for(;this._currentPlacementIndex>=0;){let d=r[e[this._currentPlacementIndex]],m=this.placement.collisionIndex.transform.zoom;if(d.type==="symbol"&&(!d.minzoom||d.minzoom<=m)&&(!d.maxzoom||d.maxzoom>m)){if(this._inProgressLayer||(this._inProgressLayer=new oo(d)),this._inProgressLayer.continuePlacement(s[d.source],this.placement,this._showCollisionBoxes,d,u))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}let jr=512/l.$/2;class lo{constructor(e,r,s){this.tileID=e,this.bucketInstanceId=s,this._symbolsByKey={};let a=new Map;for(let u=0;u({x:Math.floor(B.anchorX*jr),y:Math.floor(B.anchorY*jr)}))),crossTileIDs:d.map((B=>B.crossTileID))};if(m.positions.length>128){let B=new l.aI(m.positions.length,16,Uint16Array);for(let{x:Q,y:C}of m.positions)B.add(Q,C);B.finish(),delete m.positions,m.index=B}this._symbolsByKey[u]=m}}getScaledCoordinates(e,r){let{x:s,y:a,z:u}=this.tileID.canonical,{x:d,y:m,z:B}=r.canonical,Q=jr/Math.pow(2,B-u),C=(m*l.$+e.anchorY)*Q,x=a*l.$*jr;return{x:Math.floor((d*l.$+e.anchorX)*Q-s*l.$*jr),y:Math.floor(C-x)}}findMatches(e,r,s){let a=this.tileID.canonical.ze))}}class co{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ec{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let r=Math.round((e-this.lng)/360);if(r!==0)for(let s in this.indexes){let a=this.indexes[s],u={};for(let d in a){let m=a[d];m.tileID=m.tileID.unwrapTo(m.tileID.wrap+r),u[m.tileID.key]=m}this.indexes[s]=u}this.lng=e}addBucket(e,r,s){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===r.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let u=0;ue.overscaledZ)for(let m in d){let B=d[m];B.tileID.isChildOf(e)&&B.findMatches(r.symbolInstances,e,a)}else{let m=d[e.scaledTo(Number(u)).key];m&&m.findMatches(r.symbolInstances,e,a)}}for(let u=0;u{r[s]=!0}));for(let s in this.layerIndexes)r[s]||delete this.layerIndexes[s]}}var un="void main() {fragColor=vec4(1.0);}";let qi={prelude:tt(`#ifdef GL_ES precision mediump float; #else #if !defined(lowp) #define lowp #endif #if !defined(mediump) #define mediump #endif #if !defined(highp) #define highp #endif #endif out highp vec4 fragColor;`,`#ifdef GL_ES precision highp float; #else #if !defined(lowp) #define lowp #endif #if !defined(mediump) #define mediump #endif #if !defined(highp) #define highp #endif #endif vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 );}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c );} #ifdef TERRAIN3D uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth; #endif const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) { #ifdef TERRAIN3D highp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); #else return 1.0; #endif }float calculate_visibility(vec4 pos) { #ifdef TERRAIN3D vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; #else return 1.0; #endif }float ele(vec2 pos) { #ifdef TERRAIN3D vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; #else return 0.0; #endif }float get_elevation(vec2 pos) { #ifdef TERRAIN3D #ifdef GLOBE if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;} #endif vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; #else return 0.0; #endif }const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:tt("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:tt("",`#define GLOBE_RADIUS 6371008.8 uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos );}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len );if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:tt(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:tt(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:tt(`in vec3 v_data;in float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity void main(void) { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) { #ifdef GLOBE vec3 center_vector=projectToSphere(circle_center); #endif float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else { #ifdef GLOBE vec4 projected_center=interpolateProjection(circle_center,center_vector,ele); #else vec4 projected_center=projectTileWithElevation(circle_center,ele); #endif corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);} #ifdef GLOBE vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele); #else gl_Position=projectTileWithElevation(corner_position,ele); #endif } else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:tt(un,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:tt(`uniform highp float u_intensity;in vec2 v_extrude; #pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { #pragma mapbox: initialize highp float weight float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude; #pragma mapbox: define highp float weight #pragma mapbox: define mediump float radius const highp float ZERO=1.0/255.0/16.0; #define GAUSS_COEF 0.3989422804014327 void main(void) { #pragma mapbox: initialize highp float weight #pragma mapbox: initialize mediump float radius vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0); #ifdef GLOBE vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0); #else gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); #endif }`),heatmapTexture:tt(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(0.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:tt("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:tt("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:tt(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else {l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0)); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:tt("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:tt(un,`in vec2 a_pos;void main() { #ifdef GLOBE gl_Position=projectTileFor3D(a_pos,0.0); #else gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); #endif }`),fill:tt(`#pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity fragColor=color*opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_fill_translate;in vec2 a_pos; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:tt(`in vec2 v_pos; #ifdef GLOBE in float v_depth; #endif #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos; #ifdef GLOBE out float v_depth; #endif #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif }`),fillOutlinePattern:tt(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos; #ifdef GLOBE in float v_depth; #endif #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity; #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos; #ifdef GLOBE out float v_depth; #endif #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif }`),fillPattern:tt(`#ifdef GL_ES precision highp float; #endif uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:tt(`in vec4 v_color;void main() {fragColor=v_color; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed; #ifdef TERRAIN3D in vec2 a_centroid; #endif out vec4 v_color; #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define highp vec4 color void main() { #pragma mapbox: initialize highp float base #pragma mapbox: initialize highp float height #pragma mapbox: initialize highp vec4 color vec3 normal=a_normal_ed.xyz; #ifdef TERRAIN3D float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; #ifdef GLOBE vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); #else gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); #endif float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0); #ifdef GLOBE mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); #endif directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:tt(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed; #ifdef TERRAIN3D in vec2 a_centroid; #endif #ifdef GLOBE out vec3 v_sphere_pos; #endif out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to; #ifdef TERRAIN3D float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; #ifdef GLOBE vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); #else gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); #endif vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos : vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:tt(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:tt(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES]; #define PI 3.141592653589793 #define STANDARD 0 #define COMBINED 1 #define IGOR 2 #define MULTIDIRECTIONAL 3 #define BASIC 4 float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else {fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else {fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:tt(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; #ifdef GLOBE in float v_depth; #endif #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar; #ifdef GLOBE out float v_depth; #endif #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_width2=vec2(outset,inset);}`),lineGradient:tt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv; #ifdef GLOBE in float v_depth; #endif #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv; #ifdef GLOBE out float v_depth; #endif #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_width2=vec2(outset,inset);}`),linePattern:tt(`#ifdef GL_ES precision highp float; #endif uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width; #ifdef GLOBE in float v_depth; #endif #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity; #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width; #ifdef GLOBE out float v_depth; #endif #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float gapwidth #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:tt(`uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale; #ifdef GLOBE in float v_depth; #endif #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth #pragma mapbox: define mediump vec4 dasharray_from #pragma mapbox: define mediump vec4 dasharray_to void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 dasharray_from #pragma mapbox: initialize mediump vec4 dasharray_to float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; #ifdef GLOBE out float v_depth; #endif #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth #pragma mapbox: define mediump vec4 dasharray_from #pragma mapbox: define mediump vec4 dasharray_to void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 dasharray_from #pragma mapbox: initialize mediump vec4 dasharray_to float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),raster:tt(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0);vec4 color1=texture(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5; #ifdef GLOBE if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;} #endif v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:tt(`uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; #ifdef GLOBE if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:tt(`#define SDF_PX 8.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; #ifdef GLOBE if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:tt(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; #ifdef GLOBE if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:tt("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:tt("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:tt("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:tt("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:tt(`in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758 );color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:tt("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function tt(h,e){let r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,s=e.match(/in ([\w]+) ([\w]+)/g),a=h.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),u=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),d=u?u.concat(a):a,m={};return{fragmentSource:h=h.replace(r,((B,Q,C,x,I)=>(m[I]=!0,Q==="define"?` #ifndef HAS_UNIFORM_u_${I} in ${C} ${x} ${I}; #else uniform ${C} ${x} u_${I}; #endif `:` #ifdef HAS_UNIFORM_u_${I} ${C} ${x} ${I} = u_${I}; #endif `))),vertexSource:e=e.replace(r,((B,Q,C,x,I)=>{let b=x==="float"?"vec2":"vec4",T=I.match(/color/)?"color":b;return m[I]?Q==="define"?` #ifndef HAS_UNIFORM_u_${I} uniform lowp float u_${I}_t; in ${C} ${b} a_${I}; out ${C} ${x} ${I}; #else uniform ${C} ${x} u_${I}; #endif `:T==="vec4"?` #ifndef HAS_UNIFORM_u_${I} ${I} = a_${I}; #else ${C} ${x} ${I} = u_${I}; #endif `:` #ifndef HAS_UNIFORM_u_${I} ${I} = unpack_mix_${T}(a_${I}, u_${I}_t); #else ${C} ${x} ${I} = u_${I}; #endif `:Q==="define"?` #ifndef HAS_UNIFORM_u_${I} uniform lowp float u_${I}_t; in ${C} ${b} a_${I}; #else uniform ${C} ${x} u_${I}; #endif `:T==="vec4"?` #ifndef HAS_UNIFORM_u_${I} ${C} ${x} ${I} = a_${I}; #else ${C} ${x} ${I} = u_${I}; #endif `:` #ifndef HAS_UNIFORM_u_${I} ${C} ${x} ${I} = unpack_mix_${T}(a_${I}, u_${I}_t); #else ${C} ${x} ${I} = u_${I}; #endif `})),staticAttributes:s,staticUniforms:d}}class cr{constructor(e,r,s){this.vertexBuffer=e,this.indexBuffer=r,this.segments=s}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var KA=l.aJ([{name:"a_pos",type:"Int16",components:2}]);let yA="#define PROJECTION_MERCATOR",hr="mercator";class it{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return hr}get shaderDefine(){return yA}get shaderPreludeCode(){return qi.projectionMercator}get vertexShaderPreludeCode(){return qi.projectionMercator.vertexSource}get subdivisionGranularity(){return l.aK.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(e){}getMeshFromTileID(e,r,s,a,u){if(this._cachedMesh)return this._cachedMesh;let d=new l.aL;d.emplaceBack(0,0),d.emplaceBack(l.$,0),d.emplaceBack(0,l.$),d.emplaceBack(l.$,l.$);let m=e.createVertexBuffer(d,KA.members),B=l.aM.simpleSegment(0,0,4,2),Q=new l.aN;Q.emplaceBack(1,0,2),Q.emplaceBack(1,2,3);let C=e.createIndexBuffer(Q);return this._cachedMesh=new cr(m,C,B),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(e){}}class ur{constructor(e=0,r=0,s=0,a=0){if(isNaN(e)||e<0||isNaN(r)||r<0||isNaN(s)||s<0||isNaN(a)||a<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=r,this.left=s,this.right=a}interpolate(e,r,s){return r.top!=null&&e.top!=null&&(this.top=l.C.number(e.top,r.top,s)),r.bottom!=null&&e.bottom!=null&&(this.bottom=l.C.number(e.bottom,r.bottom,s)),r.left!=null&&e.left!=null&&(this.left=l.C.number(e.left,r.left,s)),r.right!=null&&e.right!=null&&(this.right=l.C.number(e.right,r.right,s)),this}getCenter(e,r){let s=l.ah((this.left+e-this.right)/2,0,e),a=l.ah((this.top+r-this.bottom)/2,0,r);return new l.P(s,a)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new ur(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function ts(h,e){if(!h.renderWorldCopies||h.lngRange)return;let r=e.lng-h.center.lng;e.lng+=r>180?-360:r<-180?360:0}function is(h){return Math.max(0,Math.floor(h))}class Ci{constructor(e,r,s,a,u,d){this._callbacks=e,this._tileSize=512,this._renderWorldCopies=d===void 0||!!d,this._minZoom=r||0,this._maxZoom=s||22,this._minPitch=a==null?0:a,this._maxPitch=u==null?60:u,this.setMaxBounds(),this._width=0,this._height=0,this._center=new l.S(0,0),this._elevation=0,this._zoom=0,this._tileZoom=is(this._zoom),this._scale=l.af(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new ur,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,r,s){this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=is(this._zoom),this._scale=l.af(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new ur(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!s&&e.autoCalculateNearFarZ,r&&this._constrain(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(e){this._minZoom!==e&&(this._minZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(e){this._minPitch!==e&&(this._minPitch=e,this.setPitch(Math.max(this.pitch,e)))}get maxPitch(){return this._maxPitch}setMaxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.setPitch(Math.min(this.pitch,e)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){e===void 0?e=!0:e===null&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new l.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){let r=l.aO(e,-180,180)*Math.PI/180;var s,a,u,d,m,B,Q,C,x;this._bearingInRadians!==r&&(this._unmodified=!1,this._bearingInRadians=r,this._calcMatrices(),this._rotationMatrix=Ue(),s=this._rotationMatrix,u=-this._bearingInRadians,d=(a=this._rotationMatrix)[0],m=a[1],B=a[2],Q=a[3],C=Math.sin(u),x=Math.cos(u),s[0]=d*x+B*C,s[1]=m*x+Q*C,s[2]=d*-C+B*x,s[3]=m*-C+Q*x)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){let r=l.ah(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==r&&(this._unmodified=!1,this._pitchInRadians=r,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){let r=e/180*Math.PI;this._rollInRadians!==r&&(this._unmodified=!1,this._rollInRadians=r,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return l.aP(this._fovInRadians)}setFov(e){e=l.ah(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=l.ae(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){let r=this.getConstrained(this._center,e).zoom;this._zoom!==r&&(this._unmodified=!1,this._zoom=r,this._tileZoom=Math.max(0,Math.floor(r)),this._scale=l.af(r),this._constrain(),this._calcMatrices())}get center(){return this._center}setCenter(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(e,r){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=r,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,r,s){this._unmodified=!1,this._edgeInsets.interpolate(e,r,s),this._constrain(),this._calcMatrices()}resize(e,r,s=!0){this._width=e,this._height=r,s&&this._constrain(),this._calcMatrices()}getMaxBounds(){return this._latRange&&this._latRange.length===2&&this._lngRange&&this._lngRange.length===2?new Gt([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]]):null}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this._lngRange=null,this._latRange=[-l.ai,l.ai])}getConstrained(e,r){return this._callbacks.getConstrained(e,r)}getCameraQueryGeometry(e,r){if(r.length===1)return[r[0],e];{let{minX:s,minY:a,maxX:u,maxY:d}=l.a2.fromPoints(r).extend(e);return[new l.P(s,a),new l.P(u,a),new l.P(u,d),new l.P(s,d),new l.P(s,a)]}}_constrain(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let e=this._unmodified,{center:r,zoom:s}=this.getConstrained(this.center,this.zoom);this.setCenter(r),this.setZoom(s),this._unmodified=e,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=l.ag(new Float64Array(16));l.N(e,e,[this._width/2,-this._height/2,1]),l.M(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=l.ag(new Float64Array(16)),l.N(e,e,[1,-1,1]),l.M(e,e,[-1,-1,0]),l.N(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,r,s,a){let u=s!==void 0?s:this.bearing,d=a=a!==void 0?a:this.pitch,m=l.a1.fromLngLat(e,r),B=-Math.cos(l.ae(d)),Q=Math.sin(l.ae(d)),C=Q*Math.sin(l.ae(u)),x=-Q*Math.cos(l.ae(u)),I=this.elevation,b=r-I,T;B*b>=0||Math.abs(B)<.1?(T=1e4,I=r+T*B):T=-b/B;let G,P,R=l.aQ(1,m.y),z=0;do{if(z+=1,z>10)break;P=T/R,G=new l.a1(m.x+C*P,m.y+x*P),R=1/G.meterInMercatorCoordinateUnits()}while(Math.abs(T-P*R)>1e-12);return{center:G.toLngLat(),elevation:I,zoom:l.ak(this.height/2/Math.tan(this.fovInRadians/2)/P/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e==0)return;let r=l.aj(1,this.center.lat)*this.worldSize,s=this.cameraToCenterDistance/r,a=l.a1.fromLngLat(this.center,this.elevation),u=ne(this.center,this.elevation,this.pitch,this.bearing,s);this._elevation=e;let d=this.calculateCenterFromCameraLngLatAlt(u.toLngLat(),l.aQ(u.z,a.y),this.bearing,this.pitch);this._elevation=d.elevation,this._center=d.center,this.setZoom(d.zoom)}getCameraPoint(){let e=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new l.P(e*Math.sin(this.rollInRadians),e*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let e=l.aj(1,this.center.lat)*this.worldSize;return ne(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/e).toLngLat()}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];let r=e.canonical.z>=0?1<this.max[0]||e.aabb.min[1]>this.max[1]||e.aabb.min[2]>this.max[2]||e.aabb.max[0]0?(r+=e[a]*this.min[a],s+=e[a]*this.max[a]):(s+=e[a]*this.min[a],r+=e[a]*this.max[a]);return r>=0?2:s<0?0:1}}class wi{distanceToTile2d(e,r,s,a){let u=a.distanceX([e,r]),d=a.distanceY([e,r]);return Math.hypot(u,d)}getWrap(e,r,s){return s}getTileBoundingVolume(e,r,s,a){var u,d;let m=0,B=0;if(a!=null&&a.terrain){let C=new l.Z(e.z,r,e.z,e.x,e.y),x=a.terrain.getMinMaxElevation(C);m=(u=x.minElevation)!==null&&u!==void 0?u:Math.min(0,s),B=(d=x.maxElevation)!==null&&d!==void 0?d:Math.max(0,s)}let Q=1<a}allowWorldCopies(){return!0}prepareNextFrame(){}}class Xt{constructor(e,r,s){this.points=e,this.planes=r,this.aabb=s}static fromInvProjectionMatrix(e,r=1,s=0,a,u){let d=u?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],m=Math.pow(2,s),B=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((I=>(function(b,T,G,P){let R=l.aw([],b,T),z=1/R[3]/G*P;return l.aY(R,R,[z,z,1/R[3],z])})(I,e,r,m)));a&&(function(I,b,T,G){let P=G?4:0,R=G?0:4,z=0,K=[],Y=[];for(let O=0;O<4;O++){let q=l.aU([],I[O+R],I[O+P]),ce=l.aZ(q);l.aR(q,q,1/ce),K.push(ce),Y.push(q)}for(let O=0;O<4;O++){let q=l.a_(I[O+P],Y[O],T);z=q!==null&&q>=0?Math.max(z,q):Math.max(z,K[O])}let H=(function(O,q){let ce=l.aU([],O[q[0]],O[q[1]]),se=l.aU([],O[q[2]],O[q[1]]),ae=[0,0,0,0];return l.aV(ae,l.aW([],ce,se)),ae[3]=-l.aX(ae,O[q[0]]),ae})(I,b),V=(function(O,q){let ce=l.a$(O),se=l.b0([],O,1/ce),ae=l.aU([],q,l.aR([],se,l.aX(q,se))),he=l.a$(ae);if(he>0){let Ee=Math.sqrt(1-se[3]*se[3]),we=l.aR([],se,-se[3]),_e=l.aS([],we,l.aR([],ae,Ee/he));return l.b1(q,_e)}return null})(T,H);if(V!==null){let O=V/l.aX(Y[0],H);z=Math.min(z,O)}for(let O=0;O<4;O++){let q=Math.min(z,K[O]);I[O+R]=[I[O+P][0]+Y[O][0]*q,I[O+P][1]+Y[O][1]*q,I[O+P][2]+Y[O][2]*q,1]}})(B,d[0],a,u);let Q=d.map((I=>{let b=l.aU([],B[I[0]],B[I[1]]),T=l.aU([],B[I[2]],B[I[1]]),G=l.aV([],l.aW([],b,T)),P=-l.aX(G,B[I[1]]);return G.concat(P)})),C=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],x=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let I of B)for(let b=0;b<3;b++)C[b]=Math.min(C[b],I[b]),x[b]=Math.max(x[b],I[b]);return new Xt(B,Q,new ii(C,x))}}class mt{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,r,s){return this._helper.interpolatePadding(e,r,s)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,r,s=!0){this._helper.resize(e,r,s)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,r){this._helper.overrideNearFarZ(e,r)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e,r){}constructor(e,r,s,a,u){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this._helper=new Ci({calcMatrices:()=>{this._calcMatrices()},getConstrained:(d,m)=>this.getConstrained(d,m)},e,r,s,a,u),this._coveringTilesDetailsProvider=new wi}clone(){let e=new mt;return e.apply(this),e}apply(e,r,s){this._helper.apply(e,r,s)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(e){let r=[new l.b2(0,e)];if(this._helper._renderWorldCopies){let s=this.screenPointToMercatorCoordinate(new l.P(0,0)),a=this.screenPointToMercatorCoordinate(new l.P(this._helper._width,0)),u=this.screenPointToMercatorCoordinate(new l.P(this._helper._width,this._helper._height)),d=this.screenPointToMercatorCoordinate(new l.P(0,this._helper._height)),m=Math.floor(Math.min(s.x,a.x,u.x,d.x)),B=Math.floor(Math.max(s.x,a.x,u.x,d.x)),Q=1;for(let C=m-Q;C<=B+Q;C++)C!==0&&r.push(new l.b2(C,e))}return r}getCameraFrustum(){return Xt.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){let r=this.screenPointToLocation(this.centerPoint,e),s=e?e.getElevationForLngLatZoom(r,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(s)}setLocationAtPoint(e,r){let s=l.aj(this.elevation,this.center.lat),a=this.screenPointToMercatorCoordinateAtZ(r,s),u=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,s),d=l.a1.fromLngLat(e),m=new l.a1(d.x-(a.x-u.x),d.y-(a.y-u.y));this.setCenter(m==null?void 0:m.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(e,r){return r?this.coordinatePoint(l.a1.fromLngLat(e),r.getElevationForLngLatZoom(e,this._helper._tileZoom),this._pixelMatrix3D):this.coordinatePoint(l.a1.fromLngLat(e))}screenPointToLocation(e,r){var s;return(s=this.screenPointToMercatorCoordinate(e,r))===null||s===void 0?void 0:s.toLngLat()}screenPointToMercatorCoordinate(e,r){if(r){let s=r.pointCoordinate(e);if(s!=null)return s}return this.screenPointToMercatorCoordinateAtZ(e)}screenPointToMercatorCoordinateAtZ(e,r){let s=r||0,a=[e.x,e.y,0,1],u=[e.x,e.y,1,1];l.aw(a,a,this._pixelMatrixInverse),l.aw(u,u,this._pixelMatrixInverse);let d=a[3],m=u[3],B=a[1]/d,Q=u[1]/m,C=a[2]/d,x=u[2]/m,I=C===x?0:(s-C)/(x-C);return new l.a1(l.C.number(a[0]/d,u[0]/m,I)/this.worldSize,l.C.number(B,Q,I)/this.worldSize,s)}coordinatePoint(e,r=0,s=this._pixelMatrix){let a=[e.x*this.worldSize,e.y*this.worldSize,r,1];return l.aw(a,a,s),new l.P(a[0]/a[3],a[1]/a[3])}getBounds(){let e=Math.max(0,this._helper._height/2-Z(this));return new Gt().extend(this.screenPointToLocation(new l.P(0,e))).extend(this.screenPointToLocation(new l.P(this._helper._width,e))).extend(this.screenPointToLocation(new l.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new l.P(0,this._helper._height)))}isPointOnMapSurface(e,r){return r?r.pointCoordinate(e)!=null:e.y>this.height/2-Z(this)}calculatePosMatrix(e,r=!1,s){var a;let u=(a=e.key)!==null&&a!==void 0?a:l.b3(e.wrap,e.canonical.z,e.canonical.z,e.canonical.x,e.canonical.y),d=r?this._alignedPosMatrixCache:this._posMatrixCache;if(d.has(u)){let Q=d.get(u);return s?Q.f32:Q.f64}let m=W(e,this.worldSize);l.O(m,r?this._alignedProjMatrix:this._viewProjMatrix,m);let B={f64:m,f32:new Float32Array(m)};return d.set(u,B),s?B.f32:B.f64}calculateFogMatrix(e){let r=e.key,s=this._fogMatrixCacheF32;if(s.has(r))return s.get(r);let a=W(e,this.worldSize);return l.O(a,this._fogMatrix,a),s.set(r,new Float32Array(a)),s.get(r)}getConstrained(e,r){r=l.ah(+r,this.minZoom,this.maxZoom);let s={center:new l.S(e.lng,e.lat),zoom:r},a=this._helper._lngRange;if(!this._helper._renderWorldCopies&&a===null){let K=179.9999999999;a=[-K,K]}let u=this.tileSize*l.af(s.zoom),d=0,m=u,B=0,Q=u,C=0,x=0,{x:I,y:b}=this.size;if(this._helper._latRange){let K=this._helper._latRange;d=l.U(K[1])*u,m=l.U(K[0])*u,m-dm&&(R=m-K)}if(a){let K=(B+Q)/2,Y=T;this._helper._renderWorldCopies&&(Y=l.aO(T,K-u/2,K+u/2));let H=I/2;Y-HQ&&(P=Q-H)}if(P!==void 0||R!==void 0){let K=new l.P(P!=null?P:T,R!=null?R:G);s.center=j(u,K).wrap()}return s}calculateCenterFromCameraLngLatAlt(e,r,s,a){return this._helper.calculateCenterFromCameraLngLatAlt(e,r,s,a)}_calculateNearFarZIfNeeded(e,r,s){if(!this._helper.autoCalculateNearFarZ)return;let a=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),u=e-a*this._helper._pixelPerMeter/Math.cos(r),d=a<0?u:e,m=Math.PI/2+this.pitchInRadians,B=l.ae(this.fov)*(Math.abs(Math.cos(l.ae(this.roll)))*this.height+Math.abs(Math.sin(l.ae(this.roll)))*this.width)/this.height*(.5+s.y/this.height),Q=Math.sin(B)*d/Math.sin(l.ah(Math.PI-m-B,.01,Math.PI-.01)),C=Z(this),x=Math.atan(C/this._helper.cameraToCenterDistance),I=l.ae(.75),b=x>I?2*x*(.5+s.y/(2*C)):I,T=Math.sin(b)*d/Math.sin(l.ah(Math.PI-m-b,.01,Math.PI-.01)),G=Math.min(Q,T);this._helper._farZ=1.01*(Math.cos(Math.PI/2-r)*G+d),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let e=this.centerOffset,r=L(this.worldSize,this.center),s=r.x,a=r.y;this._helper._pixelPerMeter=l.aj(1,this.center.lat)*this.worldSize;let u=l.ae(Math.min(this.pitch,M)),d=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(u)),m;this._calculateNearFarZIfNeeded(d,u,e),m=new Float64Array(16),l.b4(m,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),l.aq(this._invProjMatrix,m),m[8]=2*-e.x/this._helper._width,m[9]=2*e.y/this._helper._height,this._projectionMatrix=l.b5(m),l.N(m,m,[1,-1,1]),l.M(m,m,[0,0,-this._helper.cameraToCenterDistance]),l.b6(m,m,-this.rollInRadians),l.b7(m,m,this.pitchInRadians),l.b6(m,m,-this.bearingInRadians),l.M(m,m,[-s,-a,0]),this._mercatorMatrix=l.N([],m,[this.worldSize,this.worldSize,this.worldSize]),l.N(m,m,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=l.O(new Float64Array(16),this.clipSpaceToPixelsMatrix,m),l.M(m,m,[0,0,-this.elevation]),this._viewProjMatrix=m,this._invViewProjMatrix=l.aq([],m);let B=[0,0,-1,1];l.aw(B,B,this._invViewProjMatrix),this._cameraPosition=[B[0]/B[3],B[1]/B[3],B[2]/B[3]],this._fogMatrix=new Float64Array(16),l.b4(this._fogMatrix,this.fovInRadians,this.width/this.height,d,this._helper._farZ),this._fogMatrix[8]=2*-e.x/this.width,this._fogMatrix[9]=2*e.y/this.height,l.N(this._fogMatrix,this._fogMatrix,[1,-1,1]),l.M(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),l.b6(this._fogMatrix,this._fogMatrix,-this.rollInRadians),l.b7(this._fogMatrix,this._fogMatrix,this.pitchInRadians),l.b6(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),l.M(this._fogMatrix,this._fogMatrix,[-s,-a,0]),l.N(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),l.M(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=l.O(new Float64Array(16),this.clipSpaceToPixelsMatrix,m);let Q=this._helper._width%2/2,C=this._helper._height%2/2,x=Math.cos(this.bearingInRadians),I=Math.sin(-this.bearingInRadians),b=s-Math.round(s)+x*Q+I*C,T=a-Math.round(a)+x*C+I*Q,G=new Float64Array(m);if(l.M(G,G,[b>.5?b-1:b,T>.5?T-1:T,0]),this._alignedProjMatrix=G,m=l.aq(new Float64Array(16),this._pixelMatrix),!m)throw new Error("failed to invert matrix");this._pixelMatrixInverse=m,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let e=this.screenPointToMercatorCoordinate(new l.P(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return l.aw(r,r,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let e=l.aj(1,this.center.lat)*this.worldSize;return ne(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/e).toLngLat()}lngLatToCameraDepth(e,r){let s=l.a1.fromLngLat(e),a=[s.x*this.worldSize,s.y*this.worldSize,r,1];return l.aw(a,a,this._viewProjMatrix),a[2]/a[3]}getProjectionData(e){let{overscaledTileID:r,aligned:s,applyTerrainMatrix:a}=e,u=this._helper.getMercatorTileCoordinates(r),d=r?this.calculatePosMatrix(r,s,!0):null,m;return m=r&&r.terrainRttPosMatrix32f&&a?r.terrainRttPosMatrix32f:d||l.b8(),{mainMatrix:m,tileMercatorCoords:u,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:m}}isLocationOccluded(e){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(e,r,s){return 1}transformLightDirection(e){return l.aT(e)}getRayDirectionFromPixel(e){throw new Error("Not implemented.")}projectTileCoordinates(e,r,s,a){let u=this.calculatePosMatrix(s),d;a?(d=[e,r,a(e,r),1],l.aw(d,d,u)):(d=[e,r,0,1],Yr(d,d,u));let m=d[3];return{point:new l.P(d[0]/m,d[1]/m),signedDistanceFromCamera:m,isOccluded:!1}}populateCache(e){for(let r of e)this.calculatePosMatrix(r)}getMatrixForModel(e,r){let s=l.a1.fromLngLat(e,r),a=s.meterInMercatorCoordinateUnits(),u=l.b9();return l.M(u,u,[s.x,s.y,s.z]),l.b6(u,u,Math.PI),l.b7(u,u,Math.PI/2),l.N(u,u,[-a,a,a]),u}getProjectionDataForCustomLayer(e=!0){let r=new l.Z(0,0,0,0,0),s=this.getProjectionData({overscaledTileID:r,applyGlobeMatrix:e}),a=W(r,this.worldSize);l.O(a,this._viewProjMatrix,a),s.tileMercatorCoords=[0,0,1,1];let u=[l.$,l.$,this.worldSize/this._helper.pixelsPerMeter],d=l.ba();return l.N(d,a,u),s.fallbackMatrix=d,s.mainMatrix=d,s}getFastPathSimpleProjectionMatrix(e){return this.calculatePosMatrix(e)}}function ba(){l.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Ii(h){if(h.useSlerp)if(h.k<1){let e=l.bb(h.startEulerAngles.roll,h.startEulerAngles.pitch,h.startEulerAngles.bearing),r=l.bb(h.endEulerAngles.roll,h.endEulerAngles.pitch,h.endEulerAngles.bearing),s=new Float64Array(4);l.bc(s,e,r,h.k);let a=l.bd(s);h.tr.setRoll(a.roll),h.tr.setPitch(a.pitch),h.tr.setBearing(a.bearing)}else h.tr.setRoll(h.endEulerAngles.roll),h.tr.setPitch(h.endEulerAngles.pitch),h.tr.setBearing(h.endEulerAngles.bearing);else h.tr.setRoll(l.C.number(h.startEulerAngles.roll,h.endEulerAngles.roll,h.k)),h.tr.setPitch(l.C.number(h.startEulerAngles.pitch,h.endEulerAngles.pitch,h.k)),h.tr.setBearing(l.C.number(h.startEulerAngles.bearing,h.endEulerAngles.bearing,h.k))}function Ti(h,e,r,s,a){let u=a.padding,d=L(a.worldSize,r.getNorthWest()),m=L(a.worldSize,r.getNorthEast()),B=L(a.worldSize,r.getSouthEast()),Q=L(a.worldSize,r.getSouthWest()),C=l.ae(-s),x=d.rotate(C),I=m.rotate(C),b=B.rotate(C),T=Q.rotate(C),G=new l.P(Math.max(x.x,I.x,T.x,b.x),Math.max(x.y,I.y,T.y,b.y)),P=new l.P(Math.min(x.x,I.x,T.x,b.x),Math.min(x.y,I.y,T.y,b.y)),R=G.sub(P),z=(a.width-(u.left+u.right+e.left+e.right))/R.x,K=(a.height-(u.top+u.bottom+e.top+e.bottom))/R.y;if(K<0||z<0)return void ba();let Y=Math.min(l.ak(a.scale*Math.min(z,K)),h.maxZoom),H=l.P.convert(h.offset),V=new l.P((e.left-e.right)/2,(e.top-e.bottom)/2).rotate(l.ae(s)),O=H.add(V).mult(a.scale/l.af(Y));return{center:j(a.worldSize,d.add(B).div(2).sub(O)),zoom:Y,bearing:s}}class mi{get useGlobeControls(){return!1}handlePanInertia(e,r){let s=e.mag(),a=Math.abs(Z(r));return{easingOffset:e.mult(Math.min(.75*a/s,1)),easingCenter:r.center}}handleMapControlsRollPitchBearingZoom(e,r){e.bearingDelta&&r.setBearing(r.bearing+e.bearingDelta),e.pitchDelta&&r.setPitch(r.pitch+e.pitchDelta),e.rollDelta&&r.setRoll(r.roll+e.rollDelta),e.zoomDelta&&r.setZoom(r.zoom+e.zoomDelta)}handleMapControlsPan(e,r,s){e.around.distSqr(r.centerPoint)<.01||r.setLocationAtPoint(s,e.around)}cameraForBoxAndBearing(e,r,s,a,u){return Ti(e,r,s,a,u)}handleJumpToCenterZoom(e,r){e.zoom!==(r.zoom!==void 0?+r.zoom:e.zoom)&&e.setZoom(+r.zoom),r.center!==void 0&&e.setCenter(l.S.convert(r.center))}handleEaseTo(e,r){let s=e.zoom,a=e.padding,u={roll:e.roll,pitch:e.pitch,bearing:e.bearing},d={roll:r.roll===void 0?e.roll:r.roll,pitch:r.pitch===void 0?e.pitch:r.pitch,bearing:r.bearing===void 0?e.bearing:r.bearing},m=r.zoom!==void 0,B=!e.isPaddingEqual(r.padding),Q=!1,C=m?+r.zoom:e.zoom,x=e.centerPoint.add(r.offsetAsPoint),I=e.screenPointToLocation(x),{center:b,zoom:T}=e.getConstrained(l.S.convert(r.center||I),C!=null?C:s);ts(e,b);let G=L(e.worldSize,I),P=L(e.worldSize,b).sub(G),R=l.af(T-s);return Q=T!==s,{easeFunc:z=>{if(Q&&e.setZoom(l.C.number(s,T,z)),l.be(u,d)||Ii({startEulerAngles:u,endEulerAngles:d,tr:e,k:z,useSlerp:u.roll!=d.roll}),B&&(e.interpolatePadding(a,r.padding,z),x=e.centerPoint.add(r.offsetAsPoint)),r.around)e.setLocationAtPoint(r.around,r.aroundPoint);else{let K=l.af(e.zoom-s),Y=T>s?Math.min(2,R):Math.max(.5,R),H=Math.pow(Y,1-z),V=j(e.worldSize,G.add(P.mult(z*H)).mult(K));e.setLocationAtPoint(e.renderWorldCopies?V.wrap():V,x)}},isZooming:Q,elevationCenter:b}}handleFlyTo(e,r){let s=r.zoom!==void 0,a=e.zoom,u=e.getConstrained(l.S.convert(r.center||r.locationAtOffset),s?+r.zoom:a),d=u.center,m=u.zoom;ts(e,d);let B=L(e.worldSize,r.locationAtOffset),Q=L(e.worldSize,d).sub(B),C=Q.mag(),x=l.af(m-a),I;if(r.minZoom!==void 0){let b=Math.min(+r.minZoom,a,m),T=e.getConstrained(d,b).zoom;I=l.af(T-a)}return{easeFunc:(b,T,G,P)=>{e.setZoom(b===1?m:a+l.ak(T));let R=b===1?d:j(e.worldSize,B.add(Q.mult(G)).mult(T));e.setLocationAtPoint(e.renderWorldCopies?R.wrap():R,P)},scaleOfZoom:x,targetCenter:d,scaleOfMinZoom:I,pixelPathLength:C}}}class Qt{constructor(e,r,s){this.blendFunction=e,this.blendColor=r,this.mask=s}}Qt.Replace=[1,0],Qt.disabled=new Qt(Qt.Replace,l.bf.transparent,[!1,!1,!1,!1]),Qt.unblended=new Qt(Qt.Replace,l.bf.transparent,[!0,!0,!0,!0]),Qt.alphaBlended=new Qt([1,771],l.bf.transparent,[!0,!0,!0,!0]);let gr=2305;class Ke{constructor(e,r,s){this.enable=e,this.mode=r,this.frontFace=s}}Ke.disabled=new Ke(!1,1029,gr),Ke.backCCW=new Ke(!0,1029,gr),Ke.frontCCW=new Ke(!0,1028,gr);class Ze{constructor(e,r,s){this.func=e,this.mask=r,this.range=s}}Ze.ReadOnly=!1,Ze.ReadWrite=!0,Ze.disabled=new Ze(519,Ze.ReadOnly,[0,1]);let QA=7680;class at{constructor(e,r,s,a,u,d){this.test=e,this.ref=r,this.mask=s,this.fail=a,this.depthFail=u,this.pass=d}}at.disabled=new at({func:519,mask:0},0,0,QA,QA,QA);let Li=new WeakMap;function dA(h){var e;if(Li.has(h))return Li.get(h);{let r=(e=h.getParameter(h.VERSION))===null||e===void 0?void 0:e.startsWith("WebGL 2.0");return Li.set(h,r),r}}class pA{get awaitingQuery(){return!!this._readbackQueue}constructor(e){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=e;let r=e.context,s=r.gl;this._texFormat=s.RGBA,this._texType=s.UNSIGNED_BYTE;let a=new l.aL;a.emplaceBack(-1,-1),a.emplaceBack(2,-1),a.emplaceBack(-1,2);let u=new l.aN;u.emplaceBack(0,1,2),this._fullscreenTriangle=new cr(r.createVertexBuffer(a,KA.members),r.createIndexBuffer(u),l.aM.simpleSegment(0,0,a.length,u.length)),this._resultBuffer=new Uint8Array(4),r.activeTexture.set(s.TEXTURE1);let d=s.createTexture();s.bindTexture(s.TEXTURE_2D,d),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,s.NEAREST),s.texImage2D(s.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=r.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(d),dA(s)&&(this._pbo=s.createBuffer(),s.bindBuffer(s.PIXEL_PACK_BUFFER,this._pbo),s.bufferData(s.PIXEL_PACK_BUFFER,4,s.STREAM_READ),s.bindBuffer(s.PIXEL_PACK_BUFFER,null))}destroy(){let e=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),e.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(e,r){let s=this._updateCount;return this._readbackQueue?s>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():s>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(e,r),this._updateCount++,this._measuredError}_bindFramebuffer(){let e=this._cachedRenderContext.context,r=e.gl;e.activeTexture.set(r.TEXTURE1),r.bindTexture(r.TEXTURE_2D,this._fbo.colorAttachment.get()),e.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(e,r){let s=this._cachedRenderContext.context,a=s.gl;if(this._bindFramebuffer(),s.viewport.set([0,0,this._texWidth,this._texHeight]),s.clear({color:l.bf.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(s,a.TRIANGLES,Ze.disabled,at.disabled,Qt.unblended,Ke.disabled,((u,d)=>({u_input:u,u_output_expected:d}))(e,r),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&dA(a)){a.bindBuffer(a.PIXEL_PACK_BUFFER,this._pbo),a.readBuffer(a.COLOR_ATTACHMENT0),a.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),a.bindBuffer(a.PIXEL_PACK_BUFFER,null);let u=a.fenceSync(a.SYNC_GPU_COMMANDS_COMPLETE,0);a.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:u}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let e=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&dA(e)){let r=e.clientWaitSync(this._readbackQueue.sync,0,0);if(r===e.WAIT_FAILED)return l.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(r===e.TIMEOUT_EXPIRED)return;e.bindBuffer(e.PIXEL_PACK_BUFFER,this._pbo),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),e.bindBuffer(e.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),e.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=pA._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(e){let r=0;return r+=e[0]/256,r+=e[1]/65536,r+=e[2]/16777216,e[3]<127&&(r=-r),r/128}}let As=l.$/128;function ho(h,e){let r=h.granularity!==void 0?Math.max(h.granularity,1):1,s=r+(h.generateBorders?2:0),a=r+(h.extendToNorthPole||h.generateBorders?1:0)+(h.extendToSouthPole||h.generateBorders?1:0),u=s+1,d=a+1,m=h.generateBorders?-1:0,B=h.generateBorders||h.extendToNorthPole?-1:0,Q=r+(h.generateBorders?1:0),C=r+(h.generateBorders||h.extendToSouthPole?1:0),x=u*d,I=s*a*6,b=u*d>65536;if(b&&e==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let T=b||e==="32bit",G=new Int16Array(2*x),P=0;for(let K=B;K<=C;K++)for(let Y=m;Y<=Q;Y++){let H=Y/r*l.$;Y===-1&&(H=-As),Y===r+1&&(H=l.$+As);let V=K/r*l.$;K===-1&&(V=h.extendToNorthPole?l.bh:-As),K===r+1&&(V=h.extendToSouthPole?l.bi:l.$+As),G[P++]=H,G[P++]=V}let R=T?new Uint32Array(I):new Uint16Array(I),z=0;for(let K=0;K0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(e){this._mercatorProjection.updateGPUdependent(e),this._verticalPerspectiveProjection.updateGPUdependent(e)}getMeshFromTileID(e,r,s,a,u){return this.currentProjection.getMeshFromTileID(e,r,s,a,u)}setProjection(e){this._transitionable.setValue("type",(e==null?void 0:e.type)||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}setErrorQueryLatitudeDegrees(e){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e),this._mercatorProjection.setErrorQueryLatitudeDegrees(e)}}function ss(h){let e=Zr(h.worldSize,h.center.lat);return 2*Math.PI*e}function $i(h,e,r,s,a){let u=1/(1<1e-6){let s=h[0]/r,a=Math.acos(h[2]/r),u=(s>0?a:-a)/Math.PI*180;return new l.S(l.aO(u,-180,180),e)}return new l.S(0,e)}function dr(h){return Math.cos(h*Math.PI/180)}function Rt(h,e){let r=dr(h),s=dr(e);return l.ak(s/r)}function Fa(h,e){let r=h.rotate(e.bearingInRadians),s=e.zoom+Rt(e.center.lat,0),a=l.bk(1/dr(e.center.lat),1/dr(Math.min(Math.abs(e.center.lat),60)),l.bn(s,7,3,0,1)),u=360/ss({worldSize:e.worldSize,center:{lat:e.center.lat}});return new l.S(e.center.lng-r.x*u*a,l.ah(e.center.lat+r.y*u,-l.ai,l.ai))}function pn(h){let e=.5*h,r=Math.sin(e),s=Math.cos(e);return Math.log(r+s)-Math.log(s-r)}function uo(h,e,r,s){let a=h.lat+r*s;if(Math.abs(r)>1){let u=(Math.sign(h.lat+r)!==Math.sign(h.lat)?-Math.abs(h.lat):Math.abs(h.lat))*Math.PI/180,d=Math.abs(h.lat+r)*Math.PI/180,m=pn(u+s*(d-u)),B=pn(u),Q=pn(d);return new l.S(h.lng+e*((m-B)/(Q-B)),a)}return new l.S(h.lng+e*s,a)}class tc{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=e}swapBuffers(){if(!this._hadAnyChanges)return;let e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(e,r,s,a){let u=`${e.z}_${e.x}_${e.y}_${a!=null&&a.terrain?"t":""}`,d=this._cache.get(u);if(d)return d;let m=this._cachePrevious.get(u);if(m)return this._cache.set(u,m),m;let B=this._boundingVolumeFactory(e,r,s,a);return this._cache.set(u,B),this._hadAnyChanges=!0,B}}class Jr{constructor(e,r,s,a){this.min=s,this.max=a,this.points=e,this.planes=r}static fromAabb(e,r){let s=[];for(let a=0;a<8;a++)s.push([1&~a?e[0]:r[0],(a>>1&1)==1?r[1]:e[1],(a>>2&1)==1?r[2]:e[2]]);return new Jr(s,[[-1,0,0,r[0]],[1,0,0,-e[0]],[0,-1,0,r[1]],[0,1,0,-e[1]],[0,0,-1,r[2]],[0,0,1,-e[2]]],e,r)}static fromCenterSizeAngles(e,r,s){let a=l.br([],s[0],s[1],s[2]),u=l.bs([],[r[0],0,0],a),d=l.bs([],[0,r[1],0],a),m=l.bs([],[0,0,r[2]],a),B=[...e],Q=[...e];for(let x=0;x<8;x++)for(let I=0;I<3;I++){let b=e[I]+u[I]*(1&~x?-1:1)+d[I]*((x>>1&1)==1?1:-1)+m[I]*((x>>2&1)==1?1:-1);B[I]=Math.min(B[I],b),Q[I]=Math.max(Q[I],b)}let C=[];for(let x=0;x<8;x++){let I=[...e];l.aS(I,I,l.aR([],u,1&~x?-1:1)),l.aS(I,I,l.aR([],d,(x>>1&1)==1?1:-1)),l.aS(I,I,l.aR([],m,(x>>2&1)==1?1:-1)),C.push(I)}return new Jr(C,[[...u,-l.aX(u,C[0])],[...d,-l.aX(d,C[0])],[...m,-l.aX(m,C[0])],[-u[0],-u[1],-u[2],-l.aX(u,C[7])],[-d[0],-d[1],-d[2],-l.aX(d,C[7])],[-m[0],-m[1],-m[2],-l.aX(m,C[7])]],B,Q)}intersectsFrustum(e){let r=!0,s=this.points.length,a=this.planes.length,u=e.planes.length,d=e.points.length;for(let m=0;m=0&&Q++}if(Q===0)return 0;Q=0&&Q++}if(Q===0)return 0}return 1}intersectsPlane(e){let r=this.points.length,s=0;for(let a=0;a=0&&s++}return s===r?2:s===0?0:1}}function ci(h,e,r){let s=h-e;return s<0?-s:Math.max(0,s-r)}function fn(h,e,r,s,a){let u=h-r,d;return d=u<0?Math.min(-u,1+u-a):u>1?Math.min(Math.max(u-a,0),1-u):0,Math.max(d,ci(e,s,a))}class fA{constructor(){this._boundingVolumeCache=new tc(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(e,r,s,a){let u=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(e,r,s,a){return this._boundingVolumeCache.getTileBoundingVolume(e,r,s,a)}_computeTileBoundingVolume(e,r,s,a){var u,d;let m=0,B=0;if(a!=null&&a.terrain){let Q=new l.Z(e.z,r,e.z,e.x,e.y),C=a.terrain.getMinMaxElevation(Q);m=(u=C.minElevation)!==null&&u!==void 0?u:Math.min(0,s),B=(d=C.maxElevation)!==null&&d!==void 0?d:Math.max(0,s)}if(m/=l.bu,B/=l.bu,m+=1,B+=1,e.z<=0)return Jr.fromAabb([-B,-B,-B],[B,B,B]);if(e.z===1)return Jr.fromAabb([e.x===0?-B:0,e.y===0?0:-B,-B],[e.x===0?0:B,e.y===0?B:0,B]);{let Q=[$i(0,0,e.x,e.y,e.z),$i(l.$,0,e.x,e.y,e.z),$i(l.$,l.$,e.x,e.y,e.z),$i(0,l.$,e.x,e.y,e.z)],C=[];for(let ae of Q)C.push(l.aR([],ae,B));if(B!==m)for(let ae of Q)C.push(l.aR([],ae,m));e.y===0&&C.push([0,1,0]),e.y===(1<=(1<{this._calcMatrices()},getConstrained:(e,r)=>this.getConstrained(e,r)}),this._coveringTilesDetailsProvider=new fA}clone(){let e=new Bn;return e.apply(this),e}apply(e,r){this._globeLatitudeErrorCorrectionRadians=r||0,this._helper.apply(e)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let e=l.bp();return e[0]=this._cameraPosition[0],e[1]=this._cameraPosition[1],e[2]=this._cameraPosition[2],e}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(e){let{overscaledTileID:r,applyGlobeMatrix:s}=e,a=this._helper.getMercatorTileCoordinates(r);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:a,clippingPlane:this._cachedClippingPlane,projectionTransition:s?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(e){let r=this.pitchInRadians,s=this.cameraToCenterDistance/e,a=Math.sin(r)*s,u=Math.cos(r)*s+1,d=1/Math.sqrt(a*a+u*u)*1,m=-a,B=u,Q=Math.sqrt(m*m+B*B);m/=Q,B/=Q;let C=[0,m,B];l.bw(C,C,[0,0,0],-this.bearingInRadians),l.bx(C,C,[0,0,0],-1*this.center.lat*Math.PI/180),l.by(C,C,[0,0,0],this.center.lng*Math.PI/180);let x=1/l.aZ(C);return l.aR(C,C,x),[...C,-d*x]}isLocationOccluded(e){return!this.isSurfacePointVisible(Ai(e))}transformLightDirection(e){let r=this._helper._center.lng*Math.PI/180,s=this._helper._center.lat*Math.PI/180,a=Math.cos(s),u=[Math.sin(r)*a,Math.sin(s),Math.cos(r)*a],d=[u[2],0,-u[0]],m=[0,0,0];l.aW(m,d,u),l.aV(d,d),l.aV(m,m);let B=[0,0,0];return l.aV(B,[d[0]*e[0]+m[0]*e[1]+u[0]*e[2],d[1]*e[0]+m[1]*e[1]+u[1]*e[2],d[2]*e[0]+m[2]*e[1]+u[2]*e[2]]),B}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(e,r,s){let a=(function(m,B,Q){let C=1/(1<u&&(u=I),bm&&(m=b)}let C=[Q.lng+d,Q.lat+B,Q.lng+u,Q.lat+m];return this.isSurfacePointOnScreen([0,1,0])&&(C[3]=90,C[0]=-180,C[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(C[1]=-90,C[0]=-180,C[2]=180),new Gt(C)}getConstrained(e,r){let s=l.ah(e.lat,-l.ai,l.ai),a=l.ah(+r,this.minZoom+Rt(0,s),this.maxZoom);return{center:new l.S(e.lng,s),zoom:a}}calculateCenterFromCameraLngLatAlt(e,r,s,a){return this._helper.calculateCenterFromCameraLngLatAlt(e,r,s,a)}setLocationAtPoint(e,r){let s=Ai(this.unprojectScreenPoint(r)),a=Ai(e),u=l.bp();l.bB(u);let d=l.bp();l.by(d,s,u,-this.center.lng*Math.PI/180),l.bx(d,d,u,this.center.lat*Math.PI/180);let m=a[0]*a[0]+a[2]*a[2],B=d[0]*d[0];if(m=-R&&T<=R,K=P>=-R&&P<=R,Y,H;if(z&&K){let ce=this.center.lng*Math.PI/180,se=this.center.lat*Math.PI/180;l.bD(x,ce)+l.bD(T,se)=0}isSurfacePointOnScreen(e){if(!this.isSurfacePointVisible(e))return!1;let r=l.bv();return l.aw(r,[...e,1],this._globeViewProjMatrixNoCorrection),r[0]/=r[3],r[1]/=r[3],r[2]/=r[3],r[0]>-1&&r[0]<1&&r[1]>-1&&r[1]<1&&r[2]>-1&&r[2]<1}rayPlanetIntersection(e,r){let s=l.aX(e,r),a=l.bp(),u=l.bp();l.aR(u,r,s),l.aU(a,e,u);let d=1-l.aX(a,a);if(d<0)return null;let m=l.aX(e,e)-1,B=-s+(s<0?1:-1)*Math.sqrt(d),Q=m/B,C=B;return{tMin:Math.min(Q,C),tMax:Math.max(Q,C)}}unprojectScreenPoint(e){let r=this._cameraPosition,s=this.getRayDirectionFromPixel(e),a=this.rayPlanetIntersection(r,s);if(a){let C=l.bp();l.aS(C,r,[s[0]*a.tMin,s[1]*a.tMin,s[2]*a.tMin]);let x=l.bp();return l.aV(x,C),dn(x)}let u=this._cachedClippingPlane,d=u[0]*s[0]+u[1]*s[1]+u[2]*s[2],m=-l.b1(u,r)/d,B=l.bp();if(m>0)l.aS(B,r,[s[0]*m,s[1]*m,s[2]*m]);else{let C=l.bp();l.aS(C,r,[2*s[0],2*s[1],2*s[2]]);let x=l.b1(this._cachedClippingPlane,C);l.aU(B,C,[this._cachedClippingPlane[0]*x,this._cachedClippingPlane[1]*x,this._cachedClippingPlane[2]*x])}let Q=(function(C){let x=l.bp();return x[0]=C[0]*-C[3],x[1]=C[1]*-C[3],x[2]=C[2]*-C[3],{center:x,radius:Math.sqrt(1-C[3]*C[3])}})(u);return dn((function(C,x,I){let b=l.bp();l.aU(b,I,C);let T=l.bp();return l.bq(T,C,b,x/l.a$(b)),T})(Q.center,Q.radius,B))}getMatrixForModel(e,r){let s=l.S.convert(e),a=1/l.bu,u=l.b9();return l.bz(u,u,s.lng/180*Math.PI),l.b7(u,u,-s.lat/180*Math.PI),l.M(u,u,[0,0,1+r/l.bu]),l.b7(u,u,.5*Math.PI),l.N(u,u,[a,a,a]),u}getProjectionDataForCustomLayer(e=!0){let r=this.getProjectionData({overscaledTileID:new l.Z(0,0,0,0,0),applyGlobeMatrix:e});return r.tileMercatorCoords=[0,0,1,1],r}getFastPathSimpleProjectionMatrix(e){}}class _n{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,r,s){return this._helper.interpolatePadding(e,r,s)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,r,s=!0){this._helper.resize(e,r,s)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,r){this._helper.overrideNearFarZ(e,r)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(e,r){this._globeness=e,this._globeLatitudeErrorCorrectionRadians=r,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this._helper=new Ci({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,r)=>this.getConstrained(e,r)}),this._globeness=1,this._mercatorTransform=new mt,this._verticalPerspectiveTransform=new Bn}clone(){let e=new _n;return e._globeness=this._globeness,e._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,e.apply(this),e}apply(e){this._helper.apply(e),this._mercatorTransform.apply(this),this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(e){let r=this._mercatorTransform.getProjectionData(e),s=this._verticalPerspectiveTransform.getProjectionData(e);return{mainMatrix:this.isGlobeRendering?s.mainMatrix:r.mainMatrix,clippingPlane:s.clippingPlane,tileMercatorCoords:s.tileMercatorCoords,projectionTransition:e.applyGlobeMatrix?this._globeness:0,fallbackMatrix:r.fallbackMatrix}}isLocationOccluded(e){return this.currentTransform.isLocationOccluded(e)}transformLightDirection(e){return this.currentTransform.transformLightDirection(e)}getPixelScale(){return l.bk(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return l.bk(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(e,r,s){let a=this._mercatorTransform.getPitchedTextCorrection(e,r,s),u=this._verticalPerspectiveTransform.getPitchedTextCorrection(e,r,s);return l.bk(a,u,this._globeness)}projectTileCoordinates(e,r,s,a){return this.currentTransform.projectTileCoordinates(e,r,s,a)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(e){return this.currentTransform.calculateFogMatrix(e)}getVisibleUnwrappedCoordinates(e){return this.currentTransform.getVisibleUnwrappedCoordinates(e)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(e){this._mercatorTransform.recalculateZoomAndCenter(e),this._verticalPerspectiveTransform.recalculateZoomAndCenter(e)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,r){return this.currentTransform.lngLatToCameraDepth(e,r)}populateCache(e){this._mercatorTransform.populateCache(e),this._verticalPerspectiveTransform.populateCache(e)}getBounds(){return this.currentTransform.getBounds()}getConstrained(e,r){return this.currentTransform.getConstrained(e,r)}calculateCenterFromCameraLngLatAlt(e,r,s,a){return this._helper.calculateCenterFromCameraLngLatAlt(e,r,s,a)}setLocationAtPoint(e,r){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(e,r),void this.apply(this._mercatorTransform);this._verticalPerspectiveTransform.setLocationAtPoint(e,r),this.apply(this._verticalPerspectiveTransform)}locationToScreenPoint(e,r){return this.currentTransform.locationToScreenPoint(e,r)}screenPointToMercatorCoordinate(e,r){return this.currentTransform.screenPointToMercatorCoordinate(e,r)}screenPointToLocation(e,r){return this.currentTransform.screenPointToLocation(e,r)}isPointOnMapSurface(e,r){return this.currentTransform.isPointOnMapSurface(e,r)}getRayDirectionFromPixel(e){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e)}getMatrixForModel(e,r){return this.currentTransform.getMatrixForModel(e,r)}getProjectionDataForCustomLayer(e=!0){let r=this._mercatorTransform.getProjectionDataForCustomLayer(e);if(!this.isGlobeRendering)return r;let s=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e);return s.fallbackMatrix=r.mainMatrix,s}getFastPathSimpleProjectionMatrix(e){return this.currentTransform.getFastPathSimpleProjectionMatrix(e)}}class Bi{get useGlobeControls(){return!0}handlePanInertia(e,r){let s=Fa(e,r);return Math.abs(s.lng-r.center.lng)>180&&(s.lng=r.center.lng+179.5*Math.sign(s.lng-r.center.lng)),{easingCenter:s,easingOffset:new l.P(0,0)}}handleMapControlsRollPitchBearingZoom(e,r){let s=e.around,a=r.screenPointToLocation(s);e.bearingDelta&&r.setBearing(r.bearing+e.bearingDelta),e.pitchDelta&&r.setPitch(r.pitch+e.pitchDelta),e.rollDelta&&r.setRoll(r.roll+e.rollDelta);let u=r.zoom;e.zoomDelta&&r.setZoom(r.zoom+e.zoomDelta);let d=r.zoom-u;if(d===0)return;let m=l.bA(r.center.lng,a.lng),B=m/(Math.abs(m/180)+1),Q=l.bA(r.center.lat,a.lat),C=r.getRayDirectionFromPixel(s),x=r.cameraPosition,I=-1*l.aX(x,C),b=l.bp();l.aS(b,x,[C[0]*I,C[1]*I,C[2]*I]);let T=l.aZ(b)-1,G=Math.exp(.5*-Math.max(T-.3,0)),P=Zr(r.worldSize,r.center.lat)/Math.min(r.width,r.height),R=l.bn(P,.9,.5,1,.25),z=(1-l.af(-d))*Math.min(G,R),K=r.center.lat,Y=r.zoom,H=new l.S(r.center.lng+B*z,l.ah(r.center.lat+Q*z,-l.ai,l.ai));r.setLocationAtPoint(a,s);let V=r.center,O=l.bn(Math.abs(m),45,85,0,1),q=l.bn(P,.75,.35,0,1),ce=Math.pow(Math.max(O,q),.25),se=l.bA(V.lng,H.lng),ae=l.bA(V.lat,H.lat);r.setCenter(new l.S(V.lng+se*ce,V.lat+ae*ce).wrap()),r.setZoom(Y+Rt(K,r.center.lat))}handleMapControlsPan(e,r,s){if(!e.panDelta)return;let a=r.center.lat,u=r.zoom;r.setCenter(Fa(e.panDelta,r).wrap()),r.setZoom(u+Rt(a,r.center.lat))}cameraForBoxAndBearing(e,r,s,a,u){let d=Ti(e,r,s,a,u),m=r.left/u.width*2-1,B=(u.width-r.right)/u.width*2-1,Q=r.top/u.height*-2+1,C=(u.height-r.bottom)/u.height*-2+1,x=l.bA(s.getWest(),s.getEast())<0,I=x?s.getEast():s.getWest(),b=x?s.getWest():s.getEast(),T=Math.max(s.getNorth(),s.getSouth()),G=Math.min(s.getNorth(),s.getSouth()),P=I+.5*l.bA(I,b),R=T+.5*l.bA(T,G),z=u.clone();z.setCenter(d.center),z.setBearing(d.bearing),z.setPitch(0),z.setRoll(0),z.setZoom(d.zoom);let K=z.modelViewProjectionMatrix,Y=[Ai(s.getNorthWest()),Ai(s.getNorthEast()),Ai(s.getSouthWest()),Ai(s.getSouthEast()),Ai(new l.S(b,R)),Ai(new l.S(I,R)),Ai(new l.S(P,T)),Ai(new l.S(P,G))],H=Ai(d.center),V=Number.POSITIVE_INFINITY;for(let O of Y)m<0&&(V=Bi.getLesserNonNegativeNonNull(V,Bi.solveVectorScale(O,H,K,"x",m))),B>0&&(V=Bi.getLesserNonNegativeNonNull(V,Bi.solveVectorScale(O,H,K,"x",B))),Q>0&&(V=Bi.getLesserNonNegativeNonNull(V,Bi.solveVectorScale(O,H,K,"y",Q))),C<0&&(V=Bi.getLesserNonNegativeNonNull(V,Bi.solveVectorScale(O,H,K,"y",C)));if(Number.isFinite(V)&&V!==0)return d.zoom=z.zoom+l.ak(V),d;ba()}handleJumpToCenterZoom(e,r){let s=e.center.lat,a=e.getConstrained(r.center?l.S.convert(r.center):e.center,e.zoom).center;e.setCenter(a.wrap());let u=r.zoom!==void 0?+r.zoom:e.zoom+Rt(s,a.lat);e.zoom!==u&&e.setZoom(u)}handleEaseTo(e,r){let s=e.zoom,a=e.center,u=e.padding,d={roll:e.roll,pitch:e.pitch,bearing:e.bearing},m={roll:r.roll===void 0?e.roll:r.roll,pitch:r.pitch===void 0?e.pitch:r.pitch,bearing:r.bearing===void 0?e.bearing:r.bearing},B=r.zoom!==void 0,Q=!e.isPaddingEqual(r.padding),C=!1,x=r.center?l.S.convert(r.center):a,I=e.getConstrained(x,s).center;ts(e,I);let b=e.clone();b.setCenter(I),b.setZoom(B?+r.zoom:s+Rt(a.lat,x.lat)),b.setBearing(r.bearing);let T=new l.P(l.ah(e.centerPoint.x+r.offsetAsPoint.x,0,e.width),l.ah(e.centerPoint.y+r.offsetAsPoint.y,0,e.height));b.setLocationAtPoint(I,T);let G=(r.offset&&r.offsetAsPoint.mag())>0?b.center:I,P=B?+r.zoom:s+Rt(a.lat,G.lat),R=s+Rt(a.lat,0),z=P+Rt(G.lat,0),K=l.bA(a.lng,G.lng),Y=l.bA(a.lat,G.lat),H=l.af(z-R);return C=P!==s,{easeFunc:V=>{if(l.be(d,m)||Ii({startEulerAngles:d,endEulerAngles:m,tr:e,k:V,useSlerp:d.roll!=m.roll}),Q&&e.interpolatePadding(u,r.padding,V),r.around)l.w("Easing around a point is not supported under globe projection."),e.setLocationAtPoint(r.around,r.aroundPoint);else{let O=z>R?Math.min(2,H):Math.max(.5,H),q=Math.pow(O,1-V),ce=uo(a,K,Y,V*q);e.setCenter(ce.wrap())}if(C){let O=l.C.number(R,z,V)+Rt(0,e.center.lat);e.setZoom(O)}},isZooming:C,elevationCenter:G}}handleFlyTo(e,r){let s=r.zoom!==void 0,a=e.center,u=e.zoom,d=e.padding,m=!e.isPaddingEqual(r.padding),B=e.getConstrained(l.S.convert(r.center||r.locationAtOffset),u).center,Q=s?+r.zoom:e.zoom+Rt(e.center.lat,B.lat),C=e.clone();C.setCenter(B),C.setZoom(Q),C.setBearing(r.bearing);let x=new l.P(l.ah(e.centerPoint.x+r.offsetAsPoint.x,0,e.width),l.ah(e.centerPoint.y+r.offsetAsPoint.y,0,e.height));C.setLocationAtPoint(B,x);let I=C.center;ts(e,I);let b=(function(Y,H,V){let O=Ai(H),q=Ai(V),ce=l.aX(O,q),se=Math.acos(ce),ae=ss(Y);return se/(2*Math.PI)*ae})(e,a,I),T=u+Rt(a.lat,0),G=Q+Rt(I.lat,0),P=l.af(G-T),R;if(typeof r.minZoom=="number"){let Y=+r.minZoom+Rt(I.lat,0),H=Math.min(Y,T,G)+Rt(0,I.lat),V=e.getConstrained(I,H).zoom+Rt(I.lat,0);R=l.af(V-T)}let z=l.bA(a.lng,I.lng),K=l.bA(a.lat,I.lat);return{easeFunc:(Y,H,V,O)=>{let q=uo(a,z,K,V);m&&e.interpolatePadding(d,r.padding,Y);let ce=Y===1?I:q;e.setCenter(ce.wrap());let se=T+l.ak(H);e.setZoom(Y===1?Q:se+Rt(0,ce.lat))},scaleOfZoom:P,targetCenter:I,scaleOfMinZoom:R,pixelPathLength:b}}static solveVectorScale(e,r,s,a,u){let d=a==="x"?[s[0],s[4],s[8],s[12]]:[s[1],s[5],s[9],s[13]],m=[s[3],s[7],s[11],s[15]],B=e[0]*d[0]+e[1]*d[1]+e[2]*d[2],Q=e[0]*m[0]+e[1]*m[1]+e[2]*m[2],C=r[0]*d[0]+r[1]*d[1]+r[2]*d[2],x=r[0]*m[0]+r[1]*m[1]+r[2]*m[2];return C+u*Q===B+u*x||m[3]*(B-C)+d[3]*(x-Q)+B*x==C*Q?null:(C+d[3]-u*x-u*m[3])/(C-B-u*x+u*Q)}static getLesserNonNegativeNonNull(e,r){return r!==null&&r>=0&&rl.y(h,e&&e.filter((r=>r.identifier!=="source.canvas"))),ic=l.bE();class go extends l.E{constructor(e,r={}){var s,a;super(),this._rtlPluginLoaded=()=>{for(let d in this.sourceCaches){let m=this.sourceCaches[d].getSource().type;m!=="vector"&&m!=="geojson"||this.sourceCaches[d].reload()}},this.map=e,this.dispatcher=new bi(nr(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",((d,m)=>this.getGlyphs(d,m))),this.dispatcher.registerMessageHandler("GI",((d,m)=>this.getImages(d,m))),this.dispatcher.registerMessageHandler("GDA",((d,m)=>this.getDashes(d,m))),this.imageManager=new ln,this.imageManager.setEventedParent(this);let u=((s=e._container)===null||s===void 0?void 0:s.lang)||typeof document!="undefined"&&((a=document.documentElement)===null||a===void 0?void 0:a.lang)||void 0;this.glyphManager=new MA(e._requestManager,r.localIdeographFontFamily,u),this.lineAtlas=new dt(256,512),this.crossTileSymbolIndex=new Xr,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new l.bF,this._loaded=!1,this._availableImages=[],this._globalState={},this._resetUpdates(),this.dispatcher.broadcast("SR",l.bG()),RA().on(or,this._rtlPluginLoaded),this.on("data",(d=>{if(d.dataType!=="source"||d.sourceDataType!=="metadata")return;let m=this.sourceCaches[d.sourceId];if(!m)return;let B=m.getSource();if(B&&B.vectorLayerIds)for(let Q in this._layers){let C=this._layers[Q];C.source===B.id&&this._validateLayer(C)}}))}setGlobalStateProperty(e,r){var s,a,u;this._checkLoaded();let d=r===null?(u=(a=(s=this.stylesheet.state)===null||s===void 0?void 0:s[e])===null||a===void 0?void 0:a.default)!==null&&u!==void 0?u:null:r;if(l.bH(d,this._globalState[e]))return this;this._globalState[e]=d,this._applyGlobalStateChanges([e])}getGlobalState(){return this._globalState}setGlobalState(e){this._checkLoaded();let r=[];for(let s in e)!l.bH(this._globalState[s],e[s].default)&&(r.push(s),this._globalState[s]=e[s].default);this._applyGlobalStateChanges(r)}_applyGlobalStateChanges(e){if(e.length===0)return;let r=new Set,s={};for(let a of e){s[a]=this._globalState[a];for(let u in this._layers){let d=this._layers[u],m=d.getLayoutAffectingGlobalStateRefs(),B=d.getPaintAffectingGlobalStateRefs();if(m.has(a)&&r.add(d.source),B.has(a))for(let{name:Q,value:C}of B.get(a))this._updatePaintProperty(d,Q,C)}}this.dispatcher.broadcast("UGS",s);for(let a in this.sourceCaches)r.has(a)&&(this._reloadSource(a),this._changed=!0)}loadURL(e,r={},s){this.fire(new l.l("dataloading",{dataType:"style"})),r.validate=typeof r.validate!="boolean"||r.validate;let a=this.map._requestManager.transformRequest(e,"Style");this._loadStyleRequest=new AbortController;let u=this._loadStyleRequest;l.j(a,this._loadStyleRequest).then((d=>{this._loadStyleRequest=null,this._load(d.data,r,s)})).catch((d=>{this._loadStyleRequest=null,d&&!u.signal.aborted&&this.fire(new l.k(d))}))}loadJSON(e,r={},s){this.fire(new l.l("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,Se.frameAsync(this._frameRequest).then((()=>{this._frameRequest=null,r.validate=r.validate!==!1,this._load(e,r,s)})).catch((()=>{}))}loadEmpty(){this.fire(new l.l("dataloading",{dataType:"style"})),this._load(ic,{validate:!1})}_load(e,r,s){var a,u;let d=r.transformStyle?r.transformStyle(s,e):e;if(!r.validate||!os(this,l.z(d))){d=Object.assign({},d),this._loaded=!0,this.stylesheet=d;for(let m in d.sources)this.addSource(m,d.sources[m],{validate:!1});d.sprite?this._loadSprite(d.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(d.glyphs),this._createLayers(),this.light=new tr(this.stylesheet.light),this._setProjectionInternal(((a=this.stylesheet.projection)===null||a===void 0?void 0:a.type)||"mercator"),this.sky=new qn(this.stylesheet.sky),this.map.setTerrain((u=this.stylesheet.terrain)!==null&&u!==void 0?u:null),this.fire(new l.l("data",{dataType:"style"})),this.fire(new l.l("style.load"))}}_createLayers(){var e;let r=l.bI(this.stylesheet.layers);this.setGlobalState((e=this.stylesheet.state)!==null&&e!==void 0?e:null),this.dispatcher.broadcast("SL",r),this._order=r.map((s=>s.id)),this._layers={},this._serializedLayers=null;for(let s of r){let a=l.bJ(s,this._globalState);a.setEventedParent(this,{layer:{id:s.id}}),this._layers[s.id]=a}}_loadSprite(e,r=!1,s=void 0){let a;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,(function(u,d,m,B){return l._(this,void 0,void 0,(function*(){let Q=_A(u),C=m>1?"@2x":"",x={},I={};for(let{id:b,url:T}of Q){let G=d.transformRequest(kr(T,C,".json"),"SpriteJSON");x[b]=l.j(G,B);let P=d.transformRequest(kr(T,C,".png"),"SpriteImage");I[b]=kt.getImage(P,B)}return yield Promise.all([...Object.values(x),...Object.values(I)]),(function(b,T){return l._(this,void 0,void 0,(function*(){let G={};for(let P in b){G[P]={};let R=Se.getImageCanvasContext((yield T[P]).data),z=(yield b[P]).data;for(let K in z){let{width:Y,height:H,x:V,y:O,sdf:q,pixelRatio:ce,stretchX:se,stretchY:ae,content:he,textFitWidth:Ee,textFitHeight:we}=z[K];G[P][K]={data:null,pixelRatio:ce,sdf:q,stretchX:se,stretchY:ae,content:he,textFitWidth:Ee,textFitHeight:we,spriteData:{width:Y,height:H,x:V,y:O,context:R}}}}return G}))})(x,I)}))})(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((u=>{if(this._spriteRequest=null,u)for(let d in u){this._spritesImagesIds[d]=[];let m=this._spritesImagesIds[d]?this._spritesImagesIds[d].filter((B=>!(B in u))):[];for(let B of m)this.imageManager.removeImage(B),this._changedImages[B]=!0;for(let B in u[d]){let Q=d==="default"?B:`${d}:${B}`;this._spritesImagesIds[d].push(Q),Q in this.imageManager.images?this.imageManager.updateImage(Q,u[d][B],!1):this.imageManager.addImage(Q,u[d][B]),r&&(this._changedImages[Q]=!0)}}})).catch((u=>{this._spriteRequest=null,a=u,this.fire(new l.k(a))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),r&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.l("data",{dataType:"style"})),s&&s(a)}))}_unloadSprite(){for(let e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.l("data",{dataType:"style"}))}_validateLayer(e){let r=this.sourceCaches[e.source];if(!r)return;let s=e.sourceLayer;if(!s)return;let a=r.getSource();(a.type==="geojson"||a.vectorLayerIds&&a.vectorLayerIds.indexOf(s)===-1)&&this.fire(new l.k(new Error(`Source layer "${s}" does not exist on source "${a.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(e,r=!1){let s=this._serializedAllLayers();if(!e||e.length===0)return Object.values(r?l.bK(s):s);let a=[];for(let u of e)if(s[u]){let d=r?l.bK(s[u]):s[u];a.push(d)}return a}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};let r=Object.keys(this._layers);for(let s of r){let a=this._layers[s];a.type!=="custom"&&(e[s]=a.serialize())}return e}hasTransitions(){var e,r,s;if(!((e=this.light)===null||e===void 0)&&e.hasTransition()||!((r=this.sky)===null||r===void 0)&&r.hasTransition()||!((s=this.projection)===null||s===void 0)&&s.hasTransition())return!0;for(let a in this.sourceCaches)if(this.sourceCaches[a].hasTransition())return!0;for(let a in this._layers)if(this._layers[a].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(e){if(!this._loaded)return;let r=this._changed;if(r){let a=Object.keys(this._updatedLayers),u=Object.keys(this._removedLayers);(a.length||u.length)&&this._updateWorkerLayers(a,u);for(let d in this._updatedSources){let m=this._updatedSources[d];if(m==="reload")this._reloadSource(d);else{if(m!=="clear")throw new Error(`Invalid action ${m}`);this._clearSource(d)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let d in this._updatedPaintProps)this._layers[d].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}let s={};for(let a in this.sourceCaches){let u=this.sourceCaches[a];s[a]=u.used,u.used=!1}for(let a of this._order){let u=this._layers[a];u.recalculate(e,this._availableImages),!u.isHidden(e.zoom)&&u.source&&(this.sourceCaches[u.source].used=!0)}for(let a in s){let u=this.sourceCaches[a];!!s[a]!=!!u.used&&u.fire(new l.l("data",{sourceDataType:"visibility",dataType:"source",sourceId:a}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,r&&this.fire(new l.l("data",{dataType:"style"}))}_updateTilesForChangedImages(){let e=Object.keys(this._changedImages);if(e.length){for(let r in this.sourceCaches)this.sourceCaches[r].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,r){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:r})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,r={}){var s;this._checkLoaded();let a=this.serialize();if(e=r.transformStyle?r.transformStyle(a,e):e,((s=r.validate)===null||s===void 0||s)&&os(this,l.z(e)))return!1;(e=l.bK(e)).layers=l.bI(e.layers);let u=l.bL(a,e),d=this._getOperationsToPerform(u);if(d.unimplemented.length>0)throw new Error(`Unimplemented: ${d.unimplemented.join(", ")}.`);if(d.operations.length===0)return!1;for(let m of d.operations)m();return this.stylesheet=e,this._serializedLayers=null,!0}_getOperationsToPerform(e){let r=[],s=[];for(let a of e)switch(a.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":r.push((()=>this.addLayer.apply(this,a.args)));break;case"removeLayer":r.push((()=>this.removeLayer.apply(this,a.args)));break;case"setPaintProperty":r.push((()=>this.setPaintProperty.apply(this,a.args)));break;case"setLayoutProperty":r.push((()=>this.setLayoutProperty.apply(this,a.args)));break;case"setFilter":r.push((()=>this.setFilter.apply(this,a.args)));break;case"addSource":r.push((()=>this.addSource.apply(this,a.args)));break;case"removeSource":r.push((()=>this.removeSource.apply(this,a.args)));break;case"setLayerZoomRange":r.push((()=>this.setLayerZoomRange.apply(this,a.args)));break;case"setLight":r.push((()=>this.setLight.apply(this,a.args)));break;case"setGeoJSONSourceData":r.push((()=>this.setGeoJSONSourceData.apply(this,a.args)));break;case"setGlyphs":r.push((()=>this.setGlyphs.apply(this,a.args)));break;case"setSprite":r.push((()=>this.setSprite.apply(this,a.args)));break;case"setTerrain":r.push((()=>this.map.setTerrain.apply(this,a.args)));break;case"setSky":r.push((()=>this.setSky.apply(this,a.args)));break;case"setProjection":this.setProjection.apply(this,a.args);break;case"setGlobalState":r.push((()=>this.setGlobalState.apply(this,a.args)));break;case"setTransition":r.push((()=>{}));break;default:s.push(a.command)}return{operations:r,unimplemented:s}}addImage(e,r){if(this.getImage(e))return this.fire(new l.k(new Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,r),this._afterImageUpdated(e)}updateImage(e,r){this.imageManager.updateImage(e,r)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new l.k(new Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.l("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,r,s={}){if(this._checkLoaded(),this.sourceCaches[e]!==void 0)throw new Error(`Source "${e}" already exists.`);if(!r.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(r).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(l.z.source,`sources.${e}`,r,null,s))return;this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);let a=this.sourceCaches[e]=new At(e,r,this.dispatcher);a.style=this,a.setEventedParent(this,(()=>({isSourceLoaded:a.loaded(),source:a.serialize(),sourceId:e}))),a.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error("There is no source with this ID");for(let s in this._layers)if(this._layers[s].source===e)return this.fire(new l.k(new Error(`Source "${e}" cannot be removed while layer "${s}" is using it.`)));let r=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],r.fire(new l.l("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,r){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error(`There is no source with this ID=${e}`);let s=this.sourceCaches[e].getSource();if(s.type!=="geojson")throw new Error(`geojsonSource.type is ${s.type}, which is !== 'geojson`);s.setData(r),this._changed=!0}getSource(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()}addLayer(e,r,s={}){this._checkLoaded();let a=e.id;if(this.getLayer(a))return void this.fire(new l.k(new Error(`Layer "${a}" already exists on this map.`)));let u;if(e.type==="custom"){if(os(this,l.bM(e)))return;u=l.bJ(e,this._globalState)}else{if("source"in e&&typeof e.source=="object"&&(this.addSource(a,e.source),e=l.bK(e),e=l.e(e,{source:a})),this._validate(l.z.layer,`layers.${a}`,e,{arrayIndex:-1},s))return;u=l.bJ(e,this._globalState),this._validateLayer(u),u.setEventedParent(this,{layer:{id:a}})}let d=r?this._order.indexOf(r):this._order.length;if(r&&d===-1)this.fire(new l.k(new Error(`Cannot add layer "${a}" before non-existing layer "${r}".`)));else{if(this._order.splice(d,0,a),this._layerOrderChanged=!0,this._layers[a]=u,this._removedLayers[a]&&u.source&&u.type!=="custom"){let m=this._removedLayers[a];delete this._removedLayers[a],m.type!==u.type?this._updatedSources[u.source]="clear":(this._updatedSources[u.source]="reload",this.sourceCaches[u.source].pause())}this._updateLayer(u),u.onAdd&&u.onAdd(this.map)}}moveLayer(e,r){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new l.k(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===r)return;let s=this._order.indexOf(e);this._order.splice(s,1);let a=r?this._order.indexOf(r):this._order.length;r&&a===-1?this.fire(new l.k(new Error(`Cannot move layer "${e}" before non-existing layer "${r}".`))):(this._order.splice(a,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();let r=this._layers[e];if(!r)return void this.fire(new l.k(new Error(`Cannot remove non-existing layer "${e}".`)));r.setEventedParent(null);let s=this._order.indexOf(e);this._order.splice(s,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,r,s){this._checkLoaded();let a=this.getLayer(e);a?a.minzoom===r&&a.maxzoom===s||(r!=null&&(a.minzoom=r),s!=null&&(a.maxzoom=s),this._updateLayer(a)):this.fire(new l.k(new Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,r,s={}){this._checkLoaded();let a=this.getLayer(e);if(a){if(!l.bH(a.filter,r))return r==null?(a.setFilter(void 0),void this._updateLayer(a)):void(this._validate(l.z.filter,`layers.${a.id}.filter`,r,null,s)||(a.setFilter(l.bK(r)),this._updateLayer(a)))}else this.fire(new l.k(new Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return l.bK(this.getLayer(e).filter)}setLayoutProperty(e,r,s,a={}){this._checkLoaded();let u=this.getLayer(e);u?l.bH(u.getLayoutProperty(r),s)||(u.setLayoutProperty(r,s,a),this._updateLayer(u)):this.fire(new l.k(new Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,r){let s=this.getLayer(e);if(s)return s.getLayoutProperty(r);this.fire(new l.k(new Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,r,s,a={}){this._checkLoaded();let u=this.getLayer(e);u?l.bH(u.getPaintProperty(r),s)||this._updatePaintProperty(u,r,s,a):this.fire(new l.k(new Error(`Cannot style non-existing layer "${e}".`)))}_updatePaintProperty(e,r,s,a={}){e.setPaintProperty(r,s,a)&&this._updateLayer(e),this._changed=!0,this._updatedPaintProps[e.id]=!0,this._serializedLayers=null}getPaintProperty(e,r){return this.getLayer(e).getPaintProperty(r)}setFeatureState(e,r){this._checkLoaded();let s=e.source,a=e.sourceLayer,u=this.sourceCaches[s];if(u===void 0)return void this.fire(new l.k(new Error(`The source '${s}' does not exist in the map's style.`)));let d=u.getSource().type;d==="geojson"&&a?this.fire(new l.k(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):d!=="vector"||a?(e.id===void 0&&this.fire(new l.k(new Error("The feature id parameter must be provided."))),u.setFeatureState(a,e.id,r)):this.fire(new l.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,r){this._checkLoaded();let s=e.source,a=this.sourceCaches[s];if(a===void 0)return void this.fire(new l.k(new Error(`The source '${s}' does not exist in the map's style.`)));let u=a.getSource().type,d=u==="vector"?e.sourceLayer:void 0;u!=="vector"||d?r&&typeof e.id!="string"&&typeof e.id!="number"?this.fire(new l.k(new Error("A feature id is required to remove its specific state property."))):a.removeFeatureState(d,e.id,r):this.fire(new l.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();let r=e.source,s=e.sourceLayer,a=this.sourceCaches[r];if(a!==void 0)return a.getSource().type!=="vector"||s?(e.id===void 0&&this.fire(new l.k(new Error("The feature id parameter must be provided."))),a.getFeatureState(s,e.id)):void this.fire(new l.k(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new l.k(new Error(`The source '${r}' does not exist in the map's style.`)))}getTransition(){return l.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let e=l.bN(this.sourceCaches,(u=>u.serialize())),r=this._serializeByIds(this._order,!0),s=this.map.getTerrain()||void 0,a=this.stylesheet;return l.bO({version:a.version,name:a.name,metadata:a.metadata,light:a.light,sky:a.sky,center:a.center,zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,sprite:a.sprite,glyphs:a.glyphs,transition:a.transition,projection:a.projection,sources:e,layers:r,terrain:s},(u=>u!==void 0))}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&this.sourceCaches[e.source].getSource().type!=="raster"&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let r=d=>this._layers[d].type==="fill-extrusion",s={},a=[];for(let d=this._order.length-1;d>=0;d--){let m=this._order[d];if(r(m)){s[m]=d;for(let B of e){let Q=B[m];if(Q)for(let C of Q)a.push(C)}}}a.sort(((d,m)=>m.intersectionZ-d.intersectionZ));let u=[];for(let d=this._order.length-1;d>=0;d--){let m=this._order[d];if(r(m))for(let B=a.length-1;B>=0;B--){let Q=a[B].feature;if(s[Q.layer.id]this.map.terrain.getElevation(C,x,I):void 0));return this.placement&&u.push((function(Q,C,x,I,b,T,G){let P={},R=T.queryRenderedSymbols(I),z=[];for(let K of Object.keys(R).map(Number))z.push(G[K]);z.sort(Pr);for(let K of z){let Y=K.featureIndex.lookupSymbolFeatures(R[K.bucketInstanceId],C,K.bucketIndex,K.sourceLayerIndex,{filterSpec:b.filter,globalState:b.globalState},b.layers,b.availableImages,Q);for(let H in Y){let V=P[H]=P[H]||[],O=Y[H];O.sort(((q,ce)=>{let se=K.featureSortOrder;if(se){let ae=se.indexOf(q.featureIndex);return se.indexOf(ce.featureIndex)-ae}return ce.featureIndex-q.featureIndex}));for(let q of O)V.push(q)}}return(function(K,Y,H){for(let V in K)for(let O of K[V])Rr(O,H[Y[V].source]);return K})(P,Q,x)})(this._layers,d,this.sourceCaches,e,B,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(u)}querySourceFeatures(e,r){r!=null&&r.filter&&this._validate(l.z.filter,"querySourceFeatures.filter",r.filter,null,r);let s=this.sourceCaches[e];return s?(function(a,u){let d=a.getRenderableIds().map((Q=>a.getTileByID(Q))),m=[],B={};for(let Q=0;QI.getTileByID(b))).sort(((b,T)=>T.tileID.overscaledZ-b.tileID.overscaledZ||(b.tileID.isLessThan(T.tileID)?-1:1)))}let x=this.crossTileSymbolIndex.addLayer(C,B[C.source],e.center.lng);d=d||x}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((u=u||this._layerOrderChanged||s===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(Se.now(),e.zoom))&&(this.pauseablePlacement=new ao(e,this.map.terrain,this._order,u,r,s,a,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,B),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(Se.now()),m=!0),d&&this.pauseablePlacement.placement.setStale()),m||d)for(let Q of this._order){let C=this._layers[Q];C.type==="symbol"&&this.placement.updateLayerOpacities(C,B[C.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(Se.now())}_releaseSymbolFadeTiles(){for(let e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,r){return l._(this,void 0,void 0,(function*(){let s=yield this.imageManager.getImages(r.icons);this._updateTilesForChangedImages();let a=this.sourceCaches[r.source];return a&&a.setDependencies(r.tileID.key,r.type,r.icons),s}))}getGlyphs(e,r){return l._(this,void 0,void 0,(function*(){let s=yield this.glyphManager.getGlyphs(r.stacks),a=this.sourceCaches[r.source];return a&&a.setDependencies(r.tileID.key,r.type,[""]),s}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,r={}){this._checkLoaded(),e&&this._validate(l.z.glyphs,"glyphs",e,null,r)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}getDashes(e,r){return l._(this,void 0,void 0,(function*(){let s={};for(let[a,u]of Object.entries(r.dashes))s[a]=this.lineAtlas.getDash(u.dasharray,u.round);return s}))}addSprite(e,r,s={},a){this._checkLoaded();let u=[{id:e,url:r}],d=[..._A(this.stylesheet.sprite),...u];this._validate(l.z.sprite,"sprite",d,null,s)||(this.stylesheet.sprite=d,this._loadSprite(u,!0,a))}removeSprite(e){this._checkLoaded();let r=_A(this.stylesheet.sprite);if(r.find((s=>s.id===e))){if(this._spritesImagesIds[e])for(let s of this._spritesImagesIds[e])this.imageManager.removeImage(s),this._changedImages[s]=!0;r.splice(r.findIndex((s=>s.id===e)),1),this.stylesheet.sprite=r.length>0?r:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.l("data",{dataType:"style"}))}else this.fire(new l.k(new Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return _A(this.stylesheet.sprite)}setSprite(e,r={},s){this._checkLoaded(),e&&this._validate(l.z.sprite,"sprite",e,null,r)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,s):(this._unloadSprite(),s&&s(null)))}}var Ac=l.aJ([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class rc{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,r,s,a,u,d,m,B,Q){this.context=e;let C=this.boundPaintVertexBuffers.length!==a.length;for(let x=0;!C&&x({u_texture:0,u_ele_delta:h,u_fog_matrix:e,u_fog_color:r?r.properties.get("fog-color"):l.bf.white,u_fog_ground_blend:r?r.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:a?0:r?r.calculateFogBlendOpacity(s):0,u_horizon_color:r?r.properties.get("horizon-color"):l.bf.white,u_horizon_fog_blend:r?r.properties.get("horizon-fog-blend"):1,u_is_globe_mode:a?1:0}),po={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function pr(h){let e=[];for(let r=0;r({u_depth:new l.bP(se,ae.u_depth),u_terrain:new l.bP(se,ae.u_terrain),u_terrain_dim:new l.bg(se,ae.u_terrain_dim),u_terrain_matrix:new l.bR(se,ae.u_terrain_matrix),u_terrain_unpack:new l.bS(se,ae.u_terrain_unpack),u_terrain_exaggeration:new l.bg(se,ae.u_terrain_exaggeration)}))(e,ce),this.projectionUniforms=((se,ae)=>({u_projection_matrix:new l.bR(se,ae.u_projection_matrix),u_projection_tile_mercator_coords:new l.bS(se,ae.u_projection_tile_mercator_coords),u_projection_clipping_plane:new l.bS(se,ae.u_projection_clipping_plane),u_projection_transition:new l.bg(se,ae.u_projection_transition),u_projection_fallback_matrix:new l.bR(se,ae.u_projection_fallback_matrix)}))(e,ce),this.binderUniforms=s?s.getUniforms(e,ce):[]}draw(e,r,s,a,u,d,m,B,Q,C,x,I,b,T,G,P,R,z,K){let Y=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(s),e.setStencilMode(a),e.setColorMode(u),e.setCullFace(d),B){e.activeTexture.set(Y.TEXTURE2),Y.bindTexture(Y.TEXTURE_2D,B.depthTexture),e.activeTexture.set(Y.TEXTURE3),Y.bindTexture(Y.TEXTURE_2D,B.texture);for(let V in this.terrainUniforms)this.terrainUniforms[V].set(B[V])}if(Q)for(let V in Q)this.projectionUniforms[po[V]].set(Q[V]);if(m)for(let V in this.fixedUniforms)this.fixedUniforms[V].set(m[V]);P&&P.setUniforms(e,this.binderUniforms,T,{zoom:G});let H=0;switch(r){case Y.LINES:H=2;break;case Y.TRIANGLES:H=3;break;case Y.LINE_STRIP:H=1}for(let V of b.get()){let O=V.vaos||(V.vaos={});(O[C]||(O[C]=new rc)).bind(e,this,x,P?P.getPaintVertexBuffers():[],I,V.vertexOffset,R,z,K),Y.drawElements(r,V.primitiveLength*H,Y.UNSIGNED_SHORT,V.primitiveOffset*H*2)}}}function ls(h,e,r){let s=1/l.aC(r,1,e.transform.tileZoom),a=Math.pow(2,r.tileID.overscaledZ),u=r.tileSize*Math.pow(2,e.transform.tileZoom)/a,d=u*(r.tileID.canonical.x+r.tileID.wrap*a),m=u*r.tileID.canonical.y;return{u_image:0,u_texsize:r.imageAtlasTexture.size,u_scale:[s,h.fromScale,h.toScale],u_fade:h.t,u_pixel_coord_upper:[d>>16,m>>16],u_pixel_coord_lower:[65535&d,65535&m]}}let Wi=(h,e,r,s)=>{let a=h.style.light,u=a.properties.get("position"),d=[u.x,u.y,u.z],m=l.bV();a.properties.get("anchor")==="viewport"&&l.bW(m,h.transform.bearingInRadians),l.bX(d,d,m);let B=h.transform.transformLightDirection(d),Q=a.properties.get("color");return{u_lightpos:d,u_lightpos_globe:B,u_lightintensity:a.properties.get("intensity"),u_lightcolor:[Q.r,Q.g,Q.b],u_vertical_gradient:+e,u_opacity:r,u_fill_translate:s}},nc=(h,e,r,s,a,u,d)=>l.e(Wi(h,e,r,s),ls(u,h,d),{u_height_factor:-Math.pow(2,a.overscaledZ)/d.tileSize/8}),cs=(h,e,r,s)=>l.e(ls(e,h,r),{u_fill_translate:s}),yn=(h,e)=>({u_world:h,u_fill_translate:e}),Qn=(h,e,r,s,a)=>l.e(cs(h,e,r,a),{u_world:s}),sc=(h,e,r,s,a)=>{let u=h.transform,d,m,B=0;if(r.paint.get("circle-pitch-alignment")==="map"){let Q=l.aC(e,1,u.zoom);d=!0,m=[Q,Q],B=Q/(l.$*Math.pow(2,e.tileID.overscaledZ))*2*Math.PI*a}else d=!1,m=u.pixelsToGLUnits;return{u_camera_to_center_distance:u.cameraToCenterDistance,u_scale_with_map:+(r.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+d,u_device_pixel_ratio:h.pixelRatio,u_extrude_scale:m,u_globe_extrude_scale:B,u_translate:s}},hs=h=>({u_pixel_extrude_scale:[1/h.width,1/h.height]}),oc=h=>({u_viewport_size:[h.width,h.height]}),fr=(h,e=1)=>({u_color:h,u_overlay:0,u_overlay_scale:e}),Sa=(h,e,r,s)=>{let a=l.aC(h,1,e)/(l.$*Math.pow(2,h.tileID.overscaledZ))*2*Math.PI*s;return{u_extrude_scale:l.aC(h,1,e),u_intensity:r,u_globe_extrude_scale:a}},mo=(h,e,r,s)=>{let a=l.L();l.bY(a,0,h.width,h.height,0,0,1);let u=h.context.gl;return{u_matrix:a,u_world:[u.drawingBufferWidth,u.drawingBufferHeight],u_image:r,u_color_ramp:s,u_opacity:e.paint.get("heatmap-opacity")}},ac=(h,e,r)=>{let s=r.paint.get("hillshade-accent-color"),a;switch(r.paint.get("hillshade-method")){case"basic":a=4;break;case"combined":a=1;break;case"igor":a=2;break;case"multidirectional":a=3;break;default:a=0}let u=r.getIlluminationProperties();for(let d=0;d{let r=e.stride,s=l.L();return l.bY(s,0,l.$,-l.$,0,0,1),l.M(s,s,[0,-l.$,0]),{u_matrix:s,u_image:1,u_dimension:[r,r],u_zoom:h.overscaledZ,u_unpack:e.getUnpackVector()}};function Bo(h,e){let r=Math.pow(2,e.canonical.z),s=e.canonical.y;return[new l.a1(0,s/r).toLngLat().lat,new l.a1(0,(s+1)/r).toLngLat().lat]}let Ua=(h,e,r=0)=>({u_image:0,u_unpack:e.getUnpackVector(),u_dimension:[e.stride,e.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:r,u_opacity:h.paint.get("color-relief-opacity")}),us=(h,e,r,s)=>{let a=h.transform;return{u_translation:yo(h,e,r),u_ratio:s/l.aC(e,1,a.zoom),u_device_pixel_ratio:h.pixelRatio,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Ta=(h,e,r,s,a)=>l.e(us(h,e,r,s),{u_image:0,u_image_height:a}),La=(h,e,r,s,a)=>{let u=h.transform,d=_o(e,u);return{u_translation:yo(h,e,r),u_texsize:e.imageAtlasTexture.size,u_ratio:s/l.aC(e,1,u.zoom),u_device_pixel_ratio:h.pixelRatio,u_image:0,u_scale:[d,a.fromScale,a.toScale],u_fade:a.t,u_units_to_pixels:[1/u.pixelsToGLUnits[0],1/u.pixelsToGLUnits[1]]}},mr=(h,e,r,s,a)=>{let u=_o(e,h.transform);return l.e(us(h,e,r,s),{u_tileratio:u,u_crossfade_from:a.fromScale,u_crossfade_to:a.toScale,u_image:0,u_mix:a.t,u_lineatlas_width:h.lineAtlas.width,u_lineatlas_height:h.lineAtlas.height})};function _o(h,e){return 1/l.aC(h,1,e.tileZoom)}function yo(h,e,r){return l.aD(h.transform,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}let Cn=(h,e,r,s,a)=>{return{u_tl_parent:h,u_scale_parent:e,u_buffer_scale:1,u_fade_t:r.mix,u_opacity:r.opacity*s.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:s.paint.get("raster-brightness-min"),u_brightness_high:s.paint.get("raster-brightness-max"),u_saturation_factor:(d=s.paint.get("raster-saturation"),d>0?1-1/(1.001-d):-d),u_contrast_factor:(u=s.paint.get("raster-contrast"),u>0?1/(1-u):1+u),u_spin_weights:lc(s.paint.get("raster-hue-rotate")),u_coords_top:[a[0].x,a[0].y,a[1].x,a[1].y],u_coords_bottom:[a[3].x,a[3].y,a[2].x,a[2].y]};var u,d};function lc(h){h*=Math.PI/180;let e=Math.sin(h),r=Math.cos(h);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}let wn=(h,e,r,s,a,u,d,m,B,Q,C,x,I)=>{let b=d.transform;return{u_is_size_zoom_constant:+(h==="constant"||h==="source"),u_is_size_feature_constant:+(h==="constant"||h==="camera"),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:b.cameraToCenterDistance,u_pitch:b.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:b.width/b.height,u_fade_change:d.options.fadeDuration?d.symbolFadeChange:1,u_label_plane_matrix:m,u_coord_matrix:B,u_is_text:+C,u_pitch_with_map:+s,u_is_along_line:a,u_is_variable_anchor:u,u_texsize:x,u_texture:0,u_translation:Q,u_pitched_scale:I}},ka=(h,e,r,s,a,u,d,m,B,Q,C,x,I,b)=>{let T=d.transform;return l.e(wn(h,e,r,s,a,u,d,m,B,Q,C,x,b),{u_gamma_scale:s?Math.cos(T.pitch*Math.PI/180)*T.cameraToCenterDistance:1,u_device_pixel_ratio:d.pixelRatio,u_is_halo:1})},cc=(h,e,r,s,a,u,d,m,B,Q,C,x,I)=>l.e(ka(h,e,r,s,a,u,d,m,B,Q,!0,C,0,I),{u_texsize_icon:x,u_texture_icon:1}),Ga=(h,e)=>({u_opacity:h,u_color:e}),Pa=(h,e,r,s,a)=>l.e((function(u,d,m,B){let Q=m.imageManager.getPattern(u.from.toString()),C=m.imageManager.getPattern(u.to.toString()),{width:x,height:I}=m.imageManager.getPixelSize(),b=Math.pow(2,B.tileID.overscaledZ),T=B.tileSize*Math.pow(2,m.transform.tileZoom)/b,G=T*(B.tileID.canonical.x+B.tileID.wrap*b),P=T*B.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Q.tl,u_pattern_br_a:Q.br,u_pattern_tl_b:C.tl,u_pattern_br_b:C.br,u_texsize:[x,I],u_mix:d.t,u_pattern_size_a:Q.displaySize,u_pattern_size_b:C.displaySize,u_scale_a:d.fromScale,u_scale_b:d.toScale,u_tile_units_to_pixels:1/l.aC(B,1,m.transform.tileZoom),u_pixel_coord_upper:[G>>16,P>>16],u_pixel_coord_lower:[65535&G,65535&P]}})(r,a,e,s),{u_opacity:h}),Qo=(h,e)=>{},Co={fillExtrusion:(h,e)=>({u_lightpos:new l.bT(h,e.u_lightpos),u_lightpos_globe:new l.bT(h,e.u_lightpos_globe),u_lightintensity:new l.bg(h,e.u_lightintensity),u_lightcolor:new l.bT(h,e.u_lightcolor),u_vertical_gradient:new l.bg(h,e.u_vertical_gradient),u_opacity:new l.bg(h,e.u_opacity),u_fill_translate:new l.bU(h,e.u_fill_translate)}),fillExtrusionPattern:(h,e)=>({u_lightpos:new l.bT(h,e.u_lightpos),u_lightpos_globe:new l.bT(h,e.u_lightpos_globe),u_lightintensity:new l.bg(h,e.u_lightintensity),u_lightcolor:new l.bT(h,e.u_lightcolor),u_vertical_gradient:new l.bg(h,e.u_vertical_gradient),u_height_factor:new l.bg(h,e.u_height_factor),u_opacity:new l.bg(h,e.u_opacity),u_fill_translate:new l.bU(h,e.u_fill_translate),u_image:new l.bP(h,e.u_image),u_texsize:new l.bU(h,e.u_texsize),u_pixel_coord_upper:new l.bU(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new l.bU(h,e.u_pixel_coord_lower),u_scale:new l.bT(h,e.u_scale),u_fade:new l.bg(h,e.u_fade)}),fill:(h,e)=>({u_fill_translate:new l.bU(h,e.u_fill_translate)}),fillPattern:(h,e)=>({u_image:new l.bP(h,e.u_image),u_texsize:new l.bU(h,e.u_texsize),u_pixel_coord_upper:new l.bU(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new l.bU(h,e.u_pixel_coord_lower),u_scale:new l.bT(h,e.u_scale),u_fade:new l.bg(h,e.u_fade),u_fill_translate:new l.bU(h,e.u_fill_translate)}),fillOutline:(h,e)=>({u_world:new l.bU(h,e.u_world),u_fill_translate:new l.bU(h,e.u_fill_translate)}),fillOutlinePattern:(h,e)=>({u_world:new l.bU(h,e.u_world),u_image:new l.bP(h,e.u_image),u_texsize:new l.bU(h,e.u_texsize),u_pixel_coord_upper:new l.bU(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new l.bU(h,e.u_pixel_coord_lower),u_scale:new l.bT(h,e.u_scale),u_fade:new l.bg(h,e.u_fade),u_fill_translate:new l.bU(h,e.u_fill_translate)}),circle:(h,e)=>({u_camera_to_center_distance:new l.bg(h,e.u_camera_to_center_distance),u_scale_with_map:new l.bP(h,e.u_scale_with_map),u_pitch_with_map:new l.bP(h,e.u_pitch_with_map),u_extrude_scale:new l.bU(h,e.u_extrude_scale),u_device_pixel_ratio:new l.bg(h,e.u_device_pixel_ratio),u_globe_extrude_scale:new l.bg(h,e.u_globe_extrude_scale),u_translate:new l.bU(h,e.u_translate)}),collisionBox:(h,e)=>({u_pixel_extrude_scale:new l.bU(h,e.u_pixel_extrude_scale)}),collisionCircle:(h,e)=>({u_viewport_size:new l.bU(h,e.u_viewport_size)}),debug:(h,e)=>({u_color:new l.bQ(h,e.u_color),u_overlay:new l.bP(h,e.u_overlay),u_overlay_scale:new l.bg(h,e.u_overlay_scale)}),depth:Qo,clippingMask:Qo,heatmap:(h,e)=>({u_extrude_scale:new l.bg(h,e.u_extrude_scale),u_intensity:new l.bg(h,e.u_intensity),u_globe_extrude_scale:new l.bg(h,e.u_globe_extrude_scale)}),heatmapTexture:(h,e)=>({u_matrix:new l.bR(h,e.u_matrix),u_world:new l.bU(h,e.u_world),u_image:new l.bP(h,e.u_image),u_color_ramp:new l.bP(h,e.u_color_ramp),u_opacity:new l.bg(h,e.u_opacity)}),hillshade:(h,e)=>({u_image:new l.bP(h,e.u_image),u_latrange:new l.bU(h,e.u_latrange),u_exaggeration:new l.bg(h,e.u_exaggeration),u_altitudes:new l.b_(h,e.u_altitudes),u_azimuths:new l.b_(h,e.u_azimuths),u_accent:new l.bQ(h,e.u_accent),u_method:new l.bP(h,e.u_method),u_shadows:new l.bZ(h,e.u_shadows),u_highlights:new l.bZ(h,e.u_highlights)}),hillshadePrepare:(h,e)=>({u_matrix:new l.bR(h,e.u_matrix),u_image:new l.bP(h,e.u_image),u_dimension:new l.bU(h,e.u_dimension),u_zoom:new l.bg(h,e.u_zoom),u_unpack:new l.bS(h,e.u_unpack)}),colorRelief:(h,e)=>({u_image:new l.bP(h,e.u_image),u_unpack:new l.bS(h,e.u_unpack),u_dimension:new l.bU(h,e.u_dimension),u_elevation_stops:new l.bP(h,e.u_elevation_stops),u_color_stops:new l.bP(h,e.u_color_stops),u_color_ramp_size:new l.bP(h,e.u_color_ramp_size),u_opacity:new l.bg(h,e.u_opacity)}),line:(h,e)=>({u_translation:new l.bU(h,e.u_translation),u_ratio:new l.bg(h,e.u_ratio),u_device_pixel_ratio:new l.bg(h,e.u_device_pixel_ratio),u_units_to_pixels:new l.bU(h,e.u_units_to_pixels)}),lineGradient:(h,e)=>({u_translation:new l.bU(h,e.u_translation),u_ratio:new l.bg(h,e.u_ratio),u_device_pixel_ratio:new l.bg(h,e.u_device_pixel_ratio),u_units_to_pixels:new l.bU(h,e.u_units_to_pixels),u_image:new l.bP(h,e.u_image),u_image_height:new l.bg(h,e.u_image_height)}),linePattern:(h,e)=>({u_translation:new l.bU(h,e.u_translation),u_texsize:new l.bU(h,e.u_texsize),u_ratio:new l.bg(h,e.u_ratio),u_device_pixel_ratio:new l.bg(h,e.u_device_pixel_ratio),u_image:new l.bP(h,e.u_image),u_units_to_pixels:new l.bU(h,e.u_units_to_pixels),u_scale:new l.bT(h,e.u_scale),u_fade:new l.bg(h,e.u_fade)}),lineSDF:(h,e)=>({u_translation:new l.bU(h,e.u_translation),u_ratio:new l.bg(h,e.u_ratio),u_device_pixel_ratio:new l.bg(h,e.u_device_pixel_ratio),u_units_to_pixels:new l.bU(h,e.u_units_to_pixels),u_image:new l.bP(h,e.u_image),u_mix:new l.bg(h,e.u_mix),u_tileratio:new l.bg(h,e.u_tileratio),u_crossfade_from:new l.bg(h,e.u_crossfade_from),u_crossfade_to:new l.bg(h,e.u_crossfade_to),u_lineatlas_width:new l.bg(h,e.u_lineatlas_width),u_lineatlas_height:new l.bg(h,e.u_lineatlas_height)}),raster:(h,e)=>({u_tl_parent:new l.bU(h,e.u_tl_parent),u_scale_parent:new l.bg(h,e.u_scale_parent),u_buffer_scale:new l.bg(h,e.u_buffer_scale),u_fade_t:new l.bg(h,e.u_fade_t),u_opacity:new l.bg(h,e.u_opacity),u_image0:new l.bP(h,e.u_image0),u_image1:new l.bP(h,e.u_image1),u_brightness_low:new l.bg(h,e.u_brightness_low),u_brightness_high:new l.bg(h,e.u_brightness_high),u_saturation_factor:new l.bg(h,e.u_saturation_factor),u_contrast_factor:new l.bg(h,e.u_contrast_factor),u_spin_weights:new l.bT(h,e.u_spin_weights),u_coords_top:new l.bS(h,e.u_coords_top),u_coords_bottom:new l.bS(h,e.u_coords_bottom)}),symbolIcon:(h,e)=>({u_is_size_zoom_constant:new l.bP(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new l.bP(h,e.u_is_size_feature_constant),u_size_t:new l.bg(h,e.u_size_t),u_size:new l.bg(h,e.u_size),u_camera_to_center_distance:new l.bg(h,e.u_camera_to_center_distance),u_pitch:new l.bg(h,e.u_pitch),u_rotate_symbol:new l.bP(h,e.u_rotate_symbol),u_aspect_ratio:new l.bg(h,e.u_aspect_ratio),u_fade_change:new l.bg(h,e.u_fade_change),u_label_plane_matrix:new l.bR(h,e.u_label_plane_matrix),u_coord_matrix:new l.bR(h,e.u_coord_matrix),u_is_text:new l.bP(h,e.u_is_text),u_pitch_with_map:new l.bP(h,e.u_pitch_with_map),u_is_along_line:new l.bP(h,e.u_is_along_line),u_is_variable_anchor:new l.bP(h,e.u_is_variable_anchor),u_texsize:new l.bU(h,e.u_texsize),u_texture:new l.bP(h,e.u_texture),u_translation:new l.bU(h,e.u_translation),u_pitched_scale:new l.bg(h,e.u_pitched_scale)}),symbolSDF:(h,e)=>({u_is_size_zoom_constant:new l.bP(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new l.bP(h,e.u_is_size_feature_constant),u_size_t:new l.bg(h,e.u_size_t),u_size:new l.bg(h,e.u_size),u_camera_to_center_distance:new l.bg(h,e.u_camera_to_center_distance),u_pitch:new l.bg(h,e.u_pitch),u_rotate_symbol:new l.bP(h,e.u_rotate_symbol),u_aspect_ratio:new l.bg(h,e.u_aspect_ratio),u_fade_change:new l.bg(h,e.u_fade_change),u_label_plane_matrix:new l.bR(h,e.u_label_plane_matrix),u_coord_matrix:new l.bR(h,e.u_coord_matrix),u_is_text:new l.bP(h,e.u_is_text),u_pitch_with_map:new l.bP(h,e.u_pitch_with_map),u_is_along_line:new l.bP(h,e.u_is_along_line),u_is_variable_anchor:new l.bP(h,e.u_is_variable_anchor),u_texsize:new l.bU(h,e.u_texsize),u_texture:new l.bP(h,e.u_texture),u_gamma_scale:new l.bg(h,e.u_gamma_scale),u_device_pixel_ratio:new l.bg(h,e.u_device_pixel_ratio),u_is_halo:new l.bP(h,e.u_is_halo),u_translation:new l.bU(h,e.u_translation),u_pitched_scale:new l.bg(h,e.u_pitched_scale)}),symbolTextAndIcon:(h,e)=>({u_is_size_zoom_constant:new l.bP(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new l.bP(h,e.u_is_size_feature_constant),u_size_t:new l.bg(h,e.u_size_t),u_size:new l.bg(h,e.u_size),u_camera_to_center_distance:new l.bg(h,e.u_camera_to_center_distance),u_pitch:new l.bg(h,e.u_pitch),u_rotate_symbol:new l.bP(h,e.u_rotate_symbol),u_aspect_ratio:new l.bg(h,e.u_aspect_ratio),u_fade_change:new l.bg(h,e.u_fade_change),u_label_plane_matrix:new l.bR(h,e.u_label_plane_matrix),u_coord_matrix:new l.bR(h,e.u_coord_matrix),u_is_text:new l.bP(h,e.u_is_text),u_pitch_with_map:new l.bP(h,e.u_pitch_with_map),u_is_along_line:new l.bP(h,e.u_is_along_line),u_is_variable_anchor:new l.bP(h,e.u_is_variable_anchor),u_texsize:new l.bU(h,e.u_texsize),u_texsize_icon:new l.bU(h,e.u_texsize_icon),u_texture:new l.bP(h,e.u_texture),u_texture_icon:new l.bP(h,e.u_texture_icon),u_gamma_scale:new l.bg(h,e.u_gamma_scale),u_device_pixel_ratio:new l.bg(h,e.u_device_pixel_ratio),u_is_halo:new l.bP(h,e.u_is_halo),u_translation:new l.bU(h,e.u_translation),u_pitched_scale:new l.bg(h,e.u_pitched_scale)}),background:(h,e)=>({u_opacity:new l.bg(h,e.u_opacity),u_color:new l.bQ(h,e.u_color)}),backgroundPattern:(h,e)=>({u_opacity:new l.bg(h,e.u_opacity),u_image:new l.bP(h,e.u_image),u_pattern_tl_a:new l.bU(h,e.u_pattern_tl_a),u_pattern_br_a:new l.bU(h,e.u_pattern_br_a),u_pattern_tl_b:new l.bU(h,e.u_pattern_tl_b),u_pattern_br_b:new l.bU(h,e.u_pattern_br_b),u_texsize:new l.bU(h,e.u_texsize),u_mix:new l.bg(h,e.u_mix),u_pattern_size_a:new l.bU(h,e.u_pattern_size_a),u_pattern_size_b:new l.bU(h,e.u_pattern_size_b),u_scale_a:new l.bg(h,e.u_scale_a),u_scale_b:new l.bg(h,e.u_scale_b),u_pixel_coord_upper:new l.bU(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new l.bU(h,e.u_pixel_coord_lower),u_tile_units_to_pixels:new l.bg(h,e.u_tile_units_to_pixels)}),terrain:(h,e)=>({u_texture:new l.bP(h,e.u_texture),u_ele_delta:new l.bg(h,e.u_ele_delta),u_fog_matrix:new l.bR(h,e.u_fog_matrix),u_fog_color:new l.bQ(h,e.u_fog_color),u_fog_ground_blend:new l.bg(h,e.u_fog_ground_blend),u_fog_ground_blend_opacity:new l.bg(h,e.u_fog_ground_blend_opacity),u_horizon_color:new l.bQ(h,e.u_horizon_color),u_horizon_fog_blend:new l.bg(h,e.u_horizon_fog_blend),u_is_globe_mode:new l.bg(h,e.u_is_globe_mode)}),terrainDepth:(h,e)=>({u_ele_delta:new l.bg(h,e.u_ele_delta)}),terrainCoords:(h,e)=>({u_texture:new l.bP(h,e.u_texture),u_terrain_coords_id:new l.bg(h,e.u_terrain_coords_id),u_ele_delta:new l.bg(h,e.u_ele_delta)}),projectionErrorMeasurement:(h,e)=>({u_input:new l.bg(h,e.u_input),u_output_expected:new l.bg(h,e.u_output_expected)}),atmosphere:(h,e)=>({u_sun_pos:new l.bT(h,e.u_sun_pos),u_atmosphere_blend:new l.bg(h,e.u_atmosphere_blend),u_globe_position:new l.bT(h,e.u_globe_position),u_globe_radius:new l.bg(h,e.u_globe_radius),u_inv_proj_matrix:new l.bR(h,e.u_inv_proj_matrix)}),sky:(h,e)=>({u_sky_color:new l.bQ(h,e.u_sky_color),u_horizon_color:new l.bQ(h,e.u_horizon_color),u_horizon:new l.bU(h,e.u_horizon),u_horizon_normal:new l.bU(h,e.u_horizon_normal),u_sky_horizon_blend:new l.bg(h,e.u_sky_horizon_blend),u_sky_blend:new l.bg(h,e.u_sky_blend)})};class Ra{constructor(e,r,s){this.context=e;let a=e.gl;this.buffer=a.createBuffer(),this.dynamicDraw=!!s,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,r.arrayBuffer,this.dynamicDraw?a.DYNAMIC_DRAW:a.STATIC_DRAW),this.dynamicDraw||delete r.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){let r=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),r.bufferSubData(r.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let gs={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class CA{constructor(e,r,s,a){this.length=r.length,this.attributes=s,this.itemSize=r.bytesPerElement,this.dynamicDraw=a,this.context=e;let u=e.gl;this.buffer=u.createBuffer(),e.bindVertexBuffer.set(this.buffer),u.bufferData(u.ARRAY_BUFFER,r.arrayBuffer,this.dynamicDraw?u.DYNAMIC_DRAW:u.STATIC_DRAW),this.dynamicDraw||delete r.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);let r=this.context.gl;this.bind(),r.bufferSubData(r.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,r){for(let s=0;s0&&(Q.push({circleArray:H,circleOffset:x,coord:z}),C+=H.length/4,x=C),Y&&B.draw(u,m.LINES,Ze.disabled,at.disabled,h.colorModeForRenderPass(),Ke.disabled,hs(h.transform),h.style.map.terrain&&h.style.map.terrain.getTerrainData(z),d.getProjectionData({overscaledTileID:z,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),r.id,Y.layoutVertexBuffer,Y.indexBuffer,Y.segments,null,h.transform.zoom,null,null,Y.collisionVertexBuffer)}if(!a||!Q.length)return;let I=h.useProgram("collisionCircle"),b=new l.b$;b.resize(4*C),b._trim();let T=0;for(let R of Q)for(let z=0;z=0&&(G[R.associatedIconIndex]={shiftedAnchor:_e,angle:Te})}else gA(R.numGlyphs,b)}if(B){T.clear();let P=h.icon.placedSymbolArray;for(let R=0;Rh.style.map.terrain.getElevation(se,xi,xt):null,Zt=r.layout.get("text-rotation-alignment")==="map";Ui(he,h,a,hi,IA,R,Q,Zt,se.toUnwrapped(),G.width,G.height,ZA,Ht)}let Ur=a&&O||JA,Gi=z||Ur?mc:R?hi:h.transform.clipSpaceToPixelsMatrix,VA=_e&&r.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(1)!==0,EA;EA=_e?he.iconsInText?cc(Te.kind,wt,K,R,z,Ur,h,Gi,Sr,ZA,Dt,pt,ce):ka(Te.kind,wt,K,R,z,Ur,h,Gi,Sr,ZA,a,Dt,0,ce):wn(Te.kind,wt,K,R,z,Ur,h,Gi,Sr,ZA,a,Dt,ce);let qA={program:ut,buffers:Ee,uniformValues:EA,projectionData:Mr,atlasTexture:It,atlasTextureIcon:St,atlasInterpolation:Wt,atlasInterpolationIcon:Et,isSDF:_e,hasHalo:VA};if(Y&&he.canOverlap){H=!0;let Ht=Ee.segments.get();for(let Zt of Ht)q.push({segments:new l.aM([Zt]),sortKey:Zt.sortKey,state:qA,terrainData:Bt})}else q.push({segments:Ee.segments,sortKey:0,state:qA,terrainData:Bt})}H&&q.sort(((se,ae)=>se.sortKey-ae.sortKey));for(let se of q){let ae=se.state;if(b.activeTexture.set(T.TEXTURE0),ae.atlasTexture.bind(ae.atlasInterpolation,T.CLAMP_TO_EDGE),ae.atlasTextureIcon&&(b.activeTexture.set(T.TEXTURE1),ae.atlasTextureIcon&&ae.atlasTextureIcon.bind(ae.atlasInterpolationIcon,T.CLAMP_TO_EDGE)),ae.isSDF){let he=ae.uniformValues;ae.hasHalo&&(he.u_is_halo=1,bn(ae.buffers,se.segments,r,h,ae.program,V,C,x,he,ae.projectionData,se.terrainData)),he.u_is_halo=0}bn(ae.buffers,se.segments,r,h,ae.program,V,C,x,ae.uniformValues,ae.projectionData,se.terrainData)}}function bn(h,e,r,s,a,u,d,m,B,Q,C){let x=s.context;a.draw(x,x.gl.TRIANGLES,u,d,m,Ke.backCCW,B,C,Q,r.id,h.layoutVertexBuffer,h.indexBuffer,e,r.paint,s.transform.zoom,h.programConfigurations.get(r.id),h.dynamicLayoutVertexBuffer,h.opacityVertexBuffer)}function So(h,e,r,s,a){let u=h.context,d=u.gl,m=at.disabled,B=new Qt([d.ONE,d.ONE],l.bf.transparent,[!0,!0,!0,!0]),Q=e.getBucket(r);if(!Q)return;let C=s.key,x=r.heatmapFbos.get(C);x||(x=Fn(u,e.tileSize,e.tileSize),r.heatmapFbos.set(C,x)),u.bindFramebuffer.set(x.framebuffer),u.viewport.set([0,0,e.tileSize,e.tileSize]),u.clear({color:l.bf.transparent});let I=Q.programConfigurations.get(r.id),b=h.useProgram("heatmap",I,!a),T=h.transform.getProjectionData({overscaledTileID:e.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),G=h.style.map.terrain.getTerrainData(s);b.draw(u,d.TRIANGLES,Ze.disabled,m,B,Ke.disabled,Sa(e,h.transform.zoom,r.paint.get("heatmap-intensity"),1),G,T,r.id,Q.layoutVertexBuffer,Q.indexBuffer,Q.segments,r.paint,h.transform.zoom,I)}function Va(h,e,r,s,a){let u=h.context,d=u.gl,m=h.transform;u.setColorMode(h.colorModeForRenderPass());let B=Dn(u,e),Q=r.key,C=e.heatmapFbos.get(Q);if(!C)return;u.activeTexture.set(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,C.colorAttachment.get()),u.activeTexture.set(d.TEXTURE1),B.bind(d.LINEAR,d.CLAMP_TO_EDGE);let x=m.getProjectionData({overscaledTileID:r,applyTerrainMatrix:a,applyGlobeMatrix:!s});h.useProgram("heatmapTexture").draw(u,d.TRIANGLES,Ze.disabled,at.disabled,h.colorModeForRenderPass(),Ke.disabled,mo(h,e,0,1),null,x,e.id,h.rasterBoundsBuffer,h.quadTriangleIndexBuffer,h.rasterBoundsSegments,e.paint,m.zoom),C.destroy(),e.heatmapFbos.delete(Q)}function Fn(h,e,r){var s,a;let u=h.gl,d=u.createTexture();u.bindTexture(u.TEXTURE_2D,d),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,u.LINEAR),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,u.LINEAR);let m=(s=h.HALF_FLOAT)!==null&&s!==void 0?s:u.UNSIGNED_BYTE,B=(a=h.RGBA16F)!==null&&a!==void 0?a:u.RGBA;u.texImage2D(u.TEXTURE_2D,0,B,e,r,0,u.RGBA,m,null);let Q=h.createFramebuffer(e,r,!1,!1);return Q.colorAttachment.set(d),Q}function Dn(h,e){return e.colorRampTexture||(e.colorRampTexture=new l.T(h,e.colorRamp,h.gl.RGBA)),e.colorRampTexture}function Sn(h,e,r,s,a){if(!r||!s||!s.imageAtlas)return;let u=s.imageAtlas.patternPositions,d=u[r.to.toString()],m=u[r.from.toString()];if(!d&&m&&(d=m),!m&&d&&(m=d),!d||!m){let B=a.getPaintProperty(e);d=u[B],m=u[B]}d&&m&&h.setConstantPatternPositions(d,m)}function Qr(h,e,r,s,a,u,d,m){let B=h.context.gl,Q="fill-pattern",C=r.paint.get(Q),x=C&&C.constantOr(1),I=r.getCrossfadeParameters(),b,T,G,P,R,z=h.transform,K=r.paint.get("fill-translate"),Y=r.paint.get("fill-translate-anchor");d?(T=x&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",b=B.LINES):(T=x?"fillPattern":"fill",b=B.TRIANGLES);let H=C.constantOr(null);for(let V of s){let O=e.getTile(V);if(x&&!O.patternsLoaded())continue;let q=O.getBucket(r);if(!q)continue;let ce=q.programConfigurations.get(r.id),se=h.useProgram(T,ce),ae=h.style.map.terrain&&h.style.map.terrain.getTerrainData(V);x&&(h.context.activeTexture.set(B.TEXTURE0),O.imageAtlasTexture.bind(B.LINEAR,B.CLAMP_TO_EDGE),ce.updatePaintBuffers(I)),Sn(ce,Q,H,O,r);let he=z.getProjectionData({overscaledTileID:V,applyGlobeMatrix:!m,applyTerrainMatrix:!0}),Ee=l.aD(z,O,K,Y);if(d){P=q.indexBuffer2,R=q.segments2;let _e=[B.drawingBufferWidth,B.drawingBufferHeight];G=T==="fillOutlinePattern"&&x?Qn(h,I,O,_e,Ee):yn(_e,Ee)}else P=q.indexBuffer,R=q.segments,G=x?cs(h,I,O,Ee):{u_fill_translate:Ee};let we=h.stencilModeForClipping(V);se.draw(h.context,b,a,we,u,Ke.backCCW,G,ae,he,r.id,q.layoutVertexBuffer,P,R,r.paint,h.transform.zoom,ce)}}function Mn(h,e,r,s,a,u,d,m){let B=h.context,Q=B.gl,C="fill-extrusion-pattern",x=r.paint.get(C),I=x.constantOr(1),b=r.getCrossfadeParameters(),T=r.paint.get("fill-extrusion-opacity"),G=x.constantOr(null),P=h.transform;for(let R of s){let z=e.getTile(R),K=z.getBucket(r);if(!K)continue;let Y=h.style.map.terrain&&h.style.map.terrain.getTerrainData(R),H=K.programConfigurations.get(r.id),V=h.useProgram(I?"fillExtrusionPattern":"fillExtrusion",H);I&&(h.context.activeTexture.set(Q.TEXTURE0),z.imageAtlasTexture.bind(Q.LINEAR,Q.CLAMP_TO_EDGE),H.updatePaintBuffers(b));let O=P.getProjectionData({overscaledTileID:R,applyGlobeMatrix:!m,applyTerrainMatrix:!0});Sn(H,C,G,z,r);let q=l.aD(P,z,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),ce=r.paint.get("fill-extrusion-vertical-gradient"),se=I?nc(h,ce,T,q,R,b,z):Wi(h,ce,T,q);V.draw(B,B.gl.TRIANGLES,a,u,d,Ke.backCCW,se,Y,O,r.id,K.layoutVertexBuffer,K.indexBuffer,K.segments,r.paint,h.transform.zoom,H,h.style.map.terrain&&K.centroidVertexBuffer)}}function Mo(h,e,r,s,a,u,d,m,B){var Q;let C=h.style.projection,x=h.context,I=h.transform,b=x.gl,T=[`#define NUM_ILLUMINATION_SOURCES ${r.paint.get("hillshade-highlight-color").values.length}`],G=h.useProgram("hillshade",null,!1,T),P=!h.options.moving;for(let R of s){let z=e.getTile(R),K=z.fbo;if(!K)continue;let Y=C.getMeshFromTileID(x,R.canonical,m,!0,"raster"),H=(Q=h.style.map.terrain)===null||Q===void 0?void 0:Q.getTerrainData(R);x.activeTexture.set(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,K.colorAttachment.get());let V=I.getProjectionData({overscaledTileID:R,aligned:P,applyGlobeMatrix:!B,applyTerrainMatrix:!0});G.draw(x,b.TRIANGLES,u,a[R.overscaledZ],d,Ke.backCCW,ac(h,z,r),H,V,r.id,Y.vertexBuffer,Y.indexBuffer,Y.segments)}}function Cr(h,e,r,s,a,u,d,m,B){var Q;let C=h.style.projection,x=h.context,I=h.transform,b=x.gl,T=h.useProgram("colorRelief"),G=!h.options.moving,P=!0,R=0;for(let z of s){let K=e.getTile(z),Y=K.dem;if(P){let se=b.getParameter(b.MAX_TEXTURE_SIZE),{elevationTexture:ae,colorTexture:he}=r.getColorRampTextures(x,se,Y.getUnpackVector());x.activeTexture.set(b.TEXTURE1),ae.bind(b.NEAREST,b.CLAMP_TO_EDGE),x.activeTexture.set(b.TEXTURE4),he.bind(b.LINEAR,b.CLAMP_TO_EDGE),P=!1,R=ae.size[0]}if(!Y||!Y.data)continue;let H=Y.stride,V=Y.getPixels();if(x.activeTexture.set(b.TEXTURE0),x.pixelStoreUnpackPremultiplyAlpha.set(!1),K.demTexture=K.demTexture||h.getTileTexture(H),K.demTexture){let se=K.demTexture;se.update(V,{premultiply:!1}),se.bind(b.LINEAR,b.CLAMP_TO_EDGE)}else K.demTexture=new l.T(x,V,b.RGBA,{premultiply:!1}),K.demTexture.bind(b.LINEAR,b.CLAMP_TO_EDGE);let O=C.getMeshFromTileID(x,z.canonical,m,!0,"raster"),q=(Q=h.style.map.terrain)===null||Q===void 0?void 0:Q.getTerrainData(z),ce=I.getProjectionData({overscaledTileID:z,aligned:G,applyGlobeMatrix:!B,applyTerrainMatrix:!0});T.draw(x,b.TRIANGLES,u,a[z.overscaledZ],d,Ke.backCCW,Ua(r,K.dem,R),q,ce,r.id,O.vertexBuffer,O.indexBuffer,O.segments)}}let Uo=[new l.P(0,0),new l.P(l.$,0),new l.P(l.$,l.$),new l.P(0,l.$)];function Un(h,e,r,s,a,u,d,m,B=!1,Q=!1){let C=s[s.length-1].overscaledZ,x=h.context,I=x.gl,b=h.useProgram("raster"),T=h.transform,G=h.style.projection,P=h.colorModeForRenderPass(),R=!h.options.moving;for(let z of s){let K=h.getDepthModeForSublayer(z.overscaledZ-C,r.paint.get("raster-opacity")===1?Ze.ReadWrite:Ze.ReadOnly,I.LESS),Y=e.getTile(z);Y.registerFadeDuration(r.paint.get("raster-fade-duration"));let H=e.findLoadedParent(z,0),V=e.findLoadedSibling(z),O=Qs(Y,H||V||null,e,r,h.transform,h.style.map.terrain),q,ce,se=r.paint.get("raster-resampling")==="nearest"?I.NEAREST:I.LINEAR;x.activeTexture.set(I.TEXTURE0),Y.texture.bind(se,I.CLAMP_TO_EDGE,I.LINEAR_MIPMAP_NEAREST),x.activeTexture.set(I.TEXTURE1),H?(H.texture.bind(se,I.CLAMP_TO_EDGE,I.LINEAR_MIPMAP_NEAREST),q=Math.pow(2,H.tileID.overscaledZ-Y.tileID.overscaledZ),ce=[Y.tileID.canonical.x*q%1,Y.tileID.canonical.y*q%1]):Y.texture.bind(se,I.CLAMP_TO_EDGE,I.LINEAR_MIPMAP_NEAREST),Y.texture.useMipmap&&x.extTextureFilterAnisotropic&&h.transform.pitch>20&&I.texParameterf(I.TEXTURE_2D,x.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,x.extTextureFilterAnisotropicMax);let ae=h.style.map.terrain&&h.style.map.terrain.getTerrainData(z),he=T.getProjectionData({overscaledTileID:z,aligned:R,applyGlobeMatrix:!Q,applyTerrainMatrix:!0}),Ee=Cn(ce||[0,0],q||1,O,r,m),we=G.getMeshFromTileID(x,z.canonical,u,d,"raster");b.draw(x,I.TRIANGLES,K,a?a[z.overscaledZ]:at.disabled,P,B?Ke.frontCCW:Ke.backCCW,Ee,ae,he,r.id,we.vertexBuffer,we.indexBuffer,we.segments)}}function Qs(h,e,r,s,a,u){let d=s.paint.get("raster-fade-duration");if(!u&&d>0){let m=Se.now(),B=(m-h.timeAdded)/d,Q=e?(m-e.timeAdded)/d:-1,C=r.getSource(),x=ke(a,{tileSize:C.tileSize,roundZoom:C.roundZoom}),I=!e||Math.abs(e.tileID.overscaledZ-x)>Math.abs(h.tileID.overscaledZ-x),b=I&&h.refreshedUponExpiration?1:l.ah(I?B:1-Q,0,1);return h.refreshedUponExpiration&&B>=1&&(h.refreshedUponExpiration=!1),e?{opacity:1,mix:1-b}:{opacity:b,mix:0}}return{opacity:1,mix:0}}let To=new l.bf(1,0,0,1),qa=new l.bf(0,1,0,1),$a=new l.bf(0,0,1,1),Cs=new l.bf(1,0,1,1),Lo=new l.bf(0,1,1,1);function Wa(h,e,r,s){Ft(h,0,e+r/2,h.transform.width,r,s)}function ko(h,e,r,s){Ft(h,e-r/2,0,r,h.transform.height,s)}function Ft(h,e,r,s,a,u){let d=h.context,m=d.gl;m.enable(m.SCISSOR_TEST),m.scissor(e*h.pixelRatio,r*h.pixelRatio,s*h.pixelRatio,a*h.pixelRatio),d.clear({color:u}),m.disable(m.SCISSOR_TEST)}function wr(h,e,r){let s=h.context,a=s.gl,u=h.useProgram("debug"),d=Ze.disabled,m=at.disabled,B=h.colorModeForRenderPass(),Q="$debug",C=h.style.map.terrain&&h.style.map.terrain.getTerrainData(r);s.activeTexture.set(a.TEXTURE0);let x=e.getTileByID(r.key).latestRawTileData,I=Math.floor((x&&x.byteLength||0)/1024),b=e.getTile(r).tileSize,T=512/Math.min(b,512)*(r.overscaledZ/h.transform.zoom)*.5,G=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(G+=` => ${r.overscaledZ}`),(function(R,z){R.initDebugOverlayCanvas();let K=R.debugOverlayCanvas,Y=R.context.gl,H=R.debugOverlayCanvas.getContext("2d");H.clearRect(0,0,K.width,K.height),H.shadowColor="white",H.shadowBlur=2,H.lineWidth=1.5,H.strokeStyle="white",H.textBaseline="top",H.font="bold 36px Open Sans, sans-serif",H.fillText(z,5,5),H.strokeText(z,5,5),R.debugOverlayTexture.update(K),R.debugOverlayTexture.bind(Y.LINEAR,Y.CLAMP_TO_EDGE)})(h,`${G} ${I}kB`);let P=h.transform.getProjectionData({overscaledTileID:r,applyGlobeMatrix:!0,applyTerrainMatrix:!0});u.draw(s,a.TRIANGLES,d,m,Qt.alphaBlended,Ke.disabled,fr(l.bf.transparent,T),null,P,Q,h.debugBuffer,h.quadTriangleIndexBuffer,h.debugSegments),u.draw(s,a.LINE_STRIP,d,m,B,Ke.disabled,fr(l.bf.red),C,P,Q,h.debugBuffer,h.tileBorderIndexBuffer,h.debugSegments)}function ki(h,e,r,s){let{isRenderingGlobe:a}=s,u=h.context,d=u.gl,m=h.transform,B=h.colorModeForRenderPass(),Q=h.getDepthModeFor3D(),C=h.useProgram("terrain");u.bindFramebuffer.set(null),u.viewport.set([0,0,h.width,h.height]);for(let x of r){let I=e.getTerrainMesh(x.tileID),b=h.renderToTexture.getTexture(x),T=e.getTerrainData(x.tileID);u.activeTexture.set(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,b.texture);let G=e.getMeshFrameDelta(m.zoom),P=m.calculateFogMatrix(x.tileID.toUnwrapped()),R=as(G,P,h.style.sky,m.pitch,a),z=m.getProjectionData({overscaledTileID:x.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});C.draw(u,d.TRIANGLES,Q,at.disabled,B,Ke.backCCW,R,T,z,"terrain",I.vertexBuffer,I.indexBuffer,I.segments)}}function ws(h,e){if(!e.mesh){let r=new l.aL;r.emplaceBack(-1,-1),r.emplaceBack(1,-1),r.emplaceBack(1,1),r.emplaceBack(-1,1);let s=new l.aN;s.emplaceBack(0,1,2),s.emplaceBack(0,2,3),e.mesh=new cr(h.createVertexBuffer(r,KA.members),h.createIndexBuffer(s),l.aM.simpleSegment(0,0,r.length,s.length))}return e.mesh}class Is{constructor(e,r){this.context=new Ha(e),this.transform=r,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:l.ag(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=At.maxUnderzooming+At.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Xr}resize(e,r,s){if(this.width=Math.floor(e*s),this.height=Math.floor(r*s),this.pixelRatio=s,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let a of this.style._order)this.style._layers[a].resize()}setup(){let e=this.context,r=new l.aL;r.emplaceBack(0,0),r.emplaceBack(l.$,0),r.emplaceBack(0,l.$),r.emplaceBack(l.$,l.$),this.tileExtentBuffer=e.createVertexBuffer(r,KA.members),this.tileExtentSegments=l.aM.simpleSegment(0,0,4,2);let s=new l.aL;s.emplaceBack(0,0),s.emplaceBack(l.$,0),s.emplaceBack(0,l.$),s.emplaceBack(l.$,l.$),this.debugBuffer=e.createVertexBuffer(s,KA.members),this.debugSegments=l.aM.simpleSegment(0,0,4,5);let a=new l.c6;a.emplaceBack(0,0,0,0),a.emplaceBack(l.$,0,l.$,0),a.emplaceBack(0,l.$,0,l.$),a.emplaceBack(l.$,l.$,l.$,l.$),this.rasterBoundsBuffer=e.createVertexBuffer(a,Ac.members),this.rasterBoundsSegments=l.aM.simpleSegment(0,0,4,2);let u=new l.aL;u.emplaceBack(0,0),u.emplaceBack(l.$,0),u.emplaceBack(0,l.$),u.emplaceBack(l.$,l.$),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(u,KA.members),this.rasterBoundsSegmentsPosOnly=l.aM.simpleSegment(0,0,4,5);let d=new l.aL;d.emplaceBack(0,0),d.emplaceBack(1,0),d.emplaceBack(0,1),d.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(d,KA.members),this.viewportSegments=l.aM.simpleSegment(0,0,4,2);let m=new l.c7;m.emplaceBack(0),m.emplaceBack(1),m.emplaceBack(3),m.emplaceBack(2),m.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(m);let B=new l.aN;B.emplaceBack(1,0,2),B.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(B);let Q=this.context.gl;this.stencilClearMode=new at({func:Q.ALWAYS,mask:0},0,255,Q.ZERO,Q.ZERO,Q.ZERO),this.tileExtentMesh=new cr(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let s=l.L();l.bY(s,0,this.width,this.height,0,0,1),l.N(s,s,[r.drawingBufferWidth,r.drawingBufferHeight,0]);let a={mainMatrix:s,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:s};this.useProgram("clippingMask",null,!0).draw(e,r.TRIANGLES,Ze.disabled,this.stencilClearMode,Qt.disabled,Ke.disabled,null,null,a,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,r,s){if(this.currentStencilSource===e.source||!e.isTileClipped()||!r||!r.length)return;this.currentStencilSource=e.source,this.nextStencilID+r.length>256&&this.clearStencil();let a=this.context;a.setColorMode(Qt.disabled),a.setDepthMode(Ze.disabled);let u={};for(let d of r)u[d.key]=this.nextStencilID++;this._renderTileMasks(u,r,s,!0),this._renderTileMasks(u,r,s,!1),this._tileClippingMaskIDs=u}_renderTileMasks(e,r,s,a){let u=this.context,d=u.gl,m=this.style.projection,B=this.transform,Q=this.useProgram("clippingMask");for(let C of r){let x=e[C.key],I=this.style.map.terrain&&this.style.map.terrain.getTerrainData(C),b=m.getMeshFromTileID(this.context,C.canonical,a,!0,"stencil"),T=B.getProjectionData({overscaledTileID:C,applyGlobeMatrix:!s,applyTerrainMatrix:!0});Q.draw(u,d.TRIANGLES,Ze.disabled,new at({func:d.ALWAYS,mask:0},x,255,d.KEEP,d.KEEP,d.REPLACE),Qt.disabled,s?Ke.disabled:Ke.backCCW,null,I,T,"$clipping",b.vertexBuffer,b.indexBuffer,b.segments)}}_renderTilesDepthBuffer(){let e=this.context,r=e.gl,s=this.style.projection,a=this.transform,u=this.useProgram("depth"),d=this.getDepthModeFor3D(),m=Ae(a,{tileSize:a.tileSize});for(let B of m){let Q=this.style.map.terrain&&this.style.map.terrain.getTerrainData(B),C=s.getMeshFromTileID(this.context,B.canonical,!0,!0,"raster"),x=a.getProjectionData({overscaledTileID:B,applyGlobeMatrix:!0,applyTerrainMatrix:!0});u.draw(e,r.TRIANGLES,d,at.disabled,Qt.disabled,Ke.backCCW,null,Q,x,"$clipping",C.vertexBuffer,C.indexBuffer,C.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let e=this.nextStencilID++,r=this.context.gl;return new at({func:r.NOTEQUAL,mask:255},e,255,r.KEEP,r.KEEP,r.REPLACE)}stencilModeForClipping(e){let r=this.context.gl;return new at({func:r.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,r.KEEP,r.KEEP,r.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){let r=this.context.gl,s=e.sort(((d,m)=>m.overscaledZ-d.overscaledZ)),a=s[s.length-1].overscaledZ,u=s[0].overscaledZ-a+1;if(u>1){this.currentStencilSource=void 0,this.nextStencilID+u>256&&this.clearStencil();let d={};for(let m=0;mm.overscaledZ-d.overscaledZ)),a=s[s.length-1].overscaledZ,u=s[0].overscaledZ-a+1;if(this.clearStencil(),u>1){let d={},m={};for(let B=0;B0};for(let I in d){let b=d[I];b.used&&b.prepare(this.context),m[I]=b.getVisibleCoordinates(!1),B[I]=m[I].slice().reverse(),Q[I]=b.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let I=0;Ithis.useProgram(I)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?l.bf.black:l.bf.transparent,depth:1}),this.clearStencil(),this.style.sky&&(function(I,b){let T=I.context,G=T.gl,P=((V,O,q)=>{let ce=Math.cos(O.rollInRadians),se=Math.sin(O.rollInRadians),ae=Z(O),he=O.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:V.properties.get("sky-color"),u_horizon_color:V.properties.get("horizon-color"),u_horizon:[(O.width/2-ae*se)*q,(O.height/2+ae*ce)*q],u_horizon_normal:[-se,ce],u_sky_horizon_blend:V.properties.get("sky-horizon-blend")*O.height/2*q,u_sky_blend:he}})(b,I.style.map.transform,I.pixelRatio),R=new Ze(G.LEQUAL,Ze.ReadWrite,[0,1]),z=at.disabled,K=I.colorModeForRenderPass(),Y=I.useProgram("sky"),H=ws(T,b);Y.draw(T,G.TRIANGLES,R,z,K,Ke.disabled,P,null,void 0,"sky",H.vertexBuffer,H.indexBuffer,H.segments)})(this,this.style.sky),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=u.length-1;this.currentLayer>=0;this.currentLayer--){let I=this.style._layers[u[this.currentLayer]],b=d[I.source],T=m[I.source];this._renderTileClippingMasks(I,T,!1),this.renderLayer(this,b,I,T,C)}this.renderPass="translucent";let x=!1;for(this.currentLayer=0;this.currentLayer({u_sun_pos:he,u_atmosphere_blend:Ee,u_globe_position:we,u_globe_radius:_e,u_inv_proj_matrix:Te}))(Y,V,[ce[0],ce[1],ce[2]],O,q),ae=ws(G,b);R.draw(G,P.TRIANGLES,z,at.disabled,Qt.alphaBlended,Ke.disabled,se,null,null,"atmosphere",ae.vertexBuffer,ae.indexBuffer,ae.segments)})(this,this.style.sky,this.style.light),this.options.showTileBoundaries){let I=(function(b,T){let G=null,P=Object.values(b._layers).flatMap((Y=>Y.source&&!Y.isHidden(T)?[b.sourceCaches[Y.source]]:[])),R=P.filter((Y=>Y.getSource().type==="vector")),z=P.filter((Y=>Y.getSource().type!=="vector")),K=Y=>{(!G||G.getSource().maxzoomK(Y))),G||z.forEach((Y=>K(Y))),G})(this.style,this.transform.zoom);I&&(function(b,T,G){for(let P=0;Pce.getElevation(he,Dt,It):null;Do(we,se,ae,O,q,$e,wt,_e,ut,l.aD(q,Ee,H,V),he.toUnwrapped(),Bt)}}})(Q,d,B,m,B.layout.get("text-rotation-alignment"),B.layout.get("text-pitch-alignment"),B.paint.get("text-translate"),B.paint.get("text-translate-anchor"),C),B.paint.get("icon-opacity").constantOr(1)!==0&&vn(d,m,B,Q,!1,B.paint.get("icon-translate"),B.paint.get("icon-translate-anchor"),B.layout.get("icon-rotation-alignment"),B.layout.get("icon-pitch-alignment"),B.layout.get("icon-keep-upright"),b,T,I),B.paint.get("text-opacity").constantOr(1)!==0&&vn(d,m,B,Q,!0,B.paint.get("text-translate"),B.paint.get("text-translate-anchor"),B.layout.get("text-rotation-alignment"),B.layout.get("text-pitch-alignment"),B.layout.get("text-keep-upright"),b,T,I),m.map.showCollisionBoxes&&(Za(d,m,B,Q,!0),Za(d,m,B,Q,!1))})(e,r,s,a,this.style.placement.variableOffsets,u):l.cc(s)?(function(d,m,B,Q,C){if(d.renderPass!=="translucent")return;let{isRenderingToTexture:x}=C,I=B.paint.get("circle-opacity"),b=B.paint.get("circle-stroke-width"),T=B.paint.get("circle-stroke-opacity"),G=!B.layout.get("circle-sort-key").isConstant();if(I.constantOr(1)===0&&(b.constantOr(1)===0||T.constantOr(1)===0))return;let P=d.context,R=P.gl,z=d.transform,K=d.getDepthModeForSublayer(0,Ze.ReadOnly),Y=at.disabled,H=d.colorModeForRenderPass(),V=[],O=z.getCircleRadiusCorrection();for(let q=0;qq.sortKey-ce.sortKey));for(let q of V){let{programConfiguration:ce,program:se,layoutVertexBuffer:ae,indexBuffer:he,uniformValues:Ee,terrainData:we,projectionData:_e}=q.state;se.draw(P,R.TRIANGLES,K,Y,H,Ke.backCCW,Ee,we,_e,B.id,ae,he,q.segments,B.paint,d.transform.zoom,ce)}})(e,r,s,a,u):l.cd(s)?(function(d,m,B,Q,C){if(B.paint.get("heatmap-opacity")===0)return;let x=d.context,{isRenderingToTexture:I,isRenderingGlobe:b}=C;if(d.style.map.terrain){for(let T of Q){let G=m.getTile(T);m.hasRenderableParent(T)||(d.renderPass==="offscreen"?So(d,G,B,T,b):d.renderPass==="translucent"&&Va(d,B,T,I,b))}x.viewport.set([0,0,d.width,d.height])}else d.renderPass==="offscreen"?(function(T,G,P,R){let z=T.context,K=z.gl,Y=T.transform,H=at.disabled,V=new Qt([K.ONE,K.ONE],l.bf.transparent,[!0,!0,!0,!0]);(function(O,q,ce){let se=O.gl;O.activeTexture.set(se.TEXTURE1),O.viewport.set([0,0,q.width/4,q.height/4]);let ae=ce.heatmapFbos.get(l.c2);ae?(se.bindTexture(se.TEXTURE_2D,ae.colorAttachment.get()),O.bindFramebuffer.set(ae.framebuffer)):(ae=Fn(O,q.width/4,q.height/4),ce.heatmapFbos.set(l.c2,ae))})(z,T,P),z.clear({color:l.bf.transparent});for(let O=0;O0?r.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;let r=this.imageManager.getPattern(e.from.toString()),s=this.imageManager.getPattern(e.to.toString());return!r||!s}useProgram(e,r,s=!1,a=[]){this.cache=this.cache||{};let u=!!this.style.map.terrain,d=this.style.projection,m=s?qi.projectionMercator:d.shaderPreludeCode,B=s?yA:d.shaderDefine,Q=e+(r?r.cacheKey:"")+`/${s?hr:d.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(u?"/terrain":"")+(a?`/${a.join("/")}`:"");return this.cache[Q]||(this.cache[Q]=new fo(this.context,qi[e],r,Co[e],this._showOverdrawInspector,u,m,B,a)),this.cache[Q]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new l.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:e,drawingBufferHeight:r}=this.context.gl;return this.width!==e||this.height!==r}}function Go(h,e){let r,s=!1,a=null,u=null,d=()=>{a=null,s&&(h.apply(u,r),a=setTimeout(d,e),s=!1)};return(...m)=>(s=!0,u=this,r=m,a||d(),a)}class Ir{constructor(e){this._getCurrentHash=()=>{let r=window.location.hash.replace("#","");if(this._hashName){let s;return r.split("&").map((a=>a.split("="))).forEach((a=>{a[0]===this._hashName&&(s=a)})),(s&&s[1]||"").split("/")}return r.split("/")},this._onHashChange=()=>{let r=this._getCurrentHash();if(!this._isValidHash(r))return!1;let s=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(r[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+r[2],+r[1]],zoom:+r[0],bearing:s,pitch:+(r[4]||0)}),!0},this._updateHashUnthrottled=()=>{let r=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,r)},this._removeHash=()=>{let r=this._getCurrentHash();if(r.length===0)return;let s=r.join("/"),a=s;a.split("&").length>0&&(a=a.split("&")[0]),this._hashName&&(a=`${this._hashName}=${s}`);let u=window.location.hash.replace(a,"");u.startsWith("#&")?u=u.slice(0,1)+u.slice(2):u==="#"&&(u="");let d=window.location.href.replace(/(#.+)?$/,u);d=d.replace("&&","&"),window.history.replaceState(window.history.state,null,d)},this._updateHash=Go(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(e){let r=this._map.getCenter(),s=Math.round(100*this._map.getZoom())/100,a=Math.ceil((s*Math.LN2+Math.log(512/360/.5))/Math.LN10),u=Math.pow(10,a),d=Math.round(r.lng*u)/u,m=Math.round(r.lat*u)/u,B=this._map.getBearing(),Q=this._map.getPitch(),C="";if(C+=e?`/${d}/${m}/${s}`:`${s}/${m}/${d}`,(B||Q)&&(C+="/"+Math.round(10*B)/10),Q&&(C+=`/${Math.round(Q)}`),this._hashName){let x=this._hashName,I=!1,b=window.location.hash.slice(1).split("&").map((T=>{let G=T.split("=")[0];return G===x?(I=!0,`${G}=${C}`):T})).filter((T=>T));return I||b.push(`${x}=${C}`),`#${b.join("&")}`}return`#${C}`}_isValidHash(e){if(e.length<3||e.some(isNaN))return!1;try{new l.S(+e[2],+e[1])}catch(u){return!1}let r=+e[0],s=+(e[3]||0),a=+(e[4]||0);return r>=this._map.getMinZoom()&&r<=this._map.getMaxZoom()&&s>=-180&&s<=180&&a>=this._map.getMinPitch()&&a<=this._map.getMaxPitch()}}let Er={linearity:.3,easing:l.cm(0,0,.3,1)},Tn=l.e({deceleration:2500,maxSpeed:1400},Er),Po=l.e({deceleration:20,maxSpeed:1400},Er),el=l.e({deceleration:1e3,maxSpeed:360},Er),tl=l.e({deceleration:1e3,maxSpeed:90},Er),il=l.e({deceleration:1e3,maxSpeed:360},Er);class Al{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:Se.now(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,r=Se.now();for(;e.length>0&&r-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let r={zoom:0,bearing:0,pitch:0,roll:0,pan:new l.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:u}of this._inertiaBuffer)r.zoom+=u.zoomDelta||0,r.bearing+=u.bearingDelta||0,r.pitch+=u.pitchDelta||0,r.roll+=u.rollDelta||0,u.panDelta&&r.pan._add(u.panDelta),u.around&&(r.around=u.around),u.pinchAround&&(r.pinchAround=u.pinchAround);let s=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,a={};if(r.pan.mag()){let u=eA(r.pan.mag(),s,l.e({},Tn,e||{})),d=r.pan.mult(u.amount/r.pan.mag()),m=this._map.cameraHelper.handlePanInertia(d,this._map.transform);a.center=m.easingCenter,a.offset=m.easingOffset,$r(a,u)}if(r.zoom){let u=eA(r.zoom,s,Po);a.zoom=this._map.transform.zoom+u.amount,$r(a,u)}if(r.bearing){let u=eA(r.bearing,s,el);a.bearing=this._map.transform.bearing+l.ah(u.amount,-179,179),$r(a,u)}if(r.pitch){let u=eA(r.pitch,s,tl);a.pitch=this._map.transform.pitch+u.amount,$r(a,u)}if(r.roll){let u=eA(r.roll,s,il);a.roll=this._map.transform.roll+l.ah(u.amount,-179,179),$r(a,u)}if(a.zoom||a.bearing){let u=r.pinchAround===void 0?r.around:r.pinchAround;a.around=u?this._map.unproject(u):this._map.getCenter()}return this.clear(),l.e(a,{noMoveStart:!0})}}function $r(h,e){(!h.duration||h.durationr.unproject(B))),m=u.reduce(((B,Q,C,x)=>B.add(Q.div(x.length))),new l.P(0,0));super(e,{points:u,point:m,lngLats:d,lngLat:r.unproject(m),originalEvent:s}),this._defaultPrevented=!1}}class Ro extends l.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,r,s){super(e,{originalEvent:s}),this._defaultPrevented=!1}}class rl{constructor(e,r){this._map=e,this._clickTolerance=r.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new Ro(e.type,this._map,e))}mousedown(e,r){return this._mousedownPos=r,this._firePreventable(new Di(e.type,this._map,e))}mouseup(e){this._map.fire(new Di(e.type,this._map,e))}click(e,r){this._mousedownPos&&this._mousedownPos.dist(r)>=this._clickTolerance||this._map.fire(new Di(e.type,this._map,e))}dblclick(e){return this._firePreventable(new Di(e.type,this._map,e))}mouseover(e){this._map.fire(new Di(e.type,this._map,e))}mouseout(e){this._map.fire(new Di(e.type,this._map,e))}touchstart(e){return this._firePreventable(new Wr(e.type,this._map,e))}touchmove(e){this._map.fire(new Wr(e.type,this._map,e))}touchend(e){this._map.fire(new Wr(e.type,this._map,e))}touchcancel(e){this._map.fire(new Wr(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class nl{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new Di(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Di("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new Di(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class en{constructor(e){this._map=e}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.screenPointToLocation(l.P.convert(e),this._map.terrain)}}class No{constructor(e,r){this._map=e,this._tr=new en(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=r.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,r){this.isEnabled()&&e.shiftKey&&e.button===0&&(te.disableDrag(),this._startPos=this._lastPos=r,this._active=!0)}mousemoveWindow(e,r){if(!this._active)return;let s=r;if(this._lastPos.equals(s)||!this._box&&s.dist(this._startPos)u.fitScreenCoordinates(s,a,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&e.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(te.remove(this._box),this._box=null),te.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,r){return this._map.fire(new l.l(e,{originalEvent:r}))}}function Es(h,e){if(h.length!==e.length)throw new Error(`The number of touches and points are not equal - touches ${h.length}, points ${e.length}`);let r={};for(let s=0;sthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=e.timeStamp),s.length===this.numTouches&&(this.centroid=(function(a){let u=new l.P(0,0);for(let d of a)u._add(d);return u.div(a.length)})(r),this.touches=Es(s,r)))}touchmove(e,r,s){if(this.aborted||!this.centroid)return;let a=Es(s,r);for(let u in this.touches){let d=a[u];(!d||d.dist(this.touches[u])>30)&&(this.aborted=!0)}}touchend(e,r,s){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),s.length===0){let a=!this.aborted&&this.centroid;if(this.reset(),a)return a}}}class vs{constructor(e){this.singleTap=new xs(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,r,s){this.singleTap.touchstart(e,r,s)}touchmove(e,r,s){this.singleTap.touchmove(e,r,s)}touchend(e,r,s){let a=this.singleTap.touchend(e,r,s);if(a){let u=e.timeStamp-this.lastTime<500,d=!this.lastTap||this.lastTap.dist(a)<30;if(u&&d||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=a,this.count===this.numTaps)return this.reset(),a}}}class ji{constructor(e){this._tr=new en(e),this._zoomIn=new vs({numTouches:1,numTaps:2}),this._zoomOut=new vs({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,r,s){this._zoomIn.touchstart(e,r,s),this._zoomOut.touchstart(e,r,s)}touchmove(e,r,s){this._zoomIn.touchmove(e,r,s),this._zoomOut.touchmove(e,r,s)}touchend(e,r,s){let a=this._zoomIn.touchend(e,r,s),u=this._zoomOut.touchend(e,r,s),d=this._tr;return a?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:m=>m.easeTo({duration:300,zoom:d.zoom+1,around:d.unproject(a)},{originalEvent:e})}):u?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:m=>m.easeTo({duration:300,zoom:d.zoom-1,around:d.unproject(u)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ei{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){let r=this._moveFunction(...e);if(r.bearingDelta||r.pitchDelta||r.rollDelta||r.around||r.panDelta)return this._active=!0,r}dragStart(e,r){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(r)?r[0]:r,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,r){if(!this.isEnabled())return;let s=this._lastPoint;if(!s)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);let a=Array.isArray(r)?r[0]:r;return!this._moved&&a.dist(s)!0}),r=new _c){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=r}_executeRelevantHandler(e,r,s){return e instanceof MouseEvent?r(e):typeof TouchEvent!="undefined"&&e instanceof TouchEvent?s(e):void 0}startMove(e){this._executeRelevantHandler(e,(r=>this.mouseMoveStateManager.startMove(r)),(r=>this.oneFingerTouchMoveStateManager.startMove(r)))}endMove(e){this._executeRelevantHandler(e,(r=>this.mouseMoveStateManager.endMove(r)),(r=>this.oneFingerTouchMoveStateManager.endMove(r)))}isValidStartEvent(e){return this._executeRelevantHandler(e,(r=>this.mouseMoveStateManager.isValidStartEvent(r)),(r=>this.oneFingerTouchMoveStateManager.isValidStartEvent(r)))}isValidMoveEvent(e){return this._executeRelevantHandler(e,(r=>this.mouseMoveStateManager.isValidMoveEvent(r)),(r=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(r)))}isValidEndEvent(e){return this._executeRelevantHandler(e,(r=>this.mouseMoveStateManager.isValidEndEvent(r)),(r=>this.oneFingerTouchMoveStateManager.isValidEndEvent(r)))}}let bs=h=>{h.mousedown=h.dragStart,h.mousemoveWindow=h.dragMove,h.mouseup=h.dragEnd,h.contextmenu=e=>{e.preventDefault()}};class ol{constructor(e,r){this._clickTolerance=e.clickTolerance||1,this._map=r,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new l.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,r,s){return this._calculateTransform(e,r,s)}touchmove(e,r,s){if(this._active){if(!this._shouldBePrevented(s.length))return e.preventDefault(),this._calculateTransform(e,r,s);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,r,s){this._calculateTransform(e,r,s),this._active&&this._shouldBePrevented(s.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,r,s){s.length>0&&(this._active=!0);let a=Es(s,r),u=new l.P(0,0),d=new l.P(0,0),m=0;for(let Q in a){let C=a[Q],x=this._touches[Q];x&&(u._add(C),d._add(C.sub(x)),m++,a[Q]=C)}if(this._touches=a,this._shouldBePrevented(m)||!d.mag())return;let B=d.div(m);return this._sum._add(B),this._sum.mag()Math.abs(h.x)}class An extends xr{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,r,s){super.touchstart(e,r,s),this._currentTouchCount=s.length}_start(e){this._lastPoints=e,vr(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,r,s){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let a=e[0].sub(this._lastPoints[0]),u=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(a,u,s.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:(a.y+u.y)/2*-.5}):void 0}gestureBeginsVertically(e,r,s){if(this._valid!==void 0)return this._valid;let a=e.mag()>=2,u=r.mag()>=2;if(!a&&!u)return;if(!a||!u)return this._firstMove===void 0&&(this._firstMove=s),s-this._firstMove<100&&void 0;let d=e.y>0==r.y>0;return vr(e)&&vr(r)&&d}}let Oo={panStep:100,bearingStep:15,pitchStep:10};class nt{constructor(e){this._tr=new en(e);let r=Oo;this._panStep=r.panStep,this._bearingStep=r.bearingStep,this._pitchStep=r.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let r=0,s=0,a=0,u=0,d=0;switch(e.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:e.shiftKey?s=-1:(e.preventDefault(),u=-1);break;case 39:e.shiftKey?s=1:(e.preventDefault(),u=1);break;case 38:e.shiftKey?a=1:(e.preventDefault(),d=-1);break;case 40:e.shiftKey?a=-1:(e.preventDefault(),d=1);break;default:return}return this._rotationDisabled&&(s=0,a=0),{cameraAnimation:m=>{let B=this._tr;m.easeTo({duration:300,easeId:"keyboardHandler",easing:Ko,zoom:r?Math.round(B.zoom)+r*(e.shiftKey?2:1):B.zoom,bearing:B.bearing+s*this._bearingStep,pitch:B.pitch+a*this._pitchStep,offset:[-u*this._panStep,-d*this._panStep],center:B.center},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Ko(h){return h*(2-h)}let al=4.000244140625,jo=1/450;class ll{constructor(e,r){this._onTimeout=s=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(s)},this._map=e,this._tr=new en(e),this._triggerRenderFrame=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=jo}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&e.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let r=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,s=Se.now(),a=s-(this._lastWheelEventTime||0);this._lastWheelEventTime=s,r!==0&&r%al==0?this._type="wheel":r!==0&&Math.abs(r)<4?this._type="trackpad":a>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(a*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let r=te.mousePos(this._map.getCanvas(),e),s=this._tr;this._aroundPoint=this._aroundCenter?s.transform.locationToScreenPoint(l.S.convert(s.center)):r,this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let e=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let m=e.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=m),typeof this._targetZoom=="number"&&(this._targetZoom+=m)}if(this._delta!==0){let m=this._type==="wheel"&&Math.abs(this._delta)>al?this._wheelZoomRate:this._defaultZoomRate,B=2/(1+Math.exp(-Math.abs(this._delta*m)));this._delta<0&&B!==0&&(B=1/B);let Q=typeof this._targetZoom!="number"?e.scale:l.af(this._targetZoom);this._targetZoom=e.getConstrained(e.getCameraLngLat(),l.ak(Q*B)).zoom,this._type==="wheel"&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let r=typeof this._targetZoom!="number"?e.zoom:this._targetZoom,s=this._startZoom,a=this._easing,u,d=!1;if(this._type==="wheel"&&s&&a){let m=Se.now()-this._lastWheelEventTime,B=Math.min((m+5)/200,1),Q=a(B);u=l.C.number(s,r,Q),B<1?this._frameId||(this._frameId=!0):d=!0}else u=r,d=!0;return this._active=!0,d&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout}),200)),this._lastExpectedZoom=u,{noInertia:!0,needsRenderFrame:!d,zoomDelta:u-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let r=l.co;if(this._prevEase){let s=this._prevEase,a=(Se.now()-s.start)/s.duration,u=s.easing(a+.01)-s.easing(a),d=.27/Math.sqrt(u*u+1e-4)*.01,m=Math.sqrt(.0729-d*d);r=l.cm(d,m,.25,1)}return this._prevEase={start:Se.now(),duration:e,easing:r},r}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class cl{constructor(e,r){this._clickZoom=e,this._tapZoom=r}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class hl{constructor(e){this._tr=new en(e),this.reset()}reset(){this._active=!1}dblclick(e,r){return e.preventDefault(),{cameraAnimation:s=>{s.easeTo({duration:300,zoom:this._tr.zoom+(e.shiftKey?-1:1),around:this._tr.unproject(r)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Xo{constructor(){this._tap=new vs({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,r,s){if(!this._swipePoint)if(this._tapTime){let a=r[0],u=e.timeStamp-this._tapTime<500,d=this._tapPoint.dist(a)<30;u&&d?s.length>0&&(this._swipePoint=a,this._swipeTouch=s[0].identifier):this.reset()}else this._tap.touchstart(e,r,s)}touchmove(e,r,s){if(this._tapTime){if(this._swipePoint){if(s[0].identifier!==this._swipeTouch)return;let a=r[0],u=a.y-this._swipePoint.y;return this._swipePoint=a,e.preventDefault(),this._active=!0,{zoomDelta:u/128}}}else this._tap.touchmove(e,r,s)}touchend(e,r,s){if(this._tapTime)this._swipePoint&&s.length===0&&this.reset();else{let a=this._tap.touchend(e,r,s);a&&(this._tapTime=e.timeStamp,this._tapPoint=a)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ho{constructor(e,r,s){this._el=e,this._mousePan=r,this._touchPan=s}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class ul{constructor(e,r,s,a){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=r,this._mousePitch=s,this._mouseRoll=a}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class Zo{constructor(e,r,s,a){this._el=e,this._touchZoom=r,this._touchRotate=s,this._tapDragZoom=a,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class gl{constructor(e,r){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=e,this._options=r,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=te.create("div","maplibregl-cooperative-gesture-screen",e);let r=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(r=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let s=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),a=document.createElement("div");a.className="maplibregl-desktop-message",a.textContent=r,this._container.appendChild(a);let u=document.createElement("div");u.className="maplibregl-mobile-message",u.textContent=s,this._container.appendChild(u),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(te.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,r){this._enabled&&(this._map.fire(new l.l("cooperativegestureprevented",{gestureType:e,originalEvent:r})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}let Ds=h=>h.zoom||h.drag||h.roll||h.pitch||h.rotate;class HA extends l.l{}function gt(h){return h.panDelta&&h.panDelta.mag()||h.zoomDelta||h.bearingDelta||h.pitchDelta||h.rollDelta}class Qc{constructor(e,r){this.handleWindowEvent=a=>{this.handleEvent(a,`${a.type}Window`)},this.handleEvent=(a,u)=>{if(a.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let d=a.type==="renderFrame"?void 0:a,m={needsRenderFrame:!1},B={},Q={};for(let{handlerName:I,handler:b,allowed:T}of this._handlers){if(!b.isEnabled())continue;let G;if(this._blockedByActive(Q,T,I))b.reset();else if(b[u||a.type]){if(l.cp(a,u||a.type)){let P=te.mousePos(this._map.getCanvas(),a);G=b[u||a.type](a,P)}else if(l.cq(a,u||a.type)){let P=this._getMapTouches(a.touches),R=te.touchPos(this._map.getCanvas(),P);G=b[u||a.type](a,R,P)}else l.cr(u||a.type)||(G=b[u||a.type](a));this.mergeHandlerResult(m,B,G,I,d),G&&G.needsRenderFrame&&this._triggerRenderFrame()}(G||b.isActive())&&(Q[I]=b)}let C={};for(let I in this._previousActiveHandlers)Q[I]||(C[I]=d);this._previousActiveHandlers=Q,(Object.keys(C).length||gt(m))&&(this._changes.push([m,B,C]),this._triggerRenderFrame()),(Object.keys(Q).length||gt(m))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:x}=m;x&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],x(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Al(e),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r);let s=this._el;this._listeners=[[s,"touchstart",{passive:!0}],[s,"touchmove",{passive:!1}],[s,"touchend",void 0],[s,"touchcancel",void 0],[s,"mousedown",void 0],[s,"mousemove",void 0],[s,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[s,"mouseover",void 0],[s,"mouseout",void 0],[s,"dblclick",void 0],[s,"click",void 0],[s,"keydown",{capture:!1}],[s,"keyup",void 0],[s,"wheel",{passive:!1}],[s,"contextmenu",void 0],[window,"blur",void 0]];for(let[a,u,d]of this._listeners)te.addEventListener(a,u,a===document?this.handleWindowEvent:this.handleEvent,d)}destroy(){for(let[e,r,s]of this._listeners)te.removeEventListener(e,r,e===document?this.handleWindowEvent:this.handleEvent,s)}_addDefaultHandlers(e){let r=this._map,s=r.getCanvasContainer();this._add("mapEvent",new rl(r,e));let a=r.boxZoom=new No(r,e);this._add("boxZoom",a),e.interactive&&e.boxZoom&&a.enable();let u=r.cooperativeGestures=new gl(r,e.cooperativeGestures);this._add("cooperativeGestures",u),e.cooperativeGestures&&u.enable();let d=new ji(r),m=new hl(r);r.doubleClickZoom=new cl(m,d),this._add("tapZoom",d),this._add("clickZoom",m),e.interactive&&e.doubleClickZoom&&r.doubleClickZoom.enable();let B=new Xo;this._add("tapDragZoom",B);let Q=r.touchPitch=new An(r);this._add("touchPitch",Q),e.interactive&&e.touchPitch&&r.touchPitch.enable(e.touchPitch);let C=()=>r.project(r.getCenter()),x=(function({enable:Y,clickTolerance:H,aroundCenter:V=!0,minPixelCenterThreshold:O=100,rotateDegreesPerPixelMoved:q=.8},ce){let se=new Ln({checkCorrectEvent:ae=>te.mouseButton(ae)===0&&ae.ctrlKey||te.mouseButton(ae)===2&&!ae.ctrlKey});return new Ei({clickTolerance:H,move:(ae,he)=>{let Ee=ce();if(V&&Math.abs(Ee.y-ae.y)>O)return{bearingDelta:l.cn(new l.P(ae.x,he.y),he,Ee)};let we=(he.x-ae.x)*q;return V&&he.yte.mouseButton(q)===0&&q.ctrlKey||te.mouseButton(q)===2});return new Ei({clickTolerance:H,move:(q,ce)=>({pitchDelta:(ce.y-q.y)*V}),moveStateManager:O,enable:Y,assignEvents:bs})})(e),b=(function({enable:Y,clickTolerance:H,rollDegreesPerPixelMoved:V=.3},O){let q=new Ln({checkCorrectEvent:ce=>te.mouseButton(ce)===2&&ce.ctrlKey});return new Ei({clickTolerance:H,move:(ce,se)=>{let ae=O(),he=(se.x-ce.x)*V;return se.yte.mouseButton(O)===0&&!O.ctrlKey});return new Ei({clickTolerance:H,move:(O,q)=>({around:q,panDelta:q.sub(O)}),activateOnStart:!0,moveStateManager:V,enable:Y,assignEvents:bs})})(e),G=new ol(e,r);r.dragPan=new Ho(s,T,G),this._add("mousePan",T),this._add("touchPan",G,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&r.dragPan.enable(e.dragPan);let P=new Yo,R=new zo;r.touchZoomRotate=new Zo(s,R,P,B),this._add("touchRotate",P,["touchPan","touchZoom"]),this._add("touchZoom",R,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&r.touchZoomRotate.enable(e.touchZoomRotate);let z=r.scrollZoom=new ll(r,(()=>this._triggerRenderFrame()));this._add("scrollZoom",z,["mousePan"]),e.interactive&&e.scrollZoom&&r.scrollZoom.enable(e.scrollZoom);let K=r.keyboard=new nt(r);this._add("keyboard",K),e.interactive&&e.keyboard&&r.keyboard.enable(),this._add("blockableMapEvent",new nl(r))}_add(e,r,s){this._handlers.push({handlerName:e,handler:r,allowed:s}),this._handlersById[e]=r}stop(e){if(!this._updatingCamera){for(let{handler:r}of this._handlers)r.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(let{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Ds(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,r,s){for(let a in e)if(a!==s&&(!r||r.indexOf(a)<0))return!0;return!1}_getMapTouches(e){let r=[];for(let s of e)this._el.contains(s.target)&&r.push(s);return r}mergeHandlerResult(e,r,s,a,u){if(!s)return;l.e(e,s);let d={handlerName:a,originalEvent:s.originalEvent||u};s.zoomDelta!==void 0&&(r.zoom=d),s.panDelta!==void 0&&(r.drag=d),s.rollDelta!==void 0&&(r.roll=d),s.pitchDelta!==void 0&&(r.pitch=d),s.bearingDelta!==void 0&&(r.rotate=d)}_applyChanges(){let e={},r={},s={};for(let[a,u,d]of this._changes)a.panDelta&&(e.panDelta=(e.panDelta||new l.P(0,0))._add(a.panDelta)),a.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+a.zoomDelta),a.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+a.bearingDelta),a.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+a.pitchDelta),a.rollDelta&&(e.rollDelta=(e.rollDelta||0)+a.rollDelta),a.around!==void 0&&(e.around=a.around),a.pinchAround!==void 0&&(e.pinchAround=a.pinchAround),a.noInertia&&(e.noInertia=a.noInertia),l.e(r,u),l.e(s,d);this._updateMapTransform(e,r,s),this._changes=[]}_updateMapTransform(e,r,s){let a=this._map,u=a._getTransformForUpdate(),d=a.terrain;if(!(gt(e)||d&&this._terrainMovement))return this._fireEvents(r,s,!0);a._stop(!0);let{panDelta:m,zoomDelta:B,bearingDelta:Q,pitchDelta:C,rollDelta:x,around:I,pinchAround:b}=e;b!==void 0&&(I=b),I=I||a.transform.centerPoint,d&&!u.isPointOnMapSurface(I)&&(I=u.centerPoint);let T={panDelta:m,zoomDelta:B,rollDelta:x,pitchDelta:C,bearingDelta:Q,around:I};this._map.cameraHelper.useGlobeControls&&!u.isPointOnMapSurface(I)&&(I=u.centerPoint);let G=I.distSqr(u.centerPoint)<.01?u.center:u.screenPointToLocation(m?I.sub(m):I);this._handleMapControls({terrain:d,tr:u,deltasForHelper:T,preZoomAroundLoc:G,combinedEventsInProgress:r,panDelta:m}),a._applyUpdatedTransform(u),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(r,s,!0)}_handleMapControls({terrain:e,tr:r,deltasForHelper:s,preZoomAroundLoc:a,combinedEventsInProgress:u,panDelta:d}){let m=this._map.cameraHelper;if(m.handleMapControlsRollPitchBearingZoom(s,r),e)return m.useGlobeControls?(this._terrainMovement||!u.drag&&!u.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void m.handleMapControlsPan(s,r,a)):this._terrainMovement||!u.drag&&!u.zoom?void(u.drag&&this._terrainMovement&&d?r.setCenter(r.screenPointToLocation(r.centerPoint.sub(d))):m.handleMapControlsPan(s,r,a)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void m.handleMapControlsPan(s,r,a));m.handleMapControlsPan(s,r,a)}_fireEvents(e,r,s){let a=Ds(this._eventsInProgress),u=Ds(e),d={};for(let x in e){let{originalEvent:I}=e[x];this._eventsInProgress[x]||(d[`${x}start`]=I),this._eventsInProgress[x]=e[x]}!a&&u&&this._fireEvent("movestart",u.originalEvent);for(let x in d)this._fireEvent(x,d[x]);u&&this._fireEvent("move",u.originalEvent);for(let x in e){let{originalEvent:I}=e[x];this._fireEvent(x,I)}let m={},B;for(let x in this._eventsInProgress){let{handlerName:I,originalEvent:b}=this._eventsInProgress[x];this._handlersById[I].isActive()||(delete this._eventsInProgress[x],B=r[I]||b,m[`${x}end`]=B)}for(let x in m)this._fireEvent(x,m[x]);let Q=Ds(this._eventsInProgress),C=(a||u)&&!Q;if(C&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let x=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&x.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(x)}if(s&&C){this._updatingCamera=!0;let x=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),I=b=>b!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new HA("renderFrame",{timeStamp:e})),this._applyChanges()}))}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ss extends l.E{constructor(e,r,s){super(),this._renderFrameCallback=()=>{let a=Math.min((Se.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(a)),a<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=s.bearingSnap,this.cameraHelper=r,this.on("moveend",(()=>{delete this._requestedCameraState}))}migrateProjection(e,r){e.apply(this.transform),this.transform=e,this.cameraHelper=r}getCenter(){return new l.S(this.transform.center.lng,this.transform.center.lat)}setCenter(e,r){return this.jumpTo({center:e},r)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,r){return this.jumpTo({elevation:e},r),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,r,s){return e=l.P.convert(e).mult(-1),this.panTo(this.transform.center,l.e({offset:e},r),s)}panTo(e,r,s){return this.easeTo(l.e({center:e},r),s)}getZoom(){return this.transform.zoom}setZoom(e,r){return this.jumpTo({zoom:e},r),this}zoomTo(e,r,s){return this.easeTo(l.e({zoom:e},r),s)}zoomIn(e,r){return this.zoomTo(this.getZoom()+1,e,r),this}zoomOut(e,r){return this.zoomTo(this.getZoom()-1,e,r),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,r){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new l.l("movestart",r)).fire(new l.l("move",r)).fire(new l.l("moveend",r))),this}getBearing(){return this.transform.bearing}setBearing(e,r){return this.jumpTo({bearing:e},r),this}getPadding(){return this.transform.padding}setPadding(e,r){return this.jumpTo({padding:e},r),this}rotateTo(e,r,s){return this.easeTo(l.e({bearing:e},r),s)}resetNorth(e,r){return this.rotateTo(0,l.e({duration:1e3},e),r),this}resetNorthPitch(e,r){return this.easeTo(l.e({bearing:0,pitch:0,roll:0,duration:1e3},e),r),this}snapToNorth(e,r){return Math.abs(this.getBearing()){G.easeFunc(P),this.terrain&&!e.freezeElevation&&this._updateElevation(P),this._applyUpdatedTransform(s),this._fireMoveEvents(r)}),(P=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r,P)}),e),this}_prepareEase(e,r,s={}){this._moving=!0,r||s.moving||this.fire(new l.l("movestart",e)),this._zooming&&!s.zooming&&this.fire(new l.l("zoomstart",e)),this._rotating&&!s.rotating&&this.fire(new l.l("rotatestart",e)),this._pitching&&!s.pitching&&this.fire(new l.l("pitchstart",e)),this._rolling&&!s.rolling&&this.fire(new l.l("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let r=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&r!==this._elevationTarget){let s=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(s-(r-(s*e+this._elevationStart))/(1-e)),this._elevationTarget=r}this.transform.setElevation(l.C.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};let r=e.getCameraLngLat(),s=e.getCameraAltitude(),a=this.terrain?this.terrain.getElevationForLngLatZoom(r,e.zoom):0;if(sthis._elevateCameraIfInsideTerrain(a))),this.transformCameraUpdate&&r.push((a=>this.transformCameraUpdate(a))),!r.length)return;let s=e.clone();for(let a of r){let u=s.clone(),{center:d,zoom:m,roll:B,pitch:Q,bearing:C,elevation:x}=a(u);d&&u.setCenter(d),x!==void 0&&u.setElevation(x),m!==void 0&&u.setZoom(m),B!==void 0&&u.setRoll(B),Q!==void 0&&u.setPitch(Q),C!==void 0&&u.setBearing(C),s.apply(u)}this.transform.apply(s)}_fireMoveEvents(e){this.fire(new l.l("move",e)),this._zooming&&this.fire(new l.l("zoom",e)),this._rotating&&this.fire(new l.l("rotate",e)),this._pitching&&this.fire(new l.l("pitch",e)),this._rolling&&this.fire(new l.l("roll",e))}_afterEase(e,r){if(this._easeId&&r&&this._easeId===r)return;delete this._easeId;let s=this._zooming,a=this._rotating,u=this._pitching,d=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,s&&this.fire(new l.l("zoomend",e)),a&&this.fire(new l.l("rotateend",e)),u&&this.fire(new l.l("pitchend",e)),d&&this.fire(new l.l("rollend",e)),this.fire(new l.l("moveend",e))}flyTo(e,r){if(!e.essential&&Se.prefersReducedMotion){let he=l.Q(e,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(he,r)}this.stop(),e=l.e({offset:[0,0],speed:1.2,curve:1.42,easing:l.co},e);let s=this._getTransformForUpdate(),a=s.bearing,u=s.pitch,d=s.roll,m=s.padding,B="bearing"in e?this._normalizeBearing(e.bearing,a):a,Q="pitch"in e?+e.pitch:u,C="roll"in e?this._normalizeBearing(e.roll,d):d,x="padding"in e?e.padding:s.padding,I=l.P.convert(e.offset),b=s.centerPoint.add(I),T=s.screenPointToLocation(b),G=this.cameraHelper.handleFlyTo(s,{bearing:B,pitch:Q,roll:C,padding:x,locationAtOffset:T,offsetAsPoint:I,center:e.center,minZoom:e.minZoom,zoom:e.zoom}),P=e.curve,R=Math.max(s.width,s.height),z=R/G.scaleOfZoom,K=G.pixelPathLength;typeof G.scaleOfMinZoom=="number"&&(P=Math.sqrt(R/G.scaleOfMinZoom/K*2));let Y=P*P;function H(he){let Ee=(z*z-R*R+(he?-1:1)*Y*Y*K*K)/(2*(he?z:R)*Y*K);return Math.log(Math.sqrt(Ee*Ee+1)-Ee)}function V(he){return(Math.exp(he)-Math.exp(-he))/2}function O(he){return(Math.exp(he)+Math.exp(-he))/2}let q=H(!1),ce=function(he){return O(q)/O(q+P*he)},se=function(he){return R*((O(q)*(V(Ee=q+P*he)/O(Ee))-V(q))/Y)/K;var Ee},ae=(H(!0)-q)/P;if(Math.abs(K)<2e-6||!isFinite(ae)){if(Math.abs(R-z)<1e-6)return this.easeTo(e,r);let he=z0,ce=Ee=>Math.exp(he*P*Ee)}return e.duration="duration"in e?+e.duration:1e3*ae/("screenSpeed"in e?+e.screenSpeed/P:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=a!==B,this._pitching=Q!==u,this._rolling=C!==d,this._padding=!s.isPaddingEqual(x),this._prepareEase(r,!1),this.terrain&&this._prepareElevation(G.targetCenter),this._ease((he=>{let Ee=he*ae,we=1/ce(Ee),_e=se(Ee);this._rotating&&s.setBearing(l.C.number(a,B,he)),this._pitching&&s.setPitch(l.C.number(u,Q,he)),this._rolling&&s.setRoll(l.C.number(d,C,he)),this._padding&&(s.interpolatePadding(m,x,he),b=s.centerPoint.add(I)),G.easeFunc(he,we,_e,b),this.terrain&&!e.freezeElevation&&this._updateElevation(he),this._applyUpdatedTransform(s),this._fireMoveEvents(r)}),(()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r)}),e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,r){var s;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let a=this._onEaseEnd;delete this._onEaseEnd,a.call(this,r)}return e||(s=this.handlers)===null||s===void 0||s.stop(!1),this}_ease(e,r,s){s.animate===!1||s.duration===0?(e(1),r()):(this._easeStart=Se.now(),this._easeOptions=s,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,r){e=l.aO(e,-180,180);let s=Math.abs(e-r);return Math.abs(e-360-r)MapLibre'};class Jo{constructor(e=Ms){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=r=>{!r||r.sourceDataType!=="metadata"&&r.sourceDataType!=="visibility"&&r.dataType!=="style"&&r.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=te.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=te.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=te.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){te.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(e,r){let s=this._map._getUIString(`AttributionControl.${r}`);e.title=s,e.setAttribute("aria-label",s)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map((a=>typeof a!="string"?"":a))):typeof this.options.customAttribution=="string"&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let a=this._map.style.stylesheet;this.styleOwner=a.owner,this.styleId=a.id}let r=this._map.style.sourceCaches;for(let a in r){let u=r[a];if(u.used||u.usedForTerrain){let d=u.getSource();d.attribution&&e.indexOf(d.attribution)<0&&e.push(d.attribution)}}e=e.filter((a=>String(a).trim())),e.sort(((a,u)=>a.length-u.length)),e=e.filter(((a,u)=>{for(let d=u+1;d=0)return!1;return!0}));let s=e.join(" | ");s!==this._attribHTML&&(this._attribHTML=s,e.length?(this._innerContainer.innerHTML=te.sanitize(s),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Vo{constructor(e={}){this._updateCompact=()=>{let r=this._container.children;if(r.length){let s=r[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&s.classList.add("maplibregl-compact"):s.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=te.create("div","maplibregl-ctrl");let r=te.create("a","maplibregl-ctrl-logo");return r.target="_blank",r.rel="noopener nofollow",r.href="https://maplibre.org/",r.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),r.setAttribute("rel","noopener nofollow"),this._container.appendChild(r),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){te.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class dl{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){let r=++this._id;return this._queue.push({callback:e,id:r,cancelled:!1}),r}remove(e){let r=this._currentlyRunning,s=r?this._queue.concat(r):this._queue;for(let a of s)if(a.id===e)return void(a.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let r=this._currentlyRunning=this._queue;this._queue=[];for(let s of r)if(!s.cancelled&&(s.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Cc=l.aJ([{name:"a_pos3d",type:"Int16",components:3}]);class mA extends l.E{constructor(e){super(),this._lastTilesetChange=Se.now(),this.sourceCache=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(e,r){this.sourceCache.update(e,r),this._renderableTilesKeys=[];let s={};for(let a of Ae(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:r,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))s[a.key]=!0,this._renderableTilesKeys.push(a.key),this._tiles[a.key]||(a.terrainRttPosMatrix32f=new Float64Array(16),l.bY(a.terrainRttPosMatrix32f,0,l.$,l.$,0,0,1),this._tiles[a.key]=new zr(a,this.tileSize),this._lastTilesetChange=Se.now());for(let a in this._tiles)s[a]||delete this._tiles[a]}freeRtt(e){for(let r in this._tiles){let s=this._tiles[r];(!e||s.tileID.equals(e)||s.tileID.isChildOf(e)||e.isChildOf(s.tileID))&&(s.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((e=>this.getTileByID(e)))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,r){return r?this._getTerrainCoordsForTileRanges(e,r):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){let r={};for(let s of this._renderableTilesKeys){let a=this._tiles[s].tileID,u=e.clone(),d=l.ba();if(a.canonical.equals(e.canonical))l.bY(d,0,l.$,l.$,0,0,1);else if(a.canonical.isChildOf(e.canonical)){let m=a.canonical.z-e.canonical.z,B=a.canonical.x-(a.canonical.x>>m<>m<>m;l.bY(d,0,C,C,0,0,1),l.M(d,d,[-B*C,-Q*C,0])}else{if(!e.canonical.isChildOf(a.canonical))continue;{let m=e.canonical.z-a.canonical.z,B=e.canonical.x-(e.canonical.x>>m<>m<>m;l.bY(d,0,l.$,l.$,0,0,1),l.M(d,d,[B*C,Q*C,0]),l.N(d,d,[1/2**m,1/2**m,0])}}u.terrainRttPosMatrix32f=new Float32Array(d),r[s]=u}return r}_getTerrainCoordsForTileRanges(e,r){let s={};for(let a of this._renderableTilesKeys){let u=this._tiles[a].tileID;if(!this._isWithinTileRanges(u,r))continue;let d=e.clone(),m=l.ba();if(u.canonical.z===e.canonical.z){let B=e.canonical.x-u.canonical.x,Q=e.canonical.y-u.canonical.y;l.bY(m,0,l.$,l.$,0,0,1),l.M(m,m,[B*l.$,Q*l.$,0])}else if(u.canonical.z>e.canonical.z){let B=u.canonical.z-e.canonical.z,Q=u.canonical.x-(u.canonical.x>>B<>B<>B),I=e.canonical.y-(u.canonical.y>>B),b=l.$>>B;l.bY(m,0,b,b,0,0,1),l.M(m,m,[-Q*b+x*l.$,-C*b+I*l.$,0])}else{let B=e.canonical.z-u.canonical.z,Q=e.canonical.x-(e.canonical.x>>B<>B<>B)-u.canonical.x,I=(e.canonical.y>>B)-u.canonical.y,b=l.$<s.maxzoom&&(a=s.maxzoom),a=s.minzoom&&(!u||!u.dem);)u=this.sourceCache.getTileByID(e.scaledTo(a--).key);return u}anyTilesAfterTime(e=Date.now()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,r){return r[e.canonical.z]&&e.canonical.x>=r[e.canonical.z].minTileX&&e.canonical.x<=r[e.canonical.z].maxTileX&&e.canonical.y>=r[e.canonical.z].minTileY&&e.canonical.y<=r[e.canonical.z].maxTileY}}class Us{constructor(e,r,s){this._meshCache={},this.painter=e,this.sourceCache=new mA(r),this.options=s,this.exaggeration=typeof s.exaggeration=="number"?s.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(e,r,s,a=l.$){var u;if(!(r>=0&&r=0&&se.canonical.z&&(e.canonical.z>=a?u=e.canonical.z-a:l.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let d=e.canonical.x-(e.canonical.x>>u<>u<>8<<4|u>>8,r[d+3]=0;let s=new l.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(r.buffer)),a=new l.T(e,s,e.gl.RGBA,{premultiply:!1});return a.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=a,a}pointCoordinate(e){this.painter.maybeDrawDepthAndCoords(!0);let r=new Uint8Array(4),s=this.painter.context,a=s.gl,u=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),d=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),m=Math.round(this.painter.height/devicePixelRatio);s.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),a.readPixels(u,m-d-1,1,1,a.RGBA,a.UNSIGNED_BYTE,r),s.bindFramebuffer.set(null);let B=r[0]+(r[2]>>4<<8),Q=r[1]+((15&r[2])<<8),C=this.coordsIndex[255-r[3]],x=C&&this.sourceCache.getTileByID(C);if(!x)return null;let I=this._coordsTextureSize,b=(1<0,a=s&&e.canonical.y===0,u=s&&e.canonical.y===(1<e.id!==r)),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(let r of this._recentlyUsed)if(!this._objects[r].inUse)return this._objects[r];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(let e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length!e.inUse))===!1}}let ze={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class kn{constructor(e,r){this.painter=e,this.terrain=r,this.pool=new Pe(e.context,30,r.sourceCache.tileSize*r.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,r){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=e._order.filter((s=>!e._layers[s].isHidden(r))),this._coordsAscending={};for(let s in e.sourceCaches){this._coordsAscending[s]={};let a=e.sourceCaches[s].getVisibleCoordinates(),u=e.sourceCaches[s].getSource(),d=u instanceof uA?u.terrainTileRanges:null;for(let m of a){let B=this.terrain.sourceCache.getTerrainCoords(m,d);for(let Q in B)this._coordsAscending[s][Q]||(this._coordsAscending[s][Q]=[]),this._coordsAscending[s][Q].push(B[Q])}}this._coordsAscendingStr={};for(let s of e._order){let a=e._layers[s],u=a.source;if(ze[a.type]&&!this._coordsAscendingStr[u]){this._coordsAscendingStr[u]={};for(let d in this._coordsAscending[u])this._coordsAscendingStr[u][d]=this._coordsAscending[u][d].map((m=>m.key)).sort().join()}}for(let s of this._renderableTiles)for(let a in this._coordsAscendingStr){let u=this._coordsAscendingStr[a][s.tileID.key];u&&u!==s.rttCoords[a]&&(s.rtt=[])}}renderLayer(e,r){if(e.isHidden(this.painter.transform.zoom))return!1;let s=Object.assign(Object.assign({},r),{isRenderingToTexture:!0}),a=e.type,u=this.painter,d=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(ze[a]&&(this._prevType&&ze[this._prevType]||this._stacks.push([]),this._prevType=a,this._stacks[this._stacks.length-1].push(e.id),!d))return!0;if(ze[this._prevType]||ze[a]&&d){this._prevType=a;let m=this._stacks.length-1,B=this._stacks[m]||[];for(let Q of this._renderableTiles){if(this.pool.isFull()&&(ki(this.painter,this.terrain,this._rttTiles,s),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Q),Q.rtt[m]){let x=this.pool.getObjectForId(Q.rtt[m].id);if(x.stamp===Q.rtt[m].stamp){this.pool.useObject(x);continue}}let C=this.pool.getOrCreateFreeObject();this.pool.useObject(C),this.pool.stampObject(C),Q.rtt[m]={id:C.id,stamp:C.stamp},u.context.bindFramebuffer.set(C.fbo.framebuffer),u.context.clear({color:l.bf.transparent,stencil:0}),u.currentStencilSource=void 0;for(let x=0;x{this.startMove(u,te.mousePos(this.element,u)),te.addEventListener(window,"mousemove",this.mousemove),te.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=u=>{this.move(u,te.mousePos(this.element,u))},this.mouseup=u=>{this._rotatePitchHandler.dragEnd(u),this.offTemp()},this.touchstart=u=>{u.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=te.touchPos(this.element,u.targetTouches)[0],this.startMove(u,this._startPos),te.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),te.addEventListener(window,"touchend",this.touchend))},this.touchmove=u=>{u.targetTouches.length!==1?this.reset():(this._lastPos=te.touchPos(this.element,u.targetTouches)[0],this.move(u,this._lastPos))},this.touchend=u=>{u.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=r;let a=new yc;this._rotatePitchHandler=new Ei({clickTolerance:3,move:(u,d)=>{let m=r.getBoundingClientRect(),B=new l.P((m.bottom-m.top)/2,(m.right-m.left)/2);return{bearingDelta:l.cn(new l.P(u.x,d.y),d,B),pitchDelta:s?-.5*(d.y-u.y):void 0}},moveStateManager:a,enable:!0,assignEvents:()=>{}}),this.map=e,te.addEventListener(r,"mousedown",this.mousedown),te.addEventListener(r,"touchstart",this.touchstart,{passive:!1}),te.addEventListener(r,"touchcancel",this.reset)}startMove(e,r){this._rotatePitchHandler.dragStart(e,r),te.disableDrag()}move(e,r){let s=this.map,{bearingDelta:a,pitchDelta:u}=this._rotatePitchHandler.dragMove(e,r)||{};a&&s.setBearing(s.getBearing()+a),u&&s.setPitch(s.getPitch()+u)}off(){let e=this.element;te.removeEventListener(e,"mousedown",this.mousedown),te.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),te.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),te.removeEventListener(window,"touchend",this.touchend),te.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){te.enableDrag(),te.removeEventListener(window,"mousemove",this.mousemove),te.removeEventListener(window,"mouseup",this.mouseup),te.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),te.removeEventListener(window,"touchend",this.touchend)}}let br;function rn(h,e,r,s=!1){if(s||!r.getCoveringTilesDetailsProvider().allowWorldCopies())return h==null?void 0:h.wrap();let a=new l.S(h.lng,h.lat);if(h=new l.S(h.lng,h.lat),e){let u=new l.S(h.lng-360,h.lat),d=new l.S(h.lng+360,h.lat),m=r.locationToScreenPoint(h).distSqr(e);r.locationToScreenPoint(u).distSqr(e)180;){let u=r.locationToScreenPoint(h);if(u.x>=0&&u.y>=0&&u.x<=r.width&&u.y<=r.height)break;h.lng>r.center.lng?h.lng-=360:h.lng+=360}return h.lng!==a.lng&&r.isPointOnMapSurface(r.locationToScreenPoint(h))?h:a}let Ct={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Tt(h,e,r){let s=h.classList;for(let a in Ct)s.remove(`maplibregl-${r}-anchor-${a}`);s.add(`maplibregl-${r}-anchor-${e}`)}class Ls extends l.E{constructor(e){if(super(),this._onKeyPress=r=>{let s=r.code,a=r.charCode||r.keyCode;s!=="Space"&&s!=="Enter"&&a!==32&&a!==13||this.togglePopup()},this._onMapClick=r=>{let s=r.originalEvent.target,a=this._element;this._popup&&(s===a||a.contains(s))&&this.togglePopup()},this._update=r=>{if(!this._map)return;let s=this._map.loaded()&&!this._map.isMoving();((r==null?void 0:r.type)==="terrain"||(r==null?void 0:r.type)==="render"&&!s)&&this._map.once("render",this._update),this._lngLat=rn(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let a="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?a=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(a=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let u="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?u="rotateX(0deg)":this._pitchAlignment==="map"&&(u=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||r&&r.type!=="moveend"||(this._pos=this._pos.round()),te.setTransform(this._element,`${Ct[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${u} ${a}`),Se.frameAsync(new AbortController).then((()=>{this._updateOpacity(r&&r.type==="moveend")})).catch((()=>{}))},this._onMove=r=>{if(!this._isDragging){let s=this._clickTolerance||this._map._clickTolerance;this._isDragging=r.point.dist(this._pointerdownPos)>=s}this._isDragging&&(this._pos=r.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new l.l("dragstart"))),this.fire(new l.l("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new l.l("dragend")),this._state="inactive"},this._addDragHandler=r=>{this._element.contains(r.originalEvent.target)&&(r.preventDefault(),this._positionDelta=r.point.sub(this._pos).add(this._offset),this._pointerdownPos=r.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._subpixelPositioning=e&&e.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&e.pitchAlignment!=="auto"?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e==null?void 0:e.opacity,e==null?void 0:e.opacityWhenCovered),e&&e.element)this._element=e.element,this._offset=l.P.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=te.create("div");let r=te.createNS("http://www.w3.org/2000/svg","svg"),s=41,a=27;r.setAttributeNS(null,"display","block"),r.setAttributeNS(null,"height",`${s}px`),r.setAttributeNS(null,"width",`${a}px`),r.setAttributeNS(null,"viewBox",`0 0 ${a} ${s}`);let u=te.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"stroke","none"),u.setAttributeNS(null,"stroke-width","1"),u.setAttributeNS(null,"fill","none"),u.setAttributeNS(null,"fill-rule","evenodd");let d=te.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"fill-rule","nonzero");let m=te.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"transform","translate(3.0, 29.0)"),m.setAttributeNS(null,"fill","#000000");let B=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let R of B){let z=te.createNS("http://www.w3.org/2000/svg","ellipse");z.setAttributeNS(null,"opacity","0.04"),z.setAttributeNS(null,"cx","10.5"),z.setAttributeNS(null,"cy","5.80029008"),z.setAttributeNS(null,"rx",R.rx),z.setAttributeNS(null,"ry",R.ry),m.appendChild(z)}let Q=te.createNS("http://www.w3.org/2000/svg","g");Q.setAttributeNS(null,"fill",this._color);let C=te.createNS("http://www.w3.org/2000/svg","path");C.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Q.appendChild(C);let x=te.createNS("http://www.w3.org/2000/svg","g");x.setAttributeNS(null,"opacity","0.25"),x.setAttributeNS(null,"fill","#000000");let I=te.createNS("http://www.w3.org/2000/svg","path");I.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),x.appendChild(I);let b=te.createNS("http://www.w3.org/2000/svg","g");b.setAttributeNS(null,"transform","translate(6.0, 7.0)"),b.setAttributeNS(null,"fill","#FFFFFF");let T=te.createNS("http://www.w3.org/2000/svg","g");T.setAttributeNS(null,"transform","translate(8.0, 8.0)");let G=te.createNS("http://www.w3.org/2000/svg","circle");G.setAttributeNS(null,"fill","#000000"),G.setAttributeNS(null,"opacity","0.25"),G.setAttributeNS(null,"cx","5.5"),G.setAttributeNS(null,"cy","5.5"),G.setAttributeNS(null,"r","5.4999962");let P=te.createNS("http://www.w3.org/2000/svg","circle");P.setAttributeNS(null,"fill","#FFFFFF"),P.setAttributeNS(null,"cx","5.5"),P.setAttributeNS(null,"cy","5.5"),P.setAttributeNS(null,"r","5.4999962"),T.appendChild(G),T.appendChild(P),d.appendChild(m),d.appendChild(Q),d.appendChild(x),d.appendChild(b),d.appendChild(T),r.appendChild(d),r.setAttributeNS(null,"height",s*this._scale+"px"),r.setAttributeNS(null,"width",a*this._scale+"px"),this._element.appendChild(r),this._offset=l.P.convert(e&&e.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(r=>{r.preventDefault()})),this._element.addEventListener("mousedown",(r=>{r.preventDefault()})),Tt(this._element,this._anchor,"marker"),e&&e.className)for(let r of e.className.split(" "))this._element.classList.add(r);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),te.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=l.S.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){let a=Math.abs(13.5)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[a,-1*(38.1-13.5+a)],"bottom-right":[-a,-1*(38.1-13.5+a)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){let e=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:e?(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map)),this):this}_updateOpacity(e=!1){var r,s;let a=(r=this._map)===null||r===void 0?void 0:r.terrain,u=this._map.transform.isLocationOccluded(this._lngLat);if(!a||u){let b=u?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==b&&(this._element.style.opacity=b))}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}let d=this._map,m=d.terrain.depthAtPoint(this._pos),B=d.terrain.getElevationForLngLatZoom(this._lngLat,d.transform.tileZoom);if(d.transform.lngLatToCameraDepth(this._lngLat,B)-m<.006)return void(this._element.style.opacity=this._opacity);let Q=-this._offset.y/d.transform.pixelsPerMeter,C=Math.sin(d.getPitch()*Math.PI/180)*Q,x=d.terrain.depthAtPoint(new l.P(this._pos.x,this._pos.y-this._offset.y)),I=d.transform.lngLatToCameraDepth(this._lngLat,B+C)-x>.006;!((s=this._popup)===null||s===void 0)&&s.isOpen()&&I&&this._popup.remove(),this._element.style.opacity=I?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(e){return this._offset=l.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&e!=="auto"?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,r){return(this._opacity===void 0||e===void 0&&r===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),e!==void 0&&(this._opacity=e),r!==void 0&&(this._opacityWhenCovered=r),this._map&&this._updateOpacity(!0),this}}let Gn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Fr=0,Dr=!1,qo={maxWidth:100,unit:"metric"};function ks(h,e,r){let s=r&&r.maxWidth||100,a=h._container.clientHeight/2,u=h._container.clientWidth/2,d=h.unproject([u-s/2,a]),m=h.unproject([u+s/2,a]),B=Math.round(h.project(m).x-h.project(d).x),Q=Math.min(s,B,h._container.clientWidth),C=d.distanceTo(m);if(r&&r.unit==="imperial"){let x=3.2808*C;x>5280?wA(e,Q,x/5280,h._getUIString("ScaleControl.Miles")):wA(e,Q,x,h._getUIString("ScaleControl.Feet"))}else r&&r.unit==="nautical"?wA(e,Q,C/1852,h._getUIString("ScaleControl.NauticalMiles")):C>=1e3?wA(e,Q,C/1e3,h._getUIString("ScaleControl.Kilometers")):wA(e,Q,C,h._getUIString("ScaleControl.Meters"))}function wA(h,e,r,s){let a=(function(u){let d=Math.pow(10,`${Math.floor(u)}`.length-1),m=u/d;return m=m>=10?10:m>=5?5:m>=3?3:m>=2?2:m>=1?1:(function(B){let Q=Math.pow(10,Math.ceil(-Math.log(B)/Math.LN10));return Math.round(B*Q)/Q})(m),d*m})(r);h.style.width=e*(a/r)+"px",h.innerHTML=`${a} ${s}`}let $o={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0},Wo=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Gs(h){if(h){if(typeof h=="number"){let e=Math.round(Math.abs(h)/Math.SQRT2);return{center:new l.P(0,0),top:new l.P(0,h),"top-left":new l.P(e,e),"top-right":new l.P(-e,e),bottom:new l.P(0,-h),"bottom-left":new l.P(e,-e),"bottom-right":new l.P(-e,-e),left:new l.P(h,0),right:new l.P(-h,0)}}if(h instanceof l.P||Array.isArray(h)){let e=l.P.convert(h);return{center:e,top:e,"top-left":e,"top-right":e,bottom:e,"bottom-left":e,"bottom-right":e,left:e,right:e}}return{center:l.P.convert(h.center||[0,0]),top:l.P.convert(h.top||[0,0]),"top-left":l.P.convert(h["top-left"]||[0,0]),"top-right":l.P.convert(h["top-right"]||[0,0]),bottom:l.P.convert(h.bottom||[0,0]),"bottom-left":l.P.convert(h["bottom-left"]||[0,0]),"bottom-right":l.P.convert(h["bottom-right"]||[0,0]),left:l.P.convert(h.left||[0,0]),right:l.P.convert(h.right||[0,0])}}return Gs(new l.P(0,0))}let ea=ue;E.AJAXError=l.cz,E.Event=l.l,E.Evented=l.E,E.LngLat=l.S,E.MercatorCoordinate=l.a1,E.Point=l.P,E.addProtocol=l.cA,E.config=l.a,E.removeProtocol=l.cB,E.AttributionControl=Jo,E.BoxZoomHandler=No,E.CanvasSource=TA,E.CooperativeGesturesHandler=gl,E.DoubleClickZoomHandler=cl,E.DragPanHandler=Ho,E.DragRotateHandler=ul,E.EdgeInsets=ur,E.FullscreenControl=class extends l.E{constructor(h={}){super(),this._onFullscreenChange=()=>{var e;let r=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((e=r==null?void 0:r.shadowRoot)===null||e===void 0)&&e.fullscreenElement;)r=r.shadowRoot.fullscreenElement;r===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,h&&h.container&&(h.container instanceof HTMLElement?this._container=h.container:l.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(h){return this._map=h,this._container||(this._container=this._map.getContainer()),this._controlContainer=te.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){te.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let h=this._fullscreenButton=te.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);te.create("span","maplibregl-ctrl-icon",h).setAttribute("aria-hidden","true"),h.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let h=this._getTitle();this._fullscreenButton.setAttribute("aria-label",h),this._fullscreenButton.title=h}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new l.l("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new l.l("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},E.GeoJSONSource=hA,E.GeolocateControl=class extends l.E{constructor(h){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new l.l("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(e),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new l.l("geolocate",e)),this._finish()}},this._updateCamera=e=>{let r=new l.S(e.coords.longitude,e.coords.latitude),s=e.coords.accuracy,a=this._map.getBearing(),u=l.e({bearing:a},this.options.fitBoundsOptions),d=Gt.fromLngLat(r,s);this._map.fitBounds(d,u,{geolocateSource:!0})},this._updateMarker=e=>{if(e){let r=new l.S(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=e=>{if(this._map){if(e.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(e.code===3&&Dr)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new l.l("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this._geolocateButton=te.create("button","maplibregl-ctrl-geolocate",this._container),te.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(e===!1){l.w("Geolocation support is not available so the GeolocateControl will be disabled.");let r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r)}else{let r=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=te.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Ls({element:this._dotElement}),this._circleElement=te.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ls({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(r=>{let s=(r==null?void 0:r[0])instanceof ResizeObserverEntry;r.geolocateSource||this._watchState!=="ACTIVE_LOCK"||s||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new l.l("trackuserlocationend")),this.fire(new l.l("userlocationlostfocus")))}))}},this.options=l.e({},Gn,h)}onAdd(h){return this._map=h,this._container=te.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return l._(this,arguments,void 0,(function*(e=!1){if(br!==void 0&&!e)return br;if(window.navigator.permissions===void 0)return br=!!window.navigator.geolocation,br;try{br=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(r){br=!!window.navigator.geolocation}return br}))})().then((e=>this._finishSetupUI(e))),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),te.remove(this._container),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Fr=0,Dr=!1}_isOutOfMapMaxBounds(h){let e=this._map.getMaxBounds(),r=h.coords;return e&&(r.longitudee.getEast()||r.latitudee.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let h=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&h))return;let e=this._map.project(h),r=this._map.unproject([e.x+100,e.y]),s=h.distanceTo(r)/100,a=2*this._accuracy/s;this._circleElement.style.width=`${a.toFixed(2)}px`,this._circleElement.style.height=`${a.toFixed(2)}px`}trigger(){if(!this._setup)return l.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new l.l("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Fr--,Dr=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new l.l("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new l.l("trackuserlocationstart")),this.fire(new l.l("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let h;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Fr++,Fr>1?(h={maximumAge:6e5,timeout:0},Dr=!0):(h=this.options.positionOptions,Dr=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,h)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},E.GlobeControl=class{constructor(){this._toggleProjection=()=>{var h;let e=(h=this._map.getProjection())===null||h===void 0?void 0:h.type;this._map.setProjection(e!=="mercator"&&e?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var h;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((h=this._map.getProjection())===null||h===void 0?void 0:h.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(h){return this._map=h,this._container=te.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=te.create("button","maplibregl-ctrl-globe",this._container),te.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._container}onRemove(){te.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},E.Hash=Ir,E.ImageSource=uA,E.KeyboardHandler=nt,E.LngLatBounds=Gt,E.LogoControl=Vo,E.Map=class extends Ss{constructor(h){var e,r;l.cw.mark(l.cx.create);let s=Object.assign(Object.assign(Object.assign({},_i),h),{canvasContextAttributes:Object.assign(Object.assign({},_i.canvasContextAttributes),h.canvasContextAttributes)});if(s.minZoom!=null&&s.maxZoom!=null&&s.minZoom>s.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(s.minPitch!=null&&s.maxPitch!=null&&s.minPitch>s.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(s.minPitch!=null&&s.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(s.maxPitch!=null&&s.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let a=new mt,u=new mi;if(s.minZoom!==void 0&&a.setMinZoom(s.minZoom),s.maxZoom!==void 0&&a.setMaxZoom(s.maxZoom),s.minPitch!==void 0&&a.setMinPitch(s.minPitch),s.maxPitch!==void 0&&a.setMaxPitch(s.maxPitch),s.renderWorldCopies!==void 0&&a.setRenderWorldCopies(s.renderWorldCopies),super(a,u,{bearingSnap:s.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new dl,this._controls=[],this._mapId=l.a7(),this._contextLost=m=>{m.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new l.l("webglcontextlost",{originalEvent:m}))},this._contextRestored=m=>{this._setupPainter(),this.resize(),this._update(),this.fire(new l.l("webglcontextrestored",{originalEvent:m}))},this._onMapScroll=m=>{if(m.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=s.interactive,this._maxTileCacheSize=s.maxTileCacheSize,this._maxTileCacheZoomLevels=s.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},s.canvasContextAttributes),this._trackResize=s.trackResize===!0,this._bearingSnap=s.bearingSnap,this._centerClampedToGround=s.centerClampedToGround,this._refreshExpiredTiles=s.refreshExpiredTiles===!0,this._fadeDuration=s.fadeDuration,this._crossSourceCollisions=s.crossSourceCollisions===!0,this._collectResourceTiming=s.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},pl),s.locale),this._clickTolerance=s.clickTolerance,this._overridePixelRatio=s.pixelRatio,this._maxCanvasSize=s.maxCanvasSize,this.transformCameraUpdate=s.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=s.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=kt.addThrottleControl((()=>this.isMoving())),this._requestManager=new WA(s.transformRequest),typeof s.container=="string"){if(this._container=document.getElementById(s.container),!this._container)throw new Error(`Container '${s.container}' not found.`)}else{if(!(s.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=s.container}if(s.maxBounds&&this.setMaxBounds(s.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",(()=>this._update(!1))),this.on("moveend",(()=>this._update(!1))),this.on("zoom",(()=>this._update(!0))),this.on("terrain",(()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)})),this.once("idle",(()=>{this._idleTriggered=!0})),typeof window!="undefined"){addEventListener("online",this._onWindowOnline,!1);let m=!1,B=Go((Q=>{this._trackResize&&!this._removed&&(this.resize(Q),this.redraw())}),50);this._resizeObserver=new ResizeObserver((Q=>{m?B(Q):m=!0})),this._resizeObserver.observe(this._container)}this.handlers=new Qc(this,s),this._hash=s.hash&&new Ir(typeof s.hash=="string"&&s.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:s.center,elevation:s.elevation,zoom:s.zoom,bearing:s.bearing,pitch:s.pitch,roll:s.roll}),s.bounds&&(this.resize(),this.fitBounds(s.bounds,l.e({},s.fitBoundsOptions,{duration:0}))));let d=typeof s.style=="string"||((r=(e=s.style)===null||e===void 0?void 0:e.projection)===null||r===void 0?void 0:r.type)!=="globe";this.resize(null,d),this._localIdeographFontFamily=s.localIdeographFontFamily,this._validateStyle=s.validateStyle,s.style&&this.setStyle(s.style,{localIdeographFontFamily:s.localIdeographFontFamily}),s.attributionControl&&this.addControl(new Jo(typeof s.attributionControl=="boolean"?void 0:s.attributionControl)),s.maplibreLogo&&this.addControl(new Vo,s.logoPosition),this.on("style.load",(()=>{if(d||this._resizeTransform(),this.transform.unmodified){let m=l.Q(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(m)}})),this.on("data",(m=>{this._update(m.dataType==="style"),this.fire(new l.l(`${m.dataType}data`,m))})),this.on("dataloading",(m=>{this.fire(new l.l(`${m.dataType}dataloading`,m))})),this.on("dataabort",(m=>{this.fire(new l.l("sourcedataabort",m))}))}_getMapId(){return this._mapId}setGlobalStateProperty(h,e){return this.style.setGlobalStateProperty(h,e),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(h,e){if(e===void 0&&(e=h.getDefaultPosition?h.getDefaultPosition():"top-right"),!h||!h.onAdd)return this.fire(new l.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let r=h.onAdd(this);this._controls.push(h);let s=this._controlPositions[e];return e.indexOf("bottom")!==-1?s.insertBefore(r,s.firstChild):s.appendChild(r),this}removeControl(h){if(!h||!h.onRemove)return this.fire(new l.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let e=this._controls.indexOf(h);return e>-1&&this._controls.splice(e,1),h.onRemove(this),this}hasControl(h){return this._controls.indexOf(h)>-1}coveringTiles(h){return Ae(this.transform,h)}calculateCameraOptionsFromTo(h,e,r,s){return s==null&&this.terrain&&(s=this.terrain.getElevationForLngLatZoom(r,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(h,e,r,s)}resize(h,e=!0){let[r,s]=this._containerDimensions(),a=this._getClampedPixelRatio(r,s);if(this._resizeCanvas(r,s,a),this.painter.resize(r,s,a),this.painter.overLimit()){let d=this.painter.context.gl;this._maxCanvasSize=[d.drawingBufferWidth,d.drawingBufferHeight];let m=this._getClampedPixelRatio(r,s);this._resizeCanvas(r,s,m),this.painter.resize(r,s,m)}this._resizeTransform(e);let u=!this._moving;return u&&(this.stop(),this.fire(new l.l("movestart",h)).fire(new l.l("move",h))),this.fire(new l.l("resize",h)),u&&this.fire(new l.l("moveend",h)),this}_resizeTransform(h=!0){var e;let[r,s]=this._containerDimensions();this.transform.resize(r,s,h),(e=this._requestedCameraState)===null||e===void 0||e.resize(r,s,h)}_getClampedPixelRatio(h,e){let{0:r,1:s}=this._maxCanvasSize,a=this.getPixelRatio(),u=h*a,d=e*a;return Math.min(u>r?r/u:1,d>s?s/d:1)*a}getPixelRatio(){var h;return(h=this._overridePixelRatio)!==null&&h!==void 0?h:devicePixelRatio}setPixelRatio(h){this._overridePixelRatio=h,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(h){return this.transform.setMaxBounds(Gt.convert(h)),this._update()}setMinZoom(h){if((h=h==null?-2:h)>=-2&&h<=this.transform.maxZoom)return this.transform.setMinZoom(h),this._update(),this.getZoom()=this.transform.minZoom)return this.transform.setMaxZoom(h),this._update(),this.getZoom()>h&&this.setZoom(h),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(h){if((h=h==null?0:h)<0)throw new Error("minPitch must be greater than or equal to 0");if(h>=0&&h<=this.transform.maxPitch)return this.transform.setMinPitch(h),this._update(),this.getPitch()180)throw new Error("maxPitch must be less than or equal to 180");if(h>=this.transform.minPitch)return this.transform.setMaxPitch(h),this._update(),this.getPitch()>h&&this.setPitch(h),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(h){return this.transform.setRenderWorldCopies(h),this._update()}project(h){return this.transform.locationToScreenPoint(l.S.convert(h),this.style&&this.terrain)}unproject(h){return this.transform.screenPointToLocation(l.P.convert(h),this.terrain)}isMoving(){var h;return this._moving||((h=this.handlers)===null||h===void 0?void 0:h.isMoving())}isZooming(){var h;return this._zooming||((h=this.handlers)===null||h===void 0?void 0:h.isZooming())}isRotating(){var h;return this._rotating||((h=this.handlers)===null||h===void 0?void 0:h.isRotating())}_createDelegatedListener(h,e,r){if(h==="mouseenter"||h==="mouseover"){let s=!1;return{layers:e,listener:r,delegates:{mousemove:u=>{let d=e.filter((B=>this.getLayer(B))),m=d.length!==0?this.queryRenderedFeatures(u.point,{layers:d}):[];m.length?s||(s=!0,r.call(this,new Di(h,this,u.originalEvent,{features:m}))):s=!1},mouseout:()=>{s=!1}}}}if(h==="mouseleave"||h==="mouseout"){let s=!1;return{layers:e,listener:r,delegates:{mousemove:d=>{let m=e.filter((B=>this.getLayer(B)));(m.length!==0?this.queryRenderedFeatures(d.point,{layers:m}):[]).length?s=!0:s&&(s=!1,r.call(this,new Di(h,this,d.originalEvent)))},mouseout:d=>{s&&(s=!1,r.call(this,new Di(h,this,d.originalEvent)))}}}}{let s=a=>{let u=e.filter((m=>this.getLayer(m))),d=u.length!==0?this.queryRenderedFeatures(a.point,{layers:u}):[];d.length&&(a.features=d,r.call(this,a),delete a.features)};return{layers:e,listener:r,delegates:{[h]:s}}}}_saveDelegatedListener(h,e){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[h]=this._delegatedListeners[h]||[],this._delegatedListeners[h].push(e)}_removeDelegatedListener(h,e,r){if(!this._delegatedListeners||!this._delegatedListeners[h])return;let s=this._delegatedListeners[h];for(let a=0;ae.includes(d)))){for(let d in u.delegates)this.off(d,u.delegates[d]);return void s.splice(a,1)}}}on(h,e,r){if(r===void 0)return super.on(h,e);let s=typeof e=="string"?[e]:e,a=this._createDelegatedListener(h,s,r);this._saveDelegatedListener(h,a);for(let u in a.delegates)this.on(u,a.delegates[u]);return{unsubscribe:()=>{this._removeDelegatedListener(h,s,r)}}}once(h,e,r){if(r===void 0)return super.once(h,e);let s=typeof e=="string"?[e]:e,a=this._createDelegatedListener(h,s,r);for(let u in a.delegates){let d=a.delegates[u];a.delegates[u]=(...m)=>{this._removeDelegatedListener(h,s,r),d(...m)}}this._saveDelegatedListener(h,a);for(let u in a.delegates)this.once(u,a.delegates[u]);return this}off(h,e,r){return r===void 0?super.off(h,e):(this._removeDelegatedListener(h,typeof e=="string"?[e]:e,r),this)}queryRenderedFeatures(h,e){if(!this.style)return[];let r,s=h instanceof l.P||Array.isArray(h),a=s?h:[[0,0],[this.transform.width,this.transform.height]];if(e=e||(s?{}:h)||{},a instanceof l.P||typeof a[0]=="number")r=[l.P.convert(a)];else{let u=l.P.convert(a[0]),d=l.P.convert(a[1]);r=[u,new l.P(d.x,u.y),d,new l.P(u.x,d.y),u]}return this.style.queryRenderedFeatures(r,e,this.transform)}querySourceFeatures(h,e){return this.style.querySourceFeatures(h,e)}setStyle(h,e){return(e=l.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},e)).diff!==!1&&e.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&h?(this._diffStyle(h,e),this):(this._localIdeographFontFamily=e.localIdeographFontFamily,this._updateStyle(h,e))}setTransformRequest(h){return this._requestManager.setTransformRequest(h),this}_getUIString(h){let e=this._locale[h];if(e==null)throw new Error(`Missing UI string '${h}'`);return e}_updateStyle(h,e){var r,s;if(e.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(h,e)));let a=this.style&&e.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!h)),h?(this.style=new go(this,e||{}),this.style.setEventedParent(this,{style:this.style}),typeof h=="string"?this.style.loadURL(h,e,a):this.style.loadJSON(h,e,a),this):((s=(r=this.style)===null||r===void 0?void 0:r.projection)===null||s===void 0||s.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new go(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(h,e){if(typeof h=="string"){let r=this._requestManager.transformRequest(h,"Style");l.j(r,new AbortController).then((s=>{this._updateDiff(s.data,e)})).catch((s=>{s&&this.fire(new l.k(s))}))}else typeof h=="object"&&this._updateDiff(h,e)}_updateDiff(h,e){try{this.style.setState(h,e)&&this._update(!0)}catch(r){l.w(`Unable to perform style diff: ${r.message||r.error||r}. Rebuilding the style from scratch.`),this._updateStyle(h,e)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():l.w("There is no style added to the map.")}addSource(h,e){return this._lazyInitEmptyStyle(),this.style.addSource(h,e),this._update(!0)}isSourceLoaded(h){let e=this.style&&this.style.sourceCaches[h];if(e!==void 0)return e.loaded();this.fire(new l.k(new Error(`There is no source with ID '${h}'`)))}setTerrain(h){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),h){let e=this.style.sourceCaches[h.source];if(!e)throw new Error(`cannot load terrain, because there exists no source with ID: ${h.source}`);this.terrain===null&&e.reload();for(let r in this.style._layers){let s=this.style._layers[r];s.type==="hillshade"&&s.source===h.source&&l.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),s.type==="color-relief"&&s.source===h.source&&l.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Us(this.painter,e,h),this.painter.renderToTexture=new kn(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=r=>{var s;r.dataType==="style"?this.terrain.sourceCache.freeRtt():r.dataType==="source"&&r.tile&&(r.sourceId!==h.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((s=r.source)===null||s===void 0?void 0:s.type)==="image"?this.terrain.sourceCache.freeRtt():this.terrain.sourceCache.freeRtt(r.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new l.l("terrain",{terrain:h})),this}getTerrain(){var h,e;return(e=(h=this.terrain)===null||h===void 0?void 0:h.options)!==null&&e!==void 0?e:null}areTilesLoaded(){let h=this.style&&this.style.sourceCaches;for(let e in h){let r=h[e]._tiles;for(let s in r){let a=r[s];if(a.state!=="loaded"&&a.state!=="errored")return!1}}return!0}removeSource(h){return this.style.removeSource(h),this._update(!0)}getSource(h){return this.style.getSource(h)}setSourceTileLodParams(h,e,r){if(r){let s=this.getSource(r);if(!s)throw new Error(`There is no source with ID "${r}", cannot set LOD parameters`);s.calculateTileZoom=Qe(Math.max(1,h),Math.max(1,e))}else for(let s in this.style.sourceCaches)this.style.sourceCaches[s].getSource().calculateTileZoom=Qe(Math.max(1,h),Math.max(1,e));return this._update(!0),this}refreshTiles(h,e){let r=this.style.sourceCaches[h];if(!r)throw new Error(`There is no source cache with ID "${h}", cannot refresh tile`);e===void 0?r.reload(!0):r.refreshTiles(e.map((s=>new l.a4(s.z,s.x,s.y))))}addImage(h,e,r={}){let{pixelRatio:s=1,sdf:a=!1,stretchX:u,stretchY:d,content:m,textFitWidth:B,textFitHeight:Q}=r;if(this._lazyInitEmptyStyle(),!(e instanceof HTMLImageElement||l.b(e))){if(e.width===void 0||e.height===void 0)return this.fire(new l.k(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:C,height:x,data:I}=e,b=e;return this.style.addImage(h,{data:new l.R({width:C,height:x},new Uint8Array(I)),pixelRatio:s,stretchX:u,stretchY:d,content:m,textFitWidth:B,textFitHeight:Q,sdf:a,version:0,userImage:b}),b.onAdd&&b.onAdd(this,h),this}}{let{width:C,height:x,data:I}=Se.getImageData(e);this.style.addImage(h,{data:new l.R({width:C,height:x},I),pixelRatio:s,stretchX:u,stretchY:d,content:m,textFitWidth:B,textFitHeight:Q,sdf:a,version:0})}}updateImage(h,e){let r=this.style.getImage(h);if(!r)return this.fire(new l.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let s=e instanceof HTMLImageElement||l.b(e)?Se.getImageData(e):e,{width:a,height:u,data:d}=s;if(a===void 0||u===void 0)return this.fire(new l.k(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(a!==r.data.width||u!==r.data.height)return this.fire(new l.k(new Error("The width and height of the updated image must be that same as the previous version of the image")));let m=!(e instanceof HTMLImageElement||l.b(e));return r.data.replace(d,m),this.style.updateImage(h,r),this}getImage(h){return this.style.getImage(h)}hasImage(h){return h?!!this.style.getImage(h):(this.fire(new l.k(new Error("Missing required image id"))),!1)}removeImage(h){this.style.removeImage(h)}loadImage(h){return kt.getImage(this._requestManager.transformRequest(h,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(h,e){return this._lazyInitEmptyStyle(),this.style.addLayer(h,e),this._update(!0)}moveLayer(h,e){return this.style.moveLayer(h,e),this._update(!0)}removeLayer(h){return this.style.removeLayer(h),this._update(!0)}getLayer(h){return this.style.getLayer(h)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(h,e,r){return this.style.setLayerZoomRange(h,e,r),this._update(!0)}setFilter(h,e,r={}){return this.style.setFilter(h,e,r),this._update(!0)}getFilter(h){return this.style.getFilter(h)}setPaintProperty(h,e,r,s={}){return this.style.setPaintProperty(h,e,r,s),this._update(!0)}getPaintProperty(h,e){return this.style.getPaintProperty(h,e)}setLayoutProperty(h,e,r,s={}){return this.style.setLayoutProperty(h,e,r,s),this._update(!0)}getLayoutProperty(h,e){return this.style.getLayoutProperty(h,e)}setGlyphs(h,e={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(h,e),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(h,e,r={}){return this._lazyInitEmptyStyle(),this.style.addSprite(h,e,r,(s=>{s||this._update(!0)})),this}removeSprite(h){return this._lazyInitEmptyStyle(),this.style.removeSprite(h),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(h,e={}){return this._lazyInitEmptyStyle(),this.style.setSprite(h,e,(r=>{r||this._update(!0)})),this}setLight(h,e={}){return this._lazyInitEmptyStyle(),this.style.setLight(h,e),this._update(!0)}getLight(){return this.style.getLight()}setSky(h,e={}){return this._lazyInitEmptyStyle(),this.style.setSky(h,e),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(h,e){return this.style.setFeatureState(h,e),this._update()}removeFeatureState(h,e){return this.style.removeFeatureState(h,e),this._update()}getFeatureState(h){return this.style.getFeatureState(h)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let h=0,e=0;return this._container&&(h=this._container.clientWidth||400,e=this._container.clientHeight||300),[h,e]}_setupContainer(){let h=this._container;h.classList.add("maplibregl-map");let e=this._canvasContainer=te.create("div","maplibregl-canvas-container",h);this._interactive&&e.classList.add("maplibregl-interactive"),this._canvas=te.create("canvas","maplibregl-canvas",e),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let r=this._containerDimensions(),s=this._getClampedPixelRatio(r[0],r[1]);this._resizeCanvas(r[0],r[1],s);let a=this._controlContainer=te.create("div","maplibregl-control-container",h),u=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((d=>{u[d]=te.create("div",`maplibregl-ctrl-${d} `,a)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(h,e,r){this._canvas.width=Math.floor(r*h),this._canvas.height=Math.floor(r*e),this._canvas.style.width=`${h}px`,this._canvas.style.height=`${e}px`}_setupPainter(){let h=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),e=null;this._canvas.addEventListener("webglcontextcreationerror",(s=>{e={requestedAttributes:h},s&&(e.statusMessage=s.statusMessage,e.type=s.type)}),{once:!0});let r=null;if(r=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,h):this._canvas.getContext("webgl2",h)||this._canvas.getContext("webgl",h),!r){let s="Failed to initialize WebGL";throw e?(e.message=s,new Error(JSON.stringify(e))):new Error(s)}this.painter=new Is(r,this.transform),ot.testSupport(r)}migrateProjection(h,e){super.migrateProjection(h,e),this.painter.transform=h,this.fire(new l.l("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(h){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||h,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(h){return this._update(),this._renderTaskQueue.add(h)}_cancelRenderFrame(h){this._renderTaskQueue.remove(h)}_render(h){var e,r,s,a,u;let d=this._idleTriggered?this._fadeDuration:0,m=((e=this.style.projection)===null||e===void 0?void 0:e.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(h),this._removed)return;let B=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let x=this.transform.zoom,I=Se.now();this.style.zoomHistory.update(x,I);let b=new l.F(x,{now:I,fadeDuration:d,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),T=b.crossFadingFactor();T===1&&T===this._crossFadingFactor||(B=!0,this._crossFadingFactor=T),this.style.update(b)}let Q=((r=this.style.projection)===null||r===void 0?void 0:r.transitionState)>0!==m;(s=this.style.projection)===null||s===void 0||s.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((a=this.style.projection)===null||a===void 0?void 0:a.transitionState,(u=this.style.projection)===null||u===void 0?void 0:u.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||Q)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=this.style&&this.style._updatePlacement(this.transform,this.showCollisionBoxes,d,this._crossSourceCollisions,Q),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:d,showPadding:this.showPadding}),this.fire(new l.l("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,l.cw.mark(l.cx.load),this.fire(new l.l("load"))),this.style&&(this.style.hasTransitions()||B)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let C=this._sourcesDirty||this._styleDirty||this._placementDirty;return C||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new l.l("idle")),!this._loaded||this._fullyLoaded||C||(this._fullyLoaded=!0,l.cw.mark(l.cx.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var h;this._hash&&this._hash.remove();for(let r of this._controls)r.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window!="undefined"&&removeEventListener("online",this._onWindowOnline,!1),kt.removeThrottleControl(this._imageQueueHandle),(h=this._resizeObserver)===null||h===void 0||h.disconnect();let e=this.painter.context.gl.getExtension("WEBGL_lose_context");e!=null&&e.loseContext&&e.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),te.remove(this._canvasContainer),te.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),l.cw.clearMetrics(),this._removed=!0,this.fire(new l.l("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,Se.frame(this._frameRequest,(h=>{l.cw.frame(h),this._frameRequest=null;try{this._render(h)}catch(e){if(!l.cy(e)&&!(function(r){return r.message===xn})(e))throw e}}),(()=>{})))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(h){this._showTileBoundaries!==h&&(this._showTileBoundaries=h,this._update())}get showPadding(){return!!this._showPadding}set showPadding(h){this._showPadding!==h&&(this._showPadding=h,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(h){this._showCollisionBoxes!==h&&(this._showCollisionBoxes=h,h?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(h){this._showOverdrawInspector!==h&&(this._showOverdrawInspector=h,this._update())}get repaint(){return!!this._repaint}set repaint(h){this._repaint!==h&&(this._repaint=h,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(h){this._vertices=h,this._update()}get version(){return Ts}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(h){return this._lazyInitEmptyStyle(),this.style.setProjection(h),this._update(!0)}},E.MapMouseEvent=Di,E.MapTouchEvent=Wr,E.MapWheelEvent=Ro,E.Marker=Ls,E.NavigationControl=class{constructor(h){this._updateZoomButtons=()=>{let e=this._map.getZoom(),r=e===this._map.getMaxZoom(),s=e===this._map.getMinZoom();this._zoomInButton.disabled=r,this._zoomOutButton.disabled=s,this._zoomInButton.setAttribute("aria-disabled",r.toString()),this._zoomOutButton.setAttribute("aria-disabled",s.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(e,r)=>{let s=this._map._getUIString(`NavigationControl.${r}`);e.title=s,e.setAttribute("aria-label",s)},this.options=l.e({},fl,h),this._container=te.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(e=>this._map.zoomIn({},{originalEvent:e}))),te.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(e=>this._map.zoomOut({},{originalEvent:e}))),te.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})})),this._compassIcon=te.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(h){return this._map=h,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new iA(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){te.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(h,e){let r=te.create("button",h,this._container);return r.type="button",r.addEventListener("click",e),r}},E.Popup=class extends l.E{constructor(h){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&te.remove(this._content),this._container&&(te.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new l.l("close"))),this),this._onMouseUp=e=>{this._update(e.point)},this._onMouseMove=e=>{this._update(e.point)},this._onDrag=e=>{this._update(e.point)},this._update=e=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=te.create("div","maplibregl-popup",this._map.getContainer()),this._tip=te.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let d of this.options.className.split(" "))this._container.classList.add(d);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=rn(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),this._trackPointer&&!e)return;let r=this._flatPos=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&e?e:this._map.transform.locationToScreenPoint(this._lngLat));let s=this.options.anchor,a=Gs(this.options.offset);if(!s){let d=this._container.offsetWidth,m=this._container.offsetHeight,B;B=r.y+a.bottom.ythis._map.transform.height-m?["bottom"]:[],r.xthis._map.transform.width-d/2&&B.push("right"),s=B.length===0?"bottom":B.join("-")}let u=r.add(a[s]);this.options.subpixelPositioning||(u=u.round()),te.setTransform(this._container,`${Ct[s]} translate(${u.x}px,${u.y}px)`),Tt(this._container,s,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=l.e(Object.create($o),h)}addTo(h){return this._map&&this.remove(),this._map=h,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new l.l("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(h){return this._lngLat=l.S.convert(h),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(h){return this.setDOMContent(document.createTextNode(h))}setHTML(h){let e=document.createDocumentFragment(),r=document.createElement("body"),s;for(r.innerHTML=h;s=r.firstChild,s;)e.appendChild(s);return this.setDOMContent(e)}getMaxWidth(){var h;return(h=this._container)===null||h===void 0?void 0:h.style.maxWidth}setMaxWidth(h){return this.options.maxWidth=h,this._update(),this}setDOMContent(h){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=te.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(h),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(h){return this._container&&this._container.classList.add(h),this}removeClassName(h){return this._container&&this._container.classList.remove(h),this}setOffset(h){return this.options.offset=h,this._update(),this}toggleClassName(h){if(this._container)return this._container.classList.toggle(h)}setSubpixelPositioning(h){this.options.subpixelPositioning=h}_createCloseButton(){this.options.closeButton&&(this._closeButton=te.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let h=this._container.querySelector(Wo);h&&h.focus()}},E.RasterDEMTileSource=sr,E.RasterTileSource=cA,E.ScaleControl=class{constructor(h){this._onMove=()=>{ks(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,ks(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},qo),h)}getDefaultPosition(){return"bottom-left"}onAdd(h){return this._map=h,this._container=te.create("div","maplibregl-ctrl maplibregl-ctrl-scale",h.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){te.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},E.ScrollZoomHandler=ll,E.Style=go,E.TerrainControl=class{constructor(h){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=h}onAdd(h){return this._map=h,this._container=te.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=te.create("button","maplibregl-ctrl-terrain",this._container),te.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){te.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},E.TwoFingersTouchPitchHandler=An,E.TwoFingersTouchRotateHandler=Yo,E.TwoFingersTouchZoomHandler=zo,E.TwoFingersTouchZoomRotateHandler=Zo,E.VectorTileSource=Vi,E.VideoSource=Nr,E.addSourceType=(h,e)=>l._(void 0,void 0,void 0,(function*(){if(kA(h))throw new Error(`A source type called "${h}" already exists.`);((r,s)=>{LA[r]=s})(h,e)})),E.clearPrewarmedResources=function(){let h=lA;h&&(h.isPreloaded()&&h.numActive()===1?(h.release(Ar),lA=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},E.createTileMesh=ho,E.getMaxParallelImageRequests=function(){return l.a.MAX_PARALLEL_IMAGE_REQUESTS},E.getRTLTextPluginStatus=function(){return RA().getRTLTextPluginStatus()},E.getVersion=function(){return ea},E.getWorkerCount=function(){return pi.workerCount},E.getWorkerUrl=function(){return l.a.WORKER_URL},E.importScriptInWorkers=function(h){return Gr().broadcast("IS",h)},E.prewarm=function(){nr().acquire(Ar)},E.setMaxParallelImageRequests=function(h){l.a.MAX_PARALLEL_IMAGE_REQUESTS=h},E.setRTLTextPlugin=function(h,e){return RA().setRTLTextPlugin(h,e)},E.setWorkerCount=function(h){pi.workerCount=h},E.setWorkerUrl=function(h){l.a.WORKER_URL=h}}));var pe=Ce;return pe}))});var Qp={};dp(Qp,{default:()=>Vl});module.exports=pp(Qp);var lg=require("obsidian");var oA=require("obsidian"),Hl=ch(Pl());var Ba=[0,0],gh=4;var dh=require("obsidian"),Rl=class{constructor(){this.containerEl=createDiv("maplibregl-ctrl maplibregl-ctrl-group canvas-control-group mod-raised")}onAdd(le){let re=this.containerEl.createEl("div",{cls:"maplibregl-ctrl-zoom-in canvas-control-item",attr:{"aria-label":"Zoom in"}});(0,dh.setIcon)(re,"plus"),re.addEventListener("click",()=>{le.zoomIn()});let pe=this.containerEl.createEl("div",{cls:"maplibregl-ctrl-zoom-out canvas-control-item",attr:{"aria-label":"Zoom out"}});return(0,dh.setIcon)(pe,"minus"),pe.addEventListener("click",()=>{le.zoomOut()}),this.containerEl}onRemove(){this.containerEl&&this.containerEl.parentNode&&this.containerEl.detach()}};var zl=require("obsidian"),Nl=class{constructor(le,re,pe){this.tileSets=le,this.currentTileSetId=re,this.onSwitch=pe,this.containerEl=createDiv("maplibregl-ctrl maplibregl-ctrl-group canvas-control-group mod-raised")}onAdd(le){let re=this.containerEl.createEl("div",{cls:"canvas-control-item",attr:{"aria-label":"Switch background"}});return(0,zl.setIcon)(re,"layers"),re.addEventListener("click",pe=>{pe.stopPropagation();let E=new zl.Menu;for(let l of this.tileSets)E.addItem(ue=>{ue.setTitle(l.name).setChecked(this.currentTileSetId===l.id).onClick(()=>{this.currentTileSetId=l.id,this.onSwitch(l.id)})});E.showAtMouseEvent(pe)}),this.containerEl}onRemove(){this.containerEl&&this.containerEl.parentNode&&this.containerEl.detach()}};function ph(Ce){return Ce.indexOf("mapbox:")===0}function Ag(Ce,le){if(Ce.projection&&"name"in Ce.projection&&delete Ce.projection.name,Ce.sources)for(let re in Ce.sources){let pe=Ce.sources[re];if(pe.url&&ph(pe.url)){let E=fh(pe.url,"Source",le);E&&(pe.url=E.url)}}if(Ce.sprite&&typeof Ce.sprite=="string"&&ph(Ce.sprite)){let re=fh(Ce.sprite,"Sprite",le);re&&(Ce.sprite=re.url)}if(Ce.glyphs&&ph(Ce.glyphs)){let re=fh(Ce.glyphs,"Glyphs",le);re&&(Ce.glyphs=re.url)}return Ce}function fh(Ce,le,re){if(Ce.indexOf("/styles/")>-1&&Ce.indexOf("/sprite")===-1)return{url:fp(Ce,re)};if(Ce.indexOf("/sprites/")>-1)return{url:Bp(Ce,"",".json",re)};if(Ce.indexOf("/fonts/")>-1)return{url:mp(Ce,re)};if(Ce.indexOf("/v4/")>-1)return{url:ig(Ce,re)};if(le&&le==="Source")return{url:ig(Ce,re)}}function ya(Ce){let le=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/,re=Ce.match(le);if(!re)throw new Error("Unable to parse URL object");return{protocol:re[1],authority:re[2],path:re[3]||"/",params:re[4]?re[4].split("&"):[]}}function _a(Ce,le){let re=ya("https://api.mapbox.com");Ce.protocol=re.protocol,Ce.authority=re.authority,Ce.params.push(`access_token=${le}`);let pe=Ce.params.length?`?${Ce.params.join("&")}`:"";return`${Ce.protocol}://${Ce.authority}${Ce.path}${pe}`}function fp(Ce,le){let re=ya(Ce);return re.path=`/styles/v1${re.path}`,_a(re,le)}function mp(Ce,le){let re=ya(Ce);return re.path=`/fonts/v1${re.path}`,_a(re,le)}function ig(Ce,le){let re=ya(Ce);return re.path=`/v4/${re.authority}.json`,re.params.push("secure"),_a(re,le)}function Bp(Ce,le,re,pe){let E=ya(Ce),l=E.path.split("/").filter(Oe=>Oe.length>0),ue=l[0],Ue=l[1];if(!ue||!Ue){let Oe=E.path.split("."),Se=Oe[0],te=Oe[1]||"json",ot="";return Se.indexOf("@2x")>-1&&(Se=Se.split("@2x")[0],ot="@2x"),E.path=`/styles/v1${Se}/sprite${ot}.${te}`,_a(E,pe)}let Le="";return Ce.indexOf("@2x")>-1&&(Le="@2x"),E.path=`/styles/v1/${ue}/${Ue}/sprite${Le}`,_a(E,pe)}var Yl=class{constructor(le){this.app=le}async getMapStyle(le,re){let pe=this.app.isDarkMode(),E=pe&&re.length>0?re:le,l;if(E.length===0?l=pe?"https://tiles.openfreemap.org/styles/dark":"https://tiles.openfreemap.org/styles/bright":E.length===1&&!this.isTileTemplateUrl(E[0])?l=E[0]:l="",l){try{let Ue=await fetch(l);if(Ue.ok){let Le=await Ue.json(),Oe=l.match(/access_token=([^&]+)/),Se=Oe?Oe[1]:"";return Se?Ag(Le,Se):Le}}catch(Ue){console.warn("Failed to fetch style JSON, falling back to URL:",Ue)}return l}let ue={version:8,sources:{},layers:[]};return E.forEach((Ue,Le)=>{let Oe=`custom-tiles-${Le}`;ue.sources[Oe]={type:"raster",tiles:[Ue],tileSize:256},ue.layers.push({id:`custom-layer-${Le}`,type:"raster",source:Oe})}),ue}isTileTemplateUrl(le){return le.includes("{z}")||le.includes("{x}")||le.includes("{y}")}};var rg=require("obsidian"),ng=ch(Pl()),Ol=class{constructor(le,re){this.map=null;this.sharedPopup=null;this.popupHideTimeout=null;this.popupHideTimeoutWin=null;this.containerEl=le,this.app=re}setMap(le){this.map=le}showPopup(le,re,pe,E,l,ue,Ue){if(!this.map||!pe||pe.length===0||!this.hasAnyPropertyValues(le,pe,E,l,ue))return;if(this.clearPopupHideTimeout(),!this.sharedPopup){let te=this.sharedPopup=new ng.Popup({closeButton:!1,closeOnClick:!1,offset:25});te.on("open",()=>{let ot=te.getElement();ot&&(ot.addEventListener("mouseenter",()=>{this.clearPopupHideTimeout()}),ot.addEventListener("mouseleave",()=>{this.hidePopup()}))})}let[Le,Oe]=re,Se=this.createPopupContent(le,pe,E,l,ue,Ue);this.sharedPopup.setDOMContent(Se).setLngLat([Oe,Le]).addTo(this.map)}hidePopup(){this.clearPopupHideTimeout();let le=this.popupHideTimeoutWin=this.containerEl.win;this.popupHideTimeout=le.setTimeout(()=>{this.sharedPopup&&this.sharedPopup.remove(),this.popupHideTimeout=null,this.popupHideTimeoutWin=null},150)}clearPopupHideTimeout(){this.popupHideTimeout&&(this.popupHideTimeoutWin||this.containerEl.win).clearTimeout(this.popupHideTimeout),this.popupHideTimeoutWin=null,this.popupHideTimeout=null}destroy(){this.clearPopupHideTimeout(),this.sharedPopup&&(this.sharedPopup.remove(),this.sharedPopup=null)}createPopupContent(le,re,pe,E,l,ue){let Ue=createDiv("bases-map-popup"),Le=re.slice(0,20),Oe=[];for(let Se of Le)if(!(Se===pe||Se===E||Se===l))try{let te=le.getValue(Se);te&&this.hasNonEmptyValue(te)&&Oe.push({prop:Se,value:te})}catch(te){}if(Oe.length>0){let Se=Oe[0],ot=Ue.createDiv("bases-map-popup-title").createEl("a",{href:le.file.path,cls:"internal-link"});Se.value.renderTo(ot,this.app.renderContext);let lt=Oe.slice(1);if(lt.length>0){let Nt=Ue.createDiv("bases-map-popup-properties");for(let{prop:Ut,value:bt}of lt){let ht=Nt.createDiv("bases-map-popup-property"),kt=ht.createDiv("bases-map-popup-property-label");kt.textContent=ue(Ut);let WA=ht.createDiv("bases-map-popup-property-value");bt.renderTo(WA,this.app.renderContext)}}}return Ue}hasNonEmptyValue(le){if(!le||!le.isTruthy())return!1;if(le instanceof rg.ListValue){for(let re=0;re=2&&(le=Kl(Ce.get(0)),re=Kl(Ce.get(1)));else if(Ce instanceof Jn.StringValue){let pe=Ce.toString().trim().split(",");pe.length>=2&&(le=Kl(pe[0].trim()),re=Kl(pe[1].trim()))}return le&&re&&_p(le,re)?[le,re]:null}function _p(Ce,le){return!isNaN(Ce)&&!isNaN(le)&&Ce>=-90&&Ce<=90&&le>=-180&&le<=180}function Kl(Ce){if(Ce instanceof Jn.NumberValue){let le=Number(Ce.toString());return isNaN(le)?null:le}if(Ce instanceof Jn.StringValue){let le=parseFloat(Ce.toString());return isNaN(le)?null:le}if(typeof Ce=="string"){let le=parseFloat(Ce);return isNaN(le)?null:le}return typeof Ce=="number"?isNaN(Ce)?null:Ce:null}function Qa(Ce,le){return Ce!=null&&typeof Ce=="object"&&Object.hasOwn(Ce,le)}var Xl=class{constructor(le,re,pe,E,l,ue,Ue){this.map=null;this.markers=[];this.bounds=null;this.loadedIcons=new Set;this.app=le,this.mapEl=re,this.popupManager=pe,this.onOpenFile=E,this.getData=l,this.getMapConfig=ue,this.getDisplayName=Ue}setMap(le){this.map=le}getMarkers(){return this.markers}getBounds(){return this.bounds}clearLoadedIcons(){this.loadedIcons.clear()}async updateMarkers(le){let re=this.getMapConfig();if(!this.map||!le||!re||!re.coordinatesProp)return;let pe=[];for(let Ue of le.data){if(!Ue)continue;let Le=null;try{let Oe=Ue.getValue(re.coordinatesProp);Le=jl(Oe)}catch(Oe){console.error(`Error extracting coordinates for ${Ue.file.name}:`,Oe)}Le&&pe.push({entry:Ue,coordinates:Le})}this.markers=pe;let E=this.bounds=new sg.LngLatBounds;pe.forEach(Ue=>{let[Le,Oe]=Ue.coordinates;E.extend([Oe,Le])}),await this.loadCustomIcons(pe);let l=this.createGeoJSONFeatures(pe),ue=this.map.getSource("markers");ue?ue.setData({type:"FeatureCollection",features:l}):(this.map.addSource("markers",{type:"geojson",data:{type:"FeatureCollection",features:l}}),this.addMarkerLayers(),this.setupMarkerInteractions())}getCustomIcon(le){let re=this.getMapConfig();if(!re||!re.markerIconProp)return null;try{let pe=le.getValue(re.markerIconProp);if(!pe||!pe.isTruthy())return null;let E=pe.toString().trim();return!E||E.length===0||E==="null"||E==="undefined"?null:E}catch(pe){return console.warn(`Could not extract icon for ${le.file.name}. The marker icon property should be a simple text value (e.g., "map", "star").`,pe),null}}getCustomColor(le){let re=this.getMapConfig();if(!re||!re.markerColorProp)return null;try{let pe=le.getValue(re.markerColorProp);return!pe||!pe.isTruthy()?null:pe.toString().trim()}catch(pe){return console.warn(`Could not extract color for ${le.file.name}. The marker color property should be a simple text value (e.g., "#ff0000", "red", "var(--color-accent)").`),null}}async loadCustomIcons(le){if(!this.map)return;let re=[],pe=new Set;for(let E of le){let l=this.getCustomIcon(E.entry),ue=this.getCustomColor(E.entry)||"var(--bases-map-marker-background)",Ue=this.getCompositeImageKey(l,ue);this.loadedIcons.has(Ue)||pe.has(Ue)||(re.push({icon:l,color:ue}),pe.add(Ue))}for(let{icon:E,color:l}of re)try{let ue=this.getCompositeImageKey(E,l),Ue=await this.createCompositeMarkerImage(E,l);this.map&&(this.map.hasImage(ue)&&this.map.removeImage(ue),this.map.addImage(ue,Ue),this.loadedIcons.add(ue))}catch(ue){console.warn(`Failed to create composite marker for icon ${E}:`,ue)}}getCompositeImageKey(le,re){return`marker-${le||"dot"}-${re.replace(/[^a-zA-Z0-9]/g,"")}`}resolveColor(le){let re=document.createElement("div");re.style.color=le,re.style.display="none",document.body.appendChild(re);let pe=getComputedStyle(re).color;return re.remove(),pe}async createCompositeMarkerImage(le,re){let pe=this.resolveColor(re),E=this.resolveColor("var(--bases-map-marker-icon-color)"),l=4,ue=48*l,Ue=document.createElement("canvas");Ue.width=ue,Ue.height=ue;let Le=Ue.getContext("2d");if(!Le)throw new Error("Failed to get canvas context");Le.imageSmoothingEnabled=!0,Le.imageSmoothingQuality="high";let Oe=ue/2,Se=ue/2,te=12*l;if(Le.fillStyle=pe,Le.beginPath(),Le.arc(Oe,Se,te,0,2*Math.PI),Le.fill(),Le.strokeStyle="rgba(255, 255, 255, 0.3)",Le.lineWidth=1*l,Le.stroke(),le){let ot=createDiv();(0,Ao.setIcon)(ot,le);let lt=ot.querySelector("svg");if(lt){lt.setAttribute("stroke","currentColor"),lt.setAttribute("fill","none"),lt.setAttribute("stroke-width","2"),lt.style.color=E;let Nt=new XMLSerializer().serializeToString(lt),Ut=new Image;Ut.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(Nt),await new Promise((bt,ht)=>{Ut.onload=()=>{let kt=te*1.2;Le.drawImage(Ut,Oe-kt/2,Se-kt/2,kt,kt),bt()},Ut.onerror=ht})}}else{let ot=4*l;Le.fillStyle=E,Le.beginPath(),Le.arc(Oe,Se,ot,0,2*Math.PI),Le.fill()}return new Promise((ot,lt)=>{Ue.toBlob(Nt=>{if(!Nt){lt(new Error("Failed to create image blob"));return}let Ut=new Image;Ut.onload=()=>ot(Ut),Ut.onerror=lt,Ut.src=URL.createObjectURL(Nt)})})}createGeoJSONFeatures(le){return le.map((re,pe)=>{let[E,l]=re.coordinates,ue=this.getCustomIcon(re.entry),Ue=this.getCustomColor(re.entry)||"var(--bases-map-marker-background)",Le=this.getCompositeImageKey(ue,Ue);return{type:"Feature",geometry:{type:"Point",coordinates:[l,E]},properties:{entryIndex:pe,icon:Le}}})}addMarkerLayers(){this.map&&this.map.addLayer({id:"marker-pins",type:"symbol",source:"markers",layout:{"icon-image":["get","icon"],"icon-size":["interpolate",["linear"],["zoom"],0,.12,4,.18,14,.22,18,.24],"icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-padding":0}})}setupMarkerInteractions(){this.map&&(this.map.on("mouseenter","marker-pins",()=>{this.map&&(this.map.getCanvas().style.cursor="pointer")}),this.map.on("mouseleave","marker-pins",()=>{this.map&&(this.map.getCanvas().style.cursor="")}),this.map.on("mouseenter","marker-pins",le=>{var E;if(!le.features||le.features.length===0)return;let pe=(E=le.features[0].properties)==null?void 0:E.entryIndex;if(pe!==void 0&&this.markers[pe]){let l=this.markers[pe],ue=this.getData(),Ue=this.getMapConfig();ue&&ue.properties&&Ue&&this.popupManager.showPopup(l.entry,l.coordinates,ue.properties,Ue.coordinatesProp,Ue.markerIconProp,Ue.markerColorProp,this.getDisplayName)}}),this.map.on("mouseleave","marker-pins",()=>{this.popupManager.hidePopup()}),this.map.on("click","marker-pins",le=>{var E;if(!le.features||le.features.length===0)return;let pe=(E=le.features[0].properties)==null?void 0:E.entryIndex;if(pe!==void 0&&this.markers[pe]){let l=this.markers[pe],ue=le.originalEvent?!!Ao.Keymap.isModEvent(le.originalEvent):!1;this.onOpenFile(l.entry.file.path,ue)}}),this.map.on("contextmenu","marker-pins",le=>{var E;if(le.preventDefault(),!le.features||le.features.length===0)return;let pe=(E=le.features[0].properties)==null?void 0:E.entryIndex;if(pe!==void 0&&this.markers[pe]){let l=this.markers[pe],[ue,Ue]=l.coordinates,Le=l.entry.file,Oe=Ao.Menu.forEvent(le.originalEvent);this.app.workspace.handleLinkContextMenu(Oe,Le.path,""),Oe.addItem(Se=>Se.setSection("action").setTitle("Copy coordinates").setIcon("map-pin").onClick(()=>{let te=`${ue}, ${Ue}`;navigator.clipboard.writeText(te)})),Oe.addItem(Se=>Se.setSection("danger").setTitle("Delete file").setIcon("trash-2").setWarning(!0).onClick(()=>this.app.fileManager.promptForDeletion(Le)))}}),this.map.on("mouseover","marker-pins",le=>{var E;if(!le.features||le.features.length===0)return;let pe=(E=le.features[0].properties)==null?void 0:E.entryIndex;if(pe!==void 0&&this.markers[pe]){let l=this.markers[pe];this.app.workspace.trigger("hover-link",{event:le.originalEvent,source:"bases",hoverParent:this.app.renderContext,targetEl:this.mapEl,linktext:l.entry.file.path})}}))}};var og='var A,B;A=this,B=function(){var A,B="undefined"!=typeof document?document.currentScript:null,Q=(A="undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:B&&B.src||new URL("mapbox-gl-rtl-text.js",document.baseURI).href,function(B={}){var Q,g,C=B,E=new Promise(((A,B)=>{Q=A,g=B})),I="object"==typeof window,F="function"==typeof importScripts;"object"==typeof process&&"object"==typeof process.versions&&process.versions.node;var w,U=Object.assign({},C),D="";(I||F)&&(F?D=self.location.href:"undefined"!=typeof document&&document.currentScript&&(D=document.currentScript.src),A&&(D=A),D=D.startsWith("blob:")?"":D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1),F&&(w=A=>{var B=new XMLHttpRequest;return B.open("GET",A,!1),B.responseType="arraybuffer",B.send(null),new Uint8Array(B.response)})),C.print||console.log.bind(console);var G,s,Y=C.printErr||console.error.bind(console);function o(A){if(h(A))return function(A){for(var B=atob(A),Q=new Uint8Array(B.length),g=0;gA.startsWith(J);function R(A){return Promise.resolve().then((()=>function(A){if(A==O&&G)return new Uint8Array(G);var B=o(A);if(B)return B;if(w)return w(A);throw"both async and sync fetching of the wasm failed"}(A)))}function x(A,B,Q,g){return function(A,B,Q){return R(A).then((A=>WebAssembly.instantiate(A,B))).then(Q,(A=>{Y(`failed to asynchronously prepare wasm: ${A}`),a(A)}))}(B,Q,g)}var H=A=>{for(;A.length>0;)A.shift()(C)};C.noExitRuntime;var b=A=>{var B=(A-s.buffer.byteLength+65535)/65536;try{return s.grow(B),n(),1}catch(A){}},r="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,t=A=>T(A),e=A=>{var B=(A=>{for(var B=0,Q=0;Q=55296&&g<=57343?(B+=4,++Q):B+=3}return B})(A)+1,Q=t(B);return((A,B,Q)=>{((A,B,Q,g)=>{if(!(g>0))return 0;for(var C=Q+g-1,E=0;E=55296&&I<=57343&&(I=65536+((1023&I)<<10)|1023&A.charCodeAt(++E)),I<=127){if(Q>=C)break;B[Q++]=I}else if(I<=2047){if(Q+1>=C)break;B[Q++]=192|I>>6,B[Q++]=128|63&I}else if(I<=65535){if(Q+2>=C)break;B[Q++]=224|I>>12,B[Q++]=128|I>>6&63,B[Q++]=128|63&I}else{if(Q+3>=C)break;B[Q++]=240|I>>18,B[Q++]=128|I>>12&63,B[Q++]=128|I>>6&63,B[Q++]=128|63&I}}B[Q]=0})(A,L,B,Q)})(A,Q,B),Q},j="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,f=(A,B)=>A?((A,B,Q)=>{for(var g=B+Q,C=B;A[C]&&!(C>=g);)++C;if(C-B>16&&A.buffer&&j)return j.decode(A.subarray(B,C));for(var E="";B>10,56320|1023&U)}}else E+=String.fromCharCode((31&I)<<6|F)}else E+=String.fromCharCode(I)}return E})(L,A,B):"",q={c:()=>{a("")},b:A=>{var B=L.length,Q=2147483648;if((A>>>=0)>Q)return!1;for(var g,C,E=1;E<=4;E*=2){var I=B*(1+.2/E);I=Math.min(I,A+100663296);var F=Math.min(Q,(g=Math.max(A,I))+((C=65536)-g%C)%C);if(b(F))return!0}return!1},a:s},Z=function(){var A={a:q};function B(A,B){var Q;return Z=A.exports,Q=Z.d,X.unshift(Q),function(A){if(M--,C.monitorRunDependencies?.(M),0==M&&y){var B=y;y=null,B()}}(),Z}if(M++,C.monitorRunDependencies?.(M),C.instantiateWasm)try{return C.instantiateWasm(A,B)}catch(A){Y(`Module.instantiateWasm callback failed with error: ${A}`),g(A)}return O||(O="data:application/octet-stream;base64,AGFzbQEAAAABUw1gAn9/AX9gAX8Bf2ADf39/AX9gAn9/AGAFf39/f38AYAF/AGAEf39/fwF/YAAAYAZ/f39/f38Bf2AFf39/f38Bf2ADf39/AGAEf39/fwBgAAF/AhgDAWEBYgABAWEBYwAHAWEBYQIBgAKAgAIDNzYBAgABAgoAAQQFBQYBCAYGBwgFAQoEAgIBAgsMBgMICQsACQEJAAQCAAMEBwACDAEFAAIBAAAEBQFwAQEBBggBfwFBkMMICwc5DgFkAC0BZQA3AWYABQFnAAwBaAA2AWkANQFqADQBawAzAWwALwFtAC4BbgEAAW8AMgFwADEBcQAwCurCAjYtAQF/IABFBEBBgAgPC0GIvwQoAgAiAQRAQYy/BCgCACAAIAERAAAPCyAAEAULKQEBfyACBEAgACEDA0AgAyABOgAAIANBAWohAyACQQFrIgINAAsLIAALjAkBC39BgAghAgJAIABBgAhGBEAgAUUNAUGIvwQoAgAiAARAQYy/BCgCACABIAARAAAPCyABEAUPCyABRQRAQZC/BCgCACIBBEBBjL8EKAIAIAAgAREDAEGACA8LIAAQDEGACA8LQZS/BCgCACICBEBBjL8EKAIAIAAgASACEQIADwsCfyAAR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EQCABIABBAXRqQQA7AQAgASEGCyAFQRBqJAAgBgsEACMACxAAIwAgAGtBcHEiACQAIAALBgAgACQAC3UBA38jAEEQayICJAAgAkEANgIMQYS/BCgCACIERQRAQYS/BBAdIgQ2AgALQYC/BCgCACAAIAEgBCACQQxqIgAQKCACKAIMQQBMBEAgAkEANgIMQYS/BCgCACAAECdBACACKAIMQQBMGyEDCyACQRBqJAAgAwsUAEGEvwQoAgAgACABIAIQEEEBRgvjAQEGfyMAQRBrIgEkACABQQA2AgwgAUEANgIIQYC/BCgCACEDIAFBCGohBQJAIAFBDGoiBEUNACAEKAIAQQBKDQACQAJAIANFDQAgAygCACICIANGDQEgAkUNACACKAIAIAJGDQELIARBGzYCAAwBCwJAIABBAE4EQCADKAKEASAASg0BCyAEQQE2AgAMAQsgAAR/IAIoAogBIABBA3RqQQhrKAIABUEACxogBQRAIAUgAigCiAEgAEEDdGooAgA2AgALCyABKAIMIQAgASgCCCEGIAFBEGokACAGQQAgAEEATBsLiwEBA38jAEEQayIDJABBgL8EKAIAIgJFBEBBgL8EEB0iAjYCAAsgA0EANgIMIAIgACABQf4BIANBDGoQFyADKAIMQQBMBEBBACECAkBBgL8EKAIAIgBFDQAgACAAKAIAIgFHBEAgAUUNASABKAIAIAFHDQELIAAoAoQBIQILIAIhBAsgA0EQaiQAIAQLdQEEfyMAQRBrIgIkACACQQA2AgwgACABQQBBACACQQxqIgUQJCEEIAJBADYCDCAAIAEgBEEBaiIBQQF0EAUiACABIAUQJBoCQCACKAIMQQBKBEAgABAMDAELIAAgBEEBdGpBADsBACAAIQMLIAJBEGokACADCwvc6gP5AwBBmAgL/QEBAAAAAgAAALAEAADgBAAAEAUAABAFAAAgBQAA4AQAABAFAAAQBQAAUAUAAIAFAAAQBQAAEAUAALAFAADgBQAAEAUAABAFAAAQBgAAUAYAAIgGAACPBgAAsAQAAKAGAAAQBQAA2AYAAOAGAABQBgAAiAYAAI8GAAAgBQAAoAYAABAFAADYBgAAABAAAACAAAAACAA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AaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABXQ2gAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAV0NoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAFdDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABXQ2gAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAV0NoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAFdDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABXQ2gAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAV0NoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAFdDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABXQ2gAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAV0NoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAFdDZ0NrQ2gAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABXQ2gAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAV0NoAGgAaAB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CxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxAE0ATQBNAE0ATQBNAE0ATQBNAE0AjQCNAI0ADQCNAE0ATQCNAI0ATQBNAA0ATQBNAE0AjQBNAE0ATQBNAE0ATQBNAE0ATQBNAA0ADQANAA0ADQANAA0ADQANAA0ADQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxAEGE4gALBbEAAACxAEGS4gALD7EAsQCxALEAsQCxALEAsQBBquIACxWxAAAAAAAAALEAsQCxALEAsQCxALEAQdTiAAsDsQCxAEGS4wALAbEAQdDjAAsBsQBB2uMACwexALEAsQCxAEHy4wALAbEAQZzkAAsDsQCxAEG85AALAwQABABBzuQACw8EAAAAAACxAAAAAACxALEAQZrlAAsDsQCxAEGm5QALFbEAsQAAAAAAsQCxALEAAAAAAAAAsQBB4OUACwuxALEAAAAAAAAAsQBBguYACw+xALEAsQCxALEAAACxALEAQZrmAAsBsQBBxOYACwOxALEAQeLmAAsBBABB9OYACwuxALEAsQCxALEAsQBBuOcACxGxAAAAAACxAAAAsQCxALEAsQBB2ucACwGxAEHq5wALA7EAsQBBhOgACwGxAEHA6AALAbEAQdroAAsBsQBBhukACw8KAAoACgAKAAoACgAEAAoAQaDpAAsJsQAAAAAAAACxAEHs6QALBbEAsQCxAEH86QALD7EAsQCxAAAAsQCxALEAsQBBmuoACwOxALEAQbTqAAsDsQCxAEHg6gALDQoACgAKAAoACgAKAAoAQajrAAsHsQAAAAAAoABBvOsACwGgAEHI6wALA7EAsQBBhuwACwOxALEAQaTsAAsBsQBBtOwACwmxALEAsQAAALEAQeLsAAsTsQAAAAAAsQCxALEAsQCxALEAsQBB/uwACwEEAEGO7QALD7EAsQCxALEAsQCxALEAsQBBwu0ACxexAAAAAACxALEAsQCxALEAsQCxALEAsQBB8O0ACwuxALEAsQCxALEAsQBBsO4ACwOxALEAQeLuAAsSsQAAALEAAACxAAoxCvIKMQryAEGa7wALLbEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQAAALEAsQCxALEAsQAAALEAsQBB0u8AC1exALEAsQCxALEAsQCxALEAsQCxALEAAACxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAQcrwAAsjsQCxALEAsQAAALEAsQCxALEAsQCxAAAAsQCxAAAAAACxALEAQaDxAAsDsQCxAEGs8QALBbEAsQCxAEHS8QALB7EAsQCxALEAQfTxAAsJsQAAAAAAsQCxAEGK8gALAbEAQaryAAsBsQBB6vIACwWxALEAsQBBkPMACxMKAAoACgAKAAoACgAKAAoACgAKAEGw8wALAQoAQfDzAAsBCQBBpvQACwQKMQryAEHU9AALBbEAsQCxAEGI9QALE7EAsQAAALEAsQCxALEAsQCxALEAQaz1AAsbsQAAAAAAsQCxALEAsQCxALEAsQCxALEAsQCxAEHW9QALTwQAAACxAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACxAEAAQdD2AAsdCgAKAAoACgAKAAoACgBKAAoACgAqALEAsQCxABIAQZD3AAsxQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABB0vcACzuxALEAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACxALEAsQBBlvgACwOxALEAQaz4AAsBsQBBuvgACwWxALEAsQBByPgACwsKAAAAAAAAAAoACgBBlPkAC0MKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAEGG+gALCbEAsQAAAAAAsQBBvPoACy2xAAAAsQCxALEAsQCxALEAsQAAALEAAACxAAAAAACxALEAsQCxALEAsQCxALEAQfb6AAsZsQCxALEAsQCxALEAsQCxALEAsQAAAAAAsQBBsPsACx+xALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxAEH4+wALEbEAAACxALEAsQCxALEAAACxAEGm/AALEbEAsQCxALEAsQCxALEAsQCxAEHU/AALF7EAsQCxALEAAAAAALEAsQAAALEAsQCxAEGU/QALF7EAAACxALEAAAAAAAAAsQAAALEAsQCxAEHI/QALF7EAsQCxALEAsQCxALEAsQAAAAAAsQCxAEGA/gALMbEAsQCxAAAAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQAAALEAsQCxALEAsQCxALEAQbr+AAsBsQBByP4ACwuxAAAAAAAAALEAsQBB4P4ACz+xALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAAACxALEAsQCxALEAQdr/AAsJCgAAAAoACgAKAEH6/wALBQoACgAKAEGagAELBQoACgAKAEG6gAELlAIKAAoAAAAKAAoACgAKAAYACjEK8goACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAkAsgCyALIAsgCyABIAFAgVCBMIFgiyALIAsgCyALIAsgACAAAAAAAAAAIAAgACAAIAAgACAAMAAwAKAAoxCvIAAAkACQAJAAkACQAJAAkACQAJAAkACQCyABIEMgSgCKEICgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAJAAcAqwiuCLAIrAivCAYABAAEAAQABAAEAAoACgAKAAoACjAK8AoACgAKAAoACgACAAIAAgACAAIAAgACAAIAAgACAAMAAwAKAAoxCvIAQfCCAQtzBAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEACgAKAAAACgAKAAoACgAAAAoACgBB+IMBCwkKAAAACgAKAAoAQYyEAQsXCgAKAAoACgAKAAoAAAAKAAAACgAAAAoAQayEAQsBBABBxIQBCwMKAAoAQdCEAQsJChAKAAoACgAKAEHkhAELKwoACgAKAAoAAAAAAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAQaKFAQsFCgAKAAoAQbCFAQvzBAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AoACgAKMArwCpAKkAqQChAKkAqQChAKEAqQCpAKkAqQCpAKEAoAChAKEAoQChAKAAoACgAKcApwCnAKsAqwCrAKAAoACgAKEAMABAAKAAqQChAKAAoACgAKEAoQChAKEAoACpAKkAqQCpAKAAqQCgAKEAoACgAKAAoAChAKEAoQChAKEAoQChAKEAoQCgAKAAoACgAKAAoQCgAKEAowCvAKEAoQChAKEAoQCpAKEAqQChAKEAoQChAKEAoQCpAKAAoACgAKAAoACjAK8AowCvAKAAoACgAKAAoACgAKAAoACgAKEAoQCgAKEAoACjAK8AowCvAKMArwCjAK8AoACgAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKEAoACgAKMArwCjAK8AoACgAKAAoACgAKkAoACgAKAAoACgAKAAoACgAKAAowCvAKAAoACpAKEAqQCpAKEAqQChAKEAoQChAKMArwCjAK8AowCvAKMArwCpAKAAoACgAKAAoAChAKEAoACgAKAAoACgAKAAoACgAKAAowCvAKMArwCpAKAAoACjAK8AoACgAKAAoACjAK8AowCvAKMArwCjAK8AowCvAKAAoACgAKAAoACgAKAAoACjEK8goxCvIKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAChAKEAoACgAKAAoACgAKAAoACjEK8goACgAKAAoACgAKAAoACgAKAAoACgBB3ooBC0cKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAAACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgBB0IsBCzcKAAoACgAKAAoACgAKAAoAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAEGQjAEL3wgKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACjEK8goxCvIKMQryCjEK8goxCvIKMQryCjEK8goACgAKAAoACgAKAAoACgAKAAoAChAKAAoACjAK8AoxCvIKAAowCvAKAApQChAK0AoACgAKAAoACgAKEAoQCjAK8AoACgAKAAoACgAKkAowCvAKAAoACgAKMArwCjAK8AoxCvIKMQryCjEK8goxCvIKMQryCgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoQCgAKEAoQChAKAAoACjAK8AoACgAKAAoACgAKAAoACgAKAAoAChAKkAoQChAKMArwCgAKAAoxCvIKAAoACgAKAAoACjEK8goxCvIKMQryCjEK8goxCvIKcQoyCvEKsgoxCvIKMQryCjEK8goxCvIKAAoACpAKEAoQChAKEAqQCgAKEAqQCjAK8AoQChAKMArwCjAK8AowCvAKMArwCgAKAAoACgAKAAoACgAKAAqQCgAKAAoACgAKAAoACgAKMArwChAKEAowCvAKAAoACgAKEAoACgAKAAoAChAKMArwCjAK8AoACjAK8AoACgAKMQryCjEK8goQCgAKAAoACgAKAAoQCpAKkAqQChAKAAoACgAKAAoACjAK8AqQCgAKAAoACgAKEAoACgAKAAowCvAKMArwChAKAAoQCgAKAAoACgAKAAoACgAKAAoACgAKAAoAChAKEAoQChAKEAoQChAKEAoQChAKEAoQChAKEAoQChAKEAoQChAKAAoQChAKEAoQCgAKAAoQCgAKEAoACgAKEAoACjAK8AowCvAKAAoACgAKAAoACjAK8AoACgAKAAoACgAKAAowCvAKEAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoQChAKAAoACgAKAAoACgAKAAowCvAKAAoACgAKAAoQChAKEAoQCgAKEAoQCgAKAAoQChAKAAoACgAKAAowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKEAoACgAKMArwCjAK8AowCvAKMArwCgAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKAAoACgAKAAoAChAKAAqQCgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAAAAAAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAAACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKkAoAQfqUAQsLCgAKAAoACgAKAAoAQY6VAQsFsQCxALEAQaKVAQsNCgAKAAoACgAKAAoACgBB7pUBC4cBsQAKAAoACjAK8AowCvAKAAoACgAKMArwCgAKMArwCgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAowCvAKAAoACjAK8AoxCvIKMQryCjEK8goxCvIKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAEGQlwELYwoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgBBmJgBCxcKAAoACgAKAAoACgAKAAoACgAKAAoACgBBuJgBCwEKAEHMmAELDbEAsQCxALEAAAAAAAoAQeSYAQsDCgAKAEHymAELRQoACgAKAAkACgAKAAoACgAAAAAAAAAKMQryCjEK8goxCvIKMQryCjEK8goACgAKMQryCjEK8goxCvIKMQryCgAKAAoACgBB6pkBCwexALEACgAKAEGYmgELHwoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAQfCaAQsFCgAKAAoAQZqbAQsdCgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAQdCbAQsHCgAKAAoACgBBhpwBCwcKAAoACgAKAEGqnAELBQoACgAKAEHWnAELIbEAsQCxALEACgCxALEAsQCxALEAsQCxALEAsQCxAAoACgBBiJ0BCwEKAEG8nQELCbEAAAAAAAAAsQBBzp0BCwGxAEH6nQELD7EAsQAAAAoACgAKAAoAsQBBoJ4BCwMEAAQAQbCeAQsvQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAYAAAAAoACgAKAAoAQfCeAQsjsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAQa6fAQsBsQBBvJ8BCw+xALEAsQCxALEAsQCxALEAQfafAQsVsQCxALEAsQCxALEAsQCxALEAsQCxAEG2oAELFbEAAAAAALEAsQCxALEAAAAAALEAsQBB4qABCxuxALEAsQCxALEAsQAAAAAAsQCxAAAAAACxALEAQZahAQsBsQBBqKEBCwGxAEHQoQELEbEAAACxALEAsQAAAAAAsQCxAEHsoQELA7EAsQBBiKIBCwOxALEAQZyiAQsBsQBBtKIBCwMKAAoAQeKiAQsHsQAAAAAAsQBB8qIBCwGxAEGYowELXwEAAQABAAEAAQABAAEAAQABAAMAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAEGypAEL2QEBALEAAQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQAKAAoADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ACgANAA0AsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQAKAAoACgAKAAoACgAKAAoACgAKAEGYpgELd7EAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAGAAoABgAAAAoABgAKAAoACgAKMQryCjEK8goxCvIEAAoACgADAAMACjAK8AoAAAAKAAQABAAKAEGYpwELgQENAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANALIAAAAKAAoABAAEAAQACgAKAAoxCvIKAAMABgADAAYABgACAAIAAgACAAIAAgACAAIAAgACAAYACgAKUAoACtAKAAoAQc6oAQsVClEKAArSCgAKMQryCgAKMQryCgAKAEGYqQELQwQABAAKAAoACgAEAAQAAAAKAAoACgAKAAoACgAKAAAAEgASABIAEgASABIAEgASABIAqgCqAKoACgAKABIAEgAAAAoAQZiqAQt3CgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAAAAAAAALEAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAQbyrAQsJsQCxALEAsQCxAEHQqwELtwcBAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAoAAQCxALEAsQABALEAsQABAAEAAQABAAEAsQCxALEAsQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQCxALEAsQABAAEAAQABALEAQQCBAAEAAQCBALEAsQABAAEAAQABAEEAQQBBAEEAgQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAEEAQQBBAEEAQQCBAAEAgQABAIEAgQABAAEAYQCBAIEAgQCBAIEAQQBBAEEAQQBhAEEAQQBBAEEAQQCBAEEAQQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAoACgAKAAoACgAKAAoAQQCBAEEAgQCBAIEAQQBBAEEAgQBBAEEAgQBBAIEAgQBBAIEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAgQCBAIEAgQBBAEEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAE0ATQCNAE0AsQCxALEAsQANAA0ADQANAA0ADQANAA0ABQAFAAUABQAFAAUABQAFAAUABQANAA0ADQANAA0ADQBtAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABAAEAAQABAAEAAQABAAEAAQABAAEAAQCxALEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQBNAE0ATQCNAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ADQCxALEAsQCxALEAsQCxALEAsQCxALEATQBNAE0AjQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAQQABAEEAQQCBAIEAgQABAEEAgQCBAEEAQQCBAEEAQQABAEEAgQCBAEEAAQABAAEAAQCBAEEAYQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAQbizAQsVsQCxALEAsQCxALEAsQCxALEAsQCxAEHkswELHwoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAQba0AQsPsQCxALEAsQAAAAAAsQCxAEHWtAELG7EAsQCxALEAsQAAALEAsQCxALEAsQCxALEAsQBBnrUBCwGxAEHMtQELEbEAsQCxALEAsQCxALEAsQCxAEHytQELDbEAsQCxALEAAAAAALEAQaa2AQsRsQCxALEAAAAAALEAAACxALEAQcS2AQsBsQBBzrYBCw+xALEAsQCxALEAsQCxALEAQYy3AQsdsQCxALEAsQCxALEAsQAAAAAAAACxALEAsQCxALEAQcS3AQsJsQCxALEAAACxAEH8twELAbEAQaa4AQsPsQCxALEAsQCxALEAAACxAEG+uAELCbEAsQAAALEAsQBBhLkBCwexALEAsQCxAEGYuQELCbEAsQAAALEAsQBB2LkBCwOxALEAQYa6AQszsQCxALEAsQCxALEAsQCxAAAAAACxAAAAsQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAEHmugELGbEAAACxAAAAAACxALEAsQCxALEAsQAAALEAQZS7AQsTsQCxALEAsQAAALEAsQCxALEAsQBB1rsBCxexALEAsQCxALEAsQCxALEAsQAAALEAsQBBprwBCwexALEAAACxAEG2vAELAbEAQfC8AQsPsQCxALEAsQAAAAAAsQCxAEGKvQELE7EAsQCxALEAsQCxAKAAoACxALEAQc69AQsXsQCxALEAsQCxALEAAAAAALEAsQCxALEAQfa9AQsBsQBBir4BCxWxALEAsQCxALEAsQAAAAAAsQCxALEAQbS+AQsfsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQAAALEAsQBB+L4BC02xALEAsQCxALEAsQCxAAAAsQCxALEAsQCxALEAAACgALEAsQCxALEAsQCxALEAsQAAAAAAsQCxALEAsQCxALEAsQAAALEAsQAAALEAsQBB7L8BCxuxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAQarAAQstsQCxALEAsQCxALEAAAAAAAAAsQAAALEAsQAAALEAsQCxALEAsQCxALEAAACxAEGIwQELD7EAsQAAAAAAAACxAAAAsQBBqMEBCyMEAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgBB+sEBCxUKAAoACgAKAAoACgAKAAoABAAEAAQAQbDCAQsRoACgAKAAoACgAKAAoACgAKAAQejCAQsJsQCxALEAsQCxAEGYwwELDbEAsQCxALEAsQCxALEAQcbDAQsHsQCxALEAsQBB7MMBCwUKAAAAsQBBqMQBCweyALIAsgCyAEHuxAELBbEAsQCxAEGGxQELMbIAsgCyALIAsgCyALIAsgCxALEAsQCxALEAsQCxALEAAAAAALEAsQCxALEAsQCxALEAQeTFAQsHsQCxALEAsQBBkMYBCwsKAAoAsQCxALEACgBB1sYBCwIKEABBgscBCwIKEABBtscBCwIKEABBzMcBC3ECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQBBxsgBCxuxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAQfLIAQsBsQBBiMkBCwGxAEG2yQELKbEAsQCxALEAsQAAALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxAEGAygELVbEAsQCxALEAsQCxALEAAACxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAAAAAALEAsQCxALEAsQCxALEAAACxALEAAACxALEAsQCxALEAQYDLAQsHsQCxALEAsQBBpssBC5ECBAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABALEAsQCxALEAsQCxALEAAQABAAEAAQABAAEAAQABAAEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBALEAsQCxALEAsQCxALEAoQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQAKAAoADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAAoACgAKAAoACgAKAAoACgAKAAoACgAKAEHAzQELhwEKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAIAAgACAAIAAgACAAIAAgACAAIAAgAKAAoACgAKAAoAQezOAQsLCgAKAAoACgAKAAoAQZrPAQsBCgBBwM8BCzEKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAEGA0AELDwoACgAKAAoACgAKAAoACgBBoNABCxMKAAoACgAKAAoACgAKAAoACgAKAEHA0AELDwoACgAKAAoACgAKAAoACgBB4NABCysKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAACgAKAEGo0QELbQoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAAAAAAKAAoACgAKAAoAAAAAAAAACgAKAAoAQaDSAQsNCgAKAAoACgAKAAoACgBBwNIBCyEKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAQfDSAQsNCgAKAAoACgAKAAoACgBBmNMBCw0KAAoACgAKAAoACgAKAEG40wELPwoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgBBmNQBCxMCAAIAAgACAAIAAgACAAIAAgACAEHs1AELywESABIAsgCyALIAsgCyALIAsgCyALIAsgCyALIAsgCyALIAsgCyALIAsgCyALIAsgCyALIAsgCyALIAsgCyALIAsgCyABIAsgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgBBwNYBC+dIbQR1BH0EhQSdBKUErQS1BL0ExQTLBNME2wTjBOsE8wT5BAEFCQURBRQFHAUkBSwFNAU8BTgFQAVIBVAFVQVdBWUFbQVxBXkFgQWJBZEFmQWVBZ0FogWqBbAFuAXABcgF0AXYBeAF6AXtBfUF+AUABggGEAYWBh4GHQYlBi0GNQZFBj0GTQZVBo0EZQZrBl0GewZ9BoUGcwaVBpsGowaNBrMGuQbBBqsG0QbXBt8GyQbvBvUG/QbnBg0HFQcdBwUHLQczBzsHJQdLB1EHWQdDB2kHbgd2B2EHhgeNB5UHfgcZBp0HpQeNBK0HtAe8B40ExAfMB9QH2QfhB+gH8AeNBNgF+AcACAgIEAhlBSAIGAjYBdgF2AXYBdgF2AXYBdgF2AXYBSgI2AUwCDQIPAjYBUII2AVICFAIWAhlBWUFYAhoCNgF2AXYBdgF2AXYBdgF2AXYBdgF2AX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7IDu4Iow6rDhEOEQ4RDhEOEQ4RDhEOEQ4RDhEOEQ4RDhEOEQ4RDhEOEQ4RDhEOEQ4RDhEOEQ4RDhEOEQ4RDhEOEQ4RDhEOEQ40EjQSdBK0EvQSLBNsE6wT5BMkFFAUkBTQFOAUIBVUFZQVxBUEFkQWVBaIFsAWABdAF4AXtBfgFyAYWBh0GLQYgArACgALQAuAC0AKwAtACuILQApACkAKQAoiDNsB2wFiDKIMQApACkAKQAriDAINQApACkINgg3CDQIOQg6CDsIO+Q7bAdsBHQ9RD9sBeQ/bAdsB2wHbAaYP2wHbAdsB2wHbAdsB2wG6D9sB8g8yENsBPRDbAdsB2wFzEEAKsxDbAdsB8xBACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQAp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gABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQABAAIAAQACAAEAAgACAAIAAQABAAIAAQACAAEAAQACAAEAAQABAAIAAgABAAEAAQABAAIAAQABAAIAAQABAAEAAgACAAIAAQABAAIAAQABAAIAAQACAAEAAgABAAEAAgABAAIAAgABAAIAAQABAAIAAQABAAEAAgABAAIAAQABAAIAAgAFAAEAAgACAAIABQAFAAUABQABAAMAAgABAAMAAgABAAMAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAgABAAMAAgABAAIAAQABAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAgACAAIAAgACAAIAAQABAAIAAQABAAIAAgABAAIAAQABAAEAAQACAAEAAgABAAIAAQACAAEAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAFAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEABoAGgAaABoABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaAAQABAAEAAQABAAaABoAGgAaABoAGgAaAAQAGgAEABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAEAAgABAAIABAAaAAEAAgAAAAAABAACAAIAAgAXAAEAQYirAgvHBxoAGgABABcAAQABAAEAAAABAAAAAQABAAIAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAQABAAEAAQABAAEAAQABAAEAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAEAAgACAAEAAQABAAIAAgACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAIAAgACAAIAAQACABgAAQACAAEAAQACAAIAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAGwAGAAYABgAGAAYABwAHAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAAAAAAQAFwAXABcAFwAXABcAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAFwATAAAAAAAbABsAGQAAAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGABMABgAXAAYABgAXAAYABgAXAAYAQeCyAgs1BQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQZ6zAgsLBQAFAAUABQAXABcAQcCzAgvLBRAAEAAQABAAEAAQABgAGAAYABcAFwAZABcAFwAbABsABgAGAAYABgAGAAYABgAGAAYABgAGABcAEAAAABcAFwAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAFAAUABQAFAAUABQAFAAUABQAFAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAEkAiQDJAAkBSQGJAckBCQJJAokCFwAXABcAFwAFAAUABgAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABcABQAGAAYABgAGAAYABgAGABAAGwAGAAYABgAGAAYABgAEAAQABgAGABsABgAGAAYABgAFAAUASQCJAMkACQFJAYkByQEJAkkCiQIFAAUABQAbABsABQAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAAAAQAAUABgAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAGAAYABgAGAAYABgAGAAYABgAGAAUAQai5AgvVAkkAiQDJAAkBSQGJAckBCQJJAokCBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAGAAYABgAGAAYABgAGAAYABAAEABsAFwAXABcABAAAAAAABgAZABkABgAGAAYABgAEAAYABgAGAAQABgAGAAYABgAGAAAAAAAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAGAAYABgAEAAYABgAGAAYABgAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAYABgAGAAAAAAAXAAAABQAFAAUABQAFAAUABQAFAAUABQAFAEGovAILfwYABgAQAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUAQb69Agu3AwYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABQAFAAYABgAXABcASQCJAMkACQFJAYkByQEJAkkCiQIXAAQABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAYABgAGAAgABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAIAAYABQAIAAgACAAGAAYABgAGAAYABgAGAAYACAAIAAgACAAGAAgACAAFAAYABgAGAAYABgAGAAYABQAFAAUABQAFAAUABQAFAAUABQAGAAYAAAAAAEkAiQDJAAkBSQGJAckBCQJJAokCBQ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yQAJAUkBiQHJAQkCSQKJAssHSx5LeBsAGwAbABsAGwAbABkAGwBBrMcCC28GAAUAAAAFAAUABQAFAAUABQAAAAAAAAAFAAUABQAAAAUABQAFAAUAAAAAAAAABQAFAAAABQAAAAUABQAAAAAAAAAFAAUAAAAAAAAABQAFAAUAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQaTIAgslCAAIAAYACAAIAAAAAAAAAAgACAAIAAAACAAIAAgABgAAAAAABQBB1sgCCwEIAEHoyAILIAUABQAGAAYAAAAAAEkAiQDJAAkBSQGJAckBCQJJAokCAEGWyQILnQEXAEsFiwXLBQsGiwXLBQsGGwAGAAgACAAIAAYABQAFAAUABQAFAAUABQAFAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAABQAGAAYABgAIAAgACAAIAAAABgAGAAYAAAAGAAYABgAGAEHCygILCwYABgAAAAUABQAFAEHYygILJQUABQAGAAYAAAAAAEkAiQDJAAkBSQGJAckBCQJJAokCAAAFAAUAQZjLAguLAQUABgAIAAgAFwAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAAAAAABgAFAAgABgAIAAgACAAIAAgAAAAGAAgACAAAAAgACAAGAAYAQbLMAgsDCAAIAEHEzAILywEFAAAABQAFAAYABgAAAAAASQCJAMkACQFJAYkByQEJAkkCiQLLB0seS3jLNEs0yzzLN8s1yz8bAAUABQAFAAUABQAFAAYABgAIAAgABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAGAAYABQAIAAgACAAGAAYABgAGAAAACAAIAAgAAAAIAAgACAAGAAUAGwBBmM4CCxcFAAUABQAIAAvMC8pLywvJSzZLyQs1BQBBvM4CCx1JAIkAyQAJAUkBiQHJAQkCSQKJAgAAAAAIAAgAFwBB8s4CC4sBBgAIAAgAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAABgBBhtACC1cIAAgACAAGAAYABgAAAAYAAAAIAAgACAAIAAgACAAIAAgABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAYABQAFAAYABgAGAAYABgAGAAYAQebQAgs5GQAFAAUABQAFAAUABQAEAAYABgAGAAYABgAGAAYABgAXAEkAiQDJAAkBSQGJAckBCQJJAokCFwAXAEGq0QIL9wIFAAUAAAAFAAAABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAAAAUABQAFAAUABQAFAAUABQAFAAUABgAFAAUABgAGAAYABgAGAAYABgAGAAYABQAAAAAABQAFAAUABQAFAAAABAAAAAYABgAGAAYABgAGAAAAAABJAIkAyQAJAUkBiQHJAQkCSQKJAgAAAAAFAAUABQAFAAUAGwAbABsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAGwAXABsAGwAbAAYABgAbABsAGwAbABsAGwBJAIkAyQAJAUkBiQHJAQkCSQKJAks0SzxLREtMS1RLXEtkS2xLdEssGwAGABsABgAbAAYAFAAVABQAFQAIAAgABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQarUAgvLAQYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAIAAYABgAGAAYABgAXAAYABgAFAAUABQAFAAUABgAGAAYABgAGAAYABgAGAAYABgAGAAAABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAAAGwAbABsAGwAbABsAGwAbAAYAGwAbABsAGwAbABsAAAAbABsAFwAXABcAFwAXABsAGwAbABsAFwAXAEGA1gILzwIFAAUABQAFAAUABQAFAAUABQAFAAUACAAIAAYABgAGAAYACAAGAAYABgAGAAYABgAIAAYABgAIAAgABgAGAAUASQCJAMkACQFJAYkByQEJAkkCiQIXABcAFwAXABcAFwAFAAUABQAFAAUABQAIAAgABgAGAAUABQAFAAUABgAGAAYABQAIAAgACAAFAAUACAAIAAgACAAIAAgACAAFAAUABQAGAAYABgAGAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAIAAgABgAGAAgACAAIAAgACAAIAAYABQAIAEkAiQDJAAkBSQGJAckBCQJJAokCCAAIAAgABgAbABsAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAFwAEAAIAAgACAAEAAQABAAEAAQABAAAAAQBB2tgCC9kDAQAAAAAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUAAAAAAAUABQAFAAUABQAFAAUAAAAFAAAABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAABQAAAAUABQAFAAUAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAYABgAGABcAFwAXABcAFwAXABcAFwAXAAsDSwOLA8sDCwRLBIsEywQLBcsHSwrLDEsPyxFLFMsWSxnLG0sei3gAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABsAGwAbABsAGwAbABsAGwAbABsAQcDcAguZAgEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAAAAAAIAAgACAAIAAgACAAAAAAATAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAbABcABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAwABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABQAFQAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAFwAXABcAignKCQoKBQAFAAUABQAFAAUABQAFAEHo3gILKQUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAYABgAGAEGo3wILLQUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAYABgAGABcAFwBB6N8CCycFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAGAAYAQajgAgsnBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAAABgAGAEHo4AILlAEFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAGAAgABgAGAAYABgAGAAYABgAIAAgACAAIAAgACAAIAAgABgAIAAgABgAGAAYABgAGAAYABgAGAAYABgAGABcAFwAXAAQAFwAXABcAGQAFAAYAAAAAAEkAiQDJAAkBSQGJAckBCQJJAokCAEGI4gILFEsFiwXLBQsGSwaLBssGCwdLB4sHAEGo4gILFQUABQAFAAUABQAFAAUABQAFAAYABQBByOICC1QFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABcAFwAXABcAFwAXABMAFwAXABcAFwAGAAYABgAQAAAASQCJAMkACQFJAYkByQEJAkkCiQIAQajjAgtBBQAFAAUABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQfjjAgtDBQAFAAUABQAFAAYABgAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBB0OQCCxcGAAYABgAIAAgACAAIAAYABgAIAAgACABB8OQCCxcIAAgABgAIAAgACAAIAAgACAAGAAYABgBBkOUCC4kBGwAAAAAAAAAXABcASQCJAMkACQFJAYkByQEJAkkCiQIFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAFAAUABQAFAAUAQbDmAgsXBQAFAAUABQAFAAUABQAFAAUABQAFAAUAQdDmAgsjBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQYDnAgv0AkkAiQDJAAkBSQGJAckBCQJJAokCCwMAAAAAAAAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAGAAYACAAIAAYAAAAAABcAFwAXABcAFwAXABcAFwAXAAQAFwAXABcAFwAXABcAAAAAAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAHAAYABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUACAAGAAgABgAGAAYABgAGAAYABgAAAAYACAAGAAgACAAGAAYABgAGAAYABgAGAAYACAAIAAgACAAIAAgABgAGAAYABgAGAAYABgAGAAYABgAAAAAABgBJAIkAyQAJAUkBiQHJAQkCSQKJAgBBgOoCCxRJAIkAyQAJAUkBiQHJAQkCSQKJAgBBoOoCC0EXABsAGwAbABsAGwAbABsAGwAbABsABgAGAAYABgAGAAYABgAGAAYAGwAbABsAGwAbABsAGwAbABsAAAAAAAAABgBBoOsCC28GAAYABgAGAAgABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAIAAYABgAGAAYABgAIAAYACAAIAAgACAAIAAYACAAIAAUABQAFAAUABQAFAAUAQZjsAgu/AUkAiQDJAAkBSQGJAckBCQJJAokCFwAXABcAFwAXABcABQAIAAYABgAGAAYACAAIAAYABgAIAAYABgAGAAUABQBJAIkAyQAJAUkBiQHJAQkCSQKJAgUABQAFAAUABQAFAAYABgAIAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAIAAYABgAIAAgACAAGAAgABgAGAAYACAAIAEHo7QIL0QEXABcAFwAXAEkAiQDJAAkBSQGJAckBCQJJAokCAAAAAAAABQAFAAUASQCJAMkACQFJAYkByQEJAkkCiQIFAAUABQAFAAUABQAIAAgACAAIAAgACAAIAAgABgAGAAYABgAGAAYABgAGAAgACAAGAAYAAAAAAAAAFwAXABcAFwAXAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAQABAAEAAQABAAEABcAFwACAAIAAgACAAIAAgACAAIAAgBByO8CC08BAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAQABAAEAFwAXABcAFwAXABcAFwAXAEGo8AILVQYABgAGABcABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAIAAYABgAGAAYABgAGAAYABQAFAAUABQAGAAUABQAFAAUABQAFAAYABQAFAAgABgAGAAUAQYjxAgufCQIAAgACAAIAAgACAAIAAgACAAIAAgACAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAQAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIABAAEAAQABAAEAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAAAAYABgAGAAYABgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAIAAgACAAIAAgACAAIAAgABAAIAAgACAAIAAgACAAIAAgACAAEAAQABAAEAAQAaABoAGgAAAAAAAgACAAIAAAACAAIAAQABAAEAAQADABoAGgAAAAIAAgACAAIAAgACAAIAAgABAAEAAQABAAEAAQABAAEAAgACAAIAAgACAAIAAAAAAAEAAQABAAEAAQABAAAAAAACAAIAAgACAAIAAgACAAIAAQABAAEAAQABAAEAAQABAAIAAgACAAIAAgACAAIAAgABAAEAAQABAAEAAQABAAEAAgACAAIAAgACAAIAAAAAAAEAAQABAAEAAQABAAAAAAACAAIAAgACAAIAAgACAAIAAAABAAAAAQAAAAEAAAABAAIAAgACAAIAAgACAAIAAgABAAEAAQABAAEAAQABAAEAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAAAAAACAAIAAgACAAIAAgACAAIAAwADAAMAAwADAAMAAwADAAIAAgACAAIAAgACAAIAAgADAAMAAwADAAMAAwADAAMAAgACAAIAAgACAAAAAgACAAEAAQABAAEAAwAaAAIAGgAaABoAAgACAAIAAAACAAIAAQABAAEAAQADABoAGgAaAAIAAgACAAIAAAAAAAIAAgABAAEAAQABAAAAGgAaABoAFgAXABcAFwAYABQAFQAXABcAFwAXABcAFwAXABcAFwAXABcAGAAXABYAFwAXABcAFwAXABcAFwAXABcAFwAMABAAEAAQABAAEAAAABAAEAAQABAAEAAQABAAEAAQABAAywIEAAAAAADLAwsESwSLBMsECwUYABgAGAAUABUABAAMAAwADAAMAAwADAAMAAwADAAMAAwAEAAQABAAEAAQABMAEwATABMAEwATABcAFwAcAB0AFAAcABwAHQAUABwAFwAXABcAFwAXABcAFwAXAA0ADgAQABAAEAAQABAADAAXABcAFwAXABcAFwAXABcAFwAcAB0AFwAXABcAFwAWAMsCCwNLA4sDywMLBEsEiwTLBAsFGAAYABgAFAAVAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAQcj6AgtBBgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAHAAcABwAHAAYABwAHAAcABgAGAAYABgAGAAYABgAGAAYABgAGAAYAQaj7AguXAhsAGwAbABsAAQAbAAEAGwABABsAAQABAAEAAQAbAAIAAQABAAEAAQACAAUABQAFAAUAAgAbABsAAgACAAEAAQAYABgAGAAYABgAAQACAAIAAgACABsAGAAbABsAAgAbAIs1CzZLNos0izgLNQs5Cz0LQUs1S0XLNcs9y0XLTYsFGwAbAAEAGwAbABsAGwABABsAGwACAAEAAQABAAIAAgABAAEAAQACABsAAQAbABsAGAABAAEAAQABAAEAGwAbAIoFygUKBkoGigbKBgoHSgeKB8oHCghKCMoRSh4KmEp4igXKBQoGSgaKBsoGCgdKB4oHygcKCEoIyhFKHgqYSnhKeEqYingBAAIAygbKEYqYynhLBRsAGwBByP0CC/0EGAAYABgAGAAYABsAGwAbABsAGwAYABgAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGwAbABgAGwAbABgAGwAbABsAGwAbABsAGwAYABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGAAYABsAGwAYABsAGAAbABsAGwAbABsAGwAbABsAGwAbABsAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABsAGwAbABsAGwAbABsAGwAUABUAFAAVABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAYABgAGwAbABsAGwAbABsAGwAUABUAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABgAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAYABgAGAAYABgAGAAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwBB+IIDC78JGwAbABsAGwAbABsAGwAbABsAGwDLAgsISwiLCMsICwlLCYsJywkLCksKCwNLA4sDywMLBEsEiwTLBAsFywfLAgsDSwOLA8sDCwRLBIsEywQLBcsHCwhLCIsIywgLCUsJiwnLCQsKSwoLA0sDiwPLAwsESwSLBMsECwXLBwsISwiLCMsICwlLCYsJywkLCksKGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGAAYABgAGAAYABgAGAAYABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAYABsAGwAbABsAGwAbABsAGwAbABgAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGAAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABQAFQAUABUAFAAVABQAFQAUABUAFAAVABQAFQALA0sDiwPLAwsESwSLBMsECwXLBwsDSwOLA8sDCwRLBIsEywQLBcsHCwNLA4sDywMLBEsEiwTLBAsFywcbABsAGwAbABsAGwAbABsAGwAbABsAGwAYABgAGAAYABgAFAAVABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABQAFQAUABUAFAAVABQAFQAUABUAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAUABUAFAAVABQAFQAUABUAFAAVABQAFQAUABUAFAAVABQAFQAUABUAFAAVABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABQAFQAUABUAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAUABUAGAAYABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABsAGwAYABgAGAAYABgAGAAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAAAAAABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAAAGwAbABsAGwAbABsAGwAbABsAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAAAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgABAAIAAQABAAEAAgACAAEAAgABAAIAAQACAAEAAQABAAEAAgABAAIAAgABAAIAAgACAAIAAgACAAQABAABAAEAAQACAAEAAgACABsAGwAbABsAGwAbAAEAAgABAAIABgAGAAYAAQACAEHCjAMLHRcAFwAXABcASzQXABcAAgACAAIAAgACAAIAAAACAEHqjAMLJQIAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQZ6NAwsDBAAXAEG+jQMLbwYABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBBwI4DC6UBFwAXABwAHQAcAB0AFwAXABcAHAAdABcAHAAdABcAFwAXABcAFwAXABcAFwAXABMAFwAXABMAFwAcAB0AFwAXABwAHQAUABUAFAAVABQAFQAUABUAFwAXABcAFwAXAAQAFwAXABcAFwAXABcAFwAXABcAFwATABMAFwAXABcAFwATABcAFAAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABsAGwAXAEGAkAMLXxsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAAABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAEH4kAMLKxsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAQciRAwsXGwAbABsAGwAbABsAGwAbABsAGwAbABsAQeiRAwv/ARsAigXKBQoGSgaKBsoGCgdKB4oHBgAGAAYABgAIAAgAEwAEAAQABAAEAAQAGwAbAMoHSgrKDAQABQAXABsAGwAMABcAFwAXABsABAAFAEoFFAAVABQAFQAUABUAFAAVABQAFQAbABsAFAAVABQAFQAUABUAFAAVABMAFAAVABUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAGAAYAGgAaAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABcABAAEAAQABQBB8pMDC30FAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAGwAbAIsFywULBksGGwAbABsAGwAbABsAGwAbABsAGwBBiJUDC70QBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQCLBcsFCwZLBosGywYLB0sHiwfLBxsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAywdLCssMSw/LEUsUyxZLGRsAiwrLCgsLSwuLC8sLCwxLDIsMywwLDUsNiw3LDQsOGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAEsOiw7LDgsPSw+LD8sPCxBLEIsQyxALEUsRixHLEQUABQAFAAUABQCFBgUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFBQUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAIUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFBwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAIUFBQAFAAUHBQAFAAUAhXgFAAUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQCFBwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFBQUABQAFAAUABQAFAAUAhQYFAEUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAIV5xQcFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBFeAUABQAFAAUABQAFAAUABQAFBgUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAIUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUARR4FAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQCFeQUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQCFegUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFBQUARQcFAMUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFBwUARXhFCsUMBQAFAAUABQAFAAUARQ8FAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQYFBgUGBQYFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBFBgUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQCFBQUABQAFAAUABQAFAAUAhQUFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAIUFBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQCFB0UKBQAFAAUABQAFAAUABQAFAAUABQAFAAUAhQXFBQUGBQDFBQUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAMUHBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBFBwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUHBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAhQcFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEUeBQAFAAUABQAFAAUABQBFBgUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAhXgFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFBQUABQAFAAUAxQUFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAMUFBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBFeAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFBgUABQAFAAUABQBFHgUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAMUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBFBQUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAQABQAFAAUABQAFAAUABQAFAAUABQAbABsAGwAbABsAGwAbAEHYpQMLXwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAXABcAFwAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEkAiQDJAAkBSQGJAckBCQJJAokCBQAFAEHgpgMLrwEBAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAQABAAGAAYAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAUABgAHAAcABwAXAAYABgAGAAYABgAGAAYABgAGAAYAFwAEAAUABQAFAAUABQAFAIoFygUKBkoGigbKBgoHSgeKB0oFBgAGABcAFwAXABcAFwAXAEGgqAMLPxoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAEAAQABAAEAAQABAAEAAQABABBiqkDC4MCAQACAAUABAAEAAIABQAFAAUABQAFABoAGgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAgACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAQAAgACAAIAAgACAAIAAgACAAEAAgABAAIAAQABAAIAAQACAAEAAgABAAIAAQACAAQAGgAaAAEAAgABAAIABQABAAIAAQACAAIAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAEAAQABAAEAAgABAAEAAQABAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAAAAAABAAIAAQABAAEAAQACAAEAAgBBuKsDC3MFAAUABgAFAAUABQAGAAUABQAFAAUABgAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUACAAIAAYABgAIABsAGwAbABsABgAAAAAAAADLNEs0yzzLN8s1yz8bABsAGQAbAEG4rAMLLwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAXABcAFwAXAEH4rAMLCwgACAAIAAgABgAGAEGUrQMLGBcAFwBJAIkAyQAJAUkBiQHJAQkCSQKJAgBBuK0DC/cBCAAIAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAUABQAFAAUABQAFABcAFwAXAAUAFwAFAAUABgAFAAUABQAFAAUABQAGAAYABgAGAAYABgAGAAYAFwAXAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAGAAYABgAGAAYABgAGAAYABgAGAAgACABBxq8DC+8BFwAIABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAAAAEAEkAiQDJAAkBSQGJAckBCQJJAokCAAAAAAAAAAAXABcABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAGAAgACAAGAAYABgAGAAgACAAGAAYACAAIAAUABQAFAAUABQAGAAQABQAFAAUABQAFAAUABQAFAAUASQCJAMkACQFJAYkByQEJAkkCiQIFAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAGAAYABgAGAAYABgAIAAgABgAGAAgACAAGAAYAQcixAwvFAQUABQAFAAYABQAFAAUABQAFAAUABQAFAAYACAAAAAAASQCJAMkACQFJAYkByQEJAkkCiQIAAAAAFwAXABcAFwAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAQABQAFAAUABQAFAAUAGwAbABsABQAIAAYACAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAGAAUABgAGAAYABQAFAAYABgAFAAUABQAFAAUABgAGAAUABgAFAEG+swMLNwUABQAEABcAFwAFAAUABQAFAAUABQAFAAUABQAFAAUACAAGAAYACAAIABcAFwAFAAQABAAIAAYAQYq0AwsrBQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAFAAAAAAAFAAUABQAFAAUABQBByLQDC3cFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAAAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoABAAEAAQABAACAAIAAgACAAIAAgACAAIAAgAEABoAGgBByLUDC1QCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAUABQAFAAgACAAGAAgACAAGAAgACAAXAAgABgAAAAAASQCJAMkACQFJAYkByQEJAkkCiQIAQai2AwsHBQAFAAUABQBByLYDCzcFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEGItwMLDQUABQAFAAUABQAFAAUAQZ63AwuHBAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEABQAFAAUABQAFAAUABQAFAAUABQAFAAUGBQAFAAUABQAFAAUABQDFBwUABQAFAAUAxQUFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAxQYFAMUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAMUHBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABgABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAgACAAIAAgACAAIAAgBBvrsDCwkCAAIAAgACAAIAQdK7AwtJBQAGAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgBBvrwDC0EFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABUAFABBoL0DCz8FAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQZC+AwtTBQAFAAUABQAFAAUABQAFAAUABQAFAAUAGQAbAAAAAAAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGABcAFwAXABcAFwAXABcAFAAVABcAQfC+AwuPAQYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAFwATABMAFgAWABQAFQAUABUAFAAVABQAFQAUABUAFAAVABcAFwAUABUAFwAXABcAFwAWABYAFgAXABcAFwAAABcAFwAXABcAEwAUABUAFAAVABQAFQAXABcAFwAYABMAGAAYABgAAAAXABkAFwAXAEGIwAMLrQEFAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAQAAAAAAAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAFAAAAAAAFAAUABQAAAAAAAAAZABkAGAAaABsAGQAZAAAAGwAYABgAGAAYABsAGwBBysEDC+MDEAAQABAAGwAbAAAAAAAAABcAFwAXABkAFwAXABcAFAAVABcAGAAXABMAFwAXAEkAiQDJAAkBSQGJAckBCQJJAokCFwAXABgAGAAYABcAGgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAFAAYABUAGAAUABUAFwAUABUAFwAXAAUABQAFAAUABQAFAAUABQAFAAUABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEAAQABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEG4xQMLRQuwC7hLeEuAS4hLkEuYS6BLqEuwS7iLeIuAi4iLkIuYi6CLqIuwi7gAAAAAAAAbABsAGwAbABsAGwAbABsAGwAXABcAFwBBhsYDC+sBiwXLBQsGSwaLBssGCwdLB4sHywdLCssMSw/LEUsUyxZLGcsbSx4LgAuIC5ALmAugC6jKB8oHygfKB8oHygzKEcoRyhHKEUoeCogKmAqYCpgKmAqYSnhKmIoGyhFLNEs0izjLPBsAGwAbABsAGwAbABsAGwAbABsAGwAbABsASwXLNBsAGwAbAAAAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAAAAAAAADKNEo0igWKBsoRCphKmIqYigbKB8oRSh4KmEp4SpiKBsoHyhFKHgqYSniKeIqYygeKBYoFigXKBcoFygXKBYoGGwBBsMgDC2EbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsABgAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEGwyQMLSAYAiwXLBQsGSwaLBssGCwdLB4sHywdLCssMSw/LEUsUyxZLGcsbSx4LgAuIC5ALmAugC6gLsAu4AAAAAAAAAACLBYsGywfLEQBBisoDCzwFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAyhsFAAUABQAFAAUABQAFAAUACrgAQdDKAws1BQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAGAAYABgAGAAYAQZDLAwtHBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAXAAUABQAFAAUAQeDLAwscBQAFAAUABQAFAAUABQAFABcAigXKBcoHSgpKHgBBkMwDC3QCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAABJAIkAyQAJAUkBiQHJAQkCSQKJAgBBkM0DC1cBAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAQfDNAwsnAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAEGgzgMLHwIAAgACAAIAAgACAAIAAgAFAAUABQAFAAUABQAFAAUAQdDOAwsfBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBBhs8DCwEXAEGozwML2AEFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAAAAAAAAAUAAAAAAAUABQAFAAUABQAFAAUAAAAAAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAB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UABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAGAAYABgAGAAYABgAXABcAFwAXABcAFwAXAEGs4AMLXwsDSwOLA8sDCwRLBIsEywQLBcsHSwrLDEsPyxEFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAgACAAIAAYABgAGAAYACAAIAAYABgAXABcAEAAXABcAFwAXAEGi4QMLJxAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBB2OEDCxRJAIkAyQAJAUkBiQHJAQkCSQKJAgBB+OEDC08FAAUABQAFAAUABQAFAAYABgAGAAYABgAIAAYABgAGAAYABgAGAAYABgAAAEkAiQDJAAkBSQGJAckBCQJJAokCFwAXABcAFwAFAAgACAAFAEHY4gMLbQUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAGAAYABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAYAFwAXAAUAQdjjAwuqAQgABQAFAAUABQAXABcAFwAXAAYABgAGAAYAFwAIAAYASQCJAMkACQFJAYkByQEJAkkCiQIFABcABQAXABcAFwAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAgACAAIAAYABgAGAAYABgAGAAYABgAGAAgAAACLBcsFCwZLBosGywYLB0sHiwfLB0sKywxLD8sRSxTLFksZyxtLHkt4AEGY5QMLywEFAAUABQAFAAUABQAFAAUABQAFAAUABQAIAAgACAAGAAYABgAIAAgABgAIAAYABgAXABcAFwAXABcAFwAGAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUAFwBB8OYDCzUFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAgACAAIAAYABgAGAAYABgAGAAYABgBBsOcDCxRJAIkAyQAJAUkBiQHJAQkCSQKJAgBB0OcDCykFAAUACAAIAAAAAAAGAAYABgAGAAYABgAGAAAAAAAAAAYABgAGAAYABgBBkOgDC5EBBgAGAAgACAAAAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAAABQAFAAAABQAFAAUABQAFAAAABgAGAAUACAAIAAYACAAIAAgACAAAAAAACAAIAAAAAAAIAAgACAAAAAAABQBBrukDCwEIAEG66QMLiQEFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAIAAgACAAGAAYABgAGAAYABgAGAAYACAAIAAYABgAGAAgABgAFAAUABQAFABcAFwAXABcAFwBJAIkAyQAJAUkBiQHJAQkCSQKJAhcAFwAAABcABgAFAAUABQBBgOsDC08FAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAgACAAIAAYABgAGAAYABgAGAAgABgAIAAgACAAIAAYABgAIAAYABgAFAAUAFwAFAEHg6wMLFEkAiQDJAAkBSQGJAckBCQJJAokCAEGA7AMLyQEFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAIAAgACAAGAAYABgAGAAAAAAAIAAgACAAIAAYABgAIAAYABgAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcABQAFAAUABQAGAAYAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUACAAIAAgABgAGAAYABgAGAAYABgAGAAgACAAGAAgABgAGABcAFwAXAAUAQeDtAwsUSQCJAMkACQFJAYkByQEJAkkCiQIAQYDuAwsZFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwBBwO4DCxRJAIkAyQAJAUkBiQHJAQkCSQKJAgBBgO8DCzEFAAUABQAFAAUABQAFAAUABQAFAAUABgAIAAYACAAIAAYABgAGAAYABgAGAAgABgAFAEHA7wMLFwgACAAGAAYABgAGAAgABgAGAAYABgAGAEHg7wMLV0kAiQDJAAkBSQGJAckBCQJJAokCywdLChcAFwAXABsABQAFAAUABQAFAAUABQAFAAUABQAFAAUACAAIAAgABgAGAAYABgAGAAYABgAGAAYACAAGAAYAFwBBwPADCyZJAIkAyQAJAUkBiQHJAQkCSQKJAssHSwrLDEsPyxFLFMsWSxnLGwBB/vADCw8FAAgABQAIAAYAFwAXABcAQaDxAwsUSQCJAMkACQFJAYkByQEJAkkCiQIAQcDxAwt5BQAFAAUABQAFAAUABQAAAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAAABQAFAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAIAAgACAAIAAgACAAAAAgACAAAAAAABgAGAAgABgAFAAYABQAXAAUACABB8PIDC68BBQAFAAUABQAFAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUACAAIAAgABgAGAAYABgAAAAAABgAGAAgACAAIAAgABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAGAAYABgAGAAYABgAIAAUABgAGAAYABgAXABcAFwAXABcAFwAXABcABgBBsPQDC2UFAAYABgAGAAYABgAGAAgACAAGAAYABgAFAAUABQAFAAUABgAGAAYABgAGAAYABgAGAAYABgAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAXABcAFwBB0PUDC0sFAAUABQAFAAUABQAFAAUABQAFAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYACAAGAAYAFwAXABcABQAXABcABQAXABcAFwAXABcAQbD2AwvlAUkAiQDJAAkBSQGJAckBCQJJAokCiwXLBQsGSwaLBssGCwdLB4sHywdLCssMSw/LEUsUyxZLGcsbSx4AAAAAAAAXABcABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAUABQA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QAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAQABAAEAAQABAAEAAQABAAEABB2P8DCw0FAAUABQAFAAUABQAFAEGYgAQLH0kAiQDJAAkBSQGJAckBCQJJAokCAAAAAAAAAAAXABcAQdiABAsrBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAGAAYABgAGAAYAFwBBmIEECx8FAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEHYgQQLSwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAGAAYABgAGAAYABgAXABcAFwAXABcAGwAbABsAGwAEAAQABAAEABcAGwBBuIIEC09JAIkAyQAJAUkBiQHJAQkCSQKJAgAAywdLHot4C3mLeQt6i3oAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEGSgwQLOwUABQAFAEsFiwXLBQsGSwaLBssGCwdLB4sHywcLCEsIiwjLCAsJSwmLCcsJCwqLBcsFCwYXABcAFwAXAEHYgwQLFQUABQAFAAUABQAFAAUABQAFAAUABQBB9oMEC0kGAAUACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEHOhAQLKwYABgAGAAYABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAFwAEAAYAQZCFBAsDCAAIAEGwhQQLLwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEGAhgQLBQUABQAFAEGghgQLBwUABQAFAAUAQbiGBAslBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBB6IYECxkFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEGQhwQLJwUABQAFAAUABQAFAAUABQAFAAUAAAAAABsABgAGABcAEAAQABAAEABB8IcEC+kBGwAbABsAGwAbABsAGwAAAAAAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsACAAIAAYABgAGABsAGwAbAAgACAAIAAgACAAIABAAEAAQABAAEAAQABAAEAAGAAYABgAGAAYABgAGAAYAGwAbAAYABgAGAAYABgAGAAYAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAGAAYABgAGABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAQYiKBAsLGwAbAAYABgAGABsAQciKBAsoSwWLBcsFCwZLBosGywYLB0sHiwfLBwsISwiLCMsICwlLCYsJywkLCgBBiIsECzKLBcsFCwZLBosGywYLB0sHiwfLB0sKywxLD8sRSxTLFksZyxuLBcsFCwZLBosGiwWLBgBByIsEC/8ISQKJAkkAiQDJAAkBSQGJAckBCQJJAokCSQCJAMkACQFJAYkByQEJAkkCiQJJAIkAyQAJAUkBiQHJAQkCSQKJAgEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACAAIAAgACAAIAAgACAAAAAgACAAIAAgACAAIAAgACAAIAAgABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAEAAAABAAEAAAAAAAEAAAAAAAEAAQAAAAAAAQABAAEAAQAAAAEAAQABAAEAAQABAAEAAQACAAIAAgACAAAAAgAAAAIAAgACAAIAAgACAAIAAAACAAIAAgACAAIAAgACAAIAAgACAAIAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACAAIAAgACAAEAAQAAAAEAAQABAAEAAAAAAAEAAQABAAEAAQABAAEAAQAAAAEAAQABAAEAAQABAAEAAAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAQABAAAAAQABAAEAAQAAAAEAAQABAAEAAQAAAAEAAAAAAAAAAQABAAEAAQABAAEAAQAAAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAIAAgACAAIAAgACAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABgAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAYAAIAAgACAAIAAgACAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAGAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAYAAIAAgACAAIAAgACAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAgACAAIAGAACAAIAAgACAAIAAgABAAIAAAAAAEkAiQDJAAkBSQGJAckBCQJJAokCSQCJAMkACQFJAYkByQEJAgAABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAQeiUBAuHAQYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAbABsAGwAbAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAbABsAGwAbABsAGwAbABsABgAbABsAGwAbABsAGwAbABsAGwAbAAYAGwAbABcAFwAXABcAFwBBjpYEC1cGAAYABgAGAAYABgAGAAYAAAAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAAAAAAAYABgAGAAYABgAGAAYAAAAGAAYAAAAGAAYABgAGAAYAQZCXBAsfSQCJAMkACQFJA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FAAUAAAAFAAUABQAFAAUABQAFAAAABQAFAAUABQAAAAUABQAFAAUAAAAFAAAABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBB0p8ECzUFAAUABQAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBBkKAECxcbABsAGwAbABsAGwAbABsAGwAbABsAGwBBsKAEC6cBGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAAAAAAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAAAAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwDLAssCCwNLA4sDywMLBEsEiwTLBAsFSwVLBRsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAQeShBAs5GwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAEG4ogQLNxsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAQfiiBAsRGwAbABsAGwAbABsAGwAbABsAQZijBAsDGwAbAEG4owQLCxsAGwAbABsAGwAbAEH4owQLbxsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABoAGgAaABoAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwBB+KQEC3EbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAAAAAAAABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAAAAAAAAAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwBB+KUECxcbABsAGwAbABsAGwAbABsAGwAbABsAGwBBuKYECw8bABsAGwAbABsAGwAbABsAQdimBAsTGwAbABsAGwAbABsAGwAbABsAGwBB+KYECw8bABsAGwAbABsAGwAbABsAQZinBAsrGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAAAAAABsAGwBB4KcEC5UBGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAAABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAAABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAAAAAAbABsAGwAbABsAAAAAAAAAGwAbABsAQYCpBAsNGwAbABsAGwAbABsAGwBBoKkECyEbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAQdCpBAsNGwAbABsAGwAbABsAGwBB+KkECw0bABsAGwAbABsAGwAbAEGYqgQLqQUbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAAAGwAbABsAGwAbABsAGwAbABsAGwAbABsABQAFBwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAhQYFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFDAUABQAFAAUABQAFAAUABQBFDwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEUPBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFBgUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQYFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQYFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFBgUABQAFAAUABQAFAAUABQAFAAUABQAFAAUARQYFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQYCwBAuDAQUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAhQcFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAQAEHAsQQLHwYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAQYCyBAs7EQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAQdCyBAsyIREhEwEVIRcDGSEdAx8BIwMlAykDLQMxAzUBOQE7AT0BPwNBA0UDSQNNA1EDVQNZA10AQYyzBAsuAwADYQNlA2kTbQNxA3UDeQF9AX8DgQQBhAGEAYQBhAGEAUQDBAEEBwQIBAgEAQBBxLMECwgBhQGHAYkBiwBB7LMEC8gBBAYJACEAIQAAACEAAQABAAMACxYLDgsCAwADAAsGAwADAAMAAwADAAMAAwALKgMACTgBAAEAAQAJNAkyCTYBAAEACTwBAAEAAQABAAEAAQAJOgEAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMACz4DAAMAAwADAAMAC0IDAAMAAwADAAMAAwADAAMAAwADAAlOC1ADAAMAC1oDAAlUC1YBAAEAAQAJkAmJCYcJiwmSAQAJjgusAQADAAMAC5QDAAleCWAAQcG1BAsJAQAAAAAAAQIDAEHrtQQLAwECAwBB+7UECwsBAAAAAQIDAAECAwBB7bYECwMBAgMAQc63BAsFBAQEBAQAQeC3BAvEAQMDAwADAAMDAwMDAwMDAwMAAAEAAQABAAEAAQIDAAEAAQIDAAEAAQIDAAECAwABAgMAAQI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z.f)(A),C._free=A=>(C._free=Z.g)(A),C._bidi_processText=(A,B)=>(C._bidi_processText=Z.h)(A,B),C._bidi_getParagraphEndIndex=A=>(C._bidi_getParagraphEndIndex=Z.i)(A),C._bidi_getVisualRun=(A,B,Q)=>(C._bidi_getVisualRun=Z.j)(A,B,Q),C._bidi_setLine=(A,B)=>(C._bidi_setLine=Z.k)(A,B),C._bidi_writeReverse=(A,B,Q)=>(C._bidi_writeReverse=Z.l)(A,B,Q),C._bidi_getLine=(A,B)=>(C._bidi_getLine=Z.m)(A,B);var p,u=A=>(u=Z.o)(A),T=A=>(T=Z.p)(A),v=()=>(v=Z.q)();function m(){function A(){p||(p=!0,C.calledRun=!0,N||(H(X),Q(C),C.onRuntimeInitialized&&C.onRuntimeInitialized(),function(){if(C.postRun)for("function"==typeof C.postRun&&(C.postRun=[C.postRun]);C.postRun.length;)A=C.postRun.shift(),d.unshift(A);var A;H(d)}()))}M>0||(function(){if(C.preRun)for("function"==typeof C.preRun&&(C.preRun=[C.preRun]);C.preRun.length;)A=C.preRun.shift(),S.unshift(A);var A;H(S)}(),M>0||(C.setStatus?(C.setStatus("Running..."),setTimeout((function(){setTimeout((function(){C.setStatus("")}),1),A()}),1)):A()))}if(C.ccall=(A,B,Q,g,E)=>{var I={string:A=>{var B=0;return null!=A&&0!==A&&(B=e(A)),B},array:A=>{var B,Q,g=t(A.length);return B=A,Q=g,c.set(B,Q),g}},F=(A=>C["_"+A])(A),w=[],U=0;if(g)for(var D=0;D{for(var Q=A,g=Q>>1,C=g+B/2;!(g>=C)&&i[g];)++g;if((Q=g<<1)-A>32&&r)return r.decode(L.subarray(A,Q));for(var E="",I=0;!(I>=B/2);++I){var F=K[A+2*I>>1];if(0==F)break;E+=String.fromCharCode(F)}return E},C.stringToUTF16=(A,B,Q)=>{if(Q??=2147483647,Q<2)return 0;for(var g=B,C=(Q-=2)<2*A.length?Q/2:A.length,E=0;E>1]=I,B+=2}return K[B>>1]=0,B-g},y=function A(){p||m(),p||(y=A)},C.preInit)for("function"==typeof C.preInit&&(C.preInit=[C.preInit]);C.preInit.length>0;)C.preInit.pop()();return m(),E});return async function(){const A=await Q();function B(B){if(!B)return B;const Q=2*(B.length+1),g=A._malloc(Q);A.stringToUTF16(B,g,Q);const C=A.ccall("ushape_arabic","number",["number","number"],[g,B.length]);if(A._free(g),0===C)return B;const E=A.UTF16ToString(C);return A._free(C),E}function g(B,Q){const g=[];for(let C=0;Cg[g.length-1])&&g.push(A);g.push(Q)}for(const A of B)A>g[g.length-1]&&g.push(A);return g}function C(B,Q,g){if(!B)return null;A.stringToUTF16(B,Q,g);const C=A.ccall("bidi_processText","number",["number","number"],[Q,B.length]);return 0===C?(A._free(Q),null):C}function E(B,Q){const E=2*(B.length+1),I=A._malloc(E),F=C(B,I,E);if(!F)return[B];const w=g(Q,F);let U=0;const D=[];for(const B of w){const Q=A.ccall("bidi_getLine","number",["number","number"],[U,B]);if(0===Q)return A._free(I),[];D.push(A.UTF16ToString(Q)),A._free(Q),U=B}return A._free(I),D}function I(){return A._malloc(4)}function F(B){const Q=new Int32Array(A.HEAPU8.buffer,B,1)[0];return A._free(B),Q}function w(B,Q,g){const C=A.ccall("bidi_writeReverse","number",["number","number","number"],[B,Q,g-Q]);if(0===C)return null;const E=A.UTF16ToString(C);return A._free(C),E}function U(B,Q,E){const U=2*(B.length+1),D=A._malloc(U),G=C(B,D,U);if(!G)return[{text:B,styleIndices:Q}];const s=g(E,G);let Y=0;const o=[];for(const g of s){let C="",E=[];const U=A.ccall("bidi_setLine","number",["number","number"],[Y,g]);if(!U)return A._free(D),[];for(let g=0;g=o;I--)if(g!==Q[I]||I===o){const F=I===o?I:I+1,U=w(D,F,B);if(!U)return A._free(D),[];C+=U;for(let A=0;A{this.map&&this.map.resize()},100,!0);this.onThemeChange=()=>{this.map&&this.updateMapStyle()};this.scrollEl=pe,this.plugin=E,this.containerEl=pe.createDiv({cls:"bases-map-container is-loading",attr:{tabIndex:0}}),this.mapEl=this.containerEl.createDiv("bases-map"),this.styleManager=new Yl(this.app),this.popupManager=new Ol(this.containerEl,this.app),this.markerManager=new Xl(this.app,this.mapEl,this.popupManager,(l,ue)=>void this.app.workspace.openLinkText(l,"",ue),()=>this.data,()=>this.mapConfig,l=>this.config.getDisplayName(l))}onload(){this.registerEvent(this.app.workspace.on("css-change",this.onThemeChange,this))}onunload(){this.destroyMap()}onResize(){this.onResizeDebounce()}focus(){this.containerEl.focus({preventScroll:!0})}async updateMapStyle(){if(!this.map||!this.mapConfig)return;let re=await this.styleManager.getMapStyle(this.mapConfig.mapTiles,this.mapConfig.mapTilesDark);this.map.setStyle(re),this.markerManager.clearLoadedIcons(),this.map.once("styledata",()=>{this.markerManager.updateMarkers(this.data)})}async switchToTileSet(re){let pe=this.plugin.settings.tileSets.find(E=>E.id===re);!pe||!this.mapConfig||(this.mapConfig.currentTileSetId=re,this.mapConfig.mapTiles=pe.lightTiles?[pe.lightTiles]:[],this.mapConfig.mapTilesDark=pe.darkTiles?[pe.darkTiles]:pe.lightTiles?[pe.lightTiles]:[],await this.updateMapStyle())}async initializeMap(){var Le,Oe,Se;if(this.map)return;if(!Ca.rtlPluginInitialized)try{let te=new Blob([og],{type:"application/javascript"}),ot=URL.createObjectURL(te);(0,Hl.setRTLTextPlugin)(ot,!1),Ca.rtlPluginInitialized=!0}catch(te){console.warn("Failed to initialize RTL text plugin:",te)}let re=((Le=this.mapConfig)==null?void 0:Le.currentTileSetId)||null;this.mapConfig=this.loadConfig(re),this.isEmbedded()?this.mapEl.style.height=this.mapConfig.mapHeight+"px":this.mapEl.style.height="";let E=await this.styleManager.getMapStyle(this.mapConfig.mapTiles,this.mapConfig.mapTilesDark),l=[this.mapConfig.center[1],this.mapConfig.center[0]],ue=this.mapConfig.defaultZoom,Ue=this.pendingMapState!==null;if(this.pendingMapState){if(this.pendingMapState.center){let te=this.pendingMapState.center;Array.isArray(te)?l=[te[0],te[1]]:typeof te=="object"&&"lng"in te&&"lat"in te&&(l=[te.lng,te.lat])}this.pendingMapState.zoom!==void 0&&this.pendingMapState.zoom!==null&&(ue=this.pendingMapState.zoom)}if(this.map=new Hl.Map({container:this.mapEl,style:E,center:l,zoom:ue,minZoom:this.mapConfig.minZoom,maxZoom:this.mapConfig.maxZoom}),this.popupManager.setMap(this.map),this.markerManager.setMap(this.map),this.map.addControl(new Rl,"top-right"),this.plugin.settings.tileSets.length>1){let te=this.mapConfig.currentTileSetId||((Oe=this.plugin.settings.tileSets[0])==null?void 0:Oe.id)||"";te&&this.map.addControl(new Nl(this.plugin.settings.tileSets,te,ot=>this.switchToTileSet(ot)),"top-right")}this.map.on("error",te=>{console.warn("Map error:",te)}),this.map.on("load",()=>{if(!this.map||!this.mapConfig||Ue||this.pendingMapState)return;let te=this.mapConfig.center[0]!==0||this.mapConfig.center[1]!==0,ot=this.config.get("defaultZoom")&&Number.isNumber(this.config.get("defaultZoom"));if(te)this.map.setCenter([this.mapConfig.center[1],this.mapConfig.center[0]]);else{let lt=this.markerManager.getBounds();lt&&this.map.setCenter(lt.getCenter())}if(ot)this.map.setZoom(this.mapConfig.defaultZoom);else{let lt=this.markerManager.getBounds();lt&&this.map.fitBounds(lt,{padding:20})}}),(Se=this.mapEl.querySelector("canvas"))==null||Se.style.setProperty("--no-tooltip","true"),this.mapEl.addEventListener("contextmenu",te=>{te.preventDefault(),this.showMapContextMenu(te)})}destroyMap(){this.popupManager.destroy(),this.map&&(this.map.remove(),this.map=null),this.markerManager.setMap(null)}onDataUpdated(){var ue;this.containerEl.removeClass("is-loading");let re=this.getConfigSnapshot(),pe=this.lastConfigSnapshot!==re,E=((ue=this.mapConfig)==null?void 0:ue.currentTileSetId)||null;this.mapConfig=this.loadConfig(E);let l=this.mapConfig.center[0]!==this.lastEvaluatedCenter[0]||this.mapConfig.center[1]!==this.lastEvaluatedCenter[1];this.initializeMap().then(async()=>{if(pe?(await this.applyConfigToMap(this.lastConfigSnapshot,re),this.lastConfigSnapshot=re,this.isFirstLoad=!1):this.map&&!this.isFirstLoad&&l&&this.pendingMapState===null&&this.updateCenter(),this.map&&this.data&&(await this.markerManager.updateMarkers(this.data),this.pendingMapState&&this.map)){let{center:Ue,zoom:Le}=this.pendingMapState;Ue&&this.map.setCenter(Ue),Le!=null&&this.map.setZoom(Le),this.pendingMapState=null}this.mapConfig&&(this.lastEvaluatedCenter=[this.mapConfig.center[0],this.mapConfig.center[1]])})}updateZoom(){if(!this.map||!this.mapConfig)return;this.config.get("defaultZoom")!=null&&this.map.setZoom(this.mapConfig.defaultZoom)}updateCenter(){if(!this.map||!this.mapConfig)return;if(this.mapConfig.center[0]!==0||this.mapConfig.center[1]!==0){let pe=this.map.getCenter();if(!pe)return;let E=[this.mapConfig.center[1],this.mapConfig.center[0]];(Math.abs(pe.lng-E[0])>1e-5||Math.abs(pe.lat-E[1])>1e-5)&&this.map.setCenter(E)}}async applyConfigToMap(re,pe){if(!this.map||!this.mapConfig)return;let E=re?JSON.parse(re):null,l=JSON.parse(pe),ue=(E==null?void 0:E.center)!==l.center,Ue=(E==null?void 0:E.defaultZoom)!==l.defaultZoom,Le=JSON.stringify(E==null?void 0:E.mapTiles)!==JSON.stringify(l.mapTiles)||JSON.stringify(E==null?void 0:E.mapTilesDark)!==JSON.stringify(l.mapTilesDark),Oe=(E==null?void 0:E.mapHeight)!==l.mapHeight;this.map.setMinZoom(this.mapConfig.minZoom),this.map.setMaxZoom(this.mapConfig.maxZoom);let Se=this.map.getZoom();Sethis.mapConfig.maxZoom&&this.map.setZoom(this.mapConfig.maxZoom);let te=this.pendingMapState!==null;if(!te&&(this.isFirstLoad||Ue)&&this.updateZoom(),!te&&(this.isFirstLoad||ue)&&this.updateCenter(),this.isFirstLoad||Le){let ot=await this.styleManager.getMapStyle(this.mapConfig.mapTiles,this.mapConfig.mapTilesDark),lt=this.map.getStyle();JSON.stringify(ot)!==JSON.stringify(lt)&&(this.map.setStyle(ot),this.markerManager.clearLoadedIcons())}(this.isFirstLoad||Oe)&&(this.isEmbedded()?this.mapEl.style.height=this.mapConfig.mapHeight+"px":this.mapEl.style.height="",this.map.resize())}isEmbedded(){let re=this.scrollEl.parentElement;for(;re;){if(re.hasClass("bases-embed")||re.hasClass("block-language-base"))return!0;re=re.parentElement}return!1}loadConfig(re){let pe=this.config.getAsPropertyId("coordinates"),E=this.config.getAsPropertyId("markerIcon"),l=this.config.getAsPropertyId("markerColor"),ue=this.getNumericConfig("minZoom",0,0,24),Ue=this.getNumericConfig("maxZoom",18,0,24),Le=this.getNumericConfig("defaultZoom",gh,ue,Ue),Oe=this.getCenterFromConfig(),Se=this.isEmbedded()?this.getNumericConfig("mapHeight",400,100,2e3):400,te=this.getArrayConfig("mapTiles"),ot=this.getArrayConfig("mapTilesDark"),lt,Nt,Ut;if(te.length>0)lt=te,Nt=ot,Ut=null;else if(this.plugin.settings.tileSets.length>0){let ht=(re?this.plugin.settings.tileSets.find(kt=>kt.id===re):null)||this.plugin.settings.tileSets[0];Ut=ht.id,lt=ht.lightTiles?[ht.lightTiles]:[],Nt=ht.darkTiles?[ht.darkTiles]:ht.lightTiles?[ht.lightTiles]:[]}else lt=[],Nt=[],Ut=null;return{coordinatesProp:pe,markerIconProp:E,markerColorProp:l,mapHeight:Se,defaultZoom:Le,center:Oe,maxZoom:Ue,minZoom:ue,mapTiles:lt,mapTilesDark:Nt,currentTileSetId:Ut}}getNumericConfig(re,pe,E,l){let ue=this.config.get(re);if(ue==null||typeof ue!="number")return pe;let Ue=ue;return E!==void 0&&(Ue=Math.max(E,Ue)),l!==void 0&&(Ue=Math.min(l,Ue)),Ue}getArrayConfig(re){let pe=this.config.get(re);return pe?Array.isArray(pe)?pe.filter(E=>typeof E=="string"&&E.trim().length>0):typeof pe=="string"&&pe.trim().length>0?[pe.trim()]:[]:[]}getCenterFromConfig(){let re;try{re=this.config.getEvaluatedFormula(this,"center")}catch(pe){let E=this.config.get("center");if(String.isString(E))re=new oA.StringValue(E);else return Ba}if(oA.Value.equals(re,oA.NullValue.value)){let pe=this.config.get("center");if(String.isString(pe))re=new oA.StringValue(pe);else return Ba}return jl(re)||Ba}getConfigSnapshot(){return JSON.stringify({center:this.config.get("center"),defaultZoom:this.config.get("defaultZoom"),minZoom:this.config.get("minZoom"),maxZoom:this.config.get("maxZoom"),mapHeight:this.config.get("mapHeight"),mapTiles:this.config.get("mapTiles"),mapTilesDark:this.config.get("mapTilesDark")})}showMapContextMenu(re){if(!this.map||!this.mapConfig)return;let pe=Math.round(this.map.getZoom()*10)/10,E=[re.offsetX,re.offsetY],l=this.map.unproject(E),ue=Math.round(l.lat*1e5)/1e5,Ue=Math.round(l.lng*1e5)/1e5,Le=oA.Menu.forEvent(re);Le.addItem(Oe=>Oe.setTitle("New note").setSection("action").setIcon("square-pen").onClick(()=>{this.createFileForView("",Se=>{var te;if((te=this.mapConfig)!=null&&te.coordinatesProp){let ot=this.mapConfig.coordinatesProp.startsWith("note.")?this.mapConfig.coordinatesProp.slice(5):this.mapConfig.coordinatesProp;Se[ot]=[ue.toString(),Ue.toString()]}})})),Le.addItem(Oe=>Oe.setTitle("Copy coordinates").setSection("action").setIcon("copy").onClick(()=>{let Se=`${ue}, ${Ue}`;navigator.clipboard.writeText(Se)})),Le.addItem(Oe=>Oe.setTitle("Set default center point").setSection("action").setIcon("map-pin").onClick(()=>{var te;let Se=`[${ue}, ${Ue}]`;this.mapConfig&&(this.mapConfig.center=[ue,Ue]),this.config.set("center",Se),(te=this.map)==null||te.setCenter([Ue,ue])})),Le.addItem(Oe=>Oe.setTitle(`Set default zoom (${pe})`).setSection("action").setIcon("crosshair").onClick(()=>{this.config.set("defaultZoom",pe)}))}setEphemeralState(re){if(!re){this.pendingMapState=null;return}if(this.pendingMapState={},Qa(re,"center")&&Qa(re.center,"lng")&&Qa(re.center,"lat")){let pe=re.center.lng,E=re.center.lat;typeof pe=="number"&&typeof E=="number"&&(this.pendingMapState.center={lng:pe,lat:E})}Qa(re,"zoom")&&typeof re.zoom=="number"&&(this.pendingMapState.zoom=re.zoom)}getEphemeralState(){if(!this.map)return{};let re=this.map.getCenter();return{center:{lng:re.lng,lat:re.lat},zoom:this.map.getZoom()}}static getViewOptions(){return[{displayName:"Embedded height",type:"slider",key:"mapHeight",min:200,max:800,step:20,default:400},{displayName:"Display",type:"group",items:[{displayName:"Center coordinates",type:"formula",key:"center",placeholder:"[latitude, longitude]"},{displayName:"Default zoom",type:"slider",key:"defaultZoom",min:1,max:18,step:1,default:gh},{displayName:"Minimum zoom",type:"slider",key:"minZoom",min:0,max:24,step:1,default:0},{displayName:"Maximum zoom",type:"slider",key:"maxZoom",min:0,max:24,step:1,default:18}]},{displayName:"Markers",type:"group",items:[{displayName:"Marker coordinates",type:"property",key:"coordinates",filter:re=>!re.startsWith("file."),placeholder:"Property"},{displayName:"Marker icon",type:"property",key:"markerIcon",filter:re=>!re.startsWith("file."),placeholder:"Property"},{displayName:"Marker color",type:"property",key:"markerColor",filter:re=>!re.startsWith("file."),placeholder:"Property"}]},{displayName:"Background",type:"group",items:[{displayName:"Map tiles",type:"multitext",key:"mapTiles"},{displayName:"Map tiles in dark mode",type:"multitext",key:"mapTilesDark"}]}]}};Ca.rtlPluginInitialized=!1;var wa=Ca;var Yi=require("obsidian"),ag={tileSets:[]},Zl=class extends Yi.Modal{constructor(le,re,pe){super(le),this.isNew=!re,this.tileSet=re||{id:Date.now().toString(),name:"",lightTiles:"",darkTiles:""},this.onSave=pe}onOpen(){let{contentEl:le,modalEl:re}=this;this.setTitle(this.isNew?"Add background":"Edit background"),new Yi.Setting(le).setName("Name").setDesc("A name for this background.").addText(l=>l.setPlaceholder("e.g. Terrain, Satellite").setValue(this.tileSet.name).onChange(ue=>{this.tileSet.name=ue}));let pe=new Yi.Setting(le).setName("Light mode").addText(l=>l.setPlaceholder("https://tiles.openfreemap.org/styles/bright").setValue(this.tileSet.lightTiles).onChange(ue=>{this.tileSet.lightTiles=ue}));pe.descEl.innerHTML='Tile URL or style URL for light mode. See the Map view documentation for examples.',new Yi.Setting(le).setName("Dark mode (optional)").setDesc("Tile URL or style URL for dark mode. If not specified, light mode tiles will be used.").addText(l=>l.setPlaceholder("https://tiles.openfreemap.org/styles/dark").setValue(this.tileSet.darkTiles).onChange(ue=>{this.tileSet.darkTiles=ue}));let E=re.createDiv("modal-button-container");E.createEl("button",{cls:"mod-cta",text:"Save"}).addEventListener("click",()=>{this.onSave(this.tileSet),this.close()}),E.createEl("button",{text:"Cancel"}).addEventListener("click",()=>{this.close()})}onClose(){let{contentEl:le}=this;le.empty()}},Jl=class extends Yi.PluginSettingTab{constructor(le,re){super(le,re),this.plugin=re}display(){let{containerEl:le}=this;le.empty(),new Yi.Setting(le).setHeading().setName("Backgrounds").addButton(pe=>pe.setButtonText("Add background").setCta().onClick(()=>{new Zl(this.app,null,async E=>{this.plugin.settings.tileSets.push(E),await this.plugin.saveSettings(),this.display()}).open()}));let re=le.createDiv("map-tileset-list");this.plugin.settings.tileSets.forEach((pe,E)=>{this.displayTileSetItem(re,pe,E)}),this.plugin.settings.tileSets.length===0&&re.createDiv({cls:"mobile-option-setting-item",text:"Add background sets available to all maps."})}displayTileSetItem(le,re,pe){let E=le.createDiv("mobile-option-setting-item");E.createSpan({cls:"mobile-option-setting-item-name",text:re.name||"Untitled"}),E.createDiv("clickable-icon",l=>{(0,Yi.setIcon)(l,"pencil"),(0,Yi.setTooltip)(l,"Edit"),l.addEventListener("click",()=>{new Zl(this.app,{...re},async ue=>{this.plugin.settings.tileSets[pe]=ue,await this.plugin.saveSettings(),this.display()}).open()})}),E.createDiv("clickable-icon",l=>{(0,Yi.setIcon)(l,"trash-2"),(0,Yi.setTooltip)(l,"Delete"),l.addEventListener("click",async()=>{this.plugin.settings.tileSets.splice(pe,1),await this.plugin.saveSettings(),this.display()})})}};var Vl=class extends lg.Plugin{async onload(){await this.loadSettings(),this.registerBasesView("map",{name:"Map",icon:"lucide-map",factory:(le,re)=>new wa(le,re,this),options:wa.getViewOptions}),this.addSettingTab(new Jl(this.app,this))}async loadSettings(){this.settings=Object.assign({},ag,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}onunload(){}}; /*! Bundled license information: maplibre-gl/dist/maplibre-gl.js: (** * MapLibre GL JS * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.8.0/LICENSE.txt *) */ /* nosourcemap */