PageSourceSearch

https://www.genoapizzagrill.com/chunk-WTC5TOYK.js

js genoapizzagrill.com collected 2026-09-24 14:43:48 UTC 1,559,287 bytes, 737 lines download raw bytes

1import{b as Sf,c as fc,d as _c}from"./chunk-EPDIEKG2.js";import{a as $r,b as If,c as kf,d as Ef,f as zf,g as wu,h as Mu,i as qo}from"./chunk-IDWULJQP.js";import{D as Af,a as ge,c as Ae,e as un,f as gc,g as Mf,h as Pf,i as an,j as Hi,k as Fr,l as Rr,m as Fi,n as Cu,o as Br,p as Of,q as Nr,r as Vr,s as jr,w as lo,x as Ho,y as Ur,z as yc}from"./chunk-EUR74NNZ.js";import{a as Ee}from"./chunk-PIX66UN2.js";import{a as Tf}from"./chunk-XMDPDBDZ.js";import{A as mc,B as bu,C as ts,D as Mn,E as pn,F as Ln,G as Gn,e as Zo,g as vf,h as bf,j as Ja,k as Lr,l as vu,o as Cf,q as pr,r as Dr,u as wn,z as wf}from"./chunk-TVJSIN6K.js";import{$ as Js,$a as Se,$b as Hd,Ab as Xa,Ac as gf,Ba as cf,Bb as Ka,Bc as ff,Cb as ga,Cc as _f,D as nf,Da as Kn,Db as rt,Dc as ki,E as tm,Ea as em,Eb as Ce,Fb as tl,G as Gd,Ga as Le,Gb as le,H as ua,Ha as zt,Hb as ce,Ia as kr,Ib as I,J as of,Jb as E,Kb as it,L as rf,Lb as $o,Ma as rn,Mb as Go,Nb as vi,O as af,Ob as Yt,Oc as Ut,P as Zd,Pa as df,Qb as Ot,Qc as ii,Rb as A,Sb as mu,Tb as gu,Ub as Ya,Vb as hf,Vc as Qa,X as Wa,Xb as $e,Yb as Ge,Z as Uo,Za as pf,Zb as Ze,_a as Ti,_b as cc,a as te,aa as zn,ab as uf,ac as Yn,ad as Ye,b as cn,bc as X,cb as sc,cc as St,d as Yy,db as dr,dc as Rt,dd as Gi,e as Jg,ec as Qn,ed as Ar,f as cu,fa as sf,fb as w,fd as yf,ga as gt,gb as se,gc as dc,gd as om,hd as ve,jb as uu,jd as An,ka as Xt,l as Yh,ma as ha,mb as Te,mc as fu,n as tf,nb as lc,nc as _u,nd as mn,o as Qh,ob as nm,oc as yu,od as xf,p as du,pc,pd as xu,qc as uc,qd as Zi,r as $i,rc as hc,sc as Er,ta as ma,tb as ut,tc as Kt,ua as kt,ub as hu,uc as Ii,v as ef,va as Et,vb as im,vc as me,w as Jh,wa as ac,wb as qt,wc as en,wd as qn,x as wo,xa as lf,xb as j,xc as zr,yb as ue,yc as mf,z as pu,zb as Ie}from"./chunk-CTBW7U2D.js";var dm=Yy((lm,cm)=>{"use strict";(function(h,k){typeof lm=="object"&&typeof cm<"u"?cm.exports=k():typeof define=="function"&&define.amd?define(k):(h=typeof globalThis<"u"?globalThis:h||self,h.maplibregl=k())})(lm,function(){"use strict";var h={},k={};function n(d,a,z){if(k[d]=z,d==="index"){var J="var sharedModule = {}; ("+k.shared+")(sharedModule); ("+k.worker+")(sharedModule);",yt={};return k.shared(yt),k.index(h,yt),typeof window<"u"&&h.setWorkerUrl(window.URL.createObjectURL(new Blob([J],{type:"text/javascript"}))),h}}n("shared",["exports"],function(d){"use strict";function a(o,e,r,s){return new(r||(r=Promise))(function(u,f){function _(M){try{b(s.next(M))}catch(O){f(O)}}function x(M){try{b(s.throw(M))}catch(O){f(O)}}function b(M){var O;M.done?u(M.value):(O=M.value,O instanceof r?O:new r(function(T){T(O)})).then(_,x)}b((s=s.apply(o,e||[])).next())})}function z(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var J,yt;function ie(){if(yt)return J;function o(e,r){this.x=e,this.y=r}return yt=1,J=o,o.prototype={clone:function(){return new o(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,r){return this.clone()._rotateAround(e,r)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var r=e.x-this.x,s=e.y-this.y;return r*r+s*s},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,r){return Math.atan2(this.x*r-this.y*e,this.x*e+this.y*r)},_matMult:function(e){var r=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=r,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this}
1,_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var r=Math.cos(e),s=Math.sin(e),u=s*this.x+r*this.y;return this.x=r*this.x-s*this.y,this.y=u,this},_rotateAround:function(e,r){var s=Math.cos(e),u=Math.sin(e),f=r.y+u*(this.x-r.x)+s*(this.y-r.y);return this.x=r.x+s*(this.x-r.x)-u*(this.y-r.y),this.y=f,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(e){return e instanceof o?e:Array.isArray(e)?new o(e[0],e[1]):e},J}typeof SuppressedError=="function"&&SuppressedError;var ee,bt,ne=z(ie()),Ve=function(){if(bt)return ee;function o(e,r,s,u){this.cx=3*e,this.bx=3*(s-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*r,this.by=3*(u-r)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=r,this.p2x=s,this.p2y=u}return bt=1,ee=o,o.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,r){if(r===void 0&&(r=1e-6),e<0)return 0;if(e>1)return 1;for(var s=e,u=0;u<8;u++){var f=this.sampleCurveX(s)-e;if(Math.abs(f)<r)return s;var _=this.sampleCurveDerivativeX(s);if(Math.abs(_)<1e-6)break;s-=f/_}var x=0,b=1;for(s=e,u=0;u<20&&(f=this.sampleCurveX(s),!(Math.abs(f-e)<r));u++)e>f?x=s:b=s,s=.5*(b-x)+x;return s},solve:function(e,r){return this.sampleCurveY(this.solveCurveX(e,r))}},ee}(),tn=z(Ve);let _n,Dn;function hi(){return _n==null&&(_n=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),_n}function ri(){if(Dn==null&&(Dn=!1,hi())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let s=0;s<5*5;s++){let u=4*s;e.fillStyle=`rgb(${u},${u+1},${u+2})`,e.fillRect(s%5,Math.floor(s/5),1,1)}let r=e.getImageData(0,0,5,5).data;for(let s=0;s<5*5*4;s++)if(s%4!=3&&r[s]!==s){Dn=!0;break}}}return Dn||!1}var Fn=1e-6,Pn=typeof Float32Array<"u"?Float32Array:Array;function Po(){var o=new Pn(9);return Pn!=Float32Array&&(o[1]=0,o[2]=0,o[3]=0,o[5]=0,o[6]=0,o[7]=0),o[0]=1,o[4]=1,o[8]=1,o}function Rn(o){return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}function il(){var o=new Pn(3);return Pn!=Float32Array&&(o[0]=0,o[1]=0,o[2]=0),o}function ol(o){return Math.hypot(o[0],o[1],o[2])}function hr(o,e,r){var s=new Pn(3);return s[0]=o,s[1]=e,s[2]=r,s}Math.hypot||(Math.hypot=function(){for(var o=0,e=arguments.length;e--;)o+=arguments[e]*arguments[e];return Math.sqrt(o)});var Oo,co=ol;function bi(o,e,r){var s=e[0],u=e[1],f=e[2],_=e[3];return o[0]=r[0]*s+r[4]*u+r[8]*f+r[12]*_,o[1]=r[1]*s+r[5]*u+r[9]*f+r[13]*_,o[2]=r[2]*s+r[6]*u+r[10]*f+r[14]*_,o[3]=r[3]*s+r[7]*u+r[11]*f+r[15]*_,o}function ds(){var o=new Pn(4);return Pn!=Float32Array&&(o[0]=0,o[1]=0,o[2]=0),o[3]=1,o}function ya(){var o=new Pn(2);return Pn!=Float32Array&&(o[0]=0,o[1]=0),o}function ps(o,e){var r=new Pn(2);return r[0]=o,r[1]=e,r}il(),Oo=new Pn(4),Pn!=Float32Array&&(Oo[0]=0,Oo[1]=0,Oo[2]=0,Oo[3]=0),il(),hr(1,0,0),hr(0,1,0),ds(),ds(),Po(),ya();let hn=8192;function mr(o,e,r){return e*(hn/(o.tileSize*Math.pow(2,r-o.tileID.overscaledZ)))}function So(o,e){return(o%e+e)%e}function xa(o,e,r){return o*(1-r)+e*r}function po(o){if(o<=0)return 0;if(o>=1)return 1;let e=o*o,r=e*o;return 4*(o<.5?r:3*(o-e)+r-.75)}function rl(o,e,r,s){let u=new tn(o,e,r,s);return f=>u.solve(f)}let uo=rl(.25,.1,.25,1);function mi(o,e,r){return Math.min(r,Math.max(e,o))}function gr(o,e,r){let s=r-e,u=((o-e)%s+s)%s+e;return u===e?r:u}function qi(o,...e){for(let r of e)for(let s in r)o[s]=r[s];return o}let va=1;function Zr(o,e,r){let s={};for(let u in o)s[u]=e.call(this,o[u],u,o);return s}function us(o,e,r){let s={};for(let u in o)e.call(this,o[u],u,o)&&(s[u]=o[u]);return s}function Wi(o){return Array.isArray(o)?o.map(Wi):typeof o=="object"&&o?Zr(o,Wi):o}
1let Xi={};function Ei(o){Xi[o]||(typeof console<"u"&&console.warn(o),Xi[o]=!0)}function gn(o,e,r){return(r.y-o.y)*(e.x-o.x)>(e.y-o.y)*(r.x-o.x)}function To(o){return typeof WorkerGlobalScope<"u"&&o!==void 0&&o instanceof WorkerGlobalScope}let fr=null;function oo(o){return typeof ImageBitmap<"u"&&o instanceof ImageBitmap}let hs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function ms(o,e,r,s,u){return a(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let f=new VideoFrame(o,{timestamp:0});try{let _=f?.format;if(!_||!_.startsWith("BGR")&&!_.startsWith("RGB"))throw new Error(`Unrecognized format ${_}`);let x=_.startsWith("BGR"),b=new Uint8ClampedArray(s*u*4);if(yield f.copyTo(b,function(M,O,T,F,B){let N=4*Math.max(1,0),$=(Math.max(0,T)-T)*F*4+N,W=4*F,et=Math.max(0,O),mt=Math.max(0,T);return{rect:{x:et,y:mt,width:Math.min(M.width,O+F)-et,height:Math.min(M.height,T+B)-mt},layout:[{offset:$,stride:W}]}}(o,e,r,s,u)),x)for(let M=0;M<b.length;M+=4){let O=b[M];b[M]=b[M+2],b[M+2]=O}return b}finally{f.close()}})}let Ki,Io;function Hr(o,e,r,s){return o.addEventListener(e,r,s),{unsubscribe:()=>{o.removeEventListener(e,r,s)}}}function ko(o){return o/Math.PI*180}let gs={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},ba={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},Ca="AbortError";function qr(){return new Error(Ca)}let Eo={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function Wr(o){return Eo.REGISTERED_PROTOCOLS[o.substring(0,o.indexOf("://"))]}let Xo="global-dispatcher";class _r extends Error{constructor(e,r,s,u){super(`AJAXError: ${r} (${e}): ${s}`),this.status=e,this.statusText=r,this.url=s,this.body=u}}let zo=()=>To(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Ri=function(o,e){if(/:\/\//.test(o.url)&&!/^https?:|^file:/.test(o.url)){let s=Wr(o.url);if(s)return s(o,e);if(To(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:o,targetMapId:Xo},e)}if(!(/^file:/.test(r=o.url)||/^file:/.test(zo())&&!/^\w+:/.test(r))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(s,u){return a(this,void 0,void 0,function*(){let f=new Request(s.url,{method:s.method||"GET",body:s.body,credentials:s.credentials,headers:s.headers,cache:s.cache,referrer:zo(),signal:u.signal}),_,x;s.type!=="json"||f.headers.has("Accept")||f.headers.set("Accept","application/json");try{_=yield fetch(f)}catch(M){throw new _r(0,M.message,s.url,new Blob)}if(!_.ok){let M=yield _.blob();throw new _r(_.status,_.statusText,s.url,M)}x=s.type==="arrayBuffer"||s.type==="image"?_.arrayBuffer():s.type==="json"?_.json():_.text();let b=yield x;if(u.signal.aborted)throw qr();return{data:b,cacheControl:_.headers.get("Cache-Control"),expires:_.headers.get("Expires")}})}(o,e);if(To(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:o,mustQueue:!0,targetMapId:Xo},e)}var r;return function(s,u){return new Promise((f,_)=>{var x;let b=new XMLHttpRequest;b.open(s.method||"GET",s.url,!0),s.type!=="arrayBuffer"&&s.type!=="image"||(b.responseType="arraybuffer");for(let M in s.headers)b.setRequestHeader(M,s.headers[M]);s.type==="json"&&(b.responseType="text",!((x=s.headers)===null||x===void 0)&&x.Accept||b.setRequestHeader("Accept","application/json")),b.withCredentials=s.credentials==="include",b.onerror=()=>{_(new Error(b.statusText))},b.onload=()=>{if(!u.signal.aborted)if((b.status>=200&&b.status<300||b.status===0)&&b.response!==null){let M=b.response;if(s.type==="json")try{M=JSON.parse(b.response)}catch(O){return void _(O)}f({data:M,cacheControl:b.getResponseHeader("Cache-Control"),expires:b.getResponseHeader("Expires")})}else{let M=new Blob([b.response],{type:b.getResponseHeader("Content-Type")});_(new _r(b.status,b.statusText,s.url,M))}},u.signal.addEventListener("abort",()=>{b.abort(),_(qr())}),b.send(s.body)})}(o,e)};function Ko(o){if(!o||o.indexOf("://")<=0||o.indexOf("data:image/")===0||o.indexOf("blob:")===0)return!0;
1let e=new URL(o),r=window.location;return e.protocol===r.protocol&&e.host===r.host}function xt(o,e,r){r[o]&&r[o].indexOf(e)!==-1||(r[o]=r[o]||[],r[o].push(e))}function G(o,e,r){if(r&&r[o]){let s=r[o].indexOf(e);s!==-1&&r[o].splice(s,1)}}class Z{constructor(e,r={}){qi(this,r),this.type=e}}class K extends Z{constructor(e,r={}){super("error",qi({error:e},r))}}class at{on(e,r){return this._listeners=this._listeners||{},xt(e,r,this._listeners),{unsubscribe:()=>{this.off(e,r)}}}off(e,r){return G(e,r,this._listeners),G(e,r,this._oneTimeListeners),this}once(e,r){return r?(this._oneTimeListeners=this._oneTimeListeners||{},xt(e,r,this._oneTimeListeners),this):new Promise(s=>this.once(e,s))}fire(e,r){typeof e=="string"&&(e=new Z(e,r||{}));let s=e.type;if(this.listens(s)){e.target=this;let u=this._listeners&&this._listeners[s]?this._listeners[s].slice():[];for(let x of u)x.call(this,e);let f=this._oneTimeListeners&&this._oneTimeListeners[s]?this._oneTimeListeners[s].slice():[];for(let x of f)G(s,x,this._oneTimeListeners),x.call(this,e);let _=this._eventedParent;_&&(qi(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),_.fire(e))}else e instanceof K&&console.error(e.error);return this}listens(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)}setEventedParent(e,r){return this._eventedParent=e,this._eventedParentData=r,this}}var H
vendor: 31,102 bytes, line 1
1={$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"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},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:{},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_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"}},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_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"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},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:"number",default:335,minimum:0,maximum:359,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:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",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"}},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"}}};
1let _t=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Pt(o,e){let r={};for(let s in o)s!=="ref"&&(r[s]=o[s]);return _t.forEach(s=>{s in e&&(r[s]=e[s])}),r}function dt(o,e){if(Array.isArray(o)){if(!Array.isArray(e)||o.length!==e.length)return!1;for(let r=0;r<o.length;r++)if(!dt(o[r],e[r]))return!1;return!0}if(typeof o=="object"&&o!==null&&e!==null){if(typeof e!="object"||Object.keys(o).length!==Object.keys(e).length)return!1;for(let r in o)if(!dt(o[r],e[r]))return!1;return!0}return o===e}function Tt(o,e){o.push(e)}function At(o,e,r){Tt(r,{command:"addSource",args:[o,e[o]]})}function vt(o,e,r){Tt(e,{command:"removeSource",args:[o]}),r[o]=!0}function Gt(o,e,r,s){vt(o,r,s),At(o,e,r)}function re(o,e,r){let s;for(s in o[r])if(Object.prototype.hasOwnProperty.call(o[r],s)&&s!=="data"&&!dt(o[r][s],e[r][s]))return!1;for(s in e[r])if(Object.prototype.hasOwnProperty.call(e[r],s)&&s!=="data"&&!dt(o[r][s],e[r][s]))return!1;return!0}function ae(o,e,r,s,u,f){o=o||{},e=e||{};
1for(let _ in o)Object.prototype.hasOwnProperty.call(o,_)&&(dt(o[_],e[_])||r.push({command:f,args:[s,_,e[_],u]}));for(let _ in e)Object.prototype.hasOwnProperty.call(e,_)&&!Object.prototype.hasOwnProperty.call(o,_)&&(dt(o[_],e[_])||r.push({command:f,args:[s,_,e[_],u]}))}function Pe(o){return o.id}function Fe(o,e){return o[e.id]=e,o}class Ft{constructor(e,r,s,u){this.message=(e?`${e}: `:"")+s,u&&(this.identifier=u),r!=null&&r.__line__&&(this.line=r.__line__)}}function ke(o,...e){for(let r of e)for(let s in r)o[s]=r[s];return o}class Xe extends Error{constructor(e,r){super(r),this.message=r,this.key=e}}class sn{constructor(e,r=[]){this.parent=e,this.bindings={};for(let[s,u]of r)this.bindings[s]=u}concat(e){return new sn(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}let Ke={kind:"null"},jt={kind:"number"},pe={kind:"string"},we={kind:"boolean"},zi={kind:"color"},Ci={kind:"projectionDefinition"},On={kind:"object"},De={kind:"value"},fs={kind:"collator"},Xr={kind:"formatted"},al={kind:"padding"},yr={kind:"resolvedImage"},sl={kind:"variableAnchorOffsetCollection"};function ai(o,e){return{kind:"array",itemType:o,N:e}}function yn(o){if(o.kind==="array"){let e=yn(o.itemType);return typeof o.N=="number"?`array<${e}, ${o.N}>`:o.itemType.kind==="value"?"array":`array<${e}>`}return o.kind}let si=[Ke,jt,pe,we,zi,Ci,Xr,On,ai(De),al,yr,sl];function _s(o,e){if(e.kind==="error")return null;if(o.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!_s(o.itemType,e.itemType))&&(typeof o.N!="number"||o.N===e.N))return null}else{if(o.kind===e.kind)return null;if(o.kind==="value"){for(let r of si)if(!_s(r,e))return null}}return`Expected ${yn(o)} but found ${yn(e)} instead.`}function ll(o,e){return e.some(r=>r.kind===o.kind)}function ho(o,e){return e.some(r=>r==="null"?o===null:r==="array"?Array.isArray(o):r==="object"?o&&!Array.isArray(o)&&typeof o=="object":r===typeof o)}function Kr(o,e){return o.kind==="array"&&e.kind==="array"?o.itemType.kind===e.itemType.kind&&typeof o.N=="number":o.kind===e.kind}let Kd=.96422,Yd=.82521,Mc=4/29,wa=6/29,Pc=3*wa*wa,Vu=wa*wa*wa,ju=Math.PI/180,Uu=180/Math.PI;function Qd(o){return(o%=360)<0&&(o+=360),o}function Jd([o,e,r,s]){let u,f,_=Sc((.2225045*(o=Oc(o))+.7168786*(e=Oc(e))+.0606169*(r=Oc(r)))/1);o===e&&e===r?u=f=_:(u=Sc((.4360747*o+.3850649*e+.1430804*r)/Kd),f=Sc((.0139322*o+.0971045*e+.7141733*r)/Yd));let x=116*_-16;return[x<0?0:x,500*(u-_),200*(_-f),s]}function Oc(o){return o<=.04045?o/12.92:Math.pow((o+.055)/1.055,2.4)}function Sc(o){return o>Vu?Math.pow(o,1/3):o/Pc+Mc}function Tc([o,e,r,s]){let u=(o+16)/116,f=isNaN(e)?u:u+e/500,_=isNaN(r)?u:u-r/200;return u=1*Ic(u),f=Kd*Ic(f),_=Yd*Ic(_),[Yr(3.1338561*f-1.6168667*u-.4906146*_),Yr(-.9787684*f+1.9161415*u+.033454*_),Yr(.0719453*f-.2289914*u+1.4052427*_),s]}function Yr(o){return(o=o<=.00304?12.92*o:1.055*Math.pow(o,1/2.4)-.055)<0?0:o>1?1:o}function Ic(o){return o>wa?o*o*o:Pc*(o-Mc)}function cl(o){return parseInt(o.padEnd(2,o),16)/255}function Ma(o,e){return Pa(e?o/100:o,0,1)}function Pa(o,e,r){return Math.min(Math.max(e,o),r)}function tp(o){return!o.some(Number.isNaN)}let $u={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],ol
1ive:[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 Yo(o,e,r){return o+r*(e-o)}function Oa(o,e,r){return o.map((s,u)=>Yo(s,e[u],r))}class Ne{constructor(e,r,s,u=1,f=!0){this.r=e,this.g=r,this.b=s,this.a=u,f||(this.r*=u,this.g*=u,this.b*=u,u||this.overwriteGetter("rgb",[e,r,s,u]))}static parse(e){if(e instanceof Ne)return e;if(typeof e!="string")return;let r=function(s){if((s=s.toLowerCase().trim())==="transparent")return[0,0,0,0];let u=$u[s];if(u){let[_,x,b]=u;return[_/255,x/255,b/255,1]}if(s.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(s)){let _=s.length<6?1:2,x=1;return[cl(s.slice(x,x+=_)),cl(s.slice(x,x+=_)),cl(s.slice(x,x+=_)),cl(s.slice(x,x+_)||"ff")]}if(s.startsWith("rgb")){let _=s.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(_){let[x,b,M,O,T,F,B,N,$,W,et,mt]=_,ot=[O||" ",B||" ",W].join("");if(ot==="  "||ot==="  /"||ot===",,"||ot===",,,"){let R=[M,F,$].join(""),q=R==="%%%"?100:R===""?255:0;if(q){let st=[Pa(+b/q,0,1),Pa(+T/q,0,1),Pa(+N/q,0,1),et?Ma(+et,mt):1];if(tp(st))return st}}return}}let f=s.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(f){let[_,x,b,M,O,T,F,B,N]=f,$=[b||" ",O||" ",F].join("");if($==="  "||$==="  /"||$===",,"||$===",,,"){let W=[+x,Pa(+M,0,100),Pa(+T,0,100),B?Ma(+B,N):1];if(tp(W))return function([et,mt,ot,R]){function q(st){let wt=(st+et/30)%12,Zt=mt*Math.min(ot,1-ot);return ot-Zt*Math.max(-1,Math.min(wt-3,9-wt,1))}return et=Qd(et),mt/=100,ot/=100,[q(0),q(8),q(4),R]}(W)}}}(e);return r?new Ne(...r,!1):void 0}get rgb(){let{r:e,g:r,b:s,a:u}=this,f=u||1/0;return this.overwriteGetter("rgb",[e/f,r/f,s/f,u])}get hcl(){return this.overwriteGetter("hcl",function(e){let[r,s,u,f]=Jd(e),_=Math.sqrt(s*s+u*u);return[Math.round(1e4*_)?Qd(Math.atan2(u,s)*Uu):NaN,_,r,f]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Jd(this.rgb))}overwriteGetter(e,r){return Object.defineProperty(this,e,{value:r}),r}toString(){let[e,r,s,u]=this.rgb;return`rgba(${[e,r,s].map(f=>Math.round(255*f)).join(",")},${u})`}static interpolate(e,r,s,u="rgb"){switch(u){case"rgb":{let[f,_,x,b]=Oa(e.rgb,r.rgb,s);return new Ne(f,_,x,b,!1)}case"hcl":{let[f,_,x,b]=e.hcl,[M,O,T,F]=r.hcl,B,N;if(isNaN(f)||isNaN(M))isNaN(f)?isNaN(M)?B=NaN:(B=M,x!==1&&x!==0||(N=O)):(B=f,T!==1&&T!==0||(N=_));else{let ot=M-f;M>f&&ot>180?ot-=360:M<f&&f-M>180&&(ot+=360),B=f+s*ot}let[$,W,et,mt]=function([ot,R,q,st]){return ot=isNaN(ot)?0:ot*ju,Tc([q,Math.cos(ot)*R,Math.sin(ot)*R,st])}([B,N??Yo(_,O,s),Yo(x,T,s),Yo(b,F,s)]);return new Ne($,W,et,mt,!1)}case"lab":{let[f,_,x,b]=Tc(Oa(e.lab,r.lab,s));return new Ne(f,_,x,b,!1)}}}}Ne.black=new Ne(0,0,0,1),Ne.white=new Ne(1,1,1,1),Ne.transparent=new Ne(0,0,0,0),Ne.red=new Ne(1,0,0,1);class qe{constructor(e,r,s){this.sensitivity=e?r?"variant":"case":r?"accent":"base",this.locale=s,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,r){return this.collator.compare(e,r)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let Sa=["bottom","center","top"];class Ao{constructor(e,r,s,u,f,_){this.text=e,this.image=r,this.scale=s,this.fontStack=u,this.textColor=f,this.verticalAlign=_}}class Bi{constructor(e){this.sections=e}static fromString(e){return new Bi([new Ao(e,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof Bi?e:Bi.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}}class wi{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof wi)return e;if(typeof e=="number")return new wi([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(let r of e)if(typeof r!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new wi(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,r,s){return new wi(Oa(e.values,r.values,s))}}class Bn{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}let ys=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class gi{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof gi)return e;if(Array.isArray(e)&&!(e.length<1)&&e.length%2==0){for(let r=0;r<e.length;r+=2){let s=e[r],u=e[r+1];
1if(typeof s!="string"||!ys.has(s)||!Array.isArray(u)||u.length!==2||typeof u[0]!="number"||typeof u[1]!="number")return}return new gi(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,r,s){let u=e.values,f=r.values;if(u.length!==f.length)throw new Bn(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${r.toString()}`);let _=[];for(let x=0;x<u.length;x+=2){if(u[x]!==f[x])throw new Bn(`Cannot interpolate values containing mismatched anchors. from[${x}]: ${u[x]}, to[${x}]: ${f[x]}`);_.push(u[x]);let[b,M]=u[x+1],[O,T]=f[x+1];_.push([Yo(b,O,s),Yo(M,T,s)])}return new gi(_)}}class Yi{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new Yi({name:e,available:!1}):null}}class Ai{constructor(e,r,s){this.from=e,this.to=r,this.transition=s}static interpolate(e,r,s){return new Ai(e,r,s)}static parse(e){return e instanceof Ai?e:Array.isArray(e)&&e.length===3&&typeof e[0]=="string"&&typeof e[1]=="string"&&typeof e[2]=="number"?new Ai(e[0],e[1],e[2]):typeof e=="object"&&typeof e.from=="string"&&typeof e.to=="string"&&typeof e.transition=="number"?new Ai(e.from,e.to,e.transition):typeof e=="string"?new Ai(e,e,1):void 0}}function xr(o,e,r,s){return typeof o=="number"&&o>=0&&o<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof r=="number"&&r>=0&&r<=255?s===void 0||typeof s=="number"&&s>=0&&s<=1?null:`Invalid rgba value [${[o,e,r,s].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof s=="number"?[o,e,r,s]:[o,e,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function xs(o){if(o===null||typeof o=="string"||typeof o=="boolean"||typeof o=="number"||o instanceof Ai||o instanceof Ne||o instanceof qe||o instanceof Bi||o instanceof wi||o instanceof gi||o instanceof Yi)return!0;if(Array.isArray(o)){for(let e of o)if(!xs(e))return!1;return!0}if(typeof o=="object"){for(let e in o)if(!xs(o[e]))return!1;return!0}return!1}function Nn(o){if(o===null)return Ke;if(typeof o=="string")return pe;if(typeof o=="boolean")return we;if(typeof o=="number")return jt;if(o instanceof Ne)return zi;if(o instanceof Ai)return Ci;if(o instanceof qe)return fs;if(o instanceof Bi)return Xr;if(o instanceof wi)return al;if(o instanceof gi)return sl;if(o instanceof Yi)return yr;if(Array.isArray(o)){let e=o.length,r;for(let s of o){let u=Nn(s);if(r){if(r===u)continue;r=De;break}r=u}return ai(r||De,e)}return On}function Lo(o){let e=typeof o;return o===null?"":e==="string"||e==="number"||e==="boolean"?String(o):o instanceof Ne||o instanceof Ai||o instanceof Bi||o instanceof wi||o instanceof gi||o instanceof Yi?o.toString():JSON.stringify(o)}class vr{constructor(e,r){this.type=e,this.value=r}static parse(e,r){if(e.length!==2)return r.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!xs(e[1]))return r.error("invalid value");let s=e[1],u=Nn(s),f=r.expectedType;return u.kind!=="array"||u.N!==0||!f||f.kind!=="array"||typeof f.N=="number"&&f.N!==0||(u=f),new vr(u,s)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let vs={string:pe,number:jt,boolean:we,object:On};class ro{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let s,u=1,f=e[0];if(f==="array"){let x,b;if(e.length>2){let M=e[1];if(typeof M!="string"||!(M in vs)||M==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);x=vs[M],u++}else x=De;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return r.error('The length argument to "array" must be a positive integer literal',2);b=e[2],u++}s=ai(x,b)}else{if(!vs[f])throw new Error(`Types doesn't contain name = ${f}`);s=vs[f]}let _=[];for(;u<e.length;u++){let x=r.parse(e[u],u,De);if(!x)return null;_.push(x)}return new ro(s,_)}evaluate(e){for(let r=0;r<this.args.length;r++){let s=this.args[r].evaluate(e);if(!_s(this.type,Nn(s)))return s;if(r===this.args.length-1)throw new Bn(`Expected value to be of type ${yn(this.type)}, but found ${yn(Nn(s))} instead.`)}throw new Error}
1eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}let bs={"to-boolean":we,"to-color":zi,"to-number":jt,"to-string":pe};class nn{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let s=e[0];if(!bs[s])throw new Error(`Can't parse ${s} as it is not part of the known types`);if((s==="to-boolean"||s==="to-string")&&e.length!==2)return r.error("Expected one argument.");let u=bs[s],f=[];for(let _=1;_<e.length;_++){let x=r.parse(e[_],_,De);if(!x)return null;f.push(x)}return new nn(u,f)}evaluate(e){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(e);case"color":{let r,s;for(let u of this.args){if(r=u.evaluate(e),s=null,r instanceof Ne)return r;if(typeof r=="string"){let f=e.parseColor(r);if(f)return f}else if(Array.isArray(r)&&(s=r.length<3||r.length>4?`Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:xr(r[0],r[1],r[2],r[3]),!s))return new Ne(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new Bn(s||`Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"padding":{let r;for(let s of this.args){r=s.evaluate(e);let u=wi.parse(r);if(u)return u}throw new Bn(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"variableAnchorOffsetCollection":{let r;for(let s of this.args){r=s.evaluate(e);let u=gi.parse(r);if(u)return u}throw new Bn(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"number":{let r=null;for(let s of this.args){if(r=s.evaluate(e),r===null)return 0;let u=Number(r);if(!isNaN(u))return u}throw new Bn(`Could not convert ${JSON.stringify(r)} to number.`)}case"formatted":return Bi.fromString(Lo(this.args[0].evaluate(e)));case"resolvedImage":return Yi.fromString(Lo(this.args[0].evaluate(e)));case"projectionDefinition":return this.args[0].evaluate(e);default:return Lo(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}let kc=["Unknown","Point","LineString","Polygon"];class Qe{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},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"?kc[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(e){let r=this._parseColorCache[e];return r||(r=this._parseColorCache[e]=Ne.parse(e)),r}}class Re{constructor(e,r,s=[],u,f=new sn,_=[]){this.registry=e,this.path=s,this.key=s.map(x=>`[${x}]`).join(""),this.scope=f,this.errors=_,this.expectedType=u,this._isConstant=r}parse(e,r,s,u,f={}){return r?this.concat(r,s,u)._parse(e,f):this._parse(e,f)}_parse(e,r){function s(u,f,_){return _==="assert"?new ro(f,[u]):_==="coerce"?new nn(f,[u]):u}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let u=e[0];if(typeof u!="string")return this.error(`Expression name must be a string, but found ${typeof u} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let f=this.registry[u];if(f){let _=f.parse(e,this);if(!_)return null;if(this.expectedType){let x=this.expectedType,b=_.type;if(x.kind!=="string"&&x.kind!=="number"&&x.kind!=="boolean"&&x.kind!=="object"&&x.kind!=="array"||b.kind!=="value")if(x.kind!=="projectionDefinition"||b.kind!=="string"&&b.kind!=="array")if(x.kind!=="color"&&x.kind!=="formatted"&&x.kind!=="resolvedImage"||b.kind!=="value"&&b.kind!=="string")if(x.kind!=="padding"||b.kind!=="value"&&b.kind!=="number"&&b.kind!=="array")if(x.kind!=="variableAnchorOffsetCollection"||b.kind!=="value"&&b.kind!=="array"){if(this.checkSubtype(x,b))return null}else _=s(_,x,r.typeAnnotation||"coerce");else _=s(_,x,r.typeAnnotation||"coerce");else _=s(_,x,r.typeAnnotation||"coerce");else _=s(_,x,r.typeAnnotation||"coerce");else _=s(_,x,r.typeAnnotation||"assert")}if(!(_ instanceof vr)&&_.type.kind!=="resolvedImage"&&this._isConstant(_)){let x=new Qe;try{_=new vr(_.type,_.evaluate(x))}catch(b){return this.error(b.message),null}}return _}return this.error(`Unknown expression "${u}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,r,s){let u=typeof e=="number"?this.path.concat(e):this.path,f=s?this.scope.concat(s):this.scope;return new Re(this.registry,this._isConstant,u,r||null,f,this.errors)}error(e,...r){let s=`${this.key}${r.map(u=>`[${u}]`).join("")}`;this.errors.push(new Xe(s,e))}checkSubtype(e,r){let s=_s(e,r);return s&&this.error(s),s}}class Ta{constructor(e,r){this.type=r.type,this.bindings=[].concat(e),this.result=r}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let r of this.bindings)e(r[1]);e(this.result)}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);let s=[];for(let f=1;f<e.length-1;f+=2){let _=e[f];if(typeof _!="string")return r.error(`Expected string, but found ${typeof _} instead.`,f);if(/[^a-zA-Z0-9_]/.test(_))return r.error("Variable names must contain only alphanumeric characters or '_'.",f);let x=r.parse(e[f+1],f+1);if(!x)return null;s.push([_,x])}let u=r.parse(e[e.length-1],e.length-1,r.expectedType,s);return u?new Ta(s,u):null}outputDefined(){return this.result.outputDefined()}}class We{constructor(e,r){this.type=r.type,this.name=e,this.boundExpression=r}
1static parse(e,r){if(e.length!==2||typeof e[1]!="string")return r.error("'var' expression requires exactly one string literal argument.");let s=e[1];return r.scope.has(s)?new We(s,r.scope.get(s)):r.error(`Unknown variable "${s}". Make sure "${s}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}}class Cs{constructor(e,r,s){this.type=e,this.index=r,this.input=s}static parse(e,r){if(e.length!==3)return r.error(`Expected 2 arguments, but found ${e.length-1} instead.`);let s=r.parse(e[1],1,jt),u=r.parse(e[2],2,ai(r.expectedType||De));return s&&u?new Cs(u.type.itemType,s,u):null}evaluate(e){let r=this.index.evaluate(e),s=this.input.evaluate(e);if(r<0)throw new Bn(`Array index out of bounds: ${r} < 0.`);if(r>=s.length)throw new Bn(`Array index out of bounds: ${r} > ${s.length-1}.`);if(r!==Math.floor(r))throw new Bn(`Array index must be an integer, but found ${r} instead.`);return s[r]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}}class mo{constructor(e,r){this.type=we,this.needle=e,this.haystack=r}static parse(e,r){if(e.length!==3)return r.error(`Expected 2 arguments, but found ${e.length-1} instead.`);let s=r.parse(e[1],1,De),u=r.parse(e[2],2,De);return s&&u?ll(s.type,[we,pe,jt,Ke,De])?new mo(s,u):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${yn(s.type)} instead`):null}evaluate(e){let r=this.needle.evaluate(e),s=this.haystack.evaluate(e);if(!s)return!1;if(!ho(r,["boolean","string","number","null"]))throw new Bn(`Expected first argument to be of type boolean, string, number or null, but found ${yn(Nn(r))} instead.`);if(!ho(s,["string","array"]))throw new Bn(`Expected second argument to be of type array or string, but found ${yn(Nn(s))} instead.`);return s.indexOf(r)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}}class Ia{constructor(e,r,s){this.type=jt,this.needle=e,this.haystack=r,this.fromIndex=s}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);let s=r.parse(e[1],1,De),u=r.parse(e[2],2,De);if(!s||!u)return null;if(!ll(s.type,[we,pe,jt,Ke,De]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${yn(s.type)} instead`);if(e.length===4){let f=r.parse(e[3],3,jt);return f?new Ia(s,u,f):null}return new Ia(s,u)}evaluate(e){let r=this.needle.evaluate(e),s=this.haystack.evaluate(e);if(!ho(r,["boolean","string","number","null"]))throw new Bn(`Expected first argument to be of type boolean, string, number or null, but found ${yn(Nn(r))} instead.`);let u;if(this.fromIndex&&(u=this.fromIndex.evaluate(e)),ho(s,["string"])){let f=s.indexOf(r,u);return f===-1?-1:[...s.slice(0,f)].length}if(ho(s,["array"]))return s.indexOf(r,u);throw new Bn(`Expected second argument to be of type array or string, but found ${yn(Nn(s))} instead.`)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}}class dl{constructor(e,r,s,u,f,_){this.inputType=e,this.type=r,this.input=s,this.cases=u,this.outputs=f,this.otherwise=_}static parse(e,r){if(e.length<5)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return r.error("Expected an even number of arguments.");let s,u;r.expectedType&&r.expectedType.kind!=="value"&&(u=r.expectedType);let f={},_=[];for(let M=2;M<e.length-1;M+=2){let O=e[M],T=e[M+1];Array.isArray(O)||(O=[O]);let F=r.concat(M);if(O.length===0)return F.error("Expected at least one branch label.");for(let N of O){if(typeof N!="number"&&typeof N!="string")return F.error("Branch labels must be numbers or strings.");if(typeof N=="number"&&Math.abs(N)>Number.MAX_SAFE_INTEGER)return F.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof N=="number"&&Math.floor(N)!==N)return F.error("Numeric branch labels must be integer values.");if(s){if(F.checkSubtype(s,Nn(N)))return null}else s=Nn(N);if(f[String(N)]!==void 0)return F.error("Branch labels must be unique.");f[String(N)]=_.length}let B=r.parse(T,M,u);if(!B)return null;u=u||B.type,_.push(B)}let x=r.parse(e[1],1,De);if(!x)return null;let b=r.parse(e[e.length-1],e.length-1,u);return b?x.type.kind!=="value"&&r.concat(1).checkSubtype(s,x.type)?null:new dl(s,u,x,f,_,b):null}evaluate(e){let r=this.input.evaluate(e);return(Nn(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(e)}
1eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}}class pl{constructor(e,r,s){this.type=e,this.branches=r,this.otherwise=s}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return r.error("Expected an odd number of arguments.");let s;r.expectedType&&r.expectedType.kind!=="value"&&(s=r.expectedType);let u=[];for(let _=1;_<e.length-1;_+=2){let x=r.parse(e[_],_,we);if(!x)return null;let b=r.parse(e[_+1],_+1,s);if(!b)return null;u.push([x,b]),s=s||b.type}let f=r.parse(e[e.length-1],e.length-1,s);if(!f)return null;if(!s)throw new Error("Can't infer output type");return new pl(s,u,f)}evaluate(e){for(let[r,s]of this.branches)if(r.evaluate(e))return s.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(let[r,s]of this.branches)e(r),e(s);e(this.otherwise)}outputDefined(){return this.branches.every(([e,r])=>r.outputDefined())&&this.otherwise.outputDefined()}}class ka{constructor(e,r,s,u){this.type=e,this.input=r,this.beginIndex=s,this.endIndex=u}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);let s=r.parse(e[1],1,De),u=r.parse(e[2],2,jt);if(!s||!u)return null;if(!ll(s.type,[ai(De),pe,De]))return r.error(`Expected first argument to be of type array or string, but found ${yn(s.type)} instead`);if(e.length===4){let f=r.parse(e[3],3,jt);return f?new ka(s.type,s,u,f):null}return new ka(s.type,s,u)}evaluate(e){let r=this.input.evaluate(e),s=this.beginIndex.evaluate(e),u;if(this.endIndex&&(u=this.endIndex.evaluate(e)),ho(r,["string"]))return[...r].slice(s,u).join("");if(ho(r,["array"]))return r.slice(s,u);throw new Bn(`Expected first argument to be of type array or string, but found ${yn(Nn(r))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}}function ws(o,e){let r=o.length-1,s,u,f=0,_=r,x=0;for(;f<=_;)if(x=Math.floor((f+_)/2),s=o[x],u=o[x+1],s<=e){if(x===r||e<u)return x;f=x+1}else{if(!(s>e))throw new Bn("Input is not a number.");_=x-1}return 0}class Ms{constructor(e,r,s){this.type=e,this.input=r,this.labels=[],this.outputs=[];for(let[u,f]of s)this.labels.push(u),this.outputs.push(f)}static parse(e,r){if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");let s=r.parse(e[1],1,jt);if(!s)return null;let u=[],f=null;r.expectedType&&r.expectedType.kind!=="value"&&(f=r.expectedType);for(let _=1;_<e.length;_+=2){let x=_===1?-1/0:e[_],b=e[_+1],M=_,O=_+1;if(typeof x!="number")return r.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',M);if(u.length&&u[u.length-1][0]>=x)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',M);let T=r.parse(b,O,f);if(!T)return null;f=f||T.type,u.push([x,T])}return new Ms(f,s,u)}evaluate(e){let r=this.labels,s=this.outputs;if(r.length===1)return s[0].evaluate(e);let u=this.input.evaluate(e);if(u<=r[0])return s[0].evaluate(e);let f=r.length;return u>=r[f-1]?s[f-1].evaluate(e):s[ws(r,u)].evaluate(e)}eachChild(e){e(this.input);for(let r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function ep(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var ul,Ea,Mi=function(){if(Ea)return ul;function o(e,r,s,u){this.cx=3*e,this.bx=3*(s-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*r,this.by=3*(u-r)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=r,this.p2x=s,this.p2y=u}return Ea=1,ul=o,o.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,r){if(r===void 0&&(r=1e-6),e<0)return 0;if(e>1)return 1;for(var s=e,u=0;u<8;u++){var f=this.sampleCurveX(s)-e;if(Math.abs(f)<r)return s;var _=this.sampleCurveDerivativeX(s);
1if(Math.abs(_)<1e-6)break;s-=f/_}var x=0,b=1;for(s=e,u=0;u<20&&(f=this.sampleCurveX(s),!(Math.abs(f-e)<r));u++)e>f?x=s:b=s,s=.5*(b-x)+x;return s},solve:function(e,r){return this.sampleCurveY(this.solveCurveX(e,r))}},ul}(),hl=ep(Mi);class Ni{constructor(e,r,s,u,f){this.type=e,this.operator=r,this.interpolation=s,this.input=u,this.labels=[],this.outputs=[];for(let[_,x]of f)this.labels.push(_),this.outputs.push(x)}static interpolationFactor(e,r,s,u){let f=0;if(e.name==="exponential")f=za(r,e.base,s,u);else if(e.name==="linear")f=za(r,1,s,u);else if(e.name==="cubic-bezier"){let _=e.controlPoints;f=new hl(_[0],_[1],_[2],_[3]).solve(za(r,1,s,u))}return f}static parse(e,r){let[s,u,f,..._]=e;if(!Array.isArray(u)||u.length===0)return r.error("Expected an interpolation type expression.",1);if(u[0]==="linear")u={name:"linear"};else if(u[0]==="exponential"){let M=u[1];if(typeof M!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);u={name:"exponential",base:M}}else{if(u[0]!=="cubic-bezier")return r.error(`Unknown interpolation type ${String(u[0])}`,1,0);{let M=u.slice(1);if(M.length!==4||M.some(O=>typeof O!="number"||O<0||O>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);u={name:"cubic-bezier",controlPoints:M}}}if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(f=r.parse(f,2,jt),!f)return null;let x=[],b=null;s==="interpolate-hcl"||s==="interpolate-lab"?b=zi:r.expectedType&&r.expectedType.kind!=="value"&&(b=r.expectedType);for(let M=0;M<_.length;M+=2){let O=_[M],T=_[M+1],F=M+3,B=M+4;if(typeof O!="number")return r.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',F);if(x.length&&x[x.length-1][0]>=O)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',F);let N=r.parse(T,B,b);if(!N)return null;b=b||N.type,x.push([O,N])}return Kr(b,jt)||Kr(b,Ci)||Kr(b,zi)||Kr(b,al)||Kr(b,sl)||Kr(b,ai(jt))?new Ni(b,s,u,f,x):r.error(`Type ${yn(b)} is not interpolatable.`)}evaluate(e){let r=this.labels,s=this.outputs;if(r.length===1)return s[0].evaluate(e);let u=this.input.evaluate(e);if(u<=r[0])return s[0].evaluate(e);let f=r.length;if(u>=r[f-1])return s[f-1].evaluate(e);let _=ws(r,u),x=Ni.interpolationFactor(this.interpolation,u,r[_],r[_+1]),b=s[_].evaluate(e),M=s[_+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return Yo(b,M,x);case"color":return Ne.interpolate(b,M,x);case"padding":return wi.interpolate(b,M,x);case"variableAnchorOffsetCollection":return gi.interpolate(b,M,x);case"array":return Oa(b,M,x);case"projectionDefinition":return Ai.interpolate(b,M,x)}case"interpolate-hcl":return Ne.interpolate(b,M,x,"hcl");case"interpolate-lab":return Ne.interpolate(b,M,x,"lab")}}eachChild(e){e(this.input);for(let r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function za(o,e,r,s){let u=s-r,f=o-r;return u===0?0:e===1?f/u:(Math.pow(e,f)-1)/(Math.pow(e,u)-1)}let fn={color:Ne.interpolate,number:Yo,padding:wi.interpolate,variableAnchorOffsetCollection:gi.interpolate,array:Oa};class Ps{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let s=null,u=r.expectedType;u&&u.kind!=="value"&&(s=u);let f=[];for(let x of e.slice(1)){let b=r.parse(x,1+f.length,s,void 0,{typeAnnotation:"omit"});if(!b)return null;s=s||b.type,f.push(b)}if(!s)throw new Error("No output type");let _=u&&f.some(x=>_s(u,x.type));return new Ps(_?De:s,f)}evaluate(e){let r,s=null,u=0;for(let f of this.args)if(u++,s=f.evaluate(e),s&&s instanceof Yi&&!s.available&&(r||(r=s.name),s=null,u===this.args.length&&(s=r)),s!==null)break;return s}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}function ml(o,e){return o==="=="||o==="!="?e.kind==="boolean"||e.kind==="str
1ing"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function Ec(o,e,r,s){return s.compare(e,r)===0}function Aa(o,e,r){let s=o!=="=="&&o!=="!=";return class o_{constructor(f,_,x){this.type=we,this.lhs=f,this.rhs=_,this.collator=x,this.hasUntypedArgument=f.type.kind==="value"||_.type.kind==="value"}static parse(f,_){if(f.length!==3&&f.length!==4)return _.error("Expected two or three arguments.");let x=f[0],b=_.parse(f[1],1,De);if(!b)return null;if(!ml(x,b.type))return _.concat(1).error(`"${x}" comparisons are not supported for type '${yn(b.type)}'.`);let M=_.parse(f[2],2,De);if(!M)return null;if(!ml(x,M.type))return _.concat(2).error(`"${x}" comparisons are not supported for type '${yn(M.type)}'.`);if(b.type.kind!==M.type.kind&&b.type.kind!=="value"&&M.type.kind!=="value")return _.error(`Cannot compare types '${yn(b.type)}' and '${yn(M.type)}'.`);s&&(b.type.kind==="value"&&M.type.kind!=="value"?b=new ro(M.type,[b]):b.type.kind!=="value"&&M.type.kind==="value"&&(M=new ro(b.type,[M])));let O=null;if(f.length===4){if(b.type.kind!=="string"&&M.type.kind!=="string"&&b.type.kind!=="value"&&M.type.kind!=="value")return _.error("Cannot use collator to compare non-string types.");if(O=_.parse(f[3],3,fs),!O)return null}return new o_(b,M,O)}evaluate(f){let _=this.lhs.evaluate(f),x=this.rhs.evaluate(f);if(s&&this.hasUntypedArgument){let b=Nn(_),M=Nn(x);if(b.kind!==M.kind||b.kind!=="string"&&b.kind!=="number")throw new Bn(`Expected arguments for "${o}" to be (string, string) or (number, number), but found (${b.kind}, ${M.kind}) instead.`)}if(this.collator&&!s&&this.hasUntypedArgument){let b=Nn(_),M=Nn(x);if(b.kind!=="string"||M.kind!=="string")return e(f,_,x)}return this.collator?r(f,_,x,this.collator.evaluate(f)):e(f,_,x)}eachChild(f){f(this.lhs),f(this.rhs),this.collator&&f(this.collator)}outputDefined(){return!0}}}let gl=Aa("==",function(o,e,r){return e===r},Ec),zc=Aa("!=",function(o,e,r){return e!==r},function(o,e,r,s){return!Ec(0,e,r,s)}),Gu=Aa("<",function(o,e,r){return e<r},function(o,e,r,s){return s.compare(e,r)<0}),fl=Aa(">",function(o,e,r){return e>r},function(o,e,r,s){return s.compare(e,r)>0}),_l=Aa("<=",function(o,e,r){return e<=r},function(o,e,r,s){return s.compare(e,r)<=0}),go=Aa(">=",function(o,e,r){return e>=r},function(o,e,r,s){return s.compare(e,r)>=0});class Os{constructor(e,r,s){this.type=fs,this.locale=s,this.caseSensitive=e,this.diacriticSensitive=r}static parse(e,r){if(e.length!==2)return r.error("Expected one argument.");let s=e[1];if(typeof s!="object"||Array.isArray(s))return r.error("Collator options argument must be an object.");let u=r.parse(s["case-sensitive"]!==void 0&&s["case-sensitive"],1,we);if(!u)return null;let f=r.parse(s["diacritic-sensitive"]!==void 0&&s["diacritic-sensitive"],1,we);if(!f)return null;let _=null;return s.locale&&(_=r.parse(s.locale,1,pe),!_)?null:new Os(u,f,_)}evaluate(e){return new qe(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}class La{constructor(e,r,s,u,f){this.type=pe,this.number=e,this.locale=r,this.currency=s,this.minFractionDigits=u,this.maxFractionDigits=f}static parse(e,r){if(e.length!==3)return r.error("Expected two arguments.");let s=r.parse(e[1],1,jt);if(!s)return null;let u=e[2];if(typeof u!="object"||Array.isArray(u))return r.error("NumberFormat options argument must be an object.");let f=null;if(u.locale&&(f=r.parse(u.locale,1,pe),!f))return null;let _=null;if(u.currency&&(_=r.parse(u.currency,1,pe),!_))return null;let x=null;if(u["min-fraction-digits"]&&(x=r.parse(u["min-fraction-digits"],1,jt),!x))return null;let b=null;return u["max-fraction-digits"]&&(b=r.parse(u["max-fraction-digits"],1,jt),!b)?null:new La(s,f,_,x,b)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}}class yl{constructor(e){this.type=Xr,this.sections=e}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let s=e[1];if(!Array.isArray(s)&&typeof s=="object")return r.error("First argument must be an image or text section.");let u=[],f=!1;for(let _=1;_<=e.length-1;++_){let x=e[_];
1if(f&&typeof x=="object"&&!Array.isArray(x)){f=!1;let b=null;if(x["font-scale"]&&(b=r.parse(x["font-scale"],1,jt),!b))return null;let M=null;if(x["text-font"]&&(M=r.parse(x["text-font"],1,ai(pe)),!M))return null;let O=null;if(x["text-color"]&&(O=r.parse(x["text-color"],1,zi),!O))return null;let T=null;if(x["vertical-align"]){if(typeof x["vertical-align"]=="string"&&!Sa.includes(x["vertical-align"]))return r.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${x["vertical-align"]}' instead.`);if(T=r.parse(x["vertical-align"],1,pe),!T)return null}let F=u[u.length-1];F.scale=b,F.font=M,F.textColor=O,F.verticalAlign=T}else{let b=r.parse(e[_],1,De);if(!b)return null;let M=b.type.kind;if(M!=="string"&&M!=="value"&&M!=="null"&&M!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");f=!0,u.push({content:b,scale:null,font:null,textColor:null,verticalAlign:null})}}return new yl(u)}evaluate(e){return new Bi(this.sections.map(r=>{let s=r.content.evaluate(e);return Nn(s)===yr?new Ao("",s,null,null,null,r.verticalAlign?r.verticalAlign.evaluate(e):null):new Ao(Lo(s),null,r.scale?r.scale.evaluate(e):null,r.font?r.font.evaluate(e).join(","):null,r.textColor?r.textColor.evaluate(e):null,r.verticalAlign?r.verticalAlign.evaluate(e):null)}))}eachChild(e){for(let r of this.sections)e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor),r.verticalAlign&&e(r.verticalAlign)}outputDefined(){return!1}}class Ss{constructor(e){this.type=yr,this.input=e}static parse(e,r){if(e.length!==2)return r.error("Expected two arguments.");let s=r.parse(e[1],1,pe);return s?new Ss(s):r.error("No image name provided.")}evaluate(e){let r=this.input.evaluate(e),s=Yi.fromString(r);return s&&e.availableImages&&(s.available=e.availableImages.indexOf(r)>-1),s}eachChild(e){e(this.input)}outputDefined(){return!1}}class Ac{constructor(e){this.type=jt,this.input=e}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);let s=r.parse(e[1],1);return s?s.type.kind!=="array"&&s.type.kind!=="string"&&s.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${yn(s.type)} instead.`):new Ac(s):null}evaluate(e){let r=this.input.evaluate(e);if(typeof r=="string")return[...r].length;if(Array.isArray(r))return r.length;throw new Bn(`Expected value to be of type string or array, but found ${yn(Nn(r))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}}let Do=8192;function Zu(o,e){let r=(180+o[0])/360,s=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+o[1]*Math.PI/360)))/360,u=Math.pow(2,e.z);return[Math.round(r*u*Do),Math.round(s*u*Do)]}function Lc(o,e){let r=Math.pow(2,e.z);return[(u=(o[0]/Do+e.x)/r,360*u-180),(s=(o[1]/Do+e.y)/r,360/Math.PI*Math.atan(Math.exp((180-360*s)*Math.PI/180))-90)];var s,u}function br(o,e){o[0]=Math.min(o[0],e[0]),o[1]=Math.min(o[1],e[1]),o[2]=Math.max(o[2],e[0]),o[3]=Math.max(o[3],e[1])}function Ts(o,e){return!(o[0]<=e[0]||o[2]>=e[2]||o[1]<=e[1]||o[3]>=e[3])}function np(o,e,r){let s=o[0]-e[0],u=o[1]-e[1],f=o[0]-r[0],_=o[1]-r[1];return s*_-f*u==0&&s*f<=0&&u*_<=0}function Is(o,e,r,s){return(u=[s[0]-r[0],s[1]-r[1]])[0]*(f=[e[0]-o[0],e[1]-o[1]])[1]-u[1]*f[0]!=0&&!(!op(o,e,r,s)||!op(r,s,o,e));var u,f}function Hu(o,e,r){for(let s of r)for(let u=0;u<s.length-1;++u)if(Is(o,e,s[u],s[u+1]))return!0;return!1}function Qr(o,e,r=!1){let s=!1;for(let x of e)for(let b=0;b<x.length-1;b++){if(np(o,x[b],x[b+1]))return r;(f=x[b])[1]>(u=o)[1]!=(_=x[b+1])[1]>u[1]&&u[0]<(_[0]-f[0])*(u[1]-f[1])/(_[1]-f[1])+f[0]&&(s=!s)}var u,f,_;return s}function qu(o,e){for(let r of e)if(Qr(o,r))return!0;return!1}function ip(o,e){for(let r of o)if(!Qr(r,e))return!1;for(let r=0;r<o.length-1;++r)if(Hu(o[r],o[r+1],e))return!1;return!0}function Wu(o,e){for(let r of e)if(ip(o,r))return!0;return!1}function op(o,e,r,s){let u=s[0]-r[0],f=s[1]-r[1],_=(o[0]-r[0])*f-u*(o[1]-r[1]),x=(e[0]-r[0])*f-u*(e[1]-r[1]);return _>0&&x<0||_<0&&x>0}function Dc(o,e,r){let s=[];for(let u=0;u<o.length;u++){let f=[];for(let _=0;_<o[u].length;_++){let x=Zu(o[u][_],r);br(e,x),f.push(x)}s.push(f)}return s}function Fc(o,e,r){let s=[];for(let u=0;u<o.length;u++){let f=Dc(o[u],e,r);s.push(f)}return s}
1function Rc(o,e,r,s){if(o[0]<r[0]||o[0]>r[2]){let u=.5*s,f=o[0]-r[0]>u?-s:r[0]-o[0]>u?s:0;f===0&&(f=o[0]-r[2]>u?-s:r[2]-o[0]>u?s:0),o[0]+=f}br(e,o)}function Bc(o,e,r,s){let u=Math.pow(2,s.z)*Do,f=[s.x*Do,s.y*Do],_=[];for(let x of o)for(let b of x){let M=[b.x+f[0],b.y+f[1]];Rc(M,e,r,u),_.push(M)}return _}function rp(o,e,r,s){let u=Math.pow(2,s.z)*Do,f=[s.x*Do,s.y*Do],_=[];for(let b of o){let M=[];for(let O of b){let T=[O.x+f[0],O.y+f[1]];br(e,T),M.push(T)}_.push(M)}if(e[2]-e[0]<=u/2){(x=e)[0]=x[1]=1/0,x[2]=x[3]=-1/0;for(let b of _)for(let M of b)Rc(M,e,r,u)}var x;return _}class Jr{constructor(e,r){this.type=we,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(xs(e[1])){let s=e[1];if(s.type==="FeatureCollection"){let u=[];for(let f of s.features){let{type:_,coordinates:x}=f.geometry;_==="Polygon"&&u.push(x),_==="MultiPolygon"&&u.push(...x)}if(u.length)return new Jr(s,{type:"MultiPolygon",coordinates:u})}else if(s.type==="Feature"){let u=s.geometry.type;if(u==="Polygon"||u==="MultiPolygon")return new Jr(s,s.geometry)}else if(s.type==="Polygon"||s.type==="MultiPolygon")return new Jr(s,s)}return r.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return function(r,s){let u=[1/0,1/0,-1/0,-1/0],f=[1/0,1/0,-1/0,-1/0],_=r.canonicalID();if(s.type==="Polygon"){let x=Dc(s.coordinates,f,_),b=Bc(r.geometry(),u,f,_);if(!Ts(u,f))return!1;for(let M of b)if(!Qr(M,x))return!1}if(s.type==="MultiPolygon"){let x=Fc(s.coordinates,f,_),b=Bc(r.geometry(),u,f,_);if(!Ts(u,f))return!1;for(let M of b)if(!qu(M,x))return!1}return!0}(e,this.geometries);if(e.geometryType()==="LineString")return function(r,s){let u=[1/0,1/0,-1/0,-1/0],f=[1/0,1/0,-1/0,-1/0],_=r.canonicalID();if(s.type==="Polygon"){let x=Dc(s.coordinates,f,_),b=rp(r.geometry(),u,f,_);if(!Ts(u,f))return!1;for(let M of b)if(!ip(M,x))return!1}if(s.type==="MultiPolygon"){let x=Fc(s.coordinates,f,_),b=rp(r.geometry(),u,f,_);if(!Ts(u,f))return!1;for(let M of b)if(!Wu(M,x))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let ap=class{constructor(o=[],e=(r,s)=>r<s?-1:r>s?1:0){if(this.data=o,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(o){this.data.push(o),this._up(this.length++)}pop(){if(this.length===0)return;let o=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),o}peek(){return this.data[0]}_up(o){let{data:e,compare:r}=this,s=e[o];for(;o>0;){let u=o-1>>1,f=e[u];if(r(s,f)>=0)break;e[o]=f,o=u}e[o]=s}_down(o){let{data:e,compare:r}=this,s=this.length>>1,u=e[o];for(;o<s;){let f=1+(o<<1),_=f+1;if(_<this.length&&r(e[_],e[f])<0&&(f=_),r(e[f],u)>=0)break;e[o]=e[f],o=f}e[o]=u}};function xl(o,e,r=0,s=o.length-1,u=Xu){for(;s>r;){if(s-r>600){let b=s-r+1,M=e-r+1,O=Math.log(b),T=.5*Math.exp(2*O/3),F=.5*Math.sqrt(O*T*(b-T)/b)*(M-b/2<0?-1:1);xl(o,e,Math.max(r,Math.floor(e-M*T/b+F)),Math.min(s,Math.floor(e+(b-M)*T/b+F)),u)}let f=o[e],_=r,x=s;for(ks(o,r,e),u(o[s],f)>0&&ks(o,r,s);_<x;){for(ks(o,_,x),_++,x--;u(o[_],f)<0;)_++;for(;u(o[x],f)>0;)x--}u(o[r],f)===0?ks(o,r,x):(x++,ks(o,x,s)),x<=e&&(r=x+1),e<=x&&(s=x-1)}}function ks(o,e,r){let s=o[e];o[e]=o[r],o[r]=s}function Xu(o,e){return o<e?-1:o>e?1:0}function vl(o,e){if(o.length<=1)return[o];let r=[],s,u;for(let f of o){let _=lp(f);_!==0&&(f.area=Math.abs(_),u===void 0&&(u=_<0),u===_<0?(s&&r.push(s),s=[f]):s.push(f))}if(s&&r.push(s),e>1)for(let f=0;f<r.length;f++)r[f].length<=e||(xl(r[f],e,1,r[f].length-1,sp),r[f]=r[f].slice(0,e));return r}function sp(o,e){return e.area-o.area}function lp(o){let e=0;for(let r,s,u=0,f=o.length,_=f-1;u<f;_=u++)r=o[u],s=o[_],e+=(s.x-r.x)*(r.y+s.y);return e}let cp=1/298.257223563,dp=cp*(2-cp),Nc=Math.PI/180;class bl{constructor(e){let r=6378.137*Nc*1e3,s=Math.cos(e*Nc),u=1/(1-dp*(1-s*s)),f=Math.sqrt(u);this.kx=r*f*s,this.ky=r*f*u*(1-dp)}distance(e,r){let s=this.wrap(e[0]-r[0])*this.kx,u=(e[1]-r[1])*this.ky;return Math.sqrt(s*s+u*u)}pointOnLine(e,r){let s,u,f,_,x=1/0;for(let b=0;b<e.length-1;
vendor: 6,406 bytes, line 1
1b++){let M=e[b][0],O=e[b][1],T=this.wrap(e[b+1][0]-M)*this.kx,F=(e[b+1][1]-O)*this.ky,B=0;T===0&&F===0||(B=(this.wrap(r[0]-M)*this.kx*T+(r[1]-O)*this.ky*F)/(T*T+F*F),B>1?(M=e[b+1][0],O=e[b+1][1]):B>0&&(M+=T/this.kx*B,O+=F/this.ky*B)),T=this.wrap(r[0]-M)*this.kx,F=(r[1]-O)*this.ky;let N=T*T+F*F;N<x&&(x=N,s=M,u=O,f=b,_=B)}return{point:[s,u],index:f,t:Math.max(0,Math.min(1,_))}}wrap(e){for(;e<-180;)e+=360;for(;e>180;)e-=360;return e}}function pp(o,e){return e[0]-o[0]}function Cl(o){return o[1]-o[0]+1}function Qo(o,e){return o[1]>=o[0]&&o[1]<e}function wl(o,e){if(o[0]>o[1])return[null,null];let r=Cl(o);if(e){if(r===2)return[o,null];let u=Math.floor(r/2);return[[o[0],o[0]+u],[o[0]+u,o[1]]]}if(r===1)return[o,null];let s=Math.floor(r/2)-1;return[[o[0],o[0]+s],[o[0]+s+1,o[1]]]}function Vc(o,e){if(!Qo(e,o.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let s=e[0];s<=e[1];++s)br(r,o[s]);return r}function jc(o){let e=[1/0,1/0,-1/0,-1/0];for(let r of o)for(let s of r)br(e,s);return e}function up(o){return o[0]!==-1/0&&o[1]!==-1/0&&o[2]!==1/0&&o[3]!==1/0}function Uc(o,e,r){if(!up(o)||!up(e))return NaN;let s=0,u=0;return o[2]<e[0]&&(s=e[0]-o[2]),o[0]>e[2]&&(s=o[0]-e[2]),o[1]>e[3]&&(u=o[1]-e[3]),o[3]<e[1]&&(u=e[1]-o[3]),r.distance([0,0],[s,u])}function He(o,e,r){let s=r.pointOnLine(e,o);return r.distance(o,s.point)}function $c(o,e,r,s,u){let f=Math.min(He(o,[r,s],u),He(e,[r,s],u)),_=Math.min(He(r,[o,e],u),He(s,[o,e],u));return Math.min(f,_)}function Ku(o,e,r,s,u){if(!Qo(e,o.length)||!Qo(s,r.length))return 1/0;let f=1/0;for(let _=e[0];_<e[1];++_){let x=o[_],b=o[_+1];for(let M=s[0];M<s[1];++M){let O=r[M],T=r[M+1];if(Is(x,b,O,T))return 0;f=Math.min(f,$c(x,b,O,T,u))}}return f}function Yu(o,e,r,s,u){if(!Qo(e,o.length)||!Qo(s,r.length))return NaN;let f=1/0;for(let _=e[0];_<=e[1];++_)for(let x=s[0];x<=s[1];++x)if(f=Math.min(f,u.distance(o[_],r[x])),f===0)return f;return f}function Qu(o,e,r){if(Qr(o,e,!0))return 0;let s=1/0;for(let u of e){let f=u[0],_=u[u.length-1];if(f!==_&&(s=Math.min(s,He(o,[_,f],r)),s===0))return s;let x=r.pointOnLine(u,o);if(s=Math.min(s,r.distance(o,x.point)),s===0)return s}return s}function Ju(o,e,r,s){if(!Qo(e,o.length))return NaN;for(let f=e[0];f<=e[1];++f)if(Qr(o[f],r,!0))return 0;let u=1/0;for(let f=e[0];f<e[1];++f){let _=o[f],x=o[f+1];for(let b of r)for(let M=0,O=b.length,T=O-1;M<O;T=M++){let F=b[T],B=b[M];if(Is(_,x,F,B))return 0;u=Math.min(u,$c(_,x,F,B,s))}}return u}function hp(o,e){for(let r of o)for(let s of r)if(Qr(s,e,!0))return!0;return!1}function th(o,e,r,s=1/0){let u=jc(o),f=jc(e);if(s!==1/0&&Uc(u,f,r)>=s)return s;if(Ts(u,f)){if(hp(o,e))return 0}else if(hp(e,o))return 0;let _=1/0;for(let x of o)for(let b=0,M=x.length,O=M-1;b<M;O=b++){let T=x[O],F=x[b];for(let B of e)for(let N=0,$=B.length,W=$-1;N<$;W=N++){let et=B[W],mt=B[N];if(Is(T,F,et,mt))return 0;_=Math.min(_,$c(T,F,et,mt,r))}}return _}function mp(o,e,r,s,u,f){if(!f)return;let _=Uc(Vc(s,f),u,r);_<e&&o.push([_,f,[0,0]])}function Ml(o,e,r,s,u,f,_){if(!f||!_)return;let x=Uc(Vc(s,f),Vc(u,_),r);x<e&&o.push([x,f,_])}function Pl(o,e,r,s,u=1/0){let f=Math.min(s.distance(o[0],r[0][0]),u);if(f===0)return f;let _=new ap([[0,[0,o.length-1],[0,0]]],pp),x=jc(r);for(;_.length>0;){let b=_.pop();if(b[0]>=f)continue;let M=b[1],O=e?50:100;if(Cl(M)<=O){if(!Qo(M,o.length))return NaN;if(e){let T=Ju(o,M,r,s);if(isNaN(T)||T===0)return T;f=Math.min(f,T)}else for(let T=M[0];T<=M[1];++T){let F=Qu(o[T],r,s);if(f=Math.min(f,F),f===0)return 0}}else{let T=wl(M,e);mp(_,f,s,o,x,T[0]),mp(_,f,s,o,x,T[1])}}return f}function Ol(o,e,r,s,u,f=1/0){let _=Math.min(f,u.distance(o[0],r[0]));if(_===0)return _;let x=new ap([[0,[0,o.length-1],[0,r.length-1]]],pp);for(;x.length>0;){let b=x.pop();if(b[0]>=_)continue;let M=b[1],O=b[2],T=e?50:100,F=s?50:100;if(Cl(M)<=T&&Cl(O)<=F){if(!Qo(M,o.length)&&Qo(O,r.length))return NaN;let B;if(e&&s)B=Ku(o,M,r,O,u),_=Math.min(_,B);else if(e&&!s){let N=o.slice(M[0],M[1]+1);for(let $=O[0];$<=O[1];++$)if(B=He(r[$],N,u),_=Math.min(_,B),_===0)return _}else if(!e&&s){let N=r.slice(O[0],O[1]+1);for(let $=M[0];$<=M[1];++$)if(B=He(o[$],N,u),_=Math.min(_,B),_===0)return _}else B=Yu(o,M,r,O,u),_=Math.min(_,B)}else{let B=wl(M,e),N=wl(O,s);Ml(x,_,u,o,r,B[0],N[0]),Ml(x,_,u,o,r,B[0],N[1]),Ml(x,_,u,o,r,B[1],N[0]),Ml(x,_,u,o,r,B[1],N[1])}}return _}function Gc(o){return o.type==="MultiPolygon"?o.coordinates.map(e=>({type:"Polygon",coordinates:e})):o.type==="MultiLineString"?o.coordinates.map(e=>({type:"LineString",coordinates:e})):o.type==="MultiPoint"?o.coordinates.map(e=>({type:"Point",coordinates:e})):[o]}class ta{constructor(e,r){this.type=jt,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`'distance' expression requires exactly one argument, but found ${e.length-1} instead.`);if(xs(e[1])){let s=e[1];if(s.type==="FeatureCollection")return new ta(s,s.features.map(u=>Gc(u.geometry)).flat());if(s.type==="Feature")return new ta(s,Gc(s.geometry));if("type"in s&&"coordinates"in s)return new ta(s,Gc(s))}return r.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return function(r,s){let u=r.geometry(),f=u.flat().map(b=>Lc([b.x,b.y],r.canonical));if(u.length===0)return NaN;let _=new bl(f[0][1]),x=1/0;for(let b of s){switch(b.type){case"Point":x=Math.min(x,Ol(f,!1,[b.coordinates],!1,_,x));break;case"LineString":x=Math.min(x,Ol(f,!1,b.coordinates,!0,_,x));break;case"Polygon":x=Math.min(x,Pl(f,!1,b.coordinates,_,x))}if(x===0)return x}return x}(e,this.geometries);if(e.geometryType()==="LineString")return function(r,s){let u=r.geometry(),f=u.flat().map(b=>Lc([b.x,b.y],r.canonical));if(u.length===0)return NaN;let _=new bl(f[0][1]),x=1/0;for(let b of s){switch(b.type){case"Point":x=Math.min(x,Ol(f,!0,[b.coordinates],!1,_,x));break;case"LineString":x=Math.min(x,Ol(f,!0,b.coordinates,!0,_,x));break;case"Polygon":x=Math.min(x,Pl(f,!0,b.coordinates,_,x))}if(x===0)return x}return x}(e,this.geometries);if(e.geometryType()==="Polygon")return function(r,s){let u=r.geometry();if(u.length===0||u[0].length===0)return NaN;let f=vl(u,0).map(b=>b.map(M=>M.map(O=>Lc([O.x,O.y],r.canonical)))),_=new bl(f[0][0][0][1]),x=1/0;for(let b of s)for(let M of f){switch(b.type){case"Point":x=Math.min(x,Pl([b.coordinates],!1,M,_,x));break;case"LineString":x=Math.min(x,Pl(b.coordinates,!0,M,_,x));break;
1case"Polygon":x=Math.min(x,th(M,b.coordinates,_,x))}if(x===0)return x}return x}(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let Da={"==":gl,"!=":zc,">":fl,"<":Gu,">=":go,"<=":_l,array:ro,at:Cs,boolean:ro,case:pl,coalesce:Ps,collator:Os,format:yl,image:Ss,in:mo,"index-of":Ia,interpolate:Ni,"interpolate-hcl":Ni,"interpolate-lab":Ni,length:Ac,let:Ta,literal:vr,match:dl,number:ro,"number-format":La,object:ro,slice:ka,step:Ms,string:ro,"to-boolean":nn,"to-color":nn,"to-number":nn,"to-string":nn,var:We,within:Jr,distance:ta};class ao{constructor(e,r,s,u){this.name=e,this.type=r,this._evaluate=s,this.args=u}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,r){let s=e[0],u=ao.definitions[s];if(!u)return r.error(`Unknown expression "${s}". If you wanted a literal array, use ["literal", [...]].`,0);let f=Array.isArray(u)?u[0]:u.type,_=Array.isArray(u)?[[u[1],u[2]]]:u.overloads,x=_.filter(([M])=>!Array.isArray(M)||M.length===e.length-1),b=null;for(let[M,O]of x){b=new Re(r.registry,Sl,r.path,null,r.scope);let T=[],F=!1;for(let B=1;B<e.length;B++){let N=e[B],$=Array.isArray(M)?M[B-1]:M.type,W=b.parse(N,1+T.length,$);if(!W){F=!0;break}T.push(W)}if(!F)if(Array.isArray(M)&&M.length!==T.length)b.error(`Expected ${M.length} arguments, but found ${T.length} instead.`);else{for(let B=0;B<T.length;B++){let N=Array.isArray(M)?M[B]:M.type,$=T[B];b.concat(B+1).checkSubtype(N,$.type)}if(b.errors.length===0)return new ao(s,f,O,T)}}if(x.length===1)r.errors.push(...b.errors);else{let M=(x.length?x:_).map(([T])=>{return F=T,Array.isArray(F)?`(${F.map(yn).join(", ")})`:`(${yn(F.type)}...)`;var F}).join(" | "),O=[];for(let T=1;T<e.length;T++){let F=r.parse(e[T],1+O.length);if(!F)return null;O.push(yn(F.type))}r.error(`Expected arguments of type ${M}, but found (${O.join(", ")}) instead.`)}return null}static register(e,r){ao.definitions=r;for(let s in r)e[s]=ao}}function gp(o,[e,r,s,u]){e=e.evaluate(o),r=r.evaluate(o),s=s.evaluate(o);let f=u?u.evaluate(o):1,_=xr(e,r,s,f);if(_)throw new Bn(_);return new Ne(e/255,r/255,s/255,f,!1)}function fp(o,e){return o in e}function Zc(o,e){let r=e[o];return r===void 0?null:r}function ea(o){return{type:o}}function Sl(o){if(o instanceof We)return Sl(o.boundExpression);if(o instanceof ao&&o.name==="error"||o instanceof Os||o instanceof Jr||o instanceof ta)return!1;let e=o instanceof nn||o instanceof ro,r=!0;return o.eachChild(s=>{r=e?r&&Sl(s):r&&s instanceof vr}),!!r&&Tl(o)&&Il(o,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Tl(o){if(o instanceof ao&&(o.name==="get"&&o.args.length===1||o.name==="feature-state"||o.name==="has"&&o.args.length===1||o.name==="properties"||o.name==="geometry-type"||o.name==="id"||/^filter-/.test(o.name))||o instanceof Jr||o instanceof ta)return!1;let e=!0;return o.eachChild(r=>{e&&!Tl(r)&&(e=!1)}),e}function Es(o){if(o instanceof ao&&o.name==="feature-state")return!1;let e=!0;return o.eachChild(r=>{e&&!Es(r)&&(e=!1)}),e}function Il(o,e){if(o instanceof ao&&e.indexOf(o.name)>=0)return!1;let r=!0;return o.eachChild(s=>{r&&!Il(s,e)&&(r=!1)}),r}function _p(o){return{result:"success",value:o}}function Fa(o){return{result:"error",value:o}}function Ra(o){return o["property-type"]==="data-driven"||o["property-type"]==="cross-faded-data-driven"}function yp(o){return!!o.expression&&o.expression.parameters.indexOf("zoom")>-1}function Hc(o){return!!o.expression&&o.expression.interpolated}function Je(o){return o instanceof Number?"number":o instanceof String?"string":o instanceof Boolean?"boolean":Array.isArray(o)?"array":o===null?"null":typeof o}function kl(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)}function eh(o){return o}function El(o,e){let r=e.type==="color",s=o.stops&&typeof o.stops[0][0]=="object",u=s||!(s||o.property!==void 0),f=o.type||(Hc(e)?"exponential":"interval");if(r||e.type==="padding"){let O=r?Ne.parse:wi.parse;(o=ke({},o)).stops&&(o.stops=o.stops.map(T=>[T[0],O(T[1])])),o.default=O(o.default?o.default:e.default)}if(o.colorSpace&&(_=o.colorSpace)!=="rgb"&&_!=="hcl"&&_!=="lab")throw new Error(`Unknown color space: "${o.colorSpace}"`);var _;let x,b,M;if(f==="exponential")x=qc;else if(f==="interval")x=ih;else if(f==="categorical"){x=nh,b=Object.create(null);for(let O of o.stops)b[O[0]]=O[1];M=typeof o.stops[0][0]}else{if(f!=="identity")throw new Error(`Unknown function type "${f}"`);x=oh}if(s){let O={},T=[];for(let N=0;N<o.stops.length;N++){let $=o.stops[N],W=$[0].zoom;O[W]===void 0&&(O[W]={zoom:W,type:o.type,property:o.property,default:o.default,stops:[]},T.push(W)),O[W].stops.push([$[0].value,$[1]])}let F=[];
1for(let N of T)F.push([O[N].zoom,El(O[N],e)]);let B={name:"linear"};return{kind:"composite",interpolationType:B,interpolationFactor:Ni.interpolationFactor.bind(void 0,B),zoomStops:F.map(N=>N[0]),evaluate:({zoom:N},$)=>qc({stops:F,base:o.base},e,N).evaluate(N,$)}}if(u){let O=f==="exponential"?{name:"exponential",base:o.base!==void 0?o.base:1}:null;return{kind:"camera",interpolationType:O,interpolationFactor:Ni.interpolationFactor.bind(void 0,O),zoomStops:o.stops.map(T=>T[0]),evaluate:({zoom:T})=>x(o,e,T,b,M)}}return{kind:"source",evaluate(O,T){let F=T&&T.properties?T.properties[o.property]:void 0;return F===void 0?zs(o.default,e.default):x(o,e,F,b,M)}}}function zs(o,e,r){return o!==void 0?o:e!==void 0?e:r!==void 0?r:void 0}function nh(o,e,r,s,u){return zs(typeof r===u?s[r]:void 0,o.default,e.default)}function ih(o,e,r){if(Je(r)!=="number")return zs(o.default,e.default);let s=o.stops.length;if(s===1||r<=o.stops[0][0])return o.stops[0][1];if(r>=o.stops[s-1][0])return o.stops[s-1][1];let u=ws(o.stops.map(f=>f[0]),r);return o.stops[u][1]}function qc(o,e,r){let s=o.base!==void 0?o.base:1;if(Je(r)!=="number")return zs(o.default,e.default);let u=o.stops.length;if(u===1||r<=o.stops[0][0])return o.stops[0][1];if(r>=o.stops[u-1][0])return o.stops[u-1][1];let f=ws(o.stops.map(O=>O[0]),r),_=function(O,T,F,B){let N=B-F,$=O-F;return N===0?0:T===1?$/N:(Math.pow(T,$)-1)/(Math.pow(T,N)-1)}(r,s,o.stops[f][0],o.stops[f+1][0]),x=o.stops[f][1],b=o.stops[f+1][1],M=fn[e.type]||eh;return typeof x.evaluate=="function"?{evaluate(...O){let T=x.evaluate.apply(void 0,O),F=b.evaluate.apply(void 0,O);if(T!==void 0&&F!==void 0)return M(T,F,_,o.colorSpace)}}:M(x,b,_,o.colorSpace)}function oh(o,e,r){switch(e.type){case"color":r=Ne.parse(r);break;case"formatted":r=Bi.fromString(r.toString());break;case"resolvedImage":r=Yi.fromString(r.toString());break;case"padding":r=wi.parse(r);break;default:Je(r)===e.type||e.type==="enum"&&e.values[r]||(r=void 0)}return zs(r,o.default,e.default)}ao.register(Da,{error:[{kind:"error"},[pe],(o,[e])=>{throw new Bn(e.evaluate(o))}],typeof:[pe,[De],(o,[e])=>yn(Nn(e.evaluate(o)))],"to-rgba":[ai(jt,4),[zi],(o,[e])=>{let[r,s,u,f]=e.evaluate(o).rgb;return[255*r,255*s,255*u,f]}],rgb:[zi,[jt,jt,jt],gp],rgba:[zi,[jt,jt,jt,jt],gp],has:{type:we,overloads:[[[pe],(o,[e])=>fp(e.evaluate(o),o.properties())],[[pe,On],(o,[e,r])=>fp(e.evaluate(o),r.evaluate(o))]]},get:{type:De,overloads:[[[pe],(o,[e])=>Zc(e.evaluate(o),o.properties())],[[pe,On],(o,[e,r])=>Zc(e.evaluate(o),r.evaluate(o))]]},"feature-state":[De,[pe],(o,[e])=>Zc(e.evaluate(o),o.featureState||{})],properties:[On,[],o=>o.properties()],"geometry-type":[pe,[],o=>o.geometryType()],id:[De,[],o=>o.id()],zoom:[jt,[],o=>o.globals.zoom],"heatmap-density":[jt,[],o=>o.globals.heatmapDensity||0],"line-progress":[jt,[],o=>o.globals.lineProgress||0],accumulated:[De,[],o=>o.globals.accumulated===void 0?null:o.globals.accumulated],"+":[jt,ea(jt),(o,e)=>{let r=0;for(let s of e)r+=s.evaluate(o);return r}],"*":[jt,ea(jt),(o,e)=>{let r=1;for(let s of e)r*=s.evaluate(o);return r}],"-":{type:jt,overloads:[[[jt,jt],(o,[e,r])=>e.evaluate(o)-r.evaluate(o)],[[jt],(o,[e])=>-e.evaluate(o)]]},"/":[jt,[jt,jt],(o,[e,r])=>e.evaluate(o)/r.evaluate(o)],"%":[jt,[jt,jt],(o,[e,r])=>e.evaluate(o)%r.evaluate(o)],ln2:[jt,[],()=>Math.LN2],pi:[jt,[],()=>Math.PI],e:[jt,[],()=>Math.E],"^":[jt,[jt,jt],(o,[e,r])=>Math.pow(e.evaluate(o),r.evaluate(o))],sqrt:[jt,[jt],(o,[e])=>Math.sqrt(e.evaluate(o))],log10:[jt,[jt],(o,[e])=>Math.log(e.evaluate(o))/Math.LN10],ln:[jt,[jt],(o,[e])=>Math.log(e.evaluate(o))],log2:[jt,[jt],(o,[e])=>Math.log(e.evaluate(o))/Math.LN2],sin:[jt,[jt],(o,[e])=>Math.sin(e.evaluate(o))],cos:[jt,[jt],(o,[e])=>Math.cos(e.evaluate(o))],tan:[jt,[jt],(o,[e])=>Math.tan(e.evaluate(o))],asin:[jt,[jt],(o,[e])=>Math.asin(e.evaluate(o))],acos:[jt,[jt],(o,[e])=>Math.acos(e.evaluate(o))],atan:[jt,[jt],(o,[e])=>Math.atan(e.evaluate(o))],min:[jt,ea(jt),(o,e)=>Math.min(...e.map(r=>r.evaluate(o)))],max:[jt,ea(jt),(o,e)=>Math.max(...e.map(r=>r.evaluate(o)))],abs:[jt,[jt],(o,[e])=>Math.abs(e.evaluate(o))],round:[jt,[jt],(o,[e])=>{let r=e.evaluate(o);return r<0?-Math.round(-r):Math.round(r)}
1],floor:[jt,[jt],(o,[e])=>Math.floor(e.evaluate(o))],ceil:[jt,[jt],(o,[e])=>Math.ceil(e.evaluate(o))],"filter-==":[we,[pe,De],(o,[e,r])=>o.properties()[e.value]===r.value],"filter-id-==":[we,[De],(o,[e])=>o.id()===e.value],"filter-type-==":[we,[pe],(o,[e])=>o.geometryType()===e.value],"filter-<":[we,[pe,De],(o,[e,r])=>{let s=o.properties()[e.value],u=r.value;return typeof s==typeof u&&s<u}],"filter-id-<":[we,[De],(o,[e])=>{let r=o.id(),s=e.value;return typeof r==typeof s&&r<s}],"filter->":[we,[pe,De],(o,[e,r])=>{let s=o.properties()[e.value],u=r.value;return typeof s==typeof u&&s>u}],"filter-id->":[we,[De],(o,[e])=>{let r=o.id(),s=e.value;return typeof r==typeof s&&r>s}],"filter-<=":[we,[pe,De],(o,[e,r])=>{let s=o.properties()[e.value],u=r.value;return typeof s==typeof u&&s<=u}],"filter-id-<=":[we,[De],(o,[e])=>{let r=o.id(),s=e.value;return typeof r==typeof s&&r<=s}],"filter->=":[we,[pe,De],(o,[e,r])=>{let s=o.properties()[e.value],u=r.value;return typeof s==typeof u&&s>=u}],"filter-id->=":[we,[De],(o,[e])=>{let r=o.id(),s=e.value;return typeof r==typeof s&&r>=s}],"filter-has":[we,[De],(o,[e])=>e.value in o.properties()],"filter-has-id":[we,[],o=>o.id()!==null&&o.id()!==void 0],"filter-type-in":[we,[ai(pe)],(o,[e])=>e.value.indexOf(o.geometryType())>=0],"filter-id-in":[we,[ai(De)],(o,[e])=>e.value.indexOf(o.id())>=0],"filter-in-small":[we,[pe,ai(De)],(o,[e,r])=>r.value.indexOf(o.properties()[e.value])>=0],"filter-in-large":[we,[pe,ai(De)],(o,[e,r])=>function(s,u,f,_){for(;f<=_;){let x=f+_>>1;if(u[x]===s)return!0;u[x]>s?_=x-1:f=x+1}return!1}(o.properties()[e.value],r.value,0,r.value.length-1)],all:{type:we,overloads:[[[we,we],(o,[e,r])=>e.evaluate(o)&&r.evaluate(o)],[ea(we),(o,e)=>{for(let r of e)if(!r.evaluate(o))return!1;return!0}]]},any:{type:we,overloads:[[[we,we],(o,[e,r])=>e.evaluate(o)||r.evaluate(o)],[ea(we),(o,e)=>{for(let r of e)if(r.evaluate(o))return!0;return!1}]]},"!":[we,[we],(o,[e])=>!e.evaluate(o)],"is-supported-script":[we,[pe],(o,[e])=>{let r=o.globals&&o.globals.isSupportedScript;return!r||r(e.evaluate(o))}],upcase:[pe,[pe],(o,[e])=>e.evaluate(o).toUpperCase()],downcase:[pe,[pe],(o,[e])=>e.evaluate(o).toLowerCase()],concat:[pe,ea(De),(o,e)=>e.map(r=>Lo(r.evaluate(o))).join("")],"resolved-locale":[pe,[fs],(o,[e])=>e.evaluate(o).resolvedLocale()]});class Wc{constructor(e,r){var s;this.expression=e,this._warningHistory={},this._evaluator=new Qe,this._defaultValue=r?(s=r).type==="color"&&kl(s.default)?new Ne(0,0,0,0):s.type==="color"?Ne.parse(s.default)||null:s.type==="padding"?wi.parse(s.default)||null:s.type==="variableAnchorOffsetCollection"?gi.parse(s.default)||null:s.type==="projectionDefinition"?Ai.parse(s.default)||null:s.default===void 0?null:s.default:null,this._enumValues=r&&r.type==="enum"?r.values:null}evaluateWithoutErrorHandling(e,r,s,u,f,_){return this._evaluator.globals=e,this._evaluator.feature=r,this._evaluator.featureState=s,this._evaluator.canonical=u,this._evaluator.availableImages=f||null,this._evaluator.formattedSection=_,this.expression.evaluate(this._evaluator)}evaluate(e,r,s,u,f,_){this._evaluator.globals=e,this._evaluator.feature=r||null,this._evaluator.featureState=s||null,this._evaluator.canonical=u,this._evaluator.availableImages=f||null,this._evaluator.formattedSection=_||null;try{let x=this.expression.evaluate(this._evaluator);if(x==null||typeof x=="number"&&x!=x)return this._defaultValue;if(this._enumValues&&!(x in this._enumValues))throw new Bn(`Expected value to be one of ${Object.keys(this._enumValues).map(b=>JSON.stringify(b)).join(", ")}, but found ${JSON.stringify(x)} instead.`);return x}catch(x){return this._warningHistory[x.message]||(this._warningHistory[x.message]=!0,typeof console<"u"&&console.warn(x.message)),this._defaultValue}}}function na(o){return Array.isArray(o)&&o.length>0&&typeof o[0]=="string"&&o[0]in Da}function As(o,e){let r=new Re(Da,Sl,[],e?function(u){let f={color:zi,string:pe,number:jt,enum:pe,boolean:we,formatted:Xr,padding:al,projectionDefinition:Ci,resolvedImage:yr,variableAnchorOffsetCollection:sl};return u.type==="array"?ai(f[u.value]||De,u.length):f[u.type]}(e):void 0),s=r.parse(o,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return s?_p(new Wc(s,e)):Fa(r.errors)}class Xc{constructor(e,r){this.kind=e,this._styleExpression=r,this.isStateDependent=e!=="constant"&&!Es(r.expression)}evaluateWithoutErrorHandling(e,r,s,u,f,_){return this._styleExpression.evaluateWithoutErrorHandling(e,r,s,u,f,_)}evaluate(e,r,s,u,f,_){return this._styleExpression.evaluate(e,r,s,u,f,_)}}class Kc{constructor(e,r,s,u){this.kind=e,this.zoomStops=s,this._styleExpression=r,this.isStateDependent=e!=="camera"&&!Es(r.expression),this.interpolationType=u}evaluateWithoutErrorHandling(e,r,s,u,f,_){return this._styleExpression.evaluateWithoutErrorHandling(e,r,s,u,f,_)}evaluate(e,r,s,u,f,_){return this._styleExpression.evaluate(e,r,s,u,f,_)}interpolationFactor(e,r,s){return this.interpolationType?Ni.interpolationFactor(this.interpolationType,e,r,s):0}}function xp(o,e){let r=As(o,e);if(r.result==="error")return r;let s=r.value.expression,u=Tl(s);if(!u&&!Ra(e))return Fa([new Xe("","data expressions not supported")]);let f=Il(s,["zoom"]);if(!f&&!yp(e))return Fa([new Xe("","zoom expressions not supported")]);let _=Al(s);return _||f?_ instanceof Xe?Fa([_]):_ instanceof Ni&&!Hc(e)?Fa([new Xe("",'"interpolate" expressions cannot be used with this property')]):_p(_?new Kc(u?"camera":"composite",r.value,_.labels,_ instanceof Ni?_.interpolation:void 0):new Xc(u?"constant":"source",r.value)):Fa([new Xe("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class zl{constructor(e,r){this._parameters=e,this._specification=r,ke(this,El(this._parameters,this._specification))}static deserialize(e){return new zl(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function Al(o){let e=null;if(o instanceof Ta)e=Al(o.result);else if(o instanceof Ps){for(let r of o.args)if(e=Al(r),e)break}else(o instanceof Ms||o instanceof Ni)&&o.input instanceof ao&&o.input.name==="zoom"&&(e=o);return e instanceof Xe||o.eachChild(r=>{let s=Al(r);s instanceof Xe?e=s:!e&&s?e=new Xe("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&s&&e!==s&&(e=new Xe("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function Ll(o){if(o===!0||o===!1)return!0;
1if(!Array.isArray(o)||o.length===0)return!1;switch(o[0]){case"has":return o.length>=2&&o[1]!=="$id"&&o[1]!=="$type";case"in":return o.length>=3&&(typeof o[1]!="string"||Array.isArray(o[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return o.length!==3||Array.isArray(o[1])||Array.isArray(o[2]);case"any":case"all":for(let e of o.slice(1))if(!Ll(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}let vp={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Yc(o){if(o==null)return{filter:()=>!0,needGeometry:!1};Ll(o)||(o=Ls(o));let e=As(o,vp);if(e.result==="error")throw new Error(e.value.map(r=>`${r.key}: ${r.message}`).join(", "));return{filter:(r,s,u)=>e.value.evaluate(r,s,{},u),needGeometry:Qc(o)}}function rh(o,e){return o<e?-1:o>e?1:0}function Qc(o){if(!Array.isArray(o))return!1;if(o[0]==="within"||o[0]==="distance")return!0;for(let e=1;e<o.length;e++)if(Qc(o[e]))return!0;return!1}function Ls(o){if(!o)return!0;let e=o[0];return o.length<=1?e!=="any":e==="=="?Dl(o[1],o[2],"=="):e==="!="?Ba(Dl(o[1],o[2],"==")):e==="<"||e===">"||e==="<="||e===">="?Dl(o[1],o[2],e):e==="any"?(r=o.slice(1),["any"].concat(r.map(Ls))):e==="all"?["all"].concat(o.slice(1).map(Ls)):e==="none"?["all"].concat(o.slice(1).map(Ls).map(Ba)):e==="in"?Jc(o[1],o.slice(2)):e==="!in"?Ba(Jc(o[1],o.slice(2))):e==="has"?Fl(o[1]):e!=="!has"||Ba(Fl(o[1]));var r}function Dl(o,e,r){switch(o){case"$type":return[`filter-type-${r}`,e];case"$id":return[`filter-id-${r}`,e];default:return[`filter-${r}`,o,e]}}function Jc(o,e){if(e.length===0)return!1;switch(o){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(r=>typeof r!=typeof e[0])?["filter-in-large",o,["literal",e.sort(rh)]]:["filter-in-small",o,["literal",e]]}}function Fl(o){switch(o){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",o]}}function Ba(o){return["!",o]}function Ds(o){let e=typeof o;if(e==="number"||e==="boolean"||e==="string"||o==null)return JSON.stringify(o);if(Array.isArray(o)){let u="[";for(let f of o)u+=`${Ds(f)},`;return`${u}]`}let r=Object.keys(o).sort(),s="{";for(let u=0;u<r.length;u++)s+=`${JSON.stringify(r[u])}:${Ds(o[r[u]])},`;return`${s}}`}function Rl(o){let e="";for(let r of _t)e+=`/${Ds(o[r])}`;return e}function bp(o){let e=o.value;return e?[new Ft(o.key,e,"constants have been deprecated as of v8")]:[]}function Un(o){return o instanceof Number||o instanceof String||o instanceof Boolean?o.valueOf():o}function ia(o){if(Array.isArray(o))return o.map(ia);if(o instanceof Object&&!(o instanceof Number||o instanceof String||o instanceof Boolean)){let e={};for(let r in o)e[r]=ia(o[r]);return e}return Un(o)}function so(o){let e=o.key,r=o.value,s=o.valueSpec||{},u=o.objectElementValidators||{},f=o.style,_=o.styleSpec,x=o.validateSpec,b=[],M=Je(r);if(M!=="object")return[new Ft(e,r,`object expected, ${M} found`)];for(let O in r){let T=O.split(".")[0],F=s[T]||s["*"],B;if(u[T])B=u[T];else if(s[T])B=x;else if(u["*"])B=u["*"];else{if(!s["*"]){b.push(new Ft(e,r[O],`unknown property "${O}"`));continue}B=x}b=b.concat(B({key:(e&&`${e}.`)+O,value:r[O],valueSpec:F,style:f,styleSpec:_,object:r,objectKey:O,validateSpec:x},r))}for(let O in s)u[O]||s[O].required&&s[O].default===void 0&&r[O]===void 0&&b.push(new Ft(e,r,`missing required property "${O}"`));return b}function td(o){let e=o.value,r=o.valueSpec,s=o.style,u=o.styleSpec,f=o.key,_=o.arrayElementValidator||o.validateSpec;if(Je(e)!=="array")return[new Ft(f,e,`array expected, ${Je(e)} found`)];if(r.length&&e.length!==r.length)return[new Ft(f,e,`array length ${r.length} expected, length ${e.length} found`)];if(r["min-length"]&&e.length<r["min-length"])return[new Ft(f,e,`array length at least ${r["min-length"]} expected, length ${e.length} found`)];let x={type:r.value,values:r.values};u.$version<7&&(x.function=r.function),Je(r.value)==="object"&&(x=r.value);let b=[];for(let M=0;M<e.length;M++)b=b.concat(_({array:e,arrayIndex:M,value:e[M],valueSpec:x,validateSpec:o.validateSpec,style:s,styleSpec:u,key:`${f}[${M}]`}));return b}function ed(o){let e=o.key,r=o.value,s=o.valueSpec,u=Je(r);return u==="number"&&r!=r&&(u="NaN"),u!=="number"?[new Ft(e,r,`number expected, ${u}
1 found`)]:"minimum"in s&&r<s.minimum?[new Ft(e,r,`${r} is less than the minimum value ${s.minimum}`)]:"maximum"in s&&r>s.maximum?[new Ft(e,r,`${r} is greater than the maximum value ${s.maximum}`)]:[]}function nd(o){let e=o.valueSpec,r=Un(o.value.type),s,u,f,_={},x=r!=="categorical"&&o.value.property===void 0,b=!x,M=Je(o.value.stops)==="array"&&Je(o.value.stops[0])==="array"&&Je(o.value.stops[0][0])==="object",O=so({key:o.key,value:o.value,valueSpec:o.styleSpec.function,validateSpec:o.validateSpec,style:o.style,styleSpec:o.styleSpec,objectElementValidators:{stops:function(B){if(r==="identity")return[new Ft(B.key,B.value,'identity function may not have a "stops" property')];let N=[],$=B.value;return N=N.concat(td({key:B.key,value:$,valueSpec:B.valueSpec,validateSpec:B.validateSpec,style:B.style,styleSpec:B.styleSpec,arrayElementValidator:T})),Je($)==="array"&&$.length===0&&N.push(new Ft(B.key,$,"array must have at least one stop")),N},default:function(B){return B.validateSpec({key:B.key,value:B.value,valueSpec:e,validateSpec:B.validateSpec,style:B.style,styleSpec:B.styleSpec})}}});return r==="identity"&&x&&O.push(new Ft(o.key,o.value,'missing required property "property"')),r==="identity"||o.value.stops||O.push(new Ft(o.key,o.value,'missing required property "stops"')),r==="exponential"&&o.valueSpec.expression&&!Hc(o.valueSpec)&&O.push(new Ft(o.key,o.value,"exponential functions not supported")),o.styleSpec.$version>=8&&(b&&!Ra(o.valueSpec)?O.push(new Ft(o.key,o.value,"property functions not supported")):x&&!yp(o.valueSpec)&&O.push(new Ft(o.key,o.value,"zoom functions not supported"))),r!=="categorical"&&!M||o.value.property!==void 0||O.push(new Ft(o.key,o.value,'"property" property is required')),O;function T(B){let N=[],$=B.value,W=B.key;if(Je($)!=="array")return[new Ft(W,$,`array expected, ${Je($)} found`)];if($.length!==2)return[new Ft(W,$,`array length 2 expected, length ${$.length} found`)];if(M){if(Je($[0])!=="object")return[new Ft(W,$,`object expected, ${Je($[0])} found`)];if($[0].zoom===void 0)return[new Ft(W,$,"object stop key must have zoom")];if($[0].value===void 0)return[new Ft(W,$,"object stop key must have value")];if(f&&f>Un($[0].zoom))return[new Ft(W,$[0].zoom,"stop zoom values must appear in ascending order")];Un($[0].zoom)!==f&&(f=Un($[0].zoom),u=void 0,_={}),N=N.concat(so({key:`${W}[0]`,value:$[0],valueSpec:{zoom:{}},validateSpec:B.validateSpec,style:B.style,styleSpec:B.styleSpec,objectElementValidators:{zoom:ed,value:F}}))}else N=N.concat(F({key:`${W}[0]`,value:$[0],validateSpec:B.validateSpec,style:B.style,styleSpec:B.styleSpec},$));return na(ia($[1]))?N.concat([new Ft(`${W}[1]`,$[1],"expressions are not allowed in function stops.")]):N.concat(B.validateSpec({key:`${W}[1]`,value:$[1],valueSpec:e,validateSpec:B.validateSpec,style:B.style,styleSpec:B.styleSpec}))}function F(B,N){let $=Je(B.value),W=Un(B.value),et=B.value!==null?B.value:N;if(s){if($!==s)return[new Ft(B.key,et,`${$} stop domain type must match previous stop domain type ${s}`)]}else s=$;if($!=="number"&&$!=="string"&&$!=="boolean")return[new Ft(B.key,et,"stop domain value must be a number, string, or boolean")];if($!=="number"&&r!=="categorical"){let mt=`number expected, ${$} found`;return Ra(e)&&r===void 0&&(mt+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ft(B.key,et,mt)]}return r!=="categorical"||$!=="number"||isFinite(W)&&Math.floor(W)===W?r!=="categorical"&&$==="number"&&u!==void 0&&W<u?[new Ft(B.key,et,"stop domain values must appear in ascending order")]:(u=W,r==="categorical"&&W in _?[new Ft(B.key,et,"stop domain values must be unique")]:(_[W]=!0,[])):[new Ft(B.key,et,`integer expected, found ${W}`)]}}function oa(o){let e=(o.expressionContext==="property"?xp:As)(ia(o.value),o.valueSpec);if(e.result==="error")return e.value.map(s=>new Ft(`${o.key}${s.key}`,o.value,s.message));let r=e.value.expression||e.value._styleExpression.expression;if(o.expressionContext==="property"&&o.propertyKey==="text-font"&&!r.outputDefined())return[new Ft(o.key,o.value,`Invalid data expression for "${o.propertyKey}". Output values must be contained as literals within the expression.`)];if(o.expressionContext==="property"&&o.propertyType==="layout"&&!Es(r))return[new Ft(o.key,o.value,'"feature-state" data expressions are not supported with layout properties.')];if(o.expressionContext==="filter"&&!Es(r))return[new Ft(o.key,o.value,'"feature-state" data expressions are not supported with filters.')];if(o.expressionContext&&o.expressionContext.indexOf("cluster")===0){if(!Il(r,["zoom","feature-state"]))return[new Ft(o.key,o.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(o.expressionContext==="cluster-initial"&&!Tl(r))return[new Ft(o.key,o.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Cr(o){let e=o.key,r=o.value,s=o.valueSpec,u=[];return Array.isArray(s.values)?s.values.indexOf(Un(r))===-1&&u.push(new Ft(e,r,`expected one of [${s.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(s.values).indexOf(Un(r))===-1&&u.push(new Ft(e,r,`expected one of [${Object.keys(s.values).join(", ")}], ${JSON.stringify(r)} found`)),u}function id(o){return Ll(ia(o.value))?oa(ke({},o,{expressionContext:"filter",valueSpec:{value:"boolean"}})):od(o)}function od(o){let e=o.value,r=o.key;if(Je(e)!=="array")return[new Ft(r,e,`array expected, ${Je(e)} found`)];let s=o.styleSpec,u,f=[];if(e.length<1)return[new Ft(r,e,"filter array must have at least 1 element")];switch(f=f.concat(Cr({key:`${r}[0]`,value:e[0],valueSpec:s.filter_operator,style:o.style,styleSpec:o.styleSpec})),Un(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&Un(e[1])==="$type"&&f.push(new Ft(r,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":e.length!==3&&f.push(new Ft(r,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(u=Je(e[1]),u!=="string"&&f.push(new Ft(`${r}[1]`,e[1],`string expected, ${u}
1 found`)));for(let _=2;_<e.length;_++)u=Je(e[_]),Un(e[1])==="$type"?f=f.concat(Cr({key:`${r}[${_}]`,value:e[_],valueSpec:s.geometry_type,style:o.style,styleSpec:o.styleSpec})):u!=="string"&&u!=="number"&&u!=="boolean"&&f.push(new Ft(`${r}[${_}]`,e[_],`string, number, or boolean expected, ${u} found`));break;case"any":case"all":case"none":for(let _=1;_<e.length;_++)f=f.concat(od({key:`${r}[${_}]`,value:e[_],style:o.style,styleSpec:o.styleSpec}));break;case"has":case"!has":u=Je(e[1]),e.length!==2?f.push(new Ft(r,e,`filter array for "${e[0]}" operator must have 2 elements`)):u!=="string"&&f.push(new Ft(`${r}[1]`,e[1],`string expected, ${u} found`))}return f}function rd(o,e){let r=o.key,s=o.validateSpec,u=o.style,f=o.styleSpec,_=o.value,x=o.objectKey,b=f[`${e}_${o.layerType}`];if(!b)return[];let M=x.match(/^(.*)-transition$/);if(e==="paint"&&M&&b[M[1]]&&b[M[1]].transition)return s({key:r,value:_,valueSpec:f.transition,style:u,styleSpec:f});let O=o.valueSpec||b[x];if(!O)return[new Ft(r,_,`unknown property "${x}"`)];let T;if(Je(_)==="string"&&Ra(O)&&!O.tokens&&(T=/^{([^}]+)}$/.exec(_)))return[new Ft(r,_,`"${x}" does not support interpolation syntax
2Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(T[1])} }\`.`)];let F=[];return o.layerType==="symbol"&&(x==="text-field"&&u&&!u.glyphs&&F.push(new Ft(r,_,'use of "text-field" requires a style "glyphs" property')),x==="text-font"&&kl(ia(_))&&Un(_.type)==="identity"&&F.push(new Ft(r,_,'"text-font" does not support identity functions'))),F.concat(s({key:o.key,value:_,valueSpec:O,style:u,styleSpec:f,expressionContext:"property",propertyType:e,propertyKey:x}))}function Cp(o){return rd(o,"paint")}function ad(o){return rd(o,"layout")}function sd(o){let e=[],r=o.value,s=o.key,u=o.style,f=o.styleSpec;r.type||r.ref||e.push(new Ft(s,r,'either "type" or "ref" is required'));let _=Un(r.type),x=Un(r.ref);if(r.id){let b=Un(r.id);for(let M=0;M<o.arrayIndex;M++){let O=u.layers[M];Un(O.id)===b&&e.push(new Ft(s,r.id,`duplicate layer id "${r.id}", previously used at line ${O.id.__line__}`))}}if("ref"in r){let b;["type","source","source-layer","filter","layout"].forEach(M=>{M in r&&e.push(new Ft(s,r[M],`"${M}" is prohibited for ref layers`))}),u.layers.forEach(M=>{Un(M.id)===x&&(b=M)}),b?b.ref?e.push(new Ft(s,r.ref,"ref cannot reference another ref layer")):_=Un(b.type):e.push(new Ft(s,r.ref,`ref layer "${x}" not found`))}else if(_!=="background")if(r.source){let b=u.sources&&u.sources[r.source],M=b&&Un(b.type);b?M==="vector"&&_==="raster"?e.push(new Ft(s,r.source,`layer "${r.id}" requires a raster source`)):M!=="raster-dem"&&_==="hillshade"?e.push(new Ft(s,r.source,`layer "${r.id}" requires a raster-dem source`)):M==="raster"&&_!=="raster"?e.push(new Ft(s,r.source,`layer "${r.id}" requires a vector source`)):M!=="vector"||r["source-layer"]?M==="raster-dem"&&_!=="hillshade"?e.push(new Ft(s,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):_!=="line"||!r.paint||!r.paint["line-gradient"]||M==="geojson"&&b.lineMetrics||e.push(new Ft(s,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(new Ft(s,r,`layer "${r.id}" must specify a "source-layer"`)):e.push(new Ft(s,r.source,`source "${r.source}" not found`))}else e.push(new Ft(s,r,'missing required property "source"'));return e=e.concat(so({key:s,value:r,valueSpec:f.layer,style:o.style,styleSpec:o.styleSpec,validateSpec:o.validateSpec,objectElementValidators:{"*":()=>[],type:()=>o.validateSpec({key:`${s}.type`,value:r.type,valueSpec:f.layer.type,style:o.style,styleSpec:o.styleSpec,validateSpec:o.validateSpec,object:r,objectKey:"type"}),filter:id,layout:b=>so({layer:r,key:b.key,value:b.value,style:b.style,styleSpec:b.styleSpec,validateSpec:b.validateSpec,objectElementValidators:{"*":M=>ad(ke({layerType:_},M))}}),paint:b=>so({layer:r,key:b.key,value:b.value,style:b.style,styleSpec:b.styleSpec,validateSpec:b.validateSpec,objectElementValidators:{"*":M=>Cp(ke({layerType:_},M))}})}})),e}function fo(o){let e=o.value,r=o.key,s=Je(e);return s!=="string"?[new Ft(r,e,`string expected, ${s} found`)]:[]}let wp={promoteId:function({key:o,value:e}){if(Je(e)==="string")return fo({key:o,value:e});{let r=[];for(let s in e)r.push(...fo({key:`${o}.${s}`,value:e[s]}));return r}}};function Mp(o){let e=o.value,r=o.key,s=o.styleSpec,u=o.style,f=o.validateSpec;if(!e.type)return[new Ft(r,e,'"type" is required')];let _=Un(e.type),x;switch(_){case"vector":case"raster":return x=so({key:r,value:e,valueSpec:s[`source_${_.replace("-","_")}`],style:o.style,styleSpec:s,objectElementValidators:wp,validateSpec:f}),x;case"raster-dem":return x=function(b){var M;let O=(M=b.sourceName)!==null&&M!==void 0?M:"",T=b.value,F=b.styleSpec,B=F.source_raster_dem,N=b.style,$=[],W=Je(T);if(T===void 0)return $;if(W!=="object")return $.push(new Ft("source_raster_dem",T,`object expected, ${W} found`)),$;let et=Un(T.encoding)==="custom",mt=["redFactor","greenFactor","blueFactor","baseShift"],ot=b.value.encoding?`"${b.value.encoding}"`:"Default";for(let R in T)!et&&mt.includes(R)?$.push(new Ft(R,T[R],`In "${O}": "${R}" is only valid when "encoding" is set to "custom". ${ot} encoding found`)):B[R]?$=$.concat(b.validateSpec({key:R,value:T[R],valueSpec:B[R],validateSpec:b.validateSpec,style:N,styleSpec:F})):$.push(new Ft(R,T[R],`unknown property "${R}"`));return $}({sourceName:r,value:e,style:o.style,styleSpec:s,validateSpec:f}),x;case"geojson":if(x=so({key:r,value:e,valueSpec:s.source_geojson,style:u,styleSpec:s,validateSpec:f,objectElementValidators:wp}),e.cluster)for(let b in e.clusterProperties){let[M,O]=e.clusterProperties[b],T=typeof M=="str
2ing"?[M,["accumulated"],["get",b]]:M;x.push(...oa({key:`${r}.${b}.map`,value:O,expressionContext:"cluster-map"})),x.push(...oa({key:`${r}.${b}.reduce`,value:T,expressionContext:"cluster-reduce"}))}return x;case"video":return so({key:r,value:e,valueSpec:s.source_video,style:u,validateSpec:f,styleSpec:s});case"image":return so({key:r,value:e,valueSpec:s.source_image,style:u,validateSpec:f,styleSpec:s});case"canvas":return[new Ft(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Cr({key:`${r}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Pp(o){let e=o.value,r=o.styleSpec,s=r.light,u=o.style,f=[],_=Je(e);if(e===void 0)return f;if(_!=="object")return f=f.concat([new Ft("light",e,`object expected, ${_} found`)]),f;for(let x in e){let b=x.match(/^(.*)-transition$/);f=f.concat(b&&s[b[1]]&&s[b[1]].transition?o.validateSpec({key:x,value:e[x],valueSpec:r.transition,validateSpec:o.validateSpec,style:u,styleSpec:r}):s[x]?o.validateSpec({key:x,value:e[x],valueSpec:s[x],validateSpec:o.validateSpec,style:u,styleSpec:r}):[new Ft(x,e[x],`unknown property "${x}"`)])}return f}function Op(o){let e=o.value,r=o.styleSpec,s=r.sky,u=o.style,f=Je(e);if(e===void 0)return[];if(f!=="object")return[new Ft("sky",e,`object expected, ${f} found`)];let _=[];for(let x in e)_=_.concat(s[x]?o.validateSpec({key:x,value:e[x],valueSpec:s[x],style:u,styleSpec:r}):[new Ft(x,e[x],`unknown property "${x}"`)]);return _}function Sp(o){let e=o.value,r=o.styleSpec,s=r.terrain,u=o.style,f=[],_=Je(e);if(e===void 0)return f;if(_!=="object")return f=f.concat([new Ft("terrain",e,`object expected, ${_} found`)]),f;for(let x in e)f=f.concat(s[x]?o.validateSpec({key:x,value:e[x],valueSpec:s[x],validateSpec:o.validateSpec,style:u,styleSpec:r}):[new Ft(x,e[x],`unknown property "${x}"`)]);return f}function Tp(o){let e=[],r=o.value,s=o.key;if(Array.isArray(r)){let u=[],f=[];for(let _ in r)r[_].id&&u.includes(r[_].id)&&e.push(new Ft(s,r,`all the sprites' ids must be unique, but ${r[_].id} is duplicated`)),u.push(r[_].id),r[_].url&&f.includes(r[_].url)&&e.push(new Ft(s,r,`all the sprites' URLs must be unique, but ${r[_].url} is duplicated`)),f.push(r[_].url),e=e.concat(so({key:`${s}[${_}]`,value:r[_],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:o.validateSpec}));return e}return fo({key:s,value:r})}let Na={"*":()=>[],array:td,boolean:function(o){let e=o.value,r=o.key,s=Je(e);return s!=="boolean"?[new Ft(r,e,`boolean expected, ${s} found`)]:[]},number:ed,color:function(o){let e=o.key,r=o.value,s=Je(r);return s!=="string"?[new Ft(e,r,`color expected, ${s} found`)]:Ne.parse(String(r))?[]:[new Ft(e,r,`color expected, "${r}" found`)]},constants:bp,enum:Cr,filter:id,function:nd,layer:sd,object:so,source:Mp,light:Pp,sky:Op,terrain:Sp,projection:function(o){let e=o.value,r=o.styleSpec,s=r.projection,u=o.style,f=Je(e);if(e===void 0)return[];if(f!=="object")return[new Ft("projection",e,`object expected, ${f} found`)];let _=[];for(let x in e)_=_.concat(s[x]?o.validateSpec({key:x,value:e[x],valueSpec:s[x],style:u,styleSpec:r}):[new Ft(x,e[x],`unknown property "${x}"`)]);return _},projectionDefinition:function(o){let e=o.key,r=o.value;r=r instanceof String?r.valueOf():r;let s=Je(r);return s!=="array"||function(u){return Array.isArray(u)&&u.length===3&&typeof u[0]=="string"&&typeof u[1]=="string"&&typeof u[2]=="number"}(r)||function(u){return!!["interpolate","step","literal"].includes(u[0])}(r)?["array","string"].includes(s)?[]:[new Ft(e,r,`projection expected, invalid type "${s}" found`)]:[new Ft(e,r,`projection expected, invalid array ${JSON.stringify(r)} found`)]},string:fo,formatted:function(o){return fo(o).length===0?[]:oa(o)},resolvedImage:function(o){return fo(o).length===0?[]:oa(o)},padding:function(o){let e=o.key,r=o.value;if(Je(r)==="array"){if(r.length<1||r.length>4)return[new Ft(e,r,`padding requires 1 to 4 values; ${r.length} values found`)];let s={type:"number"},u=[];for(let f=0;f<r.length;f++)u=u.concat(o.validateSpec({key:`${e}[${f}]`,value:r[f],validateSpec:o.validateSpec,valueSpec:s}
2));return u}return ed({key:e,value:r,valueSpec:{}})},variableAnchorOffsetCollection:function(o){let e=o.key,r=o.value,s=Je(r),u=o.styleSpec;if(s!=="array"||r.length<1||r.length%2!=0)return[new Ft(e,r,"variableAnchorOffsetCollection requires a non-empty array of even length")];let f=[];for(let _=0;_<r.length;_+=2)f=f.concat(Cr({key:`${e}[${_}]`,value:r[_],valueSpec:u.layout_symbol["text-anchor"]})),f=f.concat(td({key:`${e}[${_+1}]`,value:r[_+1],valueSpec:{length:2,value:"number"},validateSpec:o.validateSpec,style:o.style,styleSpec:u}));return f},sprite:Tp};function wr(o){let e=o.value,r=o.valueSpec,s=o.styleSpec;return o.validateSpec=wr,r.expression&&kl(Un(e))?nd(o):r.expression&&na(ia(e))?oa(o):r.type&&Na[r.type]?Na[r.type](o):so(ke({},o,{valueSpec:r.type?s[r.type]:r}))}function Vi(o){let e=o.value,r=o.key,s=fo(o);return s.length||(e.indexOf("{fontstack}")===-1&&s.push(new Ft(r,e,'"glyphs" url must include a "{fontstack}" token')),e.indexOf("{range}")===-1&&s.push(new Ft(r,e,'"glyphs" url must include a "{range}" token'))),s}function Li(o,e=H){let r=[];return r=r.concat(wr({key:"",value:o,valueSpec:e.$root,styleSpec:e,style:o,validateSpec:wr,objectElementValidators:{glyphs:Vi,"*":()=>[]}})),o.constants&&(r=r.concat(bp({key:"constants",value:o.constants}))),Ip(r)}function _o(o){return function(e){return o(cn(te({},e),{validateSpec:wr}))}}function Ip(o){return[].concat(o).sort((e,r)=>e.line-r.line)}function Fo(o){return function(...e){return Ip(o.apply(this,e))}}Li.source=Fo(_o(Mp)),Li.sprite=Fo(_o(Tp)),Li.glyphs=Fo(_o(Vi)),Li.light=Fo(_o(Pp)),Li.sky=Fo(_o(Op)),Li.terrain=Fo(_o(Sp)),Li.layer=Fo(_o(sd)),Li.filter=Fo(_o(id)),Li.paintProperty=Fo(_o(Cp)),Li.layoutProperty=Fo(_o(ad));let Ro=Li,kp=Ro.light,ld=Ro.sky,ah=Ro.paintProperty,cd=Ro.layoutProperty;function Ep(o,e){let r=!1;if(e&&e.length)for(let s of e)o.fire(new K(new Error(s.message))),r=!0;return r}class Jo{constructor(e,r,s){let u=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let _=new Int32Array(this.arrayBuffer);e=_[0],this.d=(r=_[1])+2*(s=_[2]);for(let b=0;b<this.d*this.d;b++){let M=_[3+b],O=_[3+b+1];u.push(M===O?null:_.subarray(M,O))}let x=_[3+u.length+1];this.keys=_.subarray(_[3+u.length],x),this.bboxes=_.subarray(x),this.insert=this._insertReadonly}else{this.d=r+2*s;for(let _=0;_<this.d*this.d;_++)u.push([]);this.keys=[],this.bboxes=[]}this.n=r,this.extent=e,this.padding=s,this.scale=r/e,this.uid=0;let f=s/r*e;this.min=-f,this.max=e+f}insert(e,r,s,u,f){this._forEachCell(r,s,u,f,this._insertCell,this.uid++,void 0,void 0),this.keys.push(e),this.bboxes.push(r),this.bboxes.push(s),this.bboxes.push(u),this.bboxes.push(f)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(e,r,s,u,f,_){this.cells[f].push(_)}query(e,r,s,u,f){let _=this.min,x=this.max;if(e<=_&&r<=_&&x<=s&&x<=u&&!f)return Array.prototype.slice.call(this.keys);{let b=[];return this._forEachCell(e,r,s,u,this._queryCell,b,{},f),b}}_queryCell(e,r,s,u,f,_,x,b){let M=this.cells[f];if(M!==null){let O=this.keys,T=this.bboxes;for(let F=0;F<M.length;F++){let B=M[F];if(x[B]===void 0){let N=4*B;(b?b(T[N+0],T[N+1],T[N+2],T[N+3]):e<=T[N+2]&&r<=T[N+3]&&s>=T[N+0]&&u>=T[N+1])?(x[B]=!0,_.push(O[B])):x[B]=!1}}}}_forEachCell(e,r,s,u,f,_,x,b){let M=this._convertToCellCoord(e),O=this._convertToCellCoord(r),T=this._convertToCellCoord(s),F=this._convertToCellCoord(u);for(let B=M;B<=T;B++)for(let N=O;N<=F;N++){let $=this.d*N+B;if((!b||b(this._convertFromCellCoord(B),this._convertFromCellCoord(N),this._convertFromCellCoord(B+1),this._convertFromCellCoord(N+1)))&&f.call(this,e,r,s,u,$,_,x,b))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let e=this.cells,r=3+this.cells.length+1+1,s=0;for(let _=0;_<this.cells.length;_++)s+=this.cells[_].length;let u=new Int32Array(r+s+this.keys.length+this.bboxes.length);u[0]=this.extent,u[1]=this.n,u[2]=this.padding;let f=r;for(let _=0;_<e.length;_++){let x=e[_];u[3+_]=f,u.set(x,f),f+=x.length}return u[3+e.length]=f,u.set(this.keys,f),f+=this.keys.length,u[3+e.length+1]=f,u.set(this.bboxes,f),f+=this.bboxes.length,u.buffer}static serialize(e,r){let s=e.toArrayBuffer();return r&&r.push(s),{buffer:s}}static deserialize(e){return new Jo(e.buffer)}}let tr={};function de(o,e,r={}){if(tr[o])throw new Error(`${o} is already registered.`);Object.defineProperty(e,"_classRegistryKey",{value:o,writeable:!1}),tr[o]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}}de("Object",Object),de("TransferableGridIndex",Jo),de("Color",Ne),de("Error",Error),de("AJAXError",_r),de("ResolvedImage",Yi),de("StylePropertyFunction",zl),de("StyleExpression",Wc,{omit:["_evaluator"]}),de("ZoomDependentExpression",Kc),de("ZoomConstantExpression",Xc),de("CompoundExpression",ao,{omit:["_evaluate"]});for(let o in Da)Da[o]._classRegistryKey||de(`Expression_${o}`,Da[o]);function zp(o){return o&&typeof ArrayBuffer<"u"&&(o instanceof ArrayBuffer||o.constructor&&o.constructor.name==="ArrayBuffer")}function dd(o){return o.$name||o.constructor._classRegistryKey}function Fs(o){return!function(e){if(e===null||typeof e!="object")return!1;let r=dd(e);return!(!r||r==="Object")}(o)&&(o==null||typeof o=="boolean"||typeof o=="number"||typeof o=="str
2ing"||o instanceof Boolean||o instanceof Number||o instanceof String||o instanceof Date||o instanceof RegExp||o instanceof Blob||o instanceof Error||zp(o)||oo(o)||ArrayBuffer.isView(o)||o instanceof ImageData)}function Rs(o,e){if(Fs(o))return(zp(o)||oo(o))&&e&&e.push(o),ArrayBuffer.isView(o)&&e&&e.push(o.buffer),o instanceof ImageData&&e&&e.push(o.data.buffer),o;if(Array.isArray(o)){let f=[];for(let _ of o)f.push(Rs(_,e));return f}if(typeof o!="object")throw new Error("can't serialize object of type "+typeof o);let r=dd(o);if(!r)throw new Error(`can't serialize object of unregistered class ${o.constructor.name}`);if(!tr[r])throw new Error(`${r} is not registered.`);let{klass:s}=tr[r],u=s.serialize?s.serialize(o,e):{};if(s.serialize){if(e&&u===e[e.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(let f in o){if(!o.hasOwnProperty(f)||tr[r].omit.indexOf(f)>=0)continue;let _=o[f];u[f]=tr[r].shallow.indexOf(f)>=0?_:Rs(_,e)}o instanceof Error&&(u.message=o.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return r!=="Object"&&(u.$name=r),u}function ra(o){if(Fs(o))return o;if(Array.isArray(o))return o.map(ra);if(typeof o!="object")throw new Error("can't deserialize object of type "+typeof o);let e=dd(o)||"Object";if(!tr[e])throw new Error(`can't deserialize unregistered class ${e}`);let{klass:r}=tr[e];if(!r)throw new Error(`can't deserialize unregistered class ${e}`);if(r.deserialize)return r.deserialize(o);let s=Object.create(r.prototype);for(let u of Object.keys(o)){if(u==="$name")continue;let f=o[u];s[u]=tr[e].shallow.indexOf(u)>=0?f:ra(f)}return s}class Bs{constructor(){this.first=!0}update(e,r){let s=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=s,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=s,!0):(this.lastFloorZoom>s?(this.lastIntegerZoom=s+1,this.lastIntegerZoomTime=r):this.lastFloorZoom<s&&(this.lastIntegerZoom=s,this.lastIntegerZoomTime=r),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=s,!0))}}let je={"Latin-1 Supplement":o=>o>=128&&o<=255,"Hangul Jamo":o=>o>=4352&&o<=4607,Khmer:o=>o>=6016&&o<=6143,"General Punctuation":o=>o>=8192&&o<=8303,"Letterlike Symbols":o=>o>=8448&&o<=8527,"Number Forms":o=>o>=8528&&o<=8591,"Miscellaneous Technical":o=>o>=8960&&o<=9215,"Control Pictures":o=>o>=9216&&o<=9279,"Optical Character Recognition":o=>o>=9280&&o<=9311,"Enclosed Alphanumerics":o=>o>=9312&&o<=9471,"Geometric Shapes":o=>o>=9632&&o<=9727,"Miscellaneous Symbols":o=>o>=9728&&o<=9983,"Miscellaneous Symbols and Arrows":o=>o>=11008&&o<=11263,"Ideographic Description Characters":o=>o>=12272&&o<=12287,"CJK Symbols and Punctuation":o=>o>=12288&&o<=12351,Hiragana:o=>o>=12352&&o<=12447,Katakana:o=>o>=12448&&o<=12543,Kanbun:o=>o>=12688&&o<=12703,"CJK Strokes":o=>o>=12736&&o<=12783,"Enclosed CJK Letters and Months":o=>o>=12800&&o<=13055,"CJK Compatibility":o=>o>=13056&&o<=13311,"Yijing Hexagram Symbols":o=>o>=19904&&o<=19967,"CJK Unified Ideographs":o=>o>=19968&&o<=40959,"Hangul Syllables":o=>o>=44032&&o<=55215,"Private Use Area":o=>o>=57344&&o<=63743,"Vertical Forms":o=>o>=65040&&o<=65055,"CJK Compatibility Forms":o=>o>=65072&&o<=65103,"Small Form Variants":o=>o>=65104&&o<=65135,"Halfwidth and Fullwidth Forms":o=>o>=65280&&o<=65519};function Bl(o){for(let e of o)if(Vl(e.charCodeAt(0)))return!0;return!1}function Ap(o){for(let e of o)if(!Lp(e.charCodeAt(0)))return!1;return!0}function Nl(o){let e=o.map(r=>{try{return new RegExp(`\\p{sc=${r}}`,"u").source}catch{return null}}).filter(r=>r);return new RegExp(e.join("|"),"u")}let pd=Nl(["Arab","Dupl","Mong","Ougr","Syrc"]);function Lp(o){return!pd.test(String.fromCodePoint(o))}let Dp=Nl(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Vl(o){return!(o!==746&&o!==747&&(o<4352||!(je["CJK Compatibility Forms"](o)&&!(o>=65097&&o<=65103)||je["CJK Compatibility"](o)||je["CJK Strokes"](o)||!(!je["CJK Symbols and Punctuation"](o)||o>=12296&&o<=12305||o>=12308&&o<=12319||o===12336)||je["Enclosed CJK Letters and Months"](o)||je["Ideographic Description Characters"](o)||je.Kanbun(o)||je.Katakana(o)&&o!==12540||!(!je["Halfwidth and Fullwidth Forms"](o)||o===65288||o===65289||o===65293||o>=65306&&o<=65310||o===65339||o===65341||o===65343||o>=65371&&o<=65503||o===65507||o>=65512&&o<=65519)||!(!je["Small Form Variants"](o)||o>=65112&&o<=65118||o>=65123&&o<=65126)||je["Vertical Forms"](o)||je["Yijing Hexagram Symbols"](o)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(o))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(o))||Dp.test(String.fromCodePoint(o)))))}function Fp(o){return!(Vl(o)||function(e){return!!(je["Latin-1 Supplement"](e)&&(e===167||e===169||e===174||e===177||e===188||e===189||e===190||e===215||e===247)||je["General Punctuation"](e)&&(e===8214||e===8224||e===8225||e===8240||e===8241||e===8251||e===8252||e===8258||e===8263||e===8264||e===8265||e===8273)||je["Letterlike Symbols"](e)||je["Number Forms"](e)||je["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||e===9003||e>=9085&&e<=9114||e>=9150&&e<=9165||e===9167||e>=9169&&e<=9179||e>=9186&&e<=9215)||je["Control Pictures"](e)&&e!==9251||je["Optical Character Recognition"](e)||je["Enclosed Alphanumerics"](e)||je["Geometric Shapes"](e)||je["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||je["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||je["CJK Symbols and Punctuation"](e)||je.Katakana(e)||je["Private Use Area"](e)||je["CJK Compatibility Forms"](e)||je["Small Form Variants"](e)||je["Halfwidth and Fullwidth Forms"](e)||e===8734||e===8756||e===8757||e>=9984&&e<=10087||e>=10102&&e<=10131||e===65532||e===65533)}(o))}
2let Rp=Nl(["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 ud(o){return Rp.test(String.fromCodePoint(o))}function Bp(o,e){return!(!e&&ud(o)||o>=2304&&o<=3583||o>=3840&&o<=4255||je.Khmer(o))}function sh(o){for(let e of o)if(ud(e.charCodeAt(0)))return!0;return!1}let Mr=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(o){this.pluginStatus=o.pluginStatus,this.pluginURL=o.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(o){if(Mr.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=o.applyArabicShaping,this.processBidirectionalText=o.processBidirectionalText,this.processStyledBidirectionalText=o.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(o,e){return a(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(o.pluginStatus!=="loading")return this.setState(o),o;let r=o.pluginURL,s=new Promise(f=>{this.loadScriptResolve=f});e(r);let u=new Promise(f=>setTimeout(()=>f(),this.TIMEOUT));if(yield Promise.race([s,u]),this.isParsed()){let f={pluginStatus:"loaded",pluginURL:r};return this.setState(f),f}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${r}`)})}};class xn{constructor(e,r){this.zoom=e,r?(this.now=r.now,this.fadeDuration=r.fadeDuration,this.zoomHistory=r.zoomHistory,this.transition=r.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Bs,this.transition={})}isSupportedScript(e){return function(r,s){for(let u of r)if(!Bp(u.charCodeAt(0),s))return!1;return!0}(e,Mr.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let e=this.zoom,r=e-Math.floor(e),s=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:r+(1-r)*s}:{fromScale:.5,toScale:1,t:1-(1-s)*r}}}class Ns{constructor(e,r){this.property=e,this.value=r,this.expression=function(s,u){if(kl(s))return new zl(s,u);if(na(s)){let f=xp(s,u);if(f.result==="error")throw new Error(f.value.map(_=>`${_.key}: ${_.message}`).join(", "));return f.value}{let f=s;return u.type==="color"&&typeof s=="string"?f=Ne.parse(s):u.type!=="padding"||typeof s!="number"&&!Array.isArray(s)?u.type==="variableAnchorOffsetCollection"&&Array.isArray(s)?f=gi.parse(s):u.type==="projectionDefinition"&&typeof s=="string"&&(f=Ai.parse(s)):f=wi.parse(s),{kind:"constant",evaluate:()=>f}}}(r===void 0?e.specification.default:r,e.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(e,r,s){return this.property.possiblyEvaluate(this,e,r,s)}}class jl{constructor(e){this.property=e,this.value=new Ns(e,void 0)}transitioned(e,r){return new Vs(this.property,this.value,r,qi({},e.transition,this.transition),e.now)}untransitioned(){return new Vs(this.property,this.value,null,{},0)}}class hd{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}getValue(e){return Wi(this._values[e].value.value)}setValue(e,r){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new jl(this._values[e].property)),this._values[e].value=new Ns(this._values[e].property,r===null?void 0:Wi(r))}getTransition(e){return Wi(this._values[e].transition)}setTransition(e,r){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new jl(this._values[e].property)),this._values[e].transition=Wi(r)||void 0}serialize(){let e={};for(let r of Object.keys(this._values)){let s=this.getValue(r);s!==void 0&&(e[r]=s);let u=this.getTransition(r);u!==void 0&&(e[`${r}-transition`]=u)}return e}transitioned(e,r){let s=new Np(this._properties);for(let u of Object.keys(this._values))s._values[u]=this._values[u].transitioned(e,r._values[u]);return s}untransitioned(){let e=new Np(this._properties);for(let r of Object.keys(this._values))e._values[r]=this._values[r].untransitioned();return e}}class Vs{constructor(e,r,s,u,f){this.property=e,this.value=r,this.begin=f+u.delay||0,this.end=this.begin+u.duration||0,e.specification.transition&&(u.delay||u.duration)&&(this.prior=s)}possiblyEvaluate(e,r,s){let u=e.now||0,f=this.value.possiblyEvaluate(e,r,s),_=this.prior;if(_){if(u>this.end)return this.prior=null,f;if(this.value.isDataDriven())return this.prior=null,f;if(u<this.begin)return _.possiblyEvaluate(e,r,s);{let x=(u-this.begin)/(this.end-this.begin);return this.property.interpolate(_.possiblyEvaluate(e,r,s),f,po(x))}}return f}}class Np{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,r,s){let u=new Ul(this._properties);for(let f of Object.keys(this._values))u._values[f]=this._values[f].possiblyEvaluate(e,r,s);return u}hasTransition(){for(let e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class md{constructor(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)}hasValue(e){return this._values[e].value!==void 0}getValue(e){return Wi(this._values[e].value)}setValue(e,r){this._values[e]=new Ns(this._values[e].property,r===null?void 0:Wi(r))}serialize(){let e={};for(let r of Object.keys(this._values)){let s=this.getValue(r);s!==void 0&&(e[r]=s)}return e}possiblyEvaluate(e,r,s){let u=new Ul(this._properties);for(let f of Object.keys(this._values))u._values[f]=this._values[f].possiblyEvaluate(e,r,s);return u}}class Bo{constructor(e,r,s){this.property=e,this.value=r,this.parameters=s}isConstant(){return this.value.kind==="constant"}constantOr(e){return this.value.kind==="constant"?this.value.value:e}evaluate(e,r,s,u){return this.property.evaluate(this.value,this.parameters,e,r,s,u)}}class Ul{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class ye{constructor(e){this.specification=e}
2possiblyEvaluate(e,r){if(e.isDataDriven())throw new Error("Value should not be data driven");return e.expression.evaluate(r)}interpolate(e,r,s){let u=fn[this.specification.type];return u?u(e,r,s):e}}class Oe{constructor(e,r){this.specification=e,this.overrides=r}possiblyEvaluate(e,r,s,u){return new Bo(this,e.expression.kind==="constant"||e.expression.kind==="camera"?{kind:"constant",value:e.expression.evaluate(r,null,{},s,u)}:e.expression,r)}interpolate(e,r,s){if(e.value.kind!=="constant"||r.value.kind!=="constant")return e;if(e.value.value===void 0||r.value.value===void 0)return new Bo(this,{kind:"constant",value:void 0},e.parameters);let u=fn[this.specification.type];if(u){let f=u(e.value.value,r.value.value,s);return new Bo(this,{kind:"constant",value:f},e.parameters)}return e}evaluate(e,r,s,u,f,_){return e.kind==="constant"?e.value:e.evaluate(r,s,u,f,_)}}class js extends Oe{possiblyEvaluate(e,r,s,u){if(e.value===void 0)return new Bo(this,{kind:"constant",value:void 0},r);if(e.expression.kind==="constant"){let f=e.expression.evaluate(r,null,{},s,u),_=e.property.specification.type==="resolvedImage"&&typeof f!="string"?f.name:f,x=this._calculate(_,_,_,r);return new Bo(this,{kind:"constant",value:x},r)}if(e.expression.kind==="camera"){let f=this._calculate(e.expression.evaluate({zoom:r.zoom-1}),e.expression.evaluate({zoom:r.zoom}),e.expression.evaluate({zoom:r.zoom+1}),r);return new Bo(this,{kind:"constant",value:f},r)}return new Bo(this,e.expression,r)}evaluate(e,r,s,u,f,_){if(e.kind==="source"){let x=e.evaluate(r,s,u,f,_);return this._calculate(x,x,x,r)}return e.kind==="composite"?this._calculate(e.evaluate({zoom:Math.floor(r.zoom)-1},s,u),e.evaluate({zoom:Math.floor(r.zoom)},s,u),e.evaluate({zoom:Math.floor(r.zoom)+1},s,u),r):e.value}_calculate(e,r,s,u){return u.zoom>u.zoomHistory.lastIntegerZoom?{from:e,to:r}:{from:s,to:r}}interpolate(e){return e}}class gd{constructor(e){this.specification=e}possiblyEvaluate(e,r,s,u){if(e.value!==void 0){if(e.expression.kind==="constant"){let f=e.expression.evaluate(r,null,{},s,u);return this._calculate(f,f,f,r)}return this._calculate(e.expression.evaluate(new xn(Math.floor(r.zoom-1),r)),e.expression.evaluate(new xn(Math.floor(r.zoom),r)),e.expression.evaluate(new xn(Math.floor(r.zoom+1),r)),r)}}_calculate(e,r,s,u){return u.zoom>u.zoomHistory.lastIntegerZoom?{from:e,to:r}:{from:s,to:r}}interpolate(e){return e}}class fd{constructor(e){this.specification=e}possiblyEvaluate(e,r,s,u){return!!e.expression.evaluate(r,null,{},s,u)}interpolate(){return!1}}class ji{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let r in e){let s=e[r];s.specification.overridable&&this.overridableProperties.push(r);let u=this.defaultPropertyValues[r]=new Ns(s,void 0),f=this.defaultTransitionablePropertyValues[r]=new jl(s);this.defaultTransitioningPropertyValues[r]=f.untransitioned(),this.defaultPossiblyEvaluatedValues[r]=u.possiblyEvaluate({})}}}de("DataDrivenProperty",Oe),de("DataConstantProperty",ye),de("CrossFadedDataDrivenProperty",js),de("CrossFadedProperty",gd),de("ColorRampProperty",fd);let Vp="-transition";class No extends at{constructor(e,r){if(super(),this.id=e.id,this.type=e.type,this._featureFilter={filter:()=>!0,needGeometry:!1},e.type!=="custom"&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,e.type!=="background"&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new md(r.layout)),r.paint)){this._transitionablePaint=new hd(r.paint);for(let s in e.paint)this.setPaintProperty(s,e.paint[s],{validate:!1});for(let s in e.layout)this.setLayoutProperty(s,e.layout[s],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ul(r.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){return e==="visibility"?this.visibility:this._unevaluatedLayout.getValue(e)}setLayoutProperty(e,r,s={}
2){r!=null&&this._validate(cd,`layers.${this.id}.layout.${e}`,e,r,s)||(e!=="visibility"?this._unevaluatedLayout.setValue(e,r):this.visibility=r)}getPaintProperty(e){return e.endsWith(Vp)?this._transitionablePaint.getTransition(e.slice(0,-11)):this._transitionablePaint.getValue(e)}setPaintProperty(e,r,s={}){if(r!=null&&this._validate(ah,`layers.${this.id}.paint.${e}`,e,r,s))return!1;if(e.endsWith(Vp))return this._transitionablePaint.setTransition(e.slice(0,-11),r||void 0),!1;{let u=this._transitionablePaint._values[e],f=u.property.specification["property-type"]==="cross-faded-data-driven",_=u.value.isDataDriven(),x=u.value;this._transitionablePaint.setValue(e,r),this._handleSpecialPaintPropertyUpdate(e);let b=this._transitionablePaint._values[e].value;return b.isDataDriven()||_||f||this._handleOverridablePaintPropertyUpdate(e,x,b)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,r,s){return!1}isHidden(e){return!!(this.minzoom&&e<this.minzoom)||!!(this.maxzoom&&e>=this.maxzoom)||this.visibility==="none"}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(e,r){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,r)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,r)}
2serialize(){let e={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&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),us(e,(r,s)=>!(r===void 0||s==="layout"&&!Object.keys(r).length||s==="paint"&&!Object.keys(r).length))}_validate(e,r,s,u,f={}){return(!f||f.validate!==!1)&&Ep(this,e.call(Ro,{key:r,layerType:this.type,objectKey:s,value:u,styleSpec:H,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let e in this.paint._values){let r=this.paint.get(e);if(r instanceof Bo&&Ra(r.property.specification)&&(r.value.kind==="source"||r.value.kind==="composite")&&r.value.isStateDependent)return!0}return!1}}let Va={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Us{constructor(e,r){this._structArray=e,this._pos1=r*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Vn{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,r){return e._trim(),r&&(e.isTransferred=!0,r.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){let r=Object.create(this.prototype);return r.arrayBuffer=e.arrayBuffer,r.length=e.length,r.capacity=e.arrayBuffer.byteLength/r.bytesPerElement,r._refreshViews(),r}_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(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let r=this.uint8;this._refreshViews(),r&&this.uint8.set(r)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Zn(o,e=1){let r=0,s=0;return{members:o.map(u=>{let f=Va[u.type].BYTES_PER_ELEMENT,_=r=_d(r,Math.max(e,f)),x=u.components||1;return s=Math.max(s,f),r+=f*x,{name:u.name,type:u.type,components:x,offset:_}}),size:_d(r,Math.max(s,e)),alignment:e}}function _d(o,e){return Math.ceil(o/e)*e}class $s extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r){let s=this.length;return this.resize(s+1),this.emplace(s,e,r)}emplace(e,r,s){let u=2*e;return this.int16[u+0]=r,this.int16[u+1]=s,e}}$s.prototype.bytesPerElement=4,de("StructArrayLayout2i4",$s);class $l extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s){let u=this.length;return this.resize(u+1),this.emplace(u,e,r,s)}emplace(e,r,s,u){let f=3*e;return this.int16[f+0]=r,this.int16[f+1]=s,this.int16[f+2]=u,e}}$l.prototype.bytesPerElement=6,de("StructArrayLayout3i6",$l);class er extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,u){let f=this.length;return this.resize(f+1),this.emplace(f,e,r,s,u)}emplace(e,r,s,u,f){let _=4*e;return this.int16[_+0]=r,this.int16[_+1]=s,this.int16[_+2]=u,this.int16[_+3]=f,e}}er.prototype.bytesPerElement=8,de("StructArrayLayout4i8",er);class Gl extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,u,f,_){let x=this.length;return this.resize(x+1),this.emplace(x,e,r,s,u,f,_)}emplace(e,r,s,u,f,_,x){let b=6*e;return this.int16[b+0]=r,this.int16[b+1]=s,this.int16[b+2]=u,this.int16[b+3]=f,this.int16[b+4]=_,this.int16[b+5]=x,e}}Gl.prototype.bytesPerElement=12,de("StructArrayLayout2i4i12",Gl);class Gs extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,u,f,_){let x=this.length;return this.resize(x+1),this.emplace(x,e,r,s,u,f,_)}emplace(e,r,s,u,f,_,x){let b=4*e,M=8*e;return this.int16[b+0]=r,this.int16[b+1]=s,this.uint8[M+4]=u,this.uint8[M+5]=f,this.uint8[M+6]=_,this.uint8[M+7]=x,e}}
2Gs.prototype.bytesPerElement=8,de("StructArrayLayout2i4ub8",Gs);class ja extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r){let s=this.length;return this.resize(s+1),this.emplace(s,e,r)}emplace(e,r,s){let u=2*e;return this.float32[u+0]=r,this.float32[u+1]=s,e}}ja.prototype.bytesPerElement=8,de("StructArrayLayout2f8",ja);class Zs extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,s,u,f,_,x,b,M,O){let T=this.length;return this.resize(T+1),this.emplace(T,e,r,s,u,f,_,x,b,M,O)}emplace(e,r,s,u,f,_,x,b,M,O,T){let F=10*e;return this.uint16[F+0]=r,this.uint16[F+1]=s,this.uint16[F+2]=u,this.uint16[F+3]=f,this.uint16[F+4]=_,this.uint16[F+5]=x,this.uint16[F+6]=b,this.uint16[F+7]=M,this.uint16[F+8]=O,this.uint16[F+9]=T,e}}Zs.prototype.bytesPerElement=20,de("StructArrayLayout10ui20",Zs);class yd extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,s,u,f,_,x,b,M,O,T,F){let B=this.length;return this.resize(B+1),this.emplace(B,e,r,s,u,f,_,x,b,M,O,T,F)}emplace(e,r,s,u,f,_,x,b,M,O,T,F,B){let N=12*e;return this.int16[N+0]=r,this.int16[N+1]=s,this.int16[N+2]=u,this.int16[N+3]=f,this.uint16[N+4]=_,this.uint16[N+5]=x,this.uint16[N+6]=b,this.uint16[N+7]=M,this.int16[N+8]=O,this.int16[N+9]=T,this.int16[N+10]=F,this.int16[N+11]=B,e}}yd.prototype.bytesPerElement=24,de("StructArrayLayout4i4ui4i24",yd);class Ua extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,s){let u=this.length;return this.resize(u+1),this.emplace(u,e,r,s)}emplace(e,r,s,u){let f=3*e;return this.float32[f+0]=r,this.float32[f+1]=s,this.float32[f+2]=u,e}}Ua.prototype.bytesPerElement=12,de("StructArrayLayout3f12",Ua);class aa extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){let r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){return this.uint32[1*e+0]=r,e}}aa.prototype.bytesPerElement=4,de("StructArrayLayout1ul4",aa);class xd extends Vn{_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(e,r,s,u,f,_,x,b,M){let O=this.length;return this.resize(O+1),this.emplace(O,e,r,s,u,f,_,x,b,M)}emplace(e,r,s,u,f,_,x,b,M,O){let T=10*e,F=5*e;return this.int16[T+0]=r,this.int16[T+1]=s,this.int16[T+2]=u,this.int16[T+3]=f,this.int16[T+4]=_,this.int16[T+5]=x,this.uint32[F+3]=b,this.uint16[T+8]=M,this.uint16[T+9]=O,e}}xd.prototype.bytesPerElement=20,de("StructArrayLayout6i1ul2ui20",xd);class Zl extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,u,f,_){let x=this.length;return this.resize(x+1),this.emplace(x,e,r,s,u,f,_)}emplace(e,r,s,u,f,_,x){let b=6*e;return this.int16[b+0]=r,this.int16[b+1]=s,this.int16[b+2]=u,this.int16[b+3]=f,this.int16[b+4]=_,this.int16[b+5]=x,e}}Zl.prototype.bytesPerElement=12,de("StructArrayLayout2i2i2i12",Zl);class sa extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,u,f){let _=this.length;return this.resize(_+1),this.emplace(_,e,r,s,u,f)}emplace(e,r,s,u,f,_){let x=4*e,b=8*e;return this.float32[x+0]=r,this.float32[x+1]=s,this.float32[x+2]=u,this.int16[b+6]=f,this.int16[b+7]=_,e}}sa.prototype.bytesPerElement=16,de("StructArrayLayout2f1f2i16",sa);class vd extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,u,f,_){let x=this.length;return this.resize(x+1),this.emplace(x,e,r,s,u,f,_)}emplace(e,r,s,u,f,_,x){let b=16*e,M=4*e,O=8*e;return this.uint8[b+0]=r,this.uint8[b+1]=s,this.float32[M+1]=u,this.float32[M+2]=f,this.int16[O+6]=_,this.int16[O+7]=x,e}}vd.prototype.bytesPerElement=16,de("StructArrayLayout2ub2f2i16",vd);class Hl extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,s){let u=this.length;return this.resize(u+1),this.emplace(u,e,r,s)}emplace(e,r,s,u){let f=3*e;return this.uint16[f+0]=r,this.uint16[f+1]=s,this.uint16[f+2]=u,e}}Hl.prototype.bytesPerElement=6,de("StructArrayLayout3ui6",Hl);class ql extends Vn{_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(e,r,s,u,f,_,x,b,M,O,T,F,B,N,$,W,et){let mt=this.length;return this.resize(mt+1),this.emplace(mt,e,r,s,u,f,_,x,b,M,O,T,F,B,N,$,W,et)}emplace(e,r,s,u,f,_,x,b,M,O,T,F,B,N,$,W,et,mt){let ot=24*e,R=12*e,q=48*e;return this.int16[ot+0]=r,this.int16[ot+1]=s,this.uint16[ot+2]=u,this.uint16[ot+3]=f,this.uint32[R+2]=_,this.uint32[R+3]=x,this.uint32[R+4]=b,this.uint16[ot+10]=M,this.uint16[ot+11]=O,this.uint16[ot+12]=T,this.float32[R+7]=F,this.float32[R+8]=B,this.uint8[q+36]=N,this.uint8[q+37]=$,this.uint8[q+38]=W,this.uint32[R+10]=et,this.int16[ot+22]=mt,e}}ql.prototype.bytesPerElement=48,de("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ql);class bd extends Vn{_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(e,r,s,u,f,_,x,b,M,O,T,F,B,N,$,W,et,mt,ot,R,q,st,wt,Zt,It,Lt,Wt,Ht){let Jt=this.length;return this.resize(Jt+1),this.emplace(Jt,e,r,s,u,f,_,x,b,M,O,T,F,B,N,$,W,et,mt,ot,R,q,st,wt,Zt,It,Lt,Wt,Ht)}emplace(e,r,s,u,f,_,x,b,M,O,T,F,B,N,$,W,et,mt,ot,R,q,st,wt,Zt,It,Lt,Wt,Ht,Jt){let Nt=32*e,he=16*e;return this.int16[Nt+0]=r,this.int16[Nt+1]=s,this.int16[Nt+2]=u,this.int16[Nt+3]=f,this.int16[Nt+4]=_,this.int16[Nt+5]=x,this.int16[Nt+6]=b,this.int16[Nt+7]=M,this.uint16[Nt+8]=O,this.uint16[Nt+9]=T,this.uint16[Nt+10]=F,this.uint16[Nt+11]=B,this.uint16[Nt+12]=N,this.uint16[Nt+13]=$,this.uint16[Nt+14]=W,this.uint16[Nt+15]=et,this.uint16[Nt+16]=mt,this.uint16[Nt+1
27]=ot,this.uint16[Nt+18]=R,this.uint16[Nt+19]=q,this.uint16[Nt+20]=st,this.uint16[Nt+21]=wt,this.uint16[Nt+22]=Zt,this.uint32[he+12]=It,this.float32[he+13]=Lt,this.float32[he+14]=Wt,this.uint16[Nt+30]=Ht,this.uint16[Nt+31]=Jt,e}}bd.prototype.bytesPerElement=64,de("StructArrayLayout8i15ui1ul2f2ui64",bd);class m extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){let r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){return this.float32[1*e+0]=r,e}}m.prototype.bytesPerElement=4,de("StructArrayLayout1f4",m);class t extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,s){let u=this.length;return this.resize(u+1),this.emplace(u,e,r,s)}emplace(e,r,s,u){let f=3*e;return this.uint16[6*e+0]=r,this.float32[f+1]=s,this.float32[f+2]=u,e}}t.prototype.bytesPerElement=12,de("StructArrayLayout1ui2f12",t);class i extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,s){let u=this.length;return this.resize(u+1),this.emplace(u,e,r,s)}emplace(e,r,s,u){let f=4*e;return this.uint32[2*e+0]=r,this.uint16[f+2]=s,this.uint16[f+3]=u,e}}i.prototype.bytesPerElement=8,de("StructArrayLayout1ul2ui8",i);class l extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r){let s=this.length;return this.resize(s+1),this.emplace(s,e,r)}emplace(e,r,s){let u=2*e;return this.uint16[u+0]=r,this.uint16[u+1]=s,e}}l.prototype.bytesPerElement=4,de("StructArrayLayout2ui4",l);class p extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){let r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){return this.uint16[1*e+0]=r,e}}p.prototype.bytesPerElement=2,de("StructArrayLayout1ui2",p);class g extends Vn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,s,u){let f=this.length;return this.resize(f+1),this.emplace(f,e,r,s,u)}emplace(e,r,s,u,f){let _=4*e;return this.float32[_+0]=r,this.float32[_+1]=s,this.float32[_+2]=u,this.float32[_+3]=f,e}}g.prototype.bytesPerElement=16,de("StructArrayLayout4f16",g);class y extends Us{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 ne(this.anchorPointX,this.anchorPointY)}}y.prototype.size=20;class v extends xd{get(e){return new y(this,e)}}de("CollisionBoxArray",v);class C extends Us{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(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}C.prototype.size=48;class P extends ql{get(e){return new C(this,e)}}de("PlacedSymbolArray",P);class S extends Us{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]}
2get 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(e){this._structArray.uint32[this._pos4+12]=e}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]}}S.prototype.size=64;class L extends bd{get(e){return new S(this,e)}}de("SymbolInstanceArray",L);class D extends m{getoffsetX(e){return this.float32[1*e+0]}}de("GlyphOffsetArray",D);class V extends $l{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}de("SymbolLineVertexArray",V);class U extends Us{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]}}U.prototype.size=12;class Q extends t{get(e){return new U(this,e)}}de("TextAnchorOffsetArray",Q);class Y extends Us{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]}}Y.prototype.size=8;class tt extends i{get(e){return new Y(this,e)}}de("FeatureIndexArray",tt);class nt extends $s{}class lt extends $s{}class ct extends $s{}class pt extends Gl{}class ft extends Gs{}class ht extends ja{}class Ct extends Zs{}class Mt extends yd{}class Bt extends Ua{}class Vt extends aa{}class Dt extends Zl{}class oe extends vd{}class Qt extends Hl{}class $t extends l{}let fe=Zn([{name:"a_pos",components:2,type:"Int16"}],4),{members:Be}=fe;class ze{constructor(e=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=e}prepareSegment(e,r,s,u){let f=this.segments[this.segments.length-1];return e>ze.MAX_VERTEX_ARRAY_LENGTH&&Ei(`Max vertices per segment is ${ze.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${ze.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!f||f.vertexLength+e>ze.MAX_VERTEX_ARRAY_LENGTH||f.sortKey!==u?this.createNewSegment(r,s,u):f}createNewSegment(e,r,s){let u={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0,vaos:{}};return s!==void 0&&(u.sortKey=s),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(u),u}getOrCreateLatestSegment(e,r,s){return this.prepareSegment(0,e,r,s)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let e of this.segments)for(let r in e.vaos)e.vaos[r].destroy()}static simpleSegment(e,r,s,u){return new ze([{vertexOffset:e,primitiveOffset:r,vertexLength:s,primitiveLength:u,vaos:{},sortKey:0}])}}function Sn(o,e){return 256*(o=mi(Math.floor(o),0,255))+mi(Math.floor(e),0,255)}ze.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,de("SegmentVector",ze);let ln=Zn([{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"}]);var Tn,vn,dn,on={exports:{}}
2,li={exports:{}},Jn={exports:{}},fi=function(){if(dn)return on.exports;dn=1;var o=(Tn||(Tn=1,li.exports=function(r,s){var u,f,_,x,b,M,O,T;for(f=r.length-(u=3&r.length),_=s,b=3432918353,M=461845907,T=0;T<f;)O=255&r.charCodeAt(T)|(255&r.charCodeAt(++T))<<8|(255&r.charCodeAt(++T))<<16|(255&r.charCodeAt(++T))<<24,++T,_=27492+(65535&(x=5*(65535&(_=(_^=O=(65535&(O=(O=(65535&O)*b+(((O>>>16)*b&65535)<<16)&4294967295)<<15|O>>>17))*M+(((O>>>16)*M&65535)<<16)&4294967295)<<13|_>>>19))+((5*(_>>>16)&65535)<<16)&4294967295))+((58964+(x>>>16)&65535)<<16);switch(O=0,u){case 3:O^=(255&r.charCodeAt(T+2))<<16;case 2:O^=(255&r.charCodeAt(T+1))<<8;case 1:_^=O=(65535&(O=(O=(65535&(O^=255&r.charCodeAt(T)))*b+(((O>>>16)*b&65535)<<16)&4294967295)<<15|O>>>17))*M+(((O>>>16)*M&65535)<<16)&4294967295}return _^=r.length,_=2246822507*(65535&(_^=_>>>16))+((2246822507*(_>>>16)&65535)<<16)&4294967295,_=3266489909*(65535&(_^=_>>>13))+((3266489909*(_>>>16)&65535)<<16)&4294967295,(_^=_>>>16)>>>0}),li.exports),e=(vn||(vn=1,Jn.exports=function(r,s){for(var u,f=r.length,_=s^f,x=0;f>=4;)u=1540483477*(65535&(u=255&r.charCodeAt(x)|(255&r.charCodeAt(++x))<<8|(255&r.charCodeAt(++x))<<16|(255&r.charCodeAt(++x))<<24))+((1540483477*(u>>>16)&65535)<<16),_=1540483477*(65535&_)+((1540483477*(_>>>16)&65535)<<16)^(u=1540483477*(65535&(u^=u>>>24))+((1540483477*(u>>>16)&65535)<<16)),f-=4,++x;switch(f){case 3:_^=(255&r.charCodeAt(x+2))<<16;case 2:_^=(255&r.charCodeAt(x+1))<<8;case 1:_=1540483477*(65535&(_^=255&r.charCodeAt(x)))+((1540483477*(_>>>16)&65535)<<16)}return _=1540483477*(65535&(_^=_>>>13))+((1540483477*(_>>>16)&65535)<<16),(_^=_>>>15)>>>0}),Jn.exports);return on.exports=o,on.exports.murmur3=o,on.exports.murmur2=e,on.exports}(),Pi=z(fi);class Vo{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,r,s,u){this.ids.push(Pr(e)),this.positions.push(r,s,u)}getPositions(e){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let r=Pr(e),s=0,u=this.ids.length-1;for(;s<u;){let _=s+u>>1;this.ids[_]>=r?u=_:s=_+1}let f=[];for(;this.ids[s]===r;)f.push({index:this.positions[3*s],start:this.positions[3*s+1],end:this.positions[3*s+2]}),s++;return f}static serialize(e,r){let s=new Float64Array(e.ids),u=new Uint32Array(e.positions);return nr(s,u,0,s.length-1),r&&r.push(s.buffer,u.buffer),{ids:s,positions:u}}static deserialize(e){let r=new Vo;return r.ids=e.ids,r.positions=e.positions,r.indexed=!0,r}}function Pr(o){let e=+o;return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e:Pi(String(o))}function nr(o,e,r,s){for(;r<s;){let u=o[r+s>>1],f=r-1,_=s+1;for(;;){do f++;while(o[f]<u);do _--;while(o[_]>u);if(f>=_)break;ir(o,f,_),ir(e,3*f,3*_),ir(e,3*f+1,3*_+1),ir(e,3*f+2,3*_+2)}_-r<s-_?(nr(o,e,r,_),r=_+1):(nr(o,e,_+1,s),s=_)}}function ir(o,e,r){let s=o[e];o[e]=o[r],o[r]=s}de("FeaturePositionMap",Vo);class jo{constructor(e,r){this.gl=e.gl,this.location=r}}class la extends jo{constructor(e,r){super(e,r),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))}}class ca extends jo{constructor(e,r){super(e,r),this.current=[0,0,0,0]}set(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]&&e[3]===this.current[3]||(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))}}class Qi extends jo{constructor(e,r){super(e,r),this.current=Ne.transparent}set(e){e.r===this.current.r&&e.g===this.current.g&&e.b===this.current.b&&e.a===this.current.a||(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))}}let Or=new Float32Array(16);function or(o){return[Sn(255*o.r,255*o.g),Sn(255*o.b,255*o.a)]}class rr{constructor(e,r,s){this.value=e,this.uniformNames=r.map(u=>`u_${u}`),this.type=s}setUniform(e,r,s){e.set(s.constantOr(this.value))}getBinding(e,r,s){return this.type==="color"?new Qi(e,r):new la(e,r)}}class kn{constructor(e,r){this.uniformNames=r.map(s=>`u_${s}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,r){this.pixelRatioFrom=r.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=r.tlbr,this.patternTo=e.tlbr}setUniform(e,r,s,u){let f=u==="u_pattern_to"?this.patternTo:u==="u_pattern_from"?this.patternFrom:u==="u_pixel_ratio_to"?this.pixelRatioTo:u==="u_pixel_ratio_from"?this.pixelRatioFrom:null;f&&e.set(f)}getBinding(e,r,s){return s.substr(0,9)==="u_pattern"?new ca(e,r):new la(e,r)}}class bn{constructor(e,r,s,u){this.expression=e,this.type=s,this.maxValue=0,this.paintVertexAttributes=r.map(f=>({name:`a_${f}`,type:"Float32",components:s==="color"?2:1,offset:0})),this.paintVertexArray=new u}populatePaintArray(e,r,s,u,f){let _=this.paintVertexArray.length,x=this.expression.evaluate(new xn(0),r,{},u,[],f);this.paintVertexArray.resize(e),this._setPaintValue(_,e,x)}updatePaintArray(e,r,s,u){let f=this.expression.evaluate({zoom:0},s,u);this._setPaintValue(e,r,f)}
2_setPaintValue(e,r,s){if(this.type==="color"){let u=or(s);for(let f=e;f<r;f++)this.paintVertexArray.emplace(f,u[0],u[1])}else{for(let u=e;u<r;u++)this.paintVertexArray.emplace(u,s);this.maxValue=Math.max(this.maxValue,Math.abs(s))}}upload(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class $n{constructor(e,r,s,u,f,_){this.expression=e,this.uniformNames=r.map(x=>`u_${x}_t`),this.type=s,this.useIntegerZoom=u,this.zoom=f,this.maxValue=0,this.paintVertexAttributes=r.map(x=>({name:`a_${x}`,type:"Float32",components:s==="color"?4:2,offset:0})),this.paintVertexArray=new _}populatePaintArray(e,r,s,u,f){let _=this.expression.evaluate(new xn(this.zoom),r,{},u,[],f),x=this.expression.evaluate(new xn(this.zoom+1),r,{},u,[],f),b=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(b,e,_,x)}updatePaintArray(e,r,s,u){let f=this.expression.evaluate({zoom:this.zoom},s,u),_=this.expression.evaluate({zoom:this.zoom+1},s,u);this._setPaintValue(e,r,f,_)}_setPaintValue(e,r,s,u){if(this.type==="color"){let f=or(s),_=or(u);for(let x=e;x<r;x++)this.paintVertexArray.emplace(x,f[0],f[1],_[0],_[1])}else{for(let f=e;f<r;f++)this.paintVertexArray.emplace(f,s,u);this.maxValue=Math.max(this.maxValue,Math.abs(s),Math.abs(u))}}upload(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(e,r){let s=this.useIntegerZoom?Math.floor(r.zoom):r.zoom,u=mi(this.expression.interpolationFactor(s,this.zoom,this.zoom+1),0,1);e.set(u)}getBinding(e,r,s){return new la(e,r)}}class In{constructor(e,r,s,u,f,_){this.expression=e,this.type=r,this.useIntegerZoom=s,this.zoom=u,this.layerId=_,this.zoomInPaintVertexArray=new f,this.zoomOutPaintVertexArray=new f}populatePaintArray(e,r,s){let u=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(e),this.zoomOutPaintVertexArray.resize(e),this._setPaintValues(u,e,r.patterns&&r.patterns[this.layerId],s)}updatePaintArray(e,r,s,u,f){this._setPaintValues(e,r,s.patterns&&s.patterns[this.layerId],f)}_setPaintValues(e,r,s,u){if(!u||!s)return;let{min:f,mid:_,max:x}=s,b=u[f],M=u[_],O=u[x];if(b&&M&&O)for(let T=e;T<r;T++)this.zoomInPaintVertexArray.emplace(T,M.tl[0],M.tl[1],M.br[0],M.br[1],b.tl[0],b.tl[1],b.br[0],b.br[1],M.pixelRatio,b.pixelRatio),this.zoomOutPaintVertexArray.emplace(T,M.tl[0],M.tl[1],M.br[0],M.br[1],O.tl[0],O.tl[1],O.br[0],O.br[1],M.pixelRatio,O.pixelRatio)}upload(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=e.createVertexBuffer(this.zoomInPaintVertexArray,ln.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=e.createVertexBuffer(this.zoomOutPaintVertexArray,ln.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class jp{constructor(e,r,s){this.binders={},this._buffers=[];let u=[];for(let f in e.paint._values){if(!s(f))continue;let _=e.paint.get(f);if(!(_ instanceof Bo&&Ra(_.property.specification)))continue;let x=lh(f,e.type),b=_.value,M=_.property.specification.type,O=_.property.useIntegerZoom,T=_.property.specification["property-type"],F=T==="cross-faded"||T==="cross-faded-data-driven";if(b.kind==="constant")this.binders[f]=F?new kn(b.value,x):new rr(b.value,x,M),u.push(`/u_${f}`);else if(b.kind==="source"||F){let B=Up(f,M,"source");this.binders[f]=F?new In(b,M,O,r,B,e.id):new bn(b,x,M,B),u.push(`/a_${f}`)}else{let B=Up(f,M,"composite");this.binders[f]=new $n(b,x,M,O,r,B),u.push(`/z_${f}`)}}this.cacheKey=u.sort().join("")}getMaxValue(e){let r=this.binders[e];return r instanceof bn||r instanceof $n?r.maxValue:0}populatePaintArrays(e,r,s,u,f){for(let _ in this.binders){let x=this.binders[_];
2(x instanceof bn||x instanceof $n||x instanceof In)&&x.populatePaintArray(e,r,s,u,f)}}setConstantPatternPositions(e,r){for(let s in this.binders){let u=this.binders[s];u instanceof kn&&u.setConstantPatternPositions(e,r)}}updatePaintArrays(e,r,s,u,f){let _=!1;for(let x in e){let b=r.getPositions(x);for(let M of b){let O=s.feature(M.index);for(let T in this.binders){let F=this.binders[T];if((F instanceof bn||F instanceof $n||F instanceof In)&&F.expression.isStateDependent===!0){let B=u.paint.get(T);F.expression=B.value,F.updatePaintArray(M.start,M.end,O,e[x],f),_=!0}}}}return _}defines(){let e=[];for(let r in this.binders){let s=this.binders[r];(s instanceof rr||s instanceof kn)&&e.push(...s.uniformNames.map(u=>`#define HAS_UNIFORM_${u}`))}return e}getBinderAttributes(){let e=[];for(let r in this.binders){let s=this.binders[r];if(s instanceof bn||s instanceof $n)for(let u=0;u<s.paintVertexAttributes.length;u++)e.push(s.paintVertexAttributes[u].name);else if(s instanceof In)for(let u=0;u<ln.members.length;u++)e.push(ln.members[u].name)}return e}getBinderUniforms(){let e=[];for(let r in this.binders){let s=this.binders[r];if(s instanceof rr||s instanceof kn||s instanceof $n)for(let u of s.uniformNames)e.push(u)}return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,r){let s=[];for(let u in this.binders){let f=this.binders[u];if(f instanceof rr||f instanceof kn||f instanceof $n){for(let _ of f.uniformNames)if(r[_]){let x=f.getBinding(e,r[_],_);s.push({name:_,property:u,binding:x})}}}return s}setUniforms(e,r,s,u){for(let{name:f,property:_,binding:x}of r)this.binders[_].setUniform(x,u,s.get(_),f)}updatePaintBuffers(e){this._buffers=[];for(let r in this.binders){let s=this.binders[r];if(e&&s instanceof In){let u=e.fromScale===2?s.zoomInPaintVertexBuffer:s.zoomOutPaintVertexBuffer;u&&this._buffers.push(u)}else(s instanceof bn||s instanceof $n)&&s.paintVertexBuffer&&this._buffers.push(s.paintVertexBuffer)}}upload(e){for(let r in this.binders){let s=this.binders[r];(s instanceof bn||s instanceof $n||s instanceof In)&&s.upload(e)}this.updatePaintBuffers()}destroy(){for(let e in this.binders){let r=this.binders[e];(r instanceof bn||r instanceof $n||r instanceof In)&&r.destroy()}}}class da{constructor(e,r,s=()=>!0){this.programConfigurations={};for(let u of e)this.programConfigurations[u.id]=new jp(u,r,s);this.needsUpload=!1,this._featureMap=new Vo,this._bufferOffset=0}populatePaintArrays(e,r,s,u,f,_){for(let x in this.programConfigurations)this.programConfigurations[x].populatePaintArrays(e,r,u,f,_);r.id!==void 0&&this._featureMap.add(r.id,s,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,r,s,u){for(let f of s)this.needsUpload=this.programConfigurations[f.id].updatePaintArrays(e,this._featureMap,r,f,u)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(let r in this.programConfigurations)this.programConfigurations[r].upload(e);this.needsUpload=!1}}destroy(){for(let e in this.programConfigurations)this.programConfigurations[e].destroy()}}function lh(o,e){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-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"]}[o]||[o.replace(`${e}-`,"").replace(/-/g,"_")]}function Up(o,e,r){let s={color:{source:ja,composite:g},number:{source:m,composite:ja}},u=function(f){return{"line-pattern":{source:Ct,composite:Ct},"fill-pattern":{source:Ct,composite:Ct},"fill-extrusion-pattern":{source:Ct,composite:Ct}}[f]}(o);return u&&u[r]||s[e][r]}de("ConstantBinder",rr),de("CrossFadedConstantBinder",kn),de("SourceExpressionBinder",bn),de("CrossFadedCompositeBinder",In),de("CompositeExpressionBinder",$n),de("ProgramConfiguration",jp,{omit:["_buffers"]}),de("ProgramConfigurationSet",da);let Cd=Math.pow(2,14)-1,$p=-Cd-1;function Ji(o){let e=hn/o.extent,r=o.loadGeometry();for(let s=0;s<r.length;s++){let u=r[s];for(let f=0;f<u.length;f++){let _=u[f],x=Math.round(_.x*e),b=Math.round(_.y*e);
2_.x=mi(x,$p,Cd),_.y=mi(b,$p,Cd),(x<_.x||x>_.x+1||b<_.y||b>_.y+1)&&Ei("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return r}function Sr(o,e){return{type:o.type,id:o.id,properties:o.properties,geometry:e?Ji(o):[]}}let wd=-32768;function Gp(o,e,r,s,u){o.emplaceBack(wd+8*e+s,wd+8*r+u)}class Hs{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new lt,this.indexArray=new Qt,this.segments=new ze,this.programConfigurations=new da(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,s){let u=this.layers[0],f=[],_=null,x=!1,b=u.type==="heatmap";if(u.type==="circle"){let O=u;_=O.layout.get("circle-sort-key"),x=!_.isConstant(),b=b||O.paint.get("circle-pitch-alignment")==="map"}let M=b?r.subdivisionGranularity.circle:1;for(let{feature:O,id:T,index:F,sourceLayerIndex:B}of e){let N=this.layers[0]._featureFilter.needGeometry,$=Sr(O,N);if(!this.layers[0]._featureFilter.filter(new xn(this.zoom),$,s))continue;let W=x?_.evaluate($,{},s):void 0,et={id:T,properties:O.properties,type:O.type,sourceLayerIndex:B,index:F,geometry:N?$.geometry:Ji(O),patterns:{},sortKey:W};f.push(et)}x&&f.sort((O,T)=>O.sortKey-T.sortKey);for(let O of f){let{geometry:T,index:F,sourceLayerIndex:B}=O,N=e[F].feature;this.addFeature(O,T,F,s,M),r.featureIndex.insert(N,T,F,B,this.index)}}update(e,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,s)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Be),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,r,s,u,f=1){let _;switch(f){case 1:_=[0,7];break;case 3:_=[0,2,5,7];break;case 5:_=[0,1,3,4,6,7];break;case 7:_=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${f}; valid values are 1, 3, 5, 7.`)}let x=_.length;for(let b of r)for(let M of b){let O=M.x,T=M.y;if(O<0||O>=hn||T<0||T>=hn)continue;let F=this.segments.prepareSegment(x*x,this.layoutVertexArray,this.indexArray,e.sortKey),B=F.vertexLength;for(let N=0;N<x;N++)for(let $=0;$<x;$++)Gp(this.layoutVertexArray,O,T,_[$],_[N]);for(let N=0;N<x-1;N++)for(let $=0;$<x-1;$++){let W=B+N*x+$,et=B+(N+1)*x+$;this.indexArray.emplaceBack(W,et+1,W+1),this.indexArray.emplaceBack(W,et,et+1)}F.vertexLength+=x*x,F.primitiveLength+=(x-1)*(x-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,s,{},u)}}function Md(o,e){for(let r=0;r<o.length;r++)if(qs(e,o[r]))return!0;for(let r=0;r<e.length;r++)if(qs(o,e[r]))return!0;return!!ch(o,e)}function Pd(o,e,r){return!!qs(o,e)||!!dh(e,o,r)}function _m(o,e){if(o.length===1)return xm(e,o[0]);for(let r=0;r<e.length;r++){let s=e[r];for(let u=0;u<s.length;u++)if(qs(o,s[u]))return!0}for(let r=0;r<o.length;r++)if(xm(e,o[r]))return!0;for(let r=0;r<e.length;r++)if(ch(o,e[r]))return!0;return!1}function g0(o,e,r){if(o.length>1){if(ch(o,e))return!0;for(let s=0;s<e.length;s++)if(dh(e[s],o,r))return!0}for(let s=0;s<o.length;s++)if(dh(o[s],e,r))return!0;return!1}function ch(o,e){if(o.length===0||e.length===0)return!1;for(let r=0;r<o.length-1;r++){let s=o[r],u=o[r+1];for(let f=0;f<e.length-1;f++)if(f0(s,u,e[f],e[f+1]))return!0}return!1}function f0(o,e,r,s){return gn(o,r,s)!==gn(e,r,s)&&gn(o,e,r)!==gn(o,e,s)}function dh(o,e,r){let s=r*r;if(e.length===1)return o.distSqr(e[0])<s;for(let u=1;u<e.length;u++)if(ym(o,e[u-1],e[u])<s)return!0;return!1}function ym(o,e,r){let s=e.distSqr(r);if(s===0)return o.distSqr(e);let u=((o.x-e.x)*(r.x-e.x)+(o.y-e.y)*(r.y-e.y))/s;return o.distSqr(u<0?e:u>1?r:r.sub(e)._mult(u)._add(e))}function xm(o,e){for(let r=0;r<o.length;r++)if(qs(o[r],e))return!0;return!1}function qs(o,e){let r=!1;for(let s=0,u=o.length-1;s<o.length;u=s++){let f=o[s],_=o[u];f.y>e.y!=_.y>e.y&&e.x<(_.x-f.x)*(e.y-f.y)/(_.y-f.y)+f.x&&(r=!r)}return r}function _0(o,e,r){let s=r[0],u=r[2];if(o.x<s.x&&e.x<s.x||o.x>u.x&&e.x>u.x||o.y<s.y&&e.y<s.y||o.y>u.y&&e.y>u.y)return!1;let f=gn(o,e,r[0]);return f!==gn(o,e,r[1])||f!==gn(o,e,r[2])||f!==gn(o,e,r[3])}function Od(o,e,r){let s=e.paint.get(o).value;return s.kind==="constant"?s.value:r.programConfigurations.get(e.id).getMaxValue(o)}function Zp(o){return Math.sqrt(o[0]*o[0]+o[1]*o[1])}function Hp(o,e,r,s,u){if(!e[0]&&!e[1])return o;let f=ne.convert(e)._mult(u);r==="viewport"&&f._rotate(-s);let _=[];for(let x=0;x<o.length;
2x++)_.push(o[x].sub(f));return _}let vm,bm;de("CircleBucket",Hs,{omit:["layers"]});var y0={get paint(){return bm=bm||new ji({"circle-radius":new Oe(H.paint_circle["circle-radius"]),"circle-color":new Oe(H.paint_circle["circle-color"]),"circle-blur":new Oe(H.paint_circle["circle-blur"]),"circle-opacity":new Oe(H.paint_circle["circle-opacity"]),"circle-translate":new ye(H.paint_circle["circle-translate"]),"circle-translate-anchor":new ye(H.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new ye(H.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new ye(H.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Oe(H.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Oe(H.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Oe(H.paint_circle["circle-stroke-opacity"])})},get layout(){return vm=vm||new ji({"circle-sort-key":new Oe(H.layout_circle["circle-sort-key"])})}};class x0 extends No{constructor(e){super(e,y0)}createBucket(e){return new Hs(e)}queryRadius(e){let r=e;return Od("circle-radius",this,r)+Od("circle-stroke-width",this,r)+Zp(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:e,feature:r,featureState:s,geometry:u,transform:f,pixelsToTileUnits:_,unwrappedTileID:x,getElevation:b}){let M=Hp(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-f.bearingInRadians,_),O=this.paint.get("circle-radius").evaluate(r,s)+this.paint.get("circle-stroke-width").evaluate(r,s),T=this.paint.get("circle-pitch-alignment")==="map",F=T?M:function(N,$,W,et){return N.map(mt=>Cm(mt,$,W,et))}(M,f,x,b),B=T?O*_:O;for(let N of u)for(let $ of N){let W=T?$:Cm($,f,x,b),et=B,mt=f.projectTileCoordinates($.x,$.y,x,b).signedDistanceFromCamera;if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?et*=mt/f.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(et*=f.cameraToCenterDistance/mt),Pd(F,W,et))return!0}return!1}}function Cm(o,e,r,s){let u=e.projectTileCoordinates(o.x,o.y,r,s).point;return new ne((.5*u.x+.5)*e.width,(.5*-u.y+.5)*e.height)}class wm extends Hs{}let Mm;de("HeatmapBucket",wm,{omit:["layers"]});var v0={get paint(){return Mm=Mm||new ji({"heatmap-radius":new Oe(H.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Oe(H.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new ye(H.paint_heatmap["heatmap-intensity"]),"heatmap-color":new fd(H.paint_heatmap["heatmap-color"]),"heatmap-opacity":new ye(H.paint_heatmap["heatmap-opacity"])})}};function ph(o,{width:e,height:r},s,u){if(u){if(u instanceof Uint8ClampedArray)u=new Uint8Array(u.buffer);else if(u.length!==e*r*s)throw new RangeError(`mismatched image size. expected: ${u.length} but got: ${e*r*s}`)}else u=new Uint8Array(e*r*s);return o.width=e,o.height=r,o.data=u,o}function Pm(o,{width:e,height:r},s){if(e===o.width&&r===o.height)return;let u=ph({},{width:e,height:r},s);uh(o,u,{x:0,y:0},{x:0,y:0},{width:Math.min(o.width,e),height:Math.min(o.height,r)},s),o.width=e,o.height=r,o.data=u.data}function uh(o,e,r,s,u,f){if(u.width===0||u.height===0)return e;if(u.width>o.width||u.height>o.height||r.x>o.width-u.width||r.y>o.height-u.height)throw new RangeError("out of range source coordinates for image copy");if(u.width>e.width||u.height>e.height||s.x>e.width-u.width||s.y>e.height-u.height)throw new RangeError("out of range destination coordinates for image copy");let _=o.data,x=e.data;if(_===x)throw new Error("srcData equals dstData, so image is already copied");for(let b=0;b<u.height;b++){let M=((r.y+b)*o.width+r.x)*f,O=((s.y+b)*e.width+s.x)*f;for(let T=0;T<u.width*f;T++)x[O+T]=_[M+T]}return e}class Sd{constructor(e,r){ph(this,e,1,r)}resize(e){Pm(this,e,1)}clone(){return new Sd({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,r,s,u,f){uh(e,r,s,u,f,1)}}class yo{constructor(e,r){ph(this,e,4,r)}resize(e){Pm(this,e,4)}replace(e,r){r?this.data.set(e):this.data=e instanceof Uint8ClampedArray?new Uint8Array(e.buffer):e}clone(){return new yo({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,r,s,u,f){uh(e,r,s,u,f,4)}}
2function Om(o){let e={},r=o.resolution||256,s=o.clips?o.clips.length:1,u=o.image||new yo({width:r,height:s});if(Math.log(r)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${r}`);let f=(_,x,b)=>{e[o.evaluationKey]=b;let M=o.expression.evaluate(e);u.data[_+x+0]=Math.floor(255*M.r/M.a),u.data[_+x+1]=Math.floor(255*M.g/M.a),u.data[_+x+2]=Math.floor(255*M.b/M.a),u.data[_+x+3]=Math.floor(255*M.a)};if(o.clips)for(let _=0,x=0;_<s;++_,x+=4*r)for(let b=0,M=0;b<r;b++,M+=4){let O=b/(r-1),{start:T,end:F}=o.clips[_];f(x,M,T*(1-O)+F*O)}else for(let _=0,x=0;_<r;_++,x+=4)f(0,x,_/(r-1));return u}de("AlphaImage",Sd),de("RGBAImage",yo);let hh="big-fb";class b0 extends No{createBucket(e){return new wm(e)}constructor(e){super(e,v0),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(e){e==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Om({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(hh)&&this.heatmapFbos.delete(hh)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let Sm;var C0={get paint(){return Sm=Sm||new ji({"hillshade-illumination-direction":new ye(H.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new ye(H.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new ye(H.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new ye(H.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new ye(H.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new ye(H.paint_hillshade["hillshade-accent-color"])})}};class w0 extends No{constructor(e){super(e,C0)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}let M0=Zn([{name:"a_pos",components:2,type:"Int16"}],4),{members:P0}=M0;function mh(o,e,r){let s=r.patternDependencies,u=!1;for(let f of e){let _=f.paint.get(`${o}-pattern`);_.isConstant()||(u=!0);let x=_.constantOr(null);x&&(u=!0,s[x.to]=!0,s[x.from]=!0)}return u}function gh(o,e,r,s,u){let f=u.patternDependencies;for(let _ of e){let x=_.paint.get(`${o}-pattern`).value;if(x.kind!=="constant"){let b=x.evaluate({zoom:s-1},r,{},u.availableImages),M=x.evaluate({zoom:s},r,{},u.availableImages),O=x.evaluate({zoom:s+1},r,{},u.availableImages);b=b&&b.name?b.name:b,M=M&&M.name?M.name:M,O=O&&O.name?O.name:O,f[b]=!0,f[M]=!0,f[O]=!0,r.patterns[_.id]={min:b,mid:M,max:O}}}return r}function Tm(o,e,r,s,u){let f;if(u===function(_,x,b,M){let O=0;for(let T=x,F=b-M;T<b;T+=M)O+=(_[F]-_[T])*(_[T+1]+_[F+1]),F=T;return O}(o,e,r,s)>0)for(let _=e;_<r;_+=s)f=zm(_/s|0,o[_],o[_+1],f);else for(let _=r-s;_>=e;_-=s)f=zm(_/s|0,o[_],o[_+1],f);return f&&Wl(f,f.next)&&(Ed(f),f=f.next),f}function Ws(o,e){if(!o)return o;e||(e=o);let r,s=o;do if(r=!1,s.steiner||!Wl(s,s.next)&&Hn(s.prev,s,s.next)!==0)s=s.next;else{if(Ed(s),s=e=s.prev,s===s.next)break;r=!0}while(r||s!==e);return e}function Td(o,e,r,s,u,f,_){if(!o)return;!_&&f&&function(b,M,O,T){let F=b;do F.z===0&&(F.z=fh(F.x,F.y,M,O,T)),F.prevZ=F.prev,F.nextZ=F.next,F=F.next;while(F!==b);F.prevZ.nextZ=null,F.prevZ=null,function(B){let N,$=1;do{let W,et=B;B=null;let mt=null;for(N=0;et;){N++;let ot=et,R=0;for(let st=0;st<$&&(R++,ot=ot.nextZ,ot);st++);let q=$;for(;R>0||q>0&&ot;)R!==0&&(q===0||!ot||et.z<=ot.z)?(W=et,et=et.nextZ,R--):(W=ot,ot=ot.nextZ,q--),mt?mt.nextZ=W:B=W,W.prevZ=mt,mt=W;et=ot}mt.nextZ=null,$*=2}while(N>1)}(F)}(o,s,u,f);let x=o;for(;o.prev!==o.next;){let b=o.prev,M=o.next;if(f?S0(o,s,u,f):O0(o))e.push(b.i,o.i,M.i),Ed(o),o=M.next,x=M.next;else if((o=M)===x){_?_===1?Td(o=T0(Ws(o),e),e,r,s,u,f,2):_===2&&I0(o,e,r,s,u,f):Td(Ws(o),e,r,s,u,f,1);break}}}function O0(o){let e=o.prev,r=o,s=o.next;if(Hn(e,r,s)>=0)return!1;let u=e.x,f=r.x,_=s.x,x=e.y,b=r.y,M=s.y,O=Math.min(u,f,_),T=Math.min(x,b,M),F=Math.max(u,f,_),B=Math.max(x,b,M),N=s.next;for(;N!==e;){if(N.x>=O&&N.x<=F&&N.y>=T&&N.y<=B&&Id(u,x,f,b,_,M,N.x,N.y)&&Hn(N.prev,N,N.next)>=0)return!1;N=N.next}return!0}function S0(o,e,r,s){let u=o.prev,f=o,_=o.next;if(Hn(u,f,_)>=0)return!1;let x=u.x,b=f.x,M=_.x,O=u.y,T=f.y,F=_.y,B=Math.min(x,b,M),N=Math.min(O,T,F),$=Math.max(x,b,M),W=Math.max(O,T,F),et=fh(B,N,e,r,s),mt=fh($,W,e,r,s),ot=o.prevZ,R=o.nextZ;for(;ot&&ot.z>=et&&R&&R.z<=mt;){if(ot.x>=B&&ot.x<=$&&ot.y>=N&&ot.y<=W&&ot!==u&&ot!==_&&Id(x,O,b,T,M,F,ot.x,ot.y)&&Hn(ot.prev,ot,ot.next)>=0||(ot=ot.prevZ,R.x>=B&&R.x<=$&&R.y>=N&&R.y<=W&&R!==u&&R!==_&&Id(x,O,b,T,M,F,R.x,R.y)&&Hn(R.prev,R,R.next)>=0))return!1;R=R.nextZ}for(;ot&&ot.z>=et;){if(ot.x>=B&&ot.x<=$&&ot.y>=N&&ot.y<=W&&ot!==u&&ot!==_&&Id(x,O,b,T,M,F,ot.x,ot.y)&&Hn(ot.prev,ot,ot.next)>=0)return!1;ot=ot.prevZ}for(;R&&R.z<=mt;){if(R.x>=B&&R.x<=$&&R.y>=N&&R.y<=W&&R!==u&&R!==_&&Id(x,O,b,T,M,F,R.x,R.y)&&Hn(R.prev,R,R.next)>=0)return!1;R=R.nextZ}return!0}function T0(o,e){let r=o;do{let s=r.prev,u=r.next.next;!Wl(s,u)&&km(s,r,r.next,u)&&kd(s,u)&&kd(u,s)&&(e.push(s.i,r.i,u.i),Ed(r),Ed(r.next),r=o=u),r=r.next}
2while(r!==o);return Ws(r)}function I0(o,e,r,s,u,f){let _=o;do{let x=_.next.next;for(;x!==_.prev;){if(_.i!==x.i&&L0(_,x)){let b=Em(_,x);return _=Ws(_,_.next),b=Ws(b,b.next),Td(_,e,r,s,u,f,0),void Td(b,e,r,s,u,f,0)}x=x.next}_=_.next}while(_!==o)}function k0(o,e){let r=o.x-e.x;return r===0&&(r=o.y-e.y,r===0)&&(r=(o.next.y-o.y)/(o.next.x-o.x)-(e.next.y-e.y)/(e.next.x-e.x)),r}function E0(o,e){let r=function(u,f){let _=f,x=u.x,b=u.y,M,O=-1/0;if(Wl(u,_))return _;do{if(Wl(u,_.next))return _.next;if(b<=_.y&&b>=_.next.y&&_.next.y!==_.y){let $=_.x+(b-_.y)*(_.next.x-_.x)/(_.next.y-_.y);if($<=x&&$>O&&(O=$,M=_.x<_.next.x?_:_.next,$===x))return M}_=_.next}while(_!==f);if(!M)return null;let T=M,F=M.x,B=M.y,N=1/0;_=M;do{if(x>=_.x&&_.x>=F&&x!==_.x&&Im(b<B?x:O,b,F,B,b<B?O:x,b,_.x,_.y)){let $=Math.abs(b-_.y)/(x-_.x);kd(_,u)&&($<N||$===N&&(_.x>M.x||_.x===M.x&&z0(M,_)))&&(M=_,N=$)}_=_.next}while(_!==T);return M}(o,e);if(!r)return e;let s=Em(r,o);return Ws(s,s.next),Ws(r,r.next)}function z0(o,e){return Hn(o.prev,o,e.prev)<0&&Hn(e.next,o,o.next)<0}function fh(o,e,r,s,u){return(o=1431655765&((o=858993459&((o=252645135&((o=16711935&((o=(o-r)*u|0)|o<<8))|o<<4))|o<<2))|o<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-s)*u|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function A0(o){let e=o,r=o;do(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next;while(e!==o);return r}function Im(o,e,r,s,u,f,_,x){return(u-_)*(e-x)>=(o-_)*(f-x)&&(o-_)*(s-x)>=(r-_)*(e-x)&&(r-_)*(f-x)>=(u-_)*(s-x)}function Id(o,e,r,s,u,f,_,x){return!(o===_&&e===x)&&Im(o,e,r,s,u,f,_,x)}function L0(o,e){return o.next.i!==e.i&&o.prev.i!==e.i&&!function(r,s){let u=r;do{if(u.i!==r.i&&u.next.i!==r.i&&u.i!==s.i&&u.next.i!==s.i&&km(u,u.next,r,s))return!0;u=u.next}while(u!==r);return!1}(o,e)&&(kd(o,e)&&kd(e,o)&&function(r,s){let u=r,f=!1,_=(r.x+s.x)/2,x=(r.y+s.y)/2;do u.y>x!=u.next.y>x&&u.next.y!==u.y&&_<(u.next.x-u.x)*(x-u.y)/(u.next.y-u.y)+u.x&&(f=!f),u=u.next;while(u!==r);return f}(o,e)&&(Hn(o.prev,o,e.prev)||Hn(o,e.prev,e))||Wl(o,e)&&Hn(o.prev,o,o.next)>0&&Hn(e.prev,e,e.next)>0)}function Hn(o,e,r){return(e.y-o.y)*(r.x-e.x)-(e.x-o.x)*(r.y-e.y)}function Wl(o,e){return o.x===e.x&&o.y===e.y}function km(o,e,r,s){let u=Wp(Hn(o,e,r)),f=Wp(Hn(o,e,s)),_=Wp(Hn(r,s,o)),x=Wp(Hn(r,s,e));return u!==f&&_!==x||!(u!==0||!qp(o,r,e))||!(f!==0||!qp(o,s,e))||!(_!==0||!qp(r,o,s))||!(x!==0||!qp(r,e,s))}function qp(o,e,r){return e.x<=Math.max(o.x,r.x)&&e.x>=Math.min(o.x,r.x)&&e.y<=Math.max(o.y,r.y)&&e.y>=Math.min(o.y,r.y)}function Wp(o){return o>0?1:o<0?-1:0}function kd(o,e){return Hn(o.prev,o,o.next)<0?Hn(o,e,o.next)>=0&&Hn(o,o.prev,e)>=0:Hn(o,e,o.prev)<0||Hn(o,o.next,e)<0}function Em(o,e){let r=_h(o.i,o.x,o.y),s=_h(e.i,e.x,e.y),u=o.next,f=e.prev;return o.next=e,e.prev=o,r.next=u,u.prev=r,s.next=r,r.prev=s,f.next=s,s.prev=f,s}function zm(o,e,r,s){let u=_h(o,e,r);return s?(u.next=s.next,u.prev=s,s.next.prev=u,s.next=u):(u.prev=u,u.next=u),u}function Ed(o){o.next.prev=o.prev,o.prev.next=o.next,o.prevZ&&(o.prevZ.nextZ=o.nextZ),o.nextZ&&(o.nextZ.prevZ=o.prevZ)}function _h(o,e,r){return{i:o,x:e,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class Xl{constructor(e,r){if(r>e)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=e,this._minGranularity=r}getGranularityForZoomLevel(e){return Math.max(Math.floor(this._baseZoomGranularity/(1<<e)),this._minGranularity,1)}}class Xp{constructor(e){this.fill=e.fill,this.line=e.line,this.tile=e.tile,this.stencil=e.stencil,this.circle=e.circle}}Xp.noSubdivision=new Xp({fill:new Xl(0,0),line:new Xl(0,0),tile:new Xl(0,0),stencil:new Xl(0,0),circle:1}),de("SubdivisionGranularityExpression",Xl),de("SubdivisionGranularitySetting",Xp);let Kl=-32768,zd=32767;class D0{constructor(e,r){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=e,this._granularityCellSize=hn/e,this._canonical=r}_getKey(e,r){return(e+=32768)<<16|(r+=32768)<<0}_vertexToIndex(e,r){if(e<-32768||r<-32768||e>32767||r>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let s=0|Math.round(e),u=0|Math.round(r),f=this._getKey(s,u);if(this._vertexDictionary.has(f))return this._vertexDictionary.get(f);let _=this._vertexBuffer.length/2;return this._vertexDictionary.set(f,_),this._vertexBuffer.push(s,u),_}_subdivideTrianglesScanline(e){if(this._granularity<2)return function(u,f){let _=[];for(let x=0;x<f.length;x+=3){let b=f[x],M=f[x+1],O=f[x+2],T=u[2*b],F=u[2*b+1];(u[2*M]-T)*(u[2*O+1]-F)-(u[2*M+1]-F)*(u[2*O]-T)>0?(_.push(b),_.push(O),_.push(M)):(_.push(b),_.push(M),_.push(O))}return _}(this._vertexBuffer,e);let r=[],s=e.length;for(let u=0;u<s;u+=3){let f=[e[u+0],e[u+1],e[u+2]],_=[this._vertexBuffer[2*e[u+0]+0],this._vertexBuffer[2*e[u+0]+1],this._vertexBuffer[2*e[u+1]+0],this._vertexBuffer[2*e[u+1]+1],this._vertexBuffer[2*e[u+2]+0],this._vertexBuffer[2*e[u+2]+1]],x=1/0,b=1/0,M=-1/0,O=-1/0;for(let $=0;$<3;$++){let W=_[2*$],et=_[2*$+1];x=Math.min(x,W),M=Math.max(M,W),b=Math.min(b,et),O=Math.max(O,et)}if(x===M||b===O)continue;let T=Math.floor(x/this._granularityCellSize),F=Math.ceil(M/this._granularityCellSize),B=Math.floor(b/this._granularityCellSize),N=Math.ceil(O/this._granularityCellSize);if(T!==F||B!==N)for(let $=B;$<N;$++){let W=this._scanlineGenerateVertexRingForCellRow($,_,f);F0(this._vertexBuffer,W,r)}else r.push(...f)}return r}_scanlineGenerateVertexRingForCellRow(e,r,s){let u=e*this._granularityCellSize,f=u+this._granularityCellSize,_=[];for(let x=0;x<3;x++){let b=r[2*x],M=r[2*x+1],O=r[2*(x+1)%6],T=r[(2*(x+1)+1)%6],F=r[2*(x+2)%6],B=r[(2*(x+2)+1)%6],N=O-b,$=T-M,W=N===0,et=$===0,mt=(u-M)/$,ot=(f-M)/$,R=Math.min(mt,ot),q=Math.max(mt,ot);if(!et&&(R>=1||q<=0)||et&&(M<u||M>f)){T>=u&&T<=f&&_.push(s[(x+1)%3]);continue}!et&&R>0&&_.push(this._vertexToIndex(b+N*R,M+$*R));let st=b+N*Math.max(R,0),wt=b+N*Math.min(q,1);W||this._generateIntraEdgeVertices(_,b,M,O,T,st,wt),!et&&q<1&&_.push(this._vertexToIndex(b+N*q,M+$*q)),(et||T>=u&&T<=f)&&_.push(s[(x+1)%3]),!et&&(T<=u||T>=f)&&this._generateInterEdgeVertices(_,b,M,O,T,F,B,wt,u,f)}return _}_generateIntraEdgeVertices(e,r,s,u,f,_,x){let b=u-r,M=f-s,O=M===0,T=O?Math.min(r,u):Math.min(_,x),F=O?Math.max(r,u):Math.max(_,x),B=Math.floor(T/this._granularityCellSize)+1,N=Math.ceil(F/this._granularityCellSize)-1;
2if(O?r<u:_<x)for(let $=B;$<=N;$++){let W=$*this._granularityCellSize;e.push(this._vertexToIndex(W,s+M*(W-r)/b))}else for(let $=N;$>=B;$--){let W=$*this._granularityCellSize;e.push(this._vertexToIndex(W,s+M*(W-r)/b))}}_generateInterEdgeVertices(e,r,s,u,f,_,x,b,M,O){let T=f-s,F=_-u,B=x-f,N=(M-f)/B,$=(O-f)/B,W=Math.min(N,$),et=Math.max(N,$),mt=u+F*W,ot=Math.floor(Math.min(mt,b)/this._granularityCellSize)+1,R=Math.ceil(Math.max(mt,b)/this._granularityCellSize)-1,q=b<mt,st=B===0;if(st&&(x===M||x===O))return;if(st||W>=1||et<=0){let Zt=s-x,It=_+(r-_)*Math.min((M-x)/Zt,(O-x)/Zt);ot=Math.floor(Math.min(It,b)/this._granularityCellSize)+1,R=Math.ceil(Math.max(It,b)/this._granularityCellSize)-1,q=b<It}let wt=T>0?O:M;if(q)for(let Zt=ot;Zt<=R;Zt++)e.push(this._vertexToIndex(Zt*this._granularityCellSize,wt));else for(let Zt=R;Zt>=ot;Zt--)e.push(this._vertexToIndex(Zt*this._granularityCellSize,wt))}_generateOutline(e){let r=[];for(let s of e){let u=Xs(s,this._granularity,!0),f=this._pointArrayToIndices(u),_=[];for(let x=1;x<f.length;x++)_.push(f[x-1]),_.push(f[x]);r.push(_)}return r}_handlePoles(e){let r=!1,s=!1;this._canonical&&(this._canonical.y===0&&(r=!0),this._canonical.y===(1<<this._canonical.z)-1&&(s=!0)),(r||s)&&this._fillPoles(e,r,s)}_ensureNoPoleVertices(){let e=this._vertexBuffer;for(let r=0;r<e.length;r+=2){let s=e[r+1];s===Kl&&(e[r+1]=-32767),s===zd&&(e[r+1]=32766)}}_generatePoleQuad(e,r,s,u,f,_){u>f!=(_===Kl)?(e.push(r),e.push(s),e.push(this._vertexToIndex(u,_)),e.push(s),e.push(this._vertexToIndex(f,_)),e.push(this._vertexToIndex(u,_))):(e.push(s),e.push(r),e.push(this._vertexToIndex(u,_)),e.push(this._vertexToIndex(f,_)),e.push(s),e.push(this._vertexToIndex(u,_)))}_fillPoles(e,r,s){let u=this._vertexBuffer,f=hn,_=e.length;for(let x=2;x<_;x+=3){let b=e[x-2],M=e[x-1],O=e[x],T=u[2*b],F=u[2*b+1],B=u[2*M],N=u[2*M+1],$=u[2*O],W=u[2*O+1];r&&(F===0&&N===0&&this._generatePoleQuad(e,b,M,T,B,Kl),N===0&&W===0&&this._generatePoleQuad(e,M,O,B,$,Kl),W===0&&F===0&&this._generatePoleQuad(e,O,b,$,T,Kl)),s&&(F===f&&N===f&&this._generatePoleQuad(e,b,M,T,B,zd),N===f&&W===f&&this._generatePoleQuad(e,M,O,B,$,zd),W===f&&F===f&&this._generatePoleQuad(e,O,b,$,T,zd))}}_initializeVertices(e){for(let r=0;r<e.length;r+=2)this._vertexToIndex(e[r],e[r+1])}subdividePolygonInternal(e,r){if(this._used)throw new Error("Subdivision: multiple use not allowed.");this._used=!0;let{flattened:s,holeIndices:u}=function(x){let b=[],M=[];for(let O of x)if(O.length!==0){O!==x[0]&&b.push(M.length/2);for(let T=0;T<O.length;T++)M.push(O[T].x),M.push(O[T].y)}return{flattened:M,holeIndices:b}}(e),f;this._initializeVertices(s);try{let x=function(M,O,T=2){let F=O&&O.length,B=F?O[0]*T:M.length,N=Tm(M,0,B,T,!0),$=[];if(!N||N.next===N.prev)return $;let W,et,mt;if(F&&(N=function(ot,R,q,st){let wt=[];for(let Zt=0,It=R.length;Zt<It;Zt++){let Lt=Tm(ot,R[Zt]*st,Zt<It-1?R[Zt+1]*st:ot.length,st,!1);Lt===Lt.next&&(Lt.steiner=!0),wt.push(A0(Lt))}wt.sort(k0);for(let Zt=0;Zt<wt.length;Zt++)q=E0(wt[Zt],q);return q}(M,O,N,T)),M.length>80*T){W=1/0,et=1/0;let ot=-1/0,R=-1/0;for(let q=T;q<B;q+=T){let st=M[q],wt=M[q+1];st<W&&(W=st),wt<et&&(et=wt),st>ot&&(ot=st),wt>R&&(R=wt)}
2mt=Math.max(ot-W,R-et),mt=mt!==0?32767/mt:0}return Td(N,$,T,W,et,mt,0),$}(s,u),b=this._convertIndices(s,x);f=this._subdivideTrianglesScanline(b)}catch(x){console.error(x)}let _=[];return r&&(_=this._generateOutline(e)),this._ensureNoPoleVertices(),this._handlePoles(f),{verticesFlattened:this._vertexBuffer,indicesTriangles:f,indicesLineList:_}}_convertIndices(e,r){let s=[];for(let u=0;u<r.length;u++)s.push(this._vertexToIndex(e[2*r[u]],e[2*r[u]+1]));return s}_pointArrayToIndices(e){let r=[];for(let s=0;s<e.length;s++){let u=e[s];r.push(this._vertexToIndex(u.x,u.y))}return r}}function Am(o,e,r,s=!0){return new D0(r,e).subdividePolygonInternal(o,s)}function Xs(o,e,r=!1){if(!o||o.length<1)return[];if(o.length<2)return[];let s=o[0],u=o[o.length-1],f=r&&(s.x!==u.x||s.y!==u.y);if(e<2)return f?[...o,o[0]]:[...o];let _=Math.floor(hn/e),x=[];x.push(new ne(o[0].x,o[0].y));let b=o.length,M=f?b:b-1;for(let O=0;O<M;O++){let T=o[O],F=O<b-1?o[O+1]:o[0],B=T.x,N=T.y,$=F.x,W=F.y,et=B!==$,mt=N!==W;if(!et&&!mt)continue;let ot=$-B,R=W-N,q=Math.abs(ot),st=Math.abs(R),wt=B,Zt=N;for(;;){let Lt=ot>0?(Math.floor(wt/_)+1)*_:(Math.ceil(wt/_)-1)*_,Wt=R>0?(Math.floor(Zt/_)+1)*_:(Math.ceil(Zt/_)-1)*_,Ht=Math.abs(wt-Lt),Jt=Math.abs(Zt-Wt),Nt=Math.abs(wt-$),he=Math.abs(Zt-W),Me=et?Ht/q:Number.POSITIVE_INFINITY,be=mt?Jt/st:Number.POSITIVE_INFINITY;if((Nt<=Ht||!et)&&(he<=Jt||!mt))break;if(Me<be&&et||!mt){wt=Lt,Zt+=R*Me;let _e=new ne(wt,Math.round(Zt));x[x.length-1].x===_e.x&&x[x.length-1].y===_e.y||x.push(_e)}else{wt+=ot*be,Zt=Wt;let _e=new ne(Math.round(wt),Zt);x[x.length-1].x===_e.x&&x[x.length-1].y===_e.y||x.push(_e)}}let It=new ne($,W);x[x.length-1].x===It.x&&x[x.length-1].y===It.y||x.push(It)}return x}function F0(o,e,r){if(e.length===0)throw new Error("Subdivision vertex ring is empty.");let s=0,u=o[2*e[0]];for(let b=1;b<e.length;b++){let M=o[2*e[b]];M<u&&(u=M,s=b)}let f=e.length,_=s,x=(_+1)%f;for(;;){let b=_-1>=0?_-1:f-1,M=(x+1)%f,O=o[2*e[b]],T=o[2*e[M]],F=o[2*e[_]],B=o[2*e[_]+1],N=o[2*e[x]+1],$=!1;if(O<T)$=!0;else if(O>T)$=!1;else{let W=N-B,et=-(o[2*e[x]]-F),mt=B<N?1:-1;((O-F)*W+(o[2*e[b]+1]-B)*et)*mt>((T-F)*W+(o[2*e[M]+1]-B)*et)*mt&&($=!0)}if($){let W=e[b],et=e[_],mt=e[x];W!==et&&W!==mt&&et!==mt&&r.push(mt,et,W),_--,_<0&&(_=f-1)}else{let W=e[M],et=e[_],mt=e[x];W!==et&&W!==mt&&et!==mt&&r.push(mt,et,W),x++,x>=f&&(x=0)}if(b===M)break}}function Lm(o,e,r,s,u,f,_,x,b){let M=u.length/2,O=_&&x&&b;if(M<ze.MAX_VERTEX_ARRAY_LENGTH){let T=e.prepareSegment(M,r,s),F=T.vertexLength;for(let $=0;$<f.length;$+=3)s.emplaceBack(F+f[$],F+f[$+1],F+f[$+2]);let B,N;T.vertexLength+=M,T.primitiveLength+=f.length/3,O&&(N=_.prepareSegment(M,r,x),B=N.vertexLength,N.vertexLength+=M);for(let $=0;$<u.length;$+=2)o(u[$],u[$+1]);if(O)for(let $=0;$<b.length;$++){let W=b[$];for(let et=1;et<W.length;et+=2)x.emplaceBack(B+W[et-1],B+W[et]);N.primitiveLength+=W.length/2}}else(function(T,F,B,N,$,W){let et=[];for(let st=0;st<N.length/2;st++)et.push(-1);let mt={count:0},ot=0,R=T.getOrCreateLatestSegment(F,B),q=R.vertexLength;for(let st=2;st<$.length;st+=3){let wt=$[st-2],Zt=$[st-1],It=$[st],Lt=et[wt]<ot,Wt=et[Zt]<ot,Ht=et[It]<ot;R.vertexLength+((Lt?1:0)+(Wt?1:0)+(Ht?1:0))>ze.MAX_VERTEX_ARRAY_LENGTH&&(R=T.createNewSegment(F,B),ot=mt.count,Lt=!0,Wt=!0,Ht=!0,q=0);let Jt=Ad(et,N,W,mt,wt,Lt,R),Nt=Ad(et,N,W,mt,Zt,Wt,R),he=Ad(et,N,W,mt,It,Ht,R);B.emplaceBack(q+Jt-ot,q+Nt-ot,q+he-ot),R.primitiveLength++}})(e,r,s,u,f,o),O&&function(T,F,B,N,$,W){let et=[];for(let st=0;st<N.length/2;st++)et.push(-1);let mt={count:0},ot=0,R=T.getOrCreateLatestSegment(F,B),q=R.vertexLength;for(let st=0;st<$.length;st++){let wt=$[st];for(let Zt=1;Zt<$[st].length;Zt+=2){let It=wt[Zt-1],Lt=wt[Zt],Wt=et[It]<ot,Ht=et[Lt]<ot;R.vertexLength+((Wt?1:0)+(Ht?1:0))>ze.MAX_VERTEX_ARRAY_LENGTH&&(R=T.createNewSegment(F,B),ot=mt.count,Wt=!0,Ht=!0,q=0);let Jt=Ad(et,N,W,mt,It,Wt,R),Nt=Ad(et,N,W,mt,Lt,Ht,R);B.emplaceBack(q+Jt-ot,q+Nt-ot),R.primitiveLength++}}}(_,r,x,u,b,o),e.forceNewSegmentOnNextPrepare(),_?.forceNewSegmentOnNextPrepare()}function Ad(o,e,r,s,u,f,_){if(f){let x=s.count;return r(e[2*u],e[2*u+1]),o[u]=s.count,s.count++,_.vertexLength++,x}return o[u]}class yh{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ct,this.indexArray=new Qt,this.indexArray2=new $t,this.programConfigurations=new da(e.layers,e.zoom),this.segments=new ze,this.segments2=new ze,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,s){this.hasPattern=mh("fill",this.layers,r);let u=this.layers[0].layout.get("fill-sort-key"),f=!u.isConstant(),_=[];for(let{feature:x,id:b,index:M,sourceLayerIndex:O}of e){let T=this.layers[0]._featureFilter.needGeometry,F=Sr(x,T);if(!this.layers[0]._featureFilter.filter(new xn(this.zoom),F,s))continue;let B=f?u.evaluate(F,{},s,r.availableImages):void 0,N={id:b,properties:x.properties,type:x.type,sourceLayerIndex:O,index:M,geometry:T?F.geometry:Ji(x),patterns:{},sortKey:B};_.push(N)}f&&_.sort((x,b)=>x.sortKey-b.sortKey);for(let x of _){let{geometry:b,index:M,sourceLayerIndex:O}=x;if(this.hasPattern){let T=gh("fill",this.layers,x,this.zoom,r);this.patternFeatures.push(T)}else this.addFeature(x,b,M,s,{},r.subdivisionGranularity);r.featureIndex.insert(e[M].feature,b,M,O,this.index)}}update(e,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,s)}addFeatures(e,r,s){for(let u of this.patternFeatures)this.addFeature(u,u.geometry,u.index,r,s,e.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,P0),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),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(e,r,s,u,f,_){for(let x of vl(r,500)){let b=Am(x,u,_.fill.getGranularityForZoomLevel(u.z)),M=this.layoutVertexArray;Lm((O,T)=>{M.emplaceBack(O,T)},this.segments,this.layoutVertexArray,this.indexArray,b.verticesFlattened,b.indicesTriangles,this.segments2,this.indexArray2,b.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,s,f,u)}}let Dm,Fm;de("FillBucket",yh,{omit:["layers","patternFeatures"]});var R0={get paint(){return Fm=Fm||new ji({"fill-antialias":new ye(H.paint_fill["fill-antialias"]),"fill-opacity":new Oe(H.paint_fill["fill-opacity"]),"fill-color":new Oe(H.paint_fill["fill-color"]),"fill-outline-color":new Oe(H.paint_fill["fill-outline-color"]),"fill-translate":new ye(H.paint_fill["fill-translate"]),"fill-translate-anchor":new ye(H.paint_fill["fill-translate-anchor"]),"fill-pattern":new js(H.paint_fill["fill-pattern"])})},get layout(){return Dm=Dm||new ji({"fill-sort-key":new Oe(H.layout_fill["fill-sort-key"])})}};class B0 extends No{constructor(e){super(e,R0)}recalculate(e,r){super.recalculate(e,r);let s=this.paint._values["fill-outline-color"];s.value.kind==="constant"&&s.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new yh(e)}queryRadius(){return Zp(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:e,geometry:r,transform:s,pixelsToTileUnits:u}){return _m(Hp(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-s.bearingInRadians,u),r)}
2isTileClipped(){return!0}}let N0=Zn([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),V0=Zn([{name:"a_centroid",components:2,type:"Int16"}],4),{members:j0}=N0;var xh,Rm,vh,Bm,bh,Nm,Vm,Kp={};function jm(){if(Rm)return xh;Rm=1;var o=ie();function e(u,f,_,x,b){this.properties={},this.extent=_,this.type=0,this._pbf=u,this._geometry=-1,this._keys=x,this._values=b,u.readFields(r,this,f)}function r(u,f,_){u==1?f.id=_.readVarint():u==2?function(x,b){for(var M=x.readVarint()+x.pos;x.pos<M;){var O=b._keys[x.readVarint()],T=b._values[x.readVarint()];b.properties[O]=T}}(_,f):u==3?f.type=_.readVarint():u==4&&(f._geometry=_.pos)}function s(u){for(var f,_,x=0,b=0,M=u.length,O=M-1;b<M;O=b++)x+=((_=u[O]).x-(f=u[b]).x)*(f.y+_.y);return x}return xh=e,e.types=["Unknown","Point","LineString","Polygon"],e.prototype.loadGeometry=function(){var u=this._pbf;u.pos=this._geometry;for(var f,_=u.readVarint()+u.pos,x=1,b=0,M=0,O=0,T=[];u.pos<_;){if(b<=0){var F=u.readVarint();x=7&F,b=F>>3}if(b--,x===1||x===2)M+=u.readSVarint(),O+=u.readSVarint(),x===1&&(f&&T.push(f),f=[]),f.push(new o(M,O));else{if(x!==7)throw new Error("unknown command "+x);f&&f.push(f[0].clone())}}return f&&T.push(f),T},e.prototype.bbox=function(){var u=this._pbf;u.pos=this._geometry;for(var f=u.readVarint()+u.pos,_=1,x=0,b=0,M=0,O=1/0,T=-1/0,F=1/0,B=-1/0;u.pos<f;){if(x<=0){var N=u.readVarint();_=7&N,x=N>>3}if(x--,_===1||_===2)(b+=u.readSVarint())<O&&(O=b),b>T&&(T=b),(M+=u.readSVarint())<F&&(F=M),M>B&&(B=M);else if(_!==7)throw new Error("unknown command "+_)}return[O,F,T,B]},e.prototype.toGeoJSON=function(u,f,_){var x,b,M=this.extent*Math.pow(2,_),O=this.extent*u,T=this.extent*f,F=this.loadGeometry(),B=e.types[this.type];function N(et){for(var mt=0;mt<et.length;mt++){var ot=et[mt];et[mt]=[360*(ot.x+O)/M-180,360/Math.PI*Math.atan(Math.exp((180-360*(ot.y+T)/M)*Math.PI/180))-90]}}switch(this.type){case 1:var $=[];for(x=0;x<F.length;x++)$[x]=F[x][0];N(F=$);break;case 2:for(x=0;x<F.length;x++)N(F[x]);break;case 3:for(F=function(et){var mt=et.length;if(mt<=1)return[et];for(var ot,R,q=[],st=0;st<mt;st++){var wt=s(et[st]);wt!==0&&(R===void 0&&(R=wt<0),R===wt<0?(ot&&q.push(ot),ot=[et[st]]):ot.push(et[st]))}return ot&&q.push(ot),q}(F),x=0;x<F.length;x++)for(b=0;b<F[x].length;b++)N(F[x][b])}F.length===1?F=F[0]:B="Multi"+B;var W={type:"Feature",geometry:{type:B,coordinates:F},properties:this.properties};return"id"in this&&(W.id=this.id),W},xh}function Um(){if(Bm)return vh;Bm=1;var o=jm();function e(s,u){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=s,this._keys=[],this._values=[],this._features=[],s.readFields(r,this,u),this.length=this._features.length}function r(s,u,f){s===15?u.version=f.readVarint():s===1?u.name=f.readString():s===5?u.extent=f.readVarint():s===2?u._features.push(f.pos):s===3?u._keys.push(f.readString()):s===4&&u._values.push(function(_){for(var x=null,b=_.readVarint()+_.pos;_.pos<b;){var M=_.readVarint()>>3;x=M===1?_.readString():M===2?_.readFloat():M===3?_.readDouble():M===4?_.readVarint64():M===5?_.readVarint():M===6?_.readSVarint():M===7?_.readBoolean():null}return x}(f))}return vh=e,e.prototype.feature=function(s){if(s<0||s>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[s];var u=this._pbf.readVarint()+this._pbf.pos;return new o(this._pbf,u,this.extent,this._keys,this._values)},vh}function $m(){return Vm||(Vm=1,Kp.VectorTile=function(){if(Nm)return bh;Nm=1;var o=Um();function e(r,s,u){if(r===3){var f=new o(u,u.readVarint()+u.pos);f.length&&(s[f.name]=f)}}return bh=function(r,s){this.layers=r.readFields(e,{},s)},bh}(),Kp.VectorTileFeature=jm(),Kp.VectorTileLayer=Um()),Kp}var Ld=z($m());let U0=Ld.VectorTileFeature.types,Ch=Math.pow(2,13);function Dd(o,e,r,s,u,f,_,x){o.emplaceBack(e,r,2*Math.floor(s*Ch)+_,u*Ch*2,f*Ch*2,Math.round(x))}class wh{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new pt,this.centroidVertexArray=new nt,this.indexArray=new Qt,this.programConfigurations=new da(e.layers,e.zoom),this.segments=new ze,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,s){this.features=[],this.hasPattern=mh("fill-extrusion",this.layers,r);for(let{feature:u,id:f,index:_,sourceLayerIndex:x}of e){let b=this.layers[0]._featureFilter.needGeometry,M=Sr(u,b);if(!this.layers[0]._featureFilter.filter(new xn(this.zoom),M,s))continue;let O={id:f,sourceLayerIndex:x,index:_,geometry:b?M.geometry:Ji(u),properties:u.properties,type:u.type,patterns:{}};this.hasPattern?this.features.push(gh("fill-extrusion",this.layers,O,this.zoom,r)):this.addFeature(O,O.geometry,_,s,{},r.subdivisionGranularity),r.featureIndex.insert(u,O.geometry,_,x,this.index,!0)}}addFeatures(e,r,s){for(let u of this.features){let{geometry:f}=u;this.addFeature(u,f,u.index,r,s,e.subdivisionGranularity)}}update(e,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,s)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,j0),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,V0.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,r,s,u,f,_){for(let x of vl(r,500)){let b={x:0,y:0,sampleCount:0},M=this.layoutVertexArray.length;this.processPolygon(b,u,e,x,_);
2let O=this.layoutVertexArray.length-M,T=Math.floor(b.x/b.sampleCount),F=Math.floor(b.y/b.sampleCount);for(let B=0;B<O;B++)this.centroidVertexArray.emplaceBack(T,F)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,s,f,u)}processPolygon(e,r,s,u,f){if(u.length<1||Gm(u[0]))return;for(let T of u)T.length!==0&&$0(e,T);let _={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},x=f.fill.getGranularityForZoomLevel(r.z),b=U0[s.type]==="Polygon";for(let T of u){if(T.length===0||Gm(T))continue;let F=Xs(T,x,b);this._generateSideFaces(F,_)}if(!b)return;let M=Am(u,r,x,!1),O=this.layoutVertexArray;Lm((T,F)=>{Dd(O,T,F,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,M.verticesFlattened,M.indicesTriangles)}_generateSideFaces(e,r){let s=0;for(let u=1;u<e.length;u++){let f=e[u],_=e[u-1];if(G0(f,_))continue;r.segment.vertexLength+4>ze.MAX_VERTEX_ARRAY_LENGTH&&(r.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let x=f.sub(_)._perp()._unit(),b=_.dist(f);s+b>32768&&(s=0),Dd(this.layoutVertexArray,f.x,f.y,x.x,x.y,0,0,s),Dd(this.layoutVertexArray,f.x,f.y,x.x,x.y,0,1,s),s+=b,Dd(this.layoutVertexArray,_.x,_.y,x.x,x.y,0,0,s),Dd(this.layoutVertexArray,_.x,_.y,x.x,x.y,0,1,s);let M=r.segment.vertexLength;this.indexArray.emplaceBack(M,M+2,M+1),this.indexArray.emplaceBack(M+1,M+2,M+3),r.segment.vertexLength+=4,r.segment.primitiveLength+=2}}}function $0(o,e){for(let r=0;r<e.length;r++){let s=e[r];r===e.length-1&&e[0].x===s.x&&e[0].y===s.y||(o.x+=s.x,o.y+=s.y,o.sampleCount++)}}function G0(o,e){return o.x===e.x&&(o.x<0||o.x>hn)||o.y===e.y&&(o.y<0||o.y>hn)}function Gm(o){return o.every(e=>e.x<0)||o.every(e=>e.x>hn)||o.every(e=>e.y<0)||o.every(e=>e.y>hn)}let Zm;de("FillExtrusionBucket",wh,{omit:["layers","features"]});var Z0={get paint(){return Zm=Zm||new ji({"fill-extrusion-opacity":new ye(H["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Oe(H["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ye(H["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ye(H["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new js(H["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Oe(H["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Oe(H["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ye(H["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class H0 extends No{constructor(e){super(e,Z0)}createBucket(e){return new wh(e)}queryRadius(){return Zp(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:e,feature:r,featureState:s,geometry:u,transform:f,pixelsToTileUnits:_,pixelPosMatrix:x}){let b=Hp(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-f.bearingInRadians,_),M=this.paint.get("fill-extrusion-height").evaluate(r,s),O=this.paint.get("fill-extrusion-base").evaluate(r,s),T=function(B,N,$){let W=[];for(let et of B){let mt=[et.x,et.y,0,1];bi(mt,mt,N),W.push(new ne(mt[0]/mt[3],mt[1]/mt[3]))}return W}(b,x),F=function(B,N,$,W){let et=[],mt=[],ot=W[8]*N,R=W[9]*N,q=W[10]*N,st=W[11]*N,wt=W[8]*$,Zt=W[9]*$,It=W[10]*$,Lt=W[11]*$;for(let Wt of B){let Ht=[],Jt=[];for(let Nt of Wt){let he=Nt.x,Me=Nt.y,be=W[0]*he+W[4]*Me+W[12],_e=W[1]*he+W[5]*Me+W[13],Ue=W[2]*he+W[6]*Me+W[14],jn=W[3]*he+W[7]*Me+W[15],ei=Ue+q,Si=jn+st,vo=be+wt,eo=_e+Zt,_i=Ue+It,En=jn+Lt,ci=new ne((be+ot)/Si,(_e+R)/Si);ci.z=ei/Si,Ht.push(ci);let yi=new ne(vo/En,eo/En);yi.z=_i/En,Jt.push(yi)}et.push(Ht),mt.push(Jt)}return[et,mt]}(u,O,M,x);return function(B,N,$){let W=1/0;_m($,N)&&(W=Hm($,N[0]));for(let et=0;et<N.length;et++){let mt=N[et],ot=B[et];for(let R=0;R<mt.length-1;R++){let q=mt[R],st=[q,mt[R+1],ot[R+1],ot[R],q];Md($,st)&&(W=Math.min(W,Hm($,st)))}}return W!==1/0&&W}(F[0],F[1],T)}}function Fd(o,e){return o.x*e.x+o.y*e.y}function Hm(o,e){if(o.length===1){let r=0,s=e[r++],u;for(;!u||s.equals(u);)if(u=e[r++],!u)return 1/0;for(;r<e.length;r++){let f=e[r],_=o[0],x=u.sub(s),b=f.sub(s),M=_.sub(s),O=Fd(x,x),T=Fd(x,b),F=Fd(b,b),B=Fd(M,x),N=Fd(M,b),$=O*F-T*T,W=(F*B-T*N)/$,et=(O*N-T*B)/$,mt=s.z*(1-W-et)+u.z*W+f.z*et;if(isFinite(mt))return mt}return 1/0}{let r=1/0;for(let s of e)r=Math.min(r,s.z);return r}}let q0=Zn([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:W0}=q0,X0=Zn([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:K0}=X0,Y0=Ld.VectorTileFeature.types,Q0=Math.cos(Math.PI/180*37.5),qm=Math.pow(2,14)/.5;class Mh{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={}
2,this.layers.forEach(r=>{this.gradients[r.id]={}}),this.layoutVertexArray=new ft,this.layoutVertexArray2=new ht,this.indexArray=new Qt,this.programConfigurations=new da(e.layers,e.zoom),this.segments=new ze,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,s){this.hasPattern=mh("line",this.layers,r);let u=this.layers[0].layout.get("line-sort-key"),f=!u.isConstant(),_=[];for(let{feature:x,id:b,index:M,sourceLayerIndex:O}of e){let T=this.layers[0]._featureFilter.needGeometry,F=Sr(x,T);if(!this.layers[0]._featureFilter.filter(new xn(this.zoom),F,s))continue;let B=f?u.evaluate(F,{},s):void 0,N={id:b,properties:x.properties,type:x.type,sourceLayerIndex:O,index:M,geometry:T?F.geometry:Ji(x),patterns:{},sortKey:B};_.push(N)}f&&_.sort((x,b)=>x.sortKey-b.sortKey);for(let x of _){let{geometry:b,index:M,sourceLayerIndex:O}=x;if(this.hasPattern){let T=gh("line",this.layers,x,this.zoom,r);this.patternFeatures.push(T)}else this.addFeature(x,b,M,s,{},r.subdivisionGranularity);r.featureIndex.insert(e[M].feature,b,M,O,this.index)}}update(e,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,s)}addFeatures(e,r,s){for(let u of this.patternFeatures)this.addFeature(u,u.geometry,u.index,r,s,e.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,K0)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,W0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}}addFeature(e,r,s,u,f,_){let x=this.layers[0].layout,b=x.get("line-join").evaluate(e,{}),M=x.get("line-cap"),O=x.get("line-miter-limit"),T=x.get("line-round-limit");this.lineClips=this.lineFeatureClips(e);for(let F of r)this.addLine(F,e,b,M,O,T,u,_);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,s,f,u)}addLine(e,r,s,u,f,_,x,b){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,e=Xs(e,x?b.line.getGranularityForZoomLevel(x.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let ot=0;ot<e.length-1;ot++)this.totalDistance+=e[ot].dist(e[ot+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}let M=Y0[r.type]==="Polygon",O=e.length;for(;O>=2&&e[O-1].equals(e[O-2]);)O--;let T=0;for(;T<O-1&&e[T].equals(e[T+1]);)T++;if(O<(M?3:2))return;s==="bevel"&&(f=1.05);let F=this.overscaling<=16?15*hn/(512*this.overscaling):0,B=this.segments.prepareSegment(10*O,this.layoutVertexArray,this.indexArray),N,$,W,et,mt;this.e1=this.e2=-1,M&&(N=e[O-2],mt=e[T].sub(N)._unit()._perp());for(let ot=T;ot<O;ot++){if(W=ot===O-1?M?e[T+1]:void 0:e[ot+1],W&&e[ot].equals(W))continue;mt&&(et=mt),N&&($=N),N=e[ot],mt=W?W.sub(N)._unit()._perp():et,et=et||mt;let R=et.add(mt);R.x===0&&R.y===0||R._unit();let q=et.x*mt.x+et.y*mt.y,st=R.x*mt.x+R.y*mt.y,wt=st!==0?1/st:1/0,Zt=2*Math.sqrt(2-2*st),It=st<Q0&&$&&W,Lt=et.x*mt.y-et.y*mt.x>0;if(It&&ot>T){let Jt=N.dist($);if(Jt>2*F){let Nt=N.sub(N.sub($)._mult(F/Jt)._round());this.updateDistance($,Nt),this.addCurrentVertex(Nt,et,0,0,B),$=Nt}}let Wt=$&&W,Ht=Wt?s:M?"butt":u;if(Wt&&Ht==="round"&&(wt<_?Ht="miter":wt<=2&&(Ht="fakeround")),Ht==="miter"&&wt>f&&(Ht="bevel"),Ht==="bevel"&&(wt>2&&(Ht="flipbevel"),wt<f&&(Ht="miter")),$&&this.updateDistance($,N),Ht==="miter")R._mult(wt),this.addCurrentVertex(N,R,0,0,B);else if(Ht==="flipbevel"){if(wt>100)R=mt.mult(-1);else{let Jt=wt*et.add(mt).mag()/et.sub(mt).mag();R._perp()._mult(Jt*(Lt?-1:1))}this.addCurrentVertex(N,R,0,0,B),this.addCurrentVertex(N,R.mult(-1),0,0,B)}else if(Ht==="bevel"||Ht==="fakeround"){let Jt=-Math.sqrt(wt*wt-1),Nt=Lt?Jt:0,he=Lt?0:Jt;if($&&this.addCurrentVertex(N,et,Nt,he,B),Ht==="fakeround"){let Me=Math.round(180*Zt/Math.PI/20);for(let be=1;be<Me;be++){let _e=be/Me;if(_e!==.5){let jn=_e-.5;_e+=_e*jn*(_e-1)*((1.0904+q*(q*(3.55645-1.43519*q)-3.2452))*jn*jn+(.848013+q*(.215638*q-1.06021)))}let Ue=mt.sub(et)._mult(_e)._add(et)._unit()._mult(Lt?-1:1);this.addHalfVertex(N,Ue.x,Ue.y,!1,Lt,0,B)}}W&&this.addCurrentVertex(N,mt,-Nt,-he,B)}else if(Ht==="butt")this.addCurrentVertex(N,R,0,0,B);else if(Ht==="square"){let Jt=$?1:-1;this.addCurrentVertex(N,R,Jt,Jt,B)}else Ht==="round"&&($&&(this.addCurrentVertex(N,et,0,0,B),this.addCurrentVertex(N,et,1,1,B,!0)),W&&(this.addCurrentVertex(N,mt,-1,-1,B,!0),this.addCurrentVertex(N,mt,0,0,B)));if(It&&ot<O-1){let Jt=N.dist(W);if(Jt>2*F){let Nt=N.add(W.sub(N)._mult(F/Jt)._round());this.updateDistance(N,Nt),this.addCurrentVertex(Nt,mt,0,0,B),N=Nt}}}}addCurrentVertex(e,r,s,u,f,_=!1){let x=r.y*u-r.x,b=-r.y-r.x*u;this.addHalfVertex(e,r.x+r.y*s,r.y-r.x*s,_,!1,s,f),this.addHalfVertex(e,x,b,_,!0,-u,f),this.distance>qm/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,r,s,u,f,_))}addHalfVertex({x:e,y:r},s,u,f,_,x,b){let M=.5*(this.lineClips?this.scaledDistance*(qm-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((e<<1)+(f?1:0),(r<<1)+(_?1:0),Math.round(63*s)+128,Math.round(63*u)+128,1+(x===0?0:x<0?-1:1)|(63&M)<<2,M>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let O=b.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,O,this.e2),b.primitiveLength++),_?this.e2=O:this.e1=O}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,r){this.distance+=e.dist(r),this.updateScaledDistance()}}let Wm,Xm;de("LineBucket",Mh,{omit:["layers","patternFeatures"]});var Km={get paint(){return Xm=Xm||new ji({"line-opacity":new Oe(H.paint_line["line-opacity"]),"line-color":new Oe(H.paint_line["line-color"]),"line-translate":new ye(H.paint_line["line-translate"]),"line-translate-anchor":new ye(H.paint_line["line-translate-anchor"]),"line-width":new Oe(H.paint_line["line-width"]),"line-gap-width":new Oe(H.paint_line["line-gap-width"]),"line-offset":new Oe(H.paint_line["line-offset"]),"line-blur"
2:new Oe(H.paint_line["line-blur"]),"line-dasharray":new gd(H.paint_line["line-dasharray"]),"line-pattern":new js(H.paint_line["line-pattern"]),"line-gradient":new fd(H.paint_line["line-gradient"])})},get layout(){return Wm=Wm||new ji({"line-cap":new ye(H.layout_line["line-cap"]),"line-join":new Oe(H.layout_line["line-join"]),"line-miter-limit":new ye(H.layout_line["line-miter-limit"]),"line-round-limit":new ye(H.layout_line["line-round-limit"]),"line-sort-key":new Oe(H.layout_line["line-sort-key"])})}};class J0 extends Oe{possiblyEvaluate(e,r){return r=new xn(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),super.possiblyEvaluate(e,r)}evaluate(e,r,s,u){return r=qi({},r,{zoom:Math.floor(r.zoom)}),super.evaluate(e,r,s,u)}}let Yp;class ty extends No{constructor(e){super(e,Km),this.gradientVersion=0,Yp||(Yp=new J0(Km.paint.properties["line-width"].specification),Yp.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if(e==="line-gradient"){let r=this.gradientExpression();this.stepInterpolant=!!function(s){return s._styleExpression!==void 0}(r)&&r._styleExpression.expression instanceof Ms,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,r){super.recalculate(e,r),this.paint._values["line-floorwidth"]=Yp.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new Mh(e)}queryRadius(e){let r=e,s=Ym(Od("line-width",this,r),Od("line-gap-width",this,r)),u=Od("line-offset",this,r);return s/2+Math.abs(u)+Zp(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:e,feature:r,featureState:s,geometry:u,transform:f,pixelsToTileUnits:_}){let x=Hp(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-f.bearingInRadians,_),b=_/2*Ym(this.paint.get("line-width").evaluate(r,s),this.paint.get("line-gap-width").evaluate(r,s)),M=this.paint.get("line-offset").evaluate(r,s);return M&&(u=function(O,T){let F=[];for(let B=0;B<O.length;B++){let N=O[B],$=[];for(let W=0;W<N.length;W++){let et=N[W-1],mt=N[W],ot=N[W+1],R=W===0?new ne(0,0):mt.sub(et)._unit()._perp(),q=W===N.length-1?new ne(0,0):ot.sub(mt)._unit()._perp(),st=R._add(q)._unit(),wt=st.x*q.x+st.y*q.y;wt!==0&&st._mult(1/wt),$.push(st._mult(T)._add(mt))}F.push($)}return F}(u,M*_)),function(O,T,F){for(let B=0;B<T.length;B++){let N=T[B];if(O.length>=3){for(let $=0;$<N.length;$++)if(qs(O,N[$]))return!0}if(g0(O,N,F))return!0}return!1}(x,u,b)}isTileClipped(){return!0}}function Ym(o,e){return e>0?e+2*o:o}let ey=Zn([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),ny=Zn([{name:"a_projected_pos",components:3,type:"Float32"}],4);Zn([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let iy=Zn([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Zn([{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 Qm=Zn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),oy=Zn([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function ry(o,e,r){return o.sections.forEach(s=>{s.text=function(u,f,_){let x=f.layout.get("text-transform").evaluate(_,{});return x==="uppercase"?u=u.toLocaleUpperCase():x==="lowercase"&&(u=u.toLocaleLowerCase()),Mr.applyArabicShaping&&(u=Mr.applyArabicShaping(u)),u}(s.text,e,r)}),o}Zn([{name:"triangle",components:3,type:"Uint16"}]),Zn([{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"}]),Zn([{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"}]),Zn([{type:"Float32",name:"offsetX"}]),Zn([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Zn([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let Rd={"!":"\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"
2:"\uFE42"};var Jm,Ph,tg,ti=24,Oh={};function ay(){return Jm||(Jm=1,Oh.read=function(o,e,r,s,u){var f,_,x=8*u-s-1,b=(1<<x)-1,M=b>>1,O=-7,T=r?u-1:0,F=r?-1:1,B=o[e+T];for(T+=F,f=B&(1<<-O)-1,B>>=-O,O+=x;O>0;f=256*f+o[e+T],T+=F,O-=8);for(_=f&(1<<-O)-1,f>>=-O,O+=s;O>0;_=256*_+o[e+T],T+=F,O-=8);if(f===0)f=1-M;else{if(f===b)return _?NaN:1/0*(B?-1:1);_+=Math.pow(2,s),f-=M}return(B?-1:1)*_*Math.pow(2,f-s)},Oh.write=function(o,e,r,s,u,f){var _,x,b,M=8*f-u-1,O=(1<<M)-1,T=O>>1,F=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=s?0:f-1,N=s?1:-1,$=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(x=isNaN(e)?1:0,_=O):(_=Math.floor(Math.log(e)/Math.LN2),e*(b=Math.pow(2,-_))<1&&(_--,b*=2),(e+=_+T>=1?F/b:F*Math.pow(2,1-T))*b>=2&&(_++,b/=2),_+T>=O?(x=0,_=O):_+T>=1?(x=(e*b-1)*Math.pow(2,u),_+=T):(x=e*Math.pow(2,T-1)*Math.pow(2,u),_=0));u>=8;o[r+B]=255&x,B+=N,x/=256,u-=8);for(_=_<<u|x,M+=u;M>0;o[r+B]=255&_,B+=N,_/=256,M-=8);o[r+B-N]|=128*$}),Oh}function eg(){if(tg)return Ph;tg=1,Ph=e;var o=ay();function e(R){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(R)?R:new Uint8Array(R||0),this.pos=0,this.type=0,this.length=this.buf.length}e.Varint=0,e.Fixed64=1,e.Bytes=2,e.Fixed32=5;var r=4294967296,s=1/r,u=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function f(R){return R.type===e.Bytes?R.readVarint()+R.pos:R.pos+1}function _(R,q,st){return st?4294967296*q+(R>>>0):4294967296*(q>>>0)+(R>>>0)}function x(R,q,st){var wt=q<=16383?1:q<=2097151?2:q<=268435455?3:Math.floor(Math.log(q)/(7*Math.LN2));st.realloc(wt);for(var Zt=st.pos-1;Zt>=R;Zt--)st.buf[Zt+wt]=st.buf[Zt]}function b(R,q){for(var st=0;st<R.length;st++)q.writeVarint(R[st])}function M(R,q){for(var st=0;st<R.length;st++)q.writeSVarint(R[st])}function O(R,q){for(var st=0;st<R.length;st++)q.writeFloat(R[st])}function T(R,q){for(var st=0;st<R.length;st++)q.writeDouble(R[st])}function F(R,q){for(var st=0;st<R.length;st++)q.writeBoolean(R[st])}function B(R,q){for(var st=0;st<R.length;st++)q.writeFixed32(R[st])}function N(R,q){for(var st=0;st<R.length;st++)q.writeSFixed32(R[st])}function $(R,q){for(var st=0;st<R.length;st++)q.writeFixed64(R[st])}function W(R,q){for(var st=0;st<R.length;st++)q.writeSFixed64(R[st])}function et(R,q){return(R[q]|R[q+1]<<8|R[q+2]<<16)+16777216*R[q+3]}function mt(R,q,st){R[st]=q,R[st+1]=q>>>8,R[st+2]=q>>>16,R[st+3]=q>>>24}function ot(R,q){return(R[q]|R[q+1]<<8|R[q+2]<<16)+(R[q+3]<<24)}return e.prototype={destroy:function(){this.buf=null},readFields:function(R,q,st){for(st=st||this.length;this.pos<st;){var wt=this.readVarint(),Zt=wt>>3,It=this.pos;this.type=7&wt,R(Zt,q,this),this.pos===It&&this.skip(wt)}return q},readMessage:function(R,q){return this.readFields(R,q,this.readVarint()+this.pos)},readFixed32:function(){var R=et(this.buf,this.pos);return this.pos+=4,R},readSFixed32:function(){var R=ot(this.buf,this.pos);return this.pos+=4,R},readFixed64:function(){var R=et(this.buf,this.pos)+et(this.buf,this.pos+4)*r;return this.pos+=8,R},readSFixed64:function(){var R=et(this.buf,this.pos)+ot(this.buf,this.pos+4)*r;return this.pos+=8,R},readFloat:function(){var R=o.read(this.buf,this.pos,!0,23,4);return this.pos+=4,R},readDouble:function(){var R=o.read(this.buf,this.pos,!0,52,8);return this.pos+=8,R},readVarint:function(R){var q,st,wt=this.buf;return q=127&(st=wt[this.pos++]),st<128?q:(q|=(127&(st=wt[this.pos++]))<<7,st<128?q:(q|=(127&(st=wt[this.pos++]))<<14,st<128?q:(q|=(127&(st=wt[this.pos++]))<<21,st<128?q:function(Zt,It,Lt){var Wt,Ht,Jt=Lt.buf;if(Wt=(112&(Ht=Jt[Lt.pos++]))>>4,Ht<128||(Wt|=(127&(Ht=Jt[Lt.pos++]))<<3,Ht<128)||(Wt|=(127&(Ht=Jt[Lt.pos++]))<<10,Ht<128)||(Wt|=(127&(Ht=Jt[Lt.pos++]))<<17,Ht<128)||(Wt|=(127&(Ht=Jt[Lt.pos++]))<<24,Ht<128)||(Wt|=(1&(Ht=Jt[Lt.pos++]))<<31,Ht<128))return _(Zt,Wt,It);throw new Error("Expected varint not more than 10 bytes")}(q|=(15&(st=wt[this.pos]))<<28,R,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var R=this.readVarint();return R%2==1?(R+1)/-2:R/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var R=this.readVarint()+this.pos,q=this.pos;return this.pos=R,R-q>=12&&u?function(st,wt,Zt){return u.decode(st.subarray(wt,Zt))}(this.buf,q,R):function(st,wt,Zt){for(var It="",Lt=wt;Lt<Zt;){var Wt,Ht,Jt,Nt=st[Lt],he=null,Me=Nt>239?4:Nt>223?3:Nt>191?2:1;if(Lt+Me>Zt)break;Me===1?Nt<128&&(he=Nt):Me===2?(192&(Wt=st[Lt+1]))==128&&(he=(31&Nt)<<6|63&Wt)<=127&&(he=null):Me===3?(Ht=st[Lt+2],(192&(Wt=st[Lt+1]))==128&&(192&Ht)==128&&((he=(15&Nt)<<12|(63&Wt)<<6|63&Ht)<=2047||he>=55296&&he<=57343)&&(he=null)):Me===4&&(Ht=st[Lt+2],Jt=st[Lt+3],(192&(Wt=st[Lt+1]))==128&&(192&Ht)==128&&(192&Jt)==128&&((he=(15&Nt)<<18|(63&Wt)<<12|(63&Ht)<<6|63&Jt)<=65535||he>=1114112)&&(he=null)),he===null?(he=65533,Me=1):he>65535&&(he-=65536,It+=String.fromCharCode(he>>>10&1023|55296),he=56320|1023&he),It+=String.fromCharCode(he),Lt+=Me}return It}(this.buf,q,R)},readBytes:function(){var R=this.readVarint()+this.pos,q=this.buf.subarray(this.pos,R);return this.pos=R,q}
vendor: 5,763 bytes, line 2
2,readPackedVarint:function(R,q){if(this.type!==e.Bytes)return R.push(this.readVarint(q));var st=f(this);for(R=R||[];this.pos<st;)R.push(this.readVarint(q));return R},readPackedSVarint:function(R){if(this.type!==e.Bytes)return R.push(this.readSVarint());var q=f(this);for(R=R||[];this.pos<q;)R.push(this.readSVarint());return R},readPackedBoolean:function(R){if(this.type!==e.Bytes)return R.push(this.readBoolean());var q=f(this);for(R=R||[];this.pos<q;)R.push(this.readBoolean());return R},readPackedFloat:function(R){if(this.type!==e.Bytes)return R.push(this.readFloat());var q=f(this);for(R=R||[];this.pos<q;)R.push(this.readFloat());return R},readPackedDouble:function(R){if(this.type!==e.Bytes)return R.push(this.readDouble());var q=f(this);for(R=R||[];this.pos<q;)R.push(this.readDouble());return R},readPackedFixed32:function(R){if(this.type!==e.Bytes)return R.push(this.readFixed32());var q=f(this);for(R=R||[];this.pos<q;)R.push(this.readFixed32());return R},readPackedSFixed32:function(R){if(this.type!==e.Bytes)return R.push(this.readSFixed32());var q=f(this);for(R=R||[];this.pos<q;)R.push(this.readSFixed32());return R},readPackedFixed64:function(R){if(this.type!==e.Bytes)return R.push(this.readFixed64());var q=f(this);for(R=R||[];this.pos<q;)R.push(this.readFixed64());return R},readPackedSFixed64:function(R){if(this.type!==e.Bytes)return R.push(this.readSFixed64());var q=f(this);for(R=R||[];this.pos<q;)R.push(this.readSFixed64());return R},skip:function(R){var q=7&R;if(q===e.Varint)for(;this.buf[this.pos++]>127;);else if(q===e.Bytes)this.pos=this.readVarint()+this.pos;else if(q===e.Fixed32)this.pos+=4;else{if(q!==e.Fixed64)throw new Error("Unimplemented type: "+q);this.pos+=8}},writeTag:function(R,q){this.writeVarint(R<<3|q)},realloc:function(R){for(var q=this.length||16;q<this.pos+R;)q*=2;if(q!==this.length){var st=new Uint8Array(q);st.set(this.buf),this.buf=st,this.length=q}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(R){this.realloc(4),mt(this.buf,R,this.pos),this.pos+=4},writeSFixed32:function(R){this.realloc(4),mt(this.buf,R,this.pos),this.pos+=4},writeFixed64:function(R){this.realloc(8),mt(this.buf,-1&R,this.pos),mt(this.buf,Math.floor(R*s),this.pos+4),this.pos+=8},writeSFixed64:function(R){this.realloc(8),mt(this.buf,-1&R,this.pos),mt(this.buf,Math.floor(R*s),this.pos+4),this.pos+=8},writeVarint:function(R){(R=+R||0)>268435455||R<0?function(q,st){var wt,Zt;if(q>=0?(wt=q%4294967296|0,Zt=q/4294967296|0):(Zt=~(-q/4294967296),4294967295^(wt=~(-q%4294967296))?wt=wt+1|0:(wt=0,Zt=Zt+1|0)),q>=18446744073709552e3||q<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");st.realloc(10),function(It,Lt,Wt){Wt.buf[Wt.pos++]=127&It|128,It>>>=7,Wt.buf[Wt.pos++]=127&It|128,It>>>=7,Wt.buf[Wt.pos++]=127&It|128,It>>>=7,Wt.buf[Wt.pos++]=127&It|128,Wt.buf[Wt.pos]=127&(It>>>=7)}(wt,0,st),function(It,Lt){var Wt=(7&It)<<4;Lt.buf[Lt.pos++]|=Wt|((It>>>=3)?128:0),It&&(Lt.buf[Lt.pos++]=127&It|((It>>>=7)?128:0),It&&(Lt.buf[Lt.pos++]=127&It|((It>>>=7)?128:0),It&&(Lt.buf[Lt.pos++]=127&It|((It>>>=7)?128:0),It&&(Lt.buf[Lt.pos++]=127&It|((It>>>=7)?128:0),It&&(Lt.buf[Lt.pos++]=127&It)))))}(Zt,st)}(R,this):(this.realloc(4),this.buf[this.pos++]=127&R|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=R>>>7&127))))},writeSVarint:function(R){this.writeVarint(R<0?2*-R-1:2*R)},writeBoolean:function(R){this.writeVarint(!!R)},writeString:function(R){R=String(R),this.realloc(4*R.length),this.pos++;var q=this.pos;this.pos=function(wt,Zt,It){for(var Lt,Wt,Ht=0;Ht<Zt.length;Ht++){if((Lt=Zt.charCodeAt(Ht))>55295&&Lt<57344){if(!Wt){Lt>56319||Ht+1===Zt.length?(wt[It++]=239,wt[It++]=191,wt[It++]=189):Wt=Lt;continue}if(Lt<56320){wt[It++]=239,wt[It++]=191,wt[It++]=189,Wt=Lt;continue}Lt=Wt-55296<<10|Lt-56320|65536,Wt=null}else Wt&&(wt[It++]=239,wt[It++]=191,wt[It++]=189,Wt=null);Lt<128?wt[It++]=Lt:(Lt<2048?wt[It++]=Lt>>6|192:(Lt<65536?wt[It++]=Lt>>12|224:(wt[It++]=Lt>>18|240,wt[It++]=Lt>>12&63|128),wt[It++]=Lt>>6&63|128),wt[It++]=63&Lt|128)}return It}(this.buf,R,this.pos);var st=this.pos-q;st>=128&&x(q,st,this),this.pos=q-1,this.writeVarint(st),this.pos+=st},writeFloat:function(R){this.realloc(4),o.write(this.buf,R,this.pos,!0,23,4),this.pos+=4},writeDouble:function(R){this.realloc(8),o.write(this.buf,R,this.pos,!0,52,8),this.pos+=8},writeBytes:function(R){var q=R.length;this.writeVarint(q),this.realloc(q);for(var st=0;st<q;st++)this.buf[this.pos++]=R[st]},writeRawMessage:function(R,q){this.pos++;var st=this.pos;R(q,this);var wt=this.pos-st;wt>=128&&x(st,wt,this),this.pos=st-1,this.writeVarint(wt),this.pos+=wt},writeMessage:function(R,q,st){this.writeTag(R,e.Bytes),this.writeRawMessage(q,st)},writePackedVarint:function(R,q){q.length&&this.writeMessage(R,b,q)},writePackedSVarint:function(R,q){q.length&&this.writeMessage(R,M,q)},writePackedBoolean:function(R,q){q.length&&this.writeMessage(R,F,q)},writePackedFloat:function(R,q){q.length&&this.writeMessage(R,O,q)},writePackedDouble:function(R,q){q.length&&this.writeMessage(R,T,q)},writePackedFixed32:function(R,q){q.length&&this.writeMessage(R,B,q)},writePackedSFixed32:function(R,q){q.length&&this.writeMessage(R,N,q)},writePackedFixed64:function(R,q){q.length&&this.writeMessage(R,$,q)},writePackedSFixed64:function(R,q){q.length&&this.writeMessage(R,W,q)},writeBytesField:function(R,q){this.writeTag(R,e.Bytes),this.writeBytes(q)},writeFixed32Field:function(R,q){this.writeTag(R,e.Fixed32),this.writeFixed32(q)},writeSFixed32Field:function(R,q){this.writeTag(R,e.Fixed32),this.writeSFixed32(q)},writeFixed64Field:function(R,q){this.writeTag(R,e.Fixed64),this.writeFixed64
2(q)},writeSFixed64Field:function(R,q){this.writeTag(R,e.Fixed64),this.writeSFixed64(q)},writeVarintField:function(R,q){this.writeTag(R,e.Varint),this.writeVarint(q)},writeSVarintField:function(R,q){this.writeTag(R,e.Varint),this.writeSVarint(q)},writeStringField:function(R,q){this.writeTag(R,e.Bytes),this.writeString(q)},writeFloatField:function(R,q){this.writeTag(R,e.Fixed32),this.writeFloat(q)},writeDoubleField:function(R,q){this.writeTag(R,e.Fixed64),this.writeDouble(q)},writeBooleanField:function(R,q){this.writeVarintField(R,!!q)}},Ph}var Sh=z(eg());let Th=3;function sy(o,e,r){o===1&&r.readMessage(ly,e)}function ly(o,e,r){if(o===3){let{id:s,bitmap:u,width:f,height:_,left:x,top:b,advance:M}=r.readMessage(cy,{});e.push({id:s,bitmap:new Sd({width:f+2*Th,height:_+2*Th},u),metrics:{width:f,height:_,left:x,top:b,advance:M}})}}function cy(o,e,r){o===1?e.id=r.readVarint():o===2?e.bitmap=r.readBytes():o===3?e.width=r.readVarint():o===4?e.height=r.readVarint():o===5?e.left=r.readSVarint():o===6?e.top=r.readSVarint():o===7&&(e.advance=r.readVarint())}let dy=Th;function ng(o){let e=0,r=0;for(let _ of o)e+=_.w*_.h,r=Math.max(r,_.w);o.sort((_,x)=>x.h-_.h);let s=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}],u=0,f=0;for(let _ of o)for(let x=s.length-1;x>=0;x--){let b=s[x];if(!(_.w>b.w||_.h>b.h)){if(_.x=b.x,_.y=b.y,f=Math.max(f,_.y+_.h),u=Math.max(u,_.x+_.w),_.w===b.w&&_.h===b.h){let M=s.pop();x<s.length&&(s[x]=M)}else _.h===b.h?(b.x+=_.w,b.w-=_.w):_.w===b.w?(b.y+=_.h,b.h-=_.h):(s.push({x:b.x+_.w,y:b.y,w:b.w-_.w,h:_.h}),b.y+=_.h,b.h-=_.h);break}}return{w:u,h:f,fill:e/(u*f)||0}}let to=1;class Ih{constructor(e,{pixelRatio:r,version:s,stretchX:u,stretchY:f,content:_,textFitWidth:x,textFitHeight:b}){this.paddedRect=e,this.pixelRatio=r,this.stretchX=u,this.stretchY=f,this.content=_,this.version=s,this.textFitWidth=x,this.textFitHeight=b}get tl(){return[this.paddedRect.x+to,this.paddedRect.y+to]}get br(){return[this.paddedRect.x+this.paddedRect.w-to,this.paddedRect.y+this.paddedRect.h-to]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*to)/this.pixelRatio,(this.paddedRect.h-2*to)/this.pixelRatio]}}class ig{constructor(e,r){let s={},u={};this.haveRenderCallbacks=[];let f=[];this.addImages(e,s,f),this.addImages(r,u,f);let{w:_,h:x}=ng(f),b=new yo({width:_||1,height:x||1});for(let M in e){let O=e[M],T=s[M].paddedRect;yo.copy(O.data,b,{x:0,y:0},{x:T.x+to,y:T.y+to},O.data)}for(let M in r){let O=r[M],T=u[M].paddedRect,F=T.x+to,B=T.y+to,N=O.data.width,$=O.data.height;yo.copy(O.data,b,{x:0,y:0},{x:F,y:B},O.data),yo.copy(O.data,b,{x:0,y:$-1},{x:F,y:B-1},{width:N,height:1}),yo.copy(O.data,b,{x:0,y:0},{x:F,y:B+$},{width:N,height:1}),yo.copy(O.data,b,{x:N-1,y:0},{x:F-1,y:B},{width:1,height:$}),yo.copy(O.data,b,{x:0,y:0},{x:F+N,y:B},{width:1,height:$})}this.image=b,this.iconPositions=s,this.patternPositions=u}addImages(e,r,s){for(let u in e){let f=e[u],_={x:0,y:0,w:f.data.width+2*to,h:f.data.height+2*to};s.push(_),r[u]=new Ih(_,f),f.hasRenderCallback&&this.haveRenderCallbacks.push(u)}}patchUpdatedImages(e,r){e.dispatchRenderCallbacks(this.haveRenderCallbacks);for(let s in e.updatedImages)this.patchUpdatedImage(this.iconPositions[s],e.getImage(s),r),this.patchUpdatedImage(this.patternPositions[s],e.getImage(s),r)}patchUpdatedImage(e,r,s){if(!e||!r||e.version===r.version)return;e.version=r.version;let[u,f]=e.tl;s.update(r.data,void 0,{x:u,y:f})}}var $a;de("ImagePosition",Ih),de("ImageAtlas",ig),d.al=void 0,($a=d.al||(d.al={}))[$a.none=0]="none",$a[$a.horizontal=1]="horizontal",$a[$a.vertical=2]="vertical",$a[$a.horizontalOnly=3]="horizontalOnly";let Qp=-17;class Bd{constructor(){this.scale=1,this.fontStack="",this.imageName=null,this.verticalAlign="bottom"}static forText(e,r,s){let u=new Bd;return u.scale=e||1,u.fontStack=r,u.verticalAlign=s||"bottom",u}static forImage(e,r){let s=new Bd;return s.imageName=e,s.verticalAlign=r||"bottom",s}}class Yl{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(e,r){let s=new Yl;for(let u=0;u<e.sections.length;u++){let f=e.sections[u];f.image?s.addImageSection(f):s.addTextSection(f,r)}return s}length(){return this.text.length}getSection(e){return this.sections[this.sectionIndex[e]]}getSectionIndex(e){return this.sectionIndex[e]}getCharCode(e){return this.text.charCodeAt(e)}verticalizePunctuation(){this.text=function(e){let r="";for(let s=0;s<e.length;s++){let u=e.charCodeAt(s+1)||null,f=e.charCodeAt(s-1)||null;r+=u&&Fp(u)&&!Rd[e[s+1]]||f&&Fp(f)&&!Rd[e[s-1]]||!Rd[e[s]]?e[s]:Rd[e[s]]}return r}(this.text)}trim(){let e=0;for(let s=0;s<this.text.length&&tu[this.text.charCodeAt(s)];s++)e++;let r=this.text.length;for(let s=this.text.length-1;s>=0&&s>=e&&tu[this.text.charCodeAt(s)];s--)r--;this.text=this.text.substring(e,r),this.sectionIndex=this.sectionIndex.slice(e,r)}substring(e,r){let s=new Yl;return s.text=this.text.substring(e,r),s.sectionIndex=this.sectionIndex.slice(e,r),s.sections=this.sections,s}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,r)=>
2Math.max(e,this.sections[r].scale),0)}getMaxImageSize(e){let r=0,s=0;for(let u=0;u<this.length();u++){let f=this.getSection(u);if(f.imageName){let _=e[f.imageName];if(!_)continue;let x=_.displaySize;r=Math.max(r,x[0]),s=Math.max(s,x[1])}}return{maxImageWidth:r,maxImageHeight:s}}addTextSection(e,r){this.text+=e.text,this.sections.push(Bd.forText(e.scale,e.fontStack||r,e.verticalAlign));let s=this.sections.length-1;for(let u=0;u<e.text.length;++u)this.sectionIndex.push(s)}addImageSection(e){let r=e.image?e.image.name:"";if(r.length===0)return void Ei("Can't add FormattedSection with an empty image.");let s=this.getNextImageSectionCharCode();s?(this.text+=String.fromCharCode(s),this.sections.push(Bd.forImage(r,e.verticalAlign)),this.sectionIndex.push(this.sections.length-1)):Ei("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Jp(o,e,r,s,u,f,_,x,b,M,O,T,F,B,N){let $=Yl.fromFeature(o,u),W;T===d.al.vertical&&$.verticalizePunctuation();let{processBidirectionalText:et,processStyledBidirectionalText:mt}=Mr;if(et&&$.sections.length===1){W=[];let q=et($.toString(),kh($,M,f,e,s,B));for(let st of q){let wt=new Yl;wt.text=st,wt.sections=$.sections;for(let Zt=0;Zt<st.length;Zt++)wt.sectionIndex.push(0);W.push(wt)}}else if(mt){W=[];let q=mt($.text,$.sectionIndex,kh($,M,f,e,s,B));for(let st of q){let wt=new Yl;wt.text=st[0],wt.sectionIndex=st[1],wt.sections=$.sections,W.push(wt)}}else W=function(q,st){let wt=[],Zt=q.text,It=0;for(let Lt of st)wt.push(q.substring(It,Lt)),It=Lt;return It<Zt.length&&wt.push(q.substring(It,Zt.length)),wt}($,kh($,M,f,e,s,B));let ot=[],R={positionedLines:ot,text:$.toString(),top:O[1],bottom:O[1],left:O[0],right:O[0],writingMode:T,iconsInText:!1,verticalizable:!1};return function(q,st,wt,Zt,It,Lt,Wt,Ht,Jt,Nt,he,Me){let be=0,_e=0,Ue=0,jn=0,ei=Ht==="right"?1:Ht==="left"?0:.5,Si=ti/Me,vo=0;for(let En of It){En.trim();let ci=En.getMaxScale(),yi={positionedGlyphs:[],lineOffset:0};q.positionedLines[vo]=yi;let xi=yi.positionedGlyphs,Ui=0;if(!En.length()){_e+=Lt,++vo;continue}let bo=my(Zt,En,Si);for(let no=0;no<En.length();no++){let ni=En.getSection(no),pi=En.getSectionIndex(no),ui=En.getCharCode(no),Xn=gy(Jt,he,ui),Cn;if(ni.imageName){if(q.iconsInText=!0,ni.scale=ni.scale*Si,Cn=_y(ni,Xn,ci,bo,Zt),!Cn)continue;Ui=Math.max(Ui,Cn.imageOffset)}else if(Cn=fy(ni,ui,Xn,bo,st,wt),!Cn)continue;let{rect:ar,metrics:ec,baselineOffset:sr}=Cn;xi.push({glyph:ui,imageName:ni.imageName,x:be,y:_e+sr+Qp,vertical:Xn,scale:ni.scale,fontStack:ni.fontStack,sectionIndex:pi,metrics:ec,rect:ar}),Xn?(q.verticalizable=!0,be+=(ni.imageName?ec.advance:ti)*ni.scale+Nt):be+=ec.advance*ni.scale+Nt}xi.length!==0&&(Ue=Math.max(be-Nt,Ue),yy(xi,0,xi.length-1,ei)),be=0,yi.lineOffset=Math.max(Ui,(ci-1)*ti);let di=Lt*ci+Ui;_e+=di,jn=Math.max(di,jn),++vo}let{horizontalAlign:eo,verticalAlign:_i}=Eh(Wt);(function(En,ci,yi,xi,Ui,bo,di,no,ni){let pi=(ci-yi)*Ui,ui=0;ui=bo!==di?-no*xi-Qp:-xi*ni*di+.5*di;for(let Xn of En)for(let Cn of Xn.positionedGlyphs)Cn.x+=pi,Cn.y+=ui})(q.positionedLines,ei,eo,_i,Ue,jn,Lt,_e,It.length),q.top+=-_i*_e,q.bottom=q.top+_e,q.left+=-eo*Ue,q.right=q.left+Ue}(R,e,r,s,W,_,x,b,T,M,F,N),!function(q){for(let st of q)if(st.positionedGlyphs.length!==0)return!1;return!0}(ot)&&R}let tu={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},py={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},uy={40:!0};function og(o,e,r,s,u,f){if(e.imageName){let _=s[e.imageName];return _?_.displaySize[0]*e.scale*ti/f+u:0}{let _=r[e.fontStack],x=_&&_[o];return x?x.metrics.advance*e.scale+u:0}}function rg(o,e,r,s){let u=Math.pow(o-e,2);return s?o<e?u/2:2*u:u+Math.abs(r)*r}function hy(o,e,r){let s=0;return o===10&&(s-=1e4),r&&(s+=150),o!==40&&o!==65288||(s+=50),e!==41&&e!==65289||(s+=50),s}function ag(o,e,r,s,u,f){let _=null,x=rg(e,r,u,f);for(let b of s){let M=rg(e-b.x,r,u,f)+b.badness;M<=x&&(_=b,x=M)}return{index:o,x:e,priorBreak:_,badness:x}}function sg(o){return o?sg(o.priorBreak).concat(o.index):[]}function kh(o,e,r,s,u,f){if(!o)return[];let _=[],x=function(T,F,B,N,$,W){let et=0;for(let mt=0;mt<T.length();mt++){let ot=T.getSection(mt);et+=og(T.getCharCode(mt),ot,N,$,F,W)}return et/Math.max(1,Math.ceil(et/B))}(o,e,r,s,u,f),b=o.text.indexOf("\u200B")>=0,M=0;for(let T=0;T<o.length();T++){let F=o.getSection(T),B=o.getCharCode(T);if(tu[B]||(M+=og(B,F,s,u,e,f)),T<o.length()-1){let N=!((O=B)<11904)&&(!!je["CJK Compatibility Forms"](O)||!!je["CJK Compatibility"](O)||!!je["CJK Strokes"](O)||!!je["CJK Symbols and Punctuation"](O)||!!je["Enclosed CJK Letters and Months"](O)||!!je["Halfwidth and Fullwidth Forms"](O)||!!je["Ideographic Description Characters"](O)||!!je["Vertical Forms"](O)||Dp.test(String.fromCodePoint(O)));(py[B]||N||F.imageName||T!==o.length()-2&&uy[o.getCharCode(T+1)])&&_.push(ag(T+1,M,x,_,hy(B,o.getCharCode(T+1),N&&b),!1))}}var O;return sg(ag(o.length(),M,x,_,0,!0))}function Eh(o){let e=.5,r=.5;switch(o){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(o){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function my(o,e,r){let s=e.getMaxScale()*ti,{maxImageWidth:u,max
2ImageHeight:f}=e.getMaxImageSize(o),_=Math.max(s,f*r);return{verticalLineContentWidth:Math.max(s,u*r),horizontalLineContentHeight:_}}function lg(o){switch(o){case"top":return 0;case"center":return .5;default:return 1}}function gy(o,e,r){return!(o===d.al.horizontal||!e&&!Vl(r)||e&&(tu[r]||(s=r,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(s)))));var s}function fy(o,e,r,s,u,f){let _=f[o.fontStack],x=function(M,O,T,F){if(M&&M.rect)return M;let B=O[T.fontStack],N=B&&B[F];return N?{rect:null,metrics:N.metrics}:null}(_&&_[e],u,o,e);if(x===null)return null;let b;if(r)b=s.verticalLineContentWidth-o.scale*ti;else{let M=lg(o.verticalAlign);b=(s.horizontalLineContentHeight-o.scale*ti)*M}return{rect:x.rect,metrics:x.metrics,baselineOffset:b}}function _y(o,e,r,s,u){let f=u[o.imageName];if(!f)return null;let _=f.paddedRect,x=f.displaySize,b={width:x[0],height:x[1],left:to,top:-3,advance:e?x[1]:x[0]},M;if(e)M=s.verticalLineContentWidth-x[1]*o.scale;else{let O=lg(o.verticalAlign);M=(s.horizontalLineContentHeight-x[1]*o.scale)*O}return{rect:_,metrics:b,baselineOffset:M,imageOffset:(e?x[0]:x[1])*o.scale-ti*r}}function yy(o,e,r,s){if(s===0)return;let u=o[r],f=(o[r].x+u.metrics.advance*u.scale)*s;for(let _=e;_<=r;_++)o[_].x-=f}function xy(o,e,r){let{horizontalAlign:s,verticalAlign:u}=Eh(r),f=e[0]-o.displaySize[0]*s,_=e[1]-o.displaySize[1]*u;return{image:o,top:_,bottom:_+o.displaySize[1],left:f,right:f+o.displaySize[0]}}function cg(o){var e,r;let s=o.left,u=o.top,f=o.right-s,_=o.bottom-u,x=(e=o.image.textFitWidth)!==null&&e!==void 0?e:"stretchOrShrink",b=(r=o.image.textFitHeight)!==null&&r!==void 0?r:"stretchOrShrink",M=(o.image.content[2]-o.image.content[0])/(o.image.content[3]-o.image.content[1]);if(b==="proportional"){if(x==="stretchOnly"&&f/_<M||x==="proportional"){let O=Math.ceil(_*M);s*=O/f,f=O}}else if(x==="proportional"&&b==="stretchOnly"&&M!==0&&f/_>M){let O=Math.ceil(f/M);u*=O/_,_=O}return{x1:s,y1:u,x2:s+f,y2:u+_}}function dg(o,e,r,s,u,f){let _=o.image,x;if(_.content){let W=_.content,et=_.pixelRatio||1;x=[W[0]/et,W[1]/et,_.displaySize[0]-W[2]/et,_.displaySize[1]-W[3]/et]}let b=e.left*f,M=e.right*f,O,T,F,B;r==="width"||r==="both"?(B=u[0]+b-s[3],T=u[0]+M+s[1]):(B=u[0]+(b+M-_.displaySize[0])/2,T=B+_.displaySize[0]);let N=e.top*f,$=e.bottom*f;return r==="height"||r==="both"?(O=u[1]+N-s[0],F=u[1]+$+s[2]):(O=u[1]+(N+$-_.displaySize[1])/2,F=O+_.displaySize[1]),{image:_,top:O,right:T,bottom:F,left:B,collisionPadding:x}}let Nd=255,Tr=128,Ga=Nd*Tr;function pg(o,e){let{expression:r}=e;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new xn(o+1))};if(r.kind==="source")return{kind:"source"};{let{zoomStops:s,interpolationType:u}=r,f=0;for(;f<s.length&&s[f]<=o;)f++;f=Math.max(0,f-1);let _=f;for(;_<s.length&&s[_]<o+1;)_++;_=Math.min(s.length-1,_);let x=s[f],b=s[_];return r.kind==="composite"?{kind:"composite",minZoom:x,maxZoom:b,interpolationType:u}:{kind:"camera",minZoom:x,maxZoom:b,minSize:r.evaluate(new xn(x)),maxSize:r.evaluate(new xn(b)),interpolationType:u}}}function zh(o,e,r){let s="never",u=o.get(e);return u?s=u:o.get(r)&&(s="always"),s}let vy=Ld.VectorTileFeature.types,by=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function eu(o,e,r,s,u,f,_,x,b,M,O,T,F){let B=x?Math.min(Ga,Math.round(x[0])):0,N=x?Math.min(Ga,Math.round(x[1])):0;o.emplaceBack(e,r,Math.round(32*s),Math.round(32*u),f,_,(B<<1)+(b?1:0),N,16*M,16*O,256*T,256*F)}function Ah(o,e,r){o.emplaceBack(e.x,e.y,r),o.emplaceBack(e.x,e.y,r),o.emplaceBack(e.x,e.y,r),o.emplaceBack(e.x,e.y,r)}function Cy(o){for(let e of o.sections)if(sh(e.text))return!0;return!1}class Lh{constructor(e){this.layoutVertexArray=new Mt,this.indexArray=new Qt,this.programConfigurations=e,this.segments=new ze,this.dynamicLayoutVertexArray=new Bt,this.opacityVertexArray=new Vt,this.hasVisibleVertices=!1,this.placedSymbolArray=new P}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(e,r,s,u){this.isEmpty()||(s&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,ey.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,r),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,ny.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,by,!0),this.opacityVertexBuffer.itemSize=1),(s||u)&&this.programConfigurations.upload(e))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}de("SymbolBuffers",Lh);class Dh{constructor(e,r,s){this.layoutVertexArray=new e,this.layoutAttributes=r,this.indexArray=new s,this.segments=new ze,this.collisionVertexArray=new oe}upload(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,iy.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}de("CollisionBuffers",Dh);class Ql{constructor(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(_=>_.id),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.s
2ourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=pg(this.zoom,r["text-size"]),this.iconSizeData=pg(this.zoom,r["icon-size"]);let s=this.layers[0].layout,u=s.get("symbol-sort-key"),f=s.get("symbol-z-order");this.canOverlap=zh(s,"text-overlap","text-allow-overlap")!=="never"||zh(s,"icon-overlap","icon-allow-overlap")!=="never"||s.get("text-ignore-placement")||s.get("icon-ignore-placement"),this.sortFeaturesByKey=f!=="viewport-y"&&!u.isConstant(),this.sortFeaturesByY=(f==="viewport-y"||f==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,s.get("symbol-placement")==="point"&&(this.writingModes=s.get("text-writing-mode").map(_=>d.al[_])),this.stateDependentLayerIds=this.layers.filter(_=>_.isStateDependent()).map(_=>_.id),this.sourceID=e.sourceID}createArrays(){this.text=new Lh(new da(this.layers,this.zoom,e=>/^text/.test(e))),this.icon=new Lh(new da(this.layers,this.zoom,e=>/^icon/.test(e))),this.glyphOffsetArray=new D,this.lineVertexArray=new V,this.symbolInstances=new L,this.textAnchorOffsets=new Q}calculateGlyphDependencies(e,r,s,u,f){for(let _=0;_<e.length;_++)if(r[e.charCodeAt(_)]=!0,(s||u)&&f){let x=Rd[e.charAt(_)];x&&(r[x.charCodeAt(0)]=!0)}}populate(e,r,s){let u=this.layers[0],f=u.layout,_=f.get("text-font"),x=f.get("text-field"),b=f.get("icon-image"),M=(x.value.kind!=="constant"||x.value.value instanceof Bi&&!x.value.value.isEmpty()||x.value.value.toString().length>0)&&(_.value.kind!=="constant"||_.value.value.length>0),O=b.value.kind!=="constant"||!!b.value.value||Object.keys(b.parameters).length>0,T=f.get("symbol-sort-key");if(this.features=[],!M&&!O)return;let F=r.iconDependencies,B=r.glyphDependencies,N=r.availableImages,$=new xn(this.zoom);for(let{feature:W,id:et,index:mt,sourceLayerIndex:ot}of e){let R=u._featureFilter.needGeometry,q=Sr(W,R);if(!u._featureFilter.filter($,q,s))continue;let st,wt;if(R||(q.geometry=Ji(W)),M){let It=u.getValueAndResolveTokens("text-field",q,s,N),Lt=Bi.factory(It),Wt=this.hasRTLText=this.hasRTLText||Cy(Lt);(!Wt||Mr.getRTLTextPluginStatus()==="unavailable"||Wt&&Mr.isParsed())&&(st=ry(Lt,u,q))}if(O){let It=u.getValueAndResolveTokens("icon-image",q,s,N);wt=It instanceof Yi?It:Yi.fromString(It)}if(!st&&!wt)continue;let Zt=this.sortFeaturesByKey?T.evaluate(q,{},s):void 0;if(this.features.push({id:et,text:st,icon:wt,index:mt,sourceLayerIndex:ot,geometry:q.geometry,properties:W.properties,type:vy[W.type],sortKey:Zt}),wt&&(F[wt.name]=!0),st){let It=_.evaluate(q,{},s).join(","),Lt=f.get("text-rotation-alignment")!=="viewport"&&f.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(d.al.vertical)>=0;for(let Wt of st.sections)if(Wt.image)F[Wt.image.name]=!0;else{let Ht=Bl(st.toString()),Jt=Wt.fontStack||It,Nt=B[Jt]=B[Jt]||{};this.calculateGlyphDependencies(Wt.text,Nt,Lt,this.allowVerticalPlacement,Ht)}}}f.get("symbol-placement")==="line"&&(this.features=function(W){let et={},mt={},ot=[],R=0;function q(It){ot.push(W[It]),R++}function st(It,Lt,Wt){let Ht=mt[It];return delete mt[It],mt[Lt]=Ht,ot[Ht].geometry[0].pop(),ot[Ht].geometry[0]=ot[Ht].geometry[0].concat(Wt[0]),Ht}function wt(It,Lt,Wt){let Ht=et[Lt];return delete et[Lt],et[It]=Ht,ot[Ht].geometry[0].shift(),ot[Ht].geometry[0]=Wt[0].concat(ot[Ht].geometry[0]),Ht}function Zt(It,Lt,Wt){let Ht=Wt?Lt[0][Lt[0].length-1]:Lt[0][0];return`${It}:${Ht.x}:${Ht.y}`}for(let It=0;It<W.length;It++){let Lt=W[It],Wt=Lt.geometry,Ht=Lt.text?Lt.text.toString():null;if(!Ht){q(It);continue}let Jt=Zt(Ht,Wt),Nt=Zt(Ht,Wt,!0);if(Jt in mt&&Nt in et&&mt[Jt]!==et[Nt]){let he=wt(Jt,Nt,Wt),Me=st(Jt,Nt,ot[he].geometry);delete et[Jt],delete mt[Nt],mt[Zt(Ht,ot[Me].geometry,!0)]=Me,ot[he].geometry=null}else Jt in mt?st(Jt,Nt,Wt):Nt in et?wt(Jt,Nt,Wt):(q(It),et[Jt]=R-1,mt[Nt]=R-1)}return ot.filter(It=>It.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((W,et)=>W.sortKey-et.sortKey)}update(e,r,s){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,r,this.layers,s),this.icon.programConfigurations.updatePaintArrays(e,r,this.layers,s))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,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(e,r){let s=this.lineVertexArray.length;if(e.segment!==void 0){let u=e.dist(r[e.segment+1]),f=e.dist(r[e.segment]),_={};for(let x=e.segment+1;x<r.length;x++)_[x]={x:r[x].x,y:r[x].y,tileUnitDistanceFromAnchor:u},x<r.length-1&&(u+=r[x+1].dist(r[x]));for(let x=e.segment||0;x>=0;x--)_[x]={x:r[x].x,y:r[x].y,tileUnitDistanceFromAnchor:f},x>0&&(f+=r[x-1].dist(r[x]));for(let x=0;x<r.length;x++){let b=_[x];this.lineVertexArray.emplaceBack(b.x,b.y,b.tileUnitDistanceFromAnchor)}}return{lineStartIndex:s,lineLength:this.lineVertexArray.length-s}}addSymbols(e,r,s,u,f,_,x,b,M,O,T,F){let B=e.indexArray,N=e.layoutVertexArray,$=e.segments.prepareSegment(4*r.length,N,B,this.canOverlap?_.sortKey:void 0),W=this.glyphOffsetArray.length,et=$.vertexLength,mt=this.allowVerticalPlacement&&x===d.al.vertical?Math.PI/2:0,ot=_.text&&_.text.sections;for(let R=0;R<r.length;R++){let{tl:q,tr:st,bl:wt,br:Zt,tex:It,pixelOffsetTL:Lt,pixelOffsetBR:Wt,minFontScaleX:Ht,minFontScaleY:Jt,glyphOffset:Nt,isSDF:he,sectionIndex:Me}=r[R],be=$.vertexLength,_e=Nt[1];eu(N,b.x,b.y,q.x,_e+q.y,It.x,It.y,s,he,Lt.x,Lt.y,Ht,Jt),eu(N,b.x,b.y,st.x,_e+st.y,It.x+It.w,It.y,s,he,Wt.x,Lt.y,Ht,Jt),eu(N,b.x,b.y,wt.x,_e+wt.y,It.x,It.y+It.h,s,he,Lt.x,Wt.
2y,Ht,Jt),eu(N,b.x,b.y,Zt.x,_e+Zt.y,It.x+It.w,It.y+It.h,s,he,Wt.x,Wt.y,Ht,Jt),Ah(e.dynamicLayoutVertexArray,b,mt),B.emplaceBack(be,be+2,be+1),B.emplaceBack(be+1,be+2,be+3),$.vertexLength+=4,$.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Nt[0]),R!==r.length-1&&Me===r[R+1].sectionIndex||e.programConfigurations.populatePaintArrays(N.length,_,_.index,{},F,ot&&ot[Me])}e.placedSymbolArray.emplaceBack(b.x,b.y,W,this.glyphOffsetArray.length-W,et,M,O,b.segment,s?s[0]:0,s?s[1]:0,u[0],u[1],x,0,!1,0,T)}_addCollisionDebugVertex(e,r,s,u,f,_){return r.emplaceBack(0,0),e.emplaceBack(s.x,s.y,u,f,Math.round(_.x),Math.round(_.y))}addCollisionDebugVertices(e,r,s,u,f,_,x){let b=f.segments.prepareSegment(4,f.layoutVertexArray,f.indexArray),M=b.vertexLength,O=f.layoutVertexArray,T=f.collisionVertexArray,F=x.anchorX,B=x.anchorY;this._addCollisionDebugVertex(O,T,_,F,B,new ne(e,r)),this._addCollisionDebugVertex(O,T,_,F,B,new ne(s,r)),this._addCollisionDebugVertex(O,T,_,F,B,new ne(s,u)),this._addCollisionDebugVertex(O,T,_,F,B,new ne(e,u)),b.vertexLength+=4;let N=f.indexArray;N.emplaceBack(M,M+1),N.emplaceBack(M+1,M+2),N.emplaceBack(M+2,M+3),N.emplaceBack(M+3,M),b.primitiveLength+=4}addDebugCollisionBoxes(e,r,s,u){for(let f=e;f<r;f++){let _=this.collisionBoxArray.get(f);this.addCollisionDebugVertices(_.x1,_.y1,_.x2,_.y2,u?this.textCollisionBox:this.iconCollisionBox,_.anchorPoint,s)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Dh(Dt,Qm.members,$t),this.iconCollisionBox=new Dh(Dt,Qm.members,$t);for(let e=0;e<this.symbolInstances.length;e++){let r=this.symbolInstances.get(e);this.addDebugCollisionBoxes(r.textBoxStartIndex,r.textBoxEndIndex,r,!0),this.addDebugCollisionBoxes(r.verticalTextBoxStartIndex,r.verticalTextBoxEndIndex,r,!0),this.addDebugCollisionBoxes(r.iconBoxStartIndex,r.iconBoxEndIndex,r,!1),this.addDebugCollisionBoxes(r.verticalIconBoxStartIndex,r.verticalIconBoxEndIndex,r,!1)}}_deserializeCollisionBoxesForSymbol(e,r,s,u,f,_,x,b,M){let O={};for(let T=r;T<s;T++){let F=e.get(T);O.textBox={x1:F.x1,y1:F.y1,x2:F.x2,y2:F.y2,anchorPointX:F.anchorPointX,anchorPointY:F.anchorPointY},O.textFeatureIndex=F.featureIndex;break}for(let T=u;T<f;T++){let F=e.get(T);O.verticalTextBox={x1:F.x1,y1:F.y1,x2:F.x2,y2:F.y2,anchorPointX:F.anchorPointX,anchorPointY:F.anchorPointY},O.verticalTextFeatureIndex=F.featureIndex;break}for(let T=_;T<x;T++){let F=e.get(T);O.iconBox={x1:F.x1,y1:F.y1,x2:F.x2,y2:F.y2,anchorPointX:F.anchorPointX,anchorPointY:F.anchorPointY},O.iconFeatureIndex=F.featureIndex;break}for(let T=b;T<M;T++){let F=e.get(T);O.verticalIconBox={x1:F.x1,y1:F.y1,x2:F.x2,y2:F.y2,anchorPointX:F.anchorPointX,anchorPointY:F.anchorPointY},O.verticalIconFeatureIndex=F.featureIndex;break}return O}deserializeCollisionBoxes(e){this.collisionArrays=[];for(let r=0;r<this.symbolInstances.length;r++){let s=this.symbolInstances.get(r);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,s.textBoxStartIndex,s.textBoxEndIndex,s.verticalTextBoxStartIndex,s.verticalTextBoxEndIndex,s.iconBoxStartIndex,s.iconBoxEndIndex,s.verticalIconBoxStartIndex,s.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}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(e,r){let s=e.placedSymbolArray.get(r),u=s.vertexStartIndex+4*s.numGlyphs;for(let f=s.vertexStartIndex;f<u;f+=4)e.indexArray.emplaceBack(f,f+2,f+1),e.indexArray.emplaceBack(f+1,f+2,f+3)}getSortedSymbolIndexes(e){if(this.sortedAngle===e&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;let r=Math.sin(e),s=Math.cos(e),u=[],f=[],_=[];for(let x=0;x<this.symbolInstances.length;++x){_.push(x);let b=this.symbolInstances.get(x);u.push(0|Math.round(r*b.anchorX+s*b.anchorY)),f.push(b.featureIndex)}return _.sort((x,b)=>u[x]-u[b]||f[b]-f[x]),_}
2addToSortKeyRanges(e,r){let s=this.sortKeyRanges[this.sortKeyRanges.length-1];s&&s.sortKey===r?s.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:r,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let r of this.symbolInstanceIndexes){let s=this.symbolInstances.get(r);this.featureSortOrder.push(s.featureIndex),[s.rightJustifiedTextSymbolIndex,s.centerJustifiedTextSymbolIndex,s.leftJustifiedTextSymbolIndex].forEach((u,f,_)=>{u>=0&&_.indexOf(u)===f&&this.addIndicesForPlacedSymbol(this.text,u)}),s.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,s.verticalPlacedTextSymbolIndex),s.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,s.placedIconSymbolIndex),s.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,s.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let ug,hg;de("SymbolBucket",Ql,{omit:["layers","collisionBoxArray","features","compareText"]}),Ql.MAX_GLYPHS=65535,Ql.addDynamicAttributes=Ah;var Fh={get paint(){return hg=hg||new ji({"icon-opacity":new Oe(H.paint_symbol["icon-opacity"]),"icon-color":new Oe(H.paint_symbol["icon-color"]),"icon-halo-color":new Oe(H.paint_symbol["icon-halo-color"]),"icon-halo-width":new Oe(H.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Oe(H.paint_symbol["icon-halo-blur"]),"icon-translate":new ye(H.paint_symbol["icon-translate"]),"icon-translate-anchor":new ye(H.paint_symbol["icon-translate-anchor"]),"text-opacity":new Oe(H.paint_symbol["text-opacity"]),"text-color":new Oe(H.paint_symbol["text-color"],{runtimeType:zi,getOverride:o=>o.textColor,hasOverride:o=>!!o.textColor}),"text-halo-color":new Oe(H.paint_symbol["text-halo-color"]),"text-halo-width":new Oe(H.paint_symbol["text-halo-width"]),"text-halo-blur":new Oe(H.paint_symbol["text-halo-blur"]),"text-translate":new ye(H.paint_symbol["text-translate"]),"text-translate-anchor":new ye(H.paint_symbol["text-translate-anchor"])})},get layout(){return ug=ug||new ji({"symbol-placement":new ye(H.layout_symbol["symbol-placement"]),"symbol-spacing":new ye(H.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ye(H.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Oe(H.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ye(H.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ye(H.layout_symbol["icon-allow-overlap"]),"icon-overlap":new ye(H.layout_symbol["icon-overlap"]),"icon-ignore-placement":new ye(H.layout_symbol["icon-ignore-placement"]),"icon-optional":new ye(H.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ye(H.layout_symbol["icon-rotation-alignment"]),"icon-size":new Oe(H.layout_symbol["icon-size"]),"icon-text-fit":new ye(H.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ye(H.layout_symbol["icon-text-fit-padding"]),"icon-image":new Oe(H.layout_symbol["icon-image"]),"icon-rotate":new Oe(H.layout_symbol["icon-rotate"]),"icon-padding":new Oe(H.layout_symbol["icon-padding"]),"icon-keep-upright":new ye(H.layout_symbol["icon-keep-upright"]),"icon-offset":new Oe(H.layout_symbol["icon-offset"]),"icon-anchor":new Oe(H.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ye(H.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ye(H.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ye(H.layout_symbol["text-rotation-alignment"]),"text-field":new Oe(H.layout_symbol["text-field"]),"text-font":new Oe(H.layout_symbol["text-font"]),"text-size":new Oe(H.layout_symbol["text-size"]),"text-max-width":new Oe(H.layout_symbol["text-max-width"]),"text-line-height":new ye(H.layout_symbol["text-line-height"]),"text-letter-spacing":new Oe(H.layout_symbol["text-letter-spacing"]),"text-justify":new Oe(H.layout_symbol["text-justify"]),"text-radial-offset":new Oe(H.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ye(H.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Oe(H.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Oe(H.layout_symbol["text-anchor"]),"text-max-angle":new ye(H.layout_symbol["text-max-angle"]),"text-writing-mode":new ye(H.layout_symbol["text-writing-mode"]),"text-rotate":new Oe(H.layout_symbol["text-rotate"]),"text-padding":new ye(H.layout_symbol["text-padding"]),"text-keep-upright":new ye(H.layout_symbol["text-keep-upright"]),"text-transform":new Oe(H.layout_symbol["text-transform"]),"text-offset":new Oe(H.layout_symbol["text-offset"]),"text-allow-overlap":new ye(H.layout_symbol["text-allow-overlap"]),"text-overlap":new ye(H.layout_symbol["text-overlap"]),"text-ignore-placement":new ye(H.layout_symbol["text-ignore-placement"]),"text-optional":new ye(H.layout_symbol["text-optional"])})}};
2class mg{constructor(e){if(e.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:Ke,this.defaultValue=e}evaluate(e){if(e.formattedSection){let r=this.defaultValue.property.overrides;if(r&&r.hasOverride(e.formattedSection))return r.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}de("FormatSectionOverride",mg,{omit:["defaultValue"]});class nu extends No{constructor(e){super(e,Fh)}recalculate(e,r){if(super.recalculate(e,r),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 s=this.layout.get("text-writing-mode");if(s){let u=[];for(let f of s)u.indexOf(f)<0&&u.push(f);this.layout._values["text-writing-mode"]=u}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,r,s,u){let f=this.layout.get(e).evaluate(r,{},s,u),_=this._unevaluatedLayout._values[e];return _.isDataDriven()||na(_.value)||!f?f:function(x,b){return b.replace(/{([^{}]+)}/g,(M,O)=>x&&O in x?String(x[O]):"")}(r.properties,f)}createBucket(e){return new Ql(e)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let e of Fh.paint.overridableProperties){if(!nu.hasPaintOverride(this.layout,e))continue;let r=this.paint.get(e),s=new mg(r),u=new Wc(s,r.property.specification),f=null;f=r.value.kind==="constant"||r.value.kind==="source"?new Xc("source",u):new Kc("composite",u,r.value.zoomStops),this.paint._values[e]=new Bo(r.property,f,r.parameters)}}_handleOverridablePaintPropertyUpdate(e,r,s){return!(!this.layout||r.isDataDriven()||s.isDataDriven())&&nu.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,r){let s=e.get("text-field"),u=Fh.paint.properties[r],f=!1,_=x=>{for(let b of x)if(u.overrides&&u.overrides.hasOverride(b))return void(f=!0)};if(s.value.kind==="constant"&&s.value.value instanceof Bi)_(s.value.value.sections);else if(s.value.kind==="source"){let x=M=>{f||(M instanceof vr&&Nn(M.value)===Xr?_(M.value.sections):M instanceof yl?_(M.sections):M.eachChild(x))},b=s.value;b._styleExpression&&x(b._styleExpression.expression)}return f}}let gg;var wy={get paint(){return gg=gg||new ji({"background-color":new ye(H.paint_background["background-color"]),"background-pattern":new gd(H.paint_background["background-pattern"]),"background-opacity":new ye(H.paint_background["background-opacity"])})}};class My extends No{constructor(e){super(e,wy)}}let fg;var Py={get paint(){return fg=fg||new ji({"raster-opacity":new ye(H.paint_raster["raster-opacity"]),"raster-hue-rotate":new ye(H.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ye(H.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ye(H.paint_raster["raster-brightness-max"]),"raster-saturation":new ye(H.paint_raster["raster-saturation"]),"raster-contrast":new ye(H.paint_raster["raster-contrast"]),"raster-resampling":new ye(H.paint_raster["raster-resampling"]),"raster-fade-duration":new ye(H.paint_raster["raster-fade-duration"])})}};class Oy extends No{constructor(e){super(e,Py)}}class Sy extends No{constructor(e){super(e,{}),this.onAdd=r=>{this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},this.onRemove=r=>{this.implementation.onRemove&&this.implementation.onRemove(r,r.painter.context.gl)},this.implementation=e}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 Ty{constructor(e){this._methodToThrottle=e,this._triggered=!1,typeof MessageChannel<"u"&&(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 Iy={once:!0},Rh=63710088e-1;class Za{constructor(e,r){if(isNaN(e)||isNaN(r))throw new Error(`Invalid LngLat object: (${e}, ${r})`);if(this.lng=+e,this.lat=+r,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Za(gr(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}
2distanceTo(e){let r=Math.PI/180,s=this.lat*r,u=e.lat*r,f=Math.sin(s)*Math.sin(u)+Math.cos(s)*Math.cos(u)*Math.cos((e.lng-this.lng)*r);return Rh*Math.acos(Math.min(f,1))}static convert(e){if(e instanceof Za)return e;if(Array.isArray(e)&&(e.length===2||e.length===3))return new Za(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&typeof e=="object"&&e!==null)return new Za(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}let _g=2*Math.PI*Rh;function yg(o){return _g*Math.cos(o*Math.PI/180)}function xg(o){return(180+o)/360}function vg(o){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+o*Math.PI/360)))/360}function bg(o,e){return o/yg(e)}function Bh(o){return 360/Math.PI*Math.atan(Math.exp((180-360*o)*Math.PI/180))-90}function Cg(o,e){return o*yg(Bh(e))}class Vd{constructor(e,r,s=0){this.x=+e,this.y=+r,this.z=+s}static fromLngLat(e,r=0){let s=Za.convert(e);return new Vd(xg(s.lng),vg(s.lat),bg(r,s.lat))}toLngLat(){return new Za(360*this.x-180,Bh(this.y))}toAltitude(){return Cg(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/_g*(e=Bh(this.y),1/Math.cos(e*Math.PI/180));var e}}function wg(o,e,r){var s=2*Math.PI*6378137/256/Math.pow(2,r);return[o*s-2*Math.PI*6378137/2,e*s-2*Math.PI*6378137/2]}class Nh{constructor(e,r,s){if(!function(u,f,_){return!(u<0||u>25||_<0||_>=Math.pow(2,u)||f<0||f>=Math.pow(2,u))}(e,r,s))throw new Error(`x=${r}, y=${s}, z=${e} outside of bounds. 0<=x<${Math.pow(2,e)}, 0<=y<${Math.pow(2,e)} 0<=z<=25 `);this.z=e,this.x=r,this.y=s,this.key=Jl(0,e,e,r,s)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,r,s){let u=(_=this.y,x=this.z,b=wg(256*(f=this.x),256*(_=Math.pow(2,x)-_-1),x),M=wg(256*(f+1),256*(_+1),x),b[0]+","+b[1]+","+M[0]+","+M[1]);var f,_,x,b,M;let O=function(T,F,B){let N,$="";for(let W=T;W>0;W--)N=1<<W-1,$+=(F&N?1:0)+(B&N?2:0);return $}(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(s==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,r>1?"@2x":"").replace(/{quadkey}/g,O).replace(/{bbox-epsg-3857}/g,u)}isChildOf(e){let r=this.z-e.z;return r>0&&e.x===this.x>>r&&e.y===this.y>>r}getTilePoint(e){let r=Math.pow(2,this.z);return new ne((e.x*r-this.x)*hn,(e.y*r-this.y)*hn)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Mg{constructor(e,r){this.wrap=e,this.canonical=r,this.key=Jl(e,r.z,r.z,r.x,r.y)}}class xo{constructor(e,r,s,u,f){if(this.terrainRttPosMatrix32f=null,e<s)throw new Error(`overscaledZ should be >= z; overscaledZ = ${e}; z = ${s}`);this.overscaledZ=e,this.wrap=r,this.canonical=new Nh(s,+u,+f),this.key=Jl(r,e,s,u,f)}clone(){return new xo(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-e;return e>this.canonical.z?new xo(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new xo(e,this.wrap,e,this.canonical.x>>r,this.canonical.y>>r)}calculateScaledKey(e,r){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let s=this.canonical.z-e;return e>this.canonical.z?Jl(this.wrap*+r,e,this.canonical.z,this.canonical.x,this.canonical.y):Jl(this.wrap*+r,e,e,this.canonical.x>>s,this.canonical.y>>s)}isChildOf(e){if(e.wrap!==this.wrap)return!1;let r=this.canonical.z-e.canonical.z;return e.overscaledZ===0||e.overscaledZ<this.overscaledZ&&e.canonical.x===this.canonical.x>>r&&e.canonical.y===this.canonical.y>>r}children(e){if(this.overscaledZ>=e)return[new xo(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let r=this.canonical.z+1,s=2*this.canonical.x,u=2*this.canonical.y;return[new xo(r,this.wrap,r,s,u),new xo(r,this.wrap,r,s+1,u),new xo(r,this.wrap,r,s,u+1),new xo(r,this.wrap,r,s+1,u+1)]}isLessThan(e){return this.wrap<e.wrap||!(this.wrap>e.wrap)&&(this.overscaledZ<e.overscaledZ||!(this.overscaledZ>
2e.overscaledZ)&&(this.canonical.x<e.canonical.x||!(this.canonical.x>e.canonical.x)&&this.canonical.y<e.canonical.y))}wrapped(){return new xo(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(e){return new xo(this.overscaledZ,e,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Mg(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(e){return this.canonical.getTilePoint(new Vd(e.x-this.wrap,e.y))}}function Jl(o,e,r,s,u){(o*=2)<0&&(o=-1*o-1);let f=1<<r;return(f*f*o+f*u+s).toString(36)+r.toString(36)+e.toString(36)}de("CanonicalTileID",Nh),de("OverscaledTileID",xo,{omit:["terrainRttPosMatrix32f"]});class Pg{constructor(e,r,s,u=1,f=1,_=1,x=0){if(this.uid=e,r.height!==r.width)throw new RangeError("DEM tiles must be square");if(s&&!["mapbox","terrarium","custom"].includes(s))return void Ei(`"${s}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=r.height;let b=this.dim=r.height-2;switch(this.data=new Uint32Array(r.data.buffer),s){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=u,this.greenFactor=f,this.blueFactor=_,this.baseShift=x;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let M=0;M<b;M++)this.data[this._idx(-1,M)]=this.data[this._idx(0,M)],this.data[this._idx(b,M)]=this.data[this._idx(b-1,M)],this.data[this._idx(M,-1)]=this.data[this._idx(M,0)],this.data[this._idx(M,b)]=this.data[this._idx(M,b-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(b,-1)]=this.data[this._idx(b-1,0)],this.data[this._idx(-1,b)]=this.data[this._idx(0,b-1)],this.data[this._idx(b,b)]=this.data[this._idx(b-1,b-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let M=0;M<b;M++)for(let O=0;O<b;O++){let T=this.get(M,O);T>this.max&&(this.max=T),T<this.min&&(this.min=T)}}get(e,r){let s=new Uint8Array(this.data.buffer),u=4*this._idx(e,r);return this.unpack(s[u],s[u+1],s[u+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(e,r){if(e<-1||e>=this.dim+1||r<-1||r>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(r+1)*this.stride+(e+1)}unpack(e,r,s){return e*this.redFactor+r*this.greenFactor+s*this.blueFactor-this.baseShift}getPixels(){return new yo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,r,s){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");let u=r*this.dim,f=r*this.dim+this.dim,_=s*this.dim,x=s*this.dim+this.dim;switch(r){case-1:u=f-1;break;case 1:f=u+1}switch(s){case-1:_=x-1;break;case 1:x=_+1}let b=-r*this.dim,M=-s*this.dim;for(let O=_;O<x;O++)for(let T=u;T<f;T++)this.data[this._idx(T,O)]=e.data[this._idx(T+b,O+M)]}}de("DEMData",Pg);class Og{constructor(e){this._stringToNumber={},this._numberToString=[];for(let r=0;r<e.length;r++){let s=e[r];this._stringToNumber[s]=r,this._numberToString[r]=s}}encode(e){return this._stringToNumber[e]}decode(e){if(e>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}}class Sg{constructor(e,r,s,u,f){this.type="Feature",this._vectorTileFeature=e,e._z=r,e._x=s,e._y=u,this.properties=e.properties,this.id=f}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(e){this._geometry=e}toJSON(){let e={geometry:this.geometry};for(let r in this)r!=="_geometry"&&r!=="_vectorTileFeature"&&(e[r]=this[r]);return e}}class Tg{constructor(e,r){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new Jo(hn,16,0),this.grid3D=new Jo(hn,16,0),this.featureIndexArray=new tt,this.promoteId=r}insert(e,r,s,u,f,_){let x=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(s,u,f);let b=_?this.grid3D:this.grid;for(let M=0;M<r.length;M++){let O=r[M],T=[1/0,1/0,-1/0,-1/0];for(let F=0;F<O.length;F++){let B=O[F];T[0]=Math.min(T[0],B.x),T[1]=Math.min(T[1],B.y),T[2]=Math.max(T[2],B.x),T[3]=Math.max(T[3],B.y)}T[0]<hn&&T[1]<hn&&T[2]>=0&&T[3]>=0&&b.insert(x,T[0],T[1],T[2],T[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Ld.VectorTile(new Sh(this.rawTileData)).layers,this.sourceLayerCoder=new Og(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(e,r,s,u){this.loadVTLayers();let f=e.params,_=hn/e.tileSize/e.scale,x=Yc(f.filter),b=e.queryGeometry,M=e.queryPadding*_,O=kg(b),T=this.grid.query(O.minX-M,O.minY-M,O.maxX+M,O.maxY+M),F=kg(e.cameraQueryGeometry),B=this.grid3D.query(F.minX-M,F.minY-M,F.maxX+M,F.maxY+M,(W,et,mt,ot)=>function(R,q,st,wt,Zt){for(let Lt of R)if(q<=Lt.x&&st<=Lt.y&&wt>=Lt.x&&Zt>=Lt.y)return!0;let It=[new ne(q,st),new ne(q,Zt),new ne(wt,Zt),new ne(wt,st)];if(R.length>2){for(let Lt of It)if(qs(R,Lt))return!0}for(let Lt=0;Lt<R.length-1;Lt++)if(_0(R[Lt],R[Lt+1],It))return!0;return!1}
2(e.cameraQueryGeometry,W-M,et-M,mt+M,ot+M));for(let W of B)T.push(W);T.sort(ky);let N={},$;for(let W=0;W<T.length;W++){let et=T[W];if(et===$)continue;$=et;let mt=this.featureIndexArray.get(et),ot=null;this.loadMatchingFeature(N,mt.bucketIndex,mt.sourceLayerIndex,mt.featureIndex,x,f.layers,f.availableImages,r,s,u,(R,q,st)=>(ot||(ot=Ji(R)),q.queryIntersectsFeature({queryGeometry:b,feature:R,featureState:st,geometry:ot,zoom:this.z,transform:e.transform,pixelsToTileUnits:_,pixelPosMatrix:e.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:e.getElevation})))}return N}loadMatchingFeature(e,r,s,u,f,_,x,b,M,O,T){let F=this.bucketLayerIDs[r];if(_&&!F.some(W=>_.has(W)))return;let B=this.sourceLayerCoder.decode(s),N=this.vtLayers[B].feature(u);if(f.needGeometry){let W=Sr(N,!0);if(!f.filter(new xn(this.tileID.overscaledZ),W,this.tileID.canonical))return}else if(!f.filter(new xn(this.tileID.overscaledZ),N))return;let $=this.getId(N,B);for(let W=0;W<F.length;W++){let et=F[W];if(_&&!_.has(et))continue;let mt=b[et];if(!mt)continue;let ot={};$&&O&&(ot=O.getState(mt.sourceLayer||"_geojsonTileLayer",$));let R=qi({},M[et]);R.paint=Ig(R.paint,mt.paint,N,ot,x),R.layout=Ig(R.layout,mt.layout,N,ot,x);let q=!T||T(N,mt,ot);if(!q)continue;let st=new Sg(N,this.z,this.x,this.y,$);st.layer=R;let wt=e[et];wt===void 0&&(wt=e[et]=[]),wt.push({featureIndex:u,feature:st,intersectionZ:q})}}lookupSymbolFeatures(e,r,s,u,f,_,x,b){let M={};this.loadVTLayers();let O=Yc(f);for(let T of e)this.loadMatchingFeature(M,s,u,T,O,_,x,b,r);return M}hasLayer(e){for(let r of this.bucketLayerIDs)for(let s of r)if(e===s)return!0;return!1}getId(e,r){var s;let u=e.id;return this.promoteId&&(u=e.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[r]],typeof u=="boolean"&&(u=Number(u)),u===void 0&&(!((s=e.properties)===null||s===void 0)&&s.cluster)&&this.promoteId&&(u=Number(e.properties.cluster_id))),u}}function Ig(o,e,r,s,u){return Zr(o,(f,_)=>{let x=e instanceof Ul?e.get(_):null;return x&&x.evaluate?x.evaluate(r,s,u):x})}function kg(o){let e=1/0,r=1/0,s=-1/0,u=-1/0;for(let f of o)e=Math.min(e,f.x),r=Math.min(r,f.y),s=Math.max(s,f.x),u=Math.max(u,f.y);return{minX:e,minY:r,maxX:s,maxY:u}}function ky(o,e){return e-o}function Eg(o,e,r,s,u){let f=[];for(let _=0;_<o.length;_++){let x=o[_],b;for(let M=0;M<x.length-1;M++){let O=x[M],T=x[M+1];O.x<e&&T.x<e||(O.x<e?O=new ne(e,O.y+(e-O.x)/(T.x-O.x)*(T.y-O.y))._round():T.x<e&&(T=new ne(e,O.y+(e-O.x)/(T.x-O.x)*(T.y-O.y))._round()),O.y<r&&T.y<r||(O.y<r?O=new ne(O.x+(r-O.y)/(T.y-O.y)*(T.x-O.x),r)._round():T.y<r&&(T=new ne(O.x+(r-O.y)/(T.y-O.y)*(T.x-O.x),r)._round()),O.x>=s&&T.x>=s||(O.x>=s?O=new ne(s,O.y+(s-O.x)/(T.x-O.x)*(T.y-O.y))._round():T.x>=s&&(T=new ne(s,O.y+(s-O.x)/(T.x-O.x)*(T.y-O.y))._round()),O.y>=u&&T.y>=u||(O.y>
2=u?O=new ne(O.x+(u-O.y)/(T.y-O.y)*(T.x-O.x),u)._round():T.y>=u&&(T=new ne(O.x+(u-O.y)/(T.y-O.y)*(T.x-O.x),u)._round()),b&&O.equals(b[b.length-1])||(b=[O],f.push(b)),b.push(T)))))}}return f}de("FeatureIndex",Tg,{omit:["rawTileData","sourceLayerCoder"]});class Ha extends ne{constructor(e,r,s,u){super(e,r),this.angle=s,u!==void 0&&(this.segment=u)}clone(){return new Ha(this.x,this.y,this.angle,this.segment)}}function zg(o,e,r,s,u){if(e.segment===void 0||r===0)return!0;let f=e,_=e.segment+1,x=0;for(;x>-r/2;){if(_--,_<0)return!1;x-=o[_].dist(f),f=o[_]}x+=o[_].dist(o[_+1]),_++;let b=[],M=0;for(;x<r/2;){let O=o[_],T=o[_+1];if(!T)return!1;let F=o[_-1].angleTo(O)-O.angleTo(T);for(F=Math.abs((F+3*Math.PI)%(2*Math.PI)-Math.PI),b.push({distance:x,angleDelta:F}),M+=F;x-b[0].distance>s;)M-=b.shift().angleDelta;if(M>u)return!1;_++,x+=O.dist(T)}return!0}function Ag(o){let e=0;for(let r=0;r<o.length-1;r++)e+=o[r].dist(o[r+1]);return e}function Lg(o,e,r){return o?.6*e*r:0}function Dg(o,e){return Math.max(o?o.right-o.left:0,e?e.right-e.left:0)}function Ey(o,e,r,s,u,f){let _=Lg(r,u,f),x=Dg(r,s)*f,b=0,M=Ag(o)/2;for(let O=0;O<o.length-1;O++){let T=o[O],F=o[O+1],B=T.dist(F);if(b+B>M){let N=(M-b)/B,$=fn.number(T.x,F.x,N),W=fn.number(T.y,F.y,N),et=new Ha($,W,F.angleTo(T),O);return et._round(),!_||zg(o,et,x,_,e)?et:void 0}b+=B}}function zy(o,e,r,s,u,f,_,x,b){let M=Lg(s,f,_),O=Dg(s,u),T=O*_,F=o[0].x===0||o[0].x===b||o[0].y===0||o[0].y===b;return e-T<e/4&&(e=T+e/4),Fg(o,F?e/2*x%e:(O/2+2*f)*_*x%e,e,M,r,T,F,!1,b)}function Fg(o,e,r,s,u,f,_,x,b){let M=f/2,O=Ag(o),T=0,F=e-r,B=[];for(let N=0;N<o.length-1;N++){let $=o[N],W=o[N+1],et=$.dist(W),mt=W.angleTo($);for(;F+r<T+et;){F+=r;let ot=(F-T)/et,R=fn.number($.x,W.x,ot),q=fn.number($.y,W.y,ot);if(R>=0&&R<b&&q>=0&&q<b&&F-M>=0&&F+M<=O){let st=new Ha(R,q,mt,N);st._round(),s&&!zg(o,st,f,s,u)||B.push(st)}}T+=et}return x||B.length||_||(B=Fg(o,T/2,r,s,u,f,_,!0,b)),B}de("Anchor",Ha);let jd=to;function Rg(o,e,r,s){let u=[],f=o.image,_=f.pixelRatio,x=f.paddedRect.w-2*jd,b=f.paddedRect.h-2*jd,M={x1:o.left,y1:o.top,x2:o.right,y2:o.bottom},O=f.stretchX||[[0,x]],T=f.stretchY||[[0,b]],F=(Nt,he)=>Nt+he[1]-he[0],B=O.reduce(F,0),N=T.reduce(F,0),$=x-B,W=b-N,et=0,mt=B,ot=0,R=N,q=0,st=$,wt=0,Zt=W;if(f.content&&s){let Nt=f.content,he=Nt[2]-Nt[0],Me=Nt[3]-Nt[1];(f.textFitWidth||f.textFitHeight)&&(M=cg(o)),et=iu(O,0,Nt[0]),ot=iu(T,0,Nt[1]),mt=iu(O,Nt[0],Nt[2]),R=iu(T,Nt[1],Nt[3]),q=Nt[0]-et,wt=Nt[1]-ot,st=he-mt,Zt=Me-R}let It=M.x1,Lt=M.y1,Wt=M.x2-It,Ht=M.y2-Lt,Jt=(Nt,he,Me,be)=>{let _e=ou(Nt.stretch-et,mt,Wt,It),Ue=ru(Nt.fixed-q,st,Nt.stretch,B),jn=ou(he.stretch-ot,R,Ht,Lt),ei=ru(he.fixed-wt,Zt,he.stretch,N),Si=ou(Me.stretch-et,mt,Wt,It),vo=ru(Me.fixed-q,st,Me.stretch,B),eo=ou(be.stretch-ot,R,Ht,Lt),_i=ru(be.fixed-wt,Zt,be.stretch,N),En=new ne(_e,jn),ci=new ne(Si,jn),yi=new ne(Si,eo),xi=new ne(_e,eo),Ui=new ne(Ue/_,ei/_),bo=new ne(vo/_,_i/_),di=e*Math.PI/180;if(di){let pi=Math.sin(di),ui=Math.cos(di),Xn=[ui,-pi,pi,ui];En._matMult(Xn),ci._matMult(Xn),xi._matMult(Xn),yi._matMult(Xn)}let no=Nt.stretch+Nt.fixed,ni=he.stretch+he.fixed;return{tl:En,tr:ci,bl:xi,br:yi,tex:{x:f.paddedRect.x+jd+no,y:f.paddedRect.y+jd+ni,w:Me.stretch+Me.fixed-no,h:be.stretch+be.fixed-ni},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ui,pixelOffsetBR:bo,minFontScaleX:st/_/Wt,minFontScaleY:Zt/_/Ht,isSDF:r}};if(s&&(f.stretchX||f.stretchY)){let Nt=Bg(O,$,B),he=Bg(T,W,N);for(let Me=0;Me<Nt.length-1;Me++){let be=Nt[Me],_e=Nt[Me+1];for(let Ue=0;Ue<he.length-1;Ue++)u.push(Jt(be,he[Ue],_e,he[Ue+1]))}}else u.push(Jt({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:x+1},{fixed:0,stretch:b+1}));return u}function iu(o,e,r){let s=0;for(let u of o)s+=Math.max(e,Math.min(r,u[1]))-Math.max(e,Math.min(r,u[0]));return s}function Bg(o,e,r){let s=[{fixed:-1,stretch:0}];for(let[u,f]of o){let _=s[s.length-1];s.push({fixed:u-_.stretch,stretch:_.stretch}),s.push({fixed:u-_.stretch,stretch:_.stretch+(f-u)})}return s.push({fixed:e+jd,stretch:r}),s}function ou(o,e,r,s){return o/e*r+s}function ru(o,e,r,s){return o-e*r/s}class au{constructor(e,r,s,u,f,_,x,b,M,O){var T;if(this.boxStartIndex=e.length,M){let F=_.top,B=_.bottom,N=_.collisionPadding;N&&(F-=N[1],B+=N[3]);let $=B-F;$>0&&($=Math.max(10,$),this.circleDiameter=$)}else{let F=!((T=_.image)===null||T===void 0)&&T.content&&(_.image.textFitWidth||_.image.textFitHeight)?cg(_):{x1:_.left,y1:_.top,x2:_.right,y2:_.bottom};F.y1=F.y1*x-b[0],F.y2=F.y2*x+b[2],F.x1=F.x1*x-b[3],F.x2=F.x2*x+b[1];let B=_.collisionPadding;if(B&&(F.x1-=B[0]*x,F.y1-=B[1]*x,F.x2+=B[2]*x,F.y2+=B[3]*x),O){let N=new ne(F.x1,F.y1),$=new ne(F.x2,F.y1),W=new ne(F.x1,F.y2),et=new ne(F.x2,F.y2),mt=O*Math.PI/180;N._rotate(mt),$._rotate(mt),W._rotate(mt),et._rotate(mt),F.x1=Math.min(N.x,$.x,W.x,et.x),F.x2=Math.max(N.x,$.x,W.x,et.x),F.y1=Math.min(N.y,$.y,W.y,et.y),F.y2=Math.max(N.y,$.y,W.y,et.y)}e.emplaceBack(r.x,r.y,F.x1,F.y1,F.x2,F.y2,s,u,f)}this.boxEndIndex=e.length}}class Ay{constructor(e=[],r=(s,u)=>s<u?-1:s>u?1:0){if(this.data=e,this.length=this.data.length,this.compare=r,this.length>0)for(let s=(this.length>>1)-1;s>=0;s--)this._down(s)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)return;let e=this.data[0],r=this.data.pop();return--this.length>0&&(this.data[0]=r,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:r,compare:s}=this,u=r[e];for(;e>0;){let f=e-1>>1,_=r[f];if(s(u,_)>=0)break;r[e]=_,e=f}r[e]=u}_down(e){let{data:r,compare:s}=this,u=this.length>>1,f=r[e];for(;e<u;){let _=1+(e<<1),x=_+1;
2if(x<this.length&&s(r[x],r[_])<0&&(_=x),s(r[_],f)>=0)break;r[e]=r[_],e=_}r[e]=f}}function Ly(o,e=1,r=!1){let s=1/0,u=1/0,f=-1/0,_=-1/0,x=o[0];for(let B=0;B<x.length;B++){let N=x[B];(!B||N.x<s)&&(s=N.x),(!B||N.y<u)&&(u=N.y),(!B||N.x>f)&&(f=N.x),(!B||N.y>_)&&(_=N.y)}let b=Math.min(f-s,_-u),M=b/2,O=new Ay([],Dy);if(b===0)return new ne(s,u);for(let B=s;B<f;B+=b)for(let N=u;N<_;N+=b)O.push(new tc(B+M,N+M,M,o));let T=function(B){let N=0,$=0,W=0,et=B[0];for(let mt=0,ot=et.length,R=ot-1;mt<ot;R=mt++){let q=et[mt],st=et[R],wt=q.x*st.y-st.x*q.y;$+=(q.x+st.x)*wt,W+=(q.y+st.y)*wt,N+=3*wt}return new tc($/N,W/N,0,B)}(o),F=O.length;for(;O.length;){let B=O.pop();(B.d>T.d||!T.d)&&(T=B,r&&console.log("found best %d after %d probes",Math.round(1e4*B.d)/1e4,F)),B.max-T.d<=e||(M=B.h/2,O.push(new tc(B.p.x-M,B.p.y-M,M,o)),O.push(new tc(B.p.x+M,B.p.y-M,M,o)),O.push(new tc(B.p.x-M,B.p.y+M,M,o)),O.push(new tc(B.p.x+M,B.p.y+M,M,o)),F+=4)}return r&&(console.log(`num probes: ${F}`),console.log(`best distance: ${T.d}`)),T.p}function Dy(o,e){return e.max-o.max}function tc(o,e,r,s){this.p=new ne(o,e),this.h=r,this.d=function(u,f){let _=!1,x=1/0;for(let b=0;b<f.length;b++){let M=f[b];for(let O=0,T=M.length,F=T-1;O<T;F=O++){let B=M[O],N=M[F];B.y>u.y!=N.y>u.y&&u.x<(N.x-B.x)*(u.y-B.y)/(N.y-B.y)+B.x&&(_=!_),x=Math.min(x,ym(u,B,N))}}return(_?1:-1)*Math.sqrt(x)}(this.p,s),this.max=this.d+this.h*Math.SQRT2}var Oi;d.aB=void 0,(Oi=d.aB||(d.aB={}))[Oi.center=1]="center",Oi[Oi.left=2]="left",Oi[Oi.right=3]="right",Oi[Oi.top=4]="top",Oi[Oi.bottom=5]="bottom",Oi[Oi["top-left"]=6]="top-left",Oi[Oi["top-right"]=7]="top-right",Oi[Oi["bottom-left"]=8]="bottom-left",Oi[Oi["bottom-right"]=9]="bottom-right";let qa=7,Vh=Number.POSITIVE_INFINITY;function Ng(o,e){return e[1]!==Vh?function(r,s,u){let f=0,_=0;switch(s=Math.abs(s),u=Math.abs(u),r){case"top-right":case"top-left":case"top":_=u-qa;break;case"bottom-right":case"bottom-left":case"bottom":_=-u+qa}switch(r){case"top-right":case"bottom-right":case"right":f=-s;break;case"top-left":case"bottom-left":case"left":f=s}return[f,_]}(o,e[0],e[1]):function(r,s){let u=0,f=0;s<0&&(s=0);let _=s/Math.SQRT2;switch(r){case"top-right":case"top-left":f=_-qa;break;case"bottom-right":case"bottom-left":f=-_+qa;break;case"bottom":f=-s+qa;break;case"top":f=s-qa}switch(r){case"top-right":case"bottom-right":u=-_;break;case"top-left":case"bottom-left":u=_;break;case"left":u=s;break;case"right":u=-s}return[u,f]}(o,e[0])}function Vg(o,e,r){var s;let u=o.layout,f=(s=u.get("text-variable-anchor-offset"))===null||s===void 0?void 0:s.evaluate(e,{},r);if(f){let x=f.values,b=[];for(let M=0;M<x.length;M+=2){let O=b[M]=x[M],T=x[M+1].map(F=>F*ti);O.startsWith("top")?T[1]-=qa:O.startsWith("bottom")&&(T[1]+=qa),b[M+1]=T}return new gi(b)}let _=u.get("text-variable-anchor");if(_){let x;x=o._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[u.get("text-radial-offset").evaluate(e,{},r)*ti,Vh]:u.get("text-offset").evaluate(e,{},r).map(M=>M*ti);let b=[];for(let M of _)b.push(M,Ng(M,x));return new gi(b)}return null}function jh(o){switch(o){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Fy(o,e,r,s,u,f,_,x,b,M,O,T){let F=f.textMaxSize.evaluate(e,{});F===void 0&&(F=_);let B=o.layers[0].layout,N=B.get("icon-offset").evaluate(e,{},O),$=Ug(r.horizontal),W=_/24,et=o.tilePixelRatio*W,mt=o.tilePixelRatio*F/24,ot=o.tilePixelRatio*x,R=o.tilePixelRatio*B.get("symbol-spacing"),q=B.get("text-padding")*o.tilePixelRatio,st=function(Me,be,_e,Ue=1){let jn=Me.get("icon-padding").evaluate(be,{},_e),ei=jn&&jn.values;return[ei[0]*Ue,ei[1]*Ue,ei[2]*Ue,ei[3]*Ue]}(B,e,O,o.tilePixelRatio),wt=B.get("text-max-angle")/180*Math.PI,Zt=B.get("text-rotation-alignment")!=="viewport"&&B.get("symbol-placement")!=="point",It=B.get("icon-rotation-alignment")==="map"&&B.get("symbol-placement")!=="point",Lt=B.get("symbol-placement"),Wt=R/2,Ht=B.get("icon-text-fit"),Jt;s&&Ht!=="none"&&(o.allowVerticalPlacement&&r.vertical&&(Jt=dg(s,r.vertical,Ht,B.get("icon-text-fit-padding"),N,W)),$&&(s=dg(s,$,Ht,B.get("icon-text-fit-padding"),N,W)));let Nt=O?T.line.getGranularityForZoomLevel(O.z):1,he=(Me,be)=>{be.x<0||be.x>=hn||be.y<0||be.y>=hn||function(_e,Ue,jn,ei,Si,vo,eo,_i,En,ci,yi,xi,Ui,bo,di,no,ni,pi,ui,Xn,Cn,ar,ec,sr,Ny){let nc=_e.addToLineVertexArray(Ue,jn),Ks,ic,oc,rc,Hg=0,qg=0,Wg=0,Xg=0,Xh=-1,Kh=-1,pa={},Kg=Pi("");if(_e.allowVerticalPlacement&&ei.vertical){let Di=_i.layout.get("text-rotate").evaluate(Cn,{},sr)+90;oc=new au(En,Ue,ci,yi,xi,ei.vertical,Ui,bo,di,Di),eo&&(rc=new au(En,Ue,ci,yi,xi,eo,ni,pi,di,Di))}if(Si){let Di=_i.layout.get("icon-rotate").evaluate(Cn,{}),Co=_i.layout.get("icon-text-fit")!=="none",Ys=Rg(Si,Di,ec,Co),cr=eo?Rg(eo,Di,ec,Co):void 0;ic=new au(En,Ue,ci,yi,xi,Si,ni,pi,!1,Di),Hg=4*Ys.length;let Qs=_e.iconSizeData,Ir=null;Qs.kind==="source"?(Ir=[Tr*_i.layout.get("icon-size").evaluate(Cn,{})],Ir[0]>Ga&&Ei(`${_e.layerIds[0]}: Value for "icon-size" is >= ${Nd}. Reduce your "icon-size".`)):Qs.kind==="composite"&&(Ir=[Tr*ar.compositeIconSizes[0].evaluate(Cn,{},sr),Tr*ar.compositeIconSizes[1].evaluate(Cn,{},sr)],(Ir[0]>Ga||Ir[1]>Ga)&&Ei(`${_e.layerIds[0]}: Value for "icon-size" is >= ${Nd}. Reduce your "icon-size".`)),_e.addSymbols(_e.icon,Ys,Ir,Xn,ui,Cn,d.al.none,Ue,nc.lineStartIndex,nc.lineLength,-1,sr),Xh=_e.icon.placedSymbolArray.length-1,cr&&(qg=4*cr.length,_e.addSymbols(_e.icon,
2cr,Ir,Xn,ui,Cn,d.al.vertical,Ue,nc.lineStartIndex,nc.lineLength,-1,sr),Kh=_e.icon.placedSymbolArray.length-1)}let Yg=Object.keys(ei.horizontal);for(let Di of Yg){let Co=ei.horizontal[Di];if(!Ks){Kg=Pi(Co.text);let cr=_i.layout.get("text-rotate").evaluate(Cn,{},sr);Ks=new au(En,Ue,ci,yi,xi,Co,Ui,bo,di,cr)}let Ys=Co.positionedLines.length===1;if(Wg+=jg(_e,Ue,Co,vo,_i,di,Cn,no,nc,ei.vertical?d.al.horizontal:d.al.horizontalOnly,Ys?Yg:[Di],pa,Xh,ar,sr),Ys)break}ei.vertical&&(Xg+=jg(_e,Ue,ei.vertical,vo,_i,di,Cn,no,nc,d.al.vertical,["vertical"],pa,Kh,ar,sr));let Vy=Ks?Ks.boxStartIndex:_e.collisionBoxArray.length,jy=Ks?Ks.boxEndIndex:_e.collisionBoxArray.length,Uy=oc?oc.boxStartIndex:_e.collisionBoxArray.length,$y=oc?oc.boxEndIndex:_e.collisionBoxArray.length,Gy=ic?ic.boxStartIndex:_e.collisionBoxArray.length,Zy=ic?ic.boxEndIndex:_e.collisionBoxArray.length,Hy=rc?rc.boxStartIndex:_e.collisionBoxArray.length,qy=rc?rc.boxEndIndex:_e.collisionBoxArray.length,lr=-1,lu=(Di,Co)=>Di&&Di.circleDiameter?Math.max(Di.circleDiameter,Co):Co;lr=lu(Ks,lr),lr=lu(oc,lr),lr=lu(ic,lr),lr=lu(rc,lr);let Qg=lr>-1?1:0;Qg&&(lr*=Ny/ti),_e.glyphOffsetArray.length>=Ql.MAX_GLYPHS&&Ei("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Cn.sortKey!==void 0&&_e.addToSortKeyRanges(_e.symbolInstances.length,Cn.sortKey);let Wy=Vg(_i,Cn,sr),[Xy,Ky]=function(Di,Co){let Ys=Di.length,cr=Co?.values;if(cr?.length>0)for(let Qs=0;Qs<cr.length;Qs+=2){let Ir=cr[Qs+1];Di.emplaceBack(d.aB[cr[Qs]],Ir[0],Ir[1])}return[Ys,Di.length]}(_e.textAnchorOffsets,Wy);_e.symbolInstances.emplaceBack(Ue.x,Ue.y,pa.right>=0?pa.right:-1,pa.center>=0?pa.center:-1,pa.left>=0?pa.left:-1,pa.vertical||-1,Xh,Kh,Kg,Vy,jy,Uy,$y,Gy,Zy,Hy,qy,ci,Wg,Xg,Hg,qg,Qg,0,Ui,lr,Xy,Ky)}(o,be,Me,r,s,u,Jt,o.layers[0],o.collisionBoxArray,e.index,e.sourceLayerIndex,o.index,et,[q,q,q,q],Zt,b,ot,st,It,N,e,f,M,O,_)};if(Lt==="line")for(let Me of Eg(e.geometry,0,0,hn,hn)){let be=Xs(Me,Nt),_e=zy(be,R,wt,r.vertical||$,s,24,mt,o.overscaling,hn);for(let Ue of _e)$&&Ry(o,$.text,Wt,Ue)||he(be,Ue)}else if(Lt==="line-center"){for(let Me of e.geometry)if(Me.length>1){let be=Xs(Me,Nt),_e=Ey(be,wt,r.vertical||$,s,24,mt);_e&&he(be,_e)}}else if(e.type==="Polygon")for(let Me of vl(e.geometry,0)){let be=Ly(Me,16);he(Xs(Me[0],Nt,!0),new Ha(be.x,be.y,0))}else if(e.type==="LineString")for(let Me of e.geometry){let be=Xs(Me,Nt);he(be,new Ha(be[0].x,be[0].y,0))}else if(e.type==="Point")for(let Me of e.geometry)for(let be of Me)he([be],new Ha(be.x,be.y,0))}function jg(o,e,r,s,u,f,_,x,b,M,O,T,F,B,N){let $=function(mt,ot,R,q,st,wt,Zt,It){let Lt=q.layout.get("text-rotate").evaluate(wt,{})*Math.PI/180,Wt=[];for(let Ht of ot.positionedLines)for(let Jt of Ht.positionedGlyphs){if(!Jt.rect)continue;let Nt=Jt.rect||{},he=dy+1,Me=!0,be=1,_e=0,Ue=(st||It)&&Jt.vertical,jn=Jt.metrics.advance*Jt.scale/2;if(It&&ot.verticalizable&&(_e=Ht.lineOffset/2-(Jt.imageName?-(ti-Jt.metrics.width*Jt.scale)/2:(Jt.scale-1)*ti)),Jt.imageName){let pi=Zt[Jt.imageName];Me=pi.sdf,be=pi.pixelRatio,he=to/be}let ei=st?[Jt.x+jn,Jt.y]:[0,0],Si=st?[0,0]:[Jt.x+jn+R[0],Jt.y+R[1]-_e],vo=[0,0];Ue&&(vo=Si,Si=[0,0]);let eo=Jt.metrics.isDoubleResolution?2:1,_i=(Jt.metrics.left-he)*Jt.scale-jn+Si[0],En=(-Jt.metrics.top-he)*Jt.scale+Si[1],ci=_i+Nt.w/eo*Jt.scale/be,yi=En+Nt.h/eo*Jt.scale/be,xi=new ne(_i,En),Ui=new ne(ci,En),bo=new ne(_i,yi),di=new ne(ci,yi);if(Ue){let pi=new ne(-jn,jn-Qp),ui=-Math.PI/2,Xn=ti/2-jn,Cn=new ne(5-Qp-Xn,-(Jt.imageName?Xn:0)),ar=new ne(...vo);xi._rotateAround(ui,pi)._add(Cn)._add(ar),Ui._rotateAround(ui,pi)._add(Cn)._add(ar),bo._rotateAround(ui,pi)._add(Cn)._add(ar),di._rotateAround(ui,pi)._add(Cn)._add(ar)}if(Lt){let pi=Math.sin(Lt),ui=Math.cos(Lt),Xn=[ui,-pi,pi,ui];xi._matMult(Xn),Ui._matMult(Xn),bo._matMult(Xn),di._matMult(Xn)}let no=new ne(0,0),ni=new ne(0,0);Wt.push({tl:xi,tr:Ui,bl:bo,br:di,tex:Nt,writingMode:ot.writingMode,glyphOffset:ei,sectionIndex:Jt.sectionIndex,isSDF:Me,pixelOffsetTL:no,pixelOffsetBR:ni,minFontScaleX:0,minFontScaleY:0})}return Wt}(0,r,x,u,f,_,s,o.allowVerticalPlacement),W=o.textSizeData,et=null;W.kind==="source"?(et=[Tr*u.layout.get("text-size").evaluate(_,{})],et[0]>Ga&&Ei(`${o.layerIds[0]}: Value for "text-size" is >= ${Nd}. Reduce your "text-size".`)):W.kind==="composite"&&(et=[Tr*B.compositeTextSizes[0].evaluate(_,{}
2,N),Tr*B.compositeTextSizes[1].evaluate(_,{},N)],(et[0]>Ga||et[1]>Ga)&&Ei(`${o.layerIds[0]}: Value for "text-size" is >= ${Nd}. Reduce your "text-size".`)),o.addSymbols(o.text,$,et,x,f,_,M,e,b.lineStartIndex,b.lineLength,F,N);for(let mt of O)T[mt]=o.text.placedSymbolArray.length-1;return 4*$.length}function Ug(o){for(let e in o)return o[e];return null}function Ry(o,e,r,s){let u=o.compareText;if(e in u){let f=u[e];for(let _=f.length-1;_>=0;_--)if(s.dist(f[_])<r)return!0}else u[e]=[];return u[e].push(s),!1}let $g=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Uh{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[r,s]=new Uint8Array(e,0,2);if(r!==219)throw new Error("Data does not appear to be in a KDBush format.");let u=s>>4;if(u!==1)throw new Error(`Got v${u} data when expected v1.`);let f=$g[15&s];if(!f)throw new Error("Unrecognized array type.");let[_]=new Uint16Array(e,2,1),[x]=new Uint32Array(e,4,1);return new Uh(x,_,f,e)}constructor(e,r=64,s=Float64Array,u){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=s,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let f=$g.indexOf(this.ArrayType),_=2*e*this.ArrayType.BYTES_PER_ELEMENT,x=e*this.IndexArrayType.BYTES_PER_ELEMENT,b=(8-x%8)%8;if(f<0)throw new Error(`Unexpected typed array class: ${s}.`);u&&u instanceof ArrayBuffer?(this.data=u,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+x+b,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+_+x+b),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+x+b,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+f]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=e)}add(e,r){let s=this._pos>>1;return this.ids[s]=s,this.coords[this._pos++]=e,this.coords[this._pos++]=r,s}finish(){let e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return $h(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,s,u){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:f,coords:_,nodeSize:x}=this,b=[0,f.length-1,0],M=[];for(;b.length;){let O=b.pop()||0,T=b.pop()||0,F=b.pop()||0;if(T-F<=x){for(let W=F;W<=T;W++){let et=_[2*W],mt=_[2*W+1];et>=e&&et<=s&&mt>=r&&mt<=u&&M.push(f[W])}continue}let B=F+T>>1,N=_[2*B],$=_[2*B+1];N>=e&&N<=s&&$>=r&&$<=u&&M.push(f[B]),(O===0?e<=N:r<=$)&&(b.push(F),b.push(B-1),b.push(1-O)),(O===0?s>=N:u>=$)&&(b.push(B+1),b.push(T),b.push(1-O))}return M}within(e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:u,coords:f,nodeSize:_}=this,x=[0,u.length-1,0],b=[],M=s*s;for(;x.length;){let O=x.pop()||0,T=x.pop()||0,F=x.pop()||0;if(T-F<=_){for(let W=F;W<=T;W++)Zg(f[2*W],f[2*W+1],e,r)<=M&&b.push(u[W]);continue}let B=F+T>>1,N=f[2*B],$=f[2*B+1];Zg(N,$,e,r)<=M&&b.push(u[B]),(O===0?e-s<=N:r-s<=$)&&(x.push(F),x.push(B-1),x.push(1-O)),(O===0?e+s>=N:r+s>=$)&&(x.push(B+1),x.push(T),x.push(1-O))}return b}}function $h(o,e,r,s,u,f){if(u-s<=r)return;let _=s+u>>1;Gg(o,e,_,s,u,f),$h(o,e,r,s,_-1,1-f),$h(o,e,r,_+1,u,1-f)}function Gg(o,e,r,s,u,f){for(;u>s;){if(u-s>600){let M=u-s+1,O=r-s+1,T=Math.log(M),F=.5*Math.exp(2*T/3),B=.5*Math.sqrt(T*F*(M-F)/M)*(O-M/2<0?-1:1);Gg(o,e,r,Math.max(s,Math.floor(r-O*F/M+B)),Math.min(u,Math.floor(r+(M-O)*F/M+B)),f)}let _=e[2*r+f],x=s,b=u;for(Ud(o,e,s,r),e[2*u+f]>_&&Ud(o,e,s,u);x<b;){for(Ud(o,e,x,b),x++,b--;e[2*x+f]<_;)x++;for(;e[2*b+f]>_;)b--}e[2*s+f]===_?Ud(o,e,s,b):(b++,Ud(o,e,b,u)),b<=r&&(s=b+1),r<=b&&(u=b-1)}}function Ud(o,e,r,s){Gh(o,r,s),Gh(e,2*r,2*s),Gh(e,2*r+1,2*s+1)}function Gh(o,e,r){let s=o[e];o[e]=o[r],o[r]=s}function Zg(o,e,r,s){let u=o-r,f=e-s;return u*u+f*f}var Zh;d.cm=void 0,(Zh=d.cm||(d.cm={})).create="create",Zh.load="load",Zh.fullLoad="fullLoad";let su=null,$d=[],Hh=1e3/60,qh="loadTime",Wh="fullLoadTime",By={mark(o){performance.mark(o)},frame(o){let e=o;su!=null&&$d.push(e-su),su=e},clearMetrics(){su=null,$d=[],performance.clearMeasures(qh),performance.clearMeasures(Wh);for(let o in d.cm)performance.clearMarks(d.cm[o])},getPerformanceMetrics(){performance.measure(qh,d.cm.create,d.cm.load),performance.measure(Wh,d.cm.create,d.cm.fullLoad);let o=performance.getEntriesByName(qh)[0].duration,e=performance.getEntriesByName(Wh)[0].duration,r=$d.length,s=1/($d.reduce((f,_)=>f+_,0)/r/1e3),u=$d.filter(f=>f>Hh).reduce((f,_)=>f+(_-Hh)/Hh,0);return{loadTime:o,fullLoadTime:e,fps:s,percentDroppedFrames:u/(r+u)*100,totalFrames:r}}};d.$=Vd,d.A=Pn,d.B=fn,d.C=xn,d.D=ye,d.E=at,d.F=ld,d.G=function(o){if
2(fr==null){let e=o.navigator?o.navigator.userAgent:null;fr=!!o.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return fr},d.H=class{constructor(o,e){this.target=o,this.mapId=e,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Ty(()=>this.process()),this.subscription=Hr(this.target,"message",r=>this.receive(r),!1),this.globalScope=To(self)?o:window}registerMessageHandler(o,e){this.messageHandlers[o]=e}sendAsync(o,e){return new Promise((r,s)=>{let u=Math.round(1e18*Math.random()).toString(36).substring(0,10),f=e?Hr(e.signal,"abort",()=>{f?.unsubscribe(),delete this.resolveRejects[u];let b={id:u,type:"<cancel>",origin:location.origin,targetMapId:o.targetMapId,sourceMapId:this.mapId};this.target.postMessage(b)},Iy):null;this.resolveRejects[u]={resolve:b=>{f?.unsubscribe(),r(b)},reject:b=>{f?.unsubscribe(),s(b)}};let _=[],x=Object.assign(Object.assign({},o),{id:u,sourceMapId:this.mapId,origin:location.origin,data:Rs(o.data,_)});this.target.postMessage(x,{transfer:_})})}receive(o){let e=o.data,r=e.id;if(!(e.origin!=="file://"&&location.origin!=="file://"&&e.origin!=="resource://android"&&location.origin!=="resource://android"&&e.origin!==location.origin||e.targetMapId&&this.mapId!==e.targetMapId)){if(e.type==="<cancel>"){delete this.tasks[r];let s=this.abortControllers[r];return delete this.abortControllers[r],void(s&&s.abort())}if(To(self)||e.mustQueue)return this.tasks[r]=e,this.taskQueue.push(r),void this.invoker.trigger();this.processTask(r,e)}}process(){if(this.taskQueue.length===0)return;let o=this.taskQueue.shift(),e=this.tasks[o];delete this.tasks[o],this.taskQueue.length>0&&this.invoker.trigger(),e&&this.processTask(o,e)}processTask(o,e){return a(this,void 0,void 0,function*(){if(e.type==="<response>"){let u=this.resolveRejects[o];return delete this.resolveRejects[o],u?void(e.error?u.reject(ra(e.error)):u.resolve(ra(e.data))):void 0}if(!this.messageHandlers[e.type])return void this.completeTask(o,new Error(`Could not find a registered handler for ${e.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let r=ra(e.data),s=new AbortController;this.abortControllers[o]=s;try{let u=yield this.messageHandlers[e.type](e.sourceMapId,r,s);this.completeTask(o,null,u)}catch(u){this.completeTask(o,u)}})}completeTask(o,e,r){let s=[];delete this.abortControllers[o];let u={id:o,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:e?Rs(e):null,data:Rs(r,s)};this.target.postMessage(u,{transfer:s})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},d.I=Ih,d.J=Xo,d.K=function(){var o=new Pn(16);return Pn!=Float32Array&&(o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[11]=0,o[12]=0,o[13]=0,o[14]=0),o[0]=1,o[5]=1,o[10]=1,o[15]=1,o},d.L=function(o,e,r){var s,u,f,_,x,b,M,O,T,F,B,N,$=r[0],W=r[1],et=r[2];return e===o?(o[12]=e[0]*$+e[4]*W+e[8]*et+e[12],o[13]=e[1]*$+e[5]*W+e[9]*et+e[13],o[14]=e[2]*$+e[6]*W+e[10]*et+e[14],o[15]=e[3]*$+e[7]*W+e[11]*et+e[15]):(u=e[1],f=e[2],_=e[3],x=e[4],b=e[5],M=e[6],O=e[7],T=e[8],F=e[9],B=e[10],N=e[11],o[0]=s=e[0],o[1]=u,o[2]=f,o[3]=_,o[4]=x,o[5]=b,o[6]=M,o[7]=O,o[8]=T,o[9]=F,o[10]=B,o[11]=N,o[12]=s*$+x*W+T*et+e[12],o[13]=u*$+b*W+F*et+e[13],o[14]=f*$+M*W+B*et+e[14],o[15]=_*$+O*W+N*et+e[15]),o},d.M=function(o,e,r){var s=r[0],u=r[1],f=r[2];return o[0]=e[0]*s,o[1]=e[1]*s,o[2]=e[2]*s,o[3]=e[3]*s,o[4]=e[4]*u,o[5]=e[5]*u,o[6]=e[6]*u,o[7]=e[7]*u,o[8]=e[8]*f,o[9]=e[9]*f,o[10]=e[10]*f,o[11]=e[11]*f,o[12]=e[12],o[13]=e[13],o[14]=e[14],o[15]=e[15],o},d.N=function(o,e,r){var s=e[0],u=e[1],f=e[2],_=e[3],x=e[4],b=e[5],M=e[6],O=e[7],T=e[8],F=e[9],B=e[10],N=e[11],$=e[12],W=e[13],et=e[14],mt=e[15],ot=r[0],R=r[1],q=r[2],st=r[3];return o[0]=ot*s+R*x+q*T+st*$,o[1]=ot*u+R*b+q*F+st*W,o[2]=ot*f+R*M+q*B+st*et,o[3]=ot*_+R*O+q*N+st*mt,o[4]=(ot=r[4])*s+(R=r[5])*x+(q=r[6])*T+(st=r[7])*$,o[5]=ot*u+R*b+q*F+st*W,o[6]=ot*f+R*M+q*B+st*et,o[7]=ot*_+R*O+q*N+st*mt,o[8]=(ot=r[8])*s+(R=r[9])*x+(q=r[10])*T+(st=r[11])*$,o[9]=ot*u+R*b+q*F+st*W,o[10]=ot*f+R*M+q*B+st*et,o[11]=ot*_+R*O+q*N+st*mt,o[12]=(ot=r[12])*s+(R=r[13])*x+(q=r[14])*T+(st=r[15])*$,o[13]=ot*u+R*b+q*F+st*W,o[14]=ot*f+R*M+q*B+st*et,o[15]=ot*_+R*O+q*N+st*mt,o},d.O=function(o,e){let r={};for(let s=0;s<e.length;s++){let u=e[s];u in o&&(r[u]=o[u])}return r}
2,d.P=ne,d.Q=Za,d.R=yo,d.S=vg,d.T=hd,d.U=xg,d.V=hi,d.W=ri,d.X=ms,d.Y=xo,d.Z=hn,d._=a,d.a=Eo,d.a$=function(o,e,r){var s=Math.sin(r),u=Math.cos(r),f=e[4],_=e[5],x=e[6],b=e[7],M=e[8],O=e[9],T=e[10],F=e[11];return e!==o&&(o[0]=e[0],o[1]=e[1],o[2]=e[2],o[3]=e[3],o[12]=e[12],o[13]=e[13],o[14]=e[14],o[15]=e[15]),o[4]=f*u+M*s,o[5]=_*u+O*s,o[6]=x*u+T*s,o[7]=b*u+F*s,o[8]=M*u-f*s,o[9]=O*u-_*s,o[10]=T*u-x*s,o[11]=F*u-b*s,o},d.a0=25,d.a1=Nh,d.a2=o=>{let e=window.document.createElement("video");return e.muted=!0,new Promise(r=>{e.onloadstart=()=>{r(e)};for(let s of o){let u=window.document.createElement("source");Ko(s)||(e.crossOrigin="Anonymous"),u.src=s,e.appendChild(u)}})},d.a3=Ft,d.a4=function(){return va++},d.a5=v,d.a6=Ql,d.a7=Yc,d.a8=Sr,d.a9=Sg,d.aA=function(o,e,r,s,u=!1){if(!r[0]&&!r[1])return[0,0];let f=u?s==="map"?-o.bearingInRadians:0:s==="viewport"?o.bearingInRadians:0;if(f){let _=Math.sin(f),x=Math.cos(f);r=[r[0]*x-r[1]*_,r[0]*_+r[1]*x]}return[u?r[0]:mr(e,r[0],o.zoom),u?r[1]:mr(e,r[1],o.zoom)]},d.aC=zh,d.aD=jh,d.aE=Eh,d.aF=Uh,d.aG=Zn,d.aH=Xp,d.aI=nt,d.aJ=ze,d.aK=Qt,d.aL=gr,d.aM=ko,d.aN=Cg,d.aO=function(o,e,r){return o[0]=e[0]*r,o[1]=e[1]*r,o[2]=e[2]*r,o},d.aP=function(o,e,r){return o[0]=e[0]+r[0],o[1]=e[1]+r[1],o[2]=e[2]+r[2],o},d.aQ=function(o){var e=new Pn(3);return e[0]=o[0],e[1]=o[1],e[2]=o[2],e},d.aR=function(o,e,r){return o[0]=e[0]*r[0],o[1]=e[1]*r[1],o[2]=e[2]*r[2],o[3]=e[3]*r[3],o},d.aS=function(o,e,r){return o[0]=e[0]-r[0],o[1]=e[1]-r[1],o[2]=e[2]-r[2],o},d.aT=function(o,e){var r=e[0],s=e[1],u=e[2],f=r*r+s*s+u*u;return f>0&&(f=1/Math.sqrt(f)),o[0]=e[0]*f,o[1]=e[1]*f,o[2]=e[2]*f,o},d.aU=function(o,e,r){var s=e[0],u=e[1],f=e[2],_=r[0],x=r[1],b=r[2];return o[0]=u*b-f*x,o[1]=f*_-s*b,o[2]=s*x-u*_,o},d.aV=function(o,e){return o[0]*e[0]+o[1]*e[1]+o[2]*e[2]},d.aW=Mg,d.aX=Jl,d.aY=function(o,e,r,s,u){var f,_=1/Math.tan(e/2);return o[0]=_/r,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=_,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[11]=-1,o[12]=0,o[13]=0,o[15]=0,u!=null&&u!==1/0?(o[10]=(u+s)*(f=1/(s-u)),o[14]=2*u*s*f):(o[10]=-1,o[14]=-2*s),o},d.aZ=function(o){var e=new Pn(16);return e[0]=o[0],e[1]=o[1],e[2]=o[2],e[3]=o[3],e[4]=o[4],e[5]=o[5],e[6]=o[6],e[7]=o[7],e[8]=o[8],e[9]=o[9],e[10]=o[10],e[11]=o[11],e[12]=o[12],e[13]=o[13],e[14]=o[14],e[15]=o[15],e},d.a_=function(o,e,r){var s=Math.sin(r),u=Math.cos(r),f=e[0],_=e[1],x=e[2],b=e[3],M=e[4],O=e[5],T=e[6],F=e[7];return e!==o&&(o[8]=e[8],o[9]=e[9],o[10]=e[10],o[11]=e[11],o[12]=e[12],o[13]=e[13],o[14]=e[14],o[15]=e[15]),o[0]=f*u+M*s,o[1]=_*u+O*s,o[2]=x*u+T*s,o[3]=b*u+F*s,o[4]=M*u-f*s,o[5]=O*u-_*s,o[6]=T*u-x*s,o[7]=F*u-b*s,o},d.aa=function(o){let e={};if(o.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(r,s,u,f)=>{let _=u||f;return e[s]=!_||_.toLowerCase(),""}),e["max-age"]){let r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e},d.ab=function(o){return o*Math.PI/180},d.ac=function(o){return Math.pow(2,o)},d.ad=Rn,d.ae=mi,d.af=85.051129,d.ag=bg,d.ah=function(o){return Math.log(o)/Math.LN2},d.ai=function(o){var e=o[0],r=o[1];return e*e+r*r},d.aj=function(o,e){let r=[];for(let s in o)s in e||r.push(s);return r},d.ak=function(o,e){let r=0,s=0;if(o.kind==="constant")s=o.layoutSize;else if(o.kind!=="source"){let{interpolationType:u,minZoom:f,maxZoom:_}=o,x=u?mi(Ni.interpolationFactor(u,e,f,_),0,1):0;o.kind==="camera"?s=fn.number(o.minSize,o.maxSize,x):r=x}return{uSizeT:r,uSize:s}},d.am=function(o,{uSize:e,uSizeT:r},{lowerSize:s,upperSize:u}){return o.kind==="source"?s/Tr:o.kind==="composite"?fn.number(s/Tr,u/Tr,r):e},d.an=function(o,e){var r=e[0],s=e[1],u=e[2],f=e[3],_=e[4],x=e[5],b=e[6],M=e[7],O=e[8],T=e[9],F=e[10],B=e[11],N=e[12],$=e[13],W=e[14],et=e[15],mt=r*x-s*_,ot=r*b-u*_,R=r*M-f*_,q=s*b-u*x,st=s*M-f*x,wt=u*M-f*b,Zt=O*$-T*N,It=O*W-F*N,Lt=O*et-B*N,Wt=T*W-F*$,Ht=T*et-B*$,Jt=F*et-B*W,Nt=mt*Jt-ot*Ht+R*Wt+q*Lt-st*It+wt*Zt;return Nt?(o[0]=(x*Jt-b*Ht+M*Wt)*(Nt=1/Nt),o[1]=(u*Ht-s*Jt-f*Wt)*Nt,o[2]=($*wt-W*st+et*q)*Nt,o[3]=(F*st-T*wt-B*q)*Nt,o[4]=(b*Lt-_*Jt-M*It)*Nt,o[5]=(r*Jt-u*Lt+f*It)*Nt,o[6]=(W*R-N*wt-et*ot)*Nt,o[7]=(O*wt-F*R+B*ot)*Nt,o[8]=(_*Ht-x*Lt+M*Zt)*Nt,o[9]=(s*Lt-r*Ht-f*Zt)*Nt,o[10]=(N*st-$*R+et*mt)*Nt,o[11]=(T*R-O*st-B*mt)*Nt,o[12]=(x*It-_*Wt-b*Zt)*Nt,o[13]=(r*Wt-s*It+u*Zt)*Nt,o[14]=($*ot-N*q-W*mt)*Nt,o[15]=(O*q-T*ot+F*mt)*Nt,o):null},d.ao=ya,d.ap=function(o){return Math.hypot(o[0],o[1])},d.aq=function(o){return o[0]=0,o[1]=0,o},d.ar=function(o,e,r){return o[0]=e[0]*r,o[1]=e[1]*r,o},d.as=Ah,d.at=bi,d.au=function(o,e,r,s){let u=e.y-o.y,f=e.x-o.x,_=s.y-r.y,x=s.x-r.x,b=_*f-x*u;if(b===0)return null;let M=(x*(o.y-r.y)-_*(o.x-r.x))/b;return new ne(o.x+M*f,o.y+M*u)},d.av=Eg,d.aw=Md,d.ax=function(o){let e=1/0,r=1/0,s=-1/0,u=-1/0;for(let f of o)e=Math.min(e,f.x),r=Math.min(r,f.y),s=Math.max(s,f.x),u=Math.max(u,f.y);return[e,r,s,u]},d.ay=ti,d.az=mr,d.b=oo,d.b$=function(o,e){var r=o[0],s=o[1],u=o[2],f=o[3],_=o[4],x=o[5],b=o[6],M=o[7],O=o[8],T=o[9],F=o[10],B=o[11],N=o[12],$=o[13],W=o[14],et=o[15],mt=e[0],ot=e[1],R=e[2],q=e[3],st=e[4],wt=e[5],Zt=e[6],It=e[7],Lt=e[8],Wt=e[9],Ht=e[10],Jt=e[11],Nt=e[12],he=e[13],Me=e[14],be=e[15];return Math.abs(r-mt)<=Fn*Math.max(1,Math.abs(r),Math.abs(mt))&&Math.abs(s-ot)<=Fn*Math.max(1,Math.abs(s),Math.abs(ot))&&Math.abs(u-R)<=Fn*Math.max(1,Math.abs(u),Math.abs(R))&&Math.abs(f-q)<=Fn*Math.max(1,Math.abs(f),Math.abs(q))&&Math.abs(_-st)<=Fn*Math.max(1,Math.abs(_),Math.abs(st))&&Math.abs(x-wt)<=Fn*Math.max(1,Math.abs(x),Math.abs(wt))&&Math.abs(b-Zt)<=Fn*Math.max(1,Math.abs(b),Math.abs(Zt))&&Math.abs(M-It)<=Fn*Math.max(1,Math.abs(M),Math.abs(It))&&Math.abs(O-Lt)<=Fn*Math.max(1,Math.abs(O),Math.abs(Lt))&&Math.abs(T-Wt)<=Fn*Math.max(1,Math.abs(T),Math.abs(Wt))&&Math.abs(F-Ht)<=Fn*Math.max(1,Math.abs(F),Math.abs(Ht))&&Math.abs(B-Jt)<=Fn*Math.max(1,Math.abs(B),Math.abs(Jt))&&Math.abs(N-Nt)<=Fn*Math.max(1,Math.abs(N),Math.abs(Nt))&&Math.abs($-he)<=Fn*Math.max(1,Math.abs($),Math.abs(he))&&Math.abs(W-Me)<=Fn*Math.max(1,Math.abs(W),Math.abs(Me))&&Math.abs(et-be)<=Fn*Math.max(1,Math.abs(et),Math.abs(be))},d.b0=function(){let o=new Float32Array(16);return Rn(o),o},d.b1=function(){let o=new Float64Array(16);return Rn(o),o},d.b2=function(){return new Float64Array(16)},d.b3=function(o,e,r){let s=new Float64Array(4);return function(u,f,_,x){var b=.5*Math.PI/180;f*=b,_*=b,x*=b;var M=Math.sin(f),O=Math.cos(f),T=Math.sin(_),F=Math.cos(_),B=Math.sin(x),N=Math.cos(x);u[0]=M*F*N-O*T*B,u[1]=O*T*N+M*F*B,u[2]=O*F*B-M*T*N,u[3]=O*F*N+M*T*B}(s,o,e-90,r),s},d.b4=function(o,e,r,s){var u,f,_,x,b,M=e[0],O=e[1],T=e[2],F=e[3],B=r[0],N=r[1],$=r[2],W=r[3];return(f=M*B+O*N+T*$+F*W)<0&&(f=-f,B=-B,N=-N,$=-$,W=-W),1-f>Fn?(u=Math.acos(f),_=Math.sin(u),x=Math.sin((1-s)*u)/_,b=Math.sin(s*u)/_):(x=1-s,b=s),o[0]=x*M+b*B,o[1]=x*O+b*N,o[2]=x
2*T+b*$,o[3]=x*F+b*W,o},d.b5=function(o){let e=new Float64Array(9);var r,s,u,f,_,x,b,M,O,T,F,B,N,$,W,et,mt,ot;T=(u=(s=o)[0])*(b=u+u),F=(f=s[1])*b,N=(_=s[2])*b,$=_*(M=f+f),et=(x=s[3])*b,mt=x*M,ot=x*(O=_+_),(r=e)[0]=1-(B=f*M)-(W=_*O),r[3]=F-ot,r[6]=N+mt,r[1]=F+ot,r[4]=1-T-W,r[7]=$-et,r[2]=N-mt,r[5]=$+et,r[8]=1-T-B;let R=ko(-Math.asin(mi(e[2],-1,1))),q,st;return Math.hypot(e[5],e[8])<.001?(q=0,st=-ko(Math.atan2(e[3],e[4]))):(q=ko(e[5]===0&&e[8]===0?0:Math.atan2(e[5],e[8])),st=ko(e[1]===0&&e[0]===0?0:Math.atan2(e[1],e[0]))),{roll:q,pitch:R+90,bearing:st}},d.b6=function(o,e){return o.roll==e.roll&&o.pitch==e.pitch&&o.bearing==e.bearing},d.b7=Ne,d.b8=la,d.b9=Kl,d.bA=function(o){if(o.type==="custom")return new Sy(o);switch(o.type){case"background":return new My(o);case"circle":return new x0(o);case"fill":return new B0(o);case"fill-extrusion":return new H0(o);case"heatmap":return new b0(o);case"hillshade":return new w0(o);case"line":return new ty(o);case"raster":return new Oy(o);case"symbol":return new nu(o)}},d.bB=Wi,d.bC=function(o,e){if(!o)return[{command:"setStyle",args:[e]}];let r=[];try{if(!dt(o.version,e.version))return[{command:"setStyle",args:[e]}];dt(o.center,e.center)||r.push({command:"setCenter",args:[e.center]}),dt(o.centerAltitude,e.centerAltitude)||r.push({command:"setCenterAltitude",args:[e.centerAltitude]}),dt(o.zoom,e.zoom)||r.push({command:"setZoom",args:[e.zoom]}),dt(o.bearing,e.bearing)||r.push({command:"setBearing",args:[e.bearing]}),dt(o.pitch,e.pitch)||r.push({command:"setPitch",args:[e.pitch]}),dt(o.roll,e.roll)||r.push({command:"setRoll",args:[e.roll]}),dt(o.sprite,e.sprite)||r.push({command:"setSprite",args:[e.sprite]}),dt(o.glyphs,e.glyphs)||r.push({command:"setGlyphs",args:[e.glyphs]}),dt(o.transition,e.transition)||r.push({command:"setTransition",args:[e.transition]}),dt(o.light,e.light)||r.push({command:"setLight",args:[e.light]}),dt(o.terrain,e.terrain)||r.push({command:"setTerrain",args:[e.terrain]}),dt(o.sky,e.sky)||r.push({command:"setSky",args:[e.sky]}),dt(o.projection,e.projection)||r.push({command:"setProjection",args:[e.projection]});let s={},u=[];(function(_,x,b,M){let O;for(O in x=x||{},_=_||{})Object.prototype.hasOwnProperty.call(_,O)&&(Object.prototype.hasOwnProperty.call(x,O)||vt(O,b,M));for(O in x)Object.prototype.hasOwnProperty.call(x,O)&&(Object.prototype.hasOwnProperty.call(_,O)?dt(_[O],x[O])||(_[O].type==="geojson"&&x[O].type==="geojson"&&re(_,x,O)?Tt(b,{command:"setGeoJSONSourceData",args:[O,x[O].data]}):Gt(O,x,b,M)):At(O,x,b))})(o.sources,e.sources,u,s);let f=[];o.layers&&o.layers.forEach(_=>{"source"in _&&s[_.source]?r.push({command:"removeLayer",args:[_.id]}):f.push(_)}),r=r.concat(u),function(_,x,b){x=x||[];let M=(_=_||[]).map(Pe),O=x.map(Pe),T=_.reduce(Fe,{}),F=x.reduce(Fe,{}),B=M.slice(),N=Object.create(null),$,W,et,mt,ot;for(let R=0,q=0;R<M.length;R++)$=M[R],Object.prototype.hasOwnProperty.call(F,$)?q++:(Tt(b,{command:"removeLayer",args:[$]}),B.splice(B.indexOf($,q),1));for(let R=0,q=0;R<O.length;R++)$=O[O.length-1-R],B[B.length-1-R]!==$&&(Object.prototype.hasOwnProperty.call(T,$)?(Tt(b,{command:"removeLayer",args:[$]}),B.splice(B.lastIndexOf($,B.length-q),1)):q++,mt=B[B.length-R],Tt(b,{command:"addLayer",args:[F[$],mt]}),B.splice(B.length-R,0,$),N[$]=!0);for(let R=0;R<O.length;R++)if($=O[R],W=T[$],et=F[$],!N[$]&&!dt(W,et))if(dt(W.source,et.source)&&dt(W["source-layer"],et["source-layer"])&&dt(W.type,et.type)){for(ot in ae(W.layout,et.layout,b,$,null,"setLayoutProperty"),ae(W.paint,et.paint,b,$,null,"setPaintProperty"),dt(W.filter,et.filter)||Tt(b,{command:"setFilter",args:[$,et.filter]}),dt(W.minzoom,et.minzoom)&&dt(W.maxzoom,et.maxzoom)||Tt(b,{command:"setLayerZoomRange",args:[$,et.minzoom,et.maxzoom]}),W)Object.prototype.hasOwnProperty.call(W,ot)&&ot!=="layout"&&ot!=="paint"&&ot!=="filter"&&ot!=="metadata"&&ot!=="minzoom"&&ot!=="maxzoom"&&(ot.indexOf("paint.")===0?ae(W[ot],et[ot],b,$,ot.slice(6),"setPaintProperty"):dt(W[ot],et[ot])||Tt(b,{command:"setLayerProperty",args:[$,ot,et[ot]]}));for(ot in et)Object.prototype.hasOwnProperty.call(et,ot)&&!Object.prototype.hasOwnProperty.call(W,ot)&&ot!=="layout"&&ot!=="paint"&&ot!=="filter"&&ot!=="metadata"&&ot!=="minzoom"&&ot!=="maxzoom"&&(ot.indexOf("paint.")===0?ae(W[ot],et[ot],b,$,ot.slice(6),"setPaintProperty"):dt(W[ot],et[ot])||Tt(b,{command:"setLayerProperty",args:[$,ot,et[ot]]}))}else Tt(b,{command:"removeLayer",args:[$]}),mt=B[B.lastIndexOf($)+1],Tt(b,{command:"addLayer",args:[et,mt]})}(f,e.layers,r)}catch(s){console.warn("Unable to compute style diff:",s),r=[{command:"setStyle",args:[e]}]}return r},d.bD=function(o){let e=[],r=o.id;return r===void 0&&e.push({message:`layers.${r}: missing required property "id"`}),o.render===void 0&&e.push({message:`layers.${r}: missing required method "render"`}),o.renderingMode&&o.renderingMode!=="2d"&&o.renderingMode!=="3d"&&e.push({message:`layers.${r}: property "renderingMode" must be either "2d" or "3d"`}),e},d.bE=function o(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(let s=0;s<e.length;s++)if(!o(e[s],r[s]))return!1;return!0}if(typeof e=="object"&&e!==null&&r!==null){if(typeof r!="object"||Object.keys(e).length!==Object.keys(r).length)return!1;for(let s in e)if(!o(e[s],r[s]))return!1;return!0}return e===r},d.bF=Zr,d.bG=us,d.bH=class extends jo{constructor(o,e){super(o,e),this.current=0}
2set(o){this.current!==o&&(this.current=o,this.gl.uniform1i(this.location,o))}},d.bI=Qi,d.bJ=class extends jo{constructor(o,e){super(o,e),this.current=Or}set(o){if(o[12]!==this.current[12]||o[0]!==this.current[0])return this.current=o,void this.gl.uniformMatrix4fv(this.location,!1,o);for(let e=1;e<16;e++)if(o[e]!==this.current[e]){this.current=o,this.gl.uniformMatrix4fv(this.location,!1,o);break}}},d.bK=ca,d.bL=class extends jo{constructor(o,e){super(o,e),this.current=[0,0,0]}set(o){o[0]===this.current[0]&&o[1]===this.current[1]&&o[2]===this.current[2]||(this.current=o,this.gl.uniform3f(this.location,o[0],o[1],o[2]))}},d.bM=class extends jo{constructor(o,e){super(o,e),this.current=[0,0]}set(o){o[0]===this.current[0]&&o[1]===this.current[1]||(this.current=o,this.gl.uniform2f(this.location,o[0],o[1]))}},d.bN=Po,d.bO=function(o,e){var r=Math.sin(e),s=Math.cos(e);return o[0]=s,o[1]=r,o[2]=0,o[3]=-r,o[4]=s,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o},d.bP=function(o,e,r){var s=e[0],u=e[1],f=e[2];return o[0]=s*r[0]+u*r[3]+f*r[6],o[1]=s*r[1]+u*r[4]+f*r[7],o[2]=s*r[2]+u*r[5]+f*r[8],o},d.bQ=function(o,e,r,s,u,f,_){var x=1/(e-r),b=1/(s-u),M=1/(f-_);return o[0]=-2*x,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*b,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*M,o[11]=0,o[12]=(e+r)*x,o[13]=(u+s)*b,o[14]=(_+f)*M,o[15]=1,o},d.bR=class extends sa{},d.bS=oy,d.bT=class extends Hl{},d.bU=hh,d.bV=function(o){return o<=1?1:Math.pow(2,Math.ceil(Math.log(o)/Math.LN2))},d.bW=Om,d.bX=function(o,e,r){var s=e[0],u=e[1],f=e[2],_=r[3]*s+r[7]*u+r[11]*f+r[15];return o[0]=(r[0]*s+r[4]*u+r[8]*f+r[12])/(_=_||1),o[1]=(r[1]*s+r[5]*u+r[9]*f+r[13])/_,o[2]=(r[2]*s+r[6]*u+r[10]*f+r[14])/_,o},d.bY=class extends er{},d.bZ=class extends p{},d.b_=function(o,e){return o[0]===e[0]&&o[1]===e[1]&&o[2]===e[2]&&o[3]===e[3]&&o[4]===e[4]&&o[5]===e[5]&&o[6]===e[6]&&o[7]===e[7]&&o[8]===e[8]&&o[9]===e[9]&&o[10]===e[10]&&o[11]===e[11]&&o[12]===e[12]&&o[13]===e[13]&&o[14]===e[14]&&o[15]===e[15]},d.ba=zd,d.bb=Xl,d.bc=xa,d.bd=po,d.be=Ai,d.bf=function(o,e,r,s,u){return xa(s,u,mi((o-e)/(r-e),0,1))},d.bg=So,d.bh=function(){return new Float64Array(3)},d.bi=function(o,e,r,s){return o[0]=e[0]+r[0]*s,o[1]=e[1]+r[1]*s,o[2]=e[2]+r[2]*s,o},d.bj=co,d.bk=function(){return new Float64Array(4)},d.bl=function(o,e,r,s){var u=[],f=[];return u[0]=e[0]-r[0],u[1]=e[1]-r[1],u[2]=e[2]-r[2],f[0]=u[0]*Math.cos(s)-u[1]*Math.sin(s),f[1]=u[0]*Math.sin(s)+u[1]*Math.cos(s),f[2]=u[2],o[0]=f[0]+r[0],o[1]=f[1]+r[1],o[2]=f[2]+r[2],o},d.bm=function(o,e,r,s){var u=[],f=[];return u[0]=e[0]-r[0],u[1]=e[1]-r[1],u[2]=e[2]-r[2],f[0]=u[0],f[1]=u[1]*Math.cos(s)-u[2]*Math.sin(s),f[2]=u[1]*Math.sin(s)+u[2]*Math.cos(s),o[0]=f[0]+r[0],o[1]=f[1]+r[1],o[2]=f[2]+r[2],o},d.bn=function(o,e,r,s){var u=[],f=[];return u[0]=e[0]-r[0],u[1]=e[1]-r[1],u[2]=e[2]-r[2],f[0]=u[2]*Math.sin(s)+u[0]*Math.cos(s),f[1]=u[1],f[2]=u[2]*Math.cos(s)-u[0]*Math.sin(s),o[0]=f[0]+r[0],o[1]=f[1]+r[1],o[2]=f[2]+r[2],o},d.bo=ol,d.bp=function(o,e,r){var s=Math.sin(r),u=Math.cos(r),f=e[0],_=e[1],x=e[2],b=e[3],M=e[8],O=e[9],T=e[10],F=e[11];return e!==o&&(o[4]=e[4],o[5]=e[5],o[6]=e[6],o[7]=e[7],o[12]=e[12],o[13]=e[13],o[14]=e[14],o[15]=e[15]),o[0]=f*u-M*s,o[1]=_*u-O*s,o[2]=x*u-T*s,o[3]=b*u-F*s,o[8]=f*s+M*u,o[9]=_*s+O*u,o[10]=x*s+T*u,o[11]=b*s+F*u,o},d.bq=function(o,e){let r=So(o,360),s=So(e,360),u=s-r,f=s>r?u-360:u+360;return Math.abs(u)<Math.abs(f)?u:f},d.br=function(o){return o[0]=0,o[1]=0,o[2]=0,o},d.bs=function(o,e,r,s){let u=Math.sqrt(o*o+e*e),f=Math.sqrt(r*r+s*s);o/=u,e/=u,r/=f,s/=f;let _=Math.acos(o*r+e*s);return-e*r+o*s>0?_:-_},d.bt=function(o,e){return o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]},d.bu=Rh,d.bv=function(o,e){let r=So(o,2*Math.PI),s=So(e,2*Math.PI);return Math.min(Math.abs(r-s),Math.abs(r-s+2*Math.PI),Math.abs(r-s-2*Math.PI))},d.bw=function(){let o={},e=H.$version;for(let r in H.$root){let s=H.$root[r];if(s.required){let u=null;u=r==="version"?e:s.type==="array"?[]:{},u!=null&&(o[r]=u)}}return o},d.bx=Bs,d.by=zo,d.bz=function(o){o=o.slice();let e=Object.create(null);for(let r=0;r<o.length;r++)e[o[r].id]=o[r];for(let r=0;r<o.length;r++)"ref"in o[r]&&(o[r]=Pt(o[r],e[o[r].ref]));return o},d.c=qr,d.c0=function(o,e){return o[0]=e[0],o[1]=e[1],o[2]=e[2],o[3]=e[3],o[4]=e[4],o[5]=e[5],o[6]=e[6],o[7]=e[7],o[8]=e[8],o[9]=e[9],o[10]=e[10],o[11]=e[11],o[12]=e[12],o[13]=e[13],o[14]=e[14],o[15]=e[15],o},d.c1=o=>o.type==="symbol",d.c2=o=>o.type==="circle",d.c3=o=>o.type==="heatmap",d.c4=o=>
2o.type==="line",d.c5=o=>o.type==="fill",d.c6=o=>o.type==="fill-extrusion",d.c7=o=>o.type==="hillshade",d.c8=o=>o.type==="raster",d.c9=o=>o.type==="background",d.cA=Ld,d.cB=Sh,d.cC=class{constructor(o){this._marks={start:[o.url,"start"].join("#"),end:[o.url,"end"].join("#"),measure:o.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let o=performance.getEntriesByName(this._marks.measure);return o.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),o=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),o}},d.cD=function(o,e,r,s,u){return a(this,void 0,void 0,function*(){if(ri())try{return yield ms(o,e,r,s,u)}catch{}return function(f,_,x,b,M){let O=f.width,T=f.height;Ki&&Io||(Ki=new OffscreenCanvas(O,T),Io=Ki.getContext("2d",{willReadFrequently:!0})),Ki.width=O,Ki.height=T,Io.drawImage(f,0,0,O,T);let F=Io.getImageData(_,x,b,M);return Io.clearRect(0,0,O,T),F.data}(o,e,r,s,u)})},d.cE=Pg,d.cF=z,d.cG=ie,d.cH=$m,d.cI=eg,d.cJ=As,d.cK=Mr,d.ca=o=>o.type==="custom",d.cb=rl,d.cc=function(o,e,r){let s=ps(e.x-r.x,e.y-r.y),u=ps(o.x-r.x,o.y-r.y);var f,_;return ko(Math.atan2(s[0]*u[1]-s[1]*u[0],(f=s)[0]*(_=u)[0]+f[1]*_[1]))},d.cd=uo,d.ce=function(o,e){return ba[e]&&(o instanceof MouseEvent||o instanceof WheelEvent)},d.cf=function(o,e){return gs[e]&&"touches"in o},d.cg=function(o){return gs[o]||ba[o]},d.ch=function(o,e,r){var s=e[0],u=e[1];return o[0]=r[0]*s+r[4]*u+r[12],o[1]=r[1]*s+r[5]*u+r[13],o},d.ci=function(o,e){let{x:r,y:s}=Vd.fromLngLat(e);return!(o<0||o>25||s<0||s>=1||r<0||r>=1)},d.cj=function(o,e){return o[0]=e[0],o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=e[1],o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=e[2],o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o},d.ck=class extends $l{},d.cl=By,d.cn=function(o){return o.message===Ca},d.co=_r,d.cp=function(o,e){Eo.REGISTERED_PROTOCOLS[o]=e},d.cq=function(o){delete Eo.REGISTERED_PROTOCOLS[o]},d.cr=function(o,e){let r={};for(let u=0;u<o.length;u++){let f=e&&e[o[u].id]||Rl(o[u]);e&&(e[o[u].id]=f);let _=r[f];_||(_=r[f]=[]),_.push(o[u])}let s=[];for(let u in r)s.push(r[u]);return s},d.cs=de,d.ct=Og,d.cu=Tg,d.cv=ig,d.cw=function(o){o.bucket.createArrays(),o.bucket.tilePixelRatio=hn/(512*o.bucket.overscaling),o.bucket.compareText={},o.bucket.iconsNeedLinear=!1;let e=o.bucket.layers[0],r=e.layout,s=e._unevaluatedLayout._values,u={layoutIconSize:s["icon-size"].possiblyEvaluate(new xn(o.bucket.zoom+1),o.canonical),layoutTextSize:s["text-size"].possiblyEvaluate(new xn(o.bucket.zoom+1),o.canonical),textMaxSize:s["text-size"].possiblyEvaluate(new xn(18))};if(o.bucket.textSizeData.kind==="composite"){let{minZoom:M,maxZoom:O}=o.bucket.textSizeData;u.compositeTextSizes=[s["text-size"].possiblyEvaluate(new xn(M),o.canonical),s["text-size"].possiblyEvaluate(new xn(O),o.canonical)]}if(o.bucket.iconSizeData.kind==="composite"){let{minZoom:M,maxZoom:O}=o.bucket.iconSizeData;u.compositeIconSizes=[s["icon-size"].possiblyEvaluate(new xn(M),o.canonical),s["icon-size"].possiblyEvaluate(new xn(O),o.canonical)]}let f=r.get("text-line-height")*ti,_=r.get("text-rotation-alignment")!=="viewport"&&r.get("symbol-placement")!=="point",x=r.get("text-keep-upright"),b=r.get("text-size");for(let M of o.bucket.features){let O=r.get("text-font").evaluate(M,{},o.canonical).join(","),T=b.evaluate(M,{},o.canonical),F=u.layoutTextSize.evaluate(M,{},o.canonical),B=u.layoutIconSize.evaluate(M,{},o.canonical),N={horizontal:{},vertical:void 0},$=M.text,W,et=[0,0];if($){let R=$.toString(),q=r.get("text-letter-spacing").evaluate(M,{},o.canonical)*ti,st=Ap(R)?q:0,wt=r.get("text-anchor").evaluate(M,{},o.canonical),Zt=Vg(e,M,o.canonical);if(!Zt){let Ht=r.get("text-radial-offset").evaluate(M,{},o.canonical);et=Ht?Ng(wt,[Ht*ti,Vh]):r.get("text-offset").evaluate(M,{},o.canonical).map(Jt=>Jt*ti)}let It=_?"center":r.get("text-justify").evaluate(M,{},o.canonical),Lt=r.get("symbol-placement")==="point"?r.get("text-max-width").evaluate(M,{},o.canonical)*ti:1/0,Wt=()=>{o.bucket.allowVerticalPlacement&&Bl(R)&&(N.vertical=Jp($,o.glyphMap,o.glyphPositions,o.imagePositions,O,Lt,f,wt,"left",st,et,d.al.vertical,!0,F,T))};if(!_&&Zt){let Ht=new Set;if(It==="auto")for(let Nt=0;Nt<Zt.values.length;Nt+=2)Ht.add(jh(Zt.values[Nt]));else Ht.add(It);let Jt=!1;for(let Nt of Ht)if(!N.horizontal[Nt])if(Jt)N.horizontal[Nt]=N.horizontal[0];else{let he=Jp($,o.glyphMap,o.glyphPositions,o.imagePositions,O,Lt,f,"center",Nt,st,et,d.al.horizontal,!1,F,T);he&&(N.horizontal[Nt]=he,Jt=he.positionedLines.length===1)}Wt()}else{It==="auto"&&(It=jh(wt));let Ht=Jp($,o.glyphMap,o.glyphPositions,o.imagePositions,O,Lt,f,wt,It,st,et,d.al.horizontal,!1,F,T);Ht&&(N.horizontal[It]=Ht),Wt(),Bl(R)&&_&&x&&(N.vertical=Jp($,o.glyphMap,o.glyphPositions,o.imagePositions,O,Lt,f,wt,It,st,et,d.al.vertical,!1,F,T))}}let mt=!1;
2if(M.icon&&M.icon.name){let R=o.imageMap[M.icon.name];R&&(W=xy(o.imagePositions[M.icon.name],r.get("icon-offset").evaluate(M,{},o.canonical),r.get("icon-anchor").evaluate(M,{},o.canonical)),mt=!!R.sdf,o.bucket.sdfIcons===void 0?o.bucket.sdfIcons=mt:o.bucket.sdfIcons!==mt&&Ei("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(R.pixelRatio!==o.bucket.pixelRatio||r.get("icon-rotate").constantOr(1)!==0)&&(o.bucket.iconsNeedLinear=!0))}let ot=Ug(N.horizontal)||N.vertical;o.bucket.iconsInText=!!ot&&ot.iconsInText,(ot||W)&&Fy(o.bucket,M,N,W,o.imageMap,u,F,B,et,mt,o.canonical,o.subdivisionGranularity)}o.showCollisionBoxes&&o.bucket.generateCollisionDebugBuffers()},d.cx=Mh,d.cy=yh,d.cz=wh,d.d=Ko,d.e=qi,d.f=o=>a(void 0,void 0,void 0,function*(){if(o.byteLength===0)return createImageBitmap(new ImageData(1,1));let e=new Blob([new Uint8Array(o)],{type:"image/png"});try{return createImageBitmap(e)}catch(r){throw new Error(`Could not load image because of ${r.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),d.g=Wr,d.h=o=>new Promise((e,r)=>{let s=new Image;s.onload=()=>{e(s),URL.revokeObjectURL(s.src),s.onload=null,window.requestAnimationFrame(()=>{s.src=hs})},s.onerror=()=>r(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 u=new Blob([new Uint8Array(o)],{type:"image/png"});s.src=o.byteLength?URL.createObjectURL(u):hs}),d.i=To,d.j=(o,e)=>Ri(qi(o,{type:"json"}),e),d.k=K,d.l=Z,d.m=Ri,d.n=(o,e)=>Ri(qi(o,{type:"arrayBuffer"}),e),d.o=function(o){return new Sh(o).readFields(sy,[])},d.p=ng,d.q=Sd,d.r=ji,d.s=Hr,d.t=kp,d.u=je,d.v=H,d.w=Ei,d.x=Ep,d.y=Ro,d.z=function([o,e,r]){return e+=90,e*=Math.PI/180,r*=Math.PI/180,{x:o*Math.cos(e)*Math.sin(r),y:o*Math.sin(e)*Math.sin(r),z:o*Math.cos(r)}}}),n("worker",["./shared"],function(d){"use strict";class a{constructor(G){this.keyCache={},G&&this.replace(G)}replace(G){this._layerConfigs={},this._layers={},this.update(G,[])}update(G,Z){for(let at of G){this._layerConfigs[at.id]=at;let H=this._layers[at.id]=d.bA(at);H._featureFilter=d.a7(H.filter),this.keyCache[at.id]&&delete this.keyCache[at.id]}for(let at of Z)delete this.keyCache[at],delete this._layerConfigs[at],delete this._layers[at];this.familiesBySource={};let K=d.cr(Object.values(this._layerConfigs),this.keyCache);for(let at of K){let H=at.map(vt=>this._layers[vt.id]),_t=H[0];if(_t.visibility==="none")continue;let Pt=_t.source||"",dt=this.familiesBySource[Pt];dt||(dt=this.familiesBySource[Pt]={});let Tt=_t.sourceLayer||"_geojsonTileLayer",At=dt[Tt];At||(At=dt[Tt]=[]),At.push(H)}}}class z{constructor(G){let Z={},K=[];for(let Pt in G){let dt=G[Pt],Tt=Z[Pt]={};for(let At in dt){let vt=dt[+At];if(!vt||vt.bitmap.width===0||vt.bitmap.height===0)continue;let Gt={x:0,y:0,w:vt.bitmap.width+2,h:vt.bitmap.height+2};K.push(Gt),Tt[At]={rect:Gt,metrics:vt.metrics}}}let{w:at,h:H}=d.p(K),_t=new d.q({width:at||1,height:H||1});for(let Pt in G){let dt=G[Pt];for(let Tt in dt){let At=dt[+Tt];if(!At||At.bitmap.width===0||At.bitmap.height===0)continue;let vt=Z[Pt][Tt].rect;d.q.copy(At.bitmap,_t,{x:0,y:0},{x:vt.x+1,y:vt.y+1},At.bitmap)}}this.image=_t,this.positions=Z}}d.cs("GlyphAtlas",z);class J{constructor(G){this.tileID=new d.Y(G.tileID.overscaledZ,G.tileID.wrap,G.tileID.canonical.z,G.tileID.canonical.x,G.tileID.canonical.y),this.uid=G.uid,this.zoom=G.zoom,this.pixelRatio=G.pixelRatio,this.tileSize=G.tileSize,this.source=G.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=G.showCollisionBoxes,this.collectResourceTiming=!!G.collectResourceTiming,this.returnDependencies=!!G.returnDependencies,this.promoteId=G.promoteId,this.inFlightDependencies=[]}parse(G,Z,K,at,H){return d._(this,void 0,void 0,function*(){this.status="parsing",this.data=G,this.collisionBoxArray=new d.a5;let _t=new d.ct(Object.keys(G.layers).sort()),Pt=new d.cu(this.tileID,this.promoteId);Pt.bucketLayerIDs=[];let dt={},Tt={featureIndex:Pt,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:K,subdivisionGranularity:H},At=Z.familiesBySource[this.source];for(let jt in At){let pe=G.layers[jt];
2if(!pe)continue;pe.version===1&&d.w(`Vector tile source "${this.source}" layer "${jt}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let we=_t.encode(jt),zi=[];for(let Ci=0;Ci<pe.length;Ci++){let On=pe.feature(Ci),De=Pt.getId(On,jt);zi.push({feature:On,id:De,index:Ci,sourceLayerIndex:we})}for(let Ci of At[jt]){let On=Ci[0];On.source!==this.source&&d.w(`layer.source = ${On.source} does not equal this.source = ${this.source}`),On.minzoom&&this.zoom<Math.floor(On.minzoom)||On.maxzoom&&this.zoom>=On.maxzoom||On.visibility!=="none"&&(yt(Ci,this.zoom,K),(dt[On.id]=On.createBucket({index:Pt.bucketLayerIDs.length,layers:Ci,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:we,sourceID:this.source})).populate(zi,Tt,this.tileID.canonical),Pt.bucketLayerIDs.push(Ci.map(De=>De.id)))}}let vt=d.bF(Tt.glyphDependencies,jt=>Object.keys(jt).map(Number));this.inFlightDependencies.forEach(jt=>jt?.abort()),this.inFlightDependencies=[];let Gt=Promise.resolve({});if(Object.keys(vt).length){let jt=new AbortController;this.inFlightDependencies.push(jt),Gt=at.sendAsync({type:"GG",data:{stacks:vt,source:this.source,tileID:this.tileID,type:"glyphs"}},jt)}let re=Object.keys(Tt.iconDependencies),ae=Promise.resolve({});if(re.length){let jt=new AbortController;this.inFlightDependencies.push(jt),ae=at.sendAsync({type:"GI",data:{icons:re,source:this.source,tileID:this.tileID,type:"icons"}},jt)}let Pe=Object.keys(Tt.patternDependencies),Fe=Promise.resolve({});if(Pe.length){let jt=new AbortController;this.inFlightDependencies.push(jt),Fe=at.sendAsync({type:"GI",data:{icons:Pe,source:this.source,tileID:this.tileID,type:"patterns"}},jt)}let[Ft,ke,Xe]=yield Promise.all([Gt,ae,Fe]),sn=new z(Ft),Ke=new d.cv(ke,Xe);for(let jt in dt){let pe=dt[jt];pe instanceof d.a6?(yt(pe.layers,this.zoom,K),d.cw({bucket:pe,glyphMap:Ft,glyphPositions:sn.positions,imageMap:ke,imagePositions:Ke.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:Tt.subdivisionGranularity})):pe.hasPattern&&(pe instanceof d.cx||pe instanceof d.cy||pe instanceof d.cz)&&(yt(pe.layers,this.zoom,K),pe.addFeatures(Tt,this.tileID.canonical,Ke.patternPositions))}return this.status="done",{buckets:Object.values(dt).filter(jt=>!jt.isEmpty()),featureIndex:Pt,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:sn.image,imageAtlas:Ke,glyphMap:this.returnDependencies?Ft:null,iconMap:this.returnDependencies?ke:null,glyphPositions:this.returnDependencies?sn.positions:null}})}}function yt(xt,G,Z){let K=new d.C(G);for(let at of xt)at.recalculate(K,Z)}class ie{constructor(G,Z,K){this.actor=G,this.layerIndex=Z,this.availableImages=K,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(G,Z){return d._(this,void 0,void 0,function*(){let K=yield d.n(G.request,Z);try{return{vectorTile:new d.cA.VectorTile(new d.cB(K.data)),rawData:K.data,cacheControl:K.cacheControl,expires:K.expires}}catch(at){let H=new Uint8Array(K.data),_t=`Unable to parse the tile at ${G.request.url}, `;throw _t+=H[0]===31&&H[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${at.message}`,new Error(_t)}})}loadTile(G){return d._(this,void 0,void 0,function*(){let Z=G.uid,K=!!(G&&G.request&&G.request.collectResourceTiming)&&new d.cC(G.request),at=new J(G);this.loading[Z]=at;let H=new AbortController;at.abort=H;try{let _t=yield this.loadVectorTile(G,H);if(delete this.loading[Z],!_t)return null;let Pt=_t.rawData,dt={};_t.expires&&(dt.expires=_t.expires),_t.cacheControl&&(dt.cacheControl=_t.cacheControl);let Tt={};if(K){let vt=K.finish();vt&&(Tt.resourceTiming=JSON.parse(JSON.stringify(vt)))}at.vectorTile=_t.vectorTile;let At=at.parse(_t.vectorTile,this.layerIndex,this.availableImages,this.actor,G.subdivisionGranularity);this.loaded[Z]=at,this.fetching[Z]={rawTileData:Pt,cacheControl:dt,resourceTiming:Tt};try{let vt=yield At;return d.e({rawTileData:Pt.slice(0)},vt,dt,Tt)}finally{delete this.fetching[Z]}}catch(_t){throw delete this.loading[Z],at.status="done",this.loaded[Z]=at,_t}})}reloadTile(G){return d._(this,void 0,void 0,function*(){let Z=G.uid;if(!this.loaded||!this.loaded[Z])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let K=this.loaded[Z];if(K.showCollisionBoxes=G.showCollisionBoxes,K.status==="parsing"){let at=yield K.parse(K.vectorTile,this.layerIndex,this.availableImages,this.actor,G.subdivisionGranularity),H;if(this.fetching[Z]){let{rawTileData:_t,cacheControl:Pt,resourceTiming:dt}=this.fetching[Z];delete this.fetching[Z],H=d.e({rawTileData:_t.slice(0)},at,Pt,dt)}else H=at;return H}if(K.status==="done"&&K.vectorTile)return K.parse(K.vectorTile,this.layerIndex,this.availableImages,this.actor,G.subdivisionGranularity)})}abortTile(G){return d._(this,void 0,void 0,function*(){let Z=this.loading,K=G.uid;Z&&Z[K]&&Z[K].abort&&(Z[K].abort.abort(),delete Z[K])})}removeTile(G){return d._(this,void 0,void 0,function*(){this.loaded&&this.loaded[G.uid]&&delete this.loaded[G.uid]})}}class ee{constructor(){this.loaded={}}loadTile(G){return d._(this,void 0,void 0,function*(){let{uid:Z,encoding:K,rawImageData:at,redFactor:H,greenFactor:_t,blueFactor:Pt,baseShift:dt}=G,Tt=at.width+2,At=at.height+2,vt=d.b(at)?new d.R({width:Tt,height:At},yield d.cD(at,-1,-1,Tt,At)):at,Gt=new d.cE(Z,vt,K,H,_t,Pt,dt);return this.loaded=this.loaded||{},this.loaded[Z]=Gt,Gt})}removeTile(G){let Z=this.loaded,K=G.uid;Z&&Z[K]&&delete Z[K]}}var bt,ne,Ve=function(){if(ne)return bt;
2function xt(Z,K){if(Z.length!==0){G(Z[0],K);for(var at=1;at<Z.length;at++)G(Z[at],!K)}}function G(Z,K){for(var at=0,H=0,_t=0,Pt=Z.length,dt=Pt-1;_t<Pt;dt=_t++){var Tt=(Z[_t][0]-Z[dt][0])*(Z[dt][1]+Z[_t][1]),At=at+Tt;H+=Math.abs(at)>=Math.abs(Tt)?at-At+Tt:Tt-At+at,at=At}at+H>=0!=!!K&&Z.reverse()}return ne=1,bt=function Z(K,at){var H,_t=K&&K.type;if(_t==="FeatureCollection")for(H=0;H<K.features.length;H++)Z(K.features[H],at);else if(_t==="GeometryCollection")for(H=0;H<K.geometries.length;H++)Z(K.geometries[H],at);else if(_t==="Feature")Z(K.geometry,at);else if(_t==="Polygon")xt(K.coordinates,at);else if(_t==="MultiPolygon")for(H=0;H<K.coordinates.length;H++)xt(K.coordinates[H],at);return K}}(),tn=d.cF(Ve);let _n=d.cA.VectorTileFeature.prototype.toGeoJSON;class Dn{constructor(G){this._feature=G,this.extent=d.Z,this.type=G.type,this.properties=G.tags,"id"in G&&!isNaN(G.id)&&(this.id=parseInt(G.id,10))}loadGeometry(){if(this._feature.type===1){let G=[];for(let Z of this._feature.geometry)G.push([new d.P(Z[0],Z[1])]);return G}{let G=[];for(let Z of this._feature.geometry){let K=[];for(let at of Z)K.push(new d.P(at[0],at[1]));G.push(K)}return G}}toGeoJSON(G,Z,K){return _n.call(this,G,Z,K)}}class hi{constructor(G){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=d.Z,this.length=G.length,this._features=G}feature(G){return new Dn(this._features[G])}}var ri,Fn,Pn,Po={exports:{}},Rn=function(){if(Pn)return Po.exports;Pn=1;var xt=d.cI(),G=function(){if(Fn)return ri;Fn=1;var At=d.cG(),vt=d.cH().VectorTileFeature;function Gt(ae,Pe){this.options=Pe||{},this.features=ae,this.length=ae.length}function re(ae,Pe){this.id=typeof ae.id=="number"?ae.id:void 0,this.type=ae.type,this.rawGeometry=ae.type===1?[ae.geometry]:ae.geometry,this.properties=ae.tags,this.extent=Pe||4096}return ri=Gt,Gt.prototype.feature=function(ae){return new re(this.features[ae],this.options.extent)},re.prototype.loadGeometry=function(){var ae=this.rawGeometry;this.geometry=[];for(var Pe=0;Pe<ae.length;Pe++){for(var Fe=ae[Pe],Ft=[],ke=0;ke<Fe.length;ke++)Ft.push(new At(Fe[ke][0],Fe[ke][1]));this.geometry.push(Ft)}return this.geometry},re.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var ae=this.geometry,Pe=1/0,Fe=-1/0,Ft=1/0,ke=-1/0,Xe=0;Xe<ae.length;Xe++)for(var sn=ae[Xe],Ke=0;Ke<sn.length;Ke++){var jt=sn[Ke];Pe=Math.min(Pe,jt.x),Fe=Math.max(Fe,jt.x),Ft=Math.min(Ft,jt.y),ke=Math.max(ke,jt.y)}return[Pe,Ft,Fe,ke]},re.prototype.toGeoJSON=vt.prototype.toGeoJSON,ri}();function Z(At){var vt=new xt;return function(Gt,re){for(var ae in Gt.layers)re.writeMessage(3,K,Gt.layers[ae])}(At,vt),vt.finish()}function K(At,vt){var Gt;vt.writeVarintField(15,At.version||1),vt.writeStringField(1,At.name||""),vt.writeVarintField(5,At.extent||4096);var re={keys:[],values:[],keycache:{},valuecache:{}};for(Gt=0;Gt<At.length;Gt++)re.feature=At.feature(Gt),vt.writeMessage(2,at,re);var ae=re.keys;for(Gt=0;Gt<ae.length;Gt++)vt.writeStringField(3,ae[Gt]);var Pe=re.values;for(Gt=0;Gt<Pe.length;Gt++)vt.writeMessage(4,Tt,Pe[Gt])}function at(At,vt){var Gt=At.feature;Gt.id!==void 0&&vt.writeVarintField(1,Gt.id),vt.writeMessage(2,H,At),vt.writeVarintField(3,Gt.type),vt.writeMessage(4,dt,Gt)}function H(At,vt){var Gt=At.feature,re=At.keys,ae=At.values,Pe=At.keycache,Fe=At.valuecache;for(var Ft in Gt.properties){var ke=Gt.properties[Ft],Xe=Pe[Ft];if(ke!==null){Xe===void 0&&(re.push(Ft),Pe[Ft]=Xe=re.length-1),vt.writeVarint(Xe);var sn=typeof ke;sn!=="string"&&sn!=="boolean"&&sn!=="number"&&(ke=JSON.stringify(ke));var Ke=sn+":"+ke,jt=Fe[Ke];jt===void 0&&(ae.push(ke),Fe[Ke]=jt=ae.length-1),vt.writeVarint(jt)}}}function _t(At,vt){return(vt<<3)+(7&At)}function Pt(At){return At<<1^At>>31}function dt(At,vt){for(var Gt=At.loadGeometry(),re=At.type,ae=0,Pe=0,Fe=Gt.length,Ft=0;Ft<Fe;Ft++){var ke=Gt[Ft],Xe=1;re===1&&(Xe=ke.length),vt.writeVarint(_t(1,Xe));for(var sn=re===3?ke.length-1:ke.length,Ke=0;Ke<sn;Ke++){Ke===1&&re!==1&&vt.writeVarint(_t(2,sn-1));var jt=ke[Ke].x-ae,pe=ke[Ke].y-Pe;vt.writeVarint(Pt(jt)),vt.writeVarint(Pt(pe)),ae+=jt,Pe+=pe}re===3&&vt.writeVarint(_t(7,1))}}function Tt(At,vt){var Gt=typeof At;Gt==="string"?vt.writeStringField(1,At):Gt==="boolean"?vt.writeBooleanField(7,At):Gt==="number"&&(At%1!=0?vt.writeDoubleField(3,At):At<0?vt.writeSVarintField(6,At):vt.writeVarintField(5,At))}return Po.exports=Z,Po.exports.fromVectorTileJs=Z,Po.exports.fromGeojsonVt=function(At,vt){vt=vt||{};var Gt={};for(var re in At)Gt[re]=new G(At[re].features,vt),Gt[re].name=re,Gt[re].version=vt.version,Gt[re].extent=vt.extent;return Z({layers:Gt})},Po.exports.GeoJSONWrapper=G,Po.exports}(),il=d.cF(Rn);let ol={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:xt=>xt},hr=Math.fround||(Oo=new Float32Array(1),xt=>(Oo[0]=+xt,Oo[0]));var Oo;let co=3,bi=5,ds=6;class ya{constructor(G){this.options=Object.assign(Object.create(ol),G),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(G){let{log:Z,minZoom:K,maxZoom:at}=this.options;Z&&console.time("total time");let H=`prepare ${G.length} points`;Z&&console.time(H),this.points=G;let _t=[];for(let dt=0;dt<G.length;dt++){let Tt=G[dt];if(!Tt.geometry)continue;let[At,vt]=Tt.geometry.coordinates,Gt=hr(mr(At)),re=hr(So(vt));_t.push(Gt,re,1/0,dt,-1,1),this.options.reduce&&_t.push(0)}let Pt=this.trees[at+1]=this._createTree(_t);Z&&console.timeEnd(H);for(let dt=at;dt>=K;dt--){let Tt=+Date.now();Pt=this.trees[dt]=this._createTree(this._cluster(Pt,dt)),Z&&console.log("z%d: %d clusters in %dms",dt,Pt.numItems,+Date.now()-Tt)}return Z&&console.timeEnd("total time"),this}getClusters(G,Z){let K=((G[0]+180)%360+360)%360-180,at=Math.max(-90,Math.min(90,G[1])),H=G[2]===180?180:((G[2]+180)%360+360)%360-180,_t=Math.max(-90,Math.min(90,G[3]));if(G[2]-G[0]>=360)K=-180,H=180;else if(K>H){let vt=this.getClusters([K,at,180,_t],Z),Gt=this.getClusters([-180,at,H,_t],Z);return vt.concat(Gt)}let Pt=this.trees[this._limitZoom(Z)],dt=Pt.range(mr(K),So(_t),mr(H),So(at)),Tt=Pt.data,At=[];for(let vt of dt){let Gt=this.stride*vt;At.push(Tt[Gt+bi]>1?ps(Tt,Gt,this.clusterProps):this.points[Tt[Gt+co]])}return At}getChildren(G){let Z=this._getOriginId(G),K=this._getOriginZoom(G),at="No cluster with the specified id.",H=this.trees[K];if(!H)throw new Error(at);let _t=H.data;if(Z*this.stride>=_t.length)throw new Error(at);let Pt=this.options.radius/(this.options.extent*Math.pow(2,K-1)),dt=H.within(_t[Z*this.stride],_t[Z*this.stride+1],Pt),Tt=[];for(let At of dt){let vt=At*this.stride;_t[vt+4]===G&&Tt.push(_t[vt+bi]>1?ps(_t,vt,this.clusterProps):this.points[_t[vt+co]])}if(Tt.length===0)throw new Error(at);return Tt}getLeaves(G,Z,K){let at=[];return this._appendLeaves(at,G,Z=Z||10,K=K||0,0),at}getTile(G,Z,K){let at=this.trees[this._limitZoom(G)],H=Math.pow(2,G),{extent:_t,radiu
2s:Pt}=this.options,dt=Pt/_t,Tt=(K-dt)/H,At=(K+1+dt)/H,vt={features:[]};return this._addTileFeatures(at.range((Z-dt)/H,Tt,(Z+1+dt)/H,At),at.data,Z,K,H,vt),Z===0&&this._addTileFeatures(at.range(1-dt/H,Tt,1,At),at.data,H,K,H,vt),Z===H-1&&this._addTileFeatures(at.range(0,Tt,dt/H,At),at.data,-1,K,H,vt),vt.features.length?vt:null}getClusterExpansionZoom(G){let Z=this._getOriginZoom(G)-1;for(;Z<=this.options.maxZoom;){let K=this.getChildren(G);if(Z++,K.length!==1)break;G=K[0].properties.cluster_id}return Z}_appendLeaves(G,Z,K,at,H){let _t=this.getChildren(Z);for(let Pt of _t){let dt=Pt.properties;if(dt&&dt.cluster?H+dt.point_count<=at?H+=dt.point_count:H=this._appendLeaves(G,dt.cluster_id,K,at,H):H<at?H++:G.push(Pt),G.length===K)break}return H}_createTree(G){let Z=new d.aF(G.length/this.stride|0,this.options.nodeSize,Float32Array);for(let K=0;K<G.length;K+=this.stride)Z.add(G[K],G[K+1]);return Z.finish(),Z.data=G,Z}_addTileFeatures(G,Z,K,at,H,_t){for(let Pt of G){let dt=Pt*this.stride,Tt=Z[dt+bi]>1,At,vt,Gt;if(Tt)At=hn(Z,dt,this.clusterProps),vt=Z[dt],Gt=Z[dt+1];else{let Pe=this.points[Z[dt+co]];At=Pe.properties;let[Fe,Ft]=Pe.geometry.coordinates;vt=mr(Fe),Gt=So(Ft)}let re={type:1,geometry:[[Math.round(this.options.extent*(vt*H-K)),Math.round(this.options.extent*(Gt*H-at))]],tags:At},ae;ae=Tt||this.options.generateId?Z[dt+co]:this.points[Z[dt+co]].id,ae!==void 0&&(re.id=ae),_t.features.push(re)}}_limitZoom(G){return Math.max(this.options.minZoom,Math.min(Math.floor(+G),this.options.maxZoom+1))}_cluster(G,Z){let{radius:K,extent:at,reduce:H,minPoints:_t}=this.options,Pt=K/(at*Math.pow(2,Z)),dt=G.data,Tt=[],At=this.stride;for(let vt=0;vt<dt.length;vt+=At){if(dt[vt+2]<=Z)continue;dt[vt+2]=Z;let Gt=dt[vt],re=dt[vt+1],ae=G.within(dt[vt],dt[vt+1],Pt),Pe=dt[vt+bi],Fe=Pe;for(let Ft of ae){let ke=Ft*At;dt[ke+2]>Z&&(Fe+=dt[ke+bi])}if(Fe>Pe&&Fe>=_t){let Ft,ke=Gt*Pe,Xe=re*Pe,sn=-1,Ke=((vt/At|0)<<5)+(Z+1)+this.points.length;for(let jt of ae){let pe=jt*At;if(dt[pe+2]<=Z)continue;dt[pe+2]=Z;let we=dt[pe+bi];ke+=dt[pe]*we,Xe+=dt[pe+1]*we,dt[pe+4]=Ke,H&&(Ft||(Ft=this._map(dt,vt,!0),sn=this.clusterProps.length,this.clusterProps.push(Ft)),H(Ft,this._map(dt,pe)))}dt[vt+4]=Ke,Tt.push(ke/Fe,Xe/Fe,1/0,Ke,-1,Fe),H&&Tt.push(sn)}else{for(let Ft=0;Ft<At;Ft++)Tt.push(dt[vt+Ft]);if(Fe>1)for(let Ft of ae){let ke=Ft*At;if(!(dt[ke+2]<=Z)){dt[ke+2]=Z;for(let Xe=0;Xe<At;Xe++)Tt.push(dt[ke+Xe])}}}}return Tt}_getOriginId(G){return G-this.points.length>>5}_getOriginZoom(G){return(G-this.points.length)%32}_map(G,Z,K){if(G[Z+bi]>1){let _t=this.clusterProps[G[Z+ds]];return K?Object.assign({},_t):_t}let at=this.points[G[Z+co]].properties,H=this.options.map(at);return K&&H===at?Object.assign({},H):H}}function ps(xt,G,Z){return{type:"Feature",id:xt[G+co],properties:hn(xt,G,Z),geometry:{type:"Point",coordinates:[(K=xt[G],360*(K-.5)),xa(xt[G+1])]}};var K}function hn(xt,G,Z){let K=xt[G+bi],at=K>=1e4?`${Math.round(K/1e3)}k`:K>=1e3?Math.round(K/100)/10+"k":K,H=xt[G+ds],_t=H===-1?{}:Object.assign({},Z[H]);return Object.assign(_t,{cluster:!0,cluster_id:xt[G+co],point_count:K,point_count_abbreviated:at})}function mr(xt){return xt/360+.5}function So(xt){let G=Math.sin(xt*Math.PI/180),Z=.5-.25*Math.log((1+G)/(1-G))/Math.PI;return Z<0?0:Z>1?1:Z}function xa(xt){let G=(180-360*xt)*Math.PI/180;return 360*Math.atan(Math.exp(G))/Math.PI-90}function po(xt,G,Z,K){let at=K,H=G+(Z-G>>1),_t,Pt=Z-G,dt=xt[G],Tt=xt[G+1],At=xt[Z],vt=xt[Z+1];for(let Gt=G+3;Gt<Z;Gt+=3){let re=rl(xt[Gt],xt[Gt+1],dt,Tt,At,vt);if(re>at)_t=Gt,at=re;else if(re===at){let ae=Math.abs(Gt-H);ae<Pt&&(_t=Gt,Pt=ae)}}at>K&&(_t-G>3&&po(xt,G,_t,K),xt[_t+2]=at,Z-_t>3&&po(xt,_t,Z,K))}function rl(xt,G,Z,K,at,H){let _t=at-Z,Pt=H-K;if(_t!==0||Pt!==0){let dt=((xt-Z)*_t+(G-K)*Pt)/(_t*_t+Pt*Pt);dt>1?(Z=at,K=H):dt>0&&(Z+=_t*dt,K+=Pt*dt)}return _t=xt-Z,Pt=G-K,_t*_t+Pt*Pt}function uo(xt,G,Z,K){let at={id:xt??null,type:G,geometry:Z,tags:K,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(G==="Point"||G==="MultiPoint"||G==="LineString")mi(at,Z);else if(G==="Polygon")mi(at,Z[0]);else if(G==="MultiLineString")for(let H of Z)mi(at,H);else if(G==="MultiPolygon")for(let H of Z)mi(at,H[0]);return at}function mi(xt,G){for(let Z=0;Z<G.length;Z+=3)xt.minX=Math.min(xt.minX,G[Z]),xt.minY=Math.min(xt.minY,G[Z+1]),xt.maxX=Math.max(xt.maxX,G[Z]),xt.maxY=Math.max(xt.maxY,G[Z+1])}function gr(xt,G,Z,K){if(!G.geometry)return;let at=G.geometry.coordinates;if(at&&at.length===0)return;let H=G.geometry.type,_t=Math.pow(Z.tolerance/((1<<Z.maxZoom)*Z.extent),2),Pt=[],dt=G.i
2d;if(Z.promoteId?dt=G.properties[Z.promoteId]:Z.generateId&&(dt=K||0),H==="Point")qi(at,Pt);else if(H==="MultiPoint")for(let Tt of at)qi(Tt,Pt);else if(H==="LineString")va(at,Pt,_t,!1);else if(H==="MultiLineString"){if(Z.lineMetrics){for(let Tt of at)Pt=[],va(Tt,Pt,_t,!1),xt.push(uo(dt,"LineString",Pt,G.properties));return}Zr(at,Pt,_t,!1)}else if(H==="Polygon")Zr(at,Pt,_t,!0);else{if(H!=="MultiPolygon"){if(H==="GeometryCollection"){for(let Tt of G.geometry.geometries)gr(xt,{id:dt,geometry:Tt,properties:G.properties},Z,K);return}throw new Error("Input data is not a valid GeoJSON object.")}for(let Tt of at){let At=[];Zr(Tt,At,_t,!0),Pt.push(At)}}xt.push(uo(dt,H,Pt,G.properties))}function qi(xt,G){G.push(us(xt[0]),Wi(xt[1]),0)}function va(xt,G,Z,K){let at,H,_t=0;for(let dt=0;dt<xt.length;dt++){let Tt=us(xt[dt][0]),At=Wi(xt[dt][1]);G.push(Tt,At,0),dt>0&&(_t+=K?(at*At-Tt*H)/2:Math.sqrt(Math.pow(Tt-at,2)+Math.pow(At-H,2))),at=Tt,H=At}let Pt=G.length-3;G[2]=1,po(G,0,Pt,Z),G[Pt+2]=1,G.size=Math.abs(_t),G.start=0,G.end=G.size}function Zr(xt,G,Z,K){for(let at=0;at<xt.length;at++){let H=[];va(xt[at],H,Z,K),G.push(H)}}function us(xt){return xt/360+.5}function Wi(xt){let G=Math.sin(xt*Math.PI/180),Z=.5-.25*Math.log((1+G)/(1-G))/Math.PI;return Z<0?0:Z>1?1:Z}function Xi(xt,G,Z,K,at,H,_t,Pt){if(K/=G,H>=(Z/=G)&&_t<K)return xt;if(_t<Z||H>=K)return null;let dt=[];for(let Tt of xt){let At=Tt.geometry,vt=Tt.type,Gt=at===0?Tt.minX:Tt.minY,re=at===0?Tt.maxX:Tt.maxY;if(Gt>=Z&&re<K){dt.push(Tt);continue}if(re<Z||Gt>=K)continue;let ae=[];if(vt==="Point"||vt==="MultiPoint")Ei(At,ae,Z,K,at);else if(vt==="LineString")gn(At,ae,Z,K,at,!1,Pt.lineMetrics);else if(vt==="MultiLineString")fr(At,ae,Z,K,at,!1);else if(vt==="Polygon")fr(At,ae,Z,K,at,!0);else if(vt==="MultiPolygon")for(let Pe of At){let Fe=[];fr(Pe,Fe,Z,K,at,!0),Fe.length&&ae.push(Fe)}if(ae.length){if(Pt.lineMetrics&&vt==="LineString"){for(let Pe of ae)dt.push(uo(Tt.id,vt,Pe,Tt.tags));continue}vt!=="LineString"&&vt!=="MultiLineString"||(ae.length===1?(vt="LineString",ae=ae[0]):vt="MultiLineString"),vt!=="Point"&&vt!=="MultiPoint"||(vt=ae.length===3?"Point":"MultiPoint"),dt.push(uo(Tt.id,vt,ae,Tt.tags))}}return dt.length?dt:null}function Ei(xt,G,Z,K,at){for(let H=0;H<xt.length;H+=3){let _t=xt[H+at];_t>=Z&&_t<=K&&oo(G,xt[H],xt[H+1],xt[H+2])}}function gn(xt,G,Z,K,at,H,_t){let Pt=To(xt),dt=at===0?hs:ms,Tt,At,vt=xt.start;for(let Fe=0;Fe<xt.length-3;Fe+=3){let Ft=xt[Fe],ke=xt[Fe+1],Xe=xt[Fe+2],sn=xt[Fe+3],Ke=xt[Fe+4],jt=at===0?Ft:ke,pe=at===0?sn:Ke,we=!1;_t&&(Tt=Math.sqrt(Math.pow(Ft-sn,2)+Math.pow(ke-Ke,2))),jt<Z?pe>Z&&(At=dt(Pt,Ft,ke,sn,Ke,Z),_t&&(Pt.start=vt+Tt*At)):jt>K?pe<K&&(At=dt(Pt,Ft,ke,sn,Ke,K),_t&&(Pt.start=vt+Tt*At)):oo(Pt,Ft,ke,Xe),pe<Z&&jt>=Z&&(At=dt(Pt,Ft,ke,sn,Ke,Z),we=!0),pe>K&&jt<=K&&(At=dt(Pt,Ft,ke,sn,Ke,K),we=!0),!H&&we&&(_t&&(Pt.end=vt+Tt*At),G.push(Pt),Pt=To(xt)),_t&&(vt+=Tt)}let Gt=xt.length-3,re=xt[Gt],ae=xt[Gt+1],Pe=at===0?re:ae;Pe>=Z&&Pe<=K&&oo(Pt,re,ae,xt[Gt+2]),Gt=Pt.length-3,H&&Gt>=3&&(Pt[Gt]!==Pt[0]||Pt[Gt+1]!==Pt[1])&&oo(Pt,Pt[0],Pt[1],Pt[2]),Pt.length&&G.push(Pt)}function To(xt){let G=[];return G.size=xt.size,G.start=xt.start,G.end=xt.end,G}function fr(xt,G,Z,K,at,H){for(let _t of xt)gn(_t,G,Z,K,at,H,!1)}function oo(xt,G,Z,K){xt.push(G,Z,K)}function hs(xt,G,Z,K,at,H){let _t=(H-G)/(K-G);return oo(xt,H,Z+(at-Z)*_t,1),_t}function ms(xt,G,Z,K,at,H){let _t=(H-Z)/(at-Z);return oo(xt,G+(K-G)*_t,H,1),_t}function Ki(xt,G){let Z=[];for(let K=0;K<xt.length;K++){let at=xt[K],H=at.type,_t;if(H==="Point"||H==="MultiPoint"||H==="LineString")_t=Io(at.geometry,G);else if(H==="MultiLineString"||H==="Polygon"){_t=[];for(let Pt of at.geometry)_t.push(Io(Pt,G))}else if(H==="MultiPolygon"){_t=[];for(let Pt of at.geometry){let dt=[];for(let Tt of Pt)dt.push(Io(Tt,G));_t.push(dt)}}Z.push(uo(at.id,H,_t,at.tags))}return Z}function Io(xt,G){let Z=[];Z.size=xt.size,xt.start!==void 0&&(Z.start=xt.start,Z.end=xt.end);for(let K=0;K<xt.length;K+=3)Z.push(xt[K]+G,xt[K+1],xt[K+2]);return Z}function Hr(xt,G){if(xt.transformed)return xt;let Z=1<<xt.z,K=xt.x,at=xt.y;for(let H of xt.features){let _t=H.geometry,Pt=H.type;if(H.geometry=[],Pt===1)for(let dt=0;dt<_t.length;dt+=2)H.geometry.push(ko(_t[dt],_t[dt+1],G,Z,K,at));else for(let dt=0;dt<_t.length;dt++){let Tt=[];for(let At=0;At<_t[dt].length;At+=2)Tt.push(ko(_t[dt][At],_t[dt][At+1],G,Z,K,at));H.geometry.push(Tt)}}return xt.transformed=!0,xt}function ko(xt,G,Z,K,at,H){return[Math.round(Z*(xt*K-at)),Math.round(Z*(G*K-H))]}function gs(xt,G,Z,K,at){let H=G===at.maxZoom?0:at.tolerance/((1<<G)*at.extent),_t={features:[],numPoints:0,numSimplified:0,numFeatures:xt.length,source:null,x:Z,y:K,z:G,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(let Pt of xt)ba(_t,Pt,H,at);return _t}function ba(xt,G,Z,K){let at=G.geometry,H=G.type,_t=[];if(xt.minX=Math.min(xt.minX,G.minX),xt.minY=Math.min(xt.minY,G.minY),xt.maxX=Math.max(xt.maxX,G.maxX),xt.maxY=Math.max(xt.maxY,G.maxY),H==="Point"||H==="MultiPoint")for(let Pt=0;Pt<at.length;Pt+=3)_t.push(at[Pt],at[Pt+1]),xt.numPoints++,xt.numSimplified++;else if(H==="LineString")Ca(_t,at,xt,Z,!1,!1);else if(H==="MultiLineString"||H==="Polygon")for(let Pt=0;Pt<at.length;Pt++)Ca(_t,at[Pt],xt,Z,H==="Polygon",Pt===0);else if(H==="MultiPolygon")for(let Pt=0;Pt<at.length;Pt++){let dt=at[Pt];for(let Tt=0;Tt<dt.length;Tt++)Ca(_t,dt[Tt],xt,Z,!0,Tt===0)}if(_t.length){let Pt=G.tags||null;if(H==="LineString"&&K.lineMetrics){Pt={};for(let Tt in G.tags)Pt[Tt]=G.tags[Tt];Pt.mapbox_clip_start=at.start/at.size,Pt.mapbox_clip_end=at.end/at.size}let dt={geometry:_t,type:H==="Polygon"||H==="MultiPolygon"?3:H==="LineString"||H==="MultiLineString"?2:1,tags:Pt};
2G.id!==null&&(dt.id=G.id),xt.features.push(dt)}}function Ca(xt,G,Z,K,at,H){let _t=K*K;if(K>0&&G.size<(at?_t:K))return void(Z.numPoints+=G.length/3);let Pt=[];for(let dt=0;dt<G.length;dt+=3)(K===0||G[dt+2]>_t)&&(Z.numSimplified++,Pt.push(G[dt],G[dt+1])),Z.numPoints++;at&&function(dt,Tt){let At=0;for(let vt=0,Gt=dt.length,re=Gt-2;vt<Gt;re=vt,vt+=2)At+=(dt[vt]-dt[re])*(dt[vt+1]+dt[re+1]);if(At>0===Tt)for(let vt=0,Gt=dt.length;vt<Gt/2;vt+=2){let re=dt[vt],ae=dt[vt+1];dt[vt]=dt[Gt-2-vt],dt[vt+1]=dt[Gt-1-vt],dt[Gt-2-vt]=re,dt[Gt-1-vt]=ae}}(Pt,H),xt.push(Pt)}let qr={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class Eo{constructor(G,Z){let K=(Z=this.options=function(H,_t){for(let Pt in _t)H[Pt]=_t[Pt];return H}(Object.create(qr),Z)).debug;if(K&&console.time("preprocess data"),Z.maxZoom<0||Z.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Z.promoteId&&Z.generateId)throw new Error("promoteId and generateId cannot be used together.");let at=function(H,_t){let Pt=[];if(H.type==="FeatureCollection")for(let dt=0;dt<H.features.length;dt++)gr(Pt,H.features[dt],_t,dt);else gr(Pt,H.type==="Feature"?H:{geometry:H},_t);return Pt}(G,Z);this.tiles={},this.tileCoords=[],K&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Z.indexMaxZoom,Z.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),at=function(H,_t){let Pt=_t.buffer/_t.extent,dt=H,Tt=Xi(H,1,-1-Pt,Pt,0,-1,2,_t),At=Xi(H,1,1-Pt,2+Pt,0,-1,2,_t);return(Tt||At)&&(dt=Xi(H,1,-Pt,1+Pt,0,-1,2,_t)||[],Tt&&(dt=Ki(Tt,1).concat(dt)),At&&(dt=dt.concat(Ki(At,-1)))),dt}(at,Z),at.length&&this.splitTile(at,0,0,0),K&&(at.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}splitTile(G,Z,K,at,H,_t,Pt){let dt=[G,Z,K,at],Tt=this.options,At=Tt.debug;for(;dt.length;){at=dt.pop(),K=dt.pop(),Z=dt.pop(),G=dt.pop();let vt=1<<Z,Gt=Wr(Z,K,at),re=this.tiles[Gt];if(!re&&(At>1&&console.time("creation"),re=this.tiles[Gt]=gs(G,Z,K,at,Tt),this.tileCoords.push({z:Z,x:K,y:at}),At)){At>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Z,K,at,re.numFeatures,re.numPoints,re.numSimplified),console.timeEnd("creation"));let we=`z${Z}`;this.stats[we]=(this.stats[we]||0)+1,this.total++}if(re.source=G,H==null){if(Z===Tt.indexMaxZoom||re.numPoints<=Tt.indexMaxPoints)continue}else{if(Z===Tt.maxZoom||Z===H)continue;if(H!=null){let we=H-Z;if(K!==_t>>we||at!==Pt>>we)continue}}if(re.source=null,G.length===0)continue;At>1&&console.time("clipping");let ae=.5*Tt.buffer/Tt.extent,Pe=.5-ae,Fe=.5+ae,Ft=1+ae,ke=null,Xe=null,sn=null,Ke=null,jt=Xi(G,vt,K-ae,K+Fe,0,re.minX,re.maxX,Tt),pe=Xi(G,vt,K+Pe,K+Ft,0,re.minX,re.maxX,Tt);G=null,jt&&(ke=Xi(jt,vt,at-ae,at+Fe,1,re.minY,re.maxY,Tt),Xe=Xi(jt,vt,at+Pe,at+Ft,1,re.minY,re.maxY,Tt),jt=null),pe&&(sn=Xi(pe,vt,at-ae,at+Fe,1,re.minY,re.maxY,Tt),Ke=Xi(pe,vt,at+Pe,at+Ft,1,re.minY,re.maxY,Tt),pe=null),At>1&&console.timeEnd("clipping"),dt.push(ke||[],Z+1,2*K,2*at),dt.push(Xe||[],Z+1,2*K,2*at+1),dt.push(sn||[],Z+1,2*K+1,2*at),dt.push(Ke||[],Z+1,2*K+1,2*at+1)}}getTile(G,Z,K){G=+G,Z=+Z,K=+K;let at=this.options,{extent:H,debug:_t}=at;if(G<0||G>24)return null;let Pt=1<<G,dt=Wr(G,Z=Z+Pt&Pt-1,K);if(this.tiles[dt])return Hr(this.tiles[dt],H);_t>1&&console.log("drilling down to z%d-%d-%d",G,Z,K);let Tt,At=G,vt=Z,Gt=K;for(;!Tt&&At>0;)At--,vt>>=1,Gt>>=1,Tt=this.tiles[Wr(At,vt,Gt)];return Tt&&Tt.source?(_t>1&&(console.log("found parent tile z%d-%d-%d",At,vt,Gt),console.time("drilling down")),this.splitTile(Tt.source,At,vt,Gt,G,Z,K),_t>1&&console.timeEnd("drilling down"),this.tiles[dt]?Hr(this.tiles[dt],H):null):null}}function Wr(xt,G,Z){return 32*((1<<xt)*Z+G)+xt}function Xo(xt,G){return G?xt.properties[G]:xt.id}function _r(xt,G){if(xt==null)return!0;if(xt.type==="Feature")return Xo(xt,G)!=null;if(xt.type==="FeatureCollection"){let Z=new Set;for(let K of xt.features){let at=Xo(K,G);if(at==null||Z.has(at))return!1;Z.add(at)}return!0}return!1}function zo(xt,G){let Z=new Map;if(xt!=null)if(xt.type==="Feature")Z.set(Xo(xt,G),xt);else for(let K of xt.features)Z.set(Xo(K,G),K);return Z}class Ri extends ie{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(G,Z){return d._(this,void 0,void 0,function*(){let K=G.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let at=this._geoJSONIndex.getTile(K.z,K.x,K.y);if(!at)return null;let H=new hi(at.features),_t=il(H);return _t.byteOffset===0&&_t.byteLength===_t.buffer.byteLength||(_t=new 
2Uint8Array(_t)),{vectorTile:H,rawData:_t.buffer}})}loadData(G){return d._(this,void 0,void 0,function*(){var Z;(Z=this._pendingRequest)===null||Z===void 0||Z.abort();let K=!!(G&&G.request&&G.request.collectResourceTiming)&&new d.cC(G.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(G,this._pendingRequest),this._geoJSONIndex=G.cluster?new ya(function({superclusterOptions:_t,clusterProperties:Pt}){if(!Pt||!_t)return _t;let dt={},Tt={},At={accumulated:null,zoom:0},vt={properties:null},Gt=Object.keys(Pt);for(let re of Gt){let[ae,Pe]=Pt[re],Fe=d.cJ(Pe),Ft=d.cJ(typeof ae=="string"?[ae,["accumulated"],["get",re]]:ae);dt[re]=Fe.value,Tt[re]=Ft.value}return _t.map=re=>{vt.properties=re;let ae={};for(let Pe of Gt)ae[Pe]=dt[Pe].evaluate(At,vt);return ae},_t.reduce=(re,ae)=>{vt.properties=ae;for(let Pe of Gt)At.accumulated=re[Pe],re[Pe]=Tt[Pe].evaluate(At,vt)},_t}(G)).load((yield this._pendingData).features):(at=yield this._pendingData,new Eo(at,G.geojsonVtOptions)),this.loaded={};let H={};if(K){let _t=K.finish();_t&&(H.resourceTiming={},H.resourceTiming[G.source]=JSON.parse(JSON.stringify(_t)))}return H}catch(H){if(delete this._pendingRequest,d.cn(H))return{abandoned:!0};throw H}var at})}getData(){return d._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(G){let Z=this.loaded;return Z&&Z[G.uid]?super.reloadTile(G):this.loadTile(G)}loadAndProcessGeoJSON(G,Z){return d._(this,void 0,void 0,function*(){let K=yield this.loadGeoJSON(G,Z);if(delete this._pendingRequest,typeof K!="object")throw new Error(`Input data given to '${G.source}' is not a valid GeoJSON object.`);if(tn(K,!0),G.filter){let at=d.cJ(G.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(at.result==="error")throw new Error(at.value.map(_t=>`${_t.key}: ${_t.message}`).join(", "));K={type:"FeatureCollection",features:K.features.filter(_t=>at.value.evaluate({zoom:0},_t))}}return K})}loadGeoJSON(G,Z){return d._(this,void 0,void 0,function*(){let{promoteId:K}=G;if(G.request){let at=yield d.j(G.request,Z);return this._dataUpdateable=_r(at.data,K)?zo(at.data,K):void 0,at.data}if(typeof G.data=="string")try{let at=JSON.parse(G.data);return this._dataUpdateable=_r(at,K)?zo(at,K):void 0,at}catch{throw new Error(`Input data given to '${G.source}' is not a valid GeoJSON object.`)}if(!G.dataDiff)throw new Error(`Input data given to '${G.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${G.source}`);return function(at,H,_t){var Pt,dt,Tt,At;if(H.removeAll&&at.clear(),H.remove)for(let vt of H.remove)at.delete(vt);if(H.add)for(let vt of H.add){let Gt=Xo(vt,_t);Gt!=null&&at.set(Gt,vt)}if(H.update)for(let vt of H.update){let Gt=at.get(vt.id);if(Gt==null)continue;let re=!vt.removeAllProperties&&(((Pt=vt.removeProperties)===null||Pt===void 0?void 0:Pt.length)>0||((dt=vt.addOrUpdateProperties)===null||dt===void 0?void 0:dt.length)>0);if((vt.newGeometry||vt.removeAllProperties||re)&&(Gt=Object.assign({},Gt),at.set(vt.id,Gt),re&&(Gt.properties=Object.assign({},Gt.properties))),vt.newGeometry&&(Gt.geometry=vt.newGeometry),vt.removeAllProperties)Gt.properties={};else if(((Tt=vt.removeProperties)===null||Tt===void 0?void 0:Tt.length)>0)for(let ae of vt.removeProperties)Object.prototype.hasOwnProperty.call(Gt.properties,ae)&&delete Gt.properties[ae];if(((At=vt.addOrUpdateProperties)===null||At===void 0?void 0:At.length)>0)for(let{key:ae,value:Pe}of vt.addOrUpdateProperties)Gt.properties[ae]=Pe}}(this._dataUpdateable,G.dataDiff,K),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(G){return d._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(G){return this._geoJSONIndex.getClusterExpansionZoom(G.clusterId)}getClusterChildren(G){return this._geoJSONIndex.getChildren(G.clusterId)}getClusterLeaves(G){return this._geoJSONIndex.getLeaves(G.clusterId,G.limit,G.offset)}}class Ko{constructor(G){this.self=G,this.actor=new d.H(G),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={}
2,this.self.registerWorkerSource=(Z,K)=>{if(this.externalWorkerSourceTypes[Z])throw new Error(`Worker source with name "${Z}" already registered.`);this.externalWorkerSourceTypes[Z]=K},this.self.addProtocol=d.cp,this.self.removeProtocol=d.cq,this.self.registerRTLTextPlugin=Z=>{d.cK.setMethods(Z)},this.actor.registerMessageHandler("LDT",(Z,K)=>this._getDEMWorkerSource(Z,K.source).loadTile(K)),this.actor.registerMessageHandler("RDT",(Z,K)=>d._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Z,K.source).removeTile(K)})),this.actor.registerMessageHandler("GCEZ",(Z,K)=>d._(this,void 0,void 0,function*(){return this._getWorkerSource(Z,K.type,K.source).getClusterExpansionZoom(K)})),this.actor.registerMessageHandler("GCC",(Z,K)=>d._(this,void 0,void 0,function*(){return this._getWorkerSource(Z,K.type,K.source).getClusterChildren(K)})),this.actor.registerMessageHandler("GCL",(Z,K)=>d._(this,void 0,void 0,function*(){return this._getWorkerSource(Z,K.type,K.source).getClusterLeaves(K)})),this.actor.registerMessageHandler("LD",(Z,K)=>this._getWorkerSource(Z,K.type,K.source).loadData(K)),this.actor.registerMessageHandler("GD",(Z,K)=>this._getWorkerSource(Z,K.type,K.source).getData()),this.actor.registerMessageHandler("LT",(Z,K)=>this._getWorkerSource(Z,K.type,K.source).loadTile(K)),this.actor.registerMessageHandler("RT",(Z,K)=>this._getWorkerSource(Z,K.type,K.source).reloadTile(K)),this.actor.registerMessageHandler("AT",(Z,K)=>this._getWorkerSource(Z,K.type,K.source).abortTile(K)),this.actor.registerMessageHandler("RMT",(Z,K)=>this._getWorkerSource(Z,K.type,K.source).removeTile(K)),this.actor.registerMessageHandler("RS",(Z,K)=>d._(this,void 0,void 0,function*(){if(!this.workerSources[Z]||!this.workerSources[Z][K.type]||!this.workerSources[Z][K.type][K.source])return;let at=this.workerSources[Z][K.type][K.source];delete this.workerSources[Z][K.type][K.source],at.removeSource!==void 0&&at.removeSource(K)})),this.actor.registerMessageHandler("RM",Z=>d._(this,void 0,void 0,function*(){delete this.layerIndexes[Z],delete this.availableImages[Z],delete this.workerSources[Z],delete this.demWorkerSources[Z]})),this.actor.registerMessageHandler("SR",(Z,K)=>d._(this,void 0,void 0,function*(){this.referrer=K})),this.actor.registerMessageHandler("SRPS",(Z,K)=>this._syncRTLPluginState(Z,K)),this.actor.registerMessageHandler("IS",(Z,K)=>d._(this,void 0,void 0,function*(){this.self.importScripts(K)})),this.actor.registerMessageHandler("SI",(Z,K)=>this._setImages(Z,K)),this.actor.registerMessageHandler("UL",(Z,K)=>d._(this,void 0,void 0,function*(){this._getLayerIndex(Z).update(K.layers,K.removedIds)})),this.actor.registerMessageHandler("SL",(Z,K)=>d._(this,void 0,void 0,function*(){this._getLayerIndex(Z).replace(K)}))}_setImages(G,Z){return d._(this,void 0,void 0,function*(){this.availableImages[G]=Z;for(let K in this.workerSources[G]){let at=this.workerSources[G][K];for(let H in at)at[H].availableImages=Z}})}_syncRTLPluginState(G,Z){return d._(this,void 0,void 0,function*(){return yield d.cK.syncState(Z,this.self.importScripts)})}_getAvailableImages(G){let Z=this.availableImages[G];return Z||(Z=[]),Z}_getLayerIndex(G){let Z=this.layerIndexes[G];return Z||(Z=this.layerIndexes[G]=new a),Z}_getWorkerSource(G,Z,K){if(this.workerSources[G]||(this.workerSources[G]={}),this.workerSources[G][Z]||(this.workerSources[G][Z]={}),!this.workerSources[G][Z][K]){let at={sendAsync:(H,_t)=>(H.targetMapId=G,this.actor.sendAsync(H,_t))};switch(Z){case"vector":this.workerSources[G][Z][K]=new ie(at,this._getLayerIndex(G),this._getAvailableImages(G));break;case"geojson":this.workerSources[G][Z][K]=new Ri(at,this._getLayerIndex(G),this._getAvailableImages(G));break;default:this.workerSources[G][Z][K]=new this.externalWorkerSourceTypes[Z](at,this._getLayerIndex(G),this._getAvailableImages(G))}}return this.workerSources[G][Z][K]}_getDEMWorkerSource(G,Z){return this.demWorkerSources[G]||(this.demWorkerSources[G]={}),this.demWorkerSources[G][Z]||(this.demWorkerSources[G][Z]=new ee),this.demWorkerSources[G][Z]}}return d.i(self)&&(self.worker=new Ko(self)),Ko}),n("index",["exports","./shared"],function(d,a){"use strict";var z="5.4.0";function J(){var m=new a.A(4);return a.A!=Float32Array&&(m[1]=0,m[2]=0),m[0]=1,m[3]=1,m}let yt,ie,ee={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(m,t,i){let l=requestAnimationFrame(g=>{p(),t(g)}),{unsubscribe:p}=a.s(m.signal,"abort",()=>{p(),cancelAnimationFrame(l),i(a.c())},!1)},frameAsync(m){return new Promise((t,i)=>{this.frame(m,t,i)})},getImageData(m,t=0){return this.getImageCanvasContext(m).getImageData(-t,-t,m.width+2*t,m.height+2*t)},getImageCanvasContext(m){let t=window.document.createElement("canvas"),i=t.getContext("2d",{willReadFrequently:!0});if(!i)throw new Error("failed to create canvas 2d context");return t.width=m.width,t.height=m.height,i.drawImage(m,0,0,m.width,m.height),i},resolveURL:m=>(yt||(yt=document.createElement("a")),yt.href=m,yt.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(ie==null&&(ie=matchMedia("(prefers-reduced-motion: reduce)")),ie.matches)}};class bt{static testProp(t){if(!bt.docStyle)return t[0];for(let i=0;i<t.length;i++)if(t[i]in bt.docStyle)return t[i];return t[0]}static create(t,i,l){let p=window.document.createElement(t);return i!==void 0&&(p.className=i),l&&l.appendChild(p),p}static createNS(t,i){return window.document.createElementNS(t,i)}static disableDrag(){bt.docStyle&&bt.selectProp&&(bt.userSelect=bt.docStyle[bt.selectProp],bt.docStyle[bt.selectProp]="none")}static enableDrag(){bt.docStyle&&bt.selectProp&&(bt.docStyle[bt.selectProp]=bt.userSelect)}static setTransform(t,i){t.style[bt.transformProp]=i}static addEventListener(t,i,l,p={}){t.addEventListener(i,l,"passive"in p?p:p.capture)}static removeEventListener(t,i,l,p={}){t.removeEventListener(i,l,"passive"in p?p:p.capture)}static suppressClickInternal(t){t.preventDefault(),t.stopPropagation(),window.removeEventListener("click",bt.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",bt.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",bt.suppressClickInternal,!0)},0)}static getScale(t){let i=t.getBoundingClientRect();return{x:i.width/t.offsetWidth||1,y:i.height/t.offsetHeight||1,boundingClientRect:i}}static getPoint(t,i,l){let p=i.boundingClientRect;return new a.P((l.clientX-p.left)/i.x-t.clientLeft,(l.clientY-p.top)/i.y-t.clientTop)}static mousePos(t,i){let l=bt.getScale(t);return bt.getPoint(t,l,i)}static touchPos(t,i){let l=[],p=bt.getScale(t);for(let g=0;g<i.length;g++)l.push(bt.getPoint(t,p,i[g]));return l}static mouseButton(t){return t.button}static remove(t){t.parentNode&&t.parentNode.removeChild(t)}static sanitize(t){let i=new DOMParser().parseFromString(t,"text/html").body||document.createElement("body"),l=i.querySelectorAll("script");for(let p of l)p.remove();return bt.clean(i),i.innerHTML}static isPossiblyDangerous(t,i){let l=i.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(t)||!l.includes("javascript:")&&!l.includes("data:"))||!!t.startsWith("on")||void 0}static clean(t){let i=t.children;for(let l of i)bt.removeAttributes(l),bt.clean(l)}static removeAttributes(t){for(let{name:i,value:l}of t.attributes)bt.isPossiblyDangerous(i,l)&&t.removeAttribute(i)}}bt.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,bt.selectProp=bt.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),bt.transformProp=bt.testProp(["transform","WebkitTransform"]);
2let ne={supported:!1,testSupport:function(m){!_n&&tn&&(Dn?hi(m):Ve=m)}},Ve,tn,_n=!1,Dn=!1;function hi(m){let t=m.createTexture();m.bindTexture(m.TEXTURE_2D,t);try{if(m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,tn),m.isContextLost())return;ne.supported=!0}catch{}m.deleteTexture(t),_n=!0}var ri;typeof document<"u"&&(tn=document.createElement("img"),tn.onload=()=>{Ve&&hi(Ve),Ve=null,Dn=!0},tn.onerror=()=>{_n=!0,Ve=null},tn.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(m){let t,i,l,p;m.resetRequestQueue=()=>{t=[],i=0,l=0,p={}},m.addThrottleControl=C=>{let P=l++;return p[P]=C,P},m.removeThrottleControl=C=>{delete p[C],y()},m.getImage=(C,P,S=!0)=>new Promise((L,D)=>{ne.supported&&(C.headers||(C.headers={}),C.headers.accept="image/webp,*/*"),a.e(C,{type:"image"}),t.push({abortController:P,requestParameters:C,supportImageRefresh:S,state:"queued",onError:V=>{D(V)},onSuccess:V=>{L(V)}}),y()});let g=C=>a._(this,void 0,void 0,function*(){C.state="running";let{requestParameters:P,supportImageRefresh:S,onError:L,onSuccess:D,abortController:V}=C,U=S===!1&&!a.i(self)&&!a.g(P.url)&&(!P.headers||Object.keys(P.headers).reduce((tt,nt)=>tt&&nt==="accept",!0));i++;let Q=U?v(P,V):a.m(P,V);try{let tt=yield Q;delete C.abortController,C.state="completed",tt.data instanceof HTMLImageElement||a.b(tt.data)?D(tt):tt.data&&D({data:yield(Y=tt.data,typeof createImageBitmap=="function"?a.f(Y):a.h(Y)),cacheControl:tt.cacheControl,expires:tt.expires})}catch(tt){delete C.abortController,L(tt)}finally{i--,y()}var Y}),y=()=>{let C=(()=>{for(let P of Object.keys(p))if(p[P]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let P=i;P<C&&t.length>0;P++){let S=t.shift();S.abortController.signal.aborted?P--:g(S)}},v=(C,P)=>new Promise((S,L)=>{let D=new Image,V=C.url,U=C.credentials;U&&U==="include"?D.crossOrigin="use-credentials":(U&&U==="same-origin"||!a.d(V))&&(D.crossOrigin="anonymous"),P.signal.addEventListener("abort",()=>{D.src="",L(a.c())}),D.fetchPriority="high",D.onload=()=>{D.onerror=D.onload=null,S({data:D})},D.onerror=()=>{D.onerror=D.onload=null,P.signal.aborted||L(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."))},D.src=V})}(ri||(ri={})),ri.resetRequestQueue();class Fn{constructor(t){this._transformRequestFn=t}transformRequest(t,i){return this._transformRequestFn&&this._transformRequestFn(t,i)||{url:t}}setTransformRequest(t){this._transformRequestFn=t}}function Pn(m){let t=[];if(typeof m=="string")t.push({id:"default",url:m});else if(m&&m.length>0){let i=[];for(let{id:l,url:p}of m){let g=`${l}${p}`;i.indexOf(g)===-1&&(i.push(g),t.push({id:l,url:p}))}}return t}function Po(m,t,i){try{let l=new URL(m);return l.pathname+=`${t}${i}`,l.toString()}catch{throw new Error(`Invalid sprite URL "${m}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}class Rn{constructor(t,i,l,p){this.context=t,this.format=l,this.texture=t.gl.createTexture(),this.update(i,p)}update(t,i,l){let{width:p,height:g}=t,y=!(this.size&&this.size[0]===p&&this.size[1]===g||l),{context:v}=this,{gl:C}=v;if(this.useMipmap=!!(i&&i.useMipmap),C.bindTexture(C.TEXTURE_2D,this.texture),v.pixelStoreUnpackFlipY.set(!1),v.pixelStoreUnpack.set(1),v.pixelStoreUnpackPremultiplyAlpha.set(this.format===C.RGBA&&(!i||i.premultiply!==!1)),y)this.size=[p,g],t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||a.b(t)?C.texImage2D(C.TEXTURE_2D,0,this.format,this.format,C.UNSIGNED_BYTE,t):C.texImage2D(C.TEXTURE_2D,0,this.format,p,g,0,this.format,C.UNSIGNED_BYTE,t.data);else{let{x:P,y:S}=l||{x:0,y:0};t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||a.b(t)?C.texSubImage2D(C.TEXTURE_2D,0,P,S,C.RGBA,C.UNSIGNED_BYTE,t):C.texSubImage2D(C.TEXTURE_2D,0,P,S,p,g,C.RGBA,C.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&C.generateMipmap(C.TEXTURE_2D),v.pixelStoreUnpackFlipY.setDefault(),v.pixelStoreUnpack.setDefault(),v.pixelStoreUnpackPremultiplyAlpha.setDefault()}bind(t,i,l){let{context:p}=this,{gl:g}=p;g.bindTexture(g.TEXTURE_2D,this.texture),l!==g.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(l=g.LINEAR),t!==this.filter&&(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,t),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,l||t),this.filter=t),i!==this.wrap&&(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,i),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,i),this.wrap=i)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null}}function il(m){let{userImage:t}=m;return!!(t&&t.render&&t.render())&&(m.data.replace(new Uint8Array(t.data.buffer)),!0)}class ol extends a.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(t){if(this.loaded!==t&&(this.loaded=t,t)){for(let{ids:i,promiseResolve:l}of this.requestors)l(this._getImagesForIds(i));this.requestors=[]}}getImage(t){let i=this.images[t];if(i&&!i.data&&i.spriteData){let l=i.spriteData;i.data=new a.R({width:l.width,height:l.height},l.context.getImageData(l.x,l.y,l.width,l.height).data),i.spriteData=null}return i}addImage(t,i){if(this.images[t])throw new Error(`Image id ${t} already exist, use updateImage instead`);
2this._validate(t,i)&&(this.images[t]=i)}_validate(t,i){let l=!0,p=i.data||i.spriteData;return this._validateStretch(i.stretchX,p&&p.width)||(this.fire(new a.k(new Error(`Image "${t}" has invalid "stretchX" value`))),l=!1),this._validateStretch(i.stretchY,p&&p.height)||(this.fire(new a.k(new Error(`Image "${t}" has invalid "stretchY" value`))),l=!1),this._validateContent(i.content,i)||(this.fire(new a.k(new Error(`Image "${t}" has invalid "content" value`))),l=!1),l}_validateStretch(t,i){if(!t)return!0;let l=0;for(let p of t){if(p[0]<l||p[1]<p[0]||i<p[1])return!1;l=p[1]}return!0}_validateContent(t,i){if(!t)return!0;if(t.length!==4)return!1;let l=i.spriteData,p=l&&l.width||i.data.width,g=l&&l.height||i.data.height;return!(t[0]<0||p<t[0]||t[1]<0||g<t[1]||t[2]<0||p<t[2]||t[3]<0||g<t[3]||t[2]<t[0]||t[3]<t[1])}updateImage(t,i,l=!0){let p=this.getImage(t);if(l&&(p.data.width!==i.data.width||p.data.height!==i.data.height))throw new Error(`size mismatch between old image (${p.data.width}x${p.data.height}) and new image (${i.data.width}x${i.data.height}).`);i.version=p.version+1,this.images[t]=i,this.updatedImages[t]=!0}removeImage(t){let i=this.images[t];delete this.images[t],delete this.patterns[t],i.userImage&&i.userImage.onRemove&&i.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(t){return new Promise((i,l)=>{let p=!0;if(!this.isLoaded())for(let g of t)this.images[g]||(p=!1);this.isLoaded()||p?i(this._getImagesForIds(t)):this.requestors.push({ids:t,promiseResolve:i})})}_getImagesForIds(t){let i={};for(let l of t){let p=this.getImage(l);p||(this.fire(new a.l("styleimagemissing",{id:l})),p=this.getImage(l)),p?i[l]={data:p.data.clone(),pixelRatio:p.pixelRatio,sdf:p.sdf,version:p.version,stretchX:p.stretchX,stretchY:p.stretchY,content:p.content,textFitWidth:p.textFitWidth,textFitHeight:p.textFitHeight,hasRenderCallback:!!(p.userImage&&p.userImage.render)}:a.w(`Image "${l}" 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 i}getPixelSize(){let{width:t,height:i}=this.atlasImage;return{width:t,height:i}}getPattern(t){let i=this.patterns[t],l=this.getImage(t);if(!l)return null;if(i&&i.position.version===l.version)return i.position;if(i)i.position.version=l.version;else{let p={w:l.data.width+2,h:l.data.height+2,x:0,y:0},g=new a.I(p,l);this.patterns[t]={bin:p,position:g}}return this._updatePatternAtlas(),this.patterns[t].position}bind(t){let i=t.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new Rn(t,this.atlasImage,i.RGBA),this.atlasTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}_updatePatternAtlas(){let t=[];for(let g in this.patterns)t.push(this.patterns[g].bin);let{w:i,h:l}=a.p(t),p=this.atlasImage;p.resize({width:i||1,height:l||1});for(let g in this.patterns){let{bin:y}=this.patterns[g],v=y.x+1,C=y.y+1,P=this.getImage(g).data,S=P.width,L=P.height;a.R.copy(P,p,{x:0,y:0},{x:v,y:C},{width:S,height:L}),a.R.copy(P,p,{x:0,y:L-1},{x:v,y:C-1},{width:S,height:1}),a.R.copy(P,p,{x:0,y:0},{x:v,y:C+L},{width:S,height:1}),a.R.copy(P,p,{x:S-1,y:0},{x:v-1,y:C},{width:1,height:L}),a.R.copy(P,p,{x:0,y:0},{x:v+S,y:C},{width:1,height:L})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(t){for(let i of t){if(this.callbackDispatchedThisFrame[i])continue;this.callbackDispatchedThisFrame[i]=!0;let l=this.getImage(i);l||a.w(`Image with ID: "${i}" was not found`),il(l)&&this.updateImage(i,l)}}}let hr=1e20;function Oo(m,t,i,l,p,g,y,v,C){for(let P=t;P<t+l;P++)co(m,i*g+P,g,p,y,v,C);for(let P=i;P<i+p;P++)co(m,P*g+t,1,l,y,v,C)}function co(m,t,i,l,p,g,y){g[0]=0,y[0]=-1e20,y[1]=hr,p[0]=m[t];for(let v=1,C=0,P=0;v<l;v++){p[v]=m[t+v*i];let S=v*v;do{let L=g[C];P=(p[v]-p[L]+S-L*L)/(v-L)/2}while(P<=y[C]&&--C>-1);C++,g[C]=v,y[C]=P,y[C+1]=hr}for(let v=0,C=0;v<l;v++){for(;y[C+1]<v;)C++;let P=g[C],S=v-P;m[t+v*i]=p[P]+S*S}}class bi{constructor(t,i){this.requestManager=t,this.localIdeographFontFamily=i,this.entries={}}setURL(t){this.url=t}getGlyphs(t){return a._(this,void 0,void 0,function*(){let i=[];for(let g in t)for(let y of t[g])i.push(this._getAndCacheGlyphsPromise(g,y));let l=yield Promise.all(i),p={};for(let{stack:g,id:y,glyph:v}of l)p[g]||(p[g]={}),p[g][y]=v&&{id:v.id,bitmap:v.bitmap.clone(),metrics:v.metrics};return p})}
2_getAndCacheGlyphsPromise(t,i){return a._(this,void 0,void 0,function*(){let l=this.entries[t];l||(l=this.entries[t]={glyphs:{},requests:{},ranges:{}});let p=l.glyphs[i];if(p!==void 0)return{stack:t,id:i,glyph:p};if(p=this._tinySDF(l,t,i),p)return l.glyphs[i]=p,{stack:t,id:i,glyph:p};let g=Math.floor(i/256);if(256*g>65535)throw new Error("glyphs > 65535 not supported");if(l.ranges[g])return{stack:t,id:i,glyph:p};if(!this.url)throw new Error("glyphsUrl is not set");if(!l.requests[g]){let v=bi.loadGlyphRange(t,g,this.url,this.requestManager);l.requests[g]=v}let y=yield l.requests[g];for(let v in y)this._doesCharSupportLocalGlyph(+v)||(l.glyphs[+v]=y[+v]);return l.ranges[g]=!0,{stack:t,id:i,glyph:y[i]||null}})}_doesCharSupportLocalGlyph(t){return!!this.localIdeographFontFamily&&(new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(t))||a.u["CJK Unified Ideographs"](t)||a.u["Hangul Syllables"](t)||a.u.Hiragana(t)||a.u.Katakana(t)||a.u["CJK Symbols and Punctuation"](t)||a.u["Halfwidth and Fullwidth Forms"](t))}_tinySDF(t,i,l){let p=this.localIdeographFontFamily;if(!p||!this._doesCharSupportLocalGlyph(l))return;let g=t.tinySDF;if(!g){let v="400";/bold/i.test(i)?v="900":/medium/i.test(i)?v="500":/light/i.test(i)&&(v="200"),g=t.tinySDF=new bi.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:p,fontWeight:v})}let y=g.draw(String.fromCharCode(l));return{id:l,bitmap:new a.q({width:y.width||60,height:y.height||60},y.data),metrics:{width:y.glyphWidth/2||24,height:y.glyphHeight/2||24,left:y.glyphLeft/2+.5||0,top:y.glyphTop/2-27.5||-8,advance:y.glyphAdvance/2||24,isDoubleResolution:!0}}}}bi.loadGlyphRange=function(m,t,i,l){return a._(this,void 0,void 0,function*(){let p=256*t,g=p+255,y=l.transformRequest(i.replace("{fontstack}",m).replace("{range}",`${p}-${g}`),"Glyphs"),v=yield a.n(y,new AbortController);if(!v||!v.data)throw new Error(`Could not load glyph range. range: ${t}, ${p}-${g}`);let C={};for(let P of a.o(v.data))C[P.id]=P;return C})},bi.TinySDF=class{constructor({fontSize:m=24,buffer:t=3,radius:i=8,cutoff:l=.25,fontFamily:p="sans-serif",fontWeight:g="normal",fontStyle:y="normal"}={}){this.buffer=t,this.cutoff=l,this.radius=i;let v=this.size=m+4*t,C=this._createCanvas(v),P=this.ctx=C.getContext("2d",{willReadFrequently:!0});P.font=`${y} ${g} ${m}px ${p}`,P.textBaseline="alphabetic",P.textAlign="left",P.fillStyle="black",this.gridOuter=new Float64Array(v*v),this.gridInner=new Float64Array(v*v),this.f=new Float64Array(v),this.z=new Float64Array(v+1),this.v=new Uint16Array(v)}_createCanvas(m){let t=document.createElement("canvas");return t.width=t.height=m,t}draw(m){let{width:t,actualBoundingBoxAscent:i,actualBoundingBoxDescent:l,actualBoundingBoxLeft:p,actualBoundingBoxRight:g}=this.ctx.measureText(m),y=Math.ceil(i),v=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(g-p))),C=Math.min(this.size-this.buffer,y+Math.ceil(l)),P=v+2*this.buffer,S=C+2*this.buffer,L=Math.max(P*S,0),D=new Uint8ClampedArray(L),V={data:D,width:P,height:S,glyphWidth:v,glyphHeight:C,glyphTop:y,glyphLeft:0,glyphAdvance:t};if(v===0||C===0)return V;let{ctx:U,buffer:Q,gridInner:Y,gridOuter:tt}=this;U.clearRect(Q,Q,v,C),U.fillText(m,Q,Q+y);let nt=U.getImageData(Q,Q,v,C);tt.fill(hr,0,L),Y.fill(0,0,L);for(let lt=0;lt<C;lt++)for(let ct=0;ct<v;ct++){let pt=nt.data[4*(lt*v+ct)+3]/255;if(pt===0)continue;let ft=(lt+Q)*P+ct+Q;if(pt===1)tt[ft]=0,Y[ft]=hr;else{let ht=.5-pt;tt[ft]=ht>0?ht*ht:0,Y[ft]=ht<0?ht*ht:0}}Oo(tt,0,0,P,S,P,this.f,this.v,this.z),Oo(Y,Q,Q,v,C,P,this.f,this.v,this.z);for(let lt=0;lt<L;lt++){let ct=Math.sqrt(tt[lt])-Math.sqrt(Y[lt]);D[lt]=Math.round(255-255*(ct/this.radius+this.cutoff))}return V}};class ds{constructor(){this.specification=a.v.light.position}possiblyEvaluate(t,i){return a.z(t.expression.evaluate(i))}interpolate(t,i,l){return{x:a.B.number(t.x,i.x,l),y:a.B.number(t.y,i.y,l),z:a.B.number(t.z,i.z,l)}}}let ya;class ps extends a.E{constructor(t){super(),ya=ya||new a.r({anchor:new a.D(a.v.light.anchor),position:new ds,color:new a.D(a.v.light.color),intensity:new a.D(a.v.light.intensity)}),this._transitionable=new a.T(ya),this.setLight(t),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(t,i={}
2){if(!this._validate(a.t,t,i))for(let l in t){let p=t[l];l.endsWith("-transition")?this._transitionable.setTransition(l.slice(0,-11),p):this._transitionable.setValue(l,p)}}updateTransitions(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(t){this.properties=this._transitioning.possiblyEvaluate(t)}_validate(t,i,l){return(!l||l.validate!==!1)&&a.x(this,t.call(a.y,{value:i,style:{glyphs:!0,sprite:!0},styleSpec:a.v}))}}let hn=new a.r({"sky-color":new a.D(a.v.sky["sky-color"]),"horizon-color":new a.D(a.v.sky["horizon-color"]),"fog-color":new a.D(a.v.sky["fog-color"]),"fog-ground-blend":new a.D(a.v.sky["fog-ground-blend"]),"horizon-fog-blend":new a.D(a.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new a.D(a.v.sky["sky-horizon-blend"]),"atmosphere-blend":new a.D(a.v.sky["atmosphere-blend"])});class mr extends a.E{constructor(t){super(),this._transitionable=new a.T(hn),this.setSky(t),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new a.C(0))}setSky(t,i={}){if(!this._validate(a.F,t,i)){t||(t={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(let l in t){let p=t[l];l.endsWith("-transition")?this._transitionable.setTransition(l.slice(0,-11),p):this._transitionable.setValue(l,p)}}}getSky(){return this._transitionable.serialize()}updateTransitions(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(t){this.properties=this._transitioning.possiblyEvaluate(t)}_validate(t,i,l={}){return l?.validate!==!1&&a.x(this,t.call(a.y,a.e({value:i,style:{glyphs:!0,sprite:!0},styleSpec:a.v})))}calculateFogBlendOpacity(t){return t<60?0:t<70?(t-60)/10:1}}class So{constructor(t,i){this.width=t,this.height=i,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(t,i){let l=t.join(",")+String(i);return this.dashEntry[l]||(this.dashEntry[l]=this.addDash(t,i)),this.dashEntry[l]}getDashRanges(t,i,l){let p=[],g=t.length%2==1?-t[t.length-1]*l:0,y=t[0]*l,v=!0;p.push({left:g,right:y,isDash:v,zeroLength:t[0]===0});let C=t[0];for(let P=1;P<t.length;P++){v=!v;let S=t[P];g=C*l,C+=S,y=C*l,p.push({left:g,right:y,isDash:v,zeroLength:S===0})}return p}addRoundDash(t,i,l){let p=i/2;for(let g=-l;g<=l;g++){let y=this.width*(this.nextRow+l+g),v=0,C=t[v];for(let P=0;P<this.width;P++){P/C.right>1&&(C=t[++v]);let S=Math.abs(P-C.left),L=Math.abs(P-C.right),D=Math.min(S,L),V,U=g/l*(p+1);if(C.isDash){let Q=p-Math.abs(U);V=Math.sqrt(D*D+Q*Q)}else V=p-Math.sqrt(D*D+U*U);this.data[y+P]=Math.max(0,Math.min(255,V+128))}}}addRegularDash(t){for(let v=t.length-1;v>=0;--v){let C=t[v],P=t[v+1];C.zeroLength?t.splice(v,1):P&&P.isDash===C.isDash&&(P.left=C.left,t.splice(v,1))}let i=t[0],l=t[t.length-1];i.isDash===l.isDash&&(i.left=l.left-this.width,l.right=i.right+this.width);let p=this.width*this.nextRow,g=0,y=t[g];for(let v=0;v<this.width;v++){v/y.right>1&&(y=t[++g]);let C=Math.abs(v-y.left),P=Math.abs(v-y.right),S=Math.min(C,P);this.data[p+v]=Math.max(0,Math.min(255,(y.isDash?S:-S)+128))}}addDash(t,i){let l=i?7:0,p=2*l+1;if(this.nextRow+p>this.height)return a.w("LineAtlas out of space"),null;let g=0;for(let v=0;v<t.length;v++)g+=t[v];if(g!==0){let v=this.width/g,C=this.getDashRanges(t,this.width,v);i?this.addRoundDash(C,v,l):this.addRegularDash(C)}let y={y:(this.nextRow+l+.5)/this.height,height:2*l/this.height,width:g};return this.nextRow+=p,this.dirty=!0,y}bind(t){let i=t.gl;this.texture?(i.bindTexture(i.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,i.texSubImage2D(i.TEXTURE_2D,0,0,0,this.width,this.height,i.ALPHA,i.UNSIGNED_BYTE,this.data))):(this.texture=i.createTexture(),i.bindTexture(i.TEXTURE_2D,this.texture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.REPEAT),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.REPEAT),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texImage2D(i.TEXTURE_2D,0,i.ALPHA,this.width,this.height,0,i.ALPHA,i.UNSIGNED_BYTE,this.data))}}let xa="maplibre_preloaded_worker_pool";class po{constructor(){this.active={}}acquire(t){if(!this.workers)for(this.workers=[];this.workers.length<po.workerCount;)this.workers.push(new Worker(a.a.WORKER_URL));return this.active[t]=!0,this.workers.slice()}release(t){delete this.active[t],this.numActive()===0&&(this.workers.forEac
2h(i=>{i.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[xa]}numActive(){return Object.keys(this.active).length}}let rl=Math.floor(ee.hardwareConcurrency/2),uo,mi;function gr(){return uo||(uo=new po),uo}po.workerCount=a.G(globalThis)?Math.max(Math.min(rl,3),1):1;class qi{constructor(t,i){this.workerPool=t,this.actors=[],this.currentActor=0,this.id=i;let l=this.workerPool.acquire(i);for(let p=0;p<l.length;p++){let g=new a.H(l[p],i);g.name=`Worker ${p}`,this.actors.push(g)}if(!this.actors.length)throw new Error("No actors found")}broadcast(t,i){let l=[];for(let p of this.actors)l.push(p.sendAsync({type:t,data:i}));return Promise.all(l)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(t=!0){this.actors.forEach(i=>{i.remove()}),this.actors=[],t&&this.workerPool.release(this.id)}registerMessageHandler(t,i){for(let l of this.actors)l.registerMessageHandler(t,i)}}function va(){return mi||(mi=new qi(gr(),a.J),mi.registerMessageHandler("GR",(m,t,i)=>a.m(t,i))),mi}function Zr(m,t){let i=a.K();return a.L(i,i,[1,1,0]),a.M(i,i,[.5*m.width,.5*m.height,1]),m.calculatePosMatrix?a.N(i,i,m.calculatePosMatrix(t.toUnwrapped())):i}function us(m,t,i,l,p,g,y){var v;let C=function(D,V,U){if(D)for(let Q of D){let Y=V[Q];if(Y&&Y.source===U&&Y.type==="fill-extrusion")return!0}else for(let Q in V){let Y=V[Q];if(Y.source===U&&Y.type==="fill-extrusion")return!0}return!1}((v=p?.layers)!==null&&v!==void 0?v:null,t,m.id),P=g.maxPitchScaleFactor(),S=m.tilesIn(l,P,C);S.sort(Wi);let L=[];for(let D of S)L.push({wrappedTileID:D.tileID.wrapped().key,queryResults:D.tile.queryRenderedFeatures(t,i,m._state,D.queryGeometry,D.cameraQueryGeometry,D.scale,p,g,P,Zr(m.transform,D.tileID),y?(V,U)=>y(D.tileID,V,U):void 0)});return function(D,V){for(let U in D)for(let Q of D[U])Xi(Q,V);return D}(function(D){let V={},U={};for(let Q of D){let Y=Q.queryResults,tt=Q.wrappedTileID,nt=U[tt]=U[tt]||{};for(let lt in Y){let ct=Y[lt],pt=nt[lt]=nt[lt]||{},ft=V[lt]=V[lt]||[];for(let ht of ct)pt[ht.featureIndex]||(pt[ht.featureIndex]=!0,ft.push(ht))}}return V}(L),m)}function Wi(m,t){let i=m.tileID,l=t.tileID;return i.overscaledZ-l.overscaledZ||i.canonical.y-l.canonical.y||i.wrap-l.wrap||i.canonical.x-l.canonical.x}function Xi(m,t){let i=m.feature,l=t.getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=l}function Ei(m,t,i){return a._(this,void 0,void 0,function*(){let l=m;if(m.url?l=(yield a.j(t.transformRequest(m.url,"Source"),i)).data:yield ee.frameAsync(i),!l)return null;let p=a.O(a.e(l,m),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in l&&l.vector_layers&&(p.vectorLayerIds=l.vector_layers.map(g=>g.id)),p})}class gn{constructor(t,i){t&&(i?this.setSouthWest(t).setNorthEast(i):Array.isArray(t)&&(t.length===4?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1])))}setNorthEast(t){return this._ne=t instanceof a.Q?new a.Q(t.lng,t.lat):a.Q.convert(t),this}setSouthWest(t){return this._sw=t instanceof a.Q?new a.Q(t.lng,t.lat):a.Q.convert(t),this}extend(t){let i=this._sw,l=this._ne,p,g;if(t instanceof a.Q)p=t,g=t;else{if(!(t instanceof gn))return Array.isArray(t)?t.length===4||t.every(Array.isArray)?this.extend(gn.convert(t)):this.extend(a.Q.convert(t)):t&&("lng"in t||"lon"in t)&&"lat"in t?this.extend(a.Q.convert(t)):this;if(p=t._sw,g=t._ne,!p||!g)return this}return i||l?(i.lng=Math.min(p.lng,i.lng),i.lat=Math.min(p.lat,i.lat),l.lng=Math.max(g.lng,l.lng),l.lat=Math.max(g.lat,l.lat)):(this._sw=new a.Q(p.lng,p.lat),this._ne=new a.Q(g.lng,g.lat)),this}getCenter(){return new a.Q((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 a.Q(this.getWest(),this.getNorth())}getSouthEast(){return new a.Q(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(t){let{lng:i,lat:l}=a.Q.convert(t),p=this._sw.lng<=i&&i<=this._ne.lng;return this._sw.lng>this._ne.lng&&(p=this._sw.lng>=i&&i>=this._ne.lng),this._sw.lat<=l&&l<=this._ne.lat&&p}static convert(t){return t instanceof gn?t:t&&new gn(t)}static fromLngLat(t,i=0){let l=360*i/40075017,p=l/Math.cos(Math.PI/180*t.lat);return new gn(new a.Q(t.lng-p,t.lat-l),new a.Q(t.lng+p,t.lat+l))}adjustAntiMeridian(){let t=new a.Q(this._sw.lng,this._sw.lat),i=new a.Q(this._ne.lng,this._ne.lat);return new gn(t,t.lng>i.lng?new a.Q(i.lng+360,i.lat):i)}}class To{constructor(t,i,l){this.bounds=gn.convert(this.validateBounds(t)),this.minzoom=i||0,this.maxzoom=l||24}
2validateBounds(t){return Array.isArray(t)&&t.length===4?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]}contains(t){let i=Math.pow(2,t.z),l=Math.floor(a.U(this.bounds.getWest())*i),p=Math.floor(a.S(this.bounds.getNorth())*i),g=Math.ceil(a.U(this.bounds.getEast())*i),y=Math.ceil(a.S(this.bounds.getSouth())*i);return t.x>=l&&t.x<g&&t.y>=p&&t.y<y}}class fr extends a.E{constructor(t,i,l,p){if(super(),this.id=t,this.dispatcher=l,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,a.e(this,a.O(i,["url","scheme","tileSize","promoteId"])),this._options=a.e({type:"vector"},i),this._collectResourceTiming=i.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(p)}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let t=yield Ei(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),t&&(a.e(this,t),t.bounds&&(this.tileBounds=new To(t.bounds,this.minzoom,this.maxzoom)),this.fire(new a.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.l("data",{dataType:"source",sourceDataType:"content"})))}catch(t){this._tileJSONRequest=null,this.fire(new a.k(t))}})}loaded(){return this._loaded}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}onAdd(t){this.map=t,this.load()}setSourceProperty(t){this._tileJSONRequest&&this._tileJSONRequest.abort(),t(),this.load()}setTiles(t){return this.setSourceProperty(()=>{this._options.tiles=t}),this}setUrl(t){return this.setSourceProperty(()=>{this.url=t,this._options.url=t}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return a.e({},this._options)}loadTile(t){return a._(this,void 0,void 0,function*(){let i=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),l={request:this.map._requestManager.transformRequest(i,"Tile"),uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*t.tileID.overscaleFactor(),type:this.t
2ype,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};l.request.collectResourceTiming=this._collectResourceTiming;let p="RT";if(t.actor&&t.state!=="expired"){if(t.state==="loading")return new Promise((g,y)=>{t.reloadPromise={resolve:g,reject:y}})}else t.actor=this.dispatcher.getActor(),p="LT";t.abortController=new AbortController;try{let g=yield t.actor.sendAsync({type:p,data:l},t.abortController);if(delete t.abortController,t.aborted)return;this._afterTileLoadWorkerResponse(t,g)}catch(g){if(delete t.abortController,t.aborted)return;if(g&&g.status!==404)throw g;this._afterTileLoadWorkerResponse(t,null)}})}_afterTileLoadWorkerResponse(t,i){if(i&&i.resourceTiming&&(t.resourceTiming=i.resourceTiming),i&&this.map._refreshExpiredTiles&&t.setExpiryData(i),t.loadVectorData(i,this.map.painter),t.reloadPromise){let l=t.reloadPromise;t.reloadPromise=null,this.loadTile(t).then(l.resolve).catch(l.reject)}}abortTile(t){return a._(this,void 0,void 0,function*(){t.abortController&&(t.abortController.abort(),delete t.abortController),t.actor&&(yield t.actor.sendAsync({type:"AT",data:{uid:t.uid,type:this.t
2ype,source:this.id}}))})}unloadTile(t){return a._(this,void 0,void 0,function*(){t.unloadVectorData(),t.actor&&(yield t.actor.sendAsync({type:"RMT",data:{uid:t.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class oo extends a.E{constructor(t,i,l,p){super(),this.id=t,this.dispatcher=l,this.setEventedParent(p),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=a.e({type:"raster"},i),a.e(this,a.O(i,["url","scheme","tileSize"]))}load(){return a._(this,arguments,void 0,function*(t=!1){this._loaded=!1,this.fire(new a.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let i=yield Ei(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,i&&(a.e(this,i),i.bounds&&(this.tileBounds=new To(i.bounds,this.minzoom,this.maxzoom)),this.fire(new a.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.l("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:t})))}catch(i){this._tileJSONRequest=null,this.fire(new a.k(i))}})}loaded(){return this._loaded}onAdd(t){this.map=t,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(t){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),t(),this.load(!0)}setTiles(t){return this.setSourceProperty(()=>{this._options.tiles=t}),this}setUrl(t){return this.setSourceProperty(()=>{this.url=t,this._options.url=t}),this}serialize(){return a.e({},this._options)}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}loadTile(t){return a._(this,void 0,void 0,function*(){let i=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);t.abortController=new AbortController;try{let l=yield ri.getImage(this.map._requestManager.transformRequest(i,"Tile"),t.abortController,this.map._refreshExpiredTiles);if(delete t.abortController,t.aborted)return void(t.state="unloaded");if(l&&l.data){this.map._refreshExpiredTiles&&l.cacheControl&&l.expires&&t.setExpiryData({cacheControl:l.cacheControl,expires:l.expires});let p=this.map.painter.context,g=p.gl,y=l.data;t.texture=this.map.painter.getTileTexture(y.width),t.texture?t.texture.update(y,{useMipmap:!0}):(t.texture=new Rn(p,y,g.RGBA,{useMipmap:!0}),t.texture.bind(g.LINEAR,g.CLAMP_TO_EDGE,g.LINEAR_MIPMAP_NEAREST)),t.state="loaded"}}catch(l){if(delete t.abortController,t.aborted)t.state="unloaded";else if(l)throw t.state="errored",l}})}abortTile(t){return a._(this,void 0,void 0,function*(){t.abortController&&(t.abortController.abort(),delete t.abortController)})}unloadTile(t){return a._(this,void 0,void 0,function*(){t.texture&&this.map.painter.saveTileTexture(t.texture)})}hasTransition(){return!1}}class hs extends oo{constructor(t,i,l,p){super(t,i,l,p),this.type="raster-dem",this.maxzoom=22,this._options=a.e({type:"raster-dem"},i),this.encoding=i.encoding||"mapbox",this.redFactor=i.redFactor,this.greenFactor=i.greenFactor,this.blueFactor=i.blueFactor,this.baseShift=i.baseShift}loadTile(t){return a._(this,void 0,void 0,function*(){let i=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),l=this.map._requestManager.transformRequest(i,"Tile");t.neighboringTiles=this._getNeighboringTiles(t.tileID),t.abortController=new AbortController;try{let p=yield ri.getImage(l,t.abortController,this.map._refreshExpiredTiles);if(delete t.abortController,t.aborted)return void(t.state="unloaded");if(p&&p.data){let g=p.data;this.map._refreshExpiredTiles&&p.cacheControl&&p.expires&&t.setExpiryData({cacheControl:p.cacheControl,expires:p.expires});let y=a.b(g)&&a.V()?g:yield this.readImageNow(g),v={type:this.type,uid:t.uid,source:this.id,rawImageData:y,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!t.actor||t.state==="expired"){t.actor=this.dispatcher.getActor();let C=yield t.actor.sendAsync({type:"LDT",data:v});t.dem=C,t.needsHillshadePrepare=!0,t.needsTerrainPrepare=!0,t.state="loaded"}}}
2catch(p){if(delete t.abortController,t.aborted)t.state="unloaded";else if(p)throw t.state="errored",p}})}readImageNow(t){return a._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&a.W()){let i=t.width+2,l=t.height+2;try{return new a.R({width:i,height:l},yield a.X(t,-1,-1,i,l))}catch{}}return ee.getImageData(t,1)})}_getNeighboringTiles(t){let i=t.canonical,l=Math.pow(2,i.z),p=(i.x-1+l)%l,g=i.x===0?t.wrap-1:t.wrap,y=(i.x+1+l)%l,v=i.x+1===l?t.wrap+1:t.wrap,C={};return C[new a.Y(t.overscaledZ,g,i.z,p,i.y).key]={backfilled:!1},C[new a.Y(t.overscaledZ,v,i.z,y,i.y).key]={backfilled:!1},i.y>0&&(C[new a.Y(t.overscaledZ,g,i.z,p,i.y-1).key]={backfilled:!1},C[new a.Y(t.overscaledZ,t.wrap,i.z,i.x,i.y-1).key]={backfilled:!1},C[new a.Y(t.overscaledZ,v,i.z,y,i.y-1).key]={backfilled:!1}),i.y+1<l&&(C[new a.Y(t.overscaledZ,g,i.z,p,i.y+1).key]={backfilled:!1},C[new a.Y(t.overscaledZ,t.wrap,i.z,i.x,i.y+1).key]={backfilled:!1},C[new a.Y(t.overscaledZ,v,i.z,y,i.y+1).key]={backfilled:!1}),C}unloadTile(t){return a._(this,void 0,void 0,function*(){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state="unloaded",t.actor&&(yield t.actor.sendAsync({type:"RDT",data:{type:this.type,uid:t.uid,source:this.id}}))})}}class ms extends a.E{constructor(t,i,l,p){super(),this.id=t,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=l.getActor(),this.setEventedParent(p),this._data=i.data,this._options=a.e({},i),this._collectResourceTiming=i.collectResourceTiming,i.maxzoom!==void 0&&(this.maxzoom=i.maxzoom),i.type&&(this.type=i.type),i.attribution&&(this.attribution=i.attribution),this.promoteId=i.promoteId,i.clusterMaxZoom!==void 0&&this.maxzoom<=i.clusterMaxZoom&&a.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${i.clusterMaxZoom}".`),this.workerOptions=a.e({source:this.id,cluster:i.cluster||!1,geojsonVtOptions:{buffer:this._pixelsToTileUnits(i.buffer!==void 0?i.buffer:128),tolerance:this._pixelsToTileUnits(i.tolerance!==void 0?i.tolerance:.375),extent:a.Z,maxZoom:this.maxzoom,lineMetrics:i.lineMetrics||!1,generateId:i.generateId||!1},superclusterOptions:{maxZoom:i.clusterMaxZoom!==void 0?i.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,i.clusterMinPoints||2),extent:a.Z,radius:this._pixelsToTileUnits(i.clusterRadius||50),log:!1,generateId:i.generateId||!1},clusterProperties:i.clusterProperties,filter:i.filter},i.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}_pixelsToTileUnits(t){return t*(a.Z/this.tileSize)}load(){return a._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(t){this.map=t,this.load()}setData(t){return this._data=t,this._updateWorkerData(),this}updateData(t){return this._updateWorkerData(t),this}getData(){return a._(this,void 0,void 0,function*(){let t=a.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:t})})}getCoordinatesFromGeometry(t){return t.type==="GeometryCollection"?t.geometries.map(i=>i.coordinates).flat(1/0):t.coordinates.flat(1/0)}getBounds(){return a._(this,void 0,void 0,function*(){let t=new gn,i=yield this.getData(),l;switch(i.type){case"FeatureCollection":l=i.features.map(p=>this.getCoordinatesFromGeometry(p.geometry)).flat(1/0);break;case"Feature":l=this.getCoordinatesFromGeometry(i.geometry);break;default:l=this.getCoordinatesFromGeometry(i)}if(l.length==0)return t;for(let p=0;p<l.length-1;p+=2)t.extend([l[p],l[p+1]]);return t})}setClusterOptions(t){return this.workerOptions.cluster=t.cluster,t&&(t.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=this._pixelsToTileUnits(t.clusterRadius)),t.clusterMa
2xZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=t.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(t){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:t,source:this.id}})}getClusterChildren(t){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:t,source:this.id}})}getClusterLeaves(t,i,l){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:t,limit:i,offset:l}})}_updateWorkerData(t){return a._(this,void 0,void 0,function*(){let i=a.e({type:this.type},this.workerOptions);t?i.dataDiff=t:typeof this._data=="string"?(i.request=this.map._requestManager.transformRequest(ee.resolveURL(this._data),"Source"),i.request.collectResourceTiming=this._collectResourceTiming):i.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new a.l("dataloading",{dataType:"source"}));try{let l=yield this.actor.sendAsync({type:"LD",data:i});if(this._pendingLoads--,this._removed||l.abandoned)return void this.fire(new a.l("dataabort",{dataType:"source"}));let p=null;l.resourceTiming&&l.resourceTiming[this.id]&&(p=l.resourceTiming[this.id].slice(0));let g={dataType:"source"};this._collectResourceTiming&&p&&p.length>0&&a.e(g,{resourceTiming:p}),this.fire(new a.l("data",Object.assign(Object.assign({},g),{sourceDataType:"metadata"}))),this.fire(new a.l("data",Object.assign(Object.assign({},g),{sourceDataType:"content"})))}catch(l){if(this._pendingLoads--,this._removed)return void this.fire(new a.l("dataabort",{dataType:"source"}));this.fire(new a.k(l))}})}loaded(){return this._pendingLoads===0}loadTile(t){return a._(this,void 0,void 0,function*(){let i=t.actor?"RT":"LT";t.actor=this.actor;let l={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.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};t.abortController=new AbortController;let p=yield this.actor.sendAsync({type:i,data:l},t.abortController);delete t.abortController,t.unloadVectorData(),t.aborted||t.loadVectorData(p,this.map.painter,i==="RT")})}abortTile(t){return a._(this,void 0,void 0,function*(){t.abortController&&(t.abortController.abort(),delete t.abortController),t.aborted=!0})}unloadTile(t){return a._(this,void 0,void 0,function*(){t.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:t.uid,type:this.t
2ype,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return a.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}class Ki extends a.E{constructor(t,i,l,p){super(),this.flippedWindingOrder=!1,this.id=t,this.dispatcher=l,this.coordinates=i.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(p),this.options=i}load(t){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.l("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let i=yield ri.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,i&&i.data&&(this.image=i.data,t&&(this.coordinates=t),this._finishLoading())}catch(i){this._request=null,this._loaded=!0,this.fire(new a.k(i))}})}loaded(){return this._loaded}updateImage(t){return t.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=t.url,this.load(t.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.l("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(t){this.map=t,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(t){this.coordinates=t;let i=t.map(a.$.fromLngLat);var l;return this.tileID=function(p){let g=1/0,y=1/0,v=-1/0,C=-1/0;for(let D of p)g=Math.min(g,D.x),y=Math.min(y,D.y),v=Math.max(v,D.x),C=Math.max(C,D.y);let P=Math.max(v-g,C-y),S=Math.max(0,Math.floor(-Math.log(P)/Math.LN2)),L=Math.pow(2,S);return new a.a1(S,Math.floor((g+v)/2*L),Math.floor((y+C)/2*L))}(i),this.terrainTileRanges=this._getOverlappingTileRanges(i),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=i.map(p=>this.tileID.getTilePoint(p)._round()),this.flippedWindingOrder=((l=this.tileCoords)[1].x-l[0].x)*(l[2].y-l[0].y)-(l[1].y-l[0].y)*(l[2].x-l[0].x)<0,this.fire(new a.l("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let t=this.map.painter.context,i=t.gl;this.texture||(this.texture=new Rn(t,this.image,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let l=!1;for(let p in this.tiles){let g=this.tiles[p];g.state!=="loaded"&&(g.state="loaded",g.texture=this.texture,l=!0)}l&&this.fire(new a.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(t){return a._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={}):t.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(t){let i=1/0,l=1/0,p=-1/0,g=-1/0;for(let v of t)i=Math.min(i,v.x),l=Math.min(l,v.y),p=Math.max(p,v.x),g=Math.max(g,v.y);let y={};for(let v=0;v<=a.a0;v++){let C=Math.pow(2,v),P=Math.floor(i*C),S=Math.floor(l*C),L=Math.floor(p*C),D=Math.floor(g*C);y[v]={minTileX:P,minTileY:S,maxTileX:L,maxTileY:D}}return y}}class Io extends Ki{constructor(t,i,l,p){super(t,i,l,p),this.roundZoom=!0,this.type="video",this.options=i}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1;let t=this.options;this.urls=[];for(let i of t.urls)this.urls.push(this.map._requestManager.transformRequest(i,"Source").url);try{let i=yield a.a2(this.urls);if(this._loaded=!0,!i)return;this.video=i,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(i){this.fire(new a.k(i))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(t){if(this.video){let i=this.video.seekable;t<i.start(0)||t>i.end(0)?this.fire(new a.k(new a.a3(`sources.${this.id}`,null,`Playback for this video can be set only between the ${i.start(0)} and ${i.end(0)}-second mark.`))):this.video.currentTime=t}}getVideo(){return this.video}onAdd(t){this.map||(this.map=t,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 t=this.map.painter.context,i=t.gl;this.texture?this.video.paused||(this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE),i.texSubImage2D(i.TEXTURE_2D,0,0,0,i.RGBA,i.UNSIGNED_BYTE,this.video)):(this.texture=new Rn(t,this.video,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let l=!1;for(let p in this.tiles){let g=this.tiles[p];g.state!=="loaded"&&(g.state="loaded",g.texture=this.texture,l=!0)}l&&this.fire(new a.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 Hr extends Ki{constructor(t,i,l,p){super(t,i,l,p),i.coordinates?Array.isArray(i.coordinates)&&i.c
2oordinates.length===4&&!i.coordinates.some(g=>!Array.isArray(g)||g.length!==2||g.some(y=>typeof y!="number"))||this.fire(new a.k(new a.a3(`sources.${t}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.k(new a.a3(`sources.${t}`,null,'missing required property "coordinates"'))),i.animate&&typeof i.animate!="boolean"&&this.fire(new a.k(new a.a3(`sources.${t}`,null,'optional "animate" property must be a boolean value'))),i.canvas?typeof i.canvas=="string"||i.canvas instanceof HTMLCanvasElement||this.fire(new a.k(new a.a3(`sources.${t}`,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 a.k(new a.a3(`sources.${t}`,null,'missing required property "canvas"'))),this.options=i,this.animate=i.animate===void 0||i.animate}load(){return a._(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 a.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(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let i=this.map.painter.context,l=i.gl;this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new Rn(i,this.canvas,l.RGBA,{premultiply:!0});let p=!1;for(let g in this.tiles){let y=this.tiles[g];y.state!=="loaded"&&(y.state="loaded",y.texture=this.texture,p=!0)}p&&this.fire(new a.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let t of[this.canvas.width,this.canvas.height])if(isNaN(t)||t<=0)return!0;return!1}}let ko={},gs=m=>{switch(m){case"geojson":return ms;case"image":return Ki;case"raster":return oo;case"raster-dem":return hs;case"vector":return fr;case"video":return Io;case"canvas":return Hr}return ko[m]},ba="RTLPluginLoaded";class Ca extends a.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=va()}_syncState(t){return this.status=t,this.dispatcher.broadcast("SRPS",{pluginStatus:t,pluginURL:this.url}).catch(i=>{throw this.status="error",i})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(t){return a._(this,arguments,void 0,function*(i,l=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=ee.resolveURL(i),!this.url)throw new Error(`requested url ${i}
2 is invalid`);if(this.status==="unavailable"){if(!l)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return a._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new a.l(ba))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let qr=null;function Eo(){return qr||(qr=new Ca),qr}class Wr{constructor(t,i){this.timeAdded=0,this.fadeEndTime=0,this.tileID=t,this.uid=a.a4(),this.uses=0,this.tileSize=i,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(t){let i=t+this.timeAdded;i<this.fadeEndTime||(this.fadeEndTime=i)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(t){this.demTexture&&t.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(t,i,l){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",t){t.featureIndex&&(this.latestFeatureIndex=t.featureIndex,t.rawTileData?(this.latestRawTileData=t.rawTileData,this.latestFeatureIndex.rawTileData=t.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=t.collisionBoxArray,this.buckets=function(p,g){let y={};if(!g)return y;for(let v of p){let C=v.layerIds.map(P=>g.getLayer(P)).filter(Boolean);if(C.length!==0){v.layers=C,v.stateDependentLayerIds&&(v.stateDependentLayers=v.stateDependentLayerIds.map(P=>C.filter(S=>S.id===P)[0]));for(let P of C)y[P.id]=v}}return y}(t.buckets,i?.style),this.hasSymbolBuckets=!1;for(let p in this.buckets){let g=this.buckets[p];if(g instanceof a.a6){if(this.hasSymbolBuckets=!0,!l)break;g.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let p in this.buckets){let g=this.buckets[p];if(g instanceof a.a6&&g.hasRTLText){this.hasRTLText=!0,Eo().lazyLoad();break}}this.queryPadding=0;for(let p in this.buckets){let g=this.buckets[p];this.queryPadding=Math.max(this.queryPadding,i.style.getLayer(p).queryRadius(g))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new a.a5}unloadVectorData(){for(let t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(t){return this.buckets[t.id]}upload(t){for(let l in this.buckets){let p=this.buckets[l];p.uploadPending()&&p.upload(t)}let i=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Rn(t,this.imageAtlas.image,i.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Rn(t,this.glyphAtlasImage,i.ALPHA),this.glyphAtlasImage=null)}prepare(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)}queryRenderedFeatures(t,i,l,p,g,y,v,C,P,S,L){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:p,cameraQueryGeometry:g,scale:y,tileSize:this.tileSize,pixelPosMatrix:S,transform:C,params:v,queryPadding:this.queryPadding*P,getElevation:L},t,i,l):{}}querySourceFeatures(t,i){let l=this.latestFeatureIndex;if(!l||!l.rawTileData)return;let p=l.loadVTLayers(),g=i&&i.sourceLayer?i.sourceLayer:"",y=p._geojsonTileLayer||p[g];if(!y)return;let v=a.a7(i&&i.filter),{z:C,x:P,y:S}=this.tileID.canonical,L={z:C,x:P,y:S};for(let D=0;D<y.length;D++){let V=y.feature(D);if(v.needGeometry){let Y=a.a8(V,!0);if(!v.filter(new a.C(this.tileID.overscaledZ),Y,this.tileID.canonical))continue}else if(!v.filter(new a.C(this.tileID.overscaledZ),V))continue;let U=l.getId(V,g),Q=new a.a9(V,C,P,S,U);Q.tile=L,t.push(Q)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(t){let i=this.expirationTime;if(t.cacheControl){let l=a.aa(t.cacheControl);l["max-age"]&&(this.expirationTime=Date.now()+1e3*l["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){let l=Date.now(),p=!1;if(this.expirationTime>l)p=!1;else if(i)if(this.expirationTime<i)p=!0;else{let g=this.expirationTime-i;
2g?this.expirationTime=l+Math.max(g,3e4):p=!0}else p=!0;p?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)}setFeatureState(t,i){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(t).length===0)return;let l=this.latestFeatureIndex.loadVTLayers();for(let p in this.buckets){if(!i.style.hasLayer(p))continue;let g=this.buckets[p],y=g.layers[0].sourceLayer||"_geojsonTileLayer",v=l[y],C=t[y];if(!v||!C||Object.keys(C).length===0)continue;g.update(C,v,this.imageAtlas&&this.imageAtlas.patternPositions||{});let P=i&&i.style&&i.style.getLayer(p);P&&(this.queryPadding=Math.max(this.queryPadding,P.queryRadius(g)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<ee.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(t){this.symbolFadeHoldUntil=ee.now()+t}setDependencies(t,i){let l={};for(let p of i)l[p]=!0;this.dependencies[t]=l}hasDependency(t,i){for(let l of t){let p=this.dependencies[l];if(p){for(let g of i)if(p[g])return!0}}return!1}}class Xo{constructor(t,i){this.max=t,this.onRemove=i,this.reset()}reset(){for(let t in this.data)for(let i of this.data[t])i.timeout&&clearTimeout(i.timeout),this.onRemove(i.value);return this.data={},this.order=[],this}add(t,i,l){let p=t.wrapped().key;this.data[p]===void 0&&(this.data[p]=[]);let g={value:i,timeout:void 0};if(l!==void 0&&(g.timeout=setTimeout(()=>{this.remove(t,g)},l)),this.data[p].push(g),this.order.push(p),this.order.length>this.max){let y=this._getAndRemoveByKey(this.order[0]);y&&this.onRemove(y)}return this}has(t){return t.wrapped().key in this.data}getAndRemove(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null}_getAndRemoveByKey(t){let i=this.data[t].shift();return i.timeout&&clearTimeout(i.timeout),this.data[t].length===0&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),i.value}getByKey(t){let i=this.data[t];return i?i[0].value:null}get(t){return this.has(t)?this.data[t.wrapped().key][0].value:null}remove(t,i){if(!this.has(t))return this;let l=t.wrapped().key,p=i===void 0?0:this.data[l].indexOf(i),g=this.data[l][p];return this.data[l].splice(p,1),g.timeout&&clearTimeout(g.timeout),this.data[l].length===0&&delete this.data[l],this.onRemove(g.value),this.order.splice(this.order.indexOf(l),1),this}setMaxSize(t){for(this.max=t;this.order.length>this.max;){let i=this._getAndRemoveByKey(this.order[0]);i&&this.onRemove(i)}return this}filter(t){let i=[];for(let l in this.data)for(let p of this.data[l])t(p.value)||i.push(p);for(let l of i)this.remove(l.value.tileID,l)}}class _r{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(t,i,l){let p=String(i);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][p]=this.stateChanges[t][p]||{},a.e(this.stateChanges[t][p],l),this.deletedStates[t]===null){this.deletedStates[t]={};for(let g in this.state[t])g!==p&&(this.deletedStates[t][g]=null)}else if(this.deletedStates[t]&&this.deletedStates[t][p]===null){this.deletedStates[t][p]={};for(let g in this.state[t][p])l[g]||(this.deletedStates[t][p][g]=null)}else for(let g in l)this.deletedStates[t]&&this.deletedStates[t][p]&&this.deletedStates[t][p][g]===null&&delete this.deletedStates[t][p][g]}removeFeatureState(t,i,l){if(this.deletedStates[t]===null)return;let p=String(i);if(this.deletedStates[t]=this.deletedStates[t]||{},l&&i!==void 0)this.deletedStates[t][p]!==null&&(this.deletedStates[t][p]=this.deletedStates[t][p]||{},this.deletedStates[t][p][l]=null);else if(i!==void 0)if(this.stateChanges[t]&&this.stateChanges[t][p])for(l in this.deletedStates[t][p]={},this.stateChanges[t][p])this.deletedStates[t][p][l]=null;else this.deletedStates[t][p]=null;else this.deletedStates[t]=null}getState(t,i){let l=String(i),p=a.e({},(this.state[t]||{})[l],(this.stateChanges[t]||{})[l]);if(this.deletedStates[t]===null)return{};if(this.deletedStates[t]){let g=this.deletedStates[t][i];if(g===null)return{};for(let y in g)delete p[y]}return p}initializeTileState(t,i){t.setFeatureState(this.state,i)}coalesceChanges(t,i){let l={};for(let p in this.stateChanges){this.state[p]=this.state[p]||{};let g={};for(let y in this.stateChanges[p])this.state[p][y]||(this.state[p][y]={}),a.e(this.state[p][y],this.stateChanges[p][y]),g[y]=this.state[p][y];l[p]=g}for(let p in this.deletedStates){this.state[p]=this.state[p]||{};let g={};
2if(this.deletedStates[p]===null)for(let y in this.state[p])g[y]={},this.state[p][y]={};else for(let y in this.deletedStates[p]){if(this.deletedStates[p][y]===null)this.state[p][y]={};else for(let v of Object.keys(this.deletedStates[p][y]))delete this.state[p][y][v];g[y]=this.state[p][y]}l[p]=l[p]||{},a.e(l[p],g)}if(this.stateChanges={},this.deletedStates={},Object.keys(l).length!==0)for(let p in t)t[p].setFeatureState(l,i)}}let zo=89.25;function Ri(m,t){let i=a.ae(t.lat,-85.051129,a.af);return new a.P(a.U(t.lng)*m,a.S(i)*m)}function Ko(m,t){return new a.$(t.x/m,t.y/m).toLngLat()}function xt(m){return m.cameraToCenterDistance*Math.min(.85*Math.tan(a.ab(90-m.pitch)),Math.tan(a.ab(zo-m.pitch)))}function G(m,t){let i=m.canonical,l=t/a.ac(i.z),p=i.x+Math.pow(2,i.z)*m.wrap,g=a.ad(new Float64Array(16));return a.L(g,g,[p*l,i.y*l,0]),a.M(g,g,[l/a.Z,l/a.Z,1]),g}function Z(m,t,i,l,p){let g=a.$.fromLngLat(m,t),y=p*a.ag(1,m.lat),v=y*Math.cos(a.ab(i)),C=Math.sqrt(y*y-v*v),P=C*Math.sin(a.ab(-l)),S=C*Math.cos(a.ab(-l));return new a.$(g.x+P,g.y+S,g.z+v)}function K(m,t,i){let l=t.intersectsFrustum(m);if(!i)return l;let p=t.intersectsPlane(i);return l===0||p===0?0:l===2&&p===2?2:1}function at(m,t,i){let l=0,p=(i-t)/10;for(let g=0;g<10;g++)l+=p*Math.pow(Math.cos(t+(g+.5)/10*(i-t)),m);return l}function H(m,t){return function(i,l,p,g,y){let v=2*((m-1)/a.ah(Math.cos(a.ab(zo-y))/Math.cos(a.ab(zo)))-1),C=Math.acos(p/g),P=2*at(v-1,0,a.ab(y/2)),S=Math.min(a.ab(zo),C+a.ab(y/2)),L=at(v-1,Math.min(S,C-a.ab(y/2)),S),D=Math.atan(l/p),V=Math.hypot(l,p),U=i;return U+=a.ah(g/V/Math.max(.5,Math.cos(a.ab(y/2)))),U+=v*a.ah(Math.cos(D))/2,U-=a.ah(Math.max(1,L/P/t))/2,U}}let _t=H(9.314,3);function Pt(m,t){let i=(t.roundZoom?Math.round:Math.floor)(m.zoom+a.ah(m.tileSize/t.tileSize));return Math.max(0,i)}function dt(m,t){let i=m.getCameraFrustum(),l=m.getClippingPlane(),p=m.screenPointToMercatorCoordinate(m.getCameraPoint()),g=a.$.fromLngLat(m.center,m.elevation);p.z=g.z+Math.cos(m.pitchInRadians)*m.cameraToCenterDistance/m.worldSize;let y=m.getCoveringTilesDetailsProvider(),v=y.allowVariableZoom(m,t),C=Pt(m,t),P=t.minzoom||0,S=t.maxzoom!==void 0?t.maxzoom:m.maxZoom,L=Math.min(Math.max(0,C),S),D=Math.pow(2,L),V=[D*p.x,D*p.y,0],U=[D*g.x,D*g.y,0],Q=Math.hypot(g.x-p.x,g.y-p.y),Y=Math.abs(g.z-p.z),tt=Math.hypot(Q,Y),nt=pt=>({zoom:0,x:0,y:0,wrap:pt,fullyVisible:!1}),lt=[],ct=[];if(m.renderWorldCopies&&y.allowWorldCopies())for(let pt=1;pt<=3;pt++)lt.push(nt(-pt)),lt.push(nt(pt));for(lt.push(nt(0));lt.length>0;){let pt=lt.pop(),ft=pt.x,ht=pt.y,Ct=pt.fullyVisible,Mt={x:ft,y:ht,z:pt.zoom},Bt=y.getTileAABB(Mt,pt.wrap,m.elevation,t);if(!Ct){let Qt=K(i,Bt,l);if(Qt===0)continue;Ct=Qt===2}let Vt=y.distanceToTile2d(p.x,p.y,Mt,Bt),Dt=C;v&&(Dt=(t.calculateTileZoom||_t)(m.zoom+a.ah(m.tileSize/t.tileSize),Vt,Y,tt,m.fov)),Dt=(t.roundZoom?Math.round:Math.floor)(Dt),Dt=Math.max(0,Dt);let oe=Math.min(Dt,S);if(pt.wrap=y.getWrap(g,Mt,pt.wrap),pt.zoom>=oe){if(pt.zoom<P)continue;let Qt=L-pt.zoom,$t=V[0]-.5-(ft<<Qt),fe=V[1]-.5-(ht<<Qt),Be=t.reparseOverscaled?Math.max(pt.zoom,Dt):pt.zoom;ct.push({tileID:new a.Y(pt.zoom===S?Be:pt.zoom,pt.wrap,pt.zoom,ft,ht),distanceSq:a.ai([U[0]-.5-ft,U[1]-.5-ht]),tileDistanceToCamera:Math.sqrt($t*$t+fe*fe)})}else for(let Qt=0;Qt<4;Qt++)lt.push({zoom:pt.zoom+1,x:(ft<<1)+Qt%2,y:(ht<<1)+(Qt>>1),wrap:pt.wrap,fullyVisible:Ct})}return ct.sort((pt,ft)=>pt.distanceSq-ft.distanceSq).map(pt=>pt.tileID)}class Tt extends a.E{constructor(t,i,l){super(),this.id=t,this.dispatcher=l,this.on("data",p=>this._dataHandler(p)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((p,g,y,v)=>{let C=new(gs(g.type))(p,g,y,v);if(C.id!==p)throw new Error(`Expected Source id to be ${p} instead of ${C.id}`);return C})(t,i,l,this),this._tiles={},this._cache=new Xo(0,p=>this._unloadTile(p)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new _r,this._didEmitContent=!1,this._updated=!1}
2onAdd(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._maxTileCacheZoomLevels=t?t._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(t)}onRemove(t){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(t)}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 t in this._tiles){let i=this._tiles[t];if(i.state!=="loaded"&&i.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(t,i,l){return a._(this,void 0,void 0,function*(){try{yield this._source.loadTile(t),this._tileLoaded(t,i,l)}catch(p){t.state="errored",p.status!==404?this._source.fire(new a.k(p,{tile:t})):this.update(this.transform,this.terrain)}})}_unloadTile(t){this._source.unloadTile&&this._source.unloadTile(t)}_abortTile(t){this._source.abortTile&&this._source.abortTile(t),this._source.fire(new a.l("dataabort",{tile:t,coord:t.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(t){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let i in this._tiles){let l=this._tiles[i];l.upload(t),l.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(t=>t.tileID).sort(At).map(t=>t.key)}getRenderableIds(t){let i=[];for(let l in this._tiles)this._isIdRenderable(l,t)&&i.push(this._tiles[l]);return t?i.sort((l,p)=>{let g=l.tileID,y=p.tileID,v=new a.P(g.canonical.x,g.canonical.y)._rotate(-this.transform.bearingInRadians),C=new a.P(y.canonical.x,y.canonical.y)._rotate(-this.transform.bearingInRadians);return g.overscaledZ-y.overscaledZ||C.y-v.y||C.x-v.x}).map(l=>l.tileID.key):i.map(l=>l.tileID).sort(At).map(l=>l.key)}hasRenderableParent(t){let i=this.findLoadedParent(t,0);return!!i&&this._isIdRenderable(i.tileID.key)}_isIdRenderable(t,i){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(i||!this._tiles[t].holdingForFade())}reload(t){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let i in this._tiles)(t||this._tiles[i].state!=="errored")&&this._reloadTile(i,"reloading")}}_reloadTile(t,i){return a._(this,void 0,void 0,function*(){let l=this._tiles[t];l&&(l.state!=="loading"&&(l.state=i),yield this._loadTile(l,t,i))})}_tileLoaded(t,i,l){t.timeAdded=ee.now(),l==="expired"&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(i,t),this.getSource().type==="raster-dem"&&t.dem&&this._backfillDEM(t),this._state.initializeTileState(t,this.map?this.map.painter:null),t.aborted||this._source.fire(new a.l("data",{dataType:"source",tile:t,coord:t.tileID}))}_backfillDEM(t){let i=this.getRenderableIds();for(let p=0;p<i.length;p++){let g=i[p];if(t.neighboringTiles&&t.neighboringTiles[g]){let y=this.getTileByID(g);l(t,y),l(y,t)}}function l(p,g){p.needsHillshadePrepare=!0,p.needsTerrainPrepare=!0;let y=g.tileID.canonical.x-p.tileID.canonical.x,v=g.tileID.canonical.y-p.tileID.canonical.y,C=Math.pow(2,p.tileID.canonical.z),P=g.tileID.key;y===0&&v===0||Math.abs(v)>1||(Math.abs(y)>1&&(Math.abs(y+C)===1?y+=C:Math.abs(y-C)===1&&(y-=C)),g.dem&&p.dem&&(p.dem.backfillBorder(g.dem,y,v),p.neighboringTiles&&p.neighboringTiles[P]&&(p.neighboringTiles[P].backfilled=!0)))}}getTile(t){return this.getTileByID(t.key)}getTileByID(t){return this._tiles[t]}_retainLoadedChildren(t,i,l,p){for(let g in this._tiles){let y=this._tiles[g];if(p[g]||!y.hasData()||y.tileID.overscaledZ<=i||y.tileID.overscaledZ>l)continue;let v=y.tileID;for(;y&&y.tileID.overscaledZ>i+1;){let P=y.tileID.scaledTo(y.tileID.overscaledZ-1);y=this._tiles[P.key],y&&y.hasData()&&(v=P)}let C=v;for(;C.overscaledZ>i;)if(C=C.scaledTo(C.overscaledZ-1),t[C.key]||t[C.canonical.key]){p[v.key]=v;break}}}findLoadedParent(t,i){if(t.key in this._loadedParentTiles){let l=this._loadedParentTiles[t.key];return l&&l.tileID.overscaledZ>=i?l:null}for(let l=t.overscaledZ-1;l>=i;l--){let p=t.scaledTo(l),g=this._getLoadedTile(p);if(g)return g}}findLoadedSibling(t){return this._getLoadedTile(t)}_getLoadedTile(t){let i=this._tiles[t.key];return i&&i.hasData()?i:this._cache.getByKey(t.wrapped().key)}updateCacheSize(t){let i=Math.ceil(t.width/this._source.tileSize)+1,l=Math.ceil(t.height/this._source.tileSize)+1,p=Math.floor(i*l*(this._maxTileC
2acheZoomLevels===null?a.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),g=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,p):p;this._cache.setMaxSize(g)}handleWrapJump(t){let i=Math.round((t-(this._prevLng===void 0?t:this._prevLng))/360);if(this._prevLng=t,i){let l={};for(let p in this._tiles){let g=this._tiles[p];g.tileID=g.tileID.unwrapTo(g.tileID.wrap+i),l[g.tileID.key]=g}this._tiles=l;for(let p in this._timers)clearTimeout(this._timers[p]),delete this._timers[p];for(let p in this._tiles)this._setTileReloadTimer(p,this._tiles[p])}}_updateCoveredAndRetainedTiles(t,i,l,p,g,y){let v={},C={},P=Object.keys(t),S=ee.now();for(let L of P){let D=t[L],V=this._tiles[L];if(!V||V.fadeEndTime!==0&&V.fadeEndTime<=S)continue;let U=this.findLoadedParent(D,i),Q=this.findLoadedSibling(D),Y=U||Q||null;Y&&(this._addTile(Y.tileID),v[Y.tileID.key]=Y.tileID),C[L]=D}this._retainLoadedChildren(C,p,l,t);for(let L in v)t[L]||(this._coveredTiles[L]=!0,t[L]=v[L]);if(y){let L={},D={};for(let V of g)this._tiles[V.key].hasData()?L[V.key]=V:D[V.key]=V;for(let V in D){let U=D[V].children(this._source.maxzoom);this._tiles[U[0].key]&&this._tiles[U[1].key]&&this._tiles[U[2].key]&&this._tiles[U[3].key]&&(L[U[0].key]=t[U[0].key]=U[0],L[U[1].key]=t[U[1].key]=U[1],L[U[2].key]=t[U[2].key]=U[2],L[U[3].key]=t[U[3].key]=U[3],delete D[V])}for(let V in D){let U=D[V],Q=this.findLoadedParent(U,this._source.minzoom),Y=this.findLoadedSibling(U),tt=Q||Y||null;if(tt){L[tt.tileID.key]=t[tt.tileID.key]=tt.tileID;for(let nt in L)L[nt].isChildOf(tt.tileID)&&delete L[nt]}}for(let V in this._tiles)L[V]||(this._coveredTiles[V]=!0)}}update(t,i){if(!this._sourceLoaded||this._paused)return;let l;this.transform=t,this.terrain=i,this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?l=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(S=>new a.Y(S.canonical.z,S.wrap,S.canonical.z,S.canonical.x,S.canonical.y)):(l=dt(t,{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:i,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(l=l.filter(S=>this._source.hasTile(S)))):l=[];let p=Pt(t,this._source),g=Math.max(p-Tt.maxOverzooming,this._source.minzoom),y=Math.max(p+Tt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let S={};for(let L of l)if(L.canonical.z>this._source.minzoom){let D=L.scaledTo(L.canonical.z-1);S[D.key]=D;let V=L.scaledTo(Math.max(this._source.minzoom,Math.min(L.canonical.z,5)));S[V.key]=V}l=l.concat(Object.values(S))}let v=l.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,v&&this.fire(new a.l("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let C=this._updateRetainedTiles(l,p);vt(this._source.type)&&this._updateCoveredAndRetainedTiles(C,g,y,p,l,i);for(let S in C)this._tiles[S].clearFadeHold();let P=a.aj(this._tiles,C);for(let S of P){let L=this._tiles[S];L.hasSymbolBuckets&&!L.holdingForFade()?L.setHoldDuration(this.map._fadeDuration):L.hasSymbolBuckets&&!L.symbolFadeFinished()||this._removeTile(S)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)}_updateRetainedTiles(t,i){var l;let p={},g={},y=Math.max(i-Tt.maxOverzooming,this._source.minzoom),v=Math.max(i+Tt.maxUnderzooming,this._source.minzoom),C={};for(let P of t){let S=this._addTile(P);p[P.key]=P,S.hasData()||i<this._source.maxzoom&&(C[P.key]=P)}this._retainLoadedChildren(C,i,v,p);for(let P of t){let S=this._tiles[P.key];if(S.hasData())continue;if(i+1>this._source.maxzoom){let D=P.children(this._source.maxzoom)[0],V=this.getTile(D);if(V&&V.hasData()){p[D.key]=D;continue}}else{let D=P.children(this._source.maxzoom);if(p[D[0].key]&&p[D[1].key]&&p[D[2].key]&&p[D[3].key])continue}let L=S.wasRequested();for(let D=P.overscaledZ-1;D>=y;--D){let V=P.scaledTo(D);if(g[V.key])break;if(g[V.key]=!0,S=this.getTile(V),!S&&L&&(S=this._addTile(V)),S){let U=S.hasData();if((U||!(!((l=this.map)===null||l===void 0)&&l.cancelPendingTileRequestsWhileZooming)||L)&&(p[V.key]=V),L=S.wasRequested(),U)break}}}return p}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let t in this._tiles){let i=[],l,p=this._tiles[t].tileID;for(;p.overscaledZ>0;){if(p.key in this._loadedParentTiles){l=this._loadedParentTiles[p.key];break}i.push(p.key);let g=p.scaledTo(p.overscaledZ-1);if(l=this._getLoadedTile(g),l)break;p=g}for(let g of i)this._loadedParentTiles[g]=l}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let t in this._tiles){let i=this._tiles[t].tileID,l=this._getLoadedTile(i);this._loadedSiblingTiles[i.key]=l}}_addTile(t){let i=this._tiles[t.key];if(i)return i;i=this._cache.getAndRemove(t),i&&(this._setTileReloadTimer(t.key,i),i.tileID=t,this._state.initializeTileState(i,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,i)));let l=i;
2return i||(i=new Wr(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(i,t.key,i.state)),i.uses++,this._tiles[t.key]=i,l||this._source.fire(new a.l("dataloading",{tile:i,coord:i.tileID,dataType:"source"})),i}_setTileReloadTimer(t,i){t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);let l=i.getExpiryTimeout();l&&(this._timers[t]=setTimeout(()=>{this._reloadTile(t,"expired"),delete this._timers[t]},l))}_removeTile(t){let i=this._tiles[t];i&&(i.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),i.uses>0||(i.hasData()&&i.state!=="reloading"?this._cache.add(i.tileID,i,i.getExpiryTimeout()):(i.aborted=!0,this._abortTile(i),this._unloadTile(i))))}_dataHandler(t){let i=t.sourceDataType;t.dataType==="source"&&i==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&t.dataType==="source"&&i==="content"&&(this.reload(t.sourceDataChanged),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let t in this._tiles)this._removeTile(t);this._cache.reset()}tilesIn(t,i,l){let p=[],g=this.transform;if(!g)return p;let y=l?g.getCameraQueryGeometry(t):t,v=t.map(U=>g.screenPointToMercatorCoordinate(U,this.terrain)),C=y.map(U=>g.screenPointToMercatorCoordinate(U,this.terrain)),P=this.getIds(),S=1/0,L=1/0,D=-1/0,V=-1/0;for(let U of C)S=Math.min(S,U.x),L=Math.min(L,U.y),D=Math.max(D,U.x),V=Math.max(V,U.y);for(let U=0;U<P.length;U++){let Q=this._tiles[P[U]];if(Q.holdingForFade())continue;let Y=g.getCoveringTilesDetailsProvider().allowWorldCopies()?Q.tileID:Q.tileID.unwrapTo(0),tt=Math.pow(2,g.zoom-Q.tileID.overscaledZ),nt=i*Q.queryPadding*a.Z/Q.tileSize/tt,lt=[Y.getTilePoint(new a.$(S,L)),Y.getTilePoint(new a.$(D,V))];if(lt[0].x-nt<a.Z&&lt[0].y-nt<a.Z&&lt[1].x+nt>=0&&lt[1].y+nt>=0){let ct=v.map(ft=>Y.getTilePoint(ft)),pt=C.map(ft=>Y.getTilePoint(ft));p.push({tile:Q,tileID:Y,queryGeometry:ct,cameraQueryGeometry:pt,scale:tt})}}return p}getVisibleCoordinates(t){let i=this.getRenderableIds(t).map(l=>this._tiles[l].tileID);return this.transform&&this.transform.populateCache(i),i}hasTransition(){if(this._source.hasTransition())return!0;if(vt(this._source.type)){let t=ee.now();for(let i in this._tiles)if(this._tiles[i].fadeEndTime>=t)return!0}return!1}setFeatureState(t,i,l){this._state.updateState(t=t||"_geojsonTileLayer",i,l)}removeFeatureState(t,i,l){this._state.removeFeatureState(t=t||"_geojsonTileLayer",i,l)}getFeatureState(t,i){return this._state.getState(t=t||"_geojsonTileLayer",i)}setDependencies(t,i,l){let p=this._tiles[t];p&&p.setDependencies(i,l)}reloadTilesForDependencies(t,i){for(let l in this._tiles)this._tiles[l].hasDependency(t,i)&&this._reloadTile(l,"reloading");this._cache.filter(l=>!l.hasDependency(t,i))}}function At(m,t){let i=Math.abs(2*m.wrap)-+(m.wrap<0),l=Math.abs(2*t.wrap)-+(t.wrap<0);return m.overscaledZ-t.overscaledZ||l-i||t.canonical.y-m.canonical.y||t.canonical.x-m.canonical.x}function vt(m){return m==="raster"||m==="image"||m==="video"}Tt.maxOverzooming=10,Tt.maxUnderzooming=3;class Gt{constructor(t,i){this.reset(t,i)}reset(t,i){this.points=t||[],this._distances=[0];for(let l=1;l<this.points.length;l++)this._distances[l]=this._distances[l-1]+this.points[l].dist(this.points[l-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(i||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(t){if(this.points.length===1)return this.points[0];t=a.ae(t,0,1);let i=1,l=this._distances[i],p=t*this.paddedLength+this.padding;for(;l<p&&i<this._distances.length;)l=this._distances[++i];let g=i-1,y=this._distances[g],v=l-y,C=v>0?(p-y)/v:0;return this.points[g].mult(1-C).add(this.points[i].mult(C))}}function re(m,t){let i=!0;return m==="always"||m!=="never"&&t!=="never"||(i=!1),i}class ae{constructor(t,i,l){let p=this.boxCells=[],g=this.circleCells=[];this.xCellCount=Math.ceil(t/l),this.yCellCount=Math.ceil(i/l);for(let y=0;y<this.xCellCount*this.yCellCount;y++)p.push([]),g.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=i,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/i,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}
2insert(t,i,l,p,g){this._forEachCell(i,l,p,g,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(i),this.bboxes.push(l),this.bboxes.push(p),this.bboxes.push(g)}insertCircle(t,i,l,p){this._forEachCell(i-p,l-p,i+p,l+p,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(i),this.circles.push(l),this.circles.push(p)}_insertBoxCell(t,i,l,p,g,y){this.boxCells[g].push(y)}_insertCircleCell(t,i,l,p,g,y){this.circleCells[g].push(y)}_query(t,i,l,p,g,y,v){if(l<0||t>this.width||p<0||i>this.height)return[];let C=[];if(t<=0&&i<=0&&this.width<=l&&this.height<=p){if(g)return[{key:null,x1:t,y1:i,x2:l,y2:p}];for(let P=0;P<this.boxKeys.length;P++)C.push({key:this.boxKeys[P],x1:this.bboxes[4*P],y1:this.bboxes[4*P+1],x2:this.bboxes[4*P+2],y2:this.bboxes[4*P+3]});for(let P=0;P<this.circleKeys.length;P++){let S=this.circles[3*P],L=this.circles[3*P+1],D=this.circles[3*P+2];C.push({key:this.circleKeys[P],x1:S-D,y1:L-D,x2:S+D,y2:L+D})}}else this._forEachCell(t,i,l,p,this._queryCell,C,{hitTest:g,overlapMode:y,seenUids:{box:{},circle:{}}},v);return C}query(t,i,l,p){return this._query(t,i,l,p,!1,null)}hitTest(t,i,l,p,g,y){return this._query(t,i,l,p,!0,g,y).length>0}hitTestCircle(t,i,l,p,g){let y=t-l,v=t+l,C=i-l,P=i+l;if(v<0||y>this.width||P<0||C>this.height)return!1;let S=[];return this._forEachCell(y,C,v,P,this._queryCellCircle,S,{hitTest:!0,overlapMode:p,circle:{x:t,y:i,radius:l},seenUids:{box:{},circle:{}}},g),S.length>0}_queryCell(t,i,l,p,g,y,v,C){let{seenUids:P,hitTest:S,overlapMode:L}=v,D=this.boxCells[g];if(D!==null){let U=this.bboxes;for(let Q of D)if(!P.box[Q]){P.box[Q]=!0;let Y=4*Q,tt=this.boxKeys[Q];if(t<=U[Y+2]&&i<=U[Y+3]&&l>=U[Y+0]&&p>=U[Y+1]&&(!C||C(tt))&&(!S||!re(L,tt.overlapMode))&&(y.push({key:tt,x1:U[Y],y1:U[Y+1],x2:U[Y+2],y2:U[Y+3]}),S))return!0}}let V=this.circleCells[g];if(V!==null){let U=this.circles;for(let Q of V)if(!P.circle[Q]){P.circle[Q]=!0;let Y=3*Q,tt=this.circleKeys[Q];if(this._circleAndRectCollide(U[Y],U[Y+1],U[Y+2],t,i,l,p)&&(!C||C(tt))&&(!S||!re(L,tt.overlapMode))){let nt=U[Y],lt=U[Y+1],ct=U[Y+2];if(y.push({key:tt,x1:nt-ct,y1:lt-ct,x2:nt+ct,y2:lt+ct}),S)return!0}}}return!1}_queryCellCircle(t,i,l,p,g,y,v,C){let{circle:P,seenUids:S,overlapMode:L}=v,D=this.boxCells[g];if(D!==null){let U=this.bboxes;for(let Q of D)if(!S.box[Q]){S.box[Q]=!0;let Y=4*Q,tt=this.boxKeys[Q];if(this._circleAndRectCollide(P.x,P.y,P.radius,U[Y+0],U[Y+1],U[Y+2],U[Y+3])&&(!C||C(tt))&&!re(L,tt.overlapMode))return y.push(!0),!0}}let V=this.circleCells[g];if(V!==null){let U=this.circles;for(let Q of V)if(!S.circle[Q]){S.circle[Q]=!0;let Y=3*Q,tt=this.circleKeys[Q];if(this._circlesCollide(U[Y],U[Y+1],U[Y+2],P.x,P.y,P.radius)&&(!C||C(tt))&&!re(L,tt.overlapMode))return y.push(!0),!0}}}_forEachCell(t,i,l,p,g,y,v,C){let P=this._convertToXCellCoord(t),S=this._convertToYCellCoord(i),L=this._convertToXCellCoord(l),D=this._convertToYCellCoord(p);for(let V=P;V<=L;V++)for(let U=S;U<=D;U++)if(g.call(this,t,i,l,p,this.xCellCount*U+V,y,v,C))return}_convertToXCellCoord(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))}_convertToYCellCoord(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))}_circlesCollide(t,i,l,p,g,y){let v=p-t,C=g-i,P=l+y;return P*P>v*v+C*C}_circleAndRectCollide(t,i,l,p,g,y,v){let C=(y-p)/2,P=Math.abs(t-(p+C));if(P>C+l)return!1;let S=(v-g)/2,L=Math.abs(i-(g+S));if(L>S+l)return!1;if(P<=C||L<=S)return!0;let D=P-C,V=L-S;return D*D+V*V<=l*l}}function Pe(m,t,i){let l=a.K();if(!m){let{vecSouth:L,vecEast:D}=Ft(t),V=J();V[0]=D[0],V[1]=D[1],V[2]=L[0],V[3]=L[1],p=V,(S=(y=(g=V)[0])*(P=g[3])-(C=g[2])*(v=g[1]))&&(p[0]=P*(S=1/S),p[1]=-v*S,p[2]=-C*S,p[3]=y*S),l[0]=V[0],l[1]=V[1],l[4]=V[2],l[5]=V[3]}var p,g,y,v,C,P,S;return a.M(l,l,[1/i,1/i,1]),l}function Fe(m,t,i,l){if(m){let p=a.K();if(!t){let{vecSouth:g,vecEast:y}=Ft(i);p[0]=y[0],p[1]=y[1],p[4]=g[0],p[5]=g[1]}return a.M(p,p,[l,l,1]),p}return i.pixelsToClipSpaceMatrix}function Ft(m){let t=Math.cos(m.rollInRadians),i=Math.sin(m.rollInRadians),l=Math.cos(m.pitchInRadians),p=Math.cos(m.bearingInRadians),g=Math.sin(m.bearingInRadians),y=a.ao();y[0]=-p*l*i-g*t,y[1]=-g*l*i+p*t;let v=a.ap(y);v<1e-9?a.aq(y):a.ar(y,y,1/v);let C=a.ao();C[0]=p*l*t-g*i,C[1]=g*l*t+p*i;let P=a.ap(C);return P<1e-9?a.aq(C):a.ar(C,C,1/P),{vecEast:C,vecSouth:y}}function ke(m,t,i,l){let p;l?(p=[m,t,l(m,t),1],a.at(p,p,i)):(p=[m,t,0,1],yn(p,p,i));let g=p[3];return{point:new a.P(p[0]/g,p[1]/g),signedDistanceFromCamera:g,isOccluded:!1}}function Xe(m,t){return .5+m/t*.5}function sn(m,t){return m.x>=-t[0]&&m.x<=t[0]&&m.y>=-t[1]&&m.y<=t[1]}function Ke(m,t,i,l,p,g,y,v,C,P,S,L,D){let V=i?m.textSizeData:m.iconSizeData,U=a.ak(V,t.transform.zoom),Q=[256/t.width*2+1,256/t.height*2+1],Y=i?m.text.dynamicLayoutVertexArray:m.icon.dynamicLayoutVertexArray;Y.clear();let tt=m.lineVertexArray,nt=i?m.text.placedSymbolArray:m.icon.placedSymbolArray,lt=t.transform.width/t.transform.height,ct=!1;for(let pt=0;pt<nt.length;pt++){let ft=nt.get(pt);if(ft.hidden||ft.writingMode===a.al.vertical&&!ct){ai(ft.numGlyphs,Y);continue}ct=!1;let ht=new a.P(ft.anchorX,ft.anchorY),Ct={getElevation:D,pitchedLabelPlaneMatr
2ix:l,lineVertexArray:tt,pitchWithMap:g,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:t.transform,tileAnchorPoint:ht,unwrappedTileID:C,width:P,height:S,translation:L},Mt=fs(ft.anchorX,ft.anchorY,Ct);if(!sn(Mt.point,Q)){ai(ft.numGlyphs,Y);continue}let Bt=Xe(t.transform.cameraToCenterDistance,Mt.signedDistanceFromCamera),Vt=a.am(V,U,ft),Dt=g?Vt*t.transform.getPitchedTextCorrection(ft.anchorX,ft.anchorY,C)/Bt:Vt*Bt,oe=we({projectionContext:Ct,pitchedLabelPlaneMatrixInverse:p,symbol:ft,fontSize:Dt,flip:!1,keepUpright:y,glyphOffsetArray:m.glyphOffsetArray,dynamicLayoutVertexArray:Y,aspectRatio:lt,rotateToLine:v});ct=oe.useVertical,(oe.notEnoughRoom||ct||oe.needsFlipping&&we({projectionContext:Ct,pitchedLabelPlaneMatrixInverse:p,symbol:ft,fontSize:Dt,flip:!0,keepUpright:y,glyphOffsetArray:m.glyphOffsetArray,dynamicLayoutVertexArray:Y,aspectRatio:lt,rotateToLine:v}).notEnoughRoom)&&ai(ft.numGlyphs,Y)}i?m.text.dynamicLayoutVertexBuffer.updateData(Y):m.icon.dynamicLayoutVertexBuffer.updateData(Y)}function jt(m,t,i,l,p,g,y,v){let C=g.glyphStartIndex+g.numGlyphs,P=g.lineStartIndex,S=g.lineStartIndex+g.lineLength,L=t.getoffsetX(g.glyphStartIndex),D=t.getoffsetX(C-1),V=yr(m*L,i,l,p,g.segment,P,S,v,y);if(!V)return null;let U=yr(m*D,i,l,p,g.segment,P,S,v,y);return U?v.projectionCache.anyProjectionOccluded?null:{first:V,last:U}:null}function pe(m,t,i,l){return m===a.al.horizontal&&Math.abs(i.y-t.y)>Math.abs(i.x-t.x)*l?{useVertical:!0}:(m===a.al.vertical?t.y<i.y:t.x>i.x)?{needsFlipping:!0}:null}function we(m){let{projectionContext:t,pitchedLabelPlaneMatrixInverse:i,symbol:l,fontSize:p,flip:g,keepUpright:y,glyphOffsetArray:v,dynamicLayoutVertexArray:C,aspectRatio:P,rotateToLine:S}=m,L=p/24,D=l.lineOffsetX*L,V=l.lineOffsetY*L,U;if(l.numGlyphs>1){let Q=l.glyphStartIndex+l.numGlyphs,Y=l.lineStartIndex,tt=l.lineStartIndex+l.lineLength,nt=jt(L,v,D,V,g,l,S,t);if(!nt)return{notEnoughRoom:!0};let lt=De(nt.first.point.x,nt.first.point.y,t,i),ct=De(nt.last.point.x,nt.last.point.y,t,i);if(y&&!g){let pt=pe(l.writingMode,lt,ct,P);if(pt)return pt}U=[nt.first];for(let pt=l.glyphStartIndex+1;pt<Q-1;pt++)U.push(yr(L*v.getoffsetX(pt),D,V,g,l.segment,Y,tt,t,S));U.push(nt.last)}else{if(y&&!g){let Y=On(t.tileAnchorPoint.x,t.tileAnchorPoint.y,t).point,tt=l.lineStartIndex+l.segment+1,nt=new a.P(t.lineVertexArray.getx(tt),t.lineVertexArray.gety(tt)),lt=On(nt.x,nt.y,t),ct=lt.signedDistanceFromCamera>0?lt.point:zi(t.tileAnchorPoint,nt,Y,1,t),pt=De(Y.x,Y.y,t,i),ft=De(ct.x,ct.y,t,i),ht=pe(l.writingMode,pt,ft,P);if(ht)return ht}let Q=yr(L*v.getoffsetX(l.glyphStartIndex),D,V,g,l.segment,l.lineStartIndex,l.lineStartIndex+l.lineLength,t,S);if(!Q||t.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};U=[Q]}for(let Q of U)a.as(C,Q.point,Q.angle);return{}}function zi(m,t,i,l,p){let g=m.add(m.sub(t)._unit()),y=On(g.x,g.y,p).point,v=i.sub(y);return i.add(v._mult(l/v.mag()))}function Ci(m,t,i){let l=t.projectionCache;if(l.projections[m])return l.projections[m];let p=new a.P(t.lineVertexArray.getx(m),t.lineVertexArray.gety(m)),g=On(p.x,p.y,t);if(g.signedDistanceFromCamera>0)return l.projections[m]=g.point,l.anyProjectionOccluded=l.anyProjectionOccluded||g.isOccluded,g.point;let y=m-i.direction;return zi(i.distanceFromAnchor===0?t.tileAnchorPoint:new a.P(t.lineVertexArray.getx(y),t.lineVertexArray.gety(y)),p,i.previousVertex,i.absOffsetX-i.distanceFromAnchor+1,t)}function On(m,t,i){let l=m+i.translation[0],p=t+i.translation[1],g;return i.pitchWithMap?(g=ke(l,p,i.pitchedLabelPlaneMatrix,i.getElevation),g.isOccluded=!1):(g=i.transform.projectTileCoordinates(l,p,i.unwrappedTileID,i.getElevation),g.point.x=(.5*g.point.x+.5)*i.width,g.point.y=(.5*-g.point.y+.5)*i.height),g}function De(m,t,i,l){if(i.pitchWithMap){let p=[m,t,0,1];return a.at(p,p,l),i.transform.projectTileCoordinates(p[0]/p[3],p[1]/p[3],i.unwrappedTileID,i.getElevation).point}return{x:m/i.width*2-1,y:t/i.height*2-1}}function fs(m,t,i){return i.transform.projectTileCoordinates(m,t,i.unwrappedTileID,i.getElevation)}function Xr(m,t,i){return m._unit()._perp()._mult(t*i)}
2function al(m,t,i,l,p,g,y,v,C){if(v.projectionCache.offsets[m])return v.projectionCache.offsets[m];let P=i.add(t);if(m+C.direction<l||m+C.direction>=p)return v.projectionCache.offsets[m]=P,P;let S=Ci(m+C.direction,v,C),L=Xr(S.sub(i),y,C.direction),D=i.add(L),V=S.add(L);return v.projectionCache.offsets[m]=a.au(g,P,D,V)||P,v.projectionCache.offsets[m]}function yr(m,t,i,l,p,g,y,v,C){let P=l?m-t:m+t,S=P>0?1:-1,L=0;l&&(S*=-1,L=Math.PI),S<0&&(L+=Math.PI);let D,V=S>0?g+p:g+p+1;v.projectionCache.cachedAnchorPoint?D=v.projectionCache.cachedAnchorPoint:(D=On(v.tileAnchorPoint.x,v.tileAnchorPoint.y,v).point,v.projectionCache.cachedAnchorPoint=D);let U,Q,Y=D,tt=D,nt=0,lt=0,ct=Math.abs(P),pt=[],ft;for(;nt+lt<=ct;){if(V+=S,V<g||V>=y)return null;nt+=lt,tt=Y,Q=U;let Mt={absOffsetX:ct,direction:S,distanceFromAnchor:nt,previousVertex:tt};if(Y=Ci(V,v,Mt),i===0)pt.push(tt),ft=Y.sub(tt);else{let Bt,Vt=Y.sub(tt);Bt=Vt.mag()===0?Xr(Ci(V+S,v,Mt).sub(Y),i,S):Xr(Vt,i,S),Q||(Q=tt.add(Bt)),U=al(V,Bt,Y,g,y,Q,i,v,Mt),pt.push(Q),ft=U.sub(Q)}lt=ft.mag()}let ht=ft._mult((ct-nt)/lt)._add(Q||tt),Ct=L+Math.atan2(Y.y-tt.y,Y.x-tt.x);return pt.push(ht),{point:ht,angle:C?Ct:0,path:pt}}let sl=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ai(m,t){for(let i=0;i<m;i++){let l=t.length;t.resize(l+4),t.float32.set(sl,3*l)}}function yn(m,t,i){let l=t[0],p=t[1];return m[0]=i[0]*l+i[4]*p+i[12],m[1]=i[1]*l+i[5]*p+i[13],m[3]=i[3]*l+i[7]*p+i[15],m}let si=100;class _s{constructor(t,i=new ae(t.width+200,t.height+200,25),l=new ae(t.width+200,t.height+200,25)){this.transform=t,this.grid=i,this.ignoredGrid=l,this.pitchFactor=Math.cos(t.pitch*Math.PI/180)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+si,this.screenBottomBoundary=t.height+si,this.gridRightBoundary=t.width+200,this.gridBottomBoundary=t.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(t,i,l,p,g,y,v,C,P,S,L,D){let V=this.projectAndGetPerspectiveRatio(t.anchorPointX+C[0],t.anchorPointY+C[1],g,S,D),U=l*V.perspectiveRatio,Q;if(y||v)Q=this._projectCollisionBox(t,U,p,g,y,v,C,V,S,L,D);else{let ft=V.x+(L?L.x*U:0),ht=V.y+(L?L.y*U:0);Q={allPointsOccluded:!1,box:[ft+t.x1*U,ht+t.y1*U,ft+t.x2*U,ht+t.y2*U]}}let[Y,tt,nt,lt]=Q.box,ct=y?Q.allPointsOccluded:V.isOccluded,pt=ct;return pt||(pt=V.perspectiveRatio<this.perspectiveRatioCutoff),pt||(pt=!this.isInsideGrid(Y,tt,nt,lt)),pt||i!=="always"&&this.grid.hitTest(Y,tt,nt,lt,i,P)?{box:[Y,tt,nt,lt],placeable:!1,offscreen:!1,occluded:ct}:{box:[Y,tt,nt,lt],placeable:!0,offscreen:this.isOffscreen(Y,tt,nt,lt),occluded:ct}}placeCollisionCircles(t,i,l,p,g,y,v,C,P,S,L,D,V,U){let Q=[],Y=new a.P(i.anch
2orX,i.anchorY),tt=this.getPerspectiveRatio(Y.x,Y.y,y,U),nt=(P?g*this.transform.getPitchedTextCorrection(i.anchorX,i.anchorY,y)/tt:g*tt)/a.ay,lt={getElevation:U,pitchedLabelPlaneMatrix:v,lineVertexArray:l,pitchWithMap:P,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:this.transform,tileAnchorPoint:Y,unwrappedTileID:y,width:this.transform.width,height:this.transform.height,translation:V},ct=jt(nt,p,i.lineOffsetX*nt,i.lineOffsetY*nt,!1,i,!1,lt),pt=!1,ft=!1,ht=!0;if(ct){let Ct=.5*L*tt+D,Mt=new a.P(-100,-100),Bt=new a.P(this.screenRightBoundary,this.screenBottomBoundary),Vt=new Gt,Dt=ct.first,oe=ct.last,Qt=[];for(let Be=Dt.path.length-1;Be>=1;Be--)Qt.push(Dt.path[Be]);for(let Be=1;Be<oe.path.length;Be++)Qt.push(oe.path[Be]);let $t=2.5*Ct;if(P){let Be=this.projectPathToScreenSpace(Qt,lt);Qt=Be.some(ze=>ze.signedDistanceFromCamera<=0)?[]:Be.map(ze=>ze.point)}let fe=[];if(Qt.length>0){let Be=Qt[0].clone(),ze=Qt[0].clone();for(let Sn=1;Sn<Qt.length;Sn++)Be.x=Math.min(Be.x,Qt[Sn].x),Be.y=Math.min(Be.y,Qt[Sn].y),ze.x=Math.max(ze.x,Qt[Sn].x),ze.y=Math.max(ze.y,Qt[Sn].y);fe=Be.x>=Mt.x&&ze.x<=Bt.x&&Be.y>=Mt.y&&ze.y<=Bt.y?[Qt]:ze.x<Mt.x||Be.x>
2Bt.x||ze.y<Mt.y||Be.y>Bt.y?[]:a.av([Qt],Mt.x,Mt.y,Bt.x,Bt.y)}for(let Be of fe){Vt.reset(Be,.25*Ct);let ze=0;ze=Vt.length<=.5*Ct?1:Math.ceil(Vt.paddedLength/$t)+1;for(let Sn=0;Sn<ze;Sn++){let ln=Sn/Math.max(ze-1,1),Tn=Vt.lerp(ln),vn=Tn.x+si,dn=Tn.y+si;Q.push(vn,dn,Ct,0);let on=vn-Ct,li=dn-Ct,Jn=vn+Ct,fi=dn+Ct;if(ht=ht&&this.isOffscreen(on,li,Jn,fi),ft=ft||this.isInsideGrid(on,li,Jn,fi),t!=="always"&&this.grid.hitTestCircle(vn,dn,Ct,t,S)&&(pt=!0,!C))return{circles:[],offscreen:!1,collisionDetected:pt}}}}return{circles:!C&&pt||!ft||tt<this.perspectiveRatioCutoff?[]:Q,offscreen:ht,collisionDetected:pt}}projectPathToScreenSpace(t,i){let l=function(p,g){let y=a.K();return a.an(y,g.pitchedLabelPlaneMatrix),p.map(v=>{let C=ke(v.x,v.y,y,g.getElevation),P=g.transform.projectTileCoordinates(C.point.x,C.point.y,g.unwrappedTileID,g.getElevation);return P.point.x=(.5*P.point.x+.5)*g.width,P.point.y=(.5*-P.point.y+.5)*g.height,P})}(t,i);return function(p){let g=0,y=0,v=0,C=0;for(let P=0;P<p.length;P++)p[P].isOccluded?(v=P+1,C=0):(C++,C>y&&(y=C,g=v));return p.slice(g,g+y)}(l)}queryRenderedSymbols(t){if(t.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let i=[],l=1/0,p=1/0,g=-1/0,y=-1/0;for(let S of t){let L=new a.P(S.x+si,S.y+si);l=Math.min(l,L.x),p=Math.min(p,L.y),g=Math.max(g,L.x),y=Math.max(y,L.y),i.push(L)}let v=this.grid.query(l,p,g,y).concat(this.ignoredGrid.query(l,p,g,y)),C={},P={};for(let S of v){let L=S.key;if(C[L.bucketInstanceId]===void 0&&(C[L.bucketInstanceId]={}),C[L.bucketInstanceId][L.featureIndex])continue;let D=[new a.P(S.x1,S.y1),new a.P(S.x2,S.y1),new a.P(S.x2,S.y2),new a.P(S.x1,S.y2)];a.aw(i,D)&&(C[L.bucketInstanceId][L.featureIndex]=!0,P[L.bucketInstanceId]===void 0&&(P[L.bucketInstanceId]=[]),P[L.bucketInstanceId].push(L.featureIndex))}return P}insertCollisionBox(t,i,l,p,g,y){(l?this.ignoredGrid:this.grid).insert({bucketInstanceId:p,featureIndex:g,collisionGroupID:y,overlapMode:i},t[0],t[1],t[2],t[3])}insertCollisionCircles(t,i,l,p,g,y){let v=l?this.ignoredGrid:this.grid,C={bucketInstanceId:p,featureIndex:g,collisionGroupID:y,overlapMode:i};for(let P=0;P<t.length;P+=4)v.insertCircle(C,t[P],t[P+1],t[P+2])}projectAndGetPerspectiveRatio(t,i,l,p,g){if(g){let y;p?(y=[t,i,p(t,i),1],a.at(y,y,g)):(y=[t,i,0,1],yn(y,y,g));let v=y[3];return{x:(y[0]/v+1)/2*this.transform.width+si,y:(-y[1]/v+1)/2*this.transform.height+si,perspectiveRatio:.5+this.transform.cameraToCenterDistance/v*.5,isOccluded:!1,signedDistanceFromCamera:v}}{let y=this.transform.projectTileCoordinates(t,i,l,p);return{x:(y.point.x+1)/2*this.transform.width+si,y:(1-y.point.y)/2*this.transform.height+si,perspectiveRatio:.5+this.transform.cameraToCenterDistance/y.signedDistanceFromCamera*.5,isOccluded:y.isOccluded,signedDistanceFromCamera:y.signedDistanceFromCamera}}}getPerspectiveRatio(t,i,l,p){let g=this.transform.projectTileCoordinates(t,i,l,p);return .5+this.transform.cameraToCenterDistance/g.signedDistanceFromCamera*.5}isOffscreen(t,i,l,p){return l<si||t>=this.screenRightBoundary||p<si||i>this.screenBottomBoundary}isInsideGrid(t,i,l,p){return l>=0&&t<this.gridRightBoundary&&p>=0&&i<this.gridBottomBoundary}getViewportMatrix(){let t=a.ad([]);return a.L(t,t,[-100,-100,0]),t}_projectCollisionBox(t,i,l,p,g,y,v,C,P,S,L){let D=1,V=0,U=0,Q=1,Y=t.anchorPointX+v[0],tt=t.anchorPointY+v[1];if(y&&!g){let Qt=this.projectAndGetPerspectiveRatio(Y+1,tt,p,P,L),$t=Qt.x-C.x,fe=Math.atan((Qt.y-C.y)/$t)+($t<0?Math.PI:0),Be=Math.sin(fe),ze=Math.cos(fe);D=ze,V=Be,U=-Be,Q=ze}else if(!y&&g){let Qt=Ft(this.transform);D=Qt.vecEast[0],V=Qt.vecEast[1],U=Qt.vecSouth[0],Q=Qt.vecSouth[1]}let nt=C.x,lt=C.y,ct=i;g&&(nt=Y,lt=tt,ct=Math.pow(2,-(this.transform.zoom-l.overscaledZ)),ct*=this.transform.getPitchedTextCorrection(Y,tt,p),S||(ct*=a.ae(.5+C.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))),S&&(nt+=D*S.x*ct+U*S.y*ct,lt+=V*S.x*ct+Q*S.y*ct);let pt=t.x1*ct,ft=t.x2*ct,ht=(pt+ft)/2,Ct=t.y1*ct,Mt=t.y2*ct,Bt=(Ct+Mt)/2,Vt=[{offsetX:pt,offsetY:Ct},{offsetX:ht,offsetY:Ct},{offsetX:ft,offsetY:Ct},{offsetX:ft,offsetY:Bt},{offsetX:ft,offsetY:Mt},{offsetX:ht,offsetY:Mt},{offsetX:pt,offsetY:Mt},{offsetX:pt,offsetY:Bt}],Dt=[];for(let{offsetX:Qt,offsetY:$t}
2of Vt)Dt.push(new a.P(nt+D*Qt+U*$t,lt+V*Qt+Q*$t));let oe=!1;if(g){let Qt=Dt.map($t=>this.projectAndGetPerspectiveRatio($t.x,$t.y,p,P,L));oe=Qt.some($t=>!$t.isOccluded),Dt=Qt.map($t=>new a.P($t.x,$t.y))}else oe=!0;return{box:a.ax(Dt),allPointsOccluded:!oe}}}class ll{constructor(t,i,l,p){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?i:-i))):p&&l?1:0,this.placed=l}isHidden(){return this.opacity===0&&!this.placed}}class ho{constructor(t,i,l,p,g){this.text=new ll(t?t.text:null,i,l,g),this.icon=new ll(t?t.icon:null,i,p,g)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Kr{constructor(t,i,l){this.text=t,this.icon=i,this.skipFade=l}}class Kd{constructor(t,i,l,p,g){this.bucketInstanceId=t,this.featureIndex=i,this.sourceLayerIndex=l,this.bucketIndex=p,this.tileID=g}}class Yd{constructor(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}}get(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){let i=++this.maxGroupID;this.collisionGroups[t]={ID:i,predicate:l=>l.collisionGroupID===i}}return this.collisionGroups[t]}}function Mc(m,t,i,l,p){let{horizontalAlign:g,verticalAlign:y}=a.aE(m);return new a.P(-(g-.5)*t+l[0]*p,-(y-.5)*i+l[1]*p)}class wa{constructor(t,i,l,p,g){this.transform=t.clone(),this.terrain=i,this.collisionIndex=new _s(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=l,this.retainedQueryData={},this.collisionGroups=new Yd(p),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=g,g&&(g.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(t){let i=this.terrain;return i?(l,p)=>i.getElevation(t,l,p):null}getBucketParts(t,i,l,p){let g=l.getBucket(i),y=l.latestFeatureIndex;if(!g||!y||i.id!==g.layerIds[0])return;let v=l.collisionBoxArray,C=g.layers[0].layout,P=g.layers[0].paint,S=Math.pow(2,this.transform.zoom-l.tileID.overscaledZ),L=l.tileSize/a.Z,D=l.tileID.toUnwrapped(),V=C.get("text-rotation-alignment")==="map",U=a.az(l,1,this.transform.zoom),Q=a.aA(this.collisionIndex.transform,l,P.get("text-translate"),P.get("text-translate-anchor")),Y=a.aA(this.collisionIndex.transform,l,P.get("icon-translate"),P.get("icon-translate-anchor")),tt=Pe(V,this.transform,U);this.retainedQueryData[g.bucketInstanceId]=new Kd(g.bucketInstanceId,y,g.sourceLayerIndex,g.index,l.tileID);let nt={bucket:g,layout:C,translationText:Q,translationIcon:Y,unwrappedTileID:D,pitchedLabelPlaneMatrix:tt,scale:S,textPixelRatio:L,holdingForFade:l.holdingForFade(),collisionBoxArray:v,partiallyEvaluatedTextSize:a.ak(g.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(g.sourceID)};if(p)for(let lt of g.sortKeyRanges){let{sortKey:ct,symbolInstanceStart:pt,symbolInstanceEnd:ft}=lt;t.push({sortKey:ct,symbolInstanceStart:pt,symbolInstanceEnd:ft,parameters:nt})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:g.symbolInstances.length,parameters:nt})}attemptAnchorPlacement(t,i,l,p,g,y,v,C,P,S,L,D,V,U,Q,Y,tt,nt,lt,ct){let pt=a.aB[t.textAnchor],ft=[t.textOffset0,t.textOffset1],ht=Mc(pt,l,p,ft,g),Ct=this.collisionIndex.placeCollisionBox(i,D,C,P,S,v,y,Y,L.predicate,lt,ht,ct);if((!nt||this.collisionIndex.placeCollisionBox(nt,D,C,P,S,v,y,tt,L.predicate,lt,ht,ct).placeable)&&Ct.placeable){let Mt;if(this.prevPlacement&&this.prevPlacement.variableOffsets[V.crossTileID]&&this.prevPlacement.placements[V.crossTileID]&&this.prevPlacement.placements[V.crossTileID].text&&(Mt=this.prevPlacement.variableOffsets[V.crossTileID].anchor),V.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[V.crossTileID]={textOffset:ft,width:l,height:p,anchor:pt,textBoxScale:g,prevAnchor:Mt},this.markUsedJustification(U,pt,V,Q),U.allowVerticalPlacement&&(this.markUsedOrientation(U,Q,V),this.placedOrientations[V.crossTileID]=Q),{shift:ht,placedGlyphBoxes:Ct}}}placeLayerBucketPart(t,i,l){let{bucket:p,layout:g,translationText:y,translationIcon:v,unwrappedTileID:C,pitchedLabelPlaneMatrix:P,textPixelRatio:S,holdingForFade:L,collisionBoxArray:D,partiallyEvaluatedTextSize:V,collisionGroup:U}=t.parameters,Q=g.get("text-optional"),Y=g.get("icon-optional"),tt=a.aC(g,"text-overlap","text-allow-overlap"),nt=tt==="always",lt=a.aC(g,"icon-overlap","icon-allow-overlap"),ct=lt==="always",pt=g.get("text-rotation-alignment")==="map",ft=g.get("text-pitch-alignment")==="map",ht=g.get("icon-text-fit")!=="none",Ct=g.get("symbol-z-order")==="viewport-y",Mt=nt&&(ct||!p.hasIconData()||Y),Bt=ct&&(nt||!p.hasTextData()||Q);!p.collisionArrays&&D&&p.deserializeCollisionBoxes(D);let Vt=this.retainedQueryData[p.bucketInstanceId].tileID,Dt=this._getTerrainElevationFunc(Vt),oe=this.transform.getFastPathSimpleProjectionMatrix(Vt),Qt=($t,fe,Be)=>
2{var ze,Sn;if(i[$t.crossTileID])return;if(L)return void(this.placements[$t.crossTileID]=new Kr(!1,!1,!1));let ln=!1,Tn=!1,vn=!0,dn=null,on={box:null,placeable:!1,offscreen:null,occluded:!1},li={placeable:!1},Jn=null,fi=null,Pi=null,Vo=0,Pr=0,nr=0;fe.textFeatureIndex?Vo=fe.textFeatureIndex:$t.useRuntimeCollisionCircles&&(Vo=$t.featureIndex),fe.verticalTextFeatureIndex&&(Pr=fe.verticalTextFeatureIndex);let ir=fe.textBox;if(ir){let Qi=kn=>{let bn=a.al.horizontal;if(p.allowVerticalPlacement&&!kn&&this.prevPlacement){let $n=this.prevPlacement.placedOrientations[$t.crossTileID];$n&&(this.placedOrientations[$t.crossTileID]=$n,bn=$n,this.markUsedOrientation(p,bn,$t))}return bn},Or=(kn,bn)=>{if(p.allowVerticalPlacement&&$t.numVerticalGlyphVertices>0&&fe.verticalTextBox){for(let $n of p.writingModes)if($n===a.al.vertical?(on=bn(),li=on):on=kn(),on&&on.placeable)break}else on=kn()},or=$t.textAnchorOffsetStartIndex,rr=$t.textAnchorOffsetEndIndex;if(rr===or){let kn=(bn,$n)=>{let In=this.collisionIndex.placeCollisionBox(bn,tt,S,Vt,C,ft,pt,y,U.predicate,Dt,void 0,oe);return In&&In.placeable&&(this.markUsedOrientation(p,$n,$t),this.placedOrientations[$t.crossTileID]=$n),In};Or(()=>kn(ir,a.al.horizontal),()=>{let bn=fe.verticalTextBox;return p.allowVerticalPlacement&&$t.numVerticalGlyphVertices>0&&bn?kn(bn,a.al.vertical):{box:null,offscreen:null}}),Qi(on&&on.placeable)}else{let kn=a.aB[(Sn=(ze=this.prevPlacement)===null||ze===void 0?void 0:ze.variableOffsets[$t.crossTileID])===null||Sn===void 0?void 0:Sn.anchor],bn=(In,jp,da)=>{let lh=In.x2-In.x1,Up=In.y2-In.y1,Cd=$t.textBoxScale,$p=ht&&lt==="never"?jp:null,Ji=null,Sr=tt==="never"?1:2,wd="never";kn&&Sr++;for(let Gp=0;Gp<Sr;Gp++){for(let Hs=or;Hs<rr;Hs++){let Md=p.textAnchorOffsets.get(Hs);if(kn&&Md.textAnchor!==kn)continue;let Pd=this.attemptAnchorPlacement(Md,In,lh,Up,Cd,pt,ft,S,Vt,C,U,wd,$t,p,da,y,v,$p,Dt);if(Pd&&(Ji=Pd.placedGlyphBoxes,Ji&&Ji.placeable))return ln=!0,dn=Pd.shift,Ji}kn?kn=null:wd=tt}return l&&!Ji&&(Ji={box:this.collisionIndex.placeCollisionBox(ir,"always",S,Vt,C,ft,pt,y,U.predicate,Dt,void 0,oe).box,offscreen:!1,placeable:!1,occluded:!1}),Ji};Or(()=>bn(ir,fe.iconBox,a.al.horizontal),()=>{let In=fe.verticalTextBox;return p.allowVerticalPlacement&&(!on||!on.placeable)&&$t.numVerticalGlyphVertices>0&&In?bn(In,fe.verticalIconBox,a.al.vertical):{box:null,occluded:!0,offscreen:null}}),on&&(ln=on.placeable,vn=on.offscreen);let $n=Qi(on&&on.placeable);if(!ln&&this.prevPlacement){let In=this.prevPlacement.variableOffsets[$t.crossTileID];In&&(this.variableOffsets[$t.crossTileID]=In,this.markUsedJustification(p,In.anchor,$t,$n))}}}if(Jn=on,ln=Jn&&Jn.placeable,vn=Jn&&Jn.offscreen,$t.useRuntimeCollisionCircles){let Qi=p.text.placedSymbolArray.get($t.centerJustifiedTextSymbolIndex),Or=a.am(p.textSizeData,V,Qi),or=g.get("text-padding");fi=this.collisionIndex.placeCollisionCircles(tt,Qi,p.lineVertexArray,p.glyphOffsetArray,Or,C,P,l,ft,U.predicate,$t.collisionCircleDiameter,or,y,Dt),fi.circles.length&&fi.collisionDetected&&!l&&a.w("Collisions detected, but collision boxes are not shown"),ln=nt||fi.circles.length>0&&!fi.collisionDetected,vn=vn&&fi.offscreen}if(fe.iconFeatureIndex&&(nr=fe.iconFeatureIndex),fe.iconBox){let Qi=Or=>this.collisionIndex.placeCollisionBox(Or,lt,S,Vt,C,ft,pt,v,U.predicate,Dt,ht&&dn?dn:void 0,oe);li&&li.placeable&&fe.verticalIconBox?(Pi=Qi(fe.verticalIconBox),Tn=Pi.placeable):(Pi=Qi(fe.iconBox),Tn=Pi.placeable),vn=vn&&Pi.offscreen}let jo=Q||$t.numHorizontalGlyphVertices===0&&$t.numVerticalGlyphVertices===0,la=Y||$t.numIconVertices===0;jo||la?la?jo||(Tn=Tn&&ln):ln=Tn&&ln:Tn=ln=Tn&&ln;let ca=Tn&&Pi.placeable;if(ln&&Jn.placeable&&this.collisionIndex.insertCollisionBox(Jn.box,tt,g.get("text-ignore-placement"),p.bucketInstanceId,li&&li.placeable&&Pr?Pr:Vo,U.ID),ca&&this.collisionIndex.insertCollisionBox(Pi.box,lt,g.get("icon-ignore-placement"),p.bucketInstanceId,nr,U.ID),fi&&ln&&this.collisionIndex.insertCollisionCircles(fi.circles,tt,g.get("text-ignore-placement"),p.bucketInstanceId,Vo,U.ID),l&&this.storeCollisionData(p.bucketInstanceId,Be,fe,Jn,Pi,fi),$t.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(p.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[$t.crossTileID]=new Kr((ln||Mt)&&!Jn?.occluded,(Tn||Bt)&&!Pi?.occluded,vn||p.justReloaded),i[$t.crossTileID]=!0};if(Ct){if(t.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");
2let $t=p.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let fe=$t.length-1;fe>=0;--fe){let Be=$t[fe];Qt(p.symbolInstances.get(Be),p.collisionArrays[Be],Be)}}else for(let $t=t.symbolInstanceStart;$t<t.symbolInstanceEnd;$t++)Qt(p.symbolInstances.get($t),p.collisionArrays[$t],$t);p.justReloaded=!1}storeCollisionData(t,i,l,p,g,y){if(l.textBox||l.iconBox){let v,C;this.collisionBoxArrays.has(t)?v=this.collisionBoxArrays.get(t):(v=new Map,this.collisionBoxArrays.set(t,v)),v.has(i)?C=v.get(i):(C={text:null,icon:null},v.set(i,C)),l.textBox&&(C.text=p.box),l.iconBox&&(C.icon=g.box)}if(y){let v=this.collisionCircleArrays[t];v===void 0&&(v=this.collisionCircleArrays[t]=[]);for(let C=0;C<y.circles.length;C+=4)v.push(y.circles[C+0]-si),v.push(y.circles[C+1]-si),v.push(y.circles[C+2]),v.push(y.collisionDetected?1:0)}}markUsedJustification(t,i,l,p){let g;g=p===a.al.vertical?l.verticalPlacedTextSymbolIndex:{left:l.leftJustifiedTextSymbolIndex,center:l.centerJustifiedTextSymbolIndex,right:l.rightJustifiedTextSymbolIndex}[a.aD(i)];let y=[l.leftJustifiedTextSymbolIndex,l.centerJustifiedTextSymbolIndex,l.rightJustifiedTextSymbolIndex,l.verticalPlacedTextSymbolIndex];for(let v of y)v>=0&&(t.text.placedSymbolArray.get(v).crossTileID=g>=0&&v!==g?0:l.crossTileID)}markUsedOrientation(t,i,l){let p=i===a.al.horizontal||i===a.al.horizontalOnly?i:0,g=i===a.al.vertical?i:0,y=[l.leftJustifiedTextSymbolIndex,l.centerJustifiedTextSymbolIndex,l.rightJustifiedTextSymbolIndex];for(let v of y)t.text.placedSymbolArray.get(v).placedOrientation=p;l.verticalPlacedTextSymbolIndex&&(t.text.placedSymbolArray.get(l.verticalPlacedTextSymbolIndex).placedOrientation=g)}commit(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;let i=this.prevPlacement,l=!1;this.prevZoomAdjustment=i?i.zoomAdjustment(this.transform.zoom):0;let p=i?i.symbolFadeChange(t):1,g=i?i.opacities:{},y=i?i.variableOffsets:{},v=i?i.placedOrientations:{};for(let C in this.placements){let P=this.placements[C],S=g[C];S?(this.opacities[C]=new ho(S,p,P.text,P.icon),l=l||P.text!==S.text.placed||P.icon!==S.icon.placed):(this.opacities[C]=new ho(null,p,P.text,P.icon,P.skipFade),l=l||P.text||P.icon)}for(let C in g){let P=g[C];if(!this.opacities[C]){let S=new ho(P,p,!1,!1);S.isHidden()||(this.opacities[C]=S,l=l||P.text.placed||P.icon.placed)}}for(let C in y)this.variableOffsets[C]||!this.opacities[C]||this.opacities[C].isHidden()||(this.variableOffsets[C]=y[C]);for(let C in v)this.placedOrientations[C]||!this.opacities[C]||this.opacities[C].isHidden()||(this.placedOrientations[C]=v[C]);if(i&&i.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");l?this.lastPlacementChangeTime=t:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=i?i.lastPlacementChangeTime:t)}updateLayerOpacities(t,i){let l={};for(let p of i){let g=p.getBucket(t);g&&p.latestFeatureIndex&&t.id===g.layerIds[0]&&this.updateBucketOpacities(g,p.tileID,l,p.collisionBoxArray)}}updateBucketOpacities(t,i,l,p){t.hasTextData()&&(t.text.opacityVertexArray.clear(),t.text.hasVisibleVertices=!1),t.hasIconData()&&(t.icon.opacityVertexArray.clear(),t.icon.hasVisibleVertices=!1),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexArray.clear(),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexArray.clear();let g=t.layers[0],y=g.layout,v=new ho(null,0,!1,!1,!0),C=y.get("text-allow-overlap"),P=y.get("icon-allow-overlap"),S=g._unevaluatedLayout.hasValue("text-variable-anchor")||g._unevaluatedLayout.hasValue("text-variable-anchor-offset"),L=y.get("text-rotation-alignment")==="map",D=y.get("text-pitch-alignment")==="map",V=y.get("icon-text-fit")!=="none",U=new ho(null,0,C&&(P||!t.hasIconData()||y.get("icon-optional")),P&&(C||!t.hasTextData()||y.get("text-optional")),!0);!t.collisionArrays&&p&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(p);let Q=(tt,nt,lt)=>{for(let ct=0;ct<nt/4;ct++)tt.opacityVertexArray.emplaceBack(lt);tt.hasVisibleVertices=tt.hasVisibleVertices||lt!==Yr},Y=this.collisionBoxArrays.get(t.bucketInstanceId);for(let tt=0;tt<t.symbolInstances.length;tt++){let nt=t.symbolInstances.get(tt),{numHorizontalGlyphVertices:lt,numVerticalGlyphVertices:ct,crossTileID:pt}=nt,ft=this.opacities[pt];l[pt]?ft=v:ft||(ft=U,this.opacities[pt]=ft),l[pt]=!0;let ht=nt.numIconVertices>0,Ct=this.placedOrientations[nt.crossTileID],Mt=Ct===a.al.vertical,Bt=Ct===a.al.horizontal||Ct===a.al.horizontalOnly;if(lt>0||ct>0){let Dt=Tc(ft.text);Q(t.text,lt,Mt?Yr:Dt),Q(t.text,ct,Bt?Yr:Dt);let oe=ft.text.isHidden();[nt.rightJustifiedTextSymbolIndex,nt.centerJustifiedTextSymbolIndex,nt.leftJustifiedTextSymbolIndex].forEac
2h(fe=>{fe>=0&&(t.text.placedSymbolArray.get(fe).hidden=oe||Mt?1:0)}),nt.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(nt.verticalPlacedTextSymbolIndex).hidden=oe||Bt?1:0);let Qt=this.variableOffsets[nt.crossTileID];Qt&&this.markUsedJustification(t,Qt.anchor,nt,Ct);let $t=this.placedOrientations[nt.crossTileID];$t&&(this.markUsedJustification(t,"left",nt,$t),this.markUsedOrientation(t,$t,nt))}if(ht){let Dt=Tc(ft.icon),oe=!(V&&nt.verticalPlacedIconSymbolIndex&&Mt);nt.placedIconSymbolIndex>=0&&(Q(t.icon,nt.numIconVertices,oe?Dt:Yr),t.icon.placedSymbolArray.get(nt.placedIconSymbolIndex).hidden=ft.icon.isHidden()),nt.verticalPlacedIconSymbolIndex>=0&&(Q(t.icon,nt.numVerticalIconVertices,oe?Yr:Dt),t.icon.placedSymbolArray.get(nt.verticalPlacedIconSymbolIndex).hidden=ft.icon.isHidden())}let Vt=Y&&Y.has(tt)?Y.get(tt):{text:null,icon:null};if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){let Dt=t.collisionArrays[tt];if(Dt){let oe=new a.P(0,0);if(Dt.textBox||Dt.verticalTextBox){let Qt=!0;if(S){let $t=this.variableOffsets[pt];$t?(oe=Mc($t.anchor,$t.width,$t.height,$t.textOffset,$t.textBoxScale),L&&oe._rotate(D?-this.transform.bearingInRadians:this.transform.bearingInRadians)):Qt=!1}if(Dt.textBox||Dt.verticalTextBox){let $t;Dt.textBox&&($t=Mt),Dt.verticalTextBox&&($t=Bt),Pc(t.textCollisionBox.collisionVertexArray,ft.text.placed,!Qt||$t,Vt.text,oe.x,oe.y)}}if(Dt.iconBox||Dt.verticalIconBox){let Qt=!!(!Bt&&Dt.verticalIconBox),$t;Dt.iconBox&&($t=Qt),Dt.verticalIconBox&&($t=!Qt),Pc(t.iconCollisionBox.collisionVertexArray,ft.icon.placed,$t,Vt.icon,V?oe.x:0,V?oe.y:0)}}}}if(t.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexBuffer&&t.iconCollisionBox.collisionVertexBuffer.updateData(t.iconCollisionBox.collisionVertexArray),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexBuffer&&t.textCollisionBox.collisionVertexBuffer.updateData(t.textCollisionBox.collisionVertexArray),t.text.opacityVertexArray.length!==t.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${t.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${t.text.layoutVertexArray.length}) / 4`);if(t.icon.opacityVertexArray.length!==t.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${t.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${t.icon.layoutVertexArray.length}) / 4`);t.bucketInstanceId in this.collisionCircleArrays&&(t.collisionCircleArray=this.collisionCircleArrays[t.bucketInstanceId],delete this.collisionCircleArrays[t.bucketInstanceId])}symbolFadeChange(t){return this.fadeDuration===0?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(t){return Math.max(0,(this.transform.zoom-t)/1.5)}hasTransitions(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(t,i){let l=this.zoomAtLastRecencyCheck===i?1-this.zoomAdjustment(i):1;return this.zoomAtLastRecencyCheck=i,this.commitTime+this.fadeDuration*l>t}setStale(){this.stale=!0}}function Pc(m,t,i,l,p,g){l&&l.length!==0||(l=[0,0,0,0]);let y=l[0]-si,v=l[1]-si,C=l[2]-si,P=l[3]-si;m.emplaceBack(t?1:0,i?1:0,p||0,g||0,y,v),m.emplaceBack(t?1:0,i?1:0,p||0,g||0,C,v),m.emplaceBack(t?1:0,i?1:0,p||0,g||0,C,P),m.emplaceBack(t?1:0,i?1:0,p||0,g||0,y,P)}let Vu=Math.pow(2,25),ju=Math.pow(2,24),Uu=Math.pow(2,17),Qd=Math.pow(2,16),Jd=Math.pow(2,9),Oc=Math.pow(2,8),Sc=Math.pow(2,1);function Tc(m){if(m.opacity===0&&!m.placed)return 0;if(m.opacity===1&&m.placed)return 4294967295;let t=m.placed?1:0,i=Math.floor(127*m.opacity);return i*Vu+t*ju+i*Uu+t*Qd+i*Jd+t*Oc+i*Sc+t}let Yr=0;class Ic{constructor(t){this._sortAcrossTiles=t.layout.get("symbol-z-order")!=="viewport-y"&&!t.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(t,i,l,p,g){let y=this._bucketParts;for(;this._currentTileIndex<t.length;)if(i.getBucketParts(y,p,t[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,g())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,y.sort((v,C)=>
2v.sortKey-C.sortKey));this._currentPartIndex<y.length;)if(i.placeLayerBucketPart(y[this._currentPartIndex],this._seenCrossTileIDs,l),this._currentPartIndex++,g())return!0;return!1}}class cl{constructor(t,i,l,p,g,y,v,C){this.placement=new wa(t,i,y,v,C),this._currentPlacementIndex=l.length-1,this._forceFullPlacement=p,this._showCollisionBoxes=g,this._done=!1}isDone(){return this._done}continuePlacement(t,i,l){let p=ee.now(),g=()=>!this._forceFullPlacement&&ee.now()-p>2;for(;this._currentPlacementIndex>=0;){let y=i[t[this._currentPlacementIndex]],v=this.placement.collisionIndex.transform.zoom;if(y.type==="symbol"&&(!y.minzoom||y.minzoom<=v)&&(!y.maxzoom||y.maxzoom>v)){if(this._inProgressLayer||(this._inProgressLayer=new Ic(y)),this._inProgressLayer.continuePlacement(l[y.source],this.placement,this._showCollisionBoxes,y,g))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(t){return this.placement.commit(t),this.placement}}let Ma=512/a.Z/2;class Pa{constructor(t,i,l){this.tileID=t,this.bucketInstanceId=l,this._symbolsByKey={};let p=new Map;for(let g=0;g<i.length;g++){let y=i.get(g),v=y.key,C=p.get(v);C?C.push(y):p.set(v,[y])}for(let[g,y]of p){let v={positions:y.map(C=>({x:Math.floor(C.anchorX*Ma),y:Math.floor(C.anchorY*Ma)})),crossTileIDs:y.map(C=>C.crossTileID)};if(v.positions.length>128){let C=new a.aF(v.positions.length,16,Uint16Array);for(let{x:P,y:S}of v.positions)C.add(P,S);C.finish(),delete v.positions,v.index=C}this._symbolsByKey[g]=v}}getScaledCoordinates(t,i){let{x:l,y:p,z:g}=this.tileID.canonical,{x:y,y:v,z:C}=i.canonical,P=Ma/Math.pow(2,C-g),S=(v*a.Z+t.anchorY)*P,L=p*a.Z*Ma;return{x:Math.floor((y*a.Z+t.anchorX)*P-l*a.Z*Ma),y:Math.floor(S-L)}}findMatches(t,i,l){let p=this.tileID.canonical.z<i.canonical.z?1:Math.pow(2,this.tileID.canonical.z-i.canonical.z);for(let g=0;g<t.length;g++){let y=t.get(g);if(y.crossTileID)continue;let v=this._symbolsByKey[y.key];if(!v)continue;let C=this.getScaledCoordinates(y,i);if(v.index){let P=v.index.range(C.x-p,C.y-p,C.x+p,C.y+p).sort();for(let S of P){let L=v.crossTileIDs[S];if(!l[L]){l[L]=!0,y.crossTileID=L;break}}}else if(v.positions)for(let P=0;P<v.positions.length;P++){let S=v.positions[P],L=v.crossTileIDs[P];if(Math.abs(S.x-C.x)<=p&&Math.abs(S.y-C.y)<=p&&!l[L]){l[L]=!0,y.crossTileID=L;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:t})=>t)}}class tp{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class $u{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(t){let i=Math.round((t-this.lng)/360);if(i!==0)for(let l in this.indexes){let p=this.indexes[l],g={};for(let y in p){let v=p[y];v.tileID=v.tileID.unwrapTo(v.tileID.wrap+i),g[v.tileID.key]=v}this.indexes[l]=g}this.lng=t}addBucket(t,i,l){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===i.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(let g=0;g<i.symbolInstances.length;g++)i.symbolInstances.get(g).crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});let p=this.usedCrossTileIDs[t.overscaledZ];for(let g in this.indexes){let y=this.indexes[g];if(Number(g)>t.overscaledZ)for(let v in y){let C=y[v];C.tileID.isChildOf(t)&&C.findMatches(i.symbolInstances,t,p)}else{let v=y[t.scaledTo(Number(g)).key];v&&v.findMatches(i.symbolInstances,t,p)}}for(let g=0;g<i.symbolInstances.length;g++){let y=i.symbolInstances.get(g);y.crossTileID||(y.crossTileID=l.generate(),p[y.crossTileID]=!0)}return this.indexes[t.overscaledZ]===void 0&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new Pa(t,i.symbolInstances,i.bucketInstanceId),!0}removeBucketCrossTileIDs(t,i){for(let l of i.getCrossTileIDsLists())for(let p of l)delete this.usedCrossTileIDs[t][p]}removeStaleBuckets(t){let i=!1;for(let l in this.indexes){let p=this.indexes[l];for(let g in p)t[p[g].bucketInstanceId]||(this.removeBucketCrossTileIDs(l,p[g]),delete p[g],i=!0)}return i}}class Yo{constructor(){this.layerIndexes={},this.crossTileIDs=new tp,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(t,i,l){let p=this.layerIndexes[t.id];p===void 0&&(p=this.layerIndexes[t.id]=new $u);let g=!1,y={};p.handleWrapJump(l);for(let v of i){let C=v.getBucket(t);C&&t.id===C.layerIds[0]&&(C.bucketInstanceId||(C.bucketInstanceId=++this.maxBucketInstanceId),p.addBucket(v.tileID,C,this.crossTileIDs)&&(g=!0),y[C.bucketInstanceId]=!0)}return p.removeStaleBuckets(y)&&(g=!0),g}pruneUnusedLayers(t){let i={};t.forEach(l=>{i[l]=!0});for(let l in this.layerIndexes)i[l]||delete this.layerIndexes[l]}}var Oa="void main() {fragColor=vec4(1.0);}";let Ne={prelude:qe(`#ifdef GL_ES
3precision mediump float;
4#else
5#if !defined(lowp)
6#define lowp
7#endif
8#if !defined(mediump)
9#define mediump
10#endif
11#if !defined(highp)
12#define highp
13#endif
14#endif
15out highp vec4 fragColor;`,`#ifdef GL_ES
16precision highp float;
17#else
18#if !defined(lowp)
19#define lowp
20#endif
21#if !defined(mediump)
22#define mediump
23#endif
24#if !defined(highp)
25#define highp
26#endif
27#endif
28vec2 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
29);}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);
29return (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
30);}
31#ifdef TERRAIN3D
32uniform 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;
33#endif
34const 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) {
35#ifdef TERRAIN3D
36highp 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));
37#else
38return 1.0;
39#endif
40}float calculate_visibility(vec4 pos) {
41#ifdef TERRAIN3D
42vec3 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;
43#else
44return 1.0;
45#endif
46}float ele(vec2 pos) {
47#ifdef TERRAIN3D
48vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
49#else
50return 0.0;
51#endif
52}float get_elevation(vec2 pos) {
53#ifdef TERRAIN3D
54#ifdef GLOBE
55if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}
56#endif
57vec2 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;
58#else
59return 0.0;
60#endif
61}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:qe("","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:qe("",`#define GLOBE_RADIUS 6371008.8
62uniform 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
63);}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); 
64if (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
65);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:qe(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;
66#ifdef OVERDRAW_INSPECTOR
67fragColor=vec4(1.0);
68#endif
69}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:qe(`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;
69uniform 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;
70#ifdef OVERDRAW_INSPECTOR
71fragColor=vec4(1.0);
72#endif
73}`,"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:qe(`in vec3 v_data;in float v_visibility;
74#pragma mapbox: define highp vec4 color
75#pragma mapbox: define mediump float radius
76#pragma mapbox: define lowp float blur
77#pragma mapbox: define lowp float opacity
78#pragma mapbox: define highp vec4 stroke_color
79#pragma mapbox: define mediump float stroke_width
80#pragma mapbox: define lowp float stroke_opacity
81void main() {
82#pragma mapbox: initialize highp vec4 color
83#pragma mapbox: initialize mediump float radius
84#pragma mapbox: initialize lowp float blur
85#pragma mapbox: initialize lowp float opacity
86#pragma mapbox: initialize highp vec4 stroke_color
87#pragma mapbox: initialize mediump float stroke_width
88#pragma mapbox: initialize lowp float stroke_opacity
89vec2 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;}
90#ifdef OVERDRAW_INSPECTOR
91fragColor=vec4(1.0);
92#endif
93}`,`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;
94#pragma mapbox: define highp vec4 color
95#pragma mapbox: define mediump float radius
96#pragma mapbox: define lowp float blur
97#pragma mapbox: define lowp float opacity
98#pragma mapbox: define highp vec4 stroke_color
99#pragma mapbox: define mediump float stroke_width
100#pragma mapbox: define lowp float stroke_opacity
101void main(void) {
102#pragma mapbox: initialize highp vec4 color
103#pragma mapbox: initialize mediump float radius
104#pragma mapbox: initialize lowp float blur
105#pragma mapbox: initialize lowp float opacity
106#pragma mapbox: initialize highp vec4 stroke_color
107#pragma mapbox: initialize mediump float stroke_width
108#pragma mapbox: initialize lowp float stroke_opacity
109vec2 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) {
110#ifdef GLOBE
111vec3 center_vector=projectToSphere(circle_center);
112#endif
113float 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 {
114#ifdef GLOBE
115vec4 projected_center=interpolateProjection(circle_center,center_vector,ele);
116#else
117vec4 projected_center=projectTileWithElevation(circle_center,ele);
118#endif
119corner_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);}
120#ifdef GLOBE
121vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);
122#else
123gl_Position=projectTileWithElevation(corner_position,ele);
124#endif
125} 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:qe(Oa,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:qe(`uniform highp float u_intensity;in vec2 v_extrude;
126#pragma mapbox: define highp float weight
127#define GAUSS_COEF 0.3989422804014327
128void main() {
129#pragma mapbox: initialize highp float weight
130float 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);
131#ifdef OVERDRAW_INSPECTOR
132fragColor=vec4(1.0);
133#endif
134}`,`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;
135#pragma mapbox: define highp float weight
136#pragma mapbox: define mediump float radius
137const highp float ZERO=1.0/255.0/16.0;
138#define GAUSS_COEF 0.3989422804014327
139void main(void) {
140#pragma mapbox: initialize highp float weight
141#pragma mapbox: initialize mediump float radius
142vec2 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);
143#ifdef GLOBE
144vec2 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);
145#else
146gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));
147#endif
148}`),heatmapTexture:qe(`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;
149#ifdef OVERDRAW_INSPECTOR
150fragColor=vec4(0.0);
151#endif
152}`,"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:qe("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:qe("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);}"),debug:qe("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:qe(Oa,`in vec2 a_pos;void main() {
153#ifdef GLOBE
154gl_Position=projectTileFor3D(a_pos,0.0);
155#else
156gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);
157#endif
158}`),fill:qe(`#pragma mapbox: define highp vec4 color
159#pragma mapbox: define lowp float opacity
160void main() {
161#pragma mapbox: initialize highp vec4 color
162#pragma mapbox: initialize lowp float opacity
163fragColor=color*opacity;
164#ifdef OVERDRAW_INSPECTOR
165fragColor=vec4(1.0);
166#endif
167}`,`uniform vec2 u_fill_translate;in vec2 a_pos;
168#pragma mapbox: define highp vec4 color
169#pragma mapbox: define lowp float opacity
170void main() {
171#pragma mapbox: initialize highp vec4 color
172#pragma mapbox: initialize lowp float opacity
173gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:qe(`in vec2 v_pos;
174#ifdef GLOBE
175in float v_depth;
176#endif
177#pragma mapbox: define highp vec4 outline_color
178#pragma mapbox: define lowp float opacity
179void main() {
180#pragma mapbox: initialize highp vec4 outline_color
181#pragma mapbox: initialize lowp float opacity
182float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);
183#ifdef GLOBE
184if (v_depth > 1.0) {discard;}
185#endif
186#ifdef OVERDRAW_INSPECTOR
187fragColor=vec4(1.0);
188#endif
189}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;
190#ifdef GLOBE
191out float v_depth;
192#endif
193#pragma mapbox: define highp vec4 outline_color
194#pragma mapbox: define lowp float opacity
195void main() {
196#pragma mapbox: initialize highp vec4 outline_color
197#pragma mapbox: initialize lowp float opacity
198gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
199#ifdef GLOBE
200v_depth=gl_Position.z/gl_Position.w;
201#endif
202}`),fillOutlinePattern:qe(`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;
203#ifdef GLOBE
204in float v_depth;
205#endif
206#pragma mapbox: define lowp float opacity
207#pragma mapbox: define lowp vec4 pattern_from
208#pragma mapbox: define lowp vec4 pattern_to
209void main() {
210#pragma mapbox: initialize lowp float opacity
211#pragma mapbox: initialize mediump vec4 pattern_from
212#pragma mapbox: initialize mediump vec4 pattern_to
213vec2 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;
214#ifdef GLOBE
215if (v_depth > 1.0) {discard;}
216#endif
217#ifdef OVERDRAW_INSPECTOR
218fragColor=vec4(1.0);
219#endif
220}`,`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;
221#ifdef GLOBE
222out float v_depth;
223#endif
224#pragma mapbox: define lowp float opacity
225#pragma mapbox: define lowp vec4 pattern_from
226#pragma mapbox: define lowp vec4 pattern_to
227#pragma mapbox: define lowp float pixel_ratio_from
228#pragma mapbox: define lowp float pixel_ratio_to
229void main() {
230#pragma mapbox: initialize lowp float opacity
231#pragma mapbox: initialize mediump vec4 pattern_from
232#pragma mapbox: initialize mediump vec4 pattern_to
233#pragma mapbox: initialize lowp float pixel_ratio_from
234#pragma mapbox: initialize lowp float pixel_ratio_to
235vec2 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;
236#ifdef GLOBE
237v_depth=gl_Position.z/gl_Position.w;
238#endif
239}`),fillPattern:qe(`#ifdef GL_ES
240precision highp float;
241#endif
242uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;
243#pragma mapbox: define lowp float opacity
244#pragma mapbox: define lowp vec4 pattern_from
245#pragma mapbox: define lowp vec4 pattern_to
246void main() {
247#pragma mapbox: initialize lowp float opacity
248#pragma mapbox: initialize mediump vec4 pattern_from
249#pragma mapbox: initialize mediump vec4 pattern_to
250vec2 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;
251#ifdef OVERDRAW_INSPECTOR
252fragColor=vec4(1.0);
253#endif
254}`,`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;
255#pragma mapbox: define lowp float opacity
256#pragma mapbox: define lowp vec4 pattern_from
257#pragma mapbox: define lowp vec4 pattern_to
258#pragma mapbox: define lowp float pixel_ratio_from
259#pragma mapbox: define lowp float pixel_ratio_to
260void main() {
261#pragma mapbox: initialize lowp float opacity
262#pragma mapbox: initialize mediump vec4 pattern_from
263#pragma mapbox: initialize mediump vec4 pattern_to
264#pragma mapbox: initialize lowp float pixel_ratio_from
265#pragma mapbox: initialize lowp float pixel_ratio_to
266vec2 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:qe(`in vec4 v_color;void main() {fragColor=v_color;
267#ifdef OVERDRAW_INSPECTOR
268fragColor=vec4(1.0);
269#endif
270}`,`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;
271#ifdef TERRAIN3D
272in vec2 a_centroid;
273#endif
274out vec4 v_color;
275#pragma mapbox: define highp float base
276#pragma mapbox: define highp float height
277#pragma mapbox: define highp vec4 color
278void main() {
279#pragma mapbox: initialize highp float base
280#pragma mapbox: initialize highp float height
281#pragma mapbox: initialize highp vec4 color
282vec3 normal=a_normal_ed.xyz;
283#ifdef TERRAIN3D
284float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0
284.0 ? 0.0 : 10.0);
285#else
286float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
287#endif
288base=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;
289#ifdef GLOBE
290vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
291#else
292gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
293#endif
294float 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);
295#ifdef GLOBE
296mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);
297#endif
298directional=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:qe(`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;
299#pragma mapbox: define lowp float base
300#pragma mapbox: define lowp float height
301#pragma mapbox: define lowp vec4 pattern_from
302#pragma mapbox: define lowp vec4 pattern_to
303#pragma mapbox: define lowp float pixel_ratio_from
304#pragma mapbox: define lowp float pixel_ratio_to
305void main() {
306#pragma mapbox: initialize lowp float base
307#pragma mapbox: initialize lowp float height
308#pragma mapbox: initialize mediump vec4 pattern_from
309#pragma mapbox: initialize mediump vec4 pattern_to
310#pragma mapbox: initialize lowp float pixel_ratio_from
311#pragma mapbox: initialize lowp float pixel_ratio_to
312vec2 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;
313#ifdef OVERDRAW_INSPECTOR
314fragColor=vec4(1.0);
315#endif
316}`,`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;
317#ifdef TERRAIN3D
318in vec2 a_centroid;
319#endif
320#ifdef GLOBE
321out vec3 v_sphere_pos;
322#endif
323out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;
324#pragma mapbox: define lowp float base
325#pragma mapbox: define lowp float height
326#pragma mapbox: define lowp vec4 pattern_from
327#pragma mapbox: define lowp vec4 pattern_to
328#pragma mapbox: define lowp float pixel_ratio_from
329#pragma mapbox: define lowp float pixel_ratio_to
330void main() {
331#pragma mapbox: initialize lowp float base
332#pragma mapbox: initialize lowp float height
333#pragma mapbox: initialize mediump vec4 pattern_from
334#pragma mapbox: initialize mediump vec4 pattern_to
335#pragma mapbox: initialize lowp float pixel_ratio_from
336#pragma mapbox: initialize lowp float pixel_ratio_to
337vec2 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;
338#ifdef TERRAIN3D
339float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
340#else
341float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
342#endif
343base=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;
344#ifdef GLOBE
345vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
346#else
347gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
348#endif
349vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
350? a_pos
351: 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:qe(`#ifdef GL_ES
352precision highp float;
353#endif
354uniform 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)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;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))/pow(2.0,exaggeration+(19.2562-u_zoom));fragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
355#ifdef OVERDRAW_INSPECTOR
356fragColor=vec4(1.0);
357#endif
358}`,"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:qe(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
359#define PI 3.141592653589793
360void main() {vec4 pixel=texture(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;
360float 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_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;
361#ifdef OVERDRAW_INSPECTOR
362fragColor=vec4(1.0);
363#endif
364}`,"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:qe(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;
365#ifdef GLOBE
366in float v_depth;
367#endif
368#pragma mapbox: define highp vec4 color
369#pragma mapbox: define lowp float blur
370#pragma mapbox: define lowp float opacity
371void main() {
372#pragma mapbox: initialize highp vec4 color
373#pragma mapbox: initialize lowp float blur
374#pragma mapbox: initialize lowp float opacity
375float 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);
376#ifdef GLOBE
377if (v_depth > 1.0) {discard;}
378#endif
379#ifdef OVERDRAW_INSPECTOR
380fragColor=vec4(1.0);
381#endif
382}`,`
383#define scale 0.015873016
384in 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;
385#ifdef GLOBE
386out float v_depth;
387#endif
388#pragma mapbox: define highp vec4 color
389#pragma mapbox: define lowp float blur
390#pragma mapbox: define lowp float opacity
391#pragma mapbox: define mediump float gapwidth
392#pragma mapbox: define lowp float offset
393#pragma mapbox: define mediump float width
394void main() {
395#pragma mapbox: initialize highp vec4 color
396#pragma mapbox: initialize lowp float blur
397#pragma mapbox: initialize lowp float opacity
398#pragma mapbox: initialize mediump float gapwidth
399#pragma mapbox: initialize lowp float offset
400#pragma mapbox: initialize mediump float width
401float 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;
402#ifdef GLOBE
403v_depth=gl_Position.z/gl_Position.w;
404#endif
405#ifdef TERRAIN3D
406v_gamma_scale=1.0;
407#else
408float 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;
409#endif
410v_width2=vec2(outset,inset);}`),lineGradient:qe(`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;
411#ifdef GLOBE
412in float v_depth;
413#endif
414#pragma mapbox: define lowp float blur
415#pragma mapbox: define lowp float opacity
416void main() {
417#pragma mapbox: initialize lowp float blur
418#pragma mapbox: initialize lowp float opacity
419float 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);
420#ifdef GLOBE
421if (v_depth > 1.0) {discard;}
422#endif
423#ifdef OVERDRAW_INSPECTOR
424fragColor=vec4(1.0);
425#endif
426}`,`
427#define scale 0.015873016
428in 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;
429#ifdef GLOBE
430out float v_depth;
431#endif
432#pragma mapbox: define lowp float blur
433#pragma mapbox: define lowp float opacity
434#pragma mapbox: define mediump float gapwidth
435#pragma mapbox: define lowp float offset
436#pragma mapbox: define mediump float width
437void main() {
438#pragma mapbox: initialize lowp float blur
439#pragma mapbox: initialize lowp float opacity
440#pragma mapbox: initialize mediump float gapwidth
441#pragma mapbox: initialize lowp float offset
442#pragma mapbox: initialize mediump float width
443float 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);
443float 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;
444#ifdef GLOBE
445v_depth=gl_Position.z/gl_Position.w;
446#endif
447#ifdef TERRAIN3D
448v_gamma_scale=1.0;
449#else
450float 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;
451#endif
452v_width2=vec2(outset,inset);}`),linePattern:qe(`#ifdef GL_ES
453precision highp float;
454#endif
455uniform 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;
456#ifdef GLOBE
457in float v_depth;
458#endif
459#pragma mapbox: define lowp vec4 pattern_from
460#pragma mapbox: define lowp vec4 pattern_to
461#pragma mapbox: define lowp float pixel_ratio_from
462#pragma mapbox: define lowp float pixel_ratio_to
463#pragma mapbox: define lowp float blur
464#pragma mapbox: define lowp float opacity
465void main() {
466#pragma mapbox: initialize mediump vec4 pattern_from
467#pragma mapbox: initialize mediump vec4 pattern_to
468#pragma mapbox: initialize lowp float pixel_ratio_from
469#pragma mapbox: initialize lowp float pixel_ratio_to
470#pragma mapbox: initialize lowp float blur
471#pragma mapbox: initialize lowp float opacity
472vec2 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;
473#ifdef GLOBE
474if (v_depth > 1.0) {discard;}
475#endif
476#ifdef OVERDRAW_INSPECTOR
477fragColor=vec4(1.0);
478#endif
479}`,`
480#define scale 0.015873016
481#define LINE_DISTANCE_SCALE 2.0
482in 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;
483#ifdef GLOBE
484out float v_depth;
485#endif
486#pragma mapbox: define lowp float blur
487#pragma mapbox: define lowp float opacity
488#pragma mapbox: define lowp float offset
489#pragma mapbox: define mediump float gapwidth
490#pragma mapbox: define mediump float width
491#pragma mapbox: define lowp float floorwidth
492#pragma mapbox: define lowp vec4 pattern_from
493#pragma mapbox: define lowp vec4 pattern_to
494#pragma mapbox: define lowp float pixel_ratio_from
495#pragma mapbox: define lowp float pixel_ratio_to
496void main() {
497#pragma mapbox: initialize lowp float blur
498#pragma mapbox: initialize lowp float opacity
499#pragma mapbox: initialize lowp float offset
500#pragma mapbox: initialize mediump float gapwidth
501#pragma mapbox: initialize mediump float width
502#pragma mapbox: initialize lowp float floorwidth
503#pragma mapbox: initialize mediump vec4 pattern_from
504#pragma mapbox: initialize mediump vec4 pattern_to
505#pragma mapbox: initialize lowp float pixel_ratio_from
506#pragma mapbox: initialize lowp float pixel_ratio_to
507float 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);
507float 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;
508#ifdef GLOBE
509v_depth=gl_Position.z/gl_Position.w;
510#endif
511#ifdef TERRAIN3D
512v_gamma_scale=1.0;
513#else
514float 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;
515#endif
516v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:qe(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;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;
517#ifdef GLOBE
518in float v_depth;
519#endif
520#pragma mapbox: define highp vec4 color
521#pragma mapbox: define lowp float blur
522#pragma mapbox: define lowp float opacity
523#pragma mapbox: define mediump float width
524#pragma mapbox: define lowp float floorwidth
525void main() {
526#pragma mapbox: initialize highp vec4 color
527#pragma mapbox: initialize lowp float blur
528#pragma mapbox: initialize lowp float opacity
529#pragma mapbox: initialize mediump float width
530#pragma mapbox: initialize lowp float floorwidth
531float 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);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);
532#ifdef GLOBE
533if (v_depth > 1.0) {discard;}
534#endif
535#ifdef OVERDRAW_INSPECTOR
536fragColor=vec4(1.0);
537#endif
538}`,`
539#define scale 0.015873016
540#define LINE_DISTANCE_SCALE 2.0
541in 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_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;
542#ifdef GLOBE
543out float v_depth;
544#endif
545#pragma mapbox: define highp vec4 color
546#pragma mapbox: define lowp float blur
547#pragma mapbox: define lowp float opacity
548#pragma mapbox: define mediump float gapwidth
549#pragma mapbox: define lowp float offset
550#pragma mapbox: define mediump float width
551#pragma mapbox: define lowp float floorwidth
552void main() {
553#pragma mapbox: initialize highp vec4 color
554#pragma mapbox: initialize lowp float blur
555#pragma mapbox: initialize lowp float opacity
556#pragma mapbox: initialize mediump float gapwidth
557#pragma mapbox: initialize lowp float offset
558#pragma mapbox: initialize mediump float width
559#pragma mapbox: initialize lowp float floorwidth
560float 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;
561#ifdef GLOBE
562v_depth=gl_Position.z/gl_Position.w;
563#endif
564#ifdef TERRAIN3D
565v_gamma_scale=1.0;
566#else
567float 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;
568#endif
569v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:qe(`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);
570#ifdef OVERDRAW_INSPECTOR
571fragColor=vec4(1.0);
572#endif
573}`,`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;
574#ifdef GLOBE
575if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}
576#endif
577v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:qe(`uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity;
578#pragma mapbox: define lowp float opacity
579void main() {
580#pragma mapbox: initialize lowp float opacity
581lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha;
582#ifdef OVERDRAW_INSPECTOR
583fragColor=vec4(1.0);
584#endif
585}`,`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;
586#pragma mapbox: define lowp float opacity
587void main() {
588#pragma mapbox: initialize lowp float opacity
589vec2 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 ?
590camera_to_anchor_distance/u_camera_to_center_distance :
591u_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;
592#ifdef GLOBE
593if(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);}
594#endif
595vec4 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:qe(`#define SDF_PX 8.0
596uniform 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;
597#pragma mapbox: define highp vec4 fill_color
598#pragma mapbox: define highp vec4 halo_color
599#pragma mapbox: define lowp float opacity
600#pragma mapbox: define lowp float halo_width
601#pragma mapbox: define lowp float halo_blur
602void main() {
603#pragma mapbox: initialize highp vec4 fill_color
604#pragma mapbox: initialize highp vec4 halo_color
605#pragma mapbox: initialize lowp float opacity
606#pragma mapbox: initialize lowp float halo_width
607#pragma mapbox: initialize lowp float halo_blur
608float 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);
609#ifdef OVERDRAW_INSPECTOR
610fragColor=vec4(1.0);
611#endif
612}`,`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;
613#pragma mapbox: define highp vec4 fill_color
614#pragma mapbox: define highp vec4 halo_color
615#pragma mapbox: define lowp float opacity
616#pragma mapbox: define lowp float halo_width
617#pragma mapbox: define lowp float halo_blur
618void main() {
619#pragma mapbox: initialize highp vec4 fill_color
620#pragma mapbox: initialize highp vec4 halo_color
621#pragma mapbox: initialize lowp float opacity
622#pragma mapbox: initialize lowp float halo_width
623#pragma mapbox: initialize lowp float halo_blur
624vec2 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 ?
625camera_to_anchor_distance/u_camera_to_center_distance :
626u_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;
627#ifdef GLOBE
628if(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);}
629#endif
630vec4 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:qe(`#define SDF_PX 8.0
631#define SDF 1.0
632#define ICON 0.0
633uniform 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;
634#pragma mapbox: define highp vec4 fill_color
635#pragma mapbox: define highp vec4 halo_color
636#pragma mapbox: define lowp float opacity
637#pragma mapbox: define lowp float halo_width
638#pragma mapbox: define lowp float halo_blur
639void main() {
640#pragma mapbox: initialize highp vec4 fill_color
641#pragma mapbox: initialize highp vec4 halo_color
642#pragma mapbox: initialize lowp float opacity
643#pragma mapbox: initialize lowp float halo_width
644#pragma mapbox: initialize lowp float halo_blur
645float fad
645e_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;
646#ifdef OVERDRAW_INSPECTOR
647fragColor=vec4(1.0);
648#endif
649return;}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);
650#ifdef OVERDRAW_INSPECTOR
651fragColor=vec4(1.0);
652#endif
653}`,`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;
654#pragma mapbox: define highp vec4 fill_color
655#pragma mapbox: define highp vec4 halo_color
656#pragma mapbox: define lowp float opacity
657#pragma mapbox: define lowp float halo_width
658#pragma mapbox: define lowp float halo_blur
659void main() {
660#pragma mapbox: initialize highp vec4 fill_color
661#pragma mapbox: initialize highp vec4 halo_color
662#pragma mapbox: initialize lowp float opacity
663#pragma mapbox: initialize lowp float halo_width
664#pragma mapbox: initialize lowp float halo_blur
665vec2 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 ?
666camera_to_anchor_distance/u_camera_to_center_distance :
667u_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;
668#ifdef GLOBE
669if(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);}
670#endif
671vec4 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:qe("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);
671float 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:qe("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:qe("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:qe("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:qe(`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
672);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:qe("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);}")};
672function qe(m,t){let i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,l=t.match(/in ([\w]+) ([\w]+)/g),p=m.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),g=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),y=g?g.concat(p):p,v={};return{fragmentSource:m=m.replace(i,(C,P,S,L,D)=>(v[D]=!0,P==="define"?`
673#ifndef HAS_UNIFORM_u_${D}
674in ${S} ${L} ${D};
675#else
676uniform ${S} ${L} u_${D};
677#endif
678`:`
679#ifdef HAS_UNIFORM_u_${D}
680    ${S} ${L} ${D} = u_${D};
681#endif
682`)),vertexSource:t=t.replace(i,(C,P,S,L,D)=>{let V=L==="float"?"vec2":"vec4",U=D.match(/color/)?"color":V;return v[D]?P==="define"?`
683#ifndef HAS_UNIFORM_u_${D}
684uniform lowp float u_${D}_t;
685in ${S} ${V} a_${D};
686out ${S} ${L} ${D};
687#else
688uniform ${S} ${L} u_${D};
689#endif
690`:U==="vec4"?`
691#ifndef HAS_UNIFORM_u_${D}
692    ${D} = a_${D};
693#else
694    ${S} ${L} ${D} = u_${D};
695#endif
696`:`
697#ifndef HAS_UNIFORM_u_${D}
698    ${D} = unpack_mix_${U}(a_${D}, u_${D}_t);
699#else
700    ${S} ${L} ${D} = u_${D};
701#endif
702`:P==="define"?`
703#ifndef HAS_UNIFORM_u_${D}
704uniform lowp float u_${D}_t;
705in ${S} ${V} a_${D};
706#else
707uniform ${S} ${L} u_${D};
708#endif
709`:U==="vec4"?`
710#ifndef HAS_UNIFORM_u_${D}
711    ${S} ${L} ${D} = a_${D};
712#else
713    ${S} ${L} ${D} = u_${D};
714#endif
715`:`
716#ifndef HAS_UNIFORM_u_${D}
717    ${S} ${L} ${D} = unpack_mix_${U}(a_${D}, u_${D}_t);
718#else
719    ${S} ${L} ${D} = u_${D};
720#endif
721`}),staticAttributes:l,staticUniforms:y}}class Sa{constructor(t,i,l){this.vertexBuffer=t,this.indexBuffer=i,this.segments=l}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var Ao=a.aG([{name:"a_pos",type:"Int16",components:2}]);let Bi="#define PROJECTION_MERCATOR",wi="mercator";class Bn{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return wi}get shaderDefine(){return Bi}get shaderPreludeCode(){return Ne.projectionMercator}get vertexShaderPreludeCode(){return Ne.projectionMercator.vertexSource}get subdivisionGranularity(){return a.aH.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(t){}getMeshFromTileID(t,i,l,p,g){if(this._cachedMesh)return this._cachedMesh;let y=new a.aI;y.emplaceBack(0,0),y.emplaceBack(a.Z,0),y.emplaceBack(0,a.Z),y.emplaceBack(a.Z,a.Z);let v=t.createVertexBuffer(y,Ao.members),C=a.aJ.simpleSegment(0,0,4,2),P=new a.aK;P.emplaceBack(1,0,2),P.emplaceBack(1,2,3);let S=t.createIndexBuffer(P);return this._cachedMesh=new Sa(v,S,C),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(t){}}class ys{constructor(t=0,i=0,l=0,p=0){if(isNaN(t)||t<0||isNaN(i)||i<0||isNaN(l)||l<0||isNaN(p)||p<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=i,this.left=l,this.right=p}interpolate(t,i,l){return i.top!=null&&t.top!=null&&(this.top=a.B.number(t.top,i.top,l)),i.bottom!=null&&t.bottom!=null&&(this.bottom=a.B.number(t.bottom,i.bottom,l)),i.left!=null&&t.left!=null&&(this.left=a.B.number(t.left,i.left,l)),i.right!=null&&t.right!=null&&(this.right=a.B.number(t.right,i.right,l)),this}getCenter(t,i){let l=a.ae((this.left+t-this.right)/2,0,t),p=a.ae((this.top+i-this.bottom)/2,0,i);return new a.P(l,p)}equals(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right}clone(){return new ys(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function gi(m,t){if(!m.renderWorldCopies||m.lngRange)return;let i=t.lng-m.center.lng;t.lng+=i>180?-360:i<-180?360:0}function Yi(m){return Math.max(0,Math.floor(m))}class Ai{constructor(t,i,l,p,g,y){this._callbacks=t,this._tileSize=512,this._renderWorldCopies=y===void 0||!!y,this._minZoom=i||0,this._maxZoom=l||22,this._minPitch=p??0,this._maxPitch=g??60,this.setMaxBounds(),this._width=0,this._height=0,this._center=new a.Q(0,0),this._elevation=0,this._zoom=0,this._tileZoom=Yi(this._zoom),this._scale=a.ac(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new ys,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(t,i,l){this._latRange=t.latRange,this._lngRange=t.lngRange,this._width=t.width,this._height=t.height,this._center=t.center,this._elevation=t.elevation,this._minElevationForCurrentTile=t.minElevationForCurrentTile,this._zoom=t.zoom,this._tileZoom=Yi(this._zoom),this._scale=a.ac(this._zoom),this._bearingInRadians=t.bearingInRadians,this._fovInRadians=t.fovInRadians,this._pitchInRadians=t.pitchInRadians,this._rollInRadians=t.rollInRadians,this._unmodified=t.unmodified,this._edgeInsets=new ys(t.padding.top,t.padding.bottom,t.padding.left,t.padding.right),this._minZoom=t.minZoom,this._maxZoom=t.maxZoom,this._minPitch=t.minPitch,this._maxPitch=t.maxPitch,this._renderWorldCopies=t.renderWorldCopies,this._cameraToCenterDistance=t.cameraToCenterDistance,this._nearZ=t.nearZ,this._farZ=t.farZ,this._autoCalculateNearFarZ=!l&&t.autoCalculateNearFarZ,i&&this._constrain(),this._calcMatrices()}
721get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(t){this._minElevationForCurrentTile=t}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(t){this._minZoom!==t&&(this._minZoom=t,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(t){this._maxZoom!==t&&(this._maxZoom=t,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(t){this._minPitch!==t&&(this._minPitch=t,this.setPitch(Math.max(this.pitch,t)))}get maxPitch(){return this._maxPitch}setMaxPitch(t){this._maxPitch!==t&&(this._maxPitch=t,this.setPitch(Math.min(this.pitch,t)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(t){t===void 0?t=!0:t===null&&(t=!1),this._renderWorldCopies=t}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new a.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(t){let i=a.aL(t,-180,180)*Math.PI/180;var l,p,g,y,v,C,P,S,L;this._bearingInRadians!==i&&(this._unmodified=!1,this._bearingInRadians=i,this._calcMatrices(),this._rotationMatrix=J(),l=this._rotationMatrix,g=-this._bearingInRadians,y=(p=this._rotationMatrix)[0],v=p[1],C=p[2],P=p[3],S=Math.sin(g),L=Math.cos(g),l[0]=y*L+C*S,l[1]=v*L+P*S,l[2]=y*-S+C*L,l[3]=v*-S+P*L)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(t){let i=a.ae(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==i&&(this._unmodified=!1,this._pitchInRadians=i,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(t){let i=t/180*Math.PI;this._rollInRadians!==i&&(this._unmodified=!1,this._rollInRadians=i,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return a.aM(this._fovInRadians)}setFov(t){t=a.ae(t,.1,150),this.fov!==t&&(this._unmodified=!1,this._fovInRadians=a.ab(t),this._calcMatrices())}get zoom(){return this._zoom}setZoom(t){let i=this.getConstrained(this._center,t).zoom;this._zoom!==i&&(this._unmodified=!1,this._zoom=i,this._tileZoom=Math.max(0,Math.floor(i)),this._scale=a.ac(i),this._constrain(),this._calcMatrices())}get center(){return this._center}setCenter(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(t){t!==this._elevation&&(this._elevation=t,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,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(t,i){this._autoCalculateNearFarZ=!1,this._nearZ=t,this._farZ=i,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(t){return this._edgeInsets.equals(t)}interpolatePadding(t,i,l){this._unmodified=!1,this._edgeInsets.interpolate(t,i,l),this._constrain(),this._calcMatrices()}resize(t,i,l=!0){this._width=t,this._height=i,l&&this._constrain(),this._calcMatrices()}getMaxBounds(){return this._latRange&&this._latRange.length===2&&this._lngRange&&this._lngRange.length===2?new gn([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]]):null}setMaxBounds(t){t?(this._lngRange=[t.getWest(),t.getEast()],this._latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this._lngRange=null,this._latRange=[-85.051129,a.af])}getConstrained(t,i){return this._callbacks.getConstrained(t,i)}getCameraQueryGeometry(t,i){if(i.length===1)return[i[0],t];{let l=t.x,p=t.y,g=t.x,y=t.y;for(let v of i)l=Math.min(l,v.x),p=Math.min(p,v.y),g=Math.max(g,v.x),y=Math.max(y,v.y);return[new a.P(l,p),new a.P(g,p),new a.P(g,y),new a.P(l,y),new a.P(l,p)]}}_constrain(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let t=this._unmodified,{center:i,zoom:l}=this.getConstrained(this.center,this.zoom);this.setCenter(i),this.setZoom(l),this._unmodified=t,this._constraining=!1}
721_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let t=a.ad(new Float64Array(16));a.M(t,t,[this._width/2,-this._height/2,1]),a.L(t,t,[1,-1,0]),this._clipSpaceToPixelsMatrix=t,t=a.ad(new Float64Array(16)),a.M(t,t,[1,-1,1]),a.L(t,t,[-1,-1,0]),a.M(t,t,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=t,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(t,i,l,p){let g=l!==void 0?l:this.bearing,y=p=p!==void 0?p:this.pitch,v=a.$.fromLngLat(t,i),C=-Math.cos(a.ab(y)),P=Math.sin(a.ab(y)),S=P*Math.sin(a.ab(g)),L=-P*Math.cos(a.ab(g)),D=this.elevation,V=i-D,U;C*V>=0||Math.abs(C)<.1?(U=1e4,D=i+U*C):U=-V/C;let Q,Y,tt=a.aN(1,v.y),nt=0;do{if(nt+=1,nt>10)break;Y=U/tt,Q=new a.$(v.x+S*Y,v.y+L*Y),tt=1/Q.meterInMercatorCoordinateUnits()}while(Math.abs(U-Y*tt)>1e-12);return{center:Q.toLngLat(),elevation:D,zoom:a.ah(this.height/2/Math.tan(this.fovInRadians/2)/Y/this.tileSize)}}recalculateZoomAndCenter(t){if(this.elevation-t==0)return;let i=a.ag(1,this.center.lat)*this.worldSize,l=this.cameraToCenterDistance/i,p=a.$.fromLngLat(this.center,this.elevation),g=Z(this.center,this.elevation,this.pitch,this.bearing,l);this._elevation=t;let y=this.calculateCenterFromCameraLngLatAlt(g.toLngLat(),a.aN(g.z,p.y),this.bearing,this.pitch);this._elevation=y.elevation,this._center=y.center,this.setZoom(y.zoom)}getCameraPoint(){let t=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.P(t*Math.sin(this.rollInRadians),t*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let t=a.ag(1,this.center.lat)*this.worldSize;return Z(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/t).toLngLat()}getMercatorTileCoordinates(t){if(!t)return[0,0,1,1];let i=t.canonical.z>=0?1<<t.canonical.z:Math.pow(2,t.canonical.z);return[t.canonical.x/i,t.canonical.y/i,1/i/a.Z,1/i/a.Z]}}class xr{constructor(t,i){this.min=t,this.max=i,this.center=a.aO([],a.aP([],this.min,this.max),.5)}quadrant(t){let i=[t%2==0,t<2],l=a.aQ(this.min),p=a.aQ(this.max);for(let g=0;g<i.length;g++)l[g]=i[g]?this.min[g]:this.center[g],p[g]=i[g]?this.center[g]:this.max[g];return p[2]=this.max[2],new xr(l,p)}distanceX(t){return Math.max(Math.min(this.max[0],t[0]),this.min[0])-t[0]}distanceY(t){return Math.max(Math.min(this.max[1],t[1]),this.min[1])-t[1]}intersectsFrustum(t){let i=!0;for(let l=0;l<t.planes.length;l++){let p=this.intersectsPlane(t.planes[l]);if(p===0)return 0;p===1&&(i=!1)}return i?2:t.aabb.min[0]>this.max[0]||t.aabb.min[1]>this.max[1]||t.aabb.min[2]>this.max[2]||t.aabb.max[0]<this.min[0]||t.aabb.max[1]<this.min[1]||t.aabb.max[2]<this.min[2]?0:1}intersectsPlane(t){let i=t[3],l=t[3];for(let p=0;p<3;p++)t[p]>0?(i+=t[p]*this.min[p],l+=t[p]*this.max[p]):(l+=t[p]*this.min[p],i+=t[p]*this.max[p]);return i>=0?2:l<0?0:1}}class xs{distanceToTile2d(t,i,l,p){let g=p.distanceX([t,i]),y=p.distanceY([t,i]);return Math.hypot(g,y)}getWrap(t,i,l){return l}getTileAABB(t,i,l,p){var g,y;let v=l,C=l;if(p.terrain){let S=new a.Y(t.z,i,t.z,t.x,t.y),L=p.terrain.getMinMaxElevation(S);v=(g=L.minElevation)!==null&&g!==void 0?g:l,C=(y=L.maxElevation)!==null&&y!==void 0?y:l}let P=1<<t.z;return new xr([i+t.x/P,t.y/P,v],[i+(t.x+1)/P,(t.y+1)/P,C])}allowVariableZoom(t,i){let l=t.fov*(Math.abs(Math.cos(t.rollInRadians))*t.height+Math.abs(Math.sin(t.rollInRadians))*t.width)/t.height,p=a.ae(78.5-l/2,0,60);return!!i.terrain||t.pitch>p}allowWorldCopies(){return!0}recalculateCache(){}}class Nn{constructor(t,i,l){this.points=t,this.planes=i,this.aabb=l}static fromInvProjectionMatrix(t,i=1,l=0){let p=Math.pow(2,l),g=[[-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(P=>{let S=1/(P=a.at([],P,t))[3]/i*p;return a.aR(P,P,[S,S,1/P[3],S])}),y=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(P=>{let S=a.aS([],g[P[0]],g[P[1]]),L=a.aS([],g[P[2]],g[P[1]]),D=a.aT([],a.aU([],S,L)),V=-a.aV(D,g[P[1]]);return D.concat(V)}),v=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],C=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let P of g)for(let S=0;S<3;S++)v[S]=Math.min(v[S],P[S]),C[S]=Math.max(C[S],P[S]);return new Nn(g,y,new xr(v,C))}}
721class Lo{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(t){this._helper.setMinZoom(t)}setMaxZoom(t){this._helper.setMaxZoom(t)}setMinPitch(t){this._helper.setMinPitch(t)}setMaxPitch(t){this._helper.setMaxPitch(t)}setRenderWorldCopies(t){this._helper.setRenderWorldCopies(t)}setBearing(t){this._helper.setBearing(t)}setPitch(t){this._helper.setPitch(t)}setRoll(t){this._helper.setRoll(t)}setFov(t){this._helper.setFov(t)}setZoom(t){this._helper.setZoom(t)}setCenter(t){this._helper.setCenter(t)}setElevation(t){this._helper.setElevation(t)}setMinElevationForCurrentTile(t){this._helper.setMinElevationForCurrentTile(t)}setPadding(t){this._helper.setPadding(t)}interpolatePadding(t,i,l){return this._helper.interpolatePadding(t,i,l)}isPaddingEqual(t){return this._helper.isPaddingEqual(t)}resize(t,i,l=!0){this._helper.resize(t,i,l)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(t){this._helper.setMaxBounds(t)}overrideNearFarZ(t,i){this._helper.overrideNearFarZ(t,i)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(t){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),t)}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(t,i){}constructor(t,i,l,p,g){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this._helper=new Ai({calcMatrices:()=>{this._calcMatrices()},getConstrained:(y,v)=>this.getConstrained(y,v)},t,i,l,p,g),this._coveringTilesDetailsProvider=new xs}clone(){let t=new Lo;return t.apply(this),t}apply(t,i,l){this._helper.apply(t,i,l)}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(t){let i=[new a.aW(0,t)];if(this._helper._renderWorldCopies){let l=this.screenPointToMercatorCoordinate(new a.P(0,0)),p=this.screenPointToMercatorCoordinate(new a.P(this._helper._width,0)),g=this.screenPointToMercatorCoordinate(new a.P(this._helper._width,this._helper._height)),y=this.screenPointToMercatorCoordinate(new a.P(0,this._helper._height)),v=Math.floor(Math.min(l.x,p.x,g.x,y.x)),C=Math.floor(Math.max(l.x,p.x,g.x,y.x)),P=1;for(let S=v-P;S<=C+P;S++)S!==0&&i.push(new a.aW(S,t))}return i}getCameraFrustum(){return Nn.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(t){let i=this.screenPointToLocation(this.centerPoint,t),l=t?t.getElevationForLngLatZoom(i,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(l)}setLocationAtPoint(t,i){let l=a.ag(this.elevation,this.center.lat),p=this.screenPointToMercatorCoordinateAtZ(i,l),g=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,l),y=a.$.fromLngLat(t),v=new a.$(y.x-(p.x-g.x),y.y-(p.y-g.y));this.setCenter(v?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(t,i){return i?this.coordinatePoint(a.$.fromLngLat(t),i.getElevationForLngLatZoom(t,this._helper._tileZoom),this._pixelMatrix3D):this.coordinatePoint(a.$.fromLngLat(t))}screenPointToLocation(t,i){var l;return(l=this.screenPointToMercatorCoordinate(t,i))===null||l===void 0?void 0:l.toLngLat()}screenPointToMercatorCoordinate(t,i){if(i){let l=i.pointCoordinate(t);if(l!=null)return l}return this.screenPointToMercatorCoordinateAtZ(t)}screenPointToMercatorCoordinateAtZ(t,i){let l=i||0,p=[t.x,t.y,0,1],g=[t.x,t.y,1,1];a.at(p,p,this._pixelMatrixInverse),a.at(g,g,this._pixelMatrixInverse);
721let y=p[3],v=g[3],C=p[1]/y,P=g[1]/v,S=p[2]/y,L=g[2]/v,D=S===L?0:(l-S)/(L-S);return new a.$(a.B.number(p[0]/y,g[0]/v,D)/this.worldSize,a.B.number(C,P,D)/this.worldSize,l)}coordinatePoint(t,i=0,l=this._pixelMatrix){let p=[t.x*this.worldSize,t.y*this.worldSize,i,1];return a.at(p,p,l),new a.P(p[0]/p[3],p[1]/p[3])}getBounds(){let t=Math.max(0,this._helper._height/2-xt(this));return new gn().extend(this.screenPointToLocation(new a.P(0,t))).extend(this.screenPointToLocation(new a.P(this._helper._width,t))).extend(this.screenPointToLocation(new a.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new a.P(0,this._helper._height)))}isPointOnMapSurface(t,i){return i?i.pointCoordinate(t)!=null:t.y>this.height/2-xt(this)}calculatePosMatrix(t,i=!1,l){var p;let g=(p=t.key)!==null&&p!==void 0?p:a.aX(t.wrap,t.canonical.z,t.canonical.z,t.canonical.x,t.canonical.y),y=i?this._alignedPosMatrixCache:this._posMatrixCache;if(y.has(g)){let P=y.get(g);return l?P.f32:P.f64}let v=G(t,this.worldSize);a.N(v,i?this._alignedProjMatrix:this._viewProjMatrix,v);let C={f64:v,f32:new Float32Array(v)};return y.set(g,C),l?C.f32:C.f64}calculateFogMatrix(t){let i=t.key,l=this._fogMatrixCacheF32;if(l.has(i))return l.get(i);let p=G(t,this.worldSize);return a.N(p,this._fogMatrix,p),l.set(i,new Float32Array(p)),l.get(i)}getConstrained(t,i){i=a.ae(+i,this.minZoom,this.maxZoom);let l={center:new a.Q(t.lng,t.lat),zoom:i},p=this._helper._lngRange;this._helper._renderWorldCopies||p!==null||(p=[-179.9999999999,180-1e-10]);let g=this.tileSize*a.ac(l.zoom),y=0,v=g,C=0,P=g,S=0,L=0,{x:D,y:V}=this.size;if(this._helper._latRange){let lt=this._helper._latRange;y=a.S(lt[1])*g,v=a.S(lt[0])*g,v-y<V&&(S=V/(v-y))}p&&(C=a.aL(a.U(p[0])*g,0,g),P=a.aL(a.U(p[1])*g,0,g),P<C&&(P+=g),P-C<D&&(L=D/(P-C)));let{x:U,y:Q}=Ri(g,t),Y,tt,nt=Math.max(L||0,S||0);if(nt){let lt=new a.P(L?(P+C)/2:U,S?(v+y)/2:Q);return l.center=Ko(g,lt).wrap(),l.zoom+=a.ah(nt),l}if(this._helper._latRange){let lt=V/2;Q-lt<y&&(tt=y+lt),Q+lt>v&&(tt=v-lt)}if(p){let lt=(C+P)/2,ct=U;
721this._helper._renderWorldCopies&&(ct=a.aL(U,lt-g/2,lt+g/2));let pt=D/2;ct-pt<C&&(Y=C+pt),ct+pt>P&&(Y=P-pt)}if(Y!==void 0||tt!==void 0){let lt=new a.P(Y??U,tt??Q);l.center=Ko(g,lt).wrap()}return l}calculateCenterFromCameraLngLatAlt(t,i,l,p){return this._helper.calculateCenterFromCameraLngLatAlt(t,i,l,p)}_calculateNearFarZIfNeeded(t,i,l){if(!this._helper.autoCalculateNearFarZ)return;let p=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),g=t-p*this._helper._pixelPerMeter/Math.cos(i),y=p<0?g:t,v=Math.PI/2+this.pitchInRadians,C=a.ab(this.fov)*(Math.abs(Math.cos(a.ab(this.roll)))*this.height+Math.abs(Math.sin(a.ab(this.roll)))*this.width)/this.height*(.5+l.y/this.height),P=Math.sin(C)*y/Math.sin(a.ae(Math.PI-v-C,.01,Math.PI-.01)),S=xt(this),L=Math.atan(S/this._helper.cameraToCenterDistance),D=a.ab(.75),V=L>D?2*L*(.5+l.y/(2*S)):D,U=Math.sin(V)*y/Math.sin(a.ae(Math.PI-v-V,.01,Math.PI-.01)),Q=Math.min(P,U);this._helper._farZ=1.01*(Math.cos(Math.PI/2-i)*Q+y),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let t=this.centerOffset,i=Ri(this.worldSize,this.center),l=i.x,p=i.y;this._helper._pixelPerMeter=a.ag(1,this.center.lat)*this.worldSize;let g=a.ab(Math.min(this.pitch,zo)),y=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(g)),v;this._calculateNearFarZIfNeeded(y,g,t),v=new Float64Array(16),a.aY(v,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),a.an(this._invProjMatrix,v),v[8]=2*-t.x/this._helper._width,v[9]=2*t.y/this._helper._height,this._projectionMatrix=a.aZ(v),a.M(v,v,[1,-1,1]),a.L(v,v,[0,0,-this._helper.cameraToCenterDistance]),a.a_(v,v,-this.rollInRadians),a.a$(v,v,this.pitchInRadians),a.a_(v,v,-this.bearingInRadians),a.L(v,v,[-l,-p,0]),this._mercatorMatrix=a.M([],v,[this.worldSize,this.worldSize,this.worldSize]),a.M(v,v,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=a.N(new Float64Array(16),this.clipSpaceToPixelsMatrix,v),a.L(v,v,[0,0,-this.elevation]),this._viewProjMatrix=v,this._invViewProjMatrix=a.an([],v);let C=[0,0,-1,1];a.at(C,C,this._invViewProjMatrix),this._cameraPosition=[C[0]/C[3],C[1]/C[3],C[2]/C[3]],this._fogMatrix=new Float64Array(16),a.aY(this._fogMatrix,this.fovInRadians,this.width/this.height,y,this._helper._farZ),this._fogMatrix[8]=2*-t.x/this.width,this._fogMatrix[9]=2*t.y/this.height,a.M(this._fogMatrix,this._fogMatrix,[1,-1,1]),a.L(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),a.a_(this._fogMatrix,this._fogMatrix,-this.rollInRadians),a.a$(this._fogMatrix,this._fogMatrix,this.pitchInRadians),a.a_(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),a.L(this._fogMatrix,this._fogMatrix,[-l,-p,0]),a.M(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),a.L(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=a.N(new Float64Array(16),this.clipSpaceToPixelsMatrix,v);let P=this._helper._width%2/2,S=this._helper._height%2/2,L=Math.cos(this.bearingInRadians),D=Math.sin(-this.bearingInRadians),V=l-Math.round(l)+L*P+D*S,U=p-Math.round(p)+L*S+D*P,Q=new Float64Array(v);if(a.L(Q,Q,[V>.5?V-1:V,U>.5?U-1:U,0]),this._alignedProjMatrix=Q,v=a.an(new Float64Array(16),this._pixelMatrix),!v)throw new Error("failed to invert matrix");this._pixelMatrixInverse=v,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let t=this.screenPointToMercatorCoordinate(new a.P(0,0)),i=[t.x*this.worldSize,t.y*this.worldSize,0,1];return a.at(i,i,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let t=a.ag(1,this.center.lat)*this.worldSize;return Z(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/t).toLngLat()}lngLatToCameraDepth(t,i){let l=a.$.fromLngLat(t),p=[l.x*this.worldSize,l.y*this.worldSize,i,1];return a.at(p,p,this._viewProjMatrix),p[2]/p[3]}getProjectionData(t){let{overscaledTileID:i,aligned:l,applyTerrainMatrix:p}=t,g=this._helper.getMercatorTileCoordinates(i),y=i?this.calculatePosMatrix(i,l,!0):null,v;return v=i&&i.terrainRttPosMatrix32f&&p?i.terrainRttPosMatrix32f:y||a.b0(),{mainMatrix:v,tileMercatorCoords:g,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:v}}isLocationOccluded(t){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(t,i,l){return 1}transformLightDirection(t){return a.aQ(t)}getRayDirectionFromPixel(t){throw new Error("Not implemented.")}projectTileCoordinates(t,i,l,p){let g=this.calculatePosMatrix(l),y;p?(y=[t,i,p(t,i),1],a.at(y,y,g)):(y=[t,i,0,1],yn(y,y,g));let v=y[3];return{point:new a.P(y[0]/v,y[1]/v),signedDistanceFromCamera:v,isOccluded:!1}}populateCache(t){for(let i of t)this.calculatePosMatrix(i)}getMatrixForModel(t,i){let l=a.$.fromLngLat(t,i),p=l.meterInMercatorCoordinateUnits(),g=a.b1();return a.L(g,g,[l.x,l.y,l.z]),a.a_(g,g,Math.PI),a.a$(g,g,Math.PI/2),a.M(g,g,[-p,p,p]),g}getProjectionDataForCustomLayer(t=!0){let i=new a.Y(0,0,0,0,0),l=this.getProjectionData({overscaledTileID:i,applyGlobeMatrix:t}),p=G(i,this.worldSize);a.N(p,this._viewProjMatrix,p),l.tileMercatorCoords=[0,0,1,1];let g=[a.Z,a.Z,this.worldSize/this._helper.pixelsPerMeter],y=a.b2();return a.M(y,p,g),l.fallbackMatrix=y,l.mainMatrix=y,l}getFastPathSimpleProjectionMatrix(t){return this.calculatePosMatrix(t)}}function vr(){a.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function vs(m){if(m.useSlerp)if(m.k<1){let t=a.b3(m.startEulerAngles.roll,m.startEulerAngles.pitch,m.startEulerAngles.bearing),i=a.b3(m.endEulerAngles.roll,m.endEulerAngles.pitch,m.endEulerAngles.bearing),l=new Float64Array(4);a.b4(l,t,i,m.k);let p=a.b5(l);m.tr.setRoll(p.roll),m.tr.setPitch(p.pitch),m.tr.setBearing(p.bearing)}else m.tr.setRoll(m.endEulerAngles.roll),m.tr.setPitch(m.endEulerAngles.pitch),m.tr.setBearing(m.endEulerAngles.bearing);else m.tr.setRoll(a.B.number(m.startEulerAngles.roll,m.endEulerAngles.roll,m.k)),m.tr.setPitch(a.B.number(m.startEulerAngles.pitch,m.endEulerAngles.pitch,m.k)),m.tr.setBearing(a.B.number(m.startEulerAngles.bearing,m.endEulerAngles.bearing,m.k))}function ro(m,t,i,l,p){let g=p.padding,y=Ri(p.worldSize,i.getNorthWest()),v=Ri(p.worldSize,i.getNorthEast()),C=Ri(p.worldSize,i.getSouthEast()),P=Ri(p.worldSize,i.getSouthWest
721()),S=a.ab(-l),L=y.rotate(S),D=v.rotate(S),V=C.rotate(S),U=P.rotate(S),Q=new a.P(Math.max(L.x,D.x,U.x,V.x),Math.max(L.y,D.y,U.y,V.y)),Y=new a.P(Math.min(L.x,D.x,U.x,V.x),Math.min(L.y,D.y,U.y,V.y)),tt=Q.sub(Y),nt=(p.width-(g.left+g.right+t.left+t.right))/tt.x,lt=(p.height-(g.top+g.bottom+t.top+t.bottom))/tt.y;if(lt<0||nt<0)return void vr();let ct=Math.min(a.ah(p.scale*Math.min(nt,lt)),m.maxZoom),pt=a.P.convert(m.offset),ft=new a.P((t.left-t.right)/2,(t.top-t.bottom)/2).rotate(a.ab(l)),ht=pt.add(ft).mult(p.scale/a.ac(ct));return{center:Ko(p.worldSize,y.add(C).div(2).sub(ht)),zoom:ct,bearing:l}}class bs{get useGlobeControls(){return!1}handlePanInertia(t,i){return{easingOffset:t,easingCenter:i.center}}handleMapControlsRollPitchBearingZoom(t,i){t.bearingDelta&&i.setBearing(i.bearing+t.bearingDelta),t.pitchDelta&&i.setPitch(i.pitch+t.pitchDelta),t.rollDelta&&i.setRoll(i.roll+t.rollDelta),t.zoomDelta&&i.setZoom(i.zoom+t.zoomDelta)}handleMapControlsPan(t,i,l){t.around.distSqr(i.centerPoint)<.01||i.setLocationAtPoint(l,t.around)}cameraForBoxAndBearing(t,i,l,p,g){return ro(t,i,l,p,g)}handleJumpToCenterZoom(t,i){t.zoom!==(i.zoom!==void 0?+i.zoom:t.zoom)&&t.setZoom(+i.zoom),i.center!==void 0&&t.setCenter(a.Q.convert(i.center))}handleEaseTo(t,i){let l=t.zoom,p=t.padding,g={roll:t.roll,pitch:t.pitch,bearing:t.bearing},y={roll:i.roll===void 0?t.roll:i.roll,pitch:i.pitch===void 0?t.pitch:i.pitch,bearing:i.bearing===void 0?t.bearing:i.bearing},v=i.zoom!==void 0,C=!t.isPaddingEqual(i.padding),P=!1,S=v?+i.zoom:t.zoom,L=t.centerPoint.add(i.offsetAsPoint),D=t.screenPointToLocation(L),{center:V,zoom:U}=t.getConstrained(a.Q.convert(i.center||D),S??l);gi(t,V);let Q=Ri(t.worldSize,D),Y=Ri(t.worldSize,V).sub(Q),tt=a.ac(U-l);return P=U!==l,{easeFunc:nt=>{if(P&&t.setZoom(a.B.number(l,U,nt)),a.b6(g,y)||vs({startEulerAngles:g,endEulerAngles:y,tr:t,k:nt,useSlerp:g.roll!=y.roll}),C&&(t.interpolatePadding(p,i.padding,nt),L=t.centerPoint.add(i.offsetAsPoint)),i.around)t.setLocationAtPoint(i.around,i.aroundPoint);else{let lt=a.ac(t.zoom-l),ct=U>l?Math.min(2,tt):Math.max(.5,tt),pt=Math.pow(ct,1-nt),ft=Ko(t.worldSize,Q.add(Y.mult(nt*pt)).mult(lt));t.setLocationAtPoint(t.renderWorldCopies?ft.wrap():ft,L)}},isZooming:P,elevationCenter:V}}handleFlyTo(t,i){let l=i.zoom!==void 0,p=t.zoom,g=t.getConstrained(a.Q.convert(i.center||i.locationAtOffset),l?+i.zoom:p),y=g.center,v=g.zoom;gi(t,y);let C=Ri(t.worldSize,i.locationAtOffset),P=Ri(t.worldSize,y).sub(C),S=P.mag(),L=a.ac(v-p),D;if(i.minZoom!==void 0){let V=Math.min(+i.minZoom,p,v),U=t.getConstrained(y,V).zoom;D=a.ac(U-p)}return{easeFunc:(V,U,Q,Y)=>{t.setZoom(V===1?v:p+a.ah(U));let tt=V===1?y:Ko(t.worldSize,C.add(P.mult(Q)).mult(U));t.setLocationAtPoint(t.renderWorldCopies?tt.wrap():tt,Y)},scaleOfZoom:L,targetCenter:y,scaleOfMinZoom:D,pixelPathLength:S}}}class nn{constructor(t,i,l){this.blendFunction=t,this.blendColor=i,this.mask=l}}nn.Replace=[1,0],nn.disabled=new nn(nn.Replace,a.b7.transparent,[!1,!1,!1,!1]),nn.unblended=new nn(nn.Replace,a.b7.transparent,[!0,!0,!0,!0]),nn.alphaBlended=new nn([1,771],a.b7.transparent,[!0,!0,!0,!0]);let kc=2305;class Qe{constructor(t,i,l){this.enable=t,this.mode=i,this.frontFace=l}}Qe.disabled=new Qe(!1,1029,kc),Qe.backCCW=new Qe(!0,1029,kc),Qe.frontCCW=new Qe(!0,1028,kc);class Re{constructor(t,i,l){this.func=t,this.mask=i,this.range=l}}Re.ReadOnly=!1,Re.ReadWrite=!0,Re.disabled=new Re(519,Re.ReadOnly,[0,1]);let Ta=7680;class We{constructor(t,i,l,p,g,y){this.test=t,this.ref=i,this.mask=l,this.fail=p,this.depthFail=g,this.pass=y}}We.disabled=new We({func:519,mask:0},0,0,Ta,Ta,Ta);let Cs=new WeakMap;function mo(m){var t;if(Cs.has(m))return Cs.get(m);{let i=(t=m.getParameter(m.VERSION))===null||t===void 0?void 0:t.startsWith("WebGL 2.0");return Cs.set(m,i),i}}class Ia{get awaitingQuery(){return!!this._readbackQueue}constructor(t){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=t;let i=t.context,l=i.gl;this._texFormat=l.RGBA,this._texType=l.UNSIGNED_BYTE;let p=new a.aI;p.emplaceBack(-1,-1),p.emplaceBack(2,-1),p.emplaceBack(-1,2);let g=new a.aK;g.emplaceBack(0,1,2),this._fullscreenTriangle=new Sa(i.createVertexBuffer(p,Ao.members),i.createIndexBuffer(g),a.aJ.simpleSegment(0,0,p.length,g.length)),this._resultBuffer=new Uint8Array(4),i.activeTexture.set(l.TEXTURE1);let y=l.createTexture();l.bindTexture(l.TEXTURE_2D,y),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,l.NEAREST),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,l.NEAREST),l.texImage2D(l.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=i.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(y),mo(l)&&(this._pbo=l.createBuffer(),l.bindBuffer(l.PIXEL_PACK_BUFFER,this._pbo),l.bufferData(l.PIXEL_PACK_BUFFER,4,l.STREAM_READ),l.bindBuffer(l.PIXEL_PACK_BUFFER,null))}destroy(){let t=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),t.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(t,i){let l=this._updateCount;return this._readbackQueue?l>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():l>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(t,i),this._updateCount++,this._measuredError}_bindFramebuffer(){let t=this._cachedRenderContext.context,i=t.gl;t.activeTexture.set(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,this._fbo.colorAttachment.get()),t.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(t,i){let l=this._cachedRenderContext.context,p=l.gl;if(this._bindFramebuffer(),l.viewport.set([0,0,this._texWidth,this._texHeight]),l.clear({color:a.b7.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(l,p.TRIANGLES,Re.disabled,We.disabled,nn.unblended,Qe.disabled,((g,y)=>
721({u_input:g,u_output_expected:y}))(t,i),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&mo(p)){p.bindBuffer(p.PIXEL_PACK_BUFFER,this._pbo),p.readBuffer(p.COLOR_ATTACHMENT0),p.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),p.bindBuffer(p.PIXEL_PACK_BUFFER,null);let g=p.fenceSync(p.SYNC_GPU_COMMANDS_COMPLETE,0);p.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:g}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let t=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&mo(t)){let i=t.clientWaitSync(this._readbackQueue.sync,0,0);if(i===t.WAIT_FAILED)return a.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(i===t.TIMEOUT_EXPIRED)return;t.bindBuffer(t.PIXEL_PACK_BUFFER,this._pbo),t.getBufferSubData(t.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),t.bindBuffer(t.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),t.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=Ia._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(t){let i=0;return i+=t[0]/256,i+=t[1]/65536,i+=t[2]/16777216,t[3]<127&&(i=-i),i/128}}let dl=a.Z/128;function pl(m,t){let i=m.granularity!==void 0?Math.max(m.granularity,1):1,l=i+(m.generateBorders?2:0),p=i+(m.extendToNorthPole||m.generateBorders?1:0)+(m.extendToSouthPole||m.generateBorders?1:0),g=l+1,y=p+1,v=m.generateBorders?-1:0,C=m.generateBorders||m.extendToNorthPole?-1:0,P=i+(m.generateBorders?1:0),S=i+(m.generateBorders||m.extendToSouthPole?1:0),L=g*y,D=l*p*6,V=g*y>65536;if(V&&t==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let U=V||t==="32bit",Q=new Int16Array(2*L),Y=0;for(let lt=C;lt<=S;lt++)for(let ct=v;ct<=P;ct++){let pt=ct/i*a.Z;ct===-1&&(pt=-64),ct===i+1&&(pt=a.Z+dl);let ft=lt/i*a.Z;lt===-1&&(ft=m.extendToNorthPole?a.b9:-64),lt===i+1&&(ft=m.extendToSouthPole?a.ba:a.Z+dl),Q[Y++]=pt,Q[Y++]=ft}let tt=U?new Uint32Array(D):new Uint16Array(D),nt=0;for(let lt=0;lt<p;lt++)for(let ct=0;ct<l;ct++){let pt=ct+1+lt*g,ft=ct+(lt+1)*g,ht=ct+1+(lt+1)*g;tt[nt++]=ct+lt*g,tt[nt++]=ft,tt[nt++]=pt,tt[nt++]=pt,tt[nt++]=ft,tt[nt++]=ht}return{vertices:Q.buffer.slice(0),indices:tt.buffer.slice(0),uses32bitIndices:U}}let ka=new a.aH({fill:new a.bb(128,2),line:new a.bb(512,0),tile:new a.bb(128,32),stencil:new a.bb(128,1),circle:3});class ws{constructor(){this._tileMeshCache={},this._errorCorrectionUsable=0,this._errorMeasurementLastValue=0,this._errorCorrectionPreviousValue=0,this._errorMeasurementLastChangeTime=-1e3}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return Ne.projectionGlobe}get vertexShaderPreludeCode(){return Ne.projectionMercator.vertexSource}get subdivisionGranularity(){return ka}get useGlobeControls(){return!0}get latitudeErrorCorrectionRadians(){return this._errorCorrectionUsable}destroy(){this._errorMeasurement&&this._errorMeasurement.destroy()}updateGPUdependent(t){this._errorMeasurement||(this._errorMeasurement=new Ia(t));let i=a.S(this._errorQueryLatitudeDegrees),l=2*Math.atan(Math.exp(Math.PI-i*Math.PI*2))-.5*Math.PI,p=this._errorMeasurement.updateErrorLoop(i,l),g=ee.now();p!==this._errorMeasurementLastValue&&(this._errorCorrectionPreviousValue=this._errorCorrectionUsable,this._errorMeasurementLastValue=p,this._errorMeasurementLastChangeTime=g);let y=Math.min(Math.max((g-this._errorMeasurementLastChangeTime)/1e3/.5,0),1);this._errorCorrectionUsable=a.bc(this._errorCorrectionPreviousValue,-this._errorMeasurementLastValue,a.bd(y))}_getMeshKey(t){return`${t.granularity.toString(36)}_${t.generateBorders?"b":""}${t.extendToNorthPole?"n":""}${t.extendToSouthPole?"s":""}`}getMeshFromTileID(t,i,l,p,g){let y=(g==="stencil"?ka.stencil:ka.tile).getGranularityForZoomLevel(i.z);return this._getMesh(t,{granularity:y,generateBorders:l,extendToNorthPole:i.y===0&&p,extendToSouthPole:i.y===(1<<i.z)-1&&p})}_getMesh(t,i){let l=this._getMeshKey(i);if(l in this._tileMeshCache)return this._tileMeshCache[l];let p=function(g,y){let v=pl(y,"16bit"),C=a.aI.deserialize({arrayBuffer:v.vertices,length:v.vertices.byteLength/2/2}),P=a.aK.deserialize({arrayBuffer:v.indices,length:v.indices.byteLength/2/3});return new Sa(g.createVertexBuffer(C,Ao.members),g.createIndexBuffer(P),a.aJ.simpleSegment(0,0,C.length,P.length))}(t,i);return this._tileMeshCache[l]=p,p}recalculate(t){}hasTransition(){let t=ee.now(),i=!1;return i=i||(t-this._errorMeasurementLastChangeTime)/1e3<.7,i=i||this._errorMeasurement&&this._errorMeasurement.awaitingQuery,i}setErrorQueryLatitudeDegrees(t){this._errorQueryLatitudeDegrees=t}}let Ms=new a.r({type:new a.D(a.v.projection.type)});class ep extends a.E{constructor(t){super(),this._transitionable=new a.T(Ms),this.setProjection(t),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new a.C(0)),this._mercatorProjection=new Bn,this._verticalPerspectiveProjection=new ws}get transitionState(){let t=this.properties.get("type");if(typeof t=="string"&&t==="mercator")return 0;if(typeof t=="string"&&t==="vertical-perspective")return 1;if(t instanceof a.be){if(t.from==="vertical-perspective"&&t.to==="mercator")return 1-t.transition;if(t.from==="mercator"&&t.to==="vertical-perspective")return t.transition}return 1}get useGlobeRendering(){return this.transitionState>0}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(t){this._mercatorProjection.updateGPUdependent(t),this._verticalPerspectiveProjection.updateGPUdependent(t)}getMeshFromTileID(t,i,l,p,g){return this.currentProjection.getMeshFromTileID(t,i,l,p,g)}setProjection(t){this._transitionable.setValue("type",t?.type||"mercator")}updateTransitions(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(t){this.properties=this._transitioning.possiblyEvaluate(t)}setErrorQueryLatitudeDegrees(t){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(t),this._mercatorProjection.setErrorQueryLatitudeDegrees(t)}}function ul(m){let t=hl(m.worldSize,m.center.lat);return 2*Math.PI*t}function Ea(m,t,i,l,p){let g=1/(1<<p),y=t/a.Z*g+l*g,v=a.bg((m/a.Z*g+i*g)*Math.PI*2+Math.PI,2*Math.PI),C=2*Math.atan(Math.exp(Math.PI-y*Math.PI*2))-.5*Math.PI,P=Math.cos(C),S=new Float64Array(3);return S[0]=Math.sin(v)*P,S[1]=Math.sin(C),S[2]=Math.cos(v)*P,S}function Mi(m){return function(t,i){let l=Math.cos(i),p=new Float64Array(3);return p[0]=Math.sin(t)*l,p[1]=Math.sin(i),p[2]=Math.cos(t)*l,p}(m.lng*Math.PI/180,m.lat*Math.PI/180)}function hl(m,t){return m/(2*Math.PI)/Math.cos(t*Math.PI/180)}function Ni(m){let t=Math.asin(m[1])/Math.PI*180,i=Math.sqrt(m[0]*m[0]+m[2]*m[2]);if(i>1e-6){let l=m[0]/i,p=Math.acos(m[2]/i),g=(l>0?p:-p)/Math.PI*180;return new a.Q(a.aL(g,-180,180),t)}return new a.Q(0,t)}function za(m){return Math.cos(m*Math.PI/180)}function fn(m,t){let i=za(m),l=za(t);return a.ah(l/i)}function Ps(m,t){let i=m.rotate(t.bearingInRadians),l=t.zoom+fn(t.center.lat,0),p=a.bc(1/za(t.center.lat),1/za(Math.min(Math.abs(t.center.lat),60)),a.bf(l,7,3,0,1)),g=360/ul({worldSize:t.worldSize,center:{lat:t.center.lat}});return new a.Q(t.center.lng-i.x*g*p,a.ae(t.center.lat+i.y*g,-85.051129,a.af))}function ml(m){let t=.5*m,i=Math.sin(t),l=Math.cos(t);return Math.log(i+l)-Math.log(l-i)}function Ec(m,t,i,l){let p=m.lat+i*l;if(Math.abs(i)>1){let g=(Math.sign(m.lat+i)!==Math.sign(m.lat)?-Math.abs(m.lat):Math.abs(m.lat))*Math.PI/180,y=Math.abs(m.lat+i)*Math.PI/180,v=ml(g+l*(y-g)),C=ml(g),P=ml(y);return new a.Q(m.lng+t*((v-C)/(P-C)),p)}return new a.Q(m.lng+t*l,p)}class Aa{constructor(t){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._aabbFactory=t}recalculateCache(){if(!this._hadAnyChanges)return;let t=this._cachePrevious;this._cachePrevious=this._cache,this._cache=t,this._cache.clear(),this._hadAnyChanges=!1}getTileAABB(t,i,l,p){let g=`${t.z}_${t.x}_${t.y}`,y=this._cache.get(g);if(y)return y;let v=this._cachePrevious.get(g);if(v)return this._cache.set(g,v),v;let C=this._aabbFactory(t,i,l,p);return this._cache.set(g,C),this._hadAnyChanges=!0,C}}function gl(m,t,i){let l=m-t;return l<0?-l:Math.max(0,l-i)}function zc(m,t,i,l,p){let g=m-i,y;return y=g<0?Math.min(-g,1+g-p):g>1?Math.min(Math.max(g-p,0),1-g):0,Math.max(y,gl(t,l,p))}class Gu{constructor(){this._aabbCache=new Aa(this._computeTileAABB)}recalculateCache(){this._aabbCache.recalculateCache()}distanceToTile2d(t,i,l,p){let g=1<<l.z,y=1/g,v=l.x/g,C=l.y/g,P=2;return P=Math.min(P,zc(t,i,v,C,y)),P=Math.min(P,zc(t,i,v+.5,-C-y,y)),P=Math.min(P,zc(t,i,v+.5,2-C-y,y)),P}getWrap(t,i,l){let p=1<<i.z,g=1/p,y=i.x/p,v=gl(t.x,y,g),C=gl(t.x,y-1,g),P=gl(t.x,y+1,g),S=Math.min(v,C,P);return S===P?1:S===C?-1:0}
721allowVariableZoom(t,i){return Pt(t,i)>4}allowWorldCopies(){return!1}getTileAABB(t,i,l,p){return this._aabbCache.getTileAABB(t,i,l,p)}_computeTileAABB(t,i,l,p){if(t.z<=0)return new xr([-1,-1,-1],[1,1,1]);if(t.z===1)return new xr([t.x===0?-1:0,t.y===0?0:-1,-1],[t.x===0?0:1,t.y===0?1:0,1]);{let g=[Ea(0,0,t.x,t.y,t.z),Ea(a.Z,0,t.x,t.y,t.z),Ea(a.Z,a.Z,t.x,t.y,t.z),Ea(0,a.Z,t.x,t.y,t.z)],y=[1,1,1],v=[-1,-1,-1];for(let C of g)for(let P=0;P<3;P++)y[P]=Math.min(y[P],C[P]),v[P]=Math.max(v[P],C[P]);if(t.y===0||t.y===(1<<t.z)-1){let C=[0,t.y===0?1:-1,0];for(let P=0;P<3;P++)y[P]=Math.min(y[P],C[P]),v[P]=Math.max(v[P],C[P])}return new xr(y,v)}}}class fl{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(t){this._helper.setMinZoom(t)}setMaxZoom(t){this._helper.setMaxZoom(t)}setMinPitch(t){this._helper.setMinPitch(t)}setMaxPitch(t){this._helper.setMaxPitch(t)}setRenderWorldCopies(t){this._helper.setRenderWorldCopies(t)}setBearing(t){this._helper.setBearing(t)}setPitch(t){this._helper.setPitch(t)}setRoll(t){this._helper.setRoll(t)}setFov(t){this._helper.setFov(t)}setZoom(t){this._helper.setZoom(t)}setCenter(t){this._helper.setCenter(t)}setElevation(t){this._helper.setElevation(t)}setMinElevationForCurrentTile(t){this._helper.setMinElevationForCurrentTile(t)}setPadding(t){this._helper.setPadding(t)}interpolatePadding(t,i,l){return this._helper.interpolatePadding(t,i,l)}isPaddingEqual(t){return this._helper.isPaddingEqual(t)}resize(t,i){this._helper.resize(t,i)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(t){this._helper.setMaxBounds(t)}overrideNearFarZ(t,i){this._helper.overrideNearFarZ(t,i)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(t){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),t)}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 nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(t){}constructor(){this._cachedClippingPlane=a.bk(),this._projectionMatrix=a.b1(),this._globeViewProjMatrix32f=a.b0(),this._globeViewProjMatrixNoCorrection=a.b1(),this._globeViewProjMatrixNoCorrectionInverted=a.b1(),this._globeProjMatrixInverted=a.b1(),this._cameraPosition=a.bh(),this._globeLatitudeErrorCorrectionRadians=0,this._helper=new Ai({calcMatrices:()=>{this._calcMatrices()},getConstrained:(t,i)=>this.getConstrained(t,i)}),this._coveringTilesDetailsProvider=new Gu}clone(){let t=new fl;return t.apply(this),t}apply(t,i){this._globeLatitudeErrorCorrectionRadians=i||0,this._helper.apply(t)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let t=a.bh();return t[0]=this._cameraPosition[0],t[1]=this._cameraPosition[1],t[2]=this._cameraPosition[2],t}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(t){let{overscaledTileID:i,applyGlobeMatrix:l}=t,p=this._helper.getMercatorTileCoordinates(i);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:p,clippingPlane:this._cachedClippingPlane,projectionTransition:l?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(t){let i=this.pitchInRadians,l=this.cameraToCenterDistance/t,p=Math.sin(i)*l,g=Math.cos(i)*l+1,y=1/Math.sqrt(p*p+g*g)*1,v=-p,C=g,P=Math.sqrt(v*v+C*C);v/=P,C/=P;let S=[0,v,C];a.bl(S,S,[0,0,0],-this.bearingInRadians),a.bm(S,S,[0,0,0],-1*this.center.lat*Math.PI/180),a.bn(S,S,[0,0,0],this.center.lng*Math.PI/180);let L=1/a.bo(S);return a.aO(S,S,L),[...S,-y*L]}isLocationOccluded(t){return!this.isSurfacePointVisible(Mi(t))}transformLightDirection(t){let i=this._helper._center.lng*Math.PI/180,l=this._helper._center.lat*Math.PI/180,p=Math.cos(l),g=[Math.sin(i)*p,Math.sin(l),Math.cos(i)*p],y=[g[2],0,-g[0]],v=[0,0,0];a.aU(v,y,g),a.aT(y,y),a.aT(v,v);let C=[0,0,0];return a.aT(C,[y[0]*t[0]+v[0]*t[1]+g[0]*t[2],y[1]*t[0]+v[1]*t[1]+g[1]*t[2],y[2]*t[0]+v[2]*t[1]+g[2]*t[2]]),C}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(t,i,l){let p=function(v,C,P){let S=1/(1<<P.z);return new a.$(v/a.Z*S+P.x*S,C/a.Z*S+P.y*S)}(t,i,l.canonical),g=(y=p.y,[a.bg(p.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-y*Math.PI*2))-.5*Math.PI]);var y;return this.getCircleRadiusCorrection()/Math.cos(g[1])}projectTileCoordinates(t,i,l,p){let g=l.canonical,y=Ea(t,i,g.x,g.y,g.z),v=1+(p?p(t,i):0)/a.bu,C=[y[0]*v,y[1]*v,y[2]*v,1];a.at(C,C,this._globeViewProjMatrixNoCorrection);let P=this._cachedClippingPlane,S=P[0]*y[0]+P[1]*y[1]+P[2]*y[2]+P[3]<0;return{point:new a.P(C[0]/C[3],C[1]/C[3]),signedDistanceFromCamera:C[3],isOccluded:S}}
721_calcMatrices(){if(!this._helper._width||!this._helper._height)return;let t=hl(this.worldSize,this.center.lat),i=a.b2(),l=a.b2();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*t),a.aY(i,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);let p=this.centerOffset;i[8]=2*-p.x/this._helper._width,i[9]=2*p.y/this._helper._height,this._projectionMatrix=a.aZ(i),this._globeProjMatrixInverted=a.b2(),a.an(this._globeProjMatrixInverted,i),a.L(i,i,[0,0,-this.cameraToCenterDistance]),a.a_(i,i,this.rollInRadians),a.a$(i,i,-this.pitchInRadians),a.a_(i,i,this.bearingInRadians),a.L(i,i,[0,0,-t]);let g=a.bh();g[0]=t,g[1]=t,g[2]=t,a.a$(l,i,this.center.lat*Math.PI/180),a.bp(l,l,-this.center.lng*Math.PI/180),a.M(l,l,g),this._globeViewProjMatrixNoCorrection=l,a.a$(i,i,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),a.bp(i,i,-this.center.lng*Math.PI/180),a.M(i,i,g),this._globeViewProjMatrix32f=new Float32Array(i),this._globeViewProjMatrixNoCorrectionInverted=a.b2(),a.an(this._globeViewProjMatrixNoCorrectionInverted,l);let y=a.bh();this._cameraPosition=a.bh(),this._cameraPosition[2]=this.cameraToCenterDistance/t,a.bl(this._cameraPosition,this._cameraPosition,y,-this.rollInRadians),a.bm(this._cameraPosition,this._cameraPosition,y,this.pitchInRadians),a.bl(this._cameraPosition,this._cameraPosition,y,-this.bearingInRadians),a.aP(this._cameraPosition,this._cameraPosition,[0,0,1]),a.bm(this._cameraPosition,this._cameraPosition,y,-this.center.lat*Math.PI/180),a.bn(this._cameraPosition,this._cameraPosition,y,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(t);let v=a.aZ(this._globeViewProjMatrixNoCorrectionInverted);a.M(v,v,[1,1,-1]),this._cachedFrustum=Nn.fromInvProjectionMatrix(v)}calculateFogMatrix(t){a.w("calculateFogMatrix is not supported on globe projection.");let i=a.b2();return a.ad(i),i}getVisibleUnwrappedCoordinates(t){return[new a.aW(0,t)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(t){t&&a.w("terrain is not fully supported on vertical perspective projection."),this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(t,i){if(!this._globeViewProjMatrixNoCorrection)return 1;let l=Mi(t);a.aO(l,l,1+i/a.bu);let p=a.bk();return a.at(p,[l[0],l[1],l[2],1],this._globeViewProjMatrixNoCorrection),p[2]/p[3]}populateCache(t){}getBounds(){let t=.5*this.width,i=.5*this.height,l=[new a.P(0,0),new a.P(t,0),new a.P(this.width,0),new a.P(this.width,i),new a.P(this.width,this.height),new a.P(t,this.height),new a.P(0,this.height),new a.P(0,i)],p=[];for(let L of l)p.push(this.unprojectScreenPoint(L));let g=0,y=0,v=0,C=0,P=this.center;for(let L of p){let D=a.bq(P.lng,L.lng),V=a.bq(P.lat,L.lat);D<y&&(y=D),D>g&&(g=D),V<C&&(C=V),V>v&&(v=V)}let S=[P.lng+y,P.lat+C,P.lng+g,P.lat+v];return this.isSurfacePointOnScreen([0,1,0])&&(S[3]=90,S[0]=-180,S[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(S[1]=-90,S[0]=-180,S[2]=180),new gn(S)}getConstrained(t,i){let l=a.ae(t.lat,-85.051129,a.af),p=a.ae(+i,this.minZoom+fn(0,l),this.maxZoom);return{center:new a.Q(t.lng,l),zoom:p}}calculateCenterFromCameraLngLatAlt(t,i,l,p){return this._helper.calculateCenterFromCameraLngLatAlt(t,i,l,p)}setLocationAtPoint(t,i){let l=Mi(this.unprojectScreenPoint(i)),p=Mi(t),g=a.bh();a.br(g);let y=a.bh();a.bn(y,l,g,-this.center.lng*Math.PI/180),a.bm(y,y,g,this.center.lat*Math.PI/180);let v=p[0]*p[0]+p[2]*p[2],C=y[0]*y[0];if(v<C)return;let P=Math.sqrt(v-C),S=-P,L=a.bs(p[0],p[2],y[0],P),D=a.bs(p[0],p[2],y[0],S),V=a.bh();a.bn(V,p,g,-L);let U=a.bs(V[1],V[2],y[1],y[2]),Q=a.bh();a.bn(Q,p,g,-D);let Y=a.bs(Q[1],Q[2],y[1],y[2]),tt=.5*Math.PI,nt=U>=-tt&&U<=tt,lt=Y>=-tt&&Y<=tt,ct,pt;if(nt&&lt){let Mt=this.center.lng*Math.PI/180,Bt=this.center.lat*Math.PI/180;a.bv(L,Mt)+a.bv(U,Bt)<a.bv(D,Mt)+a.bv(Y,Bt)?(ct=L,pt=U):(ct=D,pt=Y)}else if(nt)ct=L,pt=U;else{if(!lt)return;ct=D,pt=Y}let ft=ct/Math.PI*180,ht=pt/Math.PI*180,Ct=this.center.lat;this.setCenter(new a.Q(ft,a.ae(ht,-90,90))),this.setZoom(this.zoom+fn(Ct,this.center.lat))}locationToScreenPoint(t,i){let l=Mi(t);
721if(i){let p=i.getElevationForLngLatZoom(t,this._helper._tileZoom);a.aO(l,l,1+p/a.bu)}return this._projectSurfacePointToScreen(l)}_projectSurfacePointToScreen(t){let i=a.bk();return a.at(i,[...t,1],this._globeViewProjMatrixNoCorrection),i[0]/=i[3],i[1]/=i[3],new a.P((.5*i[0]+.5)*this.width,(.5*-i[1]+.5)*this.height)}screenPointToMercatorCoordinate(t,i){if(i){let l=i.pointCoordinate(t);if(l)return l}return a.$.fromLngLat(this.unprojectScreenPoint(t))}screenPointToLocation(t,i){var l;return(l=this.screenPointToMercatorCoordinate(t,i))===null||l===void 0?void 0:l.toLngLat()}isPointOnMapSurface(t,i){let l=this._cameraPosition,p=this.getRayDirectionFromPixel(t);return!!this.rayPlanetIntersection(l,p)}getRayDirectionFromPixel(t){let i=a.bk();i[0]=t.x/this.width*2-1,i[1]=-1*(t.y/this.height*2-1),i[2]=1,i[3]=1,a.at(i,i,this._globeViewProjMatrixNoCorrectionInverted),i[0]/=i[3],i[1]/=i[3],i[2]/=i[3];let l=a.bh();l[0]=i[0]-this._cameraPosition[0],l[1]=i[1]-this._cameraPosition[1],l[2]=i[2]-this._cameraPosition[2];let p=a.bh();return a.aT(p,l),p}isSurfacePointVisible(t){let i=this._cachedClippingPlane;return i[0]*t[0]+i[1]*t[1]+i[2]*t[2]+i[3]>=0}isSurfacePointOnScreen(t){if(!this.isSurfacePointVisible(t))return!1;let i=a.bk();return a.at(i,[...t,1],this._globeViewProjMatrixNoCorrection),i[0]/=i[3],i[1]/=i[3],i[2]/=i[3],i[0]>-1&&i[0]<1&&i[1]>-1&&i[1]<1&&i[2]>-1&&i[2]<1}rayPlanetIntersection(t,i){let l=a.aV(t,i),p=a.bh(),g=a.bh();a.aO(g,i,l),a.aS(p,t,g);let y=1-a.aV(p,p);if(y<0)return null;let v=a.aV(t,t)-1,C=-l+(l<0?1:-1)*Math.sqrt(y),P=v/C,S=C;return{tMin:Math.min(P,S),tMax:Math.max(P,S)}}unprojectScreenPoint(t){let i=this._cameraPosition,l=this.getRayDirectionFromPixel(t),p=this.rayPlanetIntersection(i,l);if(p){let S=a.bh();a.aP(S,i,[l[0]*p.tMin,l[1]*p.tMin,l[2]*p.tMin]);let L=a.bh();return a.aT(L,S),Ni(L)}let g=this._cachedClippingPlane,y=g[0]*l[0]+g[1]*l[1]+g[2]*l[2],v=-a.bt(g,i)/y,C=a.bh();if(v>0)a.aP(C,i,[l[0]*v,l[1]*v,l[2]*v]);else{let S=a.bh();a.aP(S,i,[2*l[0],2*l[1],2*l[2]]);let L=a.bt(this._cachedClippingPlane,S);a.aS(C,S,[this._cachedClippingPlane[0]*L,this._cachedClippingPlane[1]*L,this._cachedClippingPlane[2]*L])}let P=function(S){let L=a.bh();return L[0]=S[0]*-S[3],L[1]=S[1]*-S[3],L[2]=S[2]*-S[3],{center:L,radius:Math.sqrt(1-S[3]*S[3])}}(g);return Ni(function(S,L,D){let V=a.bh();a.aS(V,D,S);let U=a.bh();return a.bi(U,S,V,L/a.bj(V)),U}(P.center,P.radius,C))}getMatrixForModel(t,i){let l=a.Q.convert(t),p=1/a.bu,g=a.b1();return a.bp(g,g,l.lng/180*Math.PI),a.a$(g,g,-l.lat/180*Math.PI),a.L(g,g,[0,0,1+i/a.bu]),a.a$(g,g,.5*Math.PI),a.M(g,g,[p,p,p]),g}getProjectionDataForCustomLayer(t=!0){let i=this.getProjectionData({overscaledTileID:new a.Y(0,0,0,0,0),applyGlobeMatrix:t});return i.tileMercatorCoords=[0,0,1,1],i}getFastPathSimpleProjectionMatrix(t){}}class _l{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(t){this._helper.setMinZoom(t)}setMaxZoom(t){this._helper.setMaxZoom(t)}setMinPitch(t){this._helper.setMinPitch(t)}setMaxPitch(t){this._helper.setMaxPitch(t)}setRenderWorldCopies(t){this._helper.setRenderWorldCopies(t)}setBearing(t){this._helper.setBearing(t)}setPitch(t){this._helper.setPitch(t)}setRoll(t){this._helper.setRoll(t)}setFov(t){this._helper.setFov(t)}setZoom(t){this._helper.setZoom(t)}setCenter(t){this._helper.setCenter(t)}setElevation(t){this._helper.setElevation(t)}setMinElevationForCurrentTile(t){this._helper.setMinElevationForCurrentTile(t)}setPadding(t){this._helper.setPadding(t)}interpolatePadding(t,i,l){return this._helper.interpolatePadding(t,i,l)}isPaddingEqual(t){return this._helper.isPaddingEqual(t)}resize(t,i,l=!0){this._helper.resize(t,i,l)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(t){this._helper.setMaxBounds(t)}overrideNearFarZ(t,i){this._helper.overrideNearFarZ(t,i)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(t){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),t)}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(t,i){this._globeness=t,this._globeLatitudeErrorCorrectionRadians=i,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().recalculateCache(),this._mercatorTransform.getCoveringTilesDetailsProvider().recalculateCache()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this._helper=new Ai({calcMatrices:()=>{this._calcMatrices()},getConstrained:(t,i)=>this.getConstrained(t,i)}),this._globeness=1,this._mercatorTransform=new Lo,this._verticalPerspectiveTransform=new fl}clone(){let t=new _l;return t._globeness=this._globeness,t._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,t.apply(this),t}apply(t){this._helper.apply(t),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(t){let i=this._mercatorTransform.getProjectionData(t),l=this._verticalPerspectiveTransform.getProjectionData(t);return{mainMatrix:this.isGlobeRendering?l.mainMatrix:i.mainMatrix,clippingPlane:l.clippingPlane,tileMercatorCoords:l.tileMercatorCoords,projectionTransition:t.applyGlobeMatrix?this._globeness:0,fallbackMatrix:i.fallbackMatrix}}isLocationOccluded(t){return this.currentTransform.isLocationOccluded(t)}transformLightDirection(t){return this.currentTransform.transformLightDirection(t)}getPixelScale(){return a.bc(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return a.bc(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(t,i,l){let p=this._mercatorTransform.getPitchedTextCorrection(t,i,l),g=this._verticalPerspectiveTransform.getPitchedTextCorrection(t,i,l);return a.bc(p,g,this._globeness)}projectTileCoordinates(t,i,l,p){return this.currentTransform.projectTileCoordinates(t,i,l,p)}_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(t){return this.currentTransform.calculateFogMatrix(t)}getVisibleUnwrappedCoordinates(t){return this.currentTransform.getVisibleUnwrappedCoordinates(t)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(t){this._mercatorTransform.recalculateZoomAndCenter(t),this._verticalPerspectiveTransform.recalculateZoomAndCenter(t)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(t,i){return this.currentTransform.lngLatToCameraDepth(t,i)}populateCache(t){this._mercatorTransform.populateCache(t),this._verticalPerspectiveTransform.populateCache(t)}getBounds(){return this.currentTransform.getBounds()}getConstrained(t,i){return this.currentTransform.getConstrained(t,i)}calculateCenterFromCameraLngLatAlt(t,i,l,p){return this._helper.calculateCenterFromCameraLngLatAlt(t,i,l,p)}setLocationAtPoint(t,i){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(t,i),void this.apply(this._mercatorTransform);this._verticalPerspectiveTransform.setLocationAtPoint(t,i),this.apply(this._verticalPerspectiveTransform)}locationToScreenPoint(t,i){return this.currentTransform.locationToScreenPoint(t,i)}screenPointToMercatorCoordinate(t,i){return this.currentTransform.screenPointToMercatorCoordinate(t,i)}screenPointToLocation(t,i){return this.currentTransform.screenPointToLocation(t,i)}
721isPointOnMapSurface(t,i){return this.currentTransform.isPointOnMapSurface(t,i)}getRayDirectionFromPixel(t){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(t)}getMatrixForModel(t,i){return this.currentTransform.getMatrixForModel(t,i)}getProjectionDataForCustomLayer(t=!0){let i=this._mercatorTransform.getProjectionDataForCustomLayer(t);if(!this.isGlobeRendering)return i;let l=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(t);return l.fallbackMatrix=i.mainMatrix,l}getFastPathSimpleProjectionMatrix(t){return this.currentTransform.getFastPathSimpleProjectionMatrix(t)}}class go{get useGlobeControls(){return!0}handlePanInertia(t,i){let l=Ps(t,i);return Math.abs(l.lng-i.center.lng)>180&&(l.lng=i.center.lng+179.5*Math.sign(l.lng-i.center.lng)),{easingCenter:l,easingOffset:new a.P(0,0)}}handleMapControlsRollPitchBearingZoom(t,i){let l=t.around,p=i.screenPointToLocation(l);t.bearingDelta&&i.setBearing(i.bearing+t.bearingDelta),t.pitchDelta&&i.setPitch(i.pitch+t.pitchDelta),t.rollDelta&&i.setRoll(i.roll+t.rollDelta);let g=i.zoom;t.zoomDelta&&i.setZoom(i.zoom+t.zoomDelta);let y=i.zoom-g;if(y===0)return;let v=a.bq(i.center.lng,p.lng),C=v/(Math.abs(v/180)+1),P=a.bq(i.center.lat,p.lat),S=i.getRayDirectionFromPixel(l),L=i.cameraPosition,D=-1*a.aV(L,S),V=a.bh();a.aP(V,L,[S[0]*D,S[1]*D,S[2]*D]);let U=a.bo(V)-1,Q=Math.exp(.5*-Math.max(U-.3,0)),Y=hl(i.worldSize,i.center.lat)/Math.min(i.width,i.height),tt=a.bf(Y,.9,.5,1,.25),nt=(1-a.ac(-y))*Math.min(Q,tt),lt=i.center.lat,ct=i.zoom,pt=new a.Q(i.center.lng+C*nt,a.ae(i.center.lat+P*nt,-85.051129,a.af));i.setLocationAtPoint(p,l);let ft=i.center,ht=a.bf(Math.abs(v),45,85,0,1),Ct=a.bf(Y,.75,.35,0,1),Mt=Math.pow(Math.max(ht,Ct),.25),Bt=a.bq(ft.lng,pt.lng),Vt=a.bq(ft.lat,pt.lat);i.setCenter(new a.Q(ft.lng+Bt*Mt,ft.lat+Vt*Mt).wrap()),i.setZoom(ct+fn(lt,i.center.lat))}handleMapControlsPan(t,i,l){if(!t.panDelta)return;let p=i.center.lat,g=i.zoom;i.setCenter(Ps(t.panDelta,i).wrap()),i.setZoom(g+fn(p,i.center.lat))}cameraForBoxAndBearing(t,i,l,p,g){let y=ro(t,i,l,p,g),v=i.left/g.width*2-1,C=(g.width-i.right)/g.width*2-1,P=i.top/g.height*-2+1,S=(g.height-i.bottom)/g.height*-2+1,L=a.bq(l.getWest(),l.getEast())<0,D=L?l.getEast():l.getWest(),V=L?l.getWest():l.getEast(),U=Math.max(l.getNorth(),l.getSouth()),Q=Math.min(l.getNorth(),l.getSouth()),Y=D+.5*a.bq(D,V),tt=U+.5*a.bq(U,Q),nt=g.clone();nt.setCenter(y.center),nt.setBearing(y.bearing),nt.setPitch(0),nt.setRoll(0),nt.setZoom(y.zoom);let lt=nt.modelViewProjectionMatrix,ct=[Mi(l.getNorthWest()),Mi(l.getNorthEast()),Mi(l.getSouthWest
721()),Mi(l.getSouthEast()),Mi(new a.Q(V,tt)),Mi(new a.Q(D,tt)),Mi(new a.Q(Y,U)),Mi(new a.Q(Y,Q))],pt=Mi(y.center),ft=Number.POSITIVE_INFINITY;for(let ht of ct)v<0&&(ft=go.getLesserNonNegativeNonNull(ft,go.solveVectorScale(ht,pt,lt,"x",v))),C>0&&(ft=go.getLesserNonNegativeNonNull(ft,go.solveVectorScale(ht,pt,lt,"x",C))),P>0&&(ft=go.getLesserNonNegativeNonNull(ft,go.solveVectorScale(ht,pt,lt,"y",P))),S<0&&(ft=go.getLesserNonNegativeNonNull(ft,go.solveVectorScale(ht,pt,lt,"y",S)));if(Number.isFinite(ft)&&ft!==0)return y.zoom=nt.zoom+a.ah(ft),y;vr()}handleJumpToCenterZoom(t,i){let l=t.center.lat,p=t.getConstrained(i.center?a.Q.convert(i.center):t.center,t.zoom).center;t.setCenter(p.wrap());let g=i.zoom!==void 0?+i.zoom:t.zoom+fn(l,p.lat);t.zoom!==g&&t.setZoom(g)}handleEaseTo(t,i){let l=t.zoom,p=t.center,g=t.padding,y={roll:t.roll,pitch:t.pitch,bearing:t.bearing},v={roll:i.roll===void 0?t.roll:i.roll,pitch:i.pitch===void 0?t.pitch:i.pitch,bearing:i.bearing===void 0?t.bearing:i.bearing},C=i.zoom!==void 0,P=!t.isPaddingEqual(i.padding),S=!1,L=i.center?a.Q.convert(i.center):p,D=t.getConstrained(L,l).center;gi(t,D);let V=t.clone();V.setCenter(D),V.setZoom(C?+i.zoom:l+fn(p.lat,L.lat)),V.setBearing(i.bearing);let U=new a.P(a.ae(t.centerPoint.x+i.offsetAsPoint.x,0,t.width),a.ae(t.centerPoint.y+i.offsetAsPoint.y,0,t.height));V.setLocationAtPoint(D,U);let Q=(i.offset&&i.offsetAsPoint.mag())>0?V.center:D,Y=C?+i.zoom:l+fn(p.lat,Q.lat),tt=l+fn(p.lat,0),nt=Y+fn(Q.lat,0),lt=a.bq(p.lng,Q.lng),ct=a.bq(p.lat,Q.lat),pt=a.ac(nt-tt);return S=Y!==l,{easeFunc:ft=>{if(a.b6(y,v)||vs({startEulerAngles:y,endEulerAngles:v,tr:t,k:ft,useSlerp:y.roll!=v.roll}),P&&t.interpolatePadding(g,i.padding,ft),i.around)a.w("Easing around a point is not supported under globe projection."),t.setLocationAtPoint(i.around,i.aroundPoint);else{let ht=nt>tt?Math.min(2,pt):Math.max(.5,pt),Ct=Math.pow(ht,1-ft),Mt=Ec(p,lt,ct,ft*Ct);t.setCenter(Mt.wrap())}if(S){let ht=a.B.number(tt,nt,ft)+fn(0,t.center.lat);t.setZoom(ht)}},isZooming:S,elevationCenter:Q}}handleFlyTo(t,i){let l=i.zoom!==void 0,p=t.center,g=t.zoom,y=t.padding,v=!t.isPaddingEqual(i.padding),C=t.getConstrained(a.Q.convert(i.center||i.locationAtOffset),g).center,P=l?+i.zoom:t.zoom+fn(t.center.lat,C.lat),S=t.clone();S.setCenter(C),S.setZoom(P),S.setBearing(i.bearing);let L=new a.P(a.ae(t.centerPoint.x+i.offsetAsPoint.x,0,t.width),a.ae(t.centerPoint.y+i.offsetAsPoint.y,0,t.height));S.setLocationAtPoint(C,L);let D=S.center;gi(t,D);let V=function(ct,pt,ft){let ht=Mi(pt),Ct=Mi(ft),Mt=a.aV(ht,Ct),Bt=Math.acos(Mt),Vt=ul(ct);return Bt/(2*Math.PI)*Vt}(t,p,D),U=g+fn(p.lat,0),Q=P+fn(D.lat,0),Y=a.ac(Q-U),tt;if(typeof i.minZoom=="number"){let ct=+i.minZoom+fn(D.lat,0),pt=Math.min(ct,U,Q)+fn(0,D.lat),ft=t.getConstrained(D,pt).zoom+fn(D.lat,0);tt=a.ac(ft-U)}let nt=a.bq(p.lng,D.lng),lt=a.bq(p.lat,D.lat);return{easeFunc:(ct,pt,ft,ht)=>{let Ct=Ec(p,nt,lt,ft);v&&t.interpolatePadding(y,i.padding,ct);let Mt=ct===1?D:Ct;t.setCenter(Mt.wrap());let Bt=U+a.ah(pt);t.setZoom(ct===1?P:Bt+fn(0,Mt.lat))},scaleOfZoom:Y,targetCenter:D,scaleOfMinZoom:tt,pixelPathLength:V}}static solveVectorScale(t,i,l,p,g){let y=p==="x"?[l[0],l[4],l[8],l[12]]:[l[1],l[5],l[9],l[13]],v=[l[3],l[7],l[11],l[15]],C=t[0]*y[0]+t[1]*y[1]+t[2]*y[2],P=t[0]*v[0]+t[1]*v[1]+t[2]*v[2],S=i[0]*y[0]+i[1]*y[1]+i[2]*y[2],L=i[0]*v[0]+i[1]*v[1]+i[2]*v[2];return S+g*P===C+g*L||v[3]*(C-S)+y[3]*(L-P)+C*L==S*P?null:(S+y[3]-g*L-g*v[3])/(S-C-g*L+g*P)}static getLesserNonNegativeNonNull(t,i){return i!==null&&i>=0&&i<t?i:t}}class Os{constructor(t){this._globe=t,this._mercatorCameraHelper=new bs,this._verticalPerspectiveCameraHelper=new go}get useGlobeControls(){return this._globe.useGlobeRendering}get currentHelper(){return this.useGlobeControls?this._verticalPerspectiveCameraHelper:this._mercatorCameraHelper}handlePanInertia(t,i){return this.currentHelper.handlePanInertia(t,i)}handleMapControlsRollPitchBearingZoom(t,i){return this.currentHelper.handleMapControlsRollPitchBearingZoom(t,i)}handleMapControlsPan(t,i,l){this.currentHelper.handleMapControlsPan(t,i,l)}cameraForBoxAndBearing(t,i,l,p,g){return this.currentHelper.cameraForBoxAndBearing(t,i,l,p,g)}handleJumpToCenterZoom(t,i){this.currentHelper.handleJumpToCenterZoom(t,i)}handleEaseTo(t,i){return this.currentHelper.handleEaseTo(t,i)}handleFlyTo(t,i){return this.currentHelper.handleFlyTo(t,i)}}let La=(m,t)=>a.x(m,t&&t.filter(i=>i.identifier!=="source.canvas")),yl=a.bw();class Ss extends a.E{constructor(t,i={}){super(),this._rtlPluginLoaded=()=>{for(let l in this.sourceCaches){let p=this.sourceCaches[l].getSource().type;p!=="vector"&&p!=="geojson"||this.sourceCaches[l].reload()}},this.map=t,this.dispatcher=new qi(gr(),t._getMapId()),this.dispatcher.registerMessageHandler("GG",(l,p)=>this.getGlyphs(l,p)),this.dispatcher.registerMessageHandler("GI",(l,p)=>this.getImages(l,p)),this.imageManager=new ol,this.imageManager.setEventedParent(this),this.glyphManager=new bi(t._requestManager,i.localIdeographFontFamily),this.lineAtlas=new So(256,512),this.crossTileSymbolIndex=new Yo,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.bx,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",a.by()),Eo().on(ba,this._rtlPluginLoaded),this.on("data",l=>{if(l.dataType!=="source"||l.sourceDataType!=="metadata")return;let p=this.sourceCaches[l.sourceId];if(!p)return;let g=p.getSource();if(g&&g.vectorLayerIds)for(let y in this._layers){let v=this._layers[y];
721v.source===g.id&&this._validateLayer(v)}})}loadURL(t,i={},l){this.fire(new a.l("dataloading",{dataType:"style"})),i.validate=typeof i.validate!="boolean"||i.validate;let p=this.map._requestManager.transformRequest(t,"Style");this._loadStyleRequest=new AbortController;let g=this._loadStyleRequest;a.j(p,this._loadStyleRequest).then(y=>{this._loadStyleRequest=null,this._load(y.data,i,l)}).catch(y=>{this._loadStyleRequest=null,y&&!g.signal.aborted&&this.fire(new a.k(y))})}loadJSON(t,i={},l){this.fire(new a.l("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,ee.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,i.validate=i.validate!==!1,this._load(t,i,l)}).catch(()=>{})}loadEmpty(){this.fire(new a.l("dataloading",{dataType:"style"})),this._load(yl,{validate:!1})}_load(t,i,l){var p,g;let y=i.transformStyle?i.transformStyle(l,t):t;if(!i.validate||!La(this,a.y(y))){this._loaded=!0,this.stylesheet=y;for(let v in y.sources)this.addSource(v,y.sources[v],{validate:!1});y.sprite?this._loadSprite(y.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(y.glyphs),this._createLayers(),this.light=new ps(this.stylesheet.light),this._setProjectionInternal(((p=this.stylesheet.projection)===null||p===void 0?void 0:p.type)||"mercator"),this.sky=new mr(this.stylesheet.sky),this.map.setTerrain((g=this.stylesheet.terrain)!==null&&g!==void 0?g:null),this.fire(new a.l("data",{dataType:"style"})),this.fire(new a.l("style.load"))}}_createLayers(){let t=a.bz(this.stylesheet.layers);this.dispatcher.broadcast("SL",t),this._order=t.map(i=>i.id),this._layers={},this._serializedLayers=null;for(let i of t){let l=a.bA(i);l.setEventedParent(this,{layer:{id:i.id}}),this._layers[i.id]=l}}_loadSprite(t,i=!1,l=void 0){let p;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(g,y,v,C){return a._(this,void 0,void 0,function*(){let P=Pn(g),S=v>1?"@2x":"",L={},D={};for(let{id:V,url:U}of P){let Q=y.transformRequest(Po(U,S,".json"),"SpriteJSON");L[V]=a.j(Q,C);let Y=y.transformRequest(Po(U,S,".png"),"SpriteImage");D[V]=ri.getImage(Y,C)}return yield Promise.all([...Object.values(L),...Object.values(D)]),function(V,U){return a._(this,void 0,void 0,function*(){let Q={};for(let Y in V){Q[Y]={};let tt=ee.getImageCanvasContext((yield U[Y]).data),nt=(yield V[Y]).data;for(let lt in nt){let{width:ct,height:pt,x:ft,y:ht,sdf:Ct,pixelRatio:Mt,stretchX:Bt,stretchY:Vt,content:Dt,textFitWidth:oe,textFitHeight:Qt}=nt[lt];Q[Y][lt]={data:null,pixelRatio:Mt,sdf:Ct,stretchX:Bt,stretchY:Vt,content:Dt,textFitWidth:oe,textFitHeight:Qt,spriteData:{width:ct,height:pt,x:ft,y:ht,context:tt}}}}return Q})}(L,D)})}(t,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(g=>{if(this._spriteRequest=null,g)for(let y in g){this._spritesImagesIds[y]=[];let v=this._spritesImagesIds[y]?this._spritesImagesIds[y].filter(C=>!(C in g)):[];for(let C of v)this.imageManager.removeImage(C),this._changedImages[C]=!0;for(let C in g[y]){let P=y==="default"?C:`${y}:${C}`;this._spritesImagesIds[y].push(P),P in this.imageManager.images?this.imageManager.updateImage(P,g[y][C],!1):this.imageManager.addImage(P,g[y][C]),i&&(this._changedImages[P]=!0)}}}).catch(g=>{this._spriteRequest=null,p=g,this.fire(new a.k(p))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),i&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"})),l&&l(p)})}_unloadSprite(){for(let t of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(t),this._changedImages[t]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"}))}_validateLayer(t){let i=this.sourceCaches[t.source];if(!i)return;let l=t.sourceLayer;if(!l)return;let p=i.getSource();(p.type==="geojson"||p.vectorLayerIds&&p.vectorLayerIds.indexOf(l)===-1)&&this.fire(new a.k(new Error(`Source layer "${l}" does not exist on source "${p.id}" as specified by style layer "${t.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(t,i=!1){let l=this._serializedAllLayers();if(!t||t.length===0)return Object.values(i?a.bB(l):l);let p=[];for(let g of t)if(l[g]){let y=i?a.bB(l[g]):l[g];p.push(y)}return p}_serializedAllLayers(){let t=this._serializedLayers;if(t)return t;t=this._serializedLayers={};let i=Object.keys(this._layers);for(let l of i){let p=this._layers[l];p.type!=="custom"&&(t[l]=p.serialize())}return t}hasTransitions(){var t,i,l;if(!((t=this.light)===null||t===void 0)&&t.hasTransition()||!((i=this.sky)===null||i===void 0)&&i.hasTransition()||!((l=this.projection)===null||l===void 0)&&l.hasTransition())return!0;for(let p in this.sourceCaches)if(this.sourceCaches[p].hasTransition())return!0;for(let p in this._layers)if(this._layers[p].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(t){if(!this._loaded)return;let i=this._changed;if(i){let p=Object.keys(this._updatedLayers),g=Object.keys(this._removedLayers);(p.length||g.length)&&this._updateWorkerLayers(p,g);for(let y in this._updatedSources){let v=this._updatedSources[y];if(v==="reload")this._reloadSource(y);else{if(v!=="clear")throw new Error(`Invalid action ${v}`);this._clearSource(y)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let y in this._updatedPaintProps)this._layers[y].updateTransitions(t);this.light.updateTransitions(t),this.sky.updateTransitions(t),this._resetUpdates()}let l={};for(let p in this.sourceCaches){let g=this.sourceCaches[p];l[p]=g.used,g.used=!1}for(let p of this._order){let g=this._layers[p];g.recalculate(t,this._availableImages),!g.isHidden(t.zoom)&&g.source&&(this.sourceCaches[g.source].used=!0)}for(let p in l){let g=this.sourceCaches[p];!!l[p]!=!!g.used&&g.fire(new a.l("data",{sourceDataType:"visibility",dataType:"source",sourceId:p}))}this.light.recalculate(t),this.sky.recalculate(t),this.projection.recalculate(t),this.z=t.zoom,i&&this.fire(new a.l("data",{dataType:"style"}))}_updateTilesForChangedImages(){let t=Object.keys(this._changedImages);if(t.length){for(let i in this.sourceCaches)this.sourceCaches[i].reloadTilesForDependencies(["icons","patterns"],t);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let t in this.sourceCaches)this.sourceCaches[t].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(t,i){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(t,!1),removedIds:i})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(t,i={}){var l;this._checkLoaded();let p=this.serialize();if(t=i.transformStyle?i.transformStyle(p,t):t,((l=i.validate)===null||l===void 0||l)&&La(this,a.y(t)))return!1;(t=a.bB(t)).layers=a.bz(t.layers);let g=a.bC(p,t),y=this._getOperationsToPerform(g);if(y.unimplemented.length>0)throw new Error(`Unimplemented: ${y.unimplemented.join(", ")}.`);
721if(y.operations.length===0)return!1;for(let v of y.operations)v();return this.stylesheet=t,this._serializedLayers=null,!0}_getOperationsToPerform(t){let i=[],l=[];for(let p of t)switch(p.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":i.push(()=>this.addLayer.apply(this,p.args));break;case"removeLayer":i.push(()=>this.removeLayer.apply(this,p.args));break;case"setPaintProperty":i.push(()=>this.setPaintProperty.apply(this,p.args));break;case"setLayoutProperty":i.push(()=>this.setLayoutProperty.apply(this,p.args));break;case"setFilter":i.push(()=>this.setFilter.apply(this,p.args));break;case"addSource":i.push(()=>this.addSource.apply(this,p.args));break;case"removeSource":i.push(()=>this.removeSource.apply(this,p.args));break;case"setLayerZoomRange":i.push(()=>this.setLayerZoomRange.apply(this,p.args));break;case"setLight":i.push(()=>this.setLight.apply(this,p.args));break;case"setGeoJSONSourceData":i.push(()=>this.setGeoJSONSourceData.apply(this,p.args));break;case"setGlyphs":i.push(()=>this.setGlyphs.apply(this,p.args));break;case"setSprite":i.push(()=>this.setSprite.apply(this,p.args));break;case"setTerrain":i.push(()=>this.map.setTerrain.apply(this,p.args));break;case"setSky":i.push(()=>this.setSky.apply(this,p.args));break;case"setProjection":this.setProjection.apply(this,p.args);break;case"setTransition":i.push(()=>{});break;default:l.push(p.command)}return{operations:i,unimplemented:l}}addImage(t,i){if(this.getImage(t))return this.fire(new a.k(new Error(`An image named "${t}" already exists.`)));this.imageManager.addImage(t,i),this._afterImageUpdated(t)}updateImage(t,i){this.imageManager.updateImage(t,i)}getImage(t){return this.imageManager.getImage(t)}removeImage(t){if(!this.getImage(t))return this.fire(new a.k(new Error(`An image named "${t}" does not exist.`)));this.imageManager.removeImage(t),this._afterImageUpdated(t)}_afterImageUpdated(t){this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(t,i,l={}){if(this._checkLoaded(),this.sourceCaches[t]!==void 0)throw new Error(`Source "${t}" already exists.`);if(!i.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(i).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(i.type)>=0&&this._validate(a.y.source,`sources.${t}`,i,null,l))return;this.map&&this.map._collectResourceTiming&&(i.collectResourceTiming=!0);let p=this.sourceCaches[t]=new Tt(t,i,this.dispatcher);p.style=this,p.setEventedParent(this,()=>({isSourceLoaded:p.loaded(),source:p.serialize(),sourceId:t})),p.onAdd(this.map),this._changed=!0}removeSource(t){if(this._checkLoaded(),this.sourceCaches[t]===void 0)throw new Error("There is no source with this ID");for(let l in this._layers)if(this._layers[l].source===t)return this.fire(new a.k(new Error(`Source "${t}" cannot be removed while layer "${l}" is using it.`)));let i=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],i.fire(new a.l("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),i.setEventedParent(null),i.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(t,i){if(this._checkLoaded(),this.sourceCaches[t]===void 0)throw new Error(`There is no source with this ID=${t}`);let l=this.sourceCaches[t].getSource();if(l.type!=="geojson")throw new Error(`geojsonSource.type is ${l.type}, which is !== 'geojson`);l.setData(i),this._changed=!0}getSource(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()}addLayer(t,i,l={}){this._checkLoaded();let p=t.id;if(this.getLayer(p))return void this.fire(new a.k(new Error(`Layer "${p}" already exists on this map.`)));let g;if(t.type==="custom"){if(La(this,a.bD(t)))return;g=a.bA(t)}else{if("source"in t&&typeof t.source=="object"&&(this.addSource(p,t.source),t=a.bB(t),t=a.e(t,{source:p})),this._validate(a.y.layer,`layers.${p}`,t,{arrayIndex:-1},l))return;
721g=a.bA(t),this._validateLayer(g),g.setEventedParent(this,{layer:{id:p}})}let y=i?this._order.indexOf(i):this._order.length;if(i&&y===-1)this.fire(new a.k(new Error(`Cannot add layer "${p}" before non-existing layer "${i}".`)));else{if(this._order.splice(y,0,p),this._layerOrderChanged=!0,this._layers[p]=g,this._removedLayers[p]&&g.source&&g.type!=="custom"){let v=this._removedLayers[p];delete this._removedLayers[p],v.type!==g.type?this._updatedSources[g.source]="clear":(this._updatedSources[g.source]="reload",this.sourceCaches[g.source].pause())}this._updateLayer(g),g.onAdd&&g.onAdd(this.map)}}moveLayer(t,i){if(this._checkLoaded(),this._changed=!0,!this._layers[t])return void this.fire(new a.k(new Error(`The layer '${t}' does not exist in the map's style and cannot be moved.`)));if(t===i)return;let l=this._order.indexOf(t);this._order.splice(l,1);let p=i?this._order.indexOf(i):this._order.length;i&&p===-1?this.fire(new a.k(new Error(`Cannot move layer "${t}" before non-existing layer "${i}".`))):(this._order.splice(p,0,t),this._layerOrderChanged=!0)}removeLayer(t){this._checkLoaded();let i=this._layers[t];if(!i)return void this.fire(new a.k(new Error(`Cannot remove non-existing layer "${t}".`)));i.setEventedParent(null);let l=this._order.indexOf(t);this._order.splice(l,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=i,delete this._layers[t],this._serializedLayers&&delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],i.onRemove&&i.onRemove(this.map)}getLayer(t){return this._layers[t]}getLayersOrder(){return[...this._order]}hasLayer(t){return t in this._layers}setLayerZoomRange(t,i,l){this._checkLoaded();let p=this.getLayer(t);p?p.minzoom===i&&p.maxzoom===l||(i!=null&&(p.minzoom=i),l!=null&&(p.maxzoom=l),this._updateLayer(p)):this.fire(new a.k(new Error(`Cannot set the zoom range of non-existing layer "${t}".`)))}setFilter(t,i,l={}){this._checkLoaded();let p=this.getLayer(t);if(p){if(!a.bE(p.filter,i))return i==null?(p.filter=void 0,void this._updateLayer(p)):void(this._validate(a.y.filter,`layers.${p.id}.filter`,i,null,l)||(p.filter=a.bB(i),this._updateLayer(p)))}else this.fire(new a.k(new Error(`Cannot filter non-existing layer "${t}".`)))}getFilter(t){return a.bB(this.getLayer(t).filter)}setLayoutProperty(t,i,l,p={}){this._checkLoaded();let g=this.getLayer(t);g?a.bE(g.getLayoutProperty(i),l)||(g.setLayoutProperty(i,l,p),this._updateLayer(g)):this.fire(new a.k(new Error(`Cannot style non-existing layer "${t}".`)))}getLayoutProperty(t,i){let l=this.getLayer(t);if(l)return l.getLayoutProperty(i);this.fire(new a.k(new Error(`Cannot get style of non-existing layer "${t}".`)))}setPaintProperty(t,i,l,p={}){this._checkLoaded();let g=this.getLayer(t);g?a.bE(g.getPaintProperty(i),l)||(g.setPaintProperty(i,l,p)&&this._updateLayer(g),this._changed=!0,this._updatedPaintProps[t]=!0,this._serializedLayers=null):this.fire(new a.k(new Error(`Cannot style non-existing layer "${t}".`)))}getPaintProperty(t,i){return this.getLayer(t).getPaintProperty(i)}setFeatureState(t,i){this._checkLoaded();let l=t.source,p=t.sourceLayer,g=this.sourceCaches[l];if(g===void 0)return void this.fire(new a.k(new Error(`The source '${l}' does not exist in the map's style.`)));let y=g.getSource().type;y==="geojson"&&p?this.fire(new a.k(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):y!=="vector"||p?(t.id===void 0&&this.fire(new a.k(new Error("The feature id parameter must be provided."))),g.setFeatureState(p,t.id,i)):this.fire(new a.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(t,i){this._checkLoaded();let l=t.source,p=this.sourceCaches[l];if(p===void 0)return void this.fire(new a.k(new Error(`The source '${l}' does not exist in the map's style.`)));let g=p.getSource().type,y=g==="vector"?t.sourceLayer:void 0;g!=="vector"||y?i&&typeof t.id!="string"&&typeof t.id!="number"?this.fire(new a.k(new Error("A feature id is required to remove its specific state property."))):p.removeFeatureState(y,t.id,i):this.fire(new a.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(t){this._checkLoaded();let i=t.source,l=t.sourceLayer,p=this.sourceCaches[i];if(p!==void 0)return p.getSource().type!=="vector"||l?(t.id===void 0&&this.fire(new a.k(new Error("The feature id parameter must be provided."))),p.getFeatureState(l,t.id)):void this.fire(new a.k(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new a.k(new Error(`The source '${i}' does not exist in the map's style.`)))}getTransition(){return a.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let t=a.bF(this.sourceCaches,g=>g.serialize()),i=this._serializeByIds(this._order,!0),l=this.map.getTerrain()||void 0,p=this.stylesheet;
721return a.bG({version:p.version,name:p.name,metadata:p.metadata,light:p.light,sky:p.sky,center:p.center,zoom:p.zoom,bearing:p.bearing,pitch:p.pitch,sprite:p.sprite,glyphs:p.glyphs,transition:p.transition,projection:p.projection,sources:t,layers:i,terrain:l},g=>g!==void 0)}_updateLayer(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&this.sourceCaches[t.source].getSource().type!=="raster"&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(t){let i=y=>this._layers[y].type==="fill-extrusion",l={},p=[];for(let y=this._order.length-1;y>=0;y--){let v=this._order[y];if(i(v)){l[v]=y;for(let C of t){let P=C[v];if(P)for(let S of P)p.push(S)}}}p.sort((y,v)=>v.intersectionZ-y.intersectionZ);let g=[];for(let y=this._order.length-1;y>=0;y--){let v=this._order[y];if(i(v))for(let C=p.length-1;C>=0;C--){let P=p[C].feature;if(l[P.layer.id]<y)break;g.push(P),p.pop()}else for(let C of t){let P=C[v];if(P)for(let S of P)g.push(S.feature)}}return g}queryRenderedFeatures(t,i,l){i&&i.filter&&this._validate(a.y.filter,"queryRenderedFeatures.filter",i.filter,null,i);let p={};if(i&&i.layers){if(!(Array.isArray(i.layers)||i.layers instanceof Set))return this.fire(new a.k(new Error("parameters.layers must be an Array or a Set of strings"))),[];for(let P of i.layers){let S=this._layers[P];if(!S)return this.fire(new a.k(new Error(`The layer '${P}' does not exist in the map's style and cannot be queried for features.`))),[];p[S.source]=!0}}let g=[];i.availableImages=this._availableImages;let y=this._serializedAllLayers(),v=i.layers instanceof Set?i.layers:Array.isArray(i.layers)?new Set(i.layers):null,C=Object.assign(Object.assign({},i),{layers:v});for(let P in this.sourceCaches)i.layers&&!p[P]||g.push(us(this.sourceCaches[P],this._layers,y,t,C,l,this.map.terrain?(S,L,D)=>this.map.terrain.getElevation(S,L,D):void 0));return this.placement&&g.push(function(P,S,L,D,V,U,Q){let Y={},tt=U.queryRenderedSymbols(D),nt=[];for(let lt of Object.keys(tt).map(Number))nt.push(Q[lt]);nt.sort(Wi);for(let lt of nt){let ct=lt.featureIndex.lookupSymbolFeatures(tt[lt.bucketInstanceId],S,lt.bucketIndex,lt.sourceLayerIndex,V.filter,V.layers,V.availableImages,P);for(let pt in ct){let ft=Y[pt]=Y[pt]||[],ht=ct[pt];ht.sort((Ct,Mt)=>{let Bt=lt.featureSortOrder;if(Bt){let Vt=Bt.indexOf(Ct.featureIndex);return Bt.indexOf(Mt.featureIndex)-Vt}return Mt.featureIndex-Ct.featureIndex});for(let Ct of ht)ft.push(Ct)}}return function(lt,ct,pt){for(let ft in lt)for(let ht of lt[ft])Xi(ht,pt[ct[ft].source]);return lt}(Y,P,L)}(this._layers,y,this.sourceCaches,t,C,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(g)}querySourceFeatures(t,i){i&&i.filter&&this._validate(a.y.filter,"querySourceFeatures.filter",i.filter,null,i);let l=this.sourceCaches[t];return l?function(p,g){let y=p.getRenderableIds().map(P=>p.getTileByID(P)),v=[],C={};for(let P=0;P<y.length;P++){let S=y[P],L=S.tileID.canonical.key;C[L]||(C[L]=!0,S.querySourceFeatures(v,g))}return v}(l,i):[]}getLight(){return this.light.getLight()}setLight(t,i={}){this._checkLoaded();let l=this.light.getLight(),p=!1;for(let y in t)if(!a.bE(t[y],l[y])){p=!0;break}if(!p)return;let g={now:ee.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(t,i),this.light.updateTransitions(g)}getProjection(){var t;return(t=this.stylesheet)===null||t===void 0?void 0:t.projection}setProjection(t){if(this._checkLoaded(),this.projection){if(this.projection.name===t.type)return;this.projection.destroy(),delete this.projection}this.stylesheet.projection=t,this._setProjectionInternal(t.type)}getSky(){var t;return(t=this.stylesheet)===null||t===void 0?void 0:t.sky}setSky(t,i={}){this._checkLoaded();let l=this.getSky(),p=!1;if(!t&&!l)return;if(t&&!l)p=!0;else if(!t&&l)p=!0;else for(let y in t)if(!a.bE(t[y],l[y])){p=!0;break}if(!p)return;let g={now:ee.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=t,this.sky.setSky(t,i),this.sky.updateTransitions(g)}_setProjectionInternal(t){let i=function(l){if(Array.isArray(l)){let p=new ep({type:l});return{projection:p,transform:new _l,cameraHelper:new Os(p)}}switch(l){case"mercator":return{projection:new Bn,transform:new Lo,cameraHelper:new bs};case"globe":{let p=new ep({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:p,transform:new _l,cameraHelper:new Os(p)}}case"vertical-perspective":return{projection:new ws,transform:new fl,cameraHelper:new go};default:return a.w(`Unknown projection name: ${l}. Falling back to mercator projection.`),{projection:new Bn,transform:new Lo,cameraHelper:new bs}}}(t);this.projection=i.projection,this.map.migrateProjection(i.transform,i.cameraHelper);for(let l in this.sourceCaches)this.sourceCaches[l].reload()}_validate(t,i,l,p,g={}){return(!g||g.validate!==!1)&&La(this,t.call(a.y,a.e({key:i,style:this.serialize(),value:l,styleSpec:a.v},p)))}_remove(t=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),Eo().off(ba,this._rtlPluginLoaded);for(let i in this._layers)this._layers[i].setEventedParent(null);for(let i in this.sourceCaches){let l=this.sourceCaches[i];l.setEventedParent(null),l.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),t&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(t)}_clearSource(t){this.sourceCaches[t].clearTiles()}_reloadSource(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()}_updateSources(t){for(let i in this.sourceCaches)this.sourceCaches[i].update(t,this.map.terrain)}_generateCollisionBoxes(){for(let t in this.sourceCaches)this._reloadSource(t)}_updatePlacement(t,i,l,p,g=!1){let y=!1,v=!1,C={};for(let P of this._order){let S=this._layers[P];if(S.type!=="symbol")continue;if(!C[S.source]){let D=this.sourceCaches[S.source];C[S.source]=D.getRenderableIds(!0).map(V=>D.getTileByID(V)).sort((V,U)=>U.tileID.overscaledZ-V.tileID.overscaledZ||(V.tileID.isLessThan(U.tileID)?-1:1))}let L=this.crossTileSymbolIndex.addLayer(S,C[S.source],t.center.lng);y=y||L}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((g=g||this._layerOrderChanged||l===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(ee.now(),t.zoom))&&(this.pauseablePlacement=new cl(t,this.map.terrain,this._order,g,i,l,p,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,C),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(ee.now()),v=!0),y&&this.pauseablePlacement.placement.setStale()),v||y)for(let P of this._order){let S=this._layers[P];S.type==="symbol"&&this.placement.updateLayerOpacities(S,C[S.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(ee.now())}_releaseSymbolFadeTiles(){for(let t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()}getImages(t,i){return a._(this,void 0,void 0,function*(){let l=yield this.imageManager.getImages(i.icons);this._updateTilesForChangedImages();let p=this.sourceCaches[i.source];return p&&p.setDependencies(i.tileID.key,i.type,i.icons),l})}getGlyphs(t,i){return a._(this,void 0,void 0,function*(){let l=yield this.glyphManager.getGlyphs(i.stacks),p=this.sourceCaches[i.source];return p&&p.setDependencies(i.tileID.key,i.type,[""]),l})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(t,i={}
721){this._checkLoaded(),t&&this._validate(a.y.glyphs,"glyphs",t,null,i)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=t,this.glyphManager.entries={},this.glyphManager.setURL(t))}addSprite(t,i,l={},p){this._checkLoaded();let g=[{id:t,url:i}],y=[...Pn(this.stylesheet.sprite),...g];this._validate(a.y.sprite,"sprite",y,null,l)||(this.stylesheet.sprite=y,this._loadSprite(g,!0,p))}removeSprite(t){this._checkLoaded();let i=Pn(this.stylesheet.sprite);if(i.find(l=>l.id===t)){if(this._spritesImagesIds[t])for(let l of this._spritesImagesIds[t])this.imageManager.removeImage(l),this._changedImages[l]=!0;i.splice(i.findIndex(l=>l.id===t),1),this.stylesheet.sprite=i.length>0?i:void 0,delete this._spritesImagesIds[t],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"}))}else this.fire(new a.k(new Error(`Sprite "${t}" doesn't exists on this map.`)))}getSprite(){return Pn(this.stylesheet.sprite)}setSprite(t,i={},l){this._checkLoaded(),t&&this._validate(a.y.sprite,"sprite",t,null,i)||(this.stylesheet.sprite=t,t?this._loadSprite(t,!0,l):(this._unloadSprite(),l&&l(null)))}}var Ac=a.aG([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Do{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(t,i,l,p,g,y,v,C,P){this.context=t;let S=this.boundPaintVertexBuffers.length!==p.length;for(let L=0;!S&&L<p.length;L++)this.boundPaintVertexBuffers[L]!==p[L]&&(S=!0);!this.vao||this.boundProgram!==i||this.boundLayoutVertexBuffer!==l||S||this.boundIndexBuffer!==g||this.boundVertexOffset!==y||this.boundDynamicVertexBuffer!==v||this.boundDynamicVertexBuffer2!==C||this.boundDynamicVertexBuffer3!==P?this.freshBind(i,l,p,g,y,v,C,P):(t.bindVertexArray.set(this.vao),v&&v.bind(),g&&g.dynamicDraw&&g.bind(),C&&C.bind(),P&&P.bind())}freshBind(t,i,l,p,g,y,v,C){let P=t.numAttributes,S=this.context,L=S.gl;this.vao&&this.destroy(),this.vao=S.createVertexArray(),S.bindVertexArray.set(this.vao),this.boundProgram=t,this.boundLayoutVertexBuffer=i,this.boundPaintVertexBuffers=l,this.boundIndexBuffer=p,this.boundVertexOffset=g,this.boundDynamicVertexBuffer=y,this.boundDynamicVertexBuffer2=v,this.boundDynamicVertexBuffer3=C,i.enableAttributes(L,t);for(let D of l)D.enableAttributes(L,t);y&&y.enableAttributes(L,t),v&&v.enableAttributes(L,t),C&&C.enableAttributes(L,t),i.bind(),i.setVertexAttribPointers(L,t,g);for(let D of l)D.bind(),D.setVertexAttribPointers(L,t,g);y&&(y.bind(),y.setVertexAttribPointers(L,t,g)),p&&p.bind(),v&&(v.bind(),v.setVertexAttribPointers(L,t,g)),C&&(C.bind(),C.setVertexAttribPointers(L,t,g)),S.currentNumAttributes=P}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}let Zu=(m,t,i,l,p)=>({u_texture:0,u_ele_delta:m,u_fog_matrix:t,u_fog_color:i?i.properties.get("fog-color"):a.b7.white,u_fog_ground_blend:i?i.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:p?0:i?i.calculateFogBlendOpacity(l):0,u_horizon_color:i?i.properties.get("horizon-color"):a.b7.white,u_horizon_fog_blend:i?i.properties.get("horizon-fog-blend"):1,u_is_globe_mode:p?1:0}),Lc={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 br(m){let t=[];for(let i=0;i<m.length;i++){if(m[i]===null)continue;let l=m[i].split(" ");t.push(l.pop())}return t}class Ts{constructor(t,i,l,p,g,y,v,C){let P=t.gl;this.program=P.createProgram();let S=br(i.staticAttributes),L=l?l.getBinderAttributes():[],D=S.concat(L),V=Ne.prelude.staticUniforms?br(Ne.prelude.staticUniforms):[],U=v.staticUniforms?br(v.staticUniforms):[],Q=i.staticUniforms?br(i.staticUniforms):[],Y=l?l.getBinderUniforms():[],tt=V.concat(U).concat(Q).concat(Y),nt=[];for(let Mt of tt)nt.indexOf(Mt)<0&&nt.push(Mt);let lt=l?l.defines():[];mo(P)&&lt.unshift("#version 300 es"),g&&lt.push("#define OVERDRAW_INSPECTOR;"),y&&lt.push("#define TERRAIN3D;"),C&&lt.push(C);let ct=lt.concat(Ne.prelude.fragmentSource,v.fragmentSource,i.fragmentSource).join(`
722`),pt=lt.concat(Ne.prelude.vertexSource,v.vertexSource,i.vertexSource).join(`
723`);mo(P)||(ct=function(Mt){return Mt.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(ct),pt=function(Mt){return Mt.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(pt));let ft=P.createShader(P.FRAGMENT_SHADER);if(P.isContextLost())return void(this.failedToCreate=!0);if(P.shaderSource(ft,ct),P.compileShader(ft),!P.getShaderParameter(ft,P.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${P.getShaderInfoLog(ft)}`);P.attachShader(this.program,ft);let ht=P.createShader(P.VERTEX_SHADER);if(P.isContextLost())return void(this.failedToCreate=!0);if(P.shaderSource(ht,pt),P.compileShader(ht),!P.getShaderParameter(ht,P.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${P.getShaderInfoLog(ht)}`);P.attachShader(this.program,ht),this.attributes={};let Ct={};this.numAttributes=D.length;for(let Mt=0;Mt<this.numAttributes;Mt++)D[Mt]&&(P.bindAttribLocation(this.program,Mt,D[Mt]),this.attributes[D[Mt]]=Mt);if(P.linkProgram(this.program),!P.getProgramParameter(this.program,P.LINK_STATUS))throw new Error(`Program failed to link: ${P.getProgramInfoLog(this.program)}`);P.deleteShader(ht),P.deleteShader(ft);for(let Mt=0;Mt<nt.length;Mt++){let Bt=nt[Mt];if(Bt&&!Ct[Bt]){let Vt=P.getUniformLocation(this.program,Bt);Vt&&(Ct[Bt]=Vt)}}this.fixedUniforms=p(t,Ct),this.terrainUniforms=((Mt,Bt)=>({u_depth:new a.bH(Mt,Bt.u_depth),u_terrain:new a.bH(Mt,Bt.u_terrain),u_terrain_dim:new a.b8(Mt,Bt.u_terrain_dim),u_terrain_matrix:new a.bJ(Mt,Bt.u_terrain_matrix),u_terrain_unpack:new a.bK(Mt,Bt.u_terrain_unpack),u_terrain_exaggeration:new a.b8(Mt,Bt.u_terrain_exaggeration)}))(t,Ct),this.projectionUniforms=((Mt,Bt)=>({u_projection_matrix:new a.bJ(Mt,Bt.u_projection_matrix),u_projection_tile_mercator_coords:new a.bK(Mt,Bt.u_projection_tile_mercator_coords),u_projection_clipping_plane
723:new a.bK(Mt,Bt.u_projection_clipping_plane),u_projection_transition:new a.b8(Mt,Bt.u_projection_transition),u_projection_fallback_matrix:new a.bJ(Mt,Bt.u_projection_fallback_matrix)}))(t,Ct),this.binderUniforms=l?l.getUniforms(t,Ct):[]}draw(t,i,l,p,g,y,v,C,P,S,L,D,V,U,Q,Y,tt,nt,lt){let ct=t.gl;if(this.failedToCreate)return;if(t.program.set(this.program),t.setDepthMode(l),t.setStencilMode(p),t.setColorMode(g),t.setCullFace(y),C){t.activeTexture.set(ct.TEXTURE2),ct.bindTexture(ct.TEXTURE_2D,C.depthTexture),t.activeTexture.set(ct.TEXTURE3),ct.bindTexture(ct.TEXTURE_2D,C.texture);for(let ft in this.terrainUniforms)this.terrainUniforms[ft].set(C[ft])}if(P)for(let ft in P)this.projectionUniforms[Lc[ft]].set(P[ft]);if(v)for(let ft in this.fixedUniforms)this.fixedUniforms[ft].set(v[ft]);Y&&Y.setUniforms(t,this.binderUniforms,U,{zoom:Q});let pt=0;switch(i){case ct.LINES:pt=2;break;case ct.TRIANGLES:pt=3;break;case ct.LINE_STRIP:pt=1}for(let ft of V.get()){let ht=ft.vaos||(ft.vaos={});(ht[S]||(ht[S]=new Do)).bind(t,this,L,Y?Y.getPaintVertexBuffers():[],D,ft.vertexOffset,tt,nt,lt),ct.drawElements(i,ft.primitiveLength*pt,ct.UNSIGNED_SHORT,ft.primitiveOffset*pt*2)}}}function np(m,t,i){let l=1/a.az(i,1,t.transform.tileZoom),p=Math.pow(2,i.tileID.overscaledZ),g=i.tileSize*Math.pow(2,t.transform.tileZoom)/p,y=g*(i.tileID.canonical.x+i.tileID.wrap*p),v=g*i.tileID.canonical.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[l,m.fromScale,m.toScale],u_fade:m.t,u_pixel_coord_upper:[y>>16,v>>16],u_pixel_coord_lower:[65535&y,65535&v]}}let Is=(m,t,i,l)=>{let p=m.style.light,g=p.properties.get("position"),y=[g.x,g.y,g.z],v=a.bN();p.properties.get("anchor")==="viewport"&&a.bO(v,m.transform.bearingInRadians),a.bP(y,y,v);let C=m.transform.transformLightDirection(y),P=p.properties.get("color");return{u_lightpos:y,u_lightpos_globe:C,u_lightintensity:p.properties.get("intensity"),u_lightcolor:[P.r,P.g,P.b],u_vertical_gradient:+t,u_opacity:i,u_fill_translate:l}},Hu=(m,t,i,l,p,g,y)=>a.e(Is(m,t,i,l),np(g,m,y),{u_height_factor:-Math.pow(2,p.overscaledZ)/y.tileSize/8}),Qr=(m,t,i,l)=>a.e(np(t,m,i),{u_fill_translate:l}),qu=(m,t)=>({u_world:m,u_fill_translate:t}),ip=(m,t,i,l,p)=>a.e(Qr(m,t,i,p),{u_world:l}),Wu=(m,t,i,l,p)=>{let g=m.transform,y,v,C=0;if(i.paint.get("circle-pitch-alignment")==="map"){let P=a.az(t,1,g.zoom);y=!0,v=[P,P],C=P/(a.Z*Math.pow(2,t.tileID.overscaledZ))*2*Math.PI*p}else y=!1,v=g.pixelsToGLUnits;return{u_camera_to_center_distance:g.cameraToCenterDistance,u_scale_with_map:+(i.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+y,u_device_pixel_ratio:m.pixelRatio,u_extrude_scale:v,u_globe_extrude_scale:C,u_translate:l}},op=m=>({u_pixel_extrude_scale:[1/m.width,1/m.height]}),Dc=m=>({u_viewport_size:[m.width,m.height]}),Fc=(m,t=1)=>({u_color:m,u_overlay:0,u_overlay_scale:t}),Rc=(m,t,i,l)=>{let p=a.az(m,1,t)/(a.Z*Math.pow(2,m.tileID.overscaledZ))*2*Math.PI*l;return{u_extrude_scale:a.az(m,1,t),u_intensity:i,u_globe_extrude_scale:p}},Bc=(m,t,i,l)=>{let p=a.K();a.bQ(p,0,m.width,m.height,0,0,1);let g=m.context.gl;return{u_matrix:p,u_world:[g.drawingBufferWidth,g.drawingBufferHeight],u_image:i,u_color_ramp:l,u_opacity:t.paint.get("heatmap-opacity")}},rp=(m,t,i)=>{let l=i.paint.get("hillshade-shadow-color"),p=i.paint.get("hillshade-highlight-color"),g=i.paint.get("hillshade-accent-color"),y=i.paint.get("hillshade-illumination-direction")*(Math.PI/180);return i.paint.get("hillshade-illumination-anchor")==="viewport"&&(y+=m.transform.bearingInRadians),{u_image:0,u_latrange:ap(0,t.tileID),u_light:[i.paint.get("hillshade-exaggeration"),y],u_shadow:l,u_highlight:p,u_accent:g}},Jr=(m,t)=>{let i=t.stride,l=a.K();return a.bQ(l,0,a.Z,-8192,0,0,1),a.L(l,l,[0,-8192,0]),{u_matrix:l,u_image:1,u_dimension:[i,i],u_zoom:m.overscaledZ,u_unpack:t.getUnpackVector()}};function ap(m,t){let i=Math.pow(2,t.canonical.z),l=t.canonical.y;return[new a.$(0,l/i).toLngLat().lat,new a.$(0,(l+1)/i).toLngLat().lat]}let xl=(m,t,i,l)=>{let p=m.transform;return{u_translation:lp(m,t,i),u_ratio:l/a.az(t,1,p.zoom),u_device_pixel_ratio:m.pixelRatio,u_units_to_pixels:[1/p.pixelsToGLUnits[0],1/p.pixelsToGLUnits[1]]}},ks=(m,t,i,l,p)=>a.e(xl(m,t,i,l),{u_image:0,u_image_height:p}),Xu=(m,t,i,l,p)=>{let g=m.transform,y=sp(t,g);return{u_translation:lp(m,t,i),u_texsize:t.imageAtlasTexture.size,u_ratio:l/a.az(t,1,g.zoom),u_device_pixel_ratio:m.pixelRatio,u_image:0,u_scale:[y,p.fromScale,p.toScale],u_fade:p.t,u_units_to_pixels:[1/g.pixelsToGLUnits[0],1/g.pixelsToGLUnits[1]]}},vl=(m,t,i,l,p,g)=>{let y=m.lineAtlas,v=sp(t,m.transform),C=i.layout.get("line-cap")==="round",P=y.getDash(p.from,C),S=y.getDash(p.to,C),L=P.width*g.fromScale,D=S.width*g.toScale;return a.e(xl(m,t,i,l),{u_patternscale_a:[v/L,-P.height/2],u_patternscale_b:[v/D,-S.height/2],u_sdfgamma:y.width/(256*Math.min(L,D)*m.pixelRatio)/2,u_image:0,u_tex_y_a:P.y,u_tex_y_b:S.y,u_mix:g.t})};function sp(m,t){return 1/a.az(m,1,t.tileZoom)}function lp(m,t,i){return a.aA(m.transform,t,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}let cp=(m,t,i,l,p)=>{return{u_tl_parent:m,u_scale_parent:t,u_buffer_scale:1,u_fade_t:i.mix,u_opacity:i.opacity*l.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:l.paint.get("raster-brightness-min"),u_brightness_high:l.paint.get("raster-brightness-max"),u_saturation_factor:(y=l.paint.get("raster-saturation"),y>0?1-1/(1.001-y):-y),u_contrast_factor:(g=l.paint.get("raster-contrast"),g>0?1/(1-g):1+g),u_spin_weights:dp(l.paint.get("raster-hue-rotate")),u_coords_top:[p[0].x,p[0].y,p[1].x,p[1].y],u_coords_bottom:[p[3].x,p[3].y,p[2].x,p[2].y]};var g,y};function dp(m){m*=Math.PI/180;let t=Math.sin(m),i=Math.cos(m);return[(2*i+1)/3,(-Math.sqrt(3)*t-i+1)/3,(Math.sqrt(3)*t-i+1)/3]}let Nc=(m,t,i,l,p,g,y,v,C,P,S,L,D)=>{let V=y.transform;return{u_is_size_zoom_constant:+(m==="constant"||m==="source"),u_is_size_feature_constant:+(m==="constant"||m==="camera"),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:V.cameraToCenterDistance,u_pitch:V.pitch/360*2*Math.PI,u_rotate_symbol:+i,u_aspect_ratio:V.width/V.height,u_fade_change:y.options.fadeDuration?y.symbolFadeChange:1,u_label_plane_matrix:v,u_coord_matrix:C,u_is_text:+S,u_pitch_with_map:+l,u_is_along_line:p,u_is_variable_anchor:g,u_texsize:L,u_texture:0,u_translation:P,u_pitched_scale:D}},bl=(m,t,i,l,p,g,y,v,C,P,S,L,D,V)=>{let U=y.transform;return a.e(Nc(m,t,i,l,p,g,y,v,C,P,S,L,V),{u_gamma_scale:l?Math.cos(U.pitch*Math.PI/180)*U.cameraToCenterDistance:1,u_device_pixel_ratio:y.pixelRatio,u_is_halo:1})},pp=(m,t,i,l,p,g,y,v,C,P,S,L,D)=>a.e(bl(m,t,i,l,p,g,y,v,C,P,!0,S,0,D),{u_texsize_icon:L,u_texture_icon:1}
vendor: 5,842 bytes, line 723
723),Cl=(m,t)=>({u_opacity:m,u_color:t}),Qo=(m,t,i,l,p)=>a.e(function(g,y,v,C){let P=v.imageManager.getPattern(g.from.toString()),S=v.imageManager.getPattern(g.to.toString()),{width:L,height:D}=v.imageManager.getPixelSize(),V=Math.pow(2,C.tileID.overscaledZ),U=C.tileSize*Math.pow(2,v.transform.tileZoom)/V,Q=U*(C.tileID.canonical.x+C.tileID.wrap*V),Y=U*C.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:P.tl,u_pattern_br_a:P.br,u_pattern_tl_b:S.tl,u_pattern_br_b:S.br,u_texsize:[L,D],u_mix:y.t,u_pattern_size_a:P.displaySize,u_pattern_size_b:S.displaySize,u_scale_a:y.fromScale,u_scale_b:y.toScale,u_tile_units_to_pixels:1/a.az(C,1,v.transform.tileZoom),u_pixel_coord_upper:[Q>>16,Y>>16],u_pixel_coord_lower:[65535&Q,65535&Y]}}(i,p,t,l),{u_opacity:m}),wl=(m,t)=>{},Vc={fillExtrusion:(m,t)=>({u_lightpos:new a.bL(m,t.u_lightpos),u_lightpos_globe:new a.bL(m,t.u_lightpos_globe),u_lightintensity:new a.b8(m,t.u_lightintensity),u_lightcolor:new a.bL(m,t.u_lightcolor),u_vertical_gradient:new a.b8(m,t.u_vertical_gradient),u_opacity:new a.b8(m,t.u_opacity),u_fill_translate:new a.bM(m,t.u_fill_translate)}),fillExtrusionPattern:(m,t)=>({u_lightpos:new a.bL(m,t.u_lightpos),u_lightpos_globe:new a.bL(m,t.u_lightpos_globe),u_lightintensity:new a.b8(m,t.u_lightintensity),u_lightcolor:new a.bL(m,t.u_lightcolor),u_vertical_gradient:new a.b8(m,t.u_vertical_gradient),u_height_factor:new a.b8(m,t.u_height_factor),u_opacity:new a.b8(m,t.u_opacity),u_fill_translate:new a.bM(m,t.u_fill_translate),u_image:new a.bH(m,t.u_image),u_texsize:new a.bM(m,t.u_texsize),u_pixel_coord_upper:new a.bM(m,t.u_pixel_coord_upper),u_pixel_coord_lower:new a.bM(m,t.u_pixel_coord_lower),u_scale:new a.bL(m,t.u_scale),u_fade:new a.b8(m,t.u_fade)}),fill:(m,t)=>({u_fill_translate:new a.bM(m,t.u_fill_translate)}),fillPattern:(m,t)=>({u_image:new a.bH(m,t.u_image),u_texsize:new a.bM(m,t.u_texsize),u_pixel_coord_upper:new a.bM(m,t.u_pixel_coord_upper),u_pixel_coord_lower:new a.bM(m,t.u_pixel_coord_lower),u_scale:new a.bL(m,t.u_scale),u_fade:new a.b8(m,t.u_fade),u_fill_translate:new a.bM(m,t.u_fill_translate)}),fillOutline:(m,t)=>({u_world:new a.bM(m,t.u_world),u_fill_translate:new a.bM(m,t.u_fill_translate)}),fillOutlinePattern:(m,t)=>({u_world:new a.bM(m,t.u_world),u_image:new a.bH(m,t.u_image),u_texsize:new a.bM(m,t.u_texsize),u_pixel_coord_upper:new a.bM(m,t.u_pixel_coord_upper),u_pixel_coord_lower:new a.bM(m,t.u_pixel_coord_lower),u_scale:new a.bL(m,t.u_scale),u_fade:new a.b8(m,t.u_fade),u_fill_translate:new a.bM(m,t.u_fill_translate)}),circle:(m,t)=>({u_camera_to_center_distance:new a.b8(m,t.u_camera_to_center_distance),u_scale_with_map:new a.bH(m,t.u_scale_with_map),u_pitch_with_map:new a.bH(m,t.u_pitch_with_map),u_extrude_scale:new a.bM(m,t.u_extrude_scale),u_device_pixel_ratio:new a.b8(m,t.u_device_pixel_ratio),u_globe_extrude_scale:new a.b8(m,t.u_globe_extrude_scale),u_translate:new a.bM(m,t.u_translate)}),collisionBox:(m,t)=>({u_pixel_extrude_scale:new a.bM(m,t.u_pixel_extrude_scale)}),collisionCircle:(m,t)=>({u_viewport_size:new a.bM(m,t.u_viewport_size)}),debug:(m,t)=>({u_color:new a.bI(m,t.u_color),u_overlay:new a.bH(m,t.u_overlay),u_overlay_scale:new a.b8(m,t.u_overlay_scale)}),depth:wl,clippingMask:wl,heatmap:(m,t)=>({u_extrude_scale:new a.b8(m,t.u_extrude_scale),u_intensity:new a.b8(m,t.u_intensity),u_globe_extrude_scale:new a.b8(m,t.u_globe_extrude_scale)}),heatmapTexture:(m,t)=>({u_matrix:new a.bJ(m,t.u_matrix),u_world:new a.bM(m,t.u_world),u_image:new a.bH(m,t.u_image),u_color_ramp:new a.bH(m,t.u_color_ramp),u_opacity:new a.b8(m,t.u_opacity)}),hillshade:(m,t)=>({u_image:new a.bH(m,t.u_image),u_latrange:new a.bM(m,t.u_latrange),u_light:new a.bM(m,t.u_light),u_shadow:new a.bI(m,t.u_shadow),u_highlight:new a.bI(m,t.u_highlight),u_accent:new a.bI(m,t.u_accent)}),hillshadePrepare:(m,t)=>({u_matrix:new a.bJ(m,t.u_matrix),u_image:new a.bH(m,t.u_image),u_dimension:new a.bM(m,t.u_dimension),u_zoom:new a.b8(m,t.u_zoom),u_unpack:new a.bK(m,t.u_unpack)}),line:(m,t)=>({u_translation:new a.bM(m,t.u_translation),u_ratio:new a.b8(m,t.u_ratio),u_device_pixel_ratio:new a.b8(m,t.u_device_pixel_ratio),u_units_to_pixels:new a.bM(m,t.u_units_to_pixels)}),lineGradient:(m,t)=>({u_translation:new a.bM(m,t.u_translation),u_ratio:new a.b8(m,t.u_ratio),u_device_pixel_ratio:new a.b8(m,t.u_device_pixel_ratio),u_units_to_pixels:new a.bM(m,t.u_units_to_pixels),u_image:new a.bH(m,t.u_image),u_image_height:new a.b8(m,t.u_image_height)}),linePattern:(m,t)=>({u_translation:new a.bM(m,t.u_translation),u_texsize:new a.bM(m,t.u_texsize),u_ratio:new a.b8(m,t.u_ratio),u_device_pixel_ratio:new a.b8(m,t.u_device_pixel_ratio),u_image:new a.bH(m,t.u_image),u_units_to_pixels:new a.bM(m,t.u_units_to_pixels),u_scale:new a.bL(m,t.u_scale),u_fade:new a.b8(m,t.u_fade)}),lineSDF:(m,t)=>({u_translation:new a.bM(m,t.u_translation),u_ratio:new a.b8(m,t.u_ratio),u_device_pixel_ratio:new a.b8(m,t.u_device_pixel_ratio),u_units_to_pixels:new a.bM(m,t.u_units_to_pixels),u_patternscale_a:new a.bM(m,t.u_patternscale_a),u_patternscale_b:new a.bM(m,t.u_patternscale_b),u_sdfgamma:new a.b8(m,t.u_sdfgamma),u_image:new a.bH(m,t.u_image),u_tex_y_a:new a.b8(m,t.u_tex_y_a),u_tex_y_b:new a.b8(m,t.u_tex_y_b),u_mix:new a.b8(m,t.u_mix)}),raster:(m,t)=>({u_tl_parent:new a.bM(m,t.u_tl_parent),u_scale_parent:new a.b8(m,t.u_scale_parent),u_buffer_scale:new a.b8(m,t.u_buffer_scale),u_fade_t:new a.b8(m,t.u_fade_t),u_opacity:new a.b8(m,t.u_opacity),u_image0:new a.bH(m,t.u_image0),u_image1:new a.bH(m,t.u_image1),u_brightness_low:new a.b8(m,t.u_brightness_low),u_brightness_high:new a.b8(m,t.u_brightness_high),u_saturation_factor:new a.b8(m,t.u_saturation_factor),u_contrast_factor:new a.b8(m,t.u_contrast_factor),u_spin_weights:new a.bL(m,t.u_spin_weights),u_coords_top:new a.bK(m,t.u_coords_top),u_coords_bottom:new a.bK(m,t.u_coords_bottom)}),symbolIcon:(m,t)=>
723({u_is_size_zoom_constant:new a.bH(m,t.u_is_size_zoom_constant),u_is_size_feature_constant:new a.bH(m,t.u_is_size_feature_constant),u_size_t:new a.b8(m,t.u_size_t),u_size:new a.b8(m,t.u_size),u_camera_to_center_distance:new a.b8(m,t.u_camera_to_center_distance),u_pitch:new a.b8(m,t.u_pitch),u_rotate_symbol:new a.bH(m,t.u_rotate_symbol),u_aspect_ratio:new a.b8(m,t.u_aspect_ratio),u_fade_change:new a.b8(m,t.u_fade_change),u_label_plane_matrix:new a.bJ(m,t.u_label_plane_matrix),u_coord_matrix:new a.bJ(m,t.u_coord_matrix),u_is_text:new a.bH(m,t.u_is_text),u_pitch_with_map:new a.bH(m,t.u_pitch_with_map),u_is_along_line:new a.bH(m,t.u_is_along_line),u_is_variable_anchor:new a.bH(m,t.u_is_variable_anchor),u_texsize:new a.bM(m,t.u_texsize),u_texture:new a.bH(m,t.u_texture),u_translation:new a.bM(m,t.u_translation),u_pitched_scale:new a.b8(m,t.u_pitched_scale)}),symbolSDF:(m,t)=>({u_is_size_zoom_constant:new a.bH(m,t.u_is_size_zoom_constant),u_is_size_feature_constant:new a.bH(m,t.u_is_size_feature_constant),u_size_t:new a.b8(m,t.u_size_t),u_size:new a.b8(m,t.u_size),u_camera_to_center_distance:new a.b8(m,t.u_camera_to_center_distance),u_pitch:new a.b8(m,t.u_pitch),u_rotate_symbol:new a.bH(m,t.u_rotate_symbol),u_aspect_ratio:new a.b8(m,t.u_aspect_ratio),u_fade_change:new a.b8(m,t.u_fade_change),u_label_plane_matrix:new a.bJ(m,t.u_label_plane_matrix),u_coord_matrix:new a.bJ(m,t.u_coord_matrix),u_is_text:new a.bH(m,t.u_is_text),u_pitch_with_map:new a.bH(m,t.u_pitch_with_map),u_is_along_line:new a.bH(m,t.u_is_along_line),u_is_variable_anchor:new a.bH(m,t.u_is_variable_anchor),u_texsize:new a.bM(m,t.u_texsize),u_texture:new a.bH(m,t.u_texture),u_gamma_scale:new a.b8(m,t.u_gamma_scale),u_device_pixel_ratio:new a.b8(m,t.u_device_pixel_ratio),u_is_halo:new a.bH(m,t.u_is_halo),u_translation:new a.bM(m,t.u_translation),u_pitched_scale:new a.b8(m,t.u_pitched_scale)}),symbolTextAndIcon:(m,t)=>({u_is_size_zoom_constant:new a.bH(m,t.u_is_size_zoom_constant),u_is_size_feature_constant:new a.bH(m,t.u_is_size_feature_constant),u_size_t:new a.b8(m,t.u_size_t),u_size:new a.b8(m,t.u_size),u_camera_to_center_distance:new a.b8(m,t.u_camera_to_center_distance),u_pitch:new a.b8(m,t.u_pitch),u_rotate_symbol:new a.bH(m,t.u_rotate_symbol),u_aspect_ratio:new a.b8(m,t.u_aspect_ratio),u_fade_change:new a.b8(m,t.u_fade_change),u_label_plane_matrix:new a.bJ(m,t.u_label_plane_matrix),u_coord_matrix:new a.bJ(m,t.u_coord_matrix),u_is_text:new a.bH(m,t.u_is_text),u_pitch_with_map:new a.bH(m,t.u_pitch_with_map),u_is_along_line:new a.bH(m,t.u_is_along_line),u_is_variable_anchor:new a.bH(m,t.u_is_variable_anchor),u_texsize:new a.bM(m,t.u_texsize),u_texsize_icon:new a.bM(m,t.u_texsize_icon),u_texture:new a.bH(m,t.u_texture),u_texture_icon:new a.bH(m,t.u_texture_icon),u_gamma_scale:new a.b8(m,t.u_gamma_scale),u_device_pixel_ratio:new a.b8(m,t.u_device_pixel_ratio),u_is_halo:new a.bH(m,t.u_is_halo),u_translation:new a.bM(m,t.u_translation),u_pitched_scale:new a.b8(m,t.u_pitched_scale)}),background:(m,t)=>({u_opacity:new a.b8(m,t.u_opacity),u_color:new a.bI(m,t.u_color)}),backgroundPattern:(m,t)=>({u_opacity:new a.b8(m,t.u_opacity),u_image:new a.bH(m,t.u_image),u_pattern_tl_a:new a.bM(m,t.u_pattern_tl_a),u_pattern_br_a:new a.bM(m,t.u_pattern_br_a),u_pattern_tl_b:new a.bM(m,t.u_pattern_tl_b),u_pattern_br_b:new a.bM(m,t.u_pattern_br_b),u_texsize:new a.bM(m,t.u_texsize),u_mix:new a.b8(m,t.u_mix),u_pattern_size_a:new a.bM(m,t.u_pattern_size_a),u_pattern_size_b:new a.bM(m,t.u_pattern_size_b),u_scale_a:new a.b8(m,t.u_scale_a),u_scale_b:new a.b8(m,t.u_scale_b),u_pixel_coord_upper:new a.bM(m,t.u_pixel_coord_upper),u_pixel_coord_lower:new a.bM(m,t.u_pixel_coord_lower),u_tile_units_to_pixels:new a.b8(m,t.u_tile_units_to_pixels)}),terrain:(m,t)=>({u_texture:new a.bH(m,t.u_texture),u_ele_delta:new a.b8(m,t.u_ele_delta),u_fog_matrix:new a.bJ(m,t.u_fog_matrix),u_fog_color:new a.bI(m,t.u_fog_color),u_fog_ground_blend:new a.b8(m,t.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.b8(m,t.u_fog_ground_blend_opacity),u_horizon_color:new a.bI(m,t.u_horizon_color),u_horizon_fog_blend:new a.b8(m,t.u_horizon_fog_blend),u_is_globe_mode:new a.b8(m,t.u_is_globe_mode)}),terrainDepth:(m,t)=>
723({u_ele_delta:new a.b8(m,t.u_ele_delta)}),terrainCoords:(m,t)=>({u_texture:new a.bH(m,t.u_texture),u_terrain_coords_id:new a.b8(m,t.u_terrain_coords_id),u_ele_delta:new a.b8(m,t.u_ele_delta)}),projectionErrorMeasurement:(m,t)=>({u_input:new a.b8(m,t.u_input),u_output_expected:new a.b8(m,t.u_output_expected)}),atmosphere:(m,t)=>({u_sun_pos:new a.bL(m,t.u_sun_pos),u_atmosphere_blend:new a.b8(m,t.u_atmosphere_blend),u_globe_position:new a.bL(m,t.u_globe_position),u_globe_radius:new a.b8(m,t.u_globe_radius),u_inv_proj_matrix:new a.bJ(m,t.u_inv_proj_matrix)}),sky:(m,t)=>({u_sky_color:new a.bI(m,t.u_sky_color),u_horizon_color:new a.bI(m,t.u_horizon_color),u_horizon:new a.bM(m,t.u_horizon),u_horizon_normal:new a.bM(m,t.u_horizon_normal),u_sky_horizon_blend:new a.b8(m,t.u_sky_horizon_blend),u_sky_blend:new a.b8(m,t.u_sky_blend)})};class jc{constructor(t,i,l){this.context=t;let p=t.gl;this.buffer=p.createBuffer(),this.dynamicDraw=!!l,this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),p.bufferData(p.ELEMENT_ARRAY_BUFFER,i.arrayBuffer,this.dynamicDraw?p.DYNAMIC_DRAW:p.STATIC_DRAW),this.dynamicDraw||delete i.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(t){let i=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),i.bufferSubData(i.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let up={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Uc{constructor(t,i,l,p){this.length=i.length,this.attributes=l,this.itemSize=i.bytesPerElement,this.dynamicDraw=p,this.context=t;let g=t.gl;this.buffer=g.createBuffer(),t.bindVertexBuffer.set(this.buffer),g.bufferData(g.ARRAY_BUFFER,i.arrayBuffer,this.dynamicDraw?g.DYNAMIC_DRAW:g.STATIC_DRAW),this.dynamicDraw||delete i.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(t){if(t.length!==this.length)throw new Error(`Length of new data is ${t.length}, which doesn't match current length of ${this.length}`);let i=this.context.gl;this.bind(),i.bufferSubData(i.ARRAY_BUFFER,0,t.arrayBuffer)}enableAttributes(t,i){for(let l=0;l<this.attributes.length;l++){let p=i.attributes[this.attributes[l].name];p!==void 0&&t.enableVertexAttribArray(p)}}setVertexAttribPointers(t,i,l){for(let p=0;p<this.attributes.length;p++){let g=this.attributes[p],y=i.attributes[g.name];y!==void 0&&t.vertexAttribPointer(y,g.components,t[up[g.type]],!1,this.itemSize,g.offset+this.itemSize*(l||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class He{constructor(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(t){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class $c extends He{getDefault(){return a.b7.transparent}set(t){let i=this.current;(t.r!==i.r||t.g!==i.g||t.b!==i.b||t.a!==i.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)}}class Ku extends He{getDefault(){return 1}set(t){(t!==this.current||this.dirty)&&(this.gl.clearDepth(t),this.current=t,this.dirty=!1)}}class Yu extends He{getDefault(){return 0}set(t){(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this.dirty=!1)}}class Qu extends He{getDefault(){return[!0,!0,!0,!0]}set(t){let i=this.current;(t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2]||t[3]!==i[3]||this.dirty)&&(this.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)}}class Ju extends He{getDefault(){return!0}set(t){(t!==this.current||this.dirty)&&(this.gl.depthMask(t),this.current=t,this.dirty=!1)}}class hp extends He{getDefault(){return 255}set(t){(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this.dirty=!1)}}class th extends He{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(t){let i=this.current;(t.func!==i.func||t.ref!==i.ref||t.mask!==i.mask||this.dirty)&&(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)}}class mp extends He{getDefault(){let t=this.gl;return[t.KEEP,t.KEEP,t.KEEP]}set(t){let i=this.current;(t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2]||this.dirty)&&(this.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)}}class Ml extends He{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;let i=this.gl;t?i.enable(i.STENCIL_TEST):i.disable(i.STENCIL_TEST),this.current=t,this.dirty=!1}}class Pl extends He{getDefault(){return[0,1]}set(t){let i=this.current;(t[0]!==i[0]||t[1]!==i[1]||this.dirty)&&(this.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)}}class Ol extends He{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;let i=this.gl;t?i.enable(i.DEPTH_TEST):i.disable(i.DEPTH_TEST),this.current=t,this.dirty=!1}}class Gc extends He{getDefault(){return this.gl.LESS}set(t){(t!==this.current||this.dirty)&&(this.gl.depthFunc(t),this.current=t,this.dirty=!1)}}class ta extends He{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;let i=this.gl;t?i.enable(i.BLEND):i.disable(i.BLEND),this.current=t,this.dirty=!1}}class Da extends He{getDefault(){let t=this.gl;return[t.ONE,t.ZERO]}set(t){let i=this.current;(t[0]!==i[0]||t[1]!==i[1]||this.dirty)&&(this.gl.blendFunc(t[0],t[1]),this.current=t,this.dirty=!1)}}class ao extends He{getDefault(){return a.b7.transparent}set(t){let i=this.current;(t.r!==i.r||t.g!==i.g||t.b!==i.b||t.a!==i.a||this.dirty)&&(this.gl.blendColor
723(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)}}class gp extends He{getDefault(){return this.gl.FUNC_ADD}set(t){(t!==this.current||this.dirty)&&(this.gl.blendEquation(t),this.current=t,this.dirty=!1)}}class fp extends He{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;let i=this.gl;t?i.enable(i.CULL_FACE):i.disable(i.CULL_FACE),this.current=t,this.dirty=!1}}class Zc extends He{getDefault(){return this.gl.BACK}set(t){(t!==this.current||this.dirty)&&(this.gl.cullFace(t),this.current=t,this.dirty=!1)}}class ea extends He{getDefault(){return this.gl.CCW}set(t){(t!==this.current||this.dirty)&&(this.gl.frontFace(t),this.current=t,this.dirty=!1)}}class Sl extends He{getDefault(){return null}set(t){(t!==this.current||this.dirty)&&(this.gl.useProgram(t),this.current=t,this.dirty=!1)}}class Tl extends He{getDefault(){return this.gl.TEXTURE0}set(t){(t!==this.current||this.dirty)&&(this.gl.activeTexture(t),this.current=t,this.dirty=!1)}}class Es extends He{getDefault(){let t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]}set(t){let i=this.current;(t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2]||t[3]!==i[3]||this.dirty)&&(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)}}class Il extends He{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;let i=this.gl;i.bindFramebuffer(i.FRAMEBUFFER,t),this.current=t,this.dirty=!1}}class _p extends He{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;let i=this.gl;i.bindRenderbuffer(i.RENDERBUFFER,t),this.current=t,this.dirty=!1}}class Fa extends He{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;let i=this.gl;i.bindTexture(i.TEXTURE_2D,t),this.current=t,this.dirty=!1}}class Ra extends He{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;let i=this.gl;i.bindBuffer(i.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}}class yp extends He{getDefault(){return null}set(t){let i=this.gl;i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1}}class Hc extends He{getDefault(){return null}set(t){var i;if(t===this.current&&!this.dirty)return;let l=this.gl;mo(l)?l.bindVertexArray(t):(i=l.getExtension("OES_vertex_array_object"))===null||i===void 0||i.bindVertexArrayOES(t),this.current=t,this.dirty=!1}}class Je extends He{getDefault(){return 4}set(t){if(t===this.current&&!this.dirty)return;let i=this.gl;i.pixelStorei(i.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}}class kl extends He{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;let i=this.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}}class eh extends He{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;let i=this.gl;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}}class El extends He{constructor(t,i){super(t),this.context=t,this.parent=i}getDefault(){return null}}class zs extends El{setDirty(){this.dirty=!0}set(t){if(t===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let i=this.gl;i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}}class nh extends El{set(t){if(t===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let i=this.gl;i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.RENDERBUFFER,t),this.current=t,this.dirty=!1}}class ih extends El{set(t){if(t===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let i=this.gl;i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.RENDERBUFFER,t),this.current=t,this.dirty=!1}}let qc="Framebuffer is not complete";class oh{constructor(t,i,l,p,g){this.context=t,this.width=i,this.height=l;let y=t.gl,v=this.framebuffer=y.createFramebuffer();if(this.colorAttachment=new zs(t,v),p)this.depthAttachment=g?new ih(t,v):new nh(t,v);else if(g)throw new Error("Stencil cannot be set without depth");if(y.checkFramebufferStatus(y.FRAMEBUFFER)!==y.FRAMEBUFFER_COMPLETE)throw new Error(qc)}destroy(){let t=this.context.gl,i=this.colorAttachment.get();if(i&&t.deleteTexture(i),this.depthAttachment){let l=this.depthAttachment.get();l&&t.deleteRenderbuffer(l)}t.deleteFramebuffer(this.framebuffer)}}class Wc{constructor(t){var i,l;if(this.gl=t,this.clearColor=new $c(this),this.clearDepth=new Ku(this),this.clearStencil=new Yu(this),this.colorMask=new Qu(this),this.depthMask=new Ju(this),this.stencilMask=new hp(this),this.stencilFunc=new th(this),this.stencilOp=new mp(this),this.stencilTest=new Ml(this),this.depthRange=new Pl(this),this.depthTest=new Ol(this),this.depthFunc=new Gc(this),this.blend=new ta(this),this.blendFunc=new Da(this),this.blendColor=new ao(this),this.blendEquation=new gp(this),this.cullFace=new fp(this),this.cullFaceSide=new Zc(this),this.frontFace=new ea(this),this.program=new Sl(this),this.activeTexture=new Tl(this),this.viewport=new Es(this),this.bindFramebuffer=new Il(this),this.bindRenderbuffer=new _p(this),this.bindTexture=new Fa(this),this.bindVertexBuffer=new Ra(this),this.bindElementBuffer=new yp(this),this.bindVertexArray=new Hc(this),this.pixelStoreUnpack=new Je(this),this.pixelStoreUnpackPremultiplyAlpha=new kl(this),this.pixelStoreUnpackFlipY=new eh(this),this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=t.getParameter(t.MAX_TEXTURE_SIZE),mo(t)){this.HALF_FLOAT=t.HALF_FLOAT;let p=t.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(i=t.RGBA16F)!==null&&i!==void 0?i:p?.RGBA16F_EXT,this.RGB16F=(l=t.RGB16F)!==null&&l!==void 0?l:p?.RGB16F_EXT,t.getExtension("EXT_color_buffer_float")}else{t.getExtension("EXT_color_buffer_half_float"),t.getExtension("OES_texture_half_float_linear");let p=t.getExtension("OES_texture_half_float");this.HALF_FLOAT=p?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(t,i){return new jc(this,t,i)}createVertexBuffer(t,i,l){return new Uc(this,t,i,l)}createRenderbuffer(t,i,l){let p=this.gl,g=p.createRenderbuffer();return this.bindRenderbuffer.set(g),p.renderbufferStorage(p.RENDERBUFFER,t,i,l),this.bindRenderbuffer.set(null),g}createFramebuffer(t,i,l,p){return new oh(this,t,i,l,p)}clear({color:t,depth:i,stencil:l}){let p=this.gl,g=0;t&&(g|=p.COLOR_BUFFER_BIT,this.clearColor.set(t),this.colorMask.set([!0,!0,!0,!0])),i!==void 0&&(g|=p.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(i),this.depthMask.set(!0)),l!==void 0&&(g|=p.STENCIL_BUFFER_BIT,this.clearStencil.set(l),this.stencilMask.set(255)),p.clear(g)}setCullFace(t){t.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(t.mode),this.frontFace.set(t.frontFace))}setDepthMode(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)}setStencilMode(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)}setColorMode(t){a.bE(t.blendFunction,nn.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(t.blendFunction),this.blendColor.set(t.blendColor)),this.colorMask.set(t.mask)}createVertexArray(){var t;return mo(this.gl)?this.gl.createVertexArray():(t=this.gl.getExtension("OES_vertex_array_object"))===null||t===void 0?void 0:t.createVertexArrayOES()}deleteVertexArray(t){var i;return mo(this.gl)?this.gl.deleteVertexArray(t):(i=this.gl.getExtension("OES_vertex_array_object"))===null||i===void 0?void 0:i.deleteVertexArrayOES(t)}unbindVAO(){this.bindVertexArray.set(null)}}let na;function As(m,t,i,l,p){let g=m.context,y=m.transform,v=g.gl,C=m.useProgram("collisionBox"),P=[],S=0,L=0;for(let tt=0;tt<l.length;tt++){let nt=l[tt],lt=t.getTile(nt).getBucket(i);if(!lt)continue;let ct=p?lt.textCollisionBox:lt.iconCollisionBox,pt=lt.collisionCircleArray;pt.length>0&&(P.push({circleArray:pt,circleOffset:L,coord:nt}),S+=pt.length/4,L=S),ct&&C.draw(g,v.LINES,Re.disabled,We.disabled,m.colorModeForRenderPass(),Qe.disabled,op(m.transform),m.style.map.terrain&&m.style.map.terrain.getTerrainData(nt),y.getProjectionData({overscaledTileID:nt,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),i.id,ct.layoutVertexBuffer,ct.indexBuffer,ct.segments,null,m.transform.zoom,null,null,ct.collisionVertexBuffer)}if(!p||!P.length)return;let D=m.useProgram("collisionCircle"),V=new a.bR;V.resize(4*S),V._trim();let U=0;for(let tt of P)for(let nt=0;nt<tt.circleArray.length/4;nt++){let lt=4*nt,ct=tt.circleArray[lt+0],pt=tt.circleArray[lt+1],ft=tt.circleArray[lt+2],ht=tt.circleArray[lt+3];V.emplace(U++,ct,pt,ft,ht,0),V.emplace(U++,ct,pt,ft,ht,1),V.emplace(U++,ct,pt,ft,ht,2),V.emplace(U++,ct,pt,ft,ht,3)}(!na||na.length<2*S)&&(na=function(tt){let nt=2*tt,lt=new a.bT;lt.resize(nt),lt._trim();for(let ct=0;ct<nt;ct++){let pt=6*ct;lt.uint16[pt+0]=4*ct+0,lt.uint16[pt+1]=4*ct+1,lt.uint16[pt+2]=4*ct+2,lt.uint16[pt+3]=4*ct+2,lt.uint16[pt+4]=4*ct+3,lt.uint16[pt+5]=4*ct+0}return lt}(S));let Q=g.createIndexBuffer(na,!0),Y=g.createVertexBuffer(V,a.bS.members,!0);for(let tt of P){let nt=Dc(m.transform);D.draw(g,v.TRIANGLES,Re.disabled,We.disabled,m.colorModeForRenderPass(),Qe.disabled,nt,m.style.map.terrain&&m.style.map.terrain.getTerrainData(tt.coord),null,i.id,Y,Q,a.aJ.simpleSegment(0,2*tt.cir
723cleOffset,tt.circleArray.length,tt.circleArray.length/2),null,m.transform.zoom,null,null,null)}Y.destroy(),Q.destroy()}let Xc=a.ad(new Float32Array(16));function Kc(m,t,i,l,p,g){let{horizontalAlign:y,verticalAlign:v}=a.aE(m);return new a.P((-(y-.5)*t/p+l[0])*g,(-(v-.5)*i/p+l[1])*g)}function xp(m,t,i,l,p,g){let y=t.tileAnchorPoint.add(new a.P(t.translation[0],t.translation[1]));if(t.pitchWithMap){let v=l.mult(g);i||(v=v.rotate(-p));let C=y.add(v);return ke(C.x,C.y,t.pitchedLabelPlaneMatrix,t.getElevation).point}if(i){let v=On(t.tileAnchorPoint.x+1,t.tileAnchorPoint.y,t).point.sub(m),C=Math.atan(v.y/v.x)+(v.x<0?Math.PI:0);return m.add(l.rotate(C))}return m.add(l)}function zl(m,t,i,l,p,g,y,v,C,P,S,L){let D=m.text.placedSymbolArray,V=m.text.dynamicLayoutVertexArray,U=m.icon.dynamicLayoutVertexArray,Q={};V.clear();for(let Y=0;Y<D.length;Y++){let tt=D.get(Y),nt=tt.hidden||!tt.crossTileID||m.allowVerticalPlacement&&!tt.placedOrientation?null:l[tt.crossTileID];if(nt){let lt=new a.P(tt.anchorX,tt.anchorY),ct={getElevation:L,width:p.width,height:p.height,pitchedLabelPlaneMatrix:g,pitchWithMap:i,transform:p,tileAnchorPoint:lt,translation:P,unwrappedTileID:S},pt=i?fs(lt.x,lt.y,ct):On(lt.x,lt.y,ct),ft=Xe(p.cameraToCenterDistance,pt.signedDistanceFromCamera),ht=a.am(m.textSizeData,v,tt)*ft/a.ay;i&&(ht*=m.tilePixelRatio/y);let{width:Ct,height:Mt,anchor:Bt,textOffset:Vt,textBoxScale:Dt}=nt,oe=Kc(Bt,Ct,Mt,Vt,Dt,ht),Qt=p.getPitchedTextCorrection(lt.x+P[0],lt.y+P[1],S),$t=xp(pt.point,ct,t,oe,-p.bearingInRadians,Qt),fe=m.allowVerticalPlacement&&tt.placedOrientation===a.al.vertical?Math.PI/2:0;for(let Be=0;Be<tt.numGlyphs;Be++)a.as(V,$t,fe);C&&tt.associatedIconIndex>=0&&(Q[tt.associatedIconIndex]={shiftedAnchor:$t,angle:fe})}else ai(tt.numGlyphs,V)}if(C){U.clear();let Y=m.icon.placedSymbolArray;for(let tt=0;tt<Y.length;tt++){let nt=Y.get(tt);if(nt.hidden)ai(nt.numGlyphs,U);else{let lt=Q[tt];if(lt)for(let ct=0;ct<nt.numGlyphs;ct++)a.as(U,lt.shiftedAnchor,lt.angle);else ai(nt.numGlyphs,U)}}m.icon.dynamicLayoutVertexBuffer.updateData(U)}m.text.dynamicLayoutVertexBuffer.updateData(V)}function Al(m,t,i){return i.iconsInText&&t?"symbolTextAndIcon":m?"symbolSDF":"symbolIcon"}function Ll(m,t,i,l,p,g,y,v,C,P,S,L,D){let V=m.context,U=V.gl,Q=m.transform,Y=v==="map",tt=C==="map",nt=v!=="viewport"&&i.layout.get("symbol-placement")!=="point",lt=Y&&!tt&&!nt,ct=!i.layout.get("symbol-sort-key").isConstant(),pt=!1,ft=m.getDepthModeForSublayer(0,Re.ReadOnly),ht=i._unevaluatedLayout.hasValue("text-variable-anchor")||i._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ct=[],Mt=Q.getCircleRadiusCorrection();for(let Bt of l){let Vt=t.getTile(Bt),Dt=Vt.getBucket(i);if(!Dt)continue;let oe=p?Dt.text:Dt.icon;if(!oe||!oe.segments.get().length||!oe.hasVisibleVertices)continue;let Qt=oe.programConfigurations.get(i.id),$t=p||Dt.sdfIcons,fe=p?Dt.textSizeData:Dt.iconSizeData,Be=tt||Q.pitch!==0,ze=m.useProgram(Al($t,p,Dt),Qt),Sn=a.ak(fe,Q.zoom),ln=m.style.map.terrain&&m.style.map.terrain.getTerrainData(Bt),Tn,vn,dn,on,li=[0,0],Jn=null;if(p)vn=Vt.glyphAtlasTexture,dn=U.LINEAR,Tn=Vt.glyphAtlasTexture.size,Dt.iconsInText&&(li=Vt.imageAtlasTexture.size,Jn=Vt.imageAtlasTexture,on=Be||m.options.rotating||m.options.zooming||fe.kind==="composite"||fe.kind==="camera"?U.LINEAR:U.NEAREST);else{let kn=i.layout.get("icon-size").constantOr(0)!==1||Dt.iconsNeedLinear;vn=Vt.imageAtlasTexture,dn=$t||m.options.rotating||m.options.zooming||kn||Be?U.LINEAR:U.NEAREST,Tn=Vt.imageAtlasTexture.size}let fi=a.az(Vt,1,m.transform.zoom),Pi=Pe(Y,m.transform,fi),Vo=a.K();a.an(Vo,Pi);let Pr=Fe(tt,Y,m.transform,fi),nr=a.aA(Q,Vt,g,y),ir=Q.getProjectionData({overscaledTileID:Bt,applyGlobeMatrix:!D,applyTerrainMatrix:!0}),jo=ht&&Dt.hasTextData(),la=i.layout.get("icon-text-fit")!=="none"&&jo&&Dt.hasIconData();if(nt){let kn=m.style.map.terrain?($n,In)=>m.style.map.terrain.getElevation(Bt,$n,In):null,bn=i.layout.get("text-rotation-alignment")==="map";Ke(Dt,m,p,Pi,Vo,tt,P,bn,Bt.toUnwrapped(),Q.width,Q.height,nr,kn)}let ca=p&&ht||la,Qi=nt||ca?Xc:tt?Pi:m.transform.clipSpaceToPixelsMatrix,Or=$t&&i.paint.get(p?"text-halo-width":"icon-halo-width").constantOr(1)!==0,or;or=$t?Dt.iconsInText?pp(fe.kind,Sn,lt,tt,nt,ca,m,Qi,Pr,nr,Tn,li,Mt):bl(fe.kind,Sn,lt,tt,nt,ca,m,Qi,Pr,nr,p,Tn,0,Mt):Nc(fe.kind,Sn,lt,tt,nt,ca,m,Qi,Pr,nr,p,Tn,Mt);let rr={program:ze,buffers:oe,uniformValues:or,projectionData:ir,atlasTexture:vn,atlasTextureIcon:Jn,atlasInterpolation:dn,atlasInterpolationIcon:on,isSDF:$t,hasHalo:Or};if(ct&&Dt.canOverlap){pt=!0;let kn=oe.segments.get();for(let bn of kn)Ct.push({segments:new a.aJ([bn]),sortKey:bn.sortKey,state:rr,terrainData:ln})}else Ct.push({segments:oe.segments,sortKey:0,state:rr,terrainData:ln})}pt&&Ct.sort((Bt,Vt)=>Bt.sortKey-Vt.sortKey);for(let Bt of Ct){let Vt=Bt.state;if(V.activeTexture.set(U.TEXTURE0),Vt.atlasTexture.bind(Vt.atlasInterpolation,U.CLAMP_TO_EDGE),Vt.atlasTextureIcon&&(V.activeTexture.set(U.TEXTURE1),Vt.atlasTextureIcon&&Vt.atlasTextureIcon.bind(Vt.atlasInterpolationIcon,U.CLAMP_TO_EDGE)),Vt.isSDF){let Dt=Vt.uniformValues;Vt.hasHalo&&(Dt.u_is_halo=1,vp(Vt.buffers,Bt.segments,i,m,Vt.program,ft,S,L,Dt,Vt.projectionData,Bt.terrainData)),Dt.u_is_halo=0}vp(Vt.buffers,Bt.segments,i,m,Vt.program,ft,S,L,Vt.uniformValues,Vt.projectionData,Bt.terrainData)}}function vp(m,t,i,l,p,g,y,v,C,P,S){let L=l.context;p.draw(L,L.gl.TRIANGLES,g,y,v,Qe.backCCW,C,S,P,i.id,m.layoutVertexBuffer,m.indexBuffer,t,i.paint,l.transform.zoom,m.programConfigurations.get(i.id),m.dynamicLayoutVertexBuffer,m.opacityVertexBuffer)}function Yc(m,t,i,l,p){let g=m.context,y=g.gl,v=We.disabled,C=new nn([y.ONE,y.ONE],a.b7.transparent,[!0,!0,!0,!0]),P=t.getBucket(i);if(!P)return;let S=l.key,L=i.heatmapFbos.get(S);
723L||(L=Qc(g,t.tileSize,t.tileSize),i.heatmapFbos.set(S,L)),g.bindFramebuffer.set(L.framebuffer),g.viewport.set([0,0,t.tileSize,t.tileSize]),g.clear({color:a.b7.transparent});let D=P.programConfigurations.get(i.id),V=m.useProgram("heatmap",D,!p),U=m.transform.getProjectionData({overscaledTileID:t.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Q=m.style.map.terrain.getTerrainData(l);V.draw(g,y.TRIANGLES,Re.disabled,v,C,Qe.disabled,Rc(t,m.transform.zoom,i.paint.get("heatmap-intensity"),1),Q,U,i.id,P.layoutVertexBuffer,P.indexBuffer,P.segments,i.paint,m.transform.zoom,D)}function rh(m,t,i,l,p){let g=m.context,y=g.gl,v=m.transform;g.setColorMode(m.colorModeForRenderPass());let C=Ls(g,t),P=i.key,S=t.heatmapFbos.get(P);if(!S)return;g.activeTexture.set(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,S.colorAttachment.get()),g.activeTexture.set(y.TEXTURE1),C.bind(y.LINEAR,y.CLAMP_TO_EDGE);let L=v.getProjectionData({overscaledTileID:i,applyTerrainMatrix:p,applyGlobeMatrix:!l});m.useProgram("heatmapTexture").draw(g,y.TRIANGLES,Re.disabled,We.disabled,m.colorModeForRenderPass(),Qe.disabled,Bc(m,t,0,1),null,L,t.id,m.rasterBoundsBuffer,m.quadTriangleIndexBuffer,m.rasterBoundsSegments,t.paint,v.zoom),S.destroy(),t.heatmapFbos.delete(P)}function Qc(m,t,i){var l,p;let g=m.gl,y=g.createTexture();g.bindTexture(g.TEXTURE_2D,y),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.LINEAR);let v=(l=m.HALF_FLOAT)!==null&&l!==void 0?l:g.UNSIGNED_BYTE,C=(p=m.RGBA16F)!==null&&p!==void 0?p:g.RGBA;g.texImage2D(g.TEXTURE_2D,0,C,t,i,0,g.RGBA,v,null);let P=m.createFramebuffer(t,i,!1,!1);return P.colorAttachment.set(y),P}function Ls(m,t){return t.colorRampTexture||(t.colorRampTexture=new Rn(m,t.colorRamp,m.gl.RGBA)),t.colorRampTexture}function Dl(m,t,i,l,p){if(!i||!l||!l.imageAtlas)return;let g=l.imageAtlas.patternPositions,y=g[i.to.toString()],v=g[i.from.toString()];if(!y&&v&&(y=v),!v&&y&&(v=y),!y||!v){let C=p.getPaintProperty(t);y=g[C],v=g[C]}y&&v&&m.setConstantPatternPositions(y,v)}function Jc(m,t,i,l,p,g,y,v){let C=m.context.gl,P="fill-pattern",S=i.paint.get(P),L=S&&S.constantOr(1),D=i.getCrossfadeParameters(),V,U,Q,Y,tt,nt=m.transform,lt=i.paint.get("fill-translate"),ct=i.paint.get("fill-translate-anchor");y?(U=L&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",V=C.LINES):(U=L?"fillPattern":"fill",V=C.TRIANGLES);let pt=S.constantOr(null);for(let ft of l){let ht=t.getTile(ft);if(L&&!ht.patternsLoaded())continue;let Ct=ht.getBucket(i);if(!Ct)continue;let Mt=Ct.programConfigurations.get(i.id),Bt=m.useProgram(U,Mt),Vt=m.style.map.terrain&&m.style.map.terrain.getTerrainData(ft);L&&(m.context.activeTexture.set(C.TEXTURE0),ht.imageAtlasTexture.bind(C.LINEAR,C.CLAMP_TO_EDGE),Mt.updatePaintBuffers(D)),Dl(Mt,P,pt,ht,i);let Dt=nt.getProjectionData({overscaledTileID:ft,applyGlobeMatrix:!v,applyTerrainMatrix:!0}),oe=a.aA(nt,ht,lt,ct);if(y){Y=Ct.indexBuffer2,tt=Ct.segments2;let $t=[C.drawingBufferWidth,C.drawingBufferHeight];Q=U==="fillOutlinePattern"&&L?ip(m,D,ht,$t,oe):qu($t,oe)}else Y=Ct.indexBuffer,tt=Ct.segments,Q=L?Qr(m,D,ht,oe):{u_fill_translate:oe};let Qt;if(m.renderPass==="translucent"&&v){let[$t]=m.getStencilConfigForOverlapAndUpdateStencilID(l);Qt=$t[ft.overscaledZ]}else Qt=m.stencilModeForClipping(ft);Bt.draw(m.context,V,p,Qt,g,Qe.backCCW,Q,Vt,Dt,i.id,Ct.layoutVertexBuffer,Y,tt,i.paint,m.transform.zoom,Mt)}}function Fl(m,t,i,l,p,g,y,v){let C=m.context,P=C.gl,S="fill-extrusion-pattern",L=i.paint.get(S),D=L.constantOr(1),V=i.getCrossfadeParameters(),U=i.paint.get("fill-extrusion-opacity"),Q=L.constantOr(null),Y=m.transform;for(let tt of l){let nt=t.getTile(tt),lt=nt.getBucket(i);if(!lt)continue;let ct=m.style.map.terrain&&m.style.map.terrain.getTerrainData(tt),pt=lt.programConfigurations.get(i.id),ft=m.useProgram(D?"fillExtrusionPattern":"fillExtrusion",pt);D&&(m.context.activeTexture.set(P.TEXTURE0),nt.imageAtlasTexture.bind(P.LINEAR,P.CLAMP_TO_EDGE),pt.updatePaintBuffers(V));let ht=Y.getProjectionData({overscaledTileID:tt,applyGlobeMatrix:!v,applyTerrainMatrix:!0});Dl(pt,S,Q,nt,i);let Ct=a.aA(Y,nt,i.paint.get("fill-extrusion-translate"),i.paint.get("fill-extrusion-translate-anchor")),Mt=i.paint.get("fill-extrusion-vertical-gradient"),Bt=D?Hu(m,Mt,U,Ct,tt,V,nt):Is(m,Mt,U,Ct);ft.draw(C,C.gl.TRIANGLES,p,g,y,Qe.backCCW,Bt,ct,ht,i.id,lt.layoutVertexBuffer,lt.indexBuffer,lt.segments,i.paint,m.transform.zoom,pt,m.style.map.terrain&&lt.centroidVertexBuffer)}}function Ba(m,t,i,l,p,g,y,v,C){var P;let S=m.style.projection,L=m.context,D=m.transform,V=L.gl,U=m.useProgram("hillshade"),Q=!m.options.moving;for(let Y of l){let tt=t.getTile(Y),nt=tt.fbo;if(!nt)continue;let lt=S.getMeshFromTileID(L,Y.canonical,v,!0,"raster"),ct=(P=m.style.map.terrain)===null||P===void 0?void 0:P.getTerrainData(Y);L.activeTexture.set(V.TEXTURE0),V.bindTexture(V.TEXTURE_2D,nt.colorAttachment.get());let pt=D.getProjectionData({overscaledTileID:Y,aligned:Q,applyGlobeMatrix:!C,applyTerrainMatrix:!0});U.draw(L,V.TRIANGLES,g,p[Y.overscaledZ],y,Qe.backCCW,rp(m,tt,i),ct,pt,i.id,lt.vertexBuffer,lt.indexBuffer,lt.segments)}}let Ds=[new a.P(0,0),new a.P(a.Z,0),new a.P(a.Z,a.Z),new a.P(0,a.Z)];function Rl(m,t,i,l,p,g,y,v,C=!1,P=!1){let S=l[l.length-1].overscaledZ,L=m.context,D=L.gl,V=m.useProgram("raster"),U=m.transform,Q=m.style.projection,Y=m.colorModeForRenderPass(),tt=!m.options.moving;for(let nt of l){let lt=m.getDepthModeForSublayer(nt.overscaledZ-S,i.paint.get("raster-opacity")===1?Re.ReadWrite:Re.ReadOnly,D.LESS),ct=t.getTile(nt);ct.registerFadeDuration(i.paint.get("raster-fade-duration"));let pt=t.findLoadedParent(nt,0),ft=t.findLoadedSibling(nt),ht=bp(ct,pt||ft||null,t,i,m.transform,m.style.map.terrain),Ct,Mt,Bt=i.paint.get("raster-resampling")==="nearest"?D.NEAREST:D.LINEAR;L.activeTexture.set(D.TEXTURE0),ct.texture.bind(Bt,D.CLAMP_TO_EDGE,D.LINEAR_MIPMAP_NEAREST),L.activeTexture.set(D.TEXTURE1),pt?(pt.texture.bind(Bt,D.CLAMP_TO_EDGE,D.LINEAR_MIPMAP_NEAREST),Ct=Math.pow(2,pt.tileID.overscaledZ-ct.tileID.overscaledZ
723),Mt=[ct.tileID.canonical.x*Ct%1,ct.tileID.canonical.y*Ct%1]):ct.texture.bind(Bt,D.CLAMP_TO_EDGE,D.LINEAR_MIPMAP_NEAREST),ct.texture.useMipmap&&L.extTextureFilterAnisotropic&&m.transform.pitch>20&&D.texParameterf(D.TEXTURE_2D,L.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,L.extTextureFilterAnisotropicMax);let Vt=m.style.map.terrain&&m.style.map.terrain.getTerrainData(nt),Dt=U.getProjectionData({overscaledTileID:nt,aligned:tt,applyGlobeMatrix:!P,applyTerrainMatrix:!0}),oe=cp(Mt||[0,0],Ct||1,ht,i,v),Qt=Q.getMeshFromTileID(L,nt.canonical,g,y,"raster");V.draw(L,D.TRIANGLES,lt,p?p[nt.overscaledZ]:We.disabled,Y,C?Qe.frontCCW:Qe.backCCW,oe,Vt,Dt,i.id,Qt.vertexBuffer,Qt.indexBuffer,Qt.segments)}}function bp(m,t,i,l,p,g){let y=l.paint.get("raster-fade-duration");if(!g&&y>0){let v=ee.now(),C=(v-m.timeAdded)/y,P=t?(v-t.timeAdded)/y:-1,S=i.getSource(),L=Pt(p,{tileSize:S.tileSize,roundZoom:S.roundZoom}),D=!t||Math.abs(t.tileID.overscaledZ-L)>Math.abs(m.tileID.overscaledZ-L),V=D&&m.refreshedUponExpiration?1:a.ae(D?C:1-P,0,1);return m.refreshedUponExpiration&&C>=1&&(m.refreshedUponExpiration=!1),t?{opacity:1,mix:1-V}:{opacity:V,mix:0}}return{opacity:1,mix:0}}let Un=new a.b7(1,0,0,1),ia=new a.b7(0,1,0,1),so=new a.b7(0,0,1,1),td=new a.b7(1,0,1,1),ed=new a.b7(0,1,1,1);function nd(m,t,i,l){Cr(m,0,t+i/2,m.transform.width,i,l)}function oa(m,t,i,l){Cr(m,t-i/2,0,i,m.transform.height,l)}function Cr(m,t,i,l,p,g){let y=m.context,v=y.gl;v.enable(v.SCISSOR_TEST),v.scissor(t*m.pixelRatio,i*m.pixelRatio,l*m.pixelRatio,p*m.pixelRatio),y.clear({color:g}),v.disable(v.SCISSOR_TEST)}function id(m,t,i){let l=m.context,p=l.gl,g=m.useProgram("debug"),y=Re.disabled,v=We.disabled,C=m.colorModeForRenderPass(),P="$debug",S=m.style.map.terrain&&m.style.map.terrain.getTerrainData(i);l.activeTexture.set(p.TEXTURE0);let L=t.getTileByID(i.key).latestRawTileData,D=Math.floor((L&&L.byteLength||0)/1024),V=t.getTile(i).tileSize,U=512/Math.min(V,512)*(i.overscaledZ/m.transform.zoom)*.5,Q=i.canonical.toString();i.overscaledZ!==i.canonical.z&&(Q+=` => ${i.overscaledZ}`),function(tt,nt){tt.initDebugOverlayCanvas();let lt=tt.debugOverlayCanvas,ct=tt.context.gl,pt=tt.debugOverlayCanvas.getContext("2d");pt.clearRect(0,0,lt.width,lt.height),pt.shadowColor="white",pt.shadowBlur=2,pt.lineWidth=1.5,pt.strokeStyle="white",pt.textBaseline="top",pt.font="bold 36px Open Sans, sans-serif",pt.fillText(nt,5,5),pt.strokeText(nt,5,5),tt.debugOverlayTexture.update(lt),tt.debugOverlayTexture.bind(ct.LINEAR,ct.CLAMP_TO_EDGE)}(m,`${Q} ${D}kB`);let Y=m.transform.getProjectionData({overscaledTileID:i,applyGlobeMatrix:!0,applyTerrainMatrix:!0});g.draw(l,p.TRIANGLES,y,v,nn.alphaBlended,Qe.disabled,Fc(a.b7.transparent,U),null,Y,P,m.debugBuffer,m.quadTriangleIndexBuffer,m.debugSegments),g.draw(l,p.LINE_STRIP,y,v,C,Qe.disabled,Fc(a.b7.red),S,Y,P,m.debugBuffer,m.tileBorderIndexBuffer,m.debugSegments)}function od(m,t,i,l){let{isRenderingGlobe:p}=l,g=m.context,y=g.gl,v=m.transform,C=m.colorModeForRenderPass(),P=m.getDepthModeFor3D(),S=m.useProgram("terrain");g.bindFramebuffer.set(null),g.viewport.set([0,0,m.width,m.height]);for(let L of i){let D=t.getTerrainMesh(L.tileID),V=m.renderToTexture.getTexture(L),U=t.getTerrainData(L.tileID);g.activeTexture.set(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,V.texture);let Q=t.getMeshFrameDelta(v.zoom),Y=v.calculateFogMatrix(L.tileID.toUnwrapped()),tt=Zu(Q,Y,m.style.sky,v.pitch,p),nt=v.getProjectionData({overscaledTileID:L.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});S.draw(g,y.TRIANGLES,P,We.disabled,C,Qe.backCCW,tt,U,nt,"terrain",D.vertexBuffer,D.indexBuffer,D.segments)}}function rd(m,t){if(!t.mesh){let i=new a.aI;i.emplaceBack(-1,-1),i.emplaceBack(1,-1),i.emplaceBack(1,1),i.emplaceBack(-1,1);let l=new a.aK;l.emplaceBack(0,1,2),l.emplaceBack(0,2,3),t.mesh=new Sa(m.createVertexBuffer(i,Ao.members),m.createIndexBuffer(l),a.aJ.simpleSegment(0,0,i.length,l.length))}return t.mesh}class Cp{constructor(t,i){this.context=new Wc(t),this.transform=i,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.ad(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Tt.maxUnderzooming+Tt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Yo}resize(t,i,l){if(this.width=Math.floor(t*l),this.height=Math.floor(i*l),this.pixelRatio=l,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let p of this.style._order)this.style._layers[p].resize()}setup(){let t=this.context,i=new a.aI;i.emplaceBack(0,0),i.emplaceBack(a.Z,0),i.emplaceBack(0,a.Z),i.emplaceBack(a.Z,a.Z),this.tileExtentBuffer=t.createVertexBuffer(i,Ao.members),this.tileExtentSegments=a.aJ.simpleSegment(0,0,4,2);let l=new a.aI;l.emplaceBack(0,0),l.emplaceBack(a.Z,0),l.emplaceBack(0,a.Z),l.emplaceBack(a.Z,a.Z),this.debugBuffer=t.createVertexBuffer(l,Ao.members),this.debugSegments=a.aJ.simpleSegment(0,0,4,5);let p=new a.bY;p.emplaceBack(0,0,0,0),p.emplaceBack(a.Z,0,a.Z,0),p.emplaceBack(0,a.Z,0,a.Z),p.emplaceBack(a.Z,a.Z,a.Z,a.Z),this.rasterBoundsBuffer=t.createVertexBuffer(p,Ac.members),this.rasterBoundsSegments=a.aJ.simpleSegment(0,0,4,2);let g=new a.aI;g.emplaceBack(0,0),g.emplaceBack(a.Z,0),g.emplaceBack(0,a.Z),g.emplaceBack(a.Z,a.Z),this.rasterBoundsBufferPosOnly=t.createVertexBuffer(g,Ao.members),this.rasterBoundsSegmentsPosOnly=a.aJ.simpleSegment(0,0,4,5);let y=new a.aI;
723y.emplaceBack(0,0),y.emplaceBack(1,0),y.emplaceBack(0,1),y.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(y,Ao.members),this.viewportSegments=a.aJ.simpleSegment(0,0,4,2);let v=new a.bZ;v.emplaceBack(0),v.emplaceBack(1),v.emplaceBack(3),v.emplaceBack(2),v.emplaceBack(0),this.tileBorderIndexBuffer=t.createIndexBuffer(v);let C=new a.aK;C.emplaceBack(1,0,2),C.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(C);let P=this.context.gl;this.stencilClearMode=new We({func:P.ALWAYS,mask:0},0,255,P.ZERO,P.ZERO,P.ZERO),this.tileExtentMesh=new Sa(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let t=this.context,i=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let l=a.K();a.bQ(l,0,this.width,this.height,0,0,1),a.M(l,l,[i.drawingBufferWidth,i.drawingBufferHeight,0]);let p={mainMatrix:l,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:l};this.useProgram("clippingMask",null,!0).draw(t,i.TRIANGLES,Re.disabled,this.stencilClearMode,nn.disabled,Qe.disabled,null,null,p,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(t,i,l){if(this.currentStencilSource===t.source||!t.isTileClipped()||!i||!i.length)return;this.currentStencilSource=t.source,this.nextStencilID+i.length>256&&this.clearStencil();let p=this.context;p.setColorMode(nn.disabled),p.setDepthMode(Re.disabled);let g={};for(let y of i)g[y.key]=this.nextStencilID++;this._renderTileMasks(g,i,l,!0),this._renderTileMasks(g,i,l,!1),this._tileClippingMaskIDs=g}_renderTileMasks(t,i,l,p){let g=this.context,y=g.gl,v=this.style.projection,C=this.transform,P=this.useProgram("clippingMask");for(let S of i){let L=t[S.key],D=this.style.map.terrain&&this.style.map.terrain.getTerrainData(S),V=v.getMeshFromTileID(this.context,S.canonical,p,!0,"stencil"),U=C.getProjectionData({overscaledTileID:S,applyGlobeMatrix:!0,applyTerrainMatrix:!0});P.draw(g,y.TRIANGLES,Re.disabled,new We({func:y.ALWAYS,mask:0},L,255,y.KEEP,y.KEEP,y.REPLACE),nn.disabled,l?Qe.disabled:Qe.backCCW,null,D,U,"$clipping",V.vertexBuffer,V.indexBuffer,V.segments)}}_renderTilesDepthBuffer(){let t=this.context,i=t.gl,l=this.style.projection,p=this.transform,g=this.useProgram("depth"),y=this.getDepthModeFor3D(),v=dt(p,{tileSize:p.tileSize});for(let C of v){let P=this.style.map.terrain&&this.style.map.terrain.getTerrainData(C),S=l.getMeshFromTileID(this.context,C.canonical,!0,!0,"raster"),L=p.getProjectionData({overscaledTileID:C,applyGlobeMatrix:!0,applyTerrainMatrix:!0});g.draw(t,i.TRIANGLES,y,We.disabled,nn.disabled,Qe.backCCW,null,P,L,"$clipping",S.vertexBuffer,S.indexBuffer,S.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let t=this.nextStencilID++,i=this.context.gl;return new We({func:i.NOTEQUAL,mask:255},t,255,i.KEEP,i.KEEP,i.REPLACE)}stencilModeForClipping(t){let i=this.context.gl;return new We({func:i.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,i.KEEP,i.KEEP,i.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(t){let i=this.context.gl,l=t.sort((y,v)=>v.overscaledZ-y.overscaledZ),p=l[l.length-1].overscaledZ,g=l[0].overscaledZ-p+1;if(g>1){this.currentStencilSource=void 0,this.nextStencilID+g>256&&this.clearStencil();let y={};for(let v=0;v<g;v++)y[v+p]=new We({func:i.GEQUAL,mask:255},v+this.nextStencilID,255,i.KEEP,i.KEEP,i.REPLACE);return this.nextStencilID+=g,[y,l]}return[{[p]:We.disabled},l]}stencilConfigForOverlapTwoPass(t){let i=this.context.gl,l=t.sort((y,v)=>v.overscaledZ-y.overscaledZ),p=l[l.length-1].overscaledZ,g=l[0].overscaledZ-p+1;if(this.clearStencil(),g>1){let y={},v={};for(let C=0;C<g;C++)y[C+p]=new We({func:i.GREATER,mask:255},g+1+C,255,i.KEEP,i.KEEP,i.REPLACE),v[C+p]=new We({func:i.GREATER,mask:255},1+C,255,i.KEEP,i.KEEP,i.REPLACE);return this.nextStencilID=2*g+1,[y,v,l]}return this.nextStencilID=3,[{[p]:new We({func:i.GREATER,mask:255},2,255,i.KEEP,i.KEEP,i.REPLACE)},{[p]:new We({func:i.GREATER,mask:255},1,255,i.KEEP,i.KEEP,i.REPLACE)},l]}colorModeForRenderPass(){let t=this.context.gl;return this._showOverdrawInspector?new nn([t.CONSTANT_COLOR,t.ONE],new a.b7(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?nn.unblended:nn.alphaBlended}getDepthModeForSublayer(t,i,l){if(!this.opaquePassEnabledForLayer())return Re.disabled;let p=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new Re(l||this.context.gl.LEQUAL,i,[p,p])}getDepthModeFor3D(){return new Re(this.context.gl.LEQUAL,Re.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(t,i){var l,p;this.style=t,this.options=i,this.lineAtlas=t.lineAtlas,this.imageManager=t.imageManager,this.glyphManager=t.glyphManager,this.symbolFadeChange=t.placement.symbolFadeChange(ee.now()),this.imageManager.beginFrame();let g=this.style._order,y=this.style.sourceCaches,v={},C={},P={},S={isRenderingToTexture:!1,isRenderingGlobe:((l=t.projection)===null||l===void 0?void 0:l.transitionState)>0};for(let D in y){let V=y[D];V.used&&V.prepare(this.context),v[D]=V.getVisibleCoordinates(!1),C[D]=v[D].slice().reverse(),P[D]=V.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let D=0;D<g.length;D++)if(this.style._layers[g[D]].is3D()){this.opaquePassCutoff=D;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(let D of g){let V=this.style._layers[D];if(!V.hasOffscreenPass()||V.isHidden(this.transform.zoom))continue;let U=C[V.source];(V.type==="custom"||U.length)&&this.renderLayer(this,y[V.source],V,U,S)}if((p=this.style.projection)===null||p===void 0||p.updateGPUdependent({context:this.context,useProgram:D=>this.useProgram(D)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:i.showOverdrawInspector?a.b7.black:a.b7.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(D,V){let U=D.context,Q=U.gl,Y=((ft,ht,Ct)=>{let Mt=Math.cos(ht.rollInRadians),Bt=Math.sin(ht.rollInRadians),Vt=xt(ht),Dt=ht.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:ft.properties.get("sky-color"),u_horizon_color:ft.properties.get("horizon-color"),u_horizon:[(ht.width/2-Vt*Bt)*Ct,(ht.height/2+Vt*Mt)*Ct],u_horizon_normal:[-Bt,Mt],u_sky_horizon_blend:ft.properties.get("sky-horizon-blend")*ht.height/2*Ct,u_sky_blend:Dt}})(V,D.style.map.transform,D.pixelRatio),tt=new Re(Q.LEQUAL,Re.ReadWrite,[0,1]),nt=We.disabled,lt=D.colorModeForRenderPass(),ct=D.useProgram("sky"),pt=rd(U,V);ct.draw(U,Q.TRIANGLES,tt,nt,lt,Qe.disabled,Y,null,void 0,"sky",pt.vertexBuffer,pt.indexBuffer,pt.segments)}(this,this.style.sky),this._showOverdrawInspector=i.showOverdrawInspector,this.depthRangeFor3D=[0,1-(t._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=g.length-1;this.currentLayer>=0;this.currentLayer--){let D=this.style._layers[g[this.currentLayer]],V=y[D.source],U=v[D.source];this._renderTileClippingMasks(D,U,!1),this.renderLayer(this,V,D,U,S)}this.renderPass="translucent";let L=!1;for(this.currentLayer=0;this.currentLayer<g.length;this.currentLayer++){let D=this.style._layers[g[this.currentLayer]],V=y[D.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(D,S))continue;this.opaquePassEnabledForLayer()||L||(L=!0,S.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());let U=(D.type==="symbol"?P:C)[D.source];this._renderTileClippingMasks(D,v[D.source],!1),this.renderLayer(this,V,D,U,S)}if(S.isRenderingGlobe&&function(D,V,U){let Q=D.context,Y=Q.gl,tt=D.useProgram("atmosphere"),nt=new Re(Y.LEQUAL,Re.ReadOnly,[0,1]),lt=D.transform,ct=function(Dt,oe){let Qt=Dt.properties.get("position"),$t=[-Qt.x,-Qt.y,-Qt.z],fe=a.ad(new Float64Array(16));return Dt.properties.get("anchor")==="map"&&(a.a_(fe,fe,oe.rollInRadians),a.a$(fe,fe,-oe.pitchInRadians),a.a_(fe,fe,oe.bearingInRadians),a.a$(fe,fe,oe.center.lat*Math.PI/180),a.bp(fe,fe,-oe.center.lng*Math.PI/180)
723),a.bX($t,$t,fe),$t}(U,D.transform),pt=lt.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ft=V.properties.get("atmosphere-blend")*pt.projectionTransition;if(ft===0)return;let ht=hl(lt.worldSize,lt.center.lat),Ct=lt.inverseProjectionMatrix,Mt=new Float64Array(4);Mt[3]=1,a.at(Mt,Mt,lt.modelViewProjectionMatrix),Mt[0]/=Mt[3],Mt[1]/=Mt[3],Mt[2]/=Mt[3],Mt[3]=1,a.at(Mt,Mt,Ct),Mt[0]/=Mt[3],Mt[1]/=Mt[3],Mt[2]/=Mt[3],Mt[3]=1;let Bt=((Dt,oe,Qt,$t,fe)=>({u_sun_pos:Dt,u_atmosphere_blend:oe,u_globe_position:Qt,u_globe_radius:$t,u_inv_proj_matrix:fe}))(ct,ft,[Mt[0],Mt[1],Mt[2]],ht,Ct),Vt=rd(Q,V);tt.draw(Q,Y.TRIANGLES,nt,We.disabled,nn.alphaBlended,Qe.disabled,Bt,null,null,"atmosphere",Vt.vertexBuffer,Vt.indexBuffer,Vt.segments)}(this,this.style.sky,this.style.light),this.options.showTileBoundaries){let D=function(V,U){let Q=null,Y=Object.values(V._layers).flatMap(ct=>ct.source&&!ct.isHidden(U)?[V.sourceCaches[ct.source]]:[]),tt=Y.filter(ct=>ct.getSource().type==="vector"),nt=Y.filter(ct=>ct.getSource().type!=="vector"),lt=ct=>{(!Q||Q.getSource().maxzoom<ct.getSource().maxzoom)&&(Q=ct)};return tt.forEach(ct=>lt(ct)),Q||nt.forEach(ct=>lt(ct)),Q}(this.style,this.transform.zoom);D&&function(V,U,Q){for(let Y=0;Y<Q.length;Y++)id(V,U,Q[Y])}(this,D,D.getVisibleCoordinates())}this.options.showPadding&&function(D){let V=D.transform.padding;nd(D,D.transform.height-(V.top||0),3,Un),nd(D,V.bottom||0,3,ia),oa(D,V.left||0,3,so),oa(D,D.transform.width-(V.right||0),3,td);let U=D.transform.centerPoint;(function(Q,Y,tt,nt){Cr(Q,Y-1,tt-10,2,20,nt),Cr(Q,Y-10,tt-1,20,2,nt)})(D,U.x,D.transform.height-U.y,ed)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(t){if(!this.style||!this.style.map||!this.style.map.terrain)return;let i=this.terrainFacilitator.matrix,l=this.transform.modelViewProjectionMatrix,p=this.terrainFacilitator.dirty;p||(p=t?!a.b_(i,l):!a.b$(i,l)),p||(p=this.style.map.terrain.sourceCache.anyTilesAfterTime(this.terrainFacilitator.renderTime)),p&&(a.c0(i,l),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(g,y){let v=g.context,C=v.gl,P=g.transform,S=nn.unblended,L=new Re(C.LEQUAL,Re.ReadWrite,[0,1]),D=y.sourceCache.getRenderableTiles(),V=g.useProgram("terrainDepth");v.bindFramebuffer.set(y.getFramebuffer("depth").framebuffer),v.viewport.set([0,0,g.width/devicePixelRatio,g.height/devicePixelRatio]),v.clear({color:a.b7.transparent,depth:1});for(let U of D){let Q=y.getTerrainMesh(U.tileID),Y=y.getTerrainData(U.tileID),tt=P.getProjectionData({overscaledTileID:U.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),nt={u_ele_delta:y.getMeshFrameDelta(P.zoom)};V.draw(v,C.TRIANGLES,L,We.disabled,S,Qe.backCCW,nt,Y,tt,"terrain",Q.vertexBuffer,Q.indexBuffer,Q.segments)}v.bindFramebuffer.set(null),v.viewport.set([0,0,g.width,g.height])}(this,this.style.map.terrain),function(g,y){let v=g.context,C=v.gl,P=g.transform,S=nn.unblended,L=new Re(C.LEQUAL,Re.ReadWrite,[0,1]),D=y.getCoordsTexture(),V=y.sourceCache.getRenderableTiles(),U=g.useProgram("terrainCoords");v.bindFramebuffer.set(y.getFramebuffer("coords").framebuffer),v.viewport.set([0,0,g.width/devicePixelRatio,g.height/devicePixelRatio]),v.clear({color:a.b7.transparent,depth:1}),y.coordsIndex=[];for(let Q of V){let Y=y.getTerrainMesh(Q.tileID),tt=y.getTerrainData(Q.tileID);v.activeTexture.set(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,D.texture);let nt={u_terrain_coords_id:(255-y.coordsIndex.length)/255,u_texture:0,u_ele_delta:y.getMeshFrameDelta(P.zoom)},lt=P.getProjectionData({overscaledTileID:Q.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});U.draw(v,C.TRIANGLES,L,We.disabled,S,Qe.backCCW,nt,tt,lt,"terrain",Y.vertexBuffer,Y.indexBuffer,Y.segments),y.c
723oordsIndex.push(Q.tileID.key)}v.bindFramebuffer.set(null),v.viewport.set([0,0,g.width,g.height])}(this,this.style.map.terrain))}renderLayer(t,i,l,p,g){l.isHidden(this.transform.zoom)||(l.type==="background"||l.type==="custom"||(p||[]).length)&&(this.id=l.id,a.c1(l)?function(y,v,C,P,S,L){if(y.renderPass!=="translucent")return;let{isRenderingToTexture:D}=L,V=We.disabled,U=y.colorModeForRenderPass();(C._unevaluatedLayout.hasValue("text-variable-anchor")||C._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(Q,Y,tt,nt,lt,ct,pt,ft,ht){let Ct=Y.transform,Mt=Y.style.map.terrain,Bt=lt==="map",Vt=ct==="map";for(let Dt of Q){let oe=nt.getTile(Dt),Qt=oe.getBucket(tt);if(!Qt||!Qt.text||!Qt.text.segments.get().length)continue;let $t=a.ak(Qt.textSizeData,Ct.zoom),fe=a.az(oe,1,Y.transform.zoom),Be=Pe(Bt,Y.transform,fe),ze=tt.layout.get("icon-text-fit")!=="none"&&Qt.hasIconData();if($t){let Sn=Math.pow(2,Ct.zoom-oe.tileID.overscaledZ),ln=Mt?(Tn,vn)=>Mt.getElevation(Dt,Tn,vn):null;zl(Qt,Bt,Vt,ht,Ct,Be,Sn,$t,ze,a.aA(Ct,oe,pt,ft),Dt.toUnwrapped(),ln)}}}(P,y,C,v,C.layout.get("text-rotation-alignment"),C.layout.get("text-pitch-alignment"),C.paint.get("text-translate"),C.paint.get("text-translate-anchor"),S),C.paint.get("icon-opacity").constantOr(1)!==0&&Ll(y,v,C,P,!1,C.paint.get("icon-translate"),C.paint.get("icon-translate-anchor"),C.layout.get("icon-rotation-alignment"),C.layout.get("icon-pitch-alignment"),C.layout.get("icon-keep-upright"),V,U,D),C.paint.get("text-opacity").constantOr(1)!==0&&Ll(y,v,C,P,!0,C.paint.get("text-translate"),C.paint.get("text-translate-anchor"),C.layout.get("text-rotation-alignment"),C.layout.get("text-pitch-alignment"),C.layout.get("text-keep-upright"),V,U,D),v.map.showCollisionBoxes&&(As(y,v,C,P,!0),As(y,v,C,P,!1))}(t,i,l,p,this.style.placement.variableOffsets,g):a.c2(l)?function(y,v,C,P,S){if(y.renderPass!=="translucent")return;let{isRenderingToTexture:L}=S,D=C.paint.get("circle-opacity"),V=C.paint.get("circle-stroke-width"),U=C.paint.get("circle-stroke-opacity"),Q=!C.layout.get("circle-sort-key").isConstant();if(D.constantOr(1)===0&&(V.constantOr(1)===0||U.constantOr(1)===0))return;let Y=y.context,tt=Y.gl,nt=y.transform,lt=y.getDepthModeForSublayer(0,Re.ReadOnly),ct=We.disabled,pt=y.colorModeForRenderPass(),ft=[],ht=nt.getCircleRadiusCorrection();for(let Ct=0;Ct<P.length;Ct++){let Mt=P[Ct],Bt=v.getTile(Mt),Vt=Bt.getBucket(C);if(!Vt)continue;let Dt=C.paint.get("circle-translate"),oe=C.paint.get("circle-translate-anchor"),Qt=a.aA(nt,Bt,Dt,oe),$t=Vt.programConfigurations.get(C.id),fe=y.useProgram("circle",$t),Be=Vt.layoutVertexBuffer,ze=Vt.indexBuffer,Sn=y.style.map.terrain&&y.style.map.terrain.getTerrainData(Mt),ln={programConfiguration:$t,program:fe,layoutVertexBuffer:Be,indexBuffer:ze,uniformValues:Wu(y,Bt,C,Qt,ht),terrainData:Sn,projectionData:nt.getProjectionData({overscaledTileID:Mt,applyGlobeMatrix:!L,applyTerrainMatrix:!0})};if(Q){let Tn=Vt.segments.get();for(let vn of Tn)ft.push({segments:new a.aJ([vn]),sortKey:vn.sortKey,state:ln})}else ft.push({segments:Vt.segments,sortKey:0,state:ln})}Q&&ft.sort((Ct,Mt)=>Ct.sortKey-Mt.sortKey);for(let Ct of ft){let{programConfiguration:Mt,program:Bt,layoutVertexBuffer:Vt,indexBuffer:Dt,uniformValues:oe,terrainData:Qt,projectionData:$t}=Ct.state;Bt.draw(Y,tt.TRIANGLES,lt,ct,pt,Qe.backCCW,oe,Qt,$t,C.id,Vt,Dt,Ct.segments,C.paint,y.transform.zoom,Mt)}}(t,i,l,p,g):a.c3(l)?function(y,v,C,P,S){if(C.paint.get("heatmap-opacity")===0)return;let L=y.context,{isRenderingToTexture:D,isRenderingGlobe:V}=S;if(y.style.map.terrain){for(let U of P){let Q=v.getTile(U);v.hasRenderableParent(U)||(y.renderPass==="offscreen"?Yc(y,Q,C,U,V):y.renderPass==="translucent"&&rh(y,C,U,D,V))}L.viewport.set([0,0,y.width,y.height])}else y.renderPass==="offscreen"?function(U,Q,Y,tt){let nt=U.context,lt=nt.gl,ct=U.transform,pt=We.disabled,ft=new nn([lt.ONE,lt.ONE],a.b7.transparent,[!0,!0,!0,!0]);(function(ht,Ct,Mt){let Bt=ht.gl;ht.activeTexture.set(Bt.TEXTURE1),ht.viewport.set([0,0,Ct.width/4,Ct.height/4]);let Vt=Mt.heatmapFbos.get(a.bU);Vt?(Bt.bindTexture(Bt.TEXTURE_2D,Vt.colorAttachment.get()),ht.bindFramebuffer.set(Vt.framebuffer)):(Vt=Qc(ht,Ct.width/4,Ct.height/4),Mt.heatmapFbos.set(a.bU,Vt))})(nt,U,Y),nt.clear({color:a.b7.transparent});for(let ht=0;ht<tt.length;ht++){let Ct=tt[ht];if(Q.hasRenderableParent(Ct))continue;let Mt=Q.getTile(Ct),Bt=Mt.getBucket(Y);if(!Bt)continue;let Vt=Bt.programConfigurations.get(Y.id),Dt=U.useProgram("heatmap",Vt),oe=ct.getProjectionData({overscaledTileID:Ct,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Qt=ct.getCircleRadiusCorrection();Dt.draw(nt,lt.TRIANGLES,Re.disabled,pt,ft,Qe.backCCW,Rc(Mt,ct.zoom,Y.paint.get("heatmap-intensity"),Qt),null,oe,Y.id,Bt.layoutVertexBuffer,Bt.indexBuffer,Bt.segments,Y.paint,ct.zoom,Vt)}nt.viewport.set([0,0,U.width,U.height])}(y,v,C,P):y.renderPass==="translucent"&&function(U,Q){let Y=U.context,tt=Y.gl;Y.setColorMode(U.colorModeForRenderPass());let nt=Q.heatmapFbos.get(a.bU);nt&&(Y.activeTexture.set(tt.TEXTURE0),tt.bindTexture(tt.TEXTURE_2D,nt.colorAttachment.get()),Y.activeTexture.set(tt.TEXTURE1),Ls(Y,Q).bind(tt.LINEAR,tt.CLAMP_TO_EDGE),U.useProgram("heatmapTexture").draw(Y,tt.TRIANGLES,Re.disabled,We.disabled,U.colorModeForRenderPass(),Qe.disabled,Bc(U,Q,0,1),null,null,Q.id,U.viewportBuffer,U.quadTriangleIndexBuffer,
723U.viewportSegments,Q.paint,U.transform.zoom))}(y,C)}(t,i,l,p,g):a.c4(l)?function(y,v,C,P,S){if(y.renderPass!=="translucent")return;let{isRenderingToTexture:L}=S,D=C.paint.get("line-opacity"),V=C.paint.get("line-width");if(D.constantOr(1)===0||V.constantOr(1)===0)return;let U=y.getDepthModeForSublayer(0,Re.ReadOnly),Q=y.colorModeForRenderPass(),Y=C.paint.get("line-dasharray"),tt=C.paint.get("line-pattern"),nt=tt.constantOr(1),lt=C.paint.get("line-gradient"),ct=C.getCrossfadeParameters(),pt=nt?"linePattern":Y?"lineSDF":lt?"lineGradient":"line",ft=y.context,ht=ft.gl,Ct=y.transform,Mt=!0;for(let Bt of P){let Vt=v.getTile(Bt);if(nt&&!Vt.patternsLoaded())continue;let Dt=Vt.getBucket(C);if(!Dt)continue;let oe=Dt.programConfigurations.get(C.id),Qt=y.context.program.get(),$t=y.useProgram(pt,oe),fe=Mt||$t.program!==Qt,Be=y.style.map.terrain&&y.style.map.terrain.getTerrainData(Bt),ze=tt.constantOr(null);if(ze&&Vt.imageAtlas){let dn=Vt.imageAtlas,on=dn.patternPositions[ze.to.toString()],li=dn.patternPositions[ze.from.toString()];on&&li&&oe.setConstantPatternPositions(on,li)}let Sn=Ct.getProjectionData({overscaledTileID:Bt,applyGlobeMatrix:!L,applyTerrainMatrix:!0}),ln=Ct.getPixelScale(),Tn=nt?Xu(y,Vt,C,ln,ct):Y?vl(y,Vt,C,ln,Y,ct):lt?ks(y,Vt,C,ln,Dt.lineClipsArray.length):xl(y,Vt,C,ln);if(nt)ft.activeTexture.set(ht.TEXTURE0),Vt.imageAtlasTexture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE),oe.updatePaintBuffers(ct);else if(Y&&(fe||y.lineAtlas.dirty))ft.activeTexture.set(ht.TEXTURE0),y.lineAtlas.bind(ft);else if(lt){let dn=Dt.gradients[C.id],on=dn.texture;if(C.gradientVersion!==dn.version){let li=256;if(C.stepInterpolant){let Jn=v.getSource().maxzoom,fi=Bt.canonical.z===Jn?Math.ceil(1<<y.transform.maxZoom-Bt.canonical.z):1;li=a.ae(a.bV(Dt.maxLineLength/a.Z*1024*fi),256,ft.maxTextureSize)}dn.gradient=a.bW({expression:C.gradientExpression(),evaluationKey:"lineProgress",resolution:li,image:dn.gradient||void 0,clips:Dt.lineClipsArray}),dn.texture?dn.texture.update(dn.gradient):dn.texture=new Rn(ft,dn.gradient,ht.RGBA),dn.version=C.gradientVersion,on=dn.texture}ft.activeTexture.set(ht.TEXTURE0),on.bind(C.stepInterpolant?ht.NEAREST:ht.LINEAR,ht.CLAMP_TO_EDGE)}let vn;if(L){let[dn]=y.getStencilConfigForOverlapAndUpdateStencilID(P);vn=dn[Bt.overscaledZ]}else vn=y.stencilModeForClipping(Bt);$t.draw(ft,ht.TRIANGLES,U,vn,Q,Qe.disabled,Tn,Be,Sn,C.id,Dt.layoutVertexBuffer,Dt.indexBuffer,Dt.segments,C.paint,y.transform.zoom,oe,Dt.layoutVertexBuffer2),Mt=!1}}(t,i,l,p,g):a.c5(l)?function(y,v,C,P,S){let L=C.paint.get("fill-color"),D=C.paint.get("fill-opacity");if(D.constantOr(1)===0)return;let{isRenderingToTexture:V}=S,U=y.colorModeForRenderPass(),Q=C.paint.get("fill-pattern"),Y=y.opaquePassEnabledForLayer()&&!Q.constantOr(1)&&L.constantOr(a.b7.transparent).a===1&&D.constantOr(0)===1?"opaque":"translucent";if(y.renderPass===Y){let tt=y.getDepthModeForSublayer(1,y.renderPass==="opaque"?Re.ReadWrite:Re.ReadOnly);Jc(y,v,C,P,tt,U,!1,V)}if(y.renderPass==="translucent"&&C.paint.get("fill-antialias")){let tt=y.getDepthModeForSublayer(C.getPaintProperty("fill-outline-color")?2:0,Re.ReadOnly);Jc(y,v,C,P,tt,U,!0,V)}}(t,i,l,p,g):a.c6(l)?function(y,v,C,P,S){let L=C.paint.get("fill-extrusion-opacity");if(L===0)return;let{isRenderingToTexture:D}=S;if(y.renderPass==="translucent"){let V=new Re(y.context.gl.LEQUAL,Re.ReadWrite,y.depthRangeFor3D);if(L!==1||C.paint.get("fill-extrusion-pattern").constantOr(1))Fl(y,v,C,P,V,We.disabled,nn.disabled,D),Fl(y,v,C,P,V,y.stencilModeFor3D(),y.colorModeForRenderPass(),D);else{let U=y.colorModeForRenderPass();Fl(y,v,C,P,V,We.disabled,U,D)}}}(t,i,l,p,g):a.c7(l)?function(y,v,C,P,S){if(y.renderPass!=="offscreen"&&y.renderPass!=="translucent")return;let{isRenderingToTexture:L}=S,D=y.context,V=y.style.projection.useSubdivision,U=y.getDepthModeForSublayer(0,Re.ReadOnly),Q=y.colorModeForRenderPass();if(y.renderPass==="offscreen")(function(Y,tt,nt,lt,ct,pt,ft){let ht=Y.context,Ct=ht.gl;for(let Mt of nt){let Bt=tt.getTile(Mt),Vt=Bt.dem;if(!Vt||!Vt.data||!Bt.needsHillshadePrepare)continue;let Dt=Vt.dim,oe=Vt.stride,Qt=Vt.getPixels();if(ht.activeTexture.set(Ct.TEXTURE1),ht.pixelStoreUnpackPremultiplyAlpha.set(!1),Bt.demTexture=Bt.demTexture||Y.getTileTexture(oe),Bt.demTexture){let fe=Bt.demTexture;fe.update(Qt,{premultiply:!1}),fe.bind(Ct.NEAREST,Ct.CLAMP_TO_EDGE)}else Bt.demTexture=new Rn(ht,Qt,Ct.RGBA,{premultiply:!1}),Bt.demTexture.bind(Ct.NEAREST,Ct.CLAMP_TO_EDGE);ht.activeTexture.set(Ct.TEXTURE0);let $t=Bt.fbo;if(!$t){let fe=new Rn(ht,{width:Dt,height:Dt,data:null},Ct.RGBA);fe.bind(Ct.LINEAR,Ct.CLAMP_TO_EDGE),$t=Bt.fbo=ht.createFramebuffer(Dt,Dt,!0,!1),$t.colorAttachment.set(fe.texture)}ht.bindFramebuffer.set($t.framebuffer),ht.viewport.set([0,0,Dt,Dt]),Y.useProgram("hillshadePrepare").draw(ht,Ct.TRIANGLES,ct,pt,ft,Qe.disabled,Jr(Bt.tileID,Vt),null,
723null,lt.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments),Bt.needsHillshadePrepare=!1}})(y,v,P,C,U,We.disabled,Q),D.viewport.set([0,0,y.width,y.height]);else if(y.renderPass==="translucent")if(V){let[Y,tt,nt]=y.stencilConfigForOverlapTwoPass(P);Ba(y,v,C,nt,Y,U,Q,!1,L),Ba(y,v,C,nt,tt,U,Q,!0,L)}else{let[Y,tt]=y.getStencilConfigForOverlapAndUpdateStencilID(P);Ba(y,v,C,tt,Y,U,Q,!1,L)}}(t,i,l,p,g):a.c8(l)?function(y,v,C,P,S){if(y.renderPass!=="translucent"||C.paint.get("raster-opacity")===0||!P.length)return;let{isRenderingToTexture:L}=S,D=v.getSource(),V=y.style.projection.useSubdivision;if(D instanceof Ki)Rl(y,v,C,P,null,!1,!1,D.tileCoords,D.flippedWindingOrder,L);else if(V){let[U,Q,Y]=y.stencilConfigForOverlapTwoPass(P);Rl(y,v,C,Y,U,!1,!0,Ds,!1,L),Rl(y,v,C,Y,Q,!0,!0,Ds,!1,L)}else{let[U,Q]=y.getStencilConfigForOverlapAndUpdateStencilID(P);Rl(y,v,C,Q,U,!1,!0,Ds,!1,L)}}(t,i,l,p,g):a.c9(l)?function(y,v,C,P,S){let L=C.paint.get("background-color"),D=C.paint.get("background-opacity");if(D===0)return;let{isRenderingToTexture:V}=S,U=y.context,Q=U.gl,Y=y.style.projection,tt=y.transform,nt=tt.tileSize,lt=C.paint.get("background-pattern");if(y.isPatternMissing(lt))return;let ct=!lt&&L.a===1&&D===1&&y.opaquePassEnabledForLayer()?"opaque":"translucent";if(y.renderPass!==ct)return;let pt=We.disabled,ft=y.getDepthModeForSublayer(0,ct==="opaque"?Re.ReadWrite:Re.ReadOnly),ht=y.colorModeForRenderPass(),Ct=y.useProgram(lt?"backgroundPattern":"background"),Mt=P||dt(tt,{tileSize:nt,terrain:y.style.map.terrain});lt&&(U.activeTexture.set(Q.TEXTURE0),y.imageManager.bind(y.context));let Bt=C.getCrossfadeParameters();for(let Vt of Mt){let Dt=tt.getProjectionData({overscaledTileID:Vt,applyGlobeMatrix:!V,applyTerrainMatrix:!0}),oe=lt?Qo(D,y,lt,{tileID:Vt,tileSize:nt},Bt):Cl(D,L),Qt=y.style.map.terrain&&y.style.map.terrain.getTerrainData(Vt),$t=Y.getMeshFromTileID(U,Vt.canonical,!1,!0,"raster");Ct.draw(U,Q.TRIANGLES,ft,pt,ht,Qe.backCCW,oe,Qt,Dt,C.id,$t.vertexBuffer,$t.indexBuffer,$t.segments)}}(t,0,l,p,g):a.ca(l)&&function(y,v,C,P){let{isRenderingGlobe:S}=P,L=y.context,D=C.implementation,V=y.style.projection,U=y.transform,Q=U.getProjectionDataForCustomLayer(S),Y={farZ:U.farZ,nearZ:U.nearZ,fov:U.fov*Math.PI/180,modelViewProjectionMatrix:U.modelViewProjectionMatrix,projectionMatrix:U.projectionMatrix,shaderData:{variantName:V.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793;
724uniform mat4 u_projection_matrix;
725${V.shaderPreludeCode.vertexSource}`,define:V.shaderDefine},defaultProjectionData:Q},tt=D.renderingMode?D.renderingMode:"2d";if(y.renderPass==="offscreen"){let nt=D.prerender;nt&&(y.setCustomLayerDefaults(),L.setColorMode(y.colorModeForRenderPass()),nt.call(D,L.gl,Y),L.setDirty(),y.setBaseState())}else if(y.renderPass==="translucent"){y.setCustomLayerDefaults(),L.setColorMode(y.colorModeForRenderPass()),L.setStencilMode(We.disabled);let nt=tt==="3d"?y.getDepthModeFor3D():y.getDepthModeForSublayer(0,Re.ReadOnly);L.setDepthMode(nt),D.render(L.gl,Y),L.setDirty(),y.setBaseState(),L.bindFramebuffer.set(null)}}(t,0,l,g))}saveTileTexture(t){let i=this._tileTextures[t.size[0]];i?i.push(t):this._tileTextures[t.size[0]]=[t]}getTileTexture(t){let i=this._tileTextures[t];return i&&i.length>0?i.pop():null}isPatternMissing(t){if(!t)return!1;if(!t.from||!t.to)return!0;let i=this.imageManager.getPattern(t.from.toString()),l=this.imageManager.getPattern(t.to.toString());return!i||!l}useProgram(t,i,l=!1){this.cache=this.cache||{};let p=!!this.style.map.terrain,g=this.style.projection,y=t+(i?i.cacheKey:"")+`/${l?wi:g.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(p?"/terrain":"");return this.cache[y]||(this.cache[y]=new Ts(this.context,Ne[t],i,Vc[t],this._showOverdrawInspector,p,l?Ne.projectionMercator:g.shaderPreludeCode,l?Bi:g.shaderDefine)),this.cache[y]}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 t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new Rn(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:t,drawingBufferHeight:i}=this.context.gl;return this.width!==t||this.height!==i}}function ad(m,t){let i,l=!1,p=null,g=null,y=()=>{p=null,l&&(m.apply(g,i),p=setTimeout(y,t),l=!1)};return(...v)=>(l=!0,g=this,i=v,p||y(),p)}class sd{constructor(t){this._getCurrentHash=()=>{let i=window.location.hash.replace("#","");if(this._hashName){let l;return i.split("&").map(p=>
725p.split("=")).forEach(p=>{p[0]===this._hashName&&(l=p)}),(l&&l[1]||"").split("/")}return i.split("/")},this._onHashChange=()=>{let i=this._getCurrentHash();if(!this._isValidHash(i))return!1;let l=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(i[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+i[2],+i[1]],zoom:+i[0],bearing:l,pitch:+(i[4]||0)}),!0},this._updateHashUnthrottled=()=>{let i=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,i)},this._removeHash=()=>{let i=this._getCurrentHash();if(i.length===0)return;let l=i.join("/"),p=l;p.split("&").length>0&&(p=p.split("&")[0]),this._hashName&&(p=`${this._hashName}=${l}`);let g=window.location.hash.replace(p,"");g.startsWith("#&")?g=g.slice(0,1)+g.slice(2):g==="#"&&(g="");let y=window.location.href.replace(/(#.+)?$/,g);y=y.replace("&&","&"),window.history.replaceState(window.history.state,null,y)},this._updateHash=ad(this._updateHashUnthrottled,300),this._hashName=t&&encodeURIComponent(t)}addTo(t){return this._map=t,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(t){let i=this._map.getCenter(),l=Math.round(100*this._map.getZoom())/100,p=Math.ceil((l*Math.LN2+Math.log(512/360/.5))/Math.LN10),g=Math.pow(10,p),y=Math.round(i.lng*g)/g,v=Math.round(i.lat*g)/g,C=this._map.getBearing(),P=this._map.getPitch(),S="";if(S+=t?`/${y}/${v}/${l}`:`${l}/${v}/${y}`,(C||P)&&(S+="/"+Math.round(10*C)/10),P&&(S+=`/${Math.round(P)}`),this._hashName){let L=this._hashName,D=!1,V=window.location.hash.slice(1).split("&").map(U=>{let Q=U.split("=")[0];return Q===L?(D=!0,`${Q}=${S}`):U}).filter(U=>U);return D||V.push(`${L}=${S}`),`#${V.join("&")}`}return`#${S}`}_isValidHash(t){if(t.length<3||t.some(isNaN))return!1;try{new a.Q(+t[2],+t[1])}catch{return!1}let i=+t[0],l=+(t[3]||0),p=+(t[4]||0);return i>=this._map.getMinZoom()&&i<=this._map.getMaxZoom()&&l>=-180&&l<=180&&p>=this._map.getMinPitch()&&p<=this._map.getMaxPitch()}}let fo={linearity:.3,easing:a.cb(0,0,.3,1)},wp=a.e({deceleration:2500,maxSpeed:1400},fo),Mp=a.e({deceleration:20,maxSpeed:1400},fo),Pp=a.e({deceleration:1e3,maxSpeed:360},fo),Op=a.e({deceleration:1e3,maxSpeed:90},fo),Sp=a.e({deceleration:1e3,maxSpeed:360},fo);class Tp{constructor(t){this._map=t,this.clear()}clear(){this._inertiaBuffer=[]}record(t){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:ee.now(),settings:t})}_drainInertiaBuffer(){let t=this._inertiaBuffer,i=ee.now();for(;t.length>0&&i-t[0].time>160;)t.shift()}_onMoveEnd(t){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let i={zoom:0,bearing:0,pitch:0,roll:0,pan:new a.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:g}of this._inertiaBuffer)i.zoom+=g.zoomDelta||0,i.bearing+=g.bearingDelta||0,i.pitch+=g.pitchDelta||0,i.roll+=g.rollDelta||0,g.panDelta&&i.pan._add(g.panDelta),g.around&&(i.around=g.around),g.pinchAround&&(i.pinchAround=g.pinchAround);let l=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,p={};if(i.pan.mag()){let g=wr(i.pan.mag(),l,a.e({},wp,t||{})),y=i.pan.mult(g.amount/i.pan.mag()),v=this._map.cameraHelper.handlePanInertia(y,this._map.transform);p.center=v.easingCenter,p.offset=v.easingOffset,Na(p,g)}if(i.zoom){let g=wr(i.zoom,l,Mp);p.zoom=this._map.transform.zoom+g.amount,Na(p,g)}if(i.bearing){let g=wr(i.bearing,l,Pp);p.bearing=this._map.transform.bearing+a.ae(g.amount,-179,179),Na(p,g)}if(i.pitch){let g=wr(i.pitch,l,Op);p.pitch=this._map.transform.pitch+g.amount,Na(p,g)}if(i.roll){let g=wr(i.roll,l,Sp);p.roll=this._map.transform.roll+a.ae(g.amount,-179,179),Na(p,g)}if(p.zoom||p.bearing){let g=i.pinchAround===void 0?i.around:i.pinchAround;p.around=g?this._map.unproject(g):this._map.getCenter()}return this.clear(),a.e(p,{noMoveStart:!0})}}function Na(m,t){(!m.duration||m.duration<t.duration)&&(m.duration=t.duration,m.easing=t.easing)}function wr(m,t,i){let{maxSpeed:l,linearity:p,deceleration:g}=i,y=a.ae(m*p/(t/1e3),-l,l),v=Math.abs(y)/(g*p);return{easing:i.easing,duration:1e3*v,amount:y*(v/2)}}class Vi extends a.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,i,l,p={}){l=l instanceof MouseEvent?l:new MouseEvent(t,l);let g=bt.mousePos(i.getCanvas(),l),y=i.unproject(g);super(t,a.e({point:g,lngLat:y,originalEvent:l},p)),this._defaultPrevented=!1,this.target=i}}class Li extends a.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,i,l){let p=t==="touchend"?l.changedTouches:l.touches,g=bt.touchPos(i.getCanvasContainer(),p),y=g.map(C=>i.unproject(C)),v=g.reduce((C,P,S,L)=>C.add(P.div(L.length)),new a.P(0,0));super(t,{points:g,point:v,lngLats:y,lngLat:i.unproject(v),originalEvent:l}),this._defaultPrevented=!1}}class _o extends a.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,i,l){super(t,{originalEvent:l}),this._defaultPrevented=!1}}class Ip{constructor(t,i){this._map=t,this._clickTolerance=i.clickTolerance}reset(){delete this._mousedownPos}wheel(t){return this._firePreventable(new _o(t.type,this._map,t))}mousedown(t,i){return this._mousedownPos=i,this._firePreventable(new Vi(t.type,this._map,t))}mouseup(t){this._map.fire(new Vi(t.type,this._map,t))}click(t,i){this._mousedownPos&&this._mousedownPos.dist(i)>=this._clickTolerance||this._map.fire(new Vi(t.type,this._map,t))}dblclick(t){return this._firePreventable(new Vi(t.type,this._map,t))}mouseover(t){this._map.fire(new Vi(t.type,this._map,t))}mouseout(t){this._map.fire(new Vi(t.type,this._map,t))}touchstart(t){return this._firePreventable(new Li(t.type,this._map,t))}touchmove(t){this._map.fire(new Li(t.type,this._map,t))}touchend(t){this._map.fire(new Li(t.type,this._map,t))}touchcancel(t){this._map.fire(new Li(t.type,this._map,t))}_firePreventable(t){if(this._map.fire(t),t.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Fo{constructor(t){this._map=t}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(t){this._map.fire(new Vi(t.type,this._map,t))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Vi("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(t){this._delayContextMenu?this._contextMenuEvent=t:this._ignoreContextMenu||this._map.fire(new Vi(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ro{constructor(t){this._map=t}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(t){return this.transform.screenPointToLocation(a.P.convert(t),this._map.terrain)}}class kp{constructor(t,i){this._map=t,this._tr=new Ro(t),this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=i.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(t,i){this.isEnabled()&&t.shiftKey&&t.button===0&&(bt.disableDrag(),this._startPos=this._lastPos=i,this._active=!0)}mousemoveWindow(t,i){if(!this._active)return;let l=i;if(this._lastPos.equals(l)||!this._box&&l.dist(this._startPos)<this._clickTolerance)return;let p=this._startPos;this._lastPos=l,this._box||(this._box=bt.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",t));let g=Math.min(p.x,l.x),y=Math.max(p.x,l.x),v=Math.min(p.y,l.y),C=Math.max(p.y,l.y);bt.setTransform(this._box,`translate(${g}px,${v}px)`),this._box.style.width=y-g+"px",this._box.style.height=C-v+"px"}mouseupWindow(t,i){if(!this._active||t.button!==0)return;let l=this._startPos,p=i;if(this.reset(),bt.suppressClick(),l.x!==p.x||l.y!==p.y)return this._map.fire(new a.l("boxzoomend",{originalEvent:t})),{cameraAnimation:g=>g.fitScreenCoordinates(l,p,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",t)}keydown(t){this._active&&t.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",t))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(bt.remove(this._box),this._box=null),bt.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(t,i){return this._map.fire(new a.l(t,{originalEvent:i}))}}function ld(m,t){if(m.length!==t.length)throw new Error(`The number of touches and points are not equal - touches ${m.length}, points ${t.length}`);let i={};for(let l=0;l<m.length;l++)i[m[l].identifier]=t[l];return i}class ah{constructor(t){this.reset(),this.numTouches=t.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(t,i,l){(this.centroid||l.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=t.timeStamp),l.length===this.numTouches&&(this.centroid=function(p){let g=new a.P(0,0);for(let y of p)g._add(y);return g.div(p.length)}(i),this.touches=ld(l,i)))}touchmove(t,i,l){if(this.aborted||!this.centroid)return;let p=ld(l,i);for(let g in this.touches){let y=p[g];(!y||y.dist(this.touches[g])>30)&&(this.aborted=!0)}}touchend(t,i,l){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),l.length===0){let p=!this.aborted&&this.centroid;if(this.reset(),p)return p}}}class cd{constructor(t){this.singleTap=new ah(t),this.numTaps=t.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(t,i,l){this.singleTap.touchstart(t,i,l)}touchmove(t,i,l){this.singleTap.touchmove(t,i,l)}touchend(t,i,l){let p=this.singleTap.touchend(t,i,l);
725if(p){let g=t.timeStamp-this.lastTime<500,y=!this.lastTap||this.lastTap.dist(p)<30;if(g&&y||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=p,this.count===this.numTaps)return this.reset(),p}}}class Ep{constructor(t){this._tr=new Ro(t),this._zoomIn=new cd({numTouches:1,numTaps:2}),this._zoomOut=new cd({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(t,i,l){this._zoomIn.touchstart(t,i,l),this._zoomOut.touchstart(t,i,l)}touchmove(t,i,l){this._zoomIn.touchmove(t,i,l),this._zoomOut.touchmove(t,i,l)}touchend(t,i,l){let p=this._zoomIn.touchend(t,i,l),g=this._zoomOut.touchend(t,i,l),y=this._tr;return p?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:v=>v.easeTo({duration:300,zoom:y.zoom+1,around:y.unproject(p)},{originalEvent:t})}):g?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:v=>v.easeTo({duration:300,zoom:y.zoom-1,around:y.unproject(g)},{originalEvent:t})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Jo{constructor(t){this._enabled=!!t.enable,this._moveStateManager=t.moveStateManager,this._clickTolerance=t.clickTolerance||1,this._moveFunction=t.move,this._activateOnStart=!!t.activateOnStart,t.assignEvents(this),this.reset()}reset(t){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(t)}_move(...t){let i=this._moveFunction(...t);if(i.bearingDelta||i.pitchDelta||i.rollDelta||i.around||i.panDelta)return this._active=!0,i}dragStart(t,i){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(t)&&(this._moveStateManager.startMove(t),this._lastPoint=Array.isArray(i)?i[0]:i,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(t,i){if(!this.isEnabled())return;let l=this._lastPoint;if(!l)return;if(t.preventDefault(),!this._moveStateManager.isValidMoveEvent(t))return void this.reset(t);let p=Array.isArray(i)?i[0]:i;return!this._moved&&p.dist(l)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=p,this._move(l,p))}dragEnd(t){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(t)&&(this._moved&&bt.suppressClick(),this.reset(t))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}let tr={0:1,2:2};class de{constructor(t){this._correctEvent=t.checkCorrectEvent}startMove(t){let i=bt.mouseButton(t);this._eventButton=i}endMove(t){delete this._eventButton}isValidStartEvent(t){return this._correctEvent(t)}isValidMoveEvent(t){return!function(i,l){let p=tr[l];return i.buttons===void 0||(i.buttons&p)!==p}(t,this._eventButton)}isValidEndEvent(t){return bt.mouseButton(t)===this._eventButton}}class zp{constructor(){this._firstTouch=void 0}_isOneFingerTouch(t){return t.targetTouches.length===1}_isSameTouchEvent(t){return t.targetTouches[0].identifier===this._firstTouch}startMove(t){this._firstTouch=t.targetTouches[0].identifier}endMove(t){delete this._firstTouch}isValidStartEvent(t){return this._isOneFingerTouch(t)}isValidMoveEvent(t){return this._isOneFingerTouch(t)&&this._isSameTouchEvent(t)}isValidEndEvent(t){return this._isOneFingerTouch(t)&&this._isSameTouchEvent(t)}}class dd{constructor(t=new de({checkCorrectEvent:()=>!0}),i=new zp){this.mouseMoveStateManager=t,this.oneFingerTouchMoveStateManager=i}_executeRelevantHandler(t,i,l){return t instanceof MouseEvent?i(t):typeof TouchEvent<"u"&&t instanceof TouchEvent?l(t):void 0}startMove(t){this._executeRelevantHandler(t,i=>this.mouseMoveStateManager.startMove(i),i=>this.oneFingerTouchMoveStateManager.startMove(i))}endMove(t){this._executeRelevantHandler(t,i=>this.mouseMoveStateManager.endMove(i),i=>this.oneFingerTouchMoveStateManager.endMove(i))}isValidStartEvent(t){return this._executeRelevantHandler(t,i=>this.mouseMoveStateManager.isValidStartEvent(i),i=>this.oneFingerTouchMoveStateManager.isValidStartEvent(i))}isValidMoveEvent(t){return this._executeRelevantHandler(t,i=>this.mouseMoveStateManager.isValidMoveEvent(i),i=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(i))}isValidEndEvent(t){return this._executeRelevantHandler(t,i=>this.mouseMoveStateManager.isValidEndEvent(i),i=>this.oneFingerTouchMoveStateManager.isValidEndEvent(i))}}let Fs=m=>{m.mousedown=m.dragStart,m.mousemoveWindow=m.dragMove,m.mouseup=m.dragEnd,m.contextmenu=t=>{t.preventDefault()}};class Rs{constructor(t,i){this._clickTolerance=t.clickTolerance||1,this._map=i,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new a.P(0,0)}_shouldBePrevented(t){return t<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(t,i,l){return this._calculateTransform(t,i,l)}touchmove(t,i,l){if(this._active){if(!this._shouldBePrevented(l.length))return t.preventDefault(),this._calculateTransform(t,i,l);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",t)}}touchend(t,i,l){this._calculateTransform(t,i,l),this._active&&this._shouldBePrevented(l.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(t,i,l){l.length>0&&(this._active=!0);let p=ld(l,i),g=new a.P(0,0),y=new a.P(0,0),v=0;for(let P in p){let S=p[P],L=this._touches[P];L&&(g._add(S),y._add(S.sub(L)),v++,p[P]=S)}if(this._touches=p,this._shouldBePrevented(v)||!y.mag())return;let C=y.div(v);return this._sum._add(C),this._sum.mag()<this._clickTolerance?void 0:{around:g.div(v),panDelta:C}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ra{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(t,i,l){this._firstTwoTouches||l.length<2||(this._firstTwoTouches=[l[0].identifier,l[1].identifier],this._start([i[0],i[1]]))}touchmove(t,i,l){if(!this._firstTwoTouches)return;t.preventDefault();let[p,g]=this._firstTwoTouches,y=Bs(l,i,p),v=Bs(l,i,g);if(!y||!v)return;let C=this._aroundCenter?null:y.add(v).div(2);return this._move([y,v],C,t)}touchend(t,i,l){if(!this._firstTwoTouches)return;let[p,g]=this._firstTwoTouches,y=Bs(l,i,p),v=Bs(l,i,g);y&&v||(this._active&&bt.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(t){this._enabled=!0,this._aroundCenter=!!t&&t.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Bs(m,t,i){for(let l=0;l<m.length;l++)if(m[l].identifier===i)return t[l]}function je(m,t){return Math.log(m/t)/Math.LN2}class Bl extends ra{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(t){this._startDistance=this._distance=t[0].dist(t[1])}_move(t,i){let l=this._distance;if(this._distance=t[0].dist(t[1]),this._active||!(Math.abs(je(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:je(this._distance,l),pinchAround:i}}}function Ap(m,t){return 180*m.angleWith(t)/Math.PI}class Nl extends ra{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(t){this._startVector=this._vector=t[0].sub(t[1]),this._minDiameter=t[0].dist(t[1])}_move(t,i,l){let p=this._vector;if(this._vector=t[0].sub(t[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ap(this._vector,p),pinchAround:i}}_isBelowThreshold(t){this._minDiameter=Math.min(this._minDiameter,t.mag());let i=25/(Math.PI*this._minDiameter)*360,l=Ap(t,this._startVector);return Math.abs(l)<i}}function pd(m){return Math.abs(m.y)>Math.abs(m.x)}class Lp extends ra{constructor(t){super(),this._currentTouchCount=0,this._map=t}
725reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(t,i,l){super.touchstart(t,i,l),this._currentTouchCount=l.length}_start(t){this._lastPoints=t,pd(t[0].sub(t[1]))&&(this._valid=!1)}_move(t,i,l){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let p=t[0].sub(this._lastPoints[0]),g=t[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(p,g,l.timeStamp),this._valid?(this._lastPoints=t,this._active=!0,{pitchDelta:(p.y+g.y)/2*-.5}):void 0}gestureBeginsVertically(t,i,l){if(this._valid!==void 0)return this._valid;let p=t.mag()>=2,g=i.mag()>=2;if(!p&&!g)return;if(!p||!g)return this._firstMove===void 0&&(this._firstMove=l),l-this._firstMove<100&&void 0;let y=t.y>0==i.y>0;return pd(t)&&pd(i)&&y}}let Dp={panStep:100,bearingStep:15,pitchStep:10};class Vl{constructor(t){this._tr=new Ro(t);let i=Dp;this._panStep=i.panStep,this._bearingStep=i.bearingStep,this._pitchStep=i.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;let i=0,l=0,p=0,g=0,y=0;switch(t.keyCode){case 61:case 107:case 171:case 187:i=1;break;case 189:case 109:case 173:i=-1;break;case 37:t.shiftKey?l=-1:(t.preventDefault(),g=-1);break;case 39:t.shiftKey?l=1:(t.preventDefault(),g=1);break;case 38:t.shiftKey?p=1:(t.preventDefault(),y=-1);break;case 40:t.shiftKey?p=-1:(t.preventDefault(),y=1);break;default:return}return this._rotationDisabled&&(l=0,p=0),{cameraAnimation:v=>{let C=this._tr;v.easeTo({duration:300,easeId:"keyboardHandler",easing:Fp,zoom:i?Math.round(C.zoom)+i*(t.shiftKey?2:1):C.zoom,bearing:C.bearing+l*this._bearingStep,pitch:C.pitch+p*this._pitchStep,offset:[-g*this._panStep,-y*this._panStep],center:C.center},{originalEvent:t})}}}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 Fp(m){return m*(2-m)}let Rp=4.000244140625;class ud{constructor(t,i){this._onTimeout=l=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(l)},this._map=t,this._tr=new Ro(t),this._triggerRenderFrame=i,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(t){this._defaultZoomRate=t}setWheelZoomRate(t){this._wheelZoomRate=t}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!t&&t.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(t){return!!this._map.cooperativeGestures.isEnabled()&&!(t.ctrlKey||this._map.cooperativeGestures.isBypassed(t))}wheel(t){if(!this.isEnabled())return;if(this._shouldBePrevented(t))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",t);let i=t.deltaMode===WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY,l=ee.now(),p=l-(this._lastWheelEventTime||0);this._lastWheelEventTime=l,i!==0&&i%Rp==0?this._type="wheel":i!==0&&Math.abs(i)<4?this._type="trackpad":p>400?(this._type=null,this._lastValue=i,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(p*i)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,i+=this._lastValue)),t.shiftKey&&i&&(i/=4),this._type&&(this._lastWheelEvent=t,this._delta-=i,this._active||this._start(t)),t.preventDefault()}_start(t){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 i=bt.mousePos(this._map.getCanvas(),t),l=this._tr;this._aroundPoint=this._aroundCenter?l.transform.locationToScreenPoint(a.Q.convert(l.center)):i,this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let t=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let v=t.zoom-this._lastExpectedZoom;
725typeof this._startZoom=="number"&&(this._startZoom+=v),typeof this._targetZoom=="number"&&(this._targetZoom+=v)}if(this._delta!==0){let v=this._type==="wheel"&&Math.abs(this._delta)>Rp?this._wheelZoomRate:this._defaultZoomRate,C=2/(1+Math.exp(-Math.abs(this._delta*v)));this._delta<0&&C!==0&&(C=1/C);let P=typeof this._targetZoom!="number"?t.scale:a.ac(this._targetZoom);this._targetZoom=Math.min(t.maxZoom,Math.max(t.minZoom,a.ah(P*C))),this._type==="wheel"&&(this._startZoom=t.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let i=typeof this._targetZoom!="number"?t.zoom:this._targetZoom,l=this._startZoom,p=this._easing,g,y=!1;if(this._type==="wheel"&&l&&p){let v=ee.now()-this._lastWheelEventTime,C=Math.min((v+5)/200,1),P=p(C);g=a.B.number(l,i,P),C<1?this._frameId||(this._frameId=!0):y=!0}else g=i,y=!0;return this._active=!0,y&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=g,{noInertia:!0,needsRenderFrame:!y,zoomDelta:g-t.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(t){let i=a.cd;if(this._prevEase){let l=this._prevEase,p=(ee.now()-l.start)/l.duration,g=l.easing(p+.01)-l.easing(p),y=.27/Math.sqrt(g*g+1e-4)*.01,v=Math.sqrt(.0729-y*y);i=a.cb(y,v,.25,1)}return this._prevEase={start:ee.now(),duration:t,easing:i},i}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Bp{constructor(t,i){this._clickZoom=t,this._tapZoom=i}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 sh{constructor(t){this._tr=new Ro(t),this.reset()}reset(){this._active=!1}dblclick(t,i){return t.preventDefault(),{cameraAnimation:l=>{l.easeTo({duration:300,zoom:this._tr.zoom+(t.shiftKey?-1:1),around:this._tr.unproject(i)},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Mr{constructor(){this._tap=new cd({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(t,i,l){if(!this._swipePoint)if(this._tapTime){let p=i[0],g=t.timeStamp-this._tapTime<500,y=this._tapPoint.dist(p)<30;g&&y?l.length>0&&(this._swipePoint=p,this._swipeTouch=l[0].identifier):this.reset()}else this._tap.touchstart(t,i,l)}touchmove(t,i,l){if(this._tapTime){if(this._swipePoint){if(l[0].identifier!==this._swipeTouch)return;let p=i[0],g=p.y-this._swipePoint.y;return this._swipePoint=p,t.preventDefault(),this._active=!0,{zoomDelta:g/128}}}else this._tap.touchmove(t,i,l)}touchend(t,i,l){if(this._tapTime)this._swipePoint&&l.length===0&&this.reset();else{let p=this._tap.touchend(t,i,l);p&&(this._tapTime=t.timeStamp,this._tapPoint=p)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class xn{constructor(t,i,l){this._el=t,this._mousePan=i,this._touchPan=l}enable(t){this._inertiaOptions=t||{},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 Ns{constructor(t,i,l,p){this._pitchWithRotate=t.pitchWithRotate,this._rollEnabled=t.rollEnabled,this._mouseRotate=i,this._mousePitch=l,this._mouseRoll=p}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 jl{constructor(t,i,l,p){this._el=t,this._touchZoom=i,this._touchRotate=l,this._tapDragZoom=p,this._rotationDisabled=!1,this._enabled=!0}enable(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),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 hd{constructor(t,i){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=t,this._options=i,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let t=this._map.getCanvasContainer();t.classList.add("maplibregl-cooperative-gestures"),this._container=bt.create("div","maplibregl-cooperative-gesture-screen",t);let i=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(i=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let l=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),p=document.createElement("div");p.className="maplibregl-desktop-message",p.textContent=i,this._container.appendChild(p);let g=document.createElement("div");g.className="maplibregl-mobile-message",g.textContent=l,this._container.appendChild(g),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(bt.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(t){return t[this._bypassKey]}notifyGestureBlocked(t,i){this._enabled&&(this._map.fire(new a.l("cooperativegestureprevented",{gestureType:t,originalEvent:i})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let Vs=m=>m.zoom||m.drag||m.roll||m.pitch||m.rotate;class Np extends a.l{}function md(m){return m.panDelta&&m.panDelta.mag()||m.zoomDelta||m.bearingDelta||m.pitchDelta||m.rollDelta}class Bo{constructor(t,i){this.handleWindowEvent=p=>{this.handleEvent(p,`${p.type}Window`)},this.handleEvent=(p,g)=>{if(p.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let y=p.type==="renderFrame"?void 0:p,v={needsRenderFrame:!1},C={},P={};for(let{handlerName:D,handler:V,allowed:U}of this._handlers){if(!V.isEnabled())continue;let Q;if(this._blockedByActive(P,U,D))V.reset();else if(V[g||p.type]){if(a.ce(p,g||p.type)){let Y=bt.mousePos(this._map.getCanvas(),p);Q=V[g||p.type](p,Y)}else if(a.cf(p,g||p.type)){let Y=this._getMapTouches(p.touches),tt=bt.touchPos(this._map.getCanvas(),Y);Q=V[g||p.type](p,tt,Y)}else a.cg(g||p.type)||(Q=V[g||p.type](p));this.mergeHandlerResult(v,C,Q,D,y),Q&&Q.needsRenderFrame&&this._triggerRe
725nderFrame()}(Q||V.isActive())&&(P[D]=V)}let S={};for(let D in this._previousActiveHandlers)P[D]||(S[D]=y);this._previousActiveHandlers=P,(Object.keys(S).length||md(v))&&(this._changes.push([v,C,S]),this._triggerRenderFrame()),(Object.keys(P).length||md(v))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:L}=v;L&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],L(this._map))},this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Tp(t),this._bearingSnap=i.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(i);let l=this._el;this._listeners=[[l,"touchstart",{passive:!0}],[l,"touchmove",{passive:!1}],[l,"touchend",void 0],[l,"touchcancel",void 0],[l,"mousedown",void 0],[l,"mousemove",void 0],[l,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[l,"mouseover",void 0],[l,"mouseout",void 0],[l,"dblclick",void 0],[l,"click",void 0],[l,"keydown",{capture:!1}],[l,"keyup",void 0],[l,"wheel",{passive:!1}],[l,"contextmenu",void 0],[window,"blur",void 0]];for(let[p,g,y]of this._listeners)bt.addEventListener(p,g,p===document?this.handleWindowEvent:this.handleEvent,y)}destroy(){for(let[t,i,l]of this._listeners)bt.removeEventListener(t,i,t===document?this.handleWindowEvent:this.handleEvent,l)}_addDefaultHandlers(t){let i=this._map,l=i.getCanvasContainer();this._add("mapEvent",new Ip(i,t));let p=i.boxZoom=new kp(i,t);this._add("boxZoom",p),t.interactive&&t.boxZoom&&p.enable();let g=i.cooperativeGestures=new hd(i,t.cooperativeGestures);this._add("cooperativeGestures",g),t.cooperativeGestures&&g.enable();let y=new Ep(i),v=new sh(i);i.doubleClickZoom=new Bp(v,y),this._add("tapZoom",y),this._add("clickZoom",v),t.interactive&&t.doubleClickZoom&&i.doubleClickZoom.enable();let C=new Mr;this._add("tapDragZoom",C);let P=i.touchPitch=new Lp(i);this._add("touchPitch",P),t.interactive&&t.touchPitch&&i.touchPitch.enable(t.touchPitch);let S=()=>i.project(i.getCenter()),L=function({enable:ct,clickTolerance:pt,aroundCenter:ft=!0,minPixelCenterThreshold:ht=100,rotateDegreesPerPixelMoved:Ct=.8},Mt){let Bt=new de({checkCorrectEvent:Vt=>bt.mouseButton(Vt)===0&&Vt.ctrlKey||bt.mouseButton(Vt)===2&&!Vt.ctrlKey});return new Jo({clickTolerance:pt,move:(Vt,Dt)=>{let oe=Mt();if(ft&&Math.abs(oe.y-Vt.y)>ht)return{bearingDelta:a.cc(new a.P(Vt.x,Dt.y),Dt,oe)};let Qt=(Dt.x-Vt.x)*Ct;return ft&&Dt.y<oe.y&&(Qt=-Qt),{bearingDelta:Qt}},moveStateManager:Bt,enable:ct,assignEvents:Fs})}(t,S),D=function({enable:ct,clickTolerance:pt,pitchDegreesPerPixelMoved:ft=-.5}){let ht=new de({checkCorrectEvent:Ct=>bt.mouseButton(Ct)===0&&Ct.ctrlKey||bt.mouseButton(Ct)===2});return new Jo({clickTolerance:pt,move:(Ct,Mt)=>({pitchDelta:(Mt.y-Ct.y)*ft}),moveStateManager:ht,enable:ct,assignEvents:Fs})}(t),V=function({enable:ct,clickTolerance:pt,rollDegreesPerPixelMoved:ft=.3},ht){let Ct=new de({checkCorrectEvent:Mt=>bt.mouseButton(Mt)===2&&Mt.ctrlKey});return new Jo({clickTolerance:pt,move:(Mt,Bt)=>{let Vt=ht(),Dt=(Bt.x-Mt.x)*ft;return Bt.y<Vt.y&&(Dt=-Dt),{rollDelta:Dt}},moveStateManager:Ct,enable:ct,assignEvents:Fs})}(t,S);i.dragRotate=new Ns(t,L,D,V),this._add("mouseRotate",L,["mousePitch"]),this._add("mousePitch",D,["mouseRotate","mouseRoll"]),this._add("mouseRoll",V,["mousePitch"]),t.interactive&&t.dragRotate&&i.dragRotate.enable();let U=function({enable:ct,clickTolerance:pt}){let ft=new de({checkCorrectEvent:ht=>bt.mouseButton(ht)===0&&!ht.ctrlKey});return new Jo({clickTolerance:pt,move:(ht,Ct)=>({around:Ct,panDelta:Ct.sub(ht)}),activateOnStart:!0,moveStateManager:ft,enable:ct,assignEvents:Fs})}(t),Q=new Rs(t,i);i.dragPan=new xn(l,U,Q),this._add("mousePan",U),this._add("touchPan",Q,["touchZoom","touchRotate"]),t.interactive&&t.dragPan&&i.dragPan.enable(t.dragPan);let Y=new Nl,tt=new Bl;i.touchZoomRotate=new jl(l,tt,Y,C),this._add("touchRotate",Y,["touchPan","touchZoom"]),this._add("touchZoom",tt,["touchPan","touchRotate"]),t.interactive&&t.touchZoomRotate&&i.touchZoomRotate.enable(t.touchZoomRotate);let nt=i.scrollZoom=new ud(i,()=>
725this._triggerRenderFrame());this._add("scrollZoom",nt,["mousePan"]),t.interactive&&t.scrollZoom&&i.scrollZoom.enable(t.scrollZoom);let lt=i.keyboard=new Vl(i);this._add("keyboard",lt),t.interactive&&t.keyboard&&i.keyboard.enable(),this._add("blockableMapEvent",new Fo(i))}_add(t,i,l){this._handlers.push({handlerName:t,handler:i,allowed:l}),this._handlersById[t]=i}stop(t){if(!this._updatingCamera){for(let{handler:i}of this._handlers)i.reset();this._inertia.clear(),this._fireEvents({},{},t),this._changes=[]}}isActive(){for(let{handler:t}of this._handlers)if(t.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Vs(this._eventsInProgress)||this.isZooming()}_blockedByActive(t,i,l){for(let p in t)if(p!==l&&(!i||i.indexOf(p)<0))return!0;return!1}_getMapTouches(t){let i=[];for(let l of t)this._el.contains(l.target)&&i.push(l);return i}mergeHandlerResult(t,i,l,p,g){if(!l)return;a.e(t,l);let y={handlerName:p,originalEvent:l.originalEvent||g};l.zoomDelta!==void 0&&(i.zoom=y),l.panDelta!==void 0&&(i.drag=y),l.rollDelta!==void 0&&(i.roll=y),l.pitchDelta!==void 0&&(i.pitch=y),l.bearingDelta!==void 0&&(i.rotate=y)}_applyChanges(){let t={},i={},l={};for(let[p,g,y]of this._changes)p.panDelta&&(t.panDelta=(t.panDelta||new a.P(0,0))._add(p.panDelta)),p.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+p.zoomDelta),p.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+p.bearingDelta),p.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+p.pitchDelta),p.rollDelta&&(t.rollDelta=(t.rollDelta||0)+p.rollDelta),p.around!==void 0&&(t.around=p.around),p.pinchAround!==void 0&&(t.pinchAround=p.pinchAround),p.noInertia&&(t.noInertia=p.noInertia),a.e(i,g),a.e(l,y);this._updateMapTransform(t,i,l),this._changes=[]}_updateMapTransform(t,i,l){let p=this._map,g=p._getTransformForUpdate(),y=p.terrain;if(!(md(t)||y&&this._terrainMovement))return this._fireEvents(i,l,!0);p._stop(!0);let{panDelta:v,zoomDelta:C,bearingDelta:P,pitchDelta:S,rollDelta:L,around:D,pinchAround:V}=t;V!==void 0&&(D=V),D=D||p.transform.centerPoint,y&&!g.isPointOnMapSurface(D)&&(D=g.centerPoint);let U={panDelta:v,zoomDelta:C,rollDelta:L,pitchDelta:S,bearingDelta:P,around:D};this._map.cameraHelper.useGlobeControls&&!g.isPointOnMapSurface(D)&&(D=g.centerPoint);let Q=D.distSqr(g.centerPoint)<.01?g.center:g.screenPointToLocation(v?D.sub(v):D);y?(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(U,g),this._terrainMovement||!i.drag&&!i.zoom?i.drag&&this._terrainMovement?g.setCenter(g.screenPointToLocation(g.centerPoint.sub(v))):this._map.cameraHelper.handleMapControlsPan(U,g,Q):(this._terrainMovement=!0,this._map._elevationFreeze=!0,this._map.cameraHelper.handleMapControlsPan(U,g,Q))):(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(U,g),this._map.cameraHelper.handleMapControlsPan(U,g,Q)),p._applyUpdatedTransform(g),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(i,l,!0)}_fireEvents(t,i,l){let p=Vs(this._eventsInProgress),g=Vs(t),y={};for(let L in t){let{originalEvent:D}=t[L];this._eventsInProgress[L]||(y[`${L}start`]=D),this._eventsInProgress[L]=t[L]}!p&&g&&this._fireEvent("movestart",g.originalEvent);for(let L in y)this._fireEvent(L,y[L]);g&&this._fireEvent("move",g.originalEvent);for(let L in t){let{originalEvent:D}=t[L];this._fireEvent(L,D)}let v={},C;for(let L in this._eventsInProgress){let{handlerName:D,originalEvent:V}=this._eventsInProgress[L];this._handlersById[D].isActive()||(delete this._eventsInProgress[L],C=i[D]||V,v[`${L}end`]=C)}for(let L in v)this._fireEvent(L,v[L]);let P=Vs(this._eventsInProgress),S=(p||g)&&!P;if(S&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let L=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&L.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(L)}if(l&&S){this._updatingCamera=!0;let L=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),D=V=>V!==0&&-this._bearingSnap<V&&V<this._bearingSnap;!L||!L.essential&&ee.prefersReducedMotion?(this._map.fire(new a.l("moveend",{originalEvent:C})),D(this._map.getBearing())&&this._map.resetNorth()):(D(L.bearing||this._map.getBearing())&&
725(L.bearing=0),L.freezeElevation=!0,this._map.easeTo(L,{originalEvent:C})),this._updatingCamera=!1}}_fireEvent(t,i){this._map.fire(new a.l(t,i?{originalEvent:i}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(t=>{delete this._frameId,this.handleEvent(new Np("renderFrame",{timeStamp:t})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ul extends a.E{constructor(t,i,l){super(),this._renderFrameCallback=()=>{let p=Math.min((ee.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(p)),p<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=t,this._bearingSnap=l.bearingSnap,this.cameraHelper=i,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(t,i){t.apply(this.transform),this.transform=t,this.cameraHelper=i}getCenter(){return new a.Q(this.transform.center.lng,this.transform.center.lat)}setCenter(t,i){return this.jumpTo({center:t},i)}getCenterElevation(){return this.transform.elevation}setCenterElevation(t,i){return this.jumpTo({elevation:t},i),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(t){this._centerClampedToGround=t}panBy(t,i,l){return t=a.P.convert(t).mult(-1),this.panTo(this.transform.center,a.e({offset:t},i),l)}panTo(t,i,l){return this.easeTo(a.e({center:t},i),l)}getZoom(){return this.transform.zoom}setZoom(t,i){return this.jumpTo({zoom:t},i),this}zoomTo(t,i,l){return this.easeTo(a.e({zoom:t},i),l)}zoomIn(t,i){return this.zoomTo(this.getZoom()+1,t,i),this}zoomOut(t,i){return this.zoomTo(this.getZoom()-1,t,i),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(t,i){return t!=this.transform.fov&&(this.transform.setFov(t),this.fire(new a.l("movestart",i)).fire(new a.l("move",i)).fire(new a.l("moveend",i))),this}getBearing(){return this.transform.bearing}setBearing(t,i){return this.jumpTo({bearing:t},i),this}getPadding(){return this.transform.padding}setPadding(t,i){return this.jumpTo({padding:t},i),this}rotateTo(t,i,l){return this.easeTo(a.e({bearing:t},i),l)}resetNorth(t,i){return this.rotateTo(0,a.e({duration:1e3},t),i),this}resetNorthPitch(t,i){return this.easeTo(a.e({bearing:0,pitch:0,roll:0,duration:1e3},t),i),this}snapToNorth(t,i){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,i):this}getPitch(){return this.transform.pitch}setPitch(t,i){return this.jumpTo({pitch:t},i),this}getRoll(){return this.transform.roll}setRoll(t,i){return this.jumpTo({roll:t},i),this}cameraForBounds(t,i){t=gn.convert(t).adjustAntiMeridian();let l=i&&i.bearing||0;return this._cameraForBoxAndBearing(t.getNorthWest(),t.getSouthEast(),l,i)}_cameraForBoxAndBearing(t,i,l,p){let g={top:0,bottom:0,right:0,left:0};if(typeof(p=a.e({padding:g,offset:[0,0],maxZoom:this.transform.maxZoom},p)).padding=="number"){let P=p.padding;p.padding={top:P,bottom:P,right:P,left:P}}let y=a.e(g,p.padding);p.padding=y;let v=this.transform,C=new gn(t,i);return this.cameraHelper.cameraForBoxAndBearing(p,y,C,l,v)}fitBounds(t,i,l){return this._fitInternal(this.cameraForBounds(t,i),i,l)}fitScreenCoordinates(t,i,l,p,g){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(a.P.convert(t)),this.transform.screenPointToLocation(a.P.convert(i)),l,p),p,g)}_fitInternal(t,i,l){return t?(delete(i=a.e(t,i)).padding,i.linear?this.easeTo(i,l):this.flyTo(i,l)):this}jumpTo(t,i){this.stop();let l=this._getTransformForUpdate(),p=!1,g=!1,y=!1,v=l.zoom;this.cameraHelper.handleJumpToCenterZoom(l,t);let C=l.zoom!==v;return"elevation"in t&&l.elevation!==+t.elevation&&l.setElevation(+t.elevation),"bearing"in t&&l.bearing!==+t.bearing&&(p=!0,l.setBearing(+t.bearing)),"pitch"in t&&l.pitch!==+t.pitch&&(g=!0,l.setPitch(+t.pitch)),"roll"in t&&l.roll!==+t.roll&&(y=!0,l.setRoll(+t.roll)),t.padding==null||l.isPaddingEqual(t.padding)||l.setPadding(t.padding),this._applyUpdatedTransform(l),this.fire(new a.l("movestart",i)).fire(new a.l("move",i)),C&&this.fire(new a.l("zoomstart",i)).fire(new a.l("zoom",i)).fire(new a.l("zoomend",i)),p&&this.fire(new a.l("rotatestart",i)).fire(new a.l("rotate",i)).fire(new a.l("rotateend",i)),g&&this.fire(new a.l("pitchstart",i)).fire(new a.l("pitch",i)).fire(new a.l("pitchend",
725i)),y&&this.fire(new a.l("rollstart",i)).fire(new a.l("roll",i)).fire(new a.l("rollend",i)),this.fire(new a.l("moveend",i))}calculateCameraOptionsFromTo(t,i,l,p=0){let g=a.$.fromLngLat(t,i),y=a.$.fromLngLat(l,p),v=y.x-g.x,C=y.y-g.y,P=y.z-g.z,S=Math.hypot(v,C,P);if(S===0)throw new Error("Can't calculate camera options with same From and To");let L=Math.hypot(v,C),D=a.ah(this.transform.cameraToCenterDistance/S/this.transform.tileSize),V=180*Math.atan2(v,-C)/Math.PI,U=180*Math.acos(L/S)/Math.PI;return U=P<0?90-U:90+U,{center:y.toLngLat(),elevation:p,zoom:D,pitch:U,bearing:V}}calculateCameraOptionsFromCameraLngLatAltRotation(t,i,l,p,g){let y=this.transform.calculateCenterFromCameraLngLatAlt(t,i,l,p);return{center:y.center,elevation:y.elevation,zoom:y.zoom,bearing:l,pitch:p,roll:g}}easeTo(t,i){this._stop(!1,t.easeId),((t=a.e({offset:[0,0],duration:500,easing:a.cd},t)).animate===!1||!t.essential&&ee.prefersReducedMotion)&&(t.duration=0);let l=this._getTransformForUpdate(),p=this.getBearing(),g=l.pitch,y=l.roll,v="bearing"in t?this._normalizeBearing(t.bearing,p):p,C="pitch"in t?+t.pitch:g,P="roll"in t?this._normalizeBearing(t.roll,y):y,S="padding"in t?t.padding:l.padding,L=a.P.convert(t.offset),D,V;t.around&&(D=a.Q.convert(t.around),V=l.locationToScreenPoint(D));let U={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},Q=this.cameraHelper.handleEaseTo(l,{bearing:v,pitch:C,roll:P,padding:S,around:D,aroundPoint:V,offsetAsPoint:L,offset:t.offset,zoom:t.zoom,center:t.center});return this._rotating=this._rotating||p!==v,this._pitching=this._pitching||C!==g,this._rolling=this._rolling||P!==y,this._padding=!l.isPaddingEqual(S),this._zooming=this._zooming||Q.isZooming,this._easeId=t.easeId,this._prepareEase(i,t.noMoveStart,U),this.terrain&&this._prepareElevation(Q.elevationCenter),this._ease(Y=>{Q.easeFunc(Y),this.terrain&&!t.freezeElevation&&this._updateElevation(Y),this._applyUpdatedTransform(l),this._fireMoveEvents(i)},Y=>{this.terrain&&t.freezeElevation&&this._finalizeElevation(),this._afterEase(i,Y)},t),this}_prepareEase(t,i,l={}){this._moving=!0,i||l.moving||this.fire(new a.l("movestart",t)),this._zooming&&!l.zooming&&this.fire(new a.l("zoomstart",t)),this._rotating&&!l.rotating&&this.fire(new a.l("rotatestart",t)),this._pitching&&!l.pitching&&this.fire(new a.l("pitchstart",t)),this._rolling&&!l.rolling&&this.fire(new a.l("rollstart",t))}_prepareElevation(t){this._elevationCenter=t,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(t,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(t){this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let i=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(t<1&&i!==this._elevationTarget){let l=this._elevationTarget-this._elevationStart;this._elevationStart+=t*(l-(i-(l*t+this._elevationStart))/(1-t)),this._elevationTarget=i}this.transform.setElevation(a.B.number(this._elevationStart,this._elevationTarget,t))}_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(t){if(!this.terrain&&t.elevation>=0&&t.pitch<=90)return{};let i=t.getCameraLngLat(),l=t.getCameraAltitude(),p=this.terrain?this.terrain.getElevationForLngLatZoom(i,t.zoom):0;if(l<p){let g=this.calculateCameraOptionsFromTo(i,p,t.center,t.elevation);return{pitch:g.pitch,zoom:g.zoom}}return{}}_applyUpdatedTransform(t){let i=[];if(i.push(p=>this._elevateCameraIfInsideTerrain(p)),this.transformCameraUpdate&&i.push(p=>this.transformCameraUpdate(p)),!i.length)return;let l=t.clone();for(let p of i){let g=l.clone(),{center:y,zoom:v,roll:C,pitch:P,bearing:S,elevation:L}=p(g);y&&g.setCenter(y),L!==void 0&&g.setElevation(L),v!==void 0&&g.setZoom(v),C!==void 0&&g.setRoll(C),P!==void 0&&g.setPitch(P),S!==void 0&&g.setBearing(S),l.apply(g)}this.transform.apply(l)}_fireMoveEvents(t){this.fire(new a.l("move",t)),this._zooming&&this.fire(new a.l("zoom",t)),this._rotating&&this.fire(new a.l("rotate",t)),this._pitching&&this.fire(new a.l("pitch",t)),this._rolling&&this.fire(new a.l("roll",t))}
725_afterEase(t,i){if(this._easeId&&i&&this._easeId===i)return;delete this._easeId;let l=this._zooming,p=this._rotating,g=this._pitching,y=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,l&&this.fire(new a.l("zoomend",t)),p&&this.fire(new a.l("rotateend",t)),g&&this.fire(new a.l("pitchend",t)),y&&this.fire(new a.l("rollend",t)),this.fire(new a.l("moveend",t))}flyTo(t,i){if(!t.essential&&ee.prefersReducedMotion){let Dt=a.O(t,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(Dt,i)}this.stop(),t=a.e({offset:[0,0],speed:1.2,curve:1.42,easing:a.cd},t);let l=this._getTransformForUpdate(),p=l.bearing,g=l.pitch,y=l.roll,v=l.padding,C="bearing"in t?this._normalizeBearing(t.bearing,p):p,P="pitch"in t?+t.pitch:g,S="roll"in t?this._normalizeBearing(t.roll,y):y,L="padding"in t?t.padding:l.padding,D=a.P.convert(t.offset),V=l.centerPoint.add(D),U=l.screenPointToLocation(V),Q=this.cameraHelper.handleFlyTo(l,{bearing:C,pitch:P,roll:S,padding:L,locationAtOffset:U,offsetAsPoint:D,center:t.center,minZoom:t.minZoom,zoom:t.zoom}),Y=t.curve,tt=Math.max(l.width,l.height),nt=tt/Q.scaleOfZoom,lt=Q.pixelPathLength;typeof Q.scaleOfMinZoom=="number"&&(Y=Math.sqrt(tt/Q.scaleOfMinZoom/lt*2));let ct=Y*Y;function pt(Dt){let oe=(nt*nt-tt*tt+(Dt?-1:1)*ct*ct*lt*lt)/(2*(Dt?nt:tt)*ct*lt);return Math.log(Math.sqrt(oe*oe+1)-oe)}function ft(Dt){return(Math.exp(Dt)-Math.exp(-Dt))/2}function ht(Dt){return(Math.exp(Dt)+Math.exp(-Dt))/2}let Ct=pt(!1),Mt=function(Dt){return ht(Ct)/ht(Ct+Y*Dt)},Bt=function(Dt){return tt*((ht(Ct)*(ft(oe=Ct+Y*Dt)/ht(oe))-ft(Ct))/ct)/lt;var oe},Vt=(pt(!0)-Ct)/Y;if(Math.abs(lt)<2e-6||!isFinite(Vt)){if(Math.abs(tt-nt)<1e-6)return this.easeTo(t,i);let Dt=nt<tt?-1:1;Vt=Math.abs(Math.log(nt/tt))/Y,Bt=()=>0,Mt=oe=>Math.exp(Dt*Y*oe)}return t.duration="duration"in t?+t.duration:1e3*Vt/("screenSpeed"in t?+t.screenSpeed/Y:+t.speed),t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=p!==C,this._pitching=P!==g,this._rolling=S!==y,this._padding=!l.isPaddingEqual(L),this._prepareEase(i,!1),this.terrain&&this._prepareElevation(Q.targetCenter),this._ease(Dt=>{let oe=Dt*Vt,Qt=1/Mt(oe),$t=Bt(oe);this._rotating&&l.setBearing(a.B.number(p,C,Dt)),this._pitching&&l.setPitch(a.B.number(g,P,Dt)),this._rolling&&l.setRoll(a.B.number(y,S,Dt)),this._padding&&(l.interpolatePadding(v,L,Dt),V=l.centerPoint.add(D)),Q.easeFunc(Dt,Qt,$t,V),this.terrain&&!t.freezeElevation&&this._updateElevation(Dt),this._applyUpdatedTransform(l),this._fireMoveEvents(i)},()=>{this.terrain&&t.freezeElevation&&this._finalizeElevation(),this._afterEase(i)},t),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(t,i){var l;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let p=this._onEaseEnd;delete this._onEaseEnd,p.call(this,i)}return t||(l=this.handlers)===null||l===void 0||l.stop(!1),this}_ease(t,i,l){l.animate===!1||l.duration===0?(t(1),i()):(this._easeStart=ee.now(),this._easeOptions=l,this._onEaseFrame=t,this._onEaseEnd=i,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(t,i){t=a.aL(t,-180,180);let l=Math.abs(t-i);return Math.abs(t-360-i)<l&&(t-=360),Math.abs(t+360-i)<l&&(t+=360),t}queryTerrainElevation(t){return this.terrain?this.terrain.getElevationForLngLatZoom(a.Q.convert(t),this.transform.tileZoom):null}}let ye={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class Oe{constructor(t=ye){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=i=>{!i||i.sourceDataType!=="metadata"&&i.sourceDataType!=="visibility"&&i.dataType!=="style"&&i.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=t}getDefaultPosition(){return"bottom-right"}onAdd(t){return this._map=t,this._compact=this.options.compact,this._container=bt.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=bt.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=bt.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(){bt.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(t,i){let l=this._map._getUIString(`AttributionControl.${i}`);t.title=l,t.setAttribute("aria-label",l)}_updateAttributions(){if(!this._map.style)return;let t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map(p=>typeof p!="string"?"":p)):typeof this.options.customAttribution=="str
725ing"&&t.push(this.options.customAttribution)),this._map.style.stylesheet){let p=this._map.style.stylesheet;this.styleOwner=p.owner,this.styleId=p.id}let i=this._map.style.sourceCaches;for(let p in i){let g=i[p];if(g.used||g.usedForTerrain){let y=g.getSource();y.attribution&&t.indexOf(y.attribution)<0&&t.push(y.attribution)}}t=t.filter(p=>String(p).trim()),t.sort((p,g)=>p.length-g.length),t=t.filter((p,g)=>{for(let y=g+1;y<t.length;y++)if(t[y].indexOf(p)>=0)return!1;return!0});let l=t.join(" | ");l!==this._attribHTML&&(this._attribHTML=l,t.length?(this._innerContainer.innerHTML=bt.sanitize(l),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class js{constructor(t={}){this._updateCompact=()=>{let i=this._container.children;if(i.length){let l=i[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&l.classList.add("maplibregl-compact"):l.classList.remove("maplibregl-compact")}},this.options=t}getDefaultPosition(){return"bottom-left"}onAdd(t){this._map=t,this._compact=this.options&&this.options.compact,this._container=bt.create("div","maplibregl-ctrl");let i=bt.create("a","maplibregl-ctrl-logo");return i.target="_blank",i.rel="noopener nofollow",i.href="https://maplibre.org/",i.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),i.setAttribute("rel","noopener nofollow"),this._container.appendChild(i),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){bt.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class gd{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(t){let i=++this._id;return this._queue.push({callback:t,id:i,cancelled:!1}),i}remove(t){let i=this._currentlyRunning,l=i?this._queue.concat(i):this._queue;for(let p of l)if(p.id===t)return void(p.cancelled=!0)}run(t=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let i=this._currentlyRunning=this._queue;this._queue=[];for(let l of i)if(!l.cancelled&&(l.callback(t),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var fd=a.aG([{name:"a_pos3d",type:"Int16",components:3}]);class ji extends a.E{constructor(t){super(),this._lastTilesetChange=ee.now(),this.sourceCache=t,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=t._source.tileSize*2**this.deltaZoom,t.usedForTerrain=!0,t.tileSize=this.tileSize}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(t,i){this.sourceCache.update(t,i),this._renderableTilesKeys=[];let l={};for(let p of dt(t,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:i,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))l[p.key]=!0,this._renderableTilesKeys.push(p.key),this._tiles[p.key]||(p.terrainRttPosMatrix32f=new Float64Array(16),a.bQ(p.terrainRttPosMatrix32f,0,a.Z,a.Z,0,0,1),this._tiles[p.key]=new Wr(p,this.tileSize),this._lastTilesetChange=ee.now());for(let p in this._tiles)l[p]||delete this._tiles[p]}freeRtt(t){for(let i in this._tiles){let l=this._tiles[i];(!t||l.tileID.equals(t)||l.tileID.isChildOf(t)||t.isChildOf(l.tileID))&&(l.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(t=>this.getTileByID(t))}getTileByID(t){return this._tiles[t]}getTerrainCoords(t,i){return i?this._getTerrainCoordsForTileRanges(t,i):this._getTerrainCoordsForRegularTile(t)}_getTerrainCoordsForRegularTile(t){let i={};for(let l of this._renderableTilesKeys){let p=this._tiles[l].tileID,g=t.clone(),y=a.b2();if(p.canonical.equals(t.canonical))a.bQ(y,0,a.Z,a.Z,0,0,1);else if(p.canonical.isChildOf(t.canonical)){let v=p.canonical.z-t.canonical.z,C=p.canonical.x-(p.canonical.x>>v<<v),P=p.canonical.y-(p.canonical.y>>v<<v),S=a.Z>>v;a.bQ(y,0,S,S,0,0,1),a.L(y,y,[-C*S,-P*S,0])}else{if(!t.canonical.isChildOf(p.canonical))continue;{let v=t.canonical.z-p.canonical.z,C=t.canonical.x-(t.canonical.x>>v<<v),P=t.canonical.y-(t.canonical.y>>v<<v),S=a.Z>>v;a.bQ(y,0,a.Z,a.Z,0,0,1),a.L(y,y,[C*S,P*S,0]),a.M(y,y,[1/2**v,1/2**v,0])}}g.terrainRttPosMatrix32f=new Float32Array(y),i[l]=g}return i}_getTerrainCoordsForTileRanges(t,i){let l={};for(let p of this._renderableTilesKeys){let g=this._tiles[p].tileID;if(!this._isWithinTileRanges(g,i))continue;let y=t.clone(),v=a.b2();if(g.canonical.z===t.canonical.z){let C=t.canonical.x-g.canonical.x,P=t.canonical.y-g.canonical.y;a.bQ(v,0,a.Z,a.Z,0,0,1),a.L(v,v,[C*a.Z,P*a.Z,0])}else if(g.canonical.z>t.canonical.z){let C=g.canonical.z-t.canonical.z,P=g.canonical.x-(g.canonical.x>>C<<C),S=g.canonical.y-(g.canonical.y>>C<<C),L=t.canonical.x-(g.canonical.x>>C),D=t.canonical.y-(g.canonical.y>>C),V=a.Z>>C;a.bQ(v,0,V,V,0,0,1),a.L(v,v,[-P*V+L*a.Z,-S*V+D*a.Z,0])}else{let C=t.canonical.z-g.canonical.z,P=t.canonical.x-(t.canonical.x>>C<<C),S=t.canonical.y-(t.canonical.y>>C<<C),L=(t.canonical.x>>C)-g.canonical.x,D=(t.canonical.y>>C)-g.canonical.y,V=a.Z<<C;a.bQ(v,0,V,V,0,0,1),a.L(v,v,[P*a.Z+L*V,S*a.Z+D*V,0])}y.terrainRttPosMatrix32f=new Float32Array(v),l[p]=y}return l}getSourceTile(t,i){let l=this.sourceCache._source,p=t.overscaledZ-this.deltaZoom;if(p>l.maxzoom&&(p=l.maxzoom),p<l.minzoom)return null;this._sourceTileCache[t.key]||(this._sourceTileCache[t.key]=t.scaledTo(p).key);let g=this.sourceCache.getTileByID(this._sourceTileCache[t.key]);if((!g||!g.dem)&&i)for(;p>=l.minzoom&&(!g||!g.dem);)g=this.sourceCache.getTileByID(t.scaledTo(p--).key);return g}anyTilesAfterTime(t=Date.now()){return this._lastTilesetChange>=t}_isWithinTileRanges(t,i){return i[t.canonical.z]&&t.canonical.x>=i[t.canonical.z].minTileX&&t.canonical.x<=i[t.canonical.z].maxTileX&&t.canonical.y>=i[t.canonical.z].minTileY&&t.canonical.y<=i[t.canonical.z].maxTileY}}class Vp{constructor(t,i,l){this._meshCache={},this.painter=t,this.sourceCache=new ji(i),this.options=l,this.exaggeration=typeof l.exaggeration=="number"?l.exaggeration:1,this.qual
725ityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(t,i,l,p=a.Z){var g;if(!(i>=0&&i<p&&l>=0&&l<p))return 0;let y=this.getTerrainData(t),v=(g=y.tile)===null||g===void 0?void 0:g.dem;if(!v)return 0;let C=a.ch([],[i/p*a.Z,l/p*a.Z],y.u_terrain_matrix),P=[C[0]*v.dim,C[1]*v.dim],S=Math.floor(P[0]),L=Math.floor(P[1]),D=P[0]-S,V=P[1]-L;return v.get(S,L)*(1-D)*(1-V)+v.get(S+1,L)*D*(1-V)+v.get(S,L+1)*(1-D)*V+v.get(S+1,L+1)*D*V}getElevationForLngLatZoom(t,i){if(!a.ci(i,t.wrap()))return 0;let{tileID:l,mercatorX:p,mercatorY:g}=this._getOverscaledTileIDFromLngLatZoom(t,i);return this.getElevation(l,p%a.Z,g%a.Z,a.Z)}getElevation(t,i,l,p=a.Z){return this.getDEMElevation(t,i,l,p)*this.exaggeration}getTerrainData(t){if(!this._emptyDemTexture){let p=this.painter.context,g=new a.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new Rn(p,g,p.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new Rn(p,new a.R({width:1,height:1}),p.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(p.gl.NEAREST,p.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=a.ad([])}let i=this.sourceCache.getSourceTile(t,!0);if(i&&i.dem&&(!i.demTexture||i.needsTerrainPrepare)){let p=this.painter.context;i.demTexture=this.painter.getTileTexture(i.dem.stride),i.demTexture?i.demTexture.update(i.dem.getPixels(),{premultiply:!1}):i.demTexture=new Rn(p,i.dem.getPixels(),p.gl.RGBA,{premultiply:!1}),i.demTexture.bind(p.gl.NEAREST,p.gl.CLAMP_TO_EDGE),i.needsTerrainPrepare=!1}let l=i&&i+i.tileID.key+t.key;if(l&&!this._demMatrixCache[l]){let p=this.sourceCache.sourceCache._source.maxzoom,g=t.canonical.z-i.tileID.canonical.z;t.overscaledZ>t.canonical.z&&(t.canonical.z>=p?g=t.canonical.z-p:a.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let y=t.canonical.x-(t.canonical.x>>g<<g),v=t.canonical.y-(t.canonical.y>>g<<g),C=a.cj(new Float64Array(16),[1/(a.Z<<g),1/(a.Z<<g),0]);a.L(C,C,[y*a.Z,v*a.Z,0]),this._demMatrixCache[t.key]={matrix:C,coord:t}}return{u_depth:2,u_terrain:3,u_terrain_dim:i&&i.dem&&i.dem.dim||1,u_terrain_matrix:l?this._demMatrixCache[t.key].matrix:this._emptyDemMatrix,u_terrain_unpack:i&&i.dem&&i.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(i&&i.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:i}}getFramebuffer(t){let i=this.painter,l=i.width/devicePixelRatio,p=i.height/devicePixelRatio;return!this._fbo||this._fbo.width===l&&this._fbo.height===p||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new Rn(i.context,{width:l,height:p,data:null},i.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(i.context.gl.NEAREST,i.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new Rn(i.context,{width:l,height:p,data:null},i.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(i.context.gl.NEAREST,i.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=i.context.createFramebuffer(l,p,!0,!1),this._fbo.depthAttachment.set(i.context.createRenderbuffer(i.context.gl.DEPTH_COMPONENT16,l,p))),this._fbo.colorAttachment.set(t==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){let t=this.painter.context;if(this._coordsTexture)return this._coordsTexture;let i=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let g=0,y=0;g<this._coordsTextureSize;g++)for(let v=0;v<this._coordsTextureSize;v++,y+=4)i[y+0]=255&v,i[y+1]=255&g,i[y+2]=v>>8<<4|g>>8,i[y+3]=0;let l=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(i.buffer)),p=new Rn(t,l,t.gl.RGBA,{premultiply:!1});return p.bind(t.gl.NEAREST,t.gl.CLAMP_TO_EDGE),this._coordsTexture=p,p}pointCoordinate(t){this.painter.maybeDrawDepthAndCoords(!0);let i=new Uint8Array(4),l=this.painter.context,p=l.gl,g=Math.round(t.x*this.painter.pixelRatio/devicePixelRatio),y=Math.round(t.y*this.painter.pixelRatio/devicePixelRatio),v=Math.round(this.painter.height/devicePixelRatio);l.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),p.readPixels(g,v-y-1,1,1,p.RGBA,p.UNSIGNED_BYTE,i),l.bindFramebuffer.set(null);let C=i[0]+(i[2]>>4<<8),P=i[1]+((15&i[2])<<8),S=this.coordsIndex[255-i[3]],L=S&&this.sourceCache.getTileByID(S);if(!L)return null;let D=this._coordsTextureSize,V=(1<<L.tileID.canonical.z)*D;return new a.$((L.tileID.canonical.x*D+C)/V+L.tileID.wrap,(L.tileID.canonical.y*D+P)/V,this.getElevation(L.tileID,C,P,D))}depthAtPoint(t){let i=new Uint8Array(4),l=this.painter.context,p=l.gl;return l.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),p.readPixels(t.x,this.painter.height/devicePixelRatio-t.y-1,1,1,p.RGBA,p.UNSIGNED_BYTE,i),l.bindFramebuffer.set(null),(i[0]/16777216+i[1]/65536+i[2]/256+i[3])/256}getTerrainMesh(t){var i;let l=((i=this.painter.style.projection)===null||i===void 0?void 0:i.transitionState)>0,p=l&&t.canonical.y===0,g=l&&t.canonical.y===(1<<t.canonical.z)-1,y=`m_${p?"n":""}_${g?"s":""}`;if(this._meshCache[y])return this._meshCache[y];let v=this.painter.context,C=new a.ck,P=new a.aK,S=this.meshSize,L=a.Z/S,D=S*S;for(let ht=0;ht<=S;ht++)for(let Ct=0;Ct<=S;Ct++)C.emplaceBack(Ct*L,ht*L,0);for(let ht=0;ht<D;ht+=S+1)for(let Ct=0;Ct<S;Ct++)P.emplaceBack(Ct+ht,S+Ct+ht+1,S+Ct+ht+2),P.emplaceBack(Ct+ht,S+Ct+ht+2,Ct+ht+1);let V=C.length,U=V+(S+1),Q=(S+1)*S,Y=p?a.b9:0,tt=p?0:1,nt=g?a.ba:a.Z,lt=g?0:1;for(let ht=0;ht<=S;ht++)C.emplaceBack(ht*L,Y,tt);for(let ht=0;ht<=S;ht++)C.emplaceBack(ht*L,nt,lt);for(let ht=0;ht<S;ht++)P.emplaceBack(Q+ht,U+ht,U+ht+1),P.emplaceBack(Q+ht,U+ht+1,Q+ht+1),P.emplaceBack(0+ht,V+ht+1,V+ht),P.emplaceBack(0+ht,0+ht+1,V+ht+1);let ct=C.length,pt=ct+2*(S+1);for(let ht of[0,1])for(let Ct=0;Ct<=S;Ct++)for(let Mt of[0,1])C.emplaceBack(ht*a.Z,Ct*L,Mt);for(let ht=0;ht<2*S;ht+=2)P.emplaceBack(ct+ht,ct+ht+1,ct+ht+3),P.emplaceBack(ct+ht,ct+ht+3,ct+ht+2),P.emplaceBack(pt+ht,pt+ht+3,pt+ht+1),P.emplaceBack(pt+ht,pt+ht+2,pt+ht+3);let ft=new Sa(v.createVertexBuffer(C,fd.members),v.createIndexBuffer(P),a.aJ.simpleSegment(0,0,C.length,P.length));return this._meshCache[y]=ft,ft}getMeshFrameDelta(t){return 2*Math.PI*a.bu/Math.pow(2,Math.max(t,0))
725/5}getMinTileElevationForLngLatZoom(t,i){var l;let{tileID:p}=this._getOverscaledTileIDFromLngLatZoom(t,i);return(l=this.getMinMaxElevation(p).minElevation)!==null&&l!==void 0?l:0}getMinMaxElevation(t){let i=this.getTerrainData(t).tile,l={minElevation:null,maxElevation:null};return i&&i.dem&&(l.minElevation=i.dem.min*this.exaggeration,l.maxElevation=i.dem.max*this.exaggeration),l}_getOverscaledTileIDFromLngLatZoom(t,i){let l=a.$.fromLngLat(t.wrap()),p=(1<<i)*a.Z,g=l.x*p,y=l.y*p,v=Math.floor(g/a.Z),C=Math.floor(y/a.Z);return{tileID:new a.Y(i,0,i,v,C),mercatorX:g,mercatorY:y}}}class No{constructor(t,i,l){this._context=t,this._size=i,this._tileSize=l,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(let t of this._objects)t.texture.destroy(),t.fbo.destroy()}_createObject(t){let i=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),l=new Rn(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return l.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),this._context.extTextureFilterAnisotropic&&this._context.gl.texParameterf(this._context.gl.TEXTURE_2D,this._context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this._context.extTextureFilterAnisotropicMax),i.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),i.colorAttachment.set(l.texture),{id:t,fbo:i,texture:l,stamp:-1,inUse:!1}}getObjectForId(t){return this._objects[t]}useObject(t){t.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(i=>t.id!==i),this._recentlyUsed.push(t.id)}stampObject(t){t.stamp=++this._stamp}getOrCreateFreeObject(){for(let i of this._recentlyUsed)if(!this._objects[i].inUse)return this._objects[i];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let t=this._createObject(this._objects.length);return this._objects.push(t),t}freeObject(t){t.inUse=!1}freeAllObjects(){for(let t of this._objects)this.freeObject(t)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(t=>!t.inUse)===!1}}let Va={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Us{constructor(t,i){this.painter=t,this.terrain=i,this.pool=new No(t.context,30,i.sourceCache.tileSize*i.qualityFactor)}destruct(){this.pool.destruct()}getTexture(t){return this.pool.getObjectForId(t.rtt[this._stacks.length-1].id).texture}prepareForRender(t,i){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=t._order.filter(l=>!t._layers[l].isHidden(i)),this._coordsAscending={};for(let l in t.sourceCaches){this._coordsAscending[l]={};let p=t.sourceCaches[l].getVisibleCoordinates(),g=t.sourceCaches[l].getSource(),y=g instanceof Ki?g.terrainTileRanges:null;for(let v of p){let C=this.terrain.sourceCache.getTerrainCoords(v,y);for(let P in C)this._coordsAscending[l][P]||(this._coordsAscending[l][P]=[]),this._coordsAscending[l][P].push(C[P])}}this._coordsAscendingStr={};for(let l of t._order){let p=t._layers[l],g=p.source;if(Va[p.type]&&!this._coordsAscendingStr[g]){this._coordsAscendingStr[g]={};for(let y in this._coordsAscending[g])this._coordsAscendingStr[g][y]=this._coordsAscending[g][y].map(v=>v.key).sort().join()}}for(let l of this._renderableTiles)for(let p in this._coordsAscendingStr){let g=this._coordsAscendingStr[p][l.tileID.key];g&&g!==l.rttCoords[p]&&(l.rtt=[])}}renderLayer(t,i){if(t.isHidden(this.painter.transform.zoom))return!1;let l=Object.assign(Object.assign({},i),{isRenderingToTexture:!0}),p=t.type,g=this.painter,y=this._renderableLayerIds[this._renderableLayerIds.length-1]===t.id;if(Va[p]&&(this._prevType&&Va[this._prevType]||this._stacks.push([]),this._prevType=p,this._stacks[this._stacks.length-1].push(t.id),!y))return!0;if(Va[this._prevType]||Va[p]&&y){this._prevType=p;let v=this._stacks.length-1,C=this._stacks[v]||[];for(let P of this._renderableTiles){if(this.pool.isFull()&&(od(this.painter,this.terrain,this._rttTiles,l),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(P),P.rtt[v]){let L=this.pool.getObjectForId(P.rtt[v].id);if(L.stamp===P.rtt[v].stamp){this.pool.useObject(L);continue}}let S=this.pool.getOrCreateFreeObject();this.pool.useObject(S),this.pool.stampObject(S),P.rtt[v]={id:S.id,stamp:S.stamp},g.context.bindFramebuffer.set(S.fbo.framebuffer),g.context.clear({color:a.b7.transparent,stencil:0}),g.currentStencilSource=void 0;for(let L=0;L<C.length;L++){let D=g.style._layers[C[L]],V=D.source?this._coordsAscending[D.source][P.tileID.key]:[P.tileID];g.context.viewport.set([0,0,S.fbo.width,S.fbo.height]),g._renderTileClippingMasks(D,V,!0),g.renderLayer(g,g.style.sourceCaches[D.source],D,V,l),D.source&&(P.rttCoords[D.source]=this._coordsAscendingStr[D.source][P.tileID.key])}}return od(this.painter,this.terrain,this._rttTiles,l),this._rttTiles=[],this.pool.freeAllObjects(),Va[p]}return!1}}let Vn={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Zn=z,_d={hash:!1,interactive:!0,bearingSnap:7,attributionControl:ye,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileC
725acheSize:null,maxTileCacheZoomLevels:a.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0},$s={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class $l{constructor(t,i,l=!1){this.mousedown=g=>{this.startMove(g,bt.mousePos(this.element,g)),bt.addEventListener(window,"mousemove",this.mousemove),bt.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=g=>{this.move(g,bt.mousePos(this.element,g))},this.mouseup=g=>{this._rotatePitchHanlder.dragEnd(g),this.offTemp()},this.touchstart=g=>{g.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=bt.touchPos(this.element,g.targetTouches)[0],this.startMove(g,this._startPos),bt.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),bt.addEventListener(window,"touchend",this.touchend))},this.touchmove=g=>{g.targetTouches.length!==1?this.reset():(this._lastPos=bt.touchPos(this.element,g.targetTouches)[0],this.move(g,this._lastPos))},this.touchend=g=>{g.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this._rotatePitchHanlder.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=i;let p=new dd;this._rotatePitchHanlder=new Jo({clickTolerance:3,move:(g,y)=>{let v=i.getBoundingClientRect(),C=new a.P((v.bottom-v.top)/2,(v.right-v.left)/2);return{bearingDelta:a.cc(new a.P(g.x,y.y),y,C),pitchDelta:l?-.5*(y.y-g.y):void 0}},moveStateManager:p,enable:!0,assignEvents:()=>{}}),this.map=t,bt.addEventListener(i,"mousedown",this.mousedown),bt.addEventListener(i,"touchstart",this.touchstart,{passive:!1}),bt.addEventListener(i,"touchcancel",this.reset)}startMove(t,i){this._rotatePitchHanlder.dragStart(t,i),bt.disableDrag()}move(t,i){let l=this.map,{bearingDelta:p,pitchDelta:g}=this._rotatePitchHanlder.dragMove(t,i)||{};p&&l.setBearing(l.getBearing()+p),g&&l.setPitch(l.getPitch()+g)}off(){let t=this.element;bt.removeEventListener(t,"mousedown",this.mousedown),bt.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),bt.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),bt.removeEventListener(window,"touchend",this.touchend),bt.removeEventListener(t,"touchcancel",this.reset),this.offTemp()}offTemp(){bt.enableDrag(),bt.removeEventListener(window,"mousemove",this.mousemove),bt.removeEventListener(window,"mouseup",this.mouseup),bt.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),bt.removeEventListener(window,"touchend",this.touchend)}}let er;function Gl(m,t,i,l=!1){if(l||!i.getCoveringTilesDetailsProvider().allowWorldCopies())return m?.wrap();let p=new a.Q(m.lng,m.lat);if(m=new a.Q(m.lng,m.lat),t){let g=new a.Q(m.lng-360,m.lat),y=new a.Q(m.lng+360,m.lat),v=i.locationToScreenPoint(m).distSqr(t);i.locationToScreenPoint(g).distSqr(t)<v?m=g:i.locationToScreenPoint(y).distSqr(t)<v&&(m=y)}for(;Math.abs(m.lng-i.center.lng)>180;){let g=i.locationToScreenPoint(m);if(g.x>=0&&g.y>=0&&g.x<=i.width&&g.y<=i.height)break;m.lng>i.center.lng?m.lng-=360:m.lng+=360}return m.lng!==p.lng&&i.isPointOnMapSurface(i.locationToScreenPoint(m))?m:p}let Gs={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 ja(m,t,i){let l=m.classList;for(let p in Gs)l.remove(`maplibregl-${i}-anchor-${p}`);l.add(`maplibregl-${i}-anchor-${t}`)}class Zs extends a.E{constructor(t){if(super(),this._onKeyPress=i=>{let l=i.code,p=i.charCode||i.keyCode;l!=="Space"&&l!=="Enter"&&p!==32&&p!==13||this.togglePopup()},this._onMapClick=i=>{let l=i.originalEvent.target,p=this._element;this._popup&&(l===p||p.contains(l))&&this.togglePopup()},this._update=i=>{if(!this._map)return;let l=this._map.loaded()&&!this._map.isMoving();(i?.type==="terrain"||i?.type==="render"&&!l)&&this._map.once("render",this._update),this._lngLat=Gl(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 p="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?p=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(p=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let g="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?g="rotateX(0deg)":this._pitchAlignment==="map"&&(g=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||i&&i.type!=="moveend"||(this._pos=this._pos.round()),bt.setTransform(this._element,`${Gs[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${g} ${p}`),ee.frameAsync(new AbortController).then(()=>{this._updateOpacity(i&&i.type==="moveend")}).catch(()=>{})},this._onMove=i=>{if(!this._isDragging){let l=this._clickTolerance||this._map._clickTolerance;this._isDragging=i.point.dist(this._pointerdownPos)>=l}this._isDragging&&(this._pos=i.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 a.l("dragstart"))),this.fire(new a.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 a.l("dragend")),this._state="inactive"},this._addDragHandler=i=>{this._element.contains(i.originalEvent.target)&&(i.preventDefault(),this._positionDelta=i.point.sub(this._pos).add(this._offset),this._pointerdownPos=i.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=t&&t.anchor||"center",this._color=t&&t.color||"#3FB1CE",this._scale=t&&t.scale||1,this._draggable=t&&t.draggable||!1,this._clickTolerance=t&&t.clickTolerance||0,this._subpixelPositioning=t&&t.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=t&&t.rotation||0,this._rotationAlignment=t&&t.rotationAlignment||"auto",this._pitchAlignment=t&&t.pitchAlignment&&t.pitchAlignment!=="auto"?t.pitchAlignment:this._rotationAlignment,this.setOpacity(t?.opacity,t?.opacityWhenCovered),t&&t.element)this._element=t.element,this._offset=a.P.convert(t&&t.offset||[0,0]);else{this._defaultMarker=!0,this._element=bt.create("div");let i=bt.createNS("http://www.w3.org/2000/svg","svg"),l=41,p=27;i.setAttributeNS(null,"display","block"),i.setAttributeNS(null,"height",`${l}px`),i.setAttributeNS(null,"width",`${p}px`),i.setAttributeNS(null,"viewBox",`0 0 ${p} ${l}`);let g=bt.createNS("http://www.w3.org/2000/svg","g");
725g.setAttributeNS(null,"stroke","none"),g.setAttributeNS(null,"stroke-width","1"),g.setAttributeNS(null,"fill","none"),g.setAttributeNS(null,"fill-rule","evenodd");let y=bt.createNS("http://www.w3.org/2000/svg","g");y.setAttributeNS(null,"fill-rule","nonzero");let v=bt.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"transform","translate(3.0, 29.0)"),v.setAttributeNS(null,"fill","#000000");let C=[{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 tt of C){let nt=bt.createNS("http://www.w3.org/2000/svg","ellipse");nt.setAttributeNS(null,"opacity","0.04"),nt.setAttributeNS(null,"cx","10.5"),nt.setAttributeNS(null,"cy","5.80029008"),nt.setAttributeNS(null,"rx",tt.rx),nt.setAttributeNS(null,"ry",tt.ry),v.appendChild(nt)}let P=bt.createNS("http://www.w3.org/2000/svg","g");P.setAttributeNS(null,"fill",this._color);let S=bt.createNS("http://www.w3.org/2000/svg","path");S.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"),P.appendChild(S);let L=bt.createNS("http://www.w3.org/2000/svg","g");L.setAttributeNS(null,"opacity","0.25"),L.setAttributeNS(null,"fill","#000000");let D=bt.createNS("http://www.w3.org/2000/svg","path");D.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"),L.appendChild(D);let V=bt.createNS("http://www.w3.org/2000/svg","g");V.setAttributeNS(null,"transform","translate(6.0, 7.0)"),V.setAttributeNS(null,"fill","#FFFFFF");let U=bt.createNS("http://www.w3.org/2000/svg","g");U.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Q=bt.createNS("http://www.w3.org/2000/svg","circle");Q.setAttributeNS(null,"fill","#000000"),Q.setAttributeNS(null,"opacity","0.25"),Q.setAttributeNS(null,"cx","5.5"),Q.setAttributeNS(null,"cy","5.5"),Q.setAttributeNS(null,"r","5.4999962");let Y=bt.createNS("http://www.w3.org/2000/svg","circle");Y.setAttributeNS(null,"fill","#FFFFFF"),Y.setAttributeNS(null,"cx","5.5"),Y.setAttributeNS(null,"cy","5.5"),Y.setAttributeNS(null,"r","5.4999962"),U.appendChild(Q),U.appendChild(Y),y.appendChild(v),y.appendChild(P),y.appendChild(L),y.appendChild(V),y.appendChild(U),i.appendChild(y),i.setAttributeNS(null,"height",l*this._scale+"px"),i.setAttributeNS(null,"width",p*this._scale+"px"),this._element.appendChild(i),this._offset=a.P.convert(t&&t.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",i=>{i.preventDefault()}),this._element.addEventListener("mousedown",i=>{i.preventDefault()}),ja(this._element,this._anchor,"marker"),t&&t.className)for(let i of t.className.split(" "))this._element.classList.add(i);this._popup=null}addTo(t){return this.remove(),this._map=t,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",t._getUIString("Marker.Title")),t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),t.on("terrain",this._update),t.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),bt.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=a.Q.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t){if(!("offset"in t.options)){let p=Math.abs(13.5)/Math.SQRT2;t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[
7250,-38.1],"bottom-left":[p,-1*(38.1-13.5+p)],"bottom-right":[-p,-1*(38.1-13.5+p)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=t,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(t){return this._subpixelPositioning=t,this}getPopup(){return this._popup}togglePopup(){let t=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:t?(t.isOpen()?t.remove():(t.setLngLat(this._lngLat),t.addTo(this._map)),this):this}_updateOpacity(t=!1){var i,l;if(!(!((i=this._map)===null||i===void 0)&&i.terrain)){let L=this._map.transform.isLocationOccluded(this._lngLat)?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==L&&(this._element.style.opacity=L))}if(t)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let p=this._map,g=p.terrain.depthAtPoint(this._pos),y=p.terrain.getElevationForLngLatZoom(this._lngLat,p.transform.tileZoom);if(p.transform.lngLatToCameraDepth(this._lngLat,y)-g<.006)return void(this._element.style.opacity=this._opacity);let v=-this._offset.y/p.transform.pixelsPerMeter,C=Math.sin(p.getPitch()*Math.PI/180)*v,P=p.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),S=p.transform.lngLatToCameraDepth(this._lngLat,y+C)-P>.006;!((l=this._popup)===null||l===void 0)&&l.isOpen()&&S&&this._popup.remove(),this._element.style.opacity=S?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(t){return this._offset=a.P.convert(t),this._update(),this}addClassName(t){this._element.classList.add(t)}removeClassName(t){this._element.classList.remove(t)}toggleClassName(t){return this._element.classList.toggle(t)}setDraggable(t){return this._draggable=!!t,this._map&&(t?(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(t){return this._rotation=t||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(t){return this._rotationAlignment=t||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(t){return this._pitchAlignment=t&&t!=="auto"?t:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(t,i){return(this._opacity===void 0||t===void 0&&i===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),t!==void 0&&(this._opacity=t),i!==void 0&&(this._opacityWhenCovered=i),this._map&&this._updateOpacity(!0),this}}let yd={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ua=0,aa=!1,xd={maxWidth:100,unit:"metric"};function Zl(m,t,i){let l=i&&i.maxWidth||100,p=m._container.clientHeight/2,g=m._container.clientWidth/2,y=m.unproject([g-l/2,p]),v=m.unproject([g+l/2,p]),C=Math.round(m.project(v).x-m.project(y).x),P=Math.min(l,C,m._container.clientWidth),S=y.distanceTo(v);if(i&&i.unit==="imperial"){let L=3.2808*S;L>5280?sa(t,P,L/5280,m._getUIString("ScaleControl.Miles")):sa(t,P,L,m._getUIString("ScaleControl.Feet"))}else i&&i.unit==="nautical"?sa(t,P,S/1852,m._getUIString("ScaleControl.NauticalMiles")):S>=1e3?sa(t,P,S/1e3,m._getUIString("ScaleControl.Kilometers")):sa(t,P,S,m._getUIString("ScaleControl.Meters"))}function sa(m,t,i,l){let p=function(g){let y=Math.pow(10,`${Math.floor(g)}`.length-1),v=g/y;return v=v>=10?10:v>=5?5:v>=3?3:v>=2?2:v>=1?1:function(C){let P=Math.pow(10,Math.ceil(-Math.log(C)/Math.LN10));return Math.round(C*P)/P}(v),y*v}(i);m.style.width=t*(p/i)+"px",m.innerHTML=`${p}&nbsp;${l}`}let vd={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0}
725,Hl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function ql(m){if(m){if(typeof m=="number"){let t=Math.round(Math.abs(m)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,m),"top-left":new a.P(t,t),"top-right":new a.P(-t,t),bottom:new a.P(0,-m),"bottom-left":new a.P(t,-t),"bottom-right":new a.P(-t,-t),left:new a.P(m,0),right:new a.P(-m,0)}}if(m instanceof a.P||Array.isArray(m)){let t=a.P.convert(m);return{center:t,top:t,"top-left":t,"top-right":t,bottom:t,"bottom-left":t,"bottom-right":t,left:t,right:t}}return{center:a.P.convert(m.center||[0,0]),top:a.P.convert(m.top||[0,0]),"top-left":a.P.convert(m["top-left"]||[0,0]),"top-right":a.P.convert(m["top-right"]||[0,0]),bottom:a.P.convert(m.bottom||[0,0]),"bottom-left":a.P.convert(m["bottom-left"]||[0,0]),"bottom-right":a.P.convert(m["bottom-right"]||[0,0]),left:a.P.convert(m.left||[0,0]),right:a.P.convert(m.right||[0,0])}}return ql(new a.P(0,0))}let bd=z;d.AJAXError=a.co,d.Event=a.l,d.Evented=a.E,d.LngLat=a.Q,d.MercatorCoordinate=a.$,d.Point=a.P,d.addProtocol=a.cp,d.config=a.a,d.removeProtocol=a.cq,d.AttributionControl=Oe,d.BoxZoomHandler=kp,d.CanvasSource=Hr,d.CooperativeGesturesHandler=hd,d.DoubleClickZoomHandler=Bp,d.DragPanHandler=xn,d.DragRotateHandler=Ns,d.EdgeInsets=ys,d.FullscreenControl=class extends a.E{constructor(m={}){super(),this._onFullscreenChange=()=>{var t;let i=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((t=i?.shadowRoot)===null||t===void 0)&&t.fullscreenElement;)i=i.shadowRoot.fullscreenElement;i===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,m&&m.container&&(m.container instanceof HTMLElement?this._container=m.container:a.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(m){return this._map=m,this._container||(this._container=this._map.getContainer()),this._controlContainer=bt.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){bt.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let m=this._fullscreenButton=bt.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);bt.create("span","maplibregl-ctrl-icon",m).setAttribute("aria-hidden","true"),m.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let m=this._getTitle();this._fullscreenButton.setAttribute("aria-label",m),this._fullscreenButton.title=m}_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 a.l("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new a.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()}},d.GeoJSONSource=ms,d.GeolocateControl=class extends a.E{constructor(m){super(),this._onSuccess=t=>{if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new a.l("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_E
725RROR":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(t),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new a.l("geolocate",t)),this._finish()}},this._updateCamera=t=>{let i=new a.Q(t.coords.longitude,t.coords.latitude),l=t.coords.accuracy,p=this._map.getBearing(),g=a.e({bearing:p},this.options.fitBoundsOptions),y=gn.fromLngLat(i,l);this._map.fitBounds(y,g,{geolocateSource:!0})},this._updateMarker=t=>{if(t){let i=new a.Q(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(i).addTo(this._map),this._userLocationDotMarker.setLngLat(i).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=t=>{if(this._map){if(this.options.trackUserLocation)if(t.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 i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(t.code===3&&aa)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new a.l("error",t)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",t=>t.preventDefault()),this._geolocateButton=bt.create("button","maplibregl-ctrl-geolocate",this._container),bt.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=t=>{if(this._map){if(t===!1){a.w("Geolocation support is not available so the GeolocateControl will be disabled.");let i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{let i=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=bt.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Zs({element:this._dotElement}),this._circleElement=bt.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Zs({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",i=>{i.geolocateSource||this._watchState!=="ACTIVE_LOCK"||i.originalEvent&&i.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new a.l("trackuserlocationend")),this.fire(new a.l("userlocationlostfocus")))})}},this.options=a.e({},yd,m)}onAdd(m){return this._map=m,this._container=bt.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(t=!1){if(er!==void 0&&!t)return er;if(window.navigator.permissions===void 0)return er=!!window.navigator.geolocation,er;try{er=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{er=!!window.navigator.geolocation}return er})}().then(t=>this._finishSetupUI(t)),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(),bt.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Ua=0,aa=!1}_isOutOfMapMaxBounds(m){let t=this._map.getMaxBounds(),i=m.coords;return t&&(i.longitude<t.getWest()||i.longitude>t.getEast()||i.latitude<t.getSouth()||i.latitude>t.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_E
725RROR",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":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let m=this._map.getBounds(),t=m.getSouthEast(),i=m.getNorthEast(),l=t.distanceTo(i),p=Math.ceil(this._accuracy/(l/this._map._container.clientHeight)*2);this._circleElement.style.width=`${p}px`,this._circleElement.style.height=`${p}px`}trigger(){if(!this._setup)return a.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new a.l("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ua--,aa=!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 a.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 a.l("trackuserlocationstart")),this.fire(new a.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 m;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ua++,Ua>1?(m={maximumAge:6e5,timeout:0},aa=!0):(m=this.options.positionOptions,aa=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,m)}}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)}},d.GlobeControl=class{constructor(){this._toggleProjection=()=>{var m;let t=(m=this._map.getProjection())===null||m===void 0?void 0:m.type;this._map.setProjection(t!=="mercator"&&t?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var m;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((m=this._map.getProjection())===null||m===void 0?void 0:m.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(m){return this._map=m,this._container=bt.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=bt.create("button","maplibregl-ctrl-globe",this._container),bt.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(){bt.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},d.Hash=sd,d.ImageSource=Ki,d.KeyboardHandler=Vl,d.LngLatBounds=gn,d.LogoControl
725=js,d.Map=class extends Ul{constructor(m){var t,i;a.cl.mark(a.cm.create);let l=Object.assign(Object.assign(Object.assign({},_d),m),{canvasContextAttributes:Object.assign(Object.assign({},_d.canvasContextAttributes),m.canvasContextAttributes)});if(l.minZoom!=null&&l.maxZoom!=null&&l.minZoom>l.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(l.minPitch!=null&&l.maxPitch!=null&&l.minPitch>l.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(l.minPitch!=null&&l.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(l.maxPitch!=null&&l.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let p=new Lo,g=new bs;if(l.minZoom!==void 0&&p.setMinZoom(l.minZoom),l.maxZoom!==void 0&&p.setMaxZoom(l.maxZoom),l.minPitch!==void 0&&p.setMinPitch(l.minPitch),l.maxPitch!==void 0&&p.setMaxPitch(l.maxPitch),l.renderWorldCopies!==void 0&&p.setRenderWorldCopies(l.renderWorldCopies),super(p,g,{bearingSnap:l.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new gd,this._controls=[],this._mapId=a.a4(),this._contextLost=v=>{v.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new a.l("webglcontextlost",{originalEvent:v}))},this._contextRestored=v=>{this._setupPainter(),this.resize(),this._update(),this.fire(new a.l("webglcontextrestored",{originalEvent:v}))},this._onMapScroll=v=>{if(v.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=l.interactive,this._maxTileCacheSize=l.maxTileCacheSize,this._maxTileCacheZoomLevels=l.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},l.canvasContextAttributes),this._trackResize=l.trackResize===!0,this._bearingSnap=l.bearingSnap,this._centerClampedToGround=l.centerClampedToGround,this._refreshExpiredTiles=l.refreshExpiredTiles===!0,this._fadeDuration=l.fadeDuration,this._crossSourceCollisions=l.crossSourceCollisions===!0,this._collectResourceTiming=l.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Vn),l.locale),this._clickTolerance=l.clickTolerance,this._overridePixelRatio=l.pixelRatio,this._maxCanvasSize=l.maxCanvasSize,this.transformCameraUpdate=l.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=l.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=ri.addThrottleControl(()=>this.isMoving()),this._requestManager=new Fn(l.transformRequest),typeof l.container=="string"){if(this._container=document.getElementById(l.container),!this._container)throw new Error(`Container '${l.container}' not found.`)}else{if(!(l.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=l.container}if(l.maxBounds&&this.setMaxBounds(l.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<"u"){addEventListener("online",this._onWindowOnline,!1);let v=!1,C=ad(P=>{this._trackResize&&!this._removed&&(this.resize(P),this.redraw())},50);this._resizeObserver=new ResizeObserver(P=>{v?C(P):v=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Bo(this,l),this._hash=l.hash&&new sd(typeof l.hash=="string"&&l.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:l.center,elevation:l.elevation,zoom:l.zoom,bearing:l.bearing,pitch:l.pitch,roll:l.roll}),l.bounds&&(this.resize(),this.fitBounds(l.bounds,a.e({},l.fitBoundsOptions,{duration:0}))));let y=typeof l.style=="string"||((i=(t=l.style)===null||t===void 0?void 0:t.projection)===null||i===void 0?void 0:i.type)!=="globe";this.resize(null,y),this._localIdeographFontFamily=l.localIdeographFontFamily,this._validateStyle=l.validateStyle,l.style&&this.setStyle(l.style,{localIdeographFontFamily:l.localIdeographFontFamily}),l.attributionControl&&this.addControl(new Oe(typeof l.attributionControl
725=="boolean"?void 0:l.attributionControl)),l.maplibreLogo&&this.addControl(new js,l.logoPosition),this.on("style.load",()=>{if(y||this._resizeTransform(),this.transform.unmodified){let v=a.O(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(v)}}),this.on("data",v=>{this._update(v.dataType==="style"),this.fire(new a.l(`${v.dataType}data`,v))}),this.on("dataloading",v=>{this.fire(new a.l(`${v.dataType}dataloading`,v))}),this.on("dataabort",v=>{this.fire(new a.l("sourcedataabort",v))})}_getMapId(){return this._mapId}addControl(m,t){if(t===void 0&&(t=m.getDefaultPosition?m.getDefaultPosition():"top-right"),!m||!m.onAdd)return this.fire(new a.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let i=m.onAdd(this);this._controls.push(m);let l=this._controlPositions[t];return t.indexOf("bottom")!==-1?l.insertBefore(i,l.firstChild):l.appendChild(i),this}removeControl(m){if(!m||!m.onRemove)return this.fire(new a.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let t=this._controls.indexOf(m);return t>-1&&this._controls.splice(t,1),m.onRemove(this),this}hasControl(m){return this._controls.indexOf(m)>-1}calculateCameraOptionsFromTo(m,t,i,l){return l==null&&this.terrain&&(l=this.terrain.getElevationForLngLatZoom(i,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(m,t,i,l)}resize(m,t=!0){let[i,l]=this._containerDimensions(),p=this._getClampedPixelRatio(i,l);if(this._resizeCanvas(i,l,p),this.painter.resize(i,l,p),this.painter.overLimit()){let y=this.painter.context.gl;this._maxCanvasSize=[y.drawingBufferWidth,y.drawingBufferHeight];let v=this._getClampedPixelRatio(i,l);this._resizeCanvas(i,l,v),this.painter.resize(i,l,v)}this._resizeTransform(t);let g=!this._moving;return g&&(this.stop(),this.fire(new a.l("movestart",m)).fire(new a.l("move",m))),this.fire(new a.l("resize",m)),g&&this.fire(new a.l("moveend",m)),this}_resizeTransform(m=!0){var t;let[i,l]=this._containerDimensions();this.transform.resize(i,l,m),(t=this._requestedCameraState)===null||t===void 0||t.resize(i,l,m)}_getClampedPixelRatio(m,t){let{0:i,1:l}=this._maxCanvasSize,p=this.getPixelRatio(),g=m*p,y=t*p;return Math.min(g>i?i/g:1,y>l?l/y:1)*p}getPixelRatio(){var m;return(m=this._overridePixelRatio)!==null&&m!==void 0?m:devicePixelRatio}setPixelRatio(m){this._overridePixelRatio=m,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(m){return this.transform.setMaxBounds(gn.convert(m)),this._update()}setMinZoom(m){if((m=m??-2)>=-2&&m<=this.transform.maxZoom)return this.transform.setMinZoom(m),this._update(),this.getZoom()<m&&this.setZoom(m),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(m){if((m=m??22)>=this.transform.minZoom)return this.transform.setMaxZoom(m),this._update(),this.getZoom()>m&&this.setZoom(m),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(m){if((m=m??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(m>=0&&m<=this.transform.maxPitch)return this.transform.setMinPitch(m),this._update(),this.getPitch()<m&&this.setPitch(m),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(m){if((m=m??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(m>=this.transform.minPitch)return this.transform.setMaxPitch(m),this._update(),this.getPitch()>m&&this.setPitch(m),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(m){return this.transform.setRenderWorldCopies(m),this._update()}project(m){return this.transform.locationToScreenPoint(a.Q.convert(m),this.style&&this.terrain)}unproject(m){return this.transform.screenPointToLocation(a.P.convert(m),this.terrain)}isMoving(){var m;return this._moving||((m=this.handlers)===null||m===void 0?void 0:m.isMoving())}isZooming(){var m;return this._zooming||((m=this.handlers)===null||m===void 0?void 0:m.isZooming())}isRotating(){var m;return this._rotating||((m=this.handlers)===null||m===void 0?void 0:m.isRotating())}_createDelegatedListener(m,t,i){if(m==="mouseenter"||m==="mouseover"){let l=!1;return{layers:t,listener:i,delegates:{mousemove:g=>{let y=t.filter(C=>this.getLayer(C)),v=y.length!==0?this.queryRenderedFeatures(g.point,{layers:y}):[];v.length?l||(l=!0,i.call(this,new Vi(m,this,g.originalEvent,{features:v}))):l=!1},mouseout:()=>{l=!1}}}}if(m==="mouseleave"||m==="mouseout"){let l=!1;return{layers:t,listener:i,delegates:{mousemove:y=>{let v=t.filter(C=>this.getLayer(C));(v.length!==0?this.queryRenderedFeatures(y.point,{layers:v}):[]).length?l=!0:l&&(l=!1,i.call(this,new Vi(m,this,y.originalEvent)))},mouseout:y=>{l&&(l=!1,i.call(this,new Vi(m,this,y.originalEvent)))}}}}{let l=p=>{let g=t.filter(v=>this.getLayer(v)),y=g.length!==0?this.queryRenderedFeatures(p.point,{layers:g}):[];y.length&&(p.features=y,i.call(this,p),delete p.features)};return{layers:t,listener:i,delegates:{[m]:l}}}}_saveDelegatedListener(m,t){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[m]=this._delegatedListeners[m]||[],this._delegatedListeners[m].push(t)}_removeDelegatedListener(m,t,i){if(!this._delegatedListeners||!this._delegatedListeners[m])return;let l=this._delegatedListeners[m];for(let p=0;p<l.length;p++){let g=l[p];if(g.listener===i&&g.layers.length===t.length&&g.layers.every(y=>t.includes(y))){for(let y in g.delegates)this.off(y,g.delegates[y]);return void l.splice(p,1)}}}on(m,t,i){if(i===void 0)return super.on(m,t);let l=typeof t=="string"?[t]:t,p=this._createDelegatedListener(m,l,i);this._saveDelegatedListener(m,p);for(let g in p.delegates)this.on(g,p.delegates[g]);return{unsubscribe:()=>{this._removeDelegatedListener(m,l,i)}}}once(m,t,i){if(i===void 0)return super.once(m,t);let l=typeof t=="string"?[t]:t,p=this._createDelegatedListener(m,l,i);for(let g in p.delegates){let y=p.delegates[g];p.delegates[g]=(...v)=>{this._removeDelegatedListener(m,l,i),y(...v)}}this._saveDelegatedListener(m,p);for(let g in p.delegates)this.once(g,p.delegates[g]);return this}off(m,t,i){return i===void 0?super.off(m,t):(this._removeDelegatedListener(m,typeof t=="string"?[t]:t,i),this)}queryRenderedFeatures(m,t){if(!this.style)return[];let i,l=m instanceof a.P||Array.isArray(m),p=l?m:[[0,0],[this.transform.width,this.transform.height]];if(t=t||(l?{}:m)||{},p instanceof a.P||typeof p[0]=="number")i=[a.P.convert(p)];
725else{let g=a.P.convert(p[0]),y=a.P.convert(p[1]);i=[g,new a.P(y.x,g.y),y,new a.P(g.x,y.y),g]}return this.style.queryRenderedFeatures(i,t,this.transform)}querySourceFeatures(m,t){return this.style.querySourceFeatures(m,t)}setStyle(m,t){return(t=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},t)).diff!==!1&&t.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&m?(this._diffStyle(m,t),this):(this._localIdeographFontFamily=t.localIdeographFontFamily,this._updateStyle(m,t))}setTransformRequest(m){return this._requestManager.setTransformRequest(m),this}_getUIString(m){let t=this._locale[m];if(t==null)throw new Error(`Missing UI string '${m}'`);return t}_updateStyle(m,t){var i,l;if(t.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(m,t));let p=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!m)),m?(this.style=new Ss(this,t||{}),this.style.setEventedParent(this,{style:this.style}),typeof m=="string"?this.style.loadURL(m,t,p):this.style.loadJSON(m,t,p),this):((l=(i=this.style)===null||i===void 0?void 0:i.projection)===null||l===void 0||l.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ss(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(m,t){if(typeof m=="string"){let i=this._requestManager.transformRequest(m,"Style");a.j(i,new AbortController).then(l=>{this._updateDiff(l.data,t)}).catch(l=>{l&&this.fire(new a.k(l))})}else typeof m=="object"&&this._updateDiff(m,t)}_updateDiff(m,t){try{this.style.setState(m,t)&&this._update(!0)}catch(i){a.w(`Unable to perform style diff: ${i.message||i.error||i}.  Rebuilding the style from scratch.`),this._updateStyle(m,t)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():a.w("There is no style added to the map.")}addSource(m,t){return this._lazyInitEmptyStyle(),this.style.addSource(m,t),this._update(!0)}isSourceLoaded(m){let t=this.style&&this.style.sourceCaches[m];if(t!==void 0)return t.loaded();this.fire(new a.k(new Error(`There is no source with ID '${m}'`)))}setTerrain(m){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),m){let t=this.style.sourceCaches[m.source];if(!t)throw new Error(`cannot load terrain, because there exists no source with ID: ${m.source}`);this.terrain===null&&t.reload();for(let i in this.style._layers){let l=this.style._layers[i];l.type==="hillshade"&&l.source===m.source&&a.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.")}this.terrain=new Vp(this.painter,t,m),this.painter.renderToTexture=new Us(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=i=>{var l;i.dataType==="style"?this.terrain.sourceCache.freeRtt():i.dataType==="source"&&i.tile&&(i.sourceId!==m.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))),((l=i.source)===null||l===void 0?void 0:l.type)==="image"?this.terrain.sourceCache.freeRtt():this.terrain.sourceCache.freeRtt(i.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 a.l("terrain",{terrain:m})),this}getTerrain(){var m,t;return(t=(m=this.terrain)===null||m===void 0?void 0:m.options)!==null&&t!==void 0?t:null}areTilesLoaded(){let m=this.style&&this.style.sourceCaches;for(let t in m){let i=m[t]._tiles;for(let l in i){let p=i[l];if(p.state!=="loaded"&&p.state!=="errored")return!1}}return!0}removeSource(m){return this.style.removeSource(m),this._update(!0)}getSource(m){return this.style.getSource(m)}setSourceTileLodParams(m,t,i){if(i){let l=this.getSource(i);if(!l)throw new Error(`There is no source with ID "${i}", cannot set LOD parameters`);l.calculateTileZoom=H(Math.max(1,m),Math.max(1,t))}else for(let l in this.style.sourceCaches)this.style.sourceCaches[l].getSource().calculateTileZoom=H(Math.max(1,m),Math.max(1,t));return this._update(!0),this}addImage(m,t,i={}){let{pixelRatio:l=1,sdf:p=!1,stretchX:g,stretchY:y,content:v,textFitWidth:C,textFitHeight:P}=i;if(this._lazyInitEmptyStyle(),!(t instanceof HTMLImageElement||a.b(t))){if
725(t.width===void 0||t.height===void 0)return this.fire(new a.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:S,height:L,data:D}=t,V=t;return this.style.addImage(m,{data:new a.R({width:S,height:L},new Uint8Array(D)),pixelRatio:l,stretchX:g,stretchY:y,content:v,textFitWidth:C,textFitHeight:P,sdf:p,version:0,userImage:V}),V.onAdd&&V.onAdd(this,m),this}}{let{width:S,height:L,data:D}=ee.getImageData(t);this.style.addImage(m,{data:new a.R({width:S,height:L},D),pixelRatio:l,stretchX:g,stretchY:y,content:v,textFitWidth:C,textFitHeight:P,sdf:p,version:0})}}updateImage(m,t){let i=this.style.getImage(m);if(!i)return this.fire(new a.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let l=t instanceof HTMLImageElement||a.b(t)?ee.getImageData(t):t,{width:p,height:g,data:y}=l;if(p===void 0||g===void 0)return this.fire(new a.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(p!==i.data.width||g!==i.data.height)return this.fire(new a.k(new Error("The width and height of the updated image must be that same as the previous version of the image")));let v=!(t instanceof HTMLImageElement||a.b(t));return i.data.replace(y,v),this.style.updateImage(m,i),this}getImage(m){return this.style.getImage(m)}hasImage(m){return m?!!this.style.getImage(m):(this.fire(new a.k(new Error("Missing required image id"))),!1)}removeImage(m){this.style.removeImage(m)}loadImage(m){return ri.getImage(this._requestManager.transformRequest(m,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(m,t){return this._lazyInitEmptyStyle(),this.style.addLayer(m,t),this._update(!0)}moveLayer(m,t){return this.style.moveLayer(m,t),this._update(!0)}removeLayer(m){return this.style.removeLayer(m),this._update(!0)}getLayer(m){return this.style.getLayer(m)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(m,t,i){return this.style.setLayerZoomRange(m,t,i),this._update(!0)}setFilter(m,t,i={}){return this.style.setFilter(m,t,i),this._update(!0)}getFilter(m){return this.style.getFilter(m)}setPaintProperty(m,t,i,l={}){return this.style.setPaintProperty(m,t,i,l),this._update(!0)}getPaintProperty(m,t){return this.style.getPaintProperty(m,t)}setLayoutProperty(m,t,i,l={}){return this.style.setLayoutProperty(m,t,i,l),this._update(!0)}getLayoutProperty(m,t){return this.style.getLayoutProperty(m,t)}setGlyphs(m,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(m,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(m,t,i={}){return this._lazyInitEmptyStyle(),this.style.addSprite(m,t,i,l=>{l||this._update(!0)}),this}removeSprite(m){return this._lazyInitEmptyStyle(),this.style.removeSprite(m),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(m,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(m,t,i=>{i||this._update(!0)}),this}setLight(m,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(m,t),this._update(!0)}getLight(){return this.style.getLight()}setSky(m,t={}){return this._lazyInitEmptyStyle(),this.style.setSky(m,t),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(m,t){return this.style.setFeatureState(m,t),this._update()}removeFeatureState(m,t){return this.style.removeFeatureState(m,t),this._update()}getFeatureState(m){return this.style.getFeatureState(m)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let m=0,t=0;return this._container&&(m=this._container.clientWidth||400,t=this._container.clientHeight||300),[m,t]}_setupContainer(){let m=this._container;m.classList.add("maplibregl-map");let t=this._canvasContainer=bt.create("div","maplibregl-canvas-container",m);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=bt.create("canvas","maplibregl-canvas",t),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","regi
725on");let i=this._containerDimensions(),l=this._getClampedPixelRatio(i[0],i[1]);this._resizeCanvas(i[0],i[1],l);let p=this._controlContainer=bt.create("div","maplibregl-control-container",m),g=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(y=>{g[y]=bt.create("div",`maplibregl-ctrl-${y} `,p)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(m,t,i){this._canvas.width=Math.floor(i*m),this._canvas.height=Math.floor(i*t),this._canvas.style.width=`${m}px`,this._canvas.style.height=`${t}px`}_setupPainter(){let m=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),t=null;this._canvas.addEventListener("webglcontextcreationerror",l=>{t={requestedAttributes:m},l&&(t.statusMessage=l.statusMessage,t.type=l.type)},{once:!0});let i=null;if(i=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,m):this._canvas.getContext("webgl2",m)||this._canvas.getContext("webgl",m),!i){let l="Failed to initialize WebGL";throw t?(t.message=l,new Error(JSON.stringify(t))):new Error(l)}this.painter=new Cp(i,this.transform),ne.testSupport(i)}migrateProjection(m,t){super.migrateProjection(m,t),this.painter.transform=m,this.fire(new a.l("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(m){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||m,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(m){return this._update(),this._renderTaskQueue.add(m)}_cancelRenderFrame(m){this._renderTaskQueue.remove(m)}_render(m){var t,i,l,p,g;let y=this._idleTriggered?this._fadeDuration:0,v=((t=this.style.projection)===null||t===void 0?void 0:t.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(m),this._removed)return;let C=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let L=this.transform.zoom,D=ee.now();this.style.zoomHistory.update(L,D);let V=new a.C(L,{now:D,fadeDuration:y,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),U=V.crossFadingFactor();U===1&&U===this._crossFadingFactor||(C=!0,this._crossFadingFactor=U),this.style.update(V)}let P=((i=this.style.projection)===null||i===void 0?void 0:i.transitionState)>0!==v;(l=this.style.projection)===null||l===void 0||l.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((p=this.style.projection)===null||p===void 0?void 0:p.transitionState,(g=this.style.projection)===null||g===void 0?void 0:g.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||P)&&(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,y,this._crossSourceCollisions,P),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:y,showPadding:this.showPadding}),this.fire(new a.l("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,a.cl.mark(a.cm.load),this.fire(new a.l("load"))),this.style&&(this.style.hasTransitions()||C)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let S=this._sourcesDirty||this._styleDirty||this._placementDirty;return S||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.l("idle")),!this._loaded||this._fullyLoaded||S||(this._fullyLoaded=!0,a.cl.mark(a.cm.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var m;this._hash&&this._hash.remove();for(let i of this._controls)i.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<"u"&&removeEventListener("online",this._onWindowOnline,!1),ri.removeThrottleControl(this._imageQueueHandle),(m=this._resizeObserver)===null||m===void 0||m.disconnect();let t=this.painter.context.gl.getExtension("WEBGL_lose_context");t?.loseContext&&t.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),bt.remove(this._canvasContainer),bt.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),a.cl.clearMetrics(),this._removed=!0,this.fire(new a.l("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,ee.frame(this._frameRequest,m=>{a.cl.frame(m),this._frameRequest=null;try{this._render(m)}catch(t){if(!a.cn(t)&&!function(i){return i.message===qc}(t))throw t}},()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(m){this._showTileBoundaries!==m&&(this._showTileBoundaries=m,this._update())}get showPadding(){return!!this._showPadding}set showPadding(m){this._showPadding!==m&&(this._showPadding=m,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(m){this._showCollisionBoxes!==m&&(this._showCollisionBoxes=m,m?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(m){this._showOverdrawInspector!==m&&(this._showOverdrawInspector=m,this._update())}get repaint(){return!!this._repaint}set repaint(m){this._repaint!==m&&(this._repaint=m,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(m){this._vertices=m,this._update()}get version(){return Zn}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(m){return this._lazyInitEmptyStyle(),this.style.setProjection(m),this._update(!0)}},d.MapMouseEvent=Vi,d.MapTouchEvent=Li,d.MapWheelEvent=_o,d.Marker=Zs,d.NavigationControl
725=class{constructor(m){this._updateZoomButtons=()=>{let t=this._map.getZoom(),i=t===this._map.getMaxZoom(),l=t===this._map.getMinZoom();this._zoomInButton.disabled=i,this._zoomOutButton.disabled=l,this._zoomInButton.setAttribute("aria-disabled",i.toString()),this._zoomOutButton.setAttribute("aria-disabled",l.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=(t,i)=>{let l=this._map._getUIString(`NavigationControl.${i}`);t.title=l,t.setAttribute("aria-label",l)},this.options=a.e({},$s,m),this._container=bt.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",t=>t.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",t=>this._map.zoomIn({},{originalEvent:t})),bt.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",t=>this._map.zoomOut({},{originalEvent:t})),bt.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",t=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:t}):this._map.resetNorth({},{originalEvent:t})}),this._compassIcon=bt.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(m){return this._map=m,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 $l(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){bt.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(m,t){let i=bt.create("button",m,this._container);return i.type="button",i.addEventListener("click",t),i}},d.Popup=class extends a.E{constructor(m){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:void 0)},this.remove=()=>(this._content&&bt.remove(this._content),this._container&&(bt.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 a.l("close"))),this),this._onMouseUp=t=>{this._update(t.point)},this._onMouseMove=t=>{this._update(t.point)},this._onDrag=t=>{this._update(t.point)},this._update=t=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=bt.create("div","maplibregl-popup",this._map.getContainer()),this._tip=bt.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let y of this.options.className.split(" "))this._container.classList.add(y);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=Gl(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),this._trackPointer&&!t)return;let i=this._flatPos=this._pos=this._trackPointer&&t?t:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&t?t:this._map.transform.locationToScreenPoint(this._lngLat));let l=this.options.anchor,p=ql(this.options.offset);if(!l){let y=this._container.offsetWidth,v=this._container.offsetHeight,C;C=i.y+p.bottom.y<v?["top"]:i.y>this._map.transform.height-v?["bottom"]:[],i.x<y/2?C.push("left"):i.x>this._map.transform.width-y/2&&C.push("right"),l=C.length===0?"bottom":C.join("-")}let g=i.add(p[l]);this.options.subpixelPositioning||(g=g.round()),bt.setTransform(this._container,`${Gs[l]} translate(${g.x}px,${g.y}px)`),ja(this._container,l,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(vd),m)}addTo(m){return this._map&&this.remove(),this._map=m,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 a.l("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(m){return this._lngLat=a.Q.convert(m),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(m){return this.setDOMContent(document.createTextNode(m))}setHTML(m){let t=document.createDocumentFragment(),i=document.createElement("body"),l;for(i.innerHTML=m;l=i.firstChild,l;)t.appendChild(l);return this.setDOMContent(t)}getMaxWidth(){var m;return(m=this._container)===null||m===void 0?void 0:m.style.maxWidth}setMaxWidth(m){return this.options.maxWidth=m,this._update(),this}setDOMContent(m){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=bt.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(m),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(m){return this._container&&this._container.classList.add(m),this}removeClassName(m){return this._container&&this._container.classList.remove(m),this}setOffset(m){return this.options.offset=m,this._update(),this}toggleClassName(m){if(this._container)return this._container.classList.toggle(m)}setSubpixelPositioning(m){this.options.subpixelPositioning=m}_createCloseButton(){this.options.closeButton&&(this._closeButton=bt.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let m=this._container.querySelector(Hl);m&&m.focus()}},d.RasterDEMTileSource=hs,d.RasterTileSource=oo,d.ScaleControl=class{constructor(m){this._onMove=()=>{Zl(this._map,this._container,this.options)},this.setUnit=t=>{this.options.unit=t,Zl(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},xd),m)}getDefaultPosition(){return"bottom-left"}onAdd(m){return this._map=m,this._container=bt.create("div","maplibregl-ctrl maplibregl-ctrl-scale",m.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){bt.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}}
725,d.ScrollZoomHandler=ud,d.Style=Ss,d.TerrainControl=class{constructor(m){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=m}onAdd(m){return this._map=m,this._container=bt.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=bt.create("button","maplibregl-ctrl-terrain",this._container),bt.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(){bt.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},d.TwoFingersTouchPitchHandler=Lp,d.TwoFingersTouchRotateHandler=Nl,d.TwoFingersTouchZoomHandler=Bl,d.TwoFingersTouchZoomRotateHandler=jl,d.VectorTileSource=fr,d.VideoSource=Io,d.addSourceType=(m,t)=>a._(void 0,void 0,void 0,function*(){if(gs(m))throw new Error(`A source type called "${m}" already exists.`);((i,l)=>{ko[i]=l})(m,t)}),d.clearPrewarmedResources=function(){let m=uo;m&&(m.isPreloaded()&&m.numActive()===1?(m.release(xa),uo=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()"))},d.createTileMesh=pl,d.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},d.getRTLTextPluginStatus=function(){return Eo().getRTLTextPluginStatus()},d.getVersion=function(){return bd},d.getWorkerCount=function(){return po.workerCount},d.getWorkerUrl=function(){return a.a.WORKER_URL},d.importScriptInWorkers=function(m){return va().broadcast("IS",m)},d.prewarm=function(){gr().acquire(xa)},d.setMaxParallelImageRequests=function(m){a.a.MAX_PARALLEL_IMAGE_REQUESTS=m},d.setRTLTextPlugin=function(m,t){return Eo().setRTLTextPlugin(m,t)},d.setWorkerCount=function(m){po.workerCount=m},d.setWorkerUrl=function(m){a.a.WORKER_URL=m}});var c=h;return c})});var xc=(()=>{class h{constructor(n){this.platformId=n,this._router=gt(Ja),this._localizationService=gt(un),this.isClient=Te(!1),this._isInIframe=Te(!1),this.isInIframe=Ut(()=>this._isInIframe()),this._theme=Te(void 0),this.theme=Ut(()=>this._theme()),this.themeUpdates$=new tf(1),this._activeSectionIndex=Te(void 0),this.activeSectionIndex=Ut(()=>this._activeSectionIndex()),this.isProgrammaticNavigation=!1,this.isClient.set(An(this.platformId));let c=this.checkIfInIframe();this._isInIframe.set(c),this.isClient()&&!this.isInIframe()&&this.mightBeInIframe()&&this._isInIframe.set(!0),this.isInIframe()&&(this.initMessageListener(),this.initRouterListener())}initRouterListener(){this.isClient()&&this._router.events.pipe(Gd(n=>n instanceof vf)).subscribe(n=>{this.isProgrammaticNavigation||this.sendMessage("CSS_NAVIGATION",{path:n.urlAfterRedirects}),this.isProgrammaticNavigation=!1})}initMessageListener(){tm(window,"message").pipe(Gd(n=>{let c=n.data;return c&&typeof c=="object"&&"type"in c}),wo(n=>n.data)).subscribe(n=>{if(n.type==="THEME_UPDATE"){console.log("Received THEME_UPDATE message:",n);let c=n.payload?.theme?.routes.map(J=>J.path),d=this._router.parseUrl(this._router.url).root.children.primary?.segments.map(J=>J.path).join("/")??"",a=c?.includes(d),z=n.payload?.theme;this._theme.set(z),z&&this.themeUpdates$.next(z),c&&!a&&this._router.navigate(["/home"])}if(n.type==="NAVIGATE_TO_PATH"&&n.path&&(this.isProgrammaticNavigation=!0,this._router.navigate([n.path])),n.type==="ACTIVE_SECTION_UPDATE"){let c=n.payload?.sectionIndex;typeof c=="number"?this._activeSectionIndex.set(c):this._activeSectionIndex.set(void 0)}n.type==="LOCALIZATION_FROM_EDS"&&n.localization&&this._localizationService.saveLocalization(n.localization)})}waitForTheme(){let n=this._theme();return n?$i(n):this.themeUpdates$.pipe(rf(1))}checkIfInIframe(){if(!this.isClient())return!1;try{return window.self!==window.top}catch(n){return console.error("Error checking iframe status:",n),!0}}mightBeInIframe(){try{return window.frameElement!==null||document.referrer!==""||window.parent&&window.parent!==window}catch(n){return console.error("Error in fallback iframe detection:",n),!0}}sendMessage(n,c){if(this.isClient())try{window.parent.postMessage(te({type:n},c||{}),"*")}catch(d){console.error("Failed to send message to parent window:",d)}}sendMerchantTheme(n){this.sendMessage("TEMP_VALUE_MERCHANT_THEME",{theme:n})}static{this.\u0275fac=function(c){return new(c||h)(sf(rn))}}static{this.\u0275prov=zn({token:h,factory:h.\u0275fac,providedIn:"root"})}}return h})();var Lf=(()=>{class h{constructor(){this.isChecked=zt(!1),this.isRound=zt(!0),this.ariaLabel=zt(""),this.disabled=zt(!1),this.formControlName=zt.required(),this.classSpecific=Ut(()=>`${this.formControlName()}-switch ${this.isChecked()?"enabled":"disabled"}
725`),this.toggleEvent=new Kn,this._isChecked=!1,this.onChange=n=>n,this.onTouch=()=>{},ii(()=>{this._isChecked=this.isChecked()})}onToggle(){this.disabled()||(this.onChange(this._isChecked),this.toggleEvent.emit(this._isChecked))}writeValue(n){n!=null&&(this._isChecked=n)}registerOnChange(n){this.onChange=n}registerOnTouched(n){this.onTouch=n}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-toggle-switch"]],inputs:{isChecked:[1,"isChecked"],isRound:[1,"isRound"],ariaLabel:[1,"ariaLabel"],disabled:[1,"disabled"],formControlName:[1,"formControlName"]},outputs:{toggleEvent:"toggleEvent"},standalone:!0,features:[Er([{provide:gc,useExisting:Js(()=>h),multi:!0}]),Kt],decls:6,vars:8,consts:[[1,"switch-container"],[1,"switch"],["type","checkbox",3,"ngModelChange","change","ngModel","disabled"],[1,"slider"],["aria-hidden","true",1,"switch-label"]],template:function(c,d){c&1&&(I(0,"div",0)(1,"label",1)(2,"input",2),yu("ngModelChange",function(z){return _u(d._isChecked,z)||(d._isChecked=z),z}),Ot("change",function(){return d.onToggle()}),E(),it(3,"span",3),E(),I(4,"span",4),X(5),E()()),c&2&&(w(),Ka(d.classSpecific()),w(),fu("ngModel",d._isChecked),j("disabled",d.disabled()),qt("aria-label",d.ariaLabel()),w(),Ie("round",d.isRound()),w(2),St(d.ariaLabel()))},dependencies:[lo,Mf,Hi,Cu],styles:['.switch-container[_ngcontent-%COMP%]{height:1.5rem;display:flex;flex-direction:row;align-items:center;gap:.5rem}.switch[_ngcontent-%COMP%]{position:relative;display:inline-block;min-width:2.8125rem;height:1.5rem;margin:0}.switch[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{opacity:0;width:0;height:0}.switch[_ngcontent-%COMP%]   .slider[_ngcontent-%COMP%]{position:absolute;cursor:pointer;inset:0;background-color:#c1c1c1;-webkit-transition:.3s;transition:.3s}.switch[_ngcontent-%COMP%]   .slider[_ngcontent-%COMP%]:before{position:absolute;content:"";height:1rem;width:1rem;left:.25rem;bottom:.25rem;background-color:var(--white);-webkit-transition:.3s;transition:.3s}.switch[_ngcontent-%COMP%]   .slider.round[_ngcontent-%COMP%]{border-radius:1.5rem}.switch[_ngcontent-%COMP%]   .slider.round[_ngcontent-%COMP%]:before{border-radius:50%}.switch-label[_ngcontent-%COMP%]{color:var(--text);font-size:var(--font-size-med);font-weight:var(--font-weight-regular);line-height:1.25rem}input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]{background-color:var(--primary)}input[_ngcontent-%COMP%]:focus + .slider[_ngcontent-%COMP%]{box-shadow:0 0 1px var(--primary)}input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]:before{-webkit-transform:translateX(1.25rem);-ms-transform:translateX(1.25rem);transform:translate(1.25rem)}']})}}return h})();var vc=(()=>{class h{constructor(){this.appInitStatus=Te("LOADING")}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275prov=zn({token:h,factory:h.\u0275fac,providedIn:"root"})}}return h})();var Df={layoutOption:{type:"string",data:"Option 1"},title:{type:"string",data:"Check Out Our Store"},images:{type:"array",objectInputType:[{key:"image",inputType:"image",type:{type:"image",data:{url:"",altText:""}}},{key:"linkUrl",inputType:"input",type:{type:"string",data:""}}],data:[{image:{url:"assets/images/default-theme-images/chef-cooking-kitchen-while-wearing-professional-attire_23-2151208274.avif",altText:"Chef cooking in a professional kitchen"},linkUrl:""},{image:{url:"assets/images/default-theme-images/tasty-italian-pizza-with-tomato-sauce-parmesan_1220-4259.avif",altText:"Italian pizza with tomato sauce"},linkUrl:""},{image:{url:"assets/images/default-theme-images/top-view-table-full-food_23-2149209253.avif",altText:"Top view of table full of food"},linkUrl:""},{image:{url:"assets/images/default-theme-images/close-up-person-cooking_23-2150980258.avif",altText:"Close up of person cooking"},linkUrl:""},{image:{url:"assets/images/default-theme-images/b890a51ff6b1ab5e2ba592c7a65f944cc4376b78.webp",altText:"Chef preparing ingredients"},linkUrl:""},{image:{url:"assets/images/default-theme-images/e41a44648e78ba0c6bed0dd5c19c50a9de4d268b.webp",altText:"Chef in a professional kitchen"},linkUrl:""},{image:{url:"assets/images/default-theme-images/top-view-meals-tasty-yummy-different-pastries-dishes-brown-surface_140725-14554.avif",altText:"Various pastries and dishes"},linkUrl:""}]}};var Pu=(()=>{class h{constructor(n,c){this.el=n,this.renderer=c,this.itemIndex=0,this.currentIndex=0,this.totalItems=0,this.currentClass=null,this.previousClass=null,this.transitionEnabled=!0}ngOnChanges(n){n.currentIndex?(this.previousClass=this.currentClass,this.updatePosition()):(n.itemIndex||n.totalItems)&&this.updatePosition()}updatePosition(){let n=this.calculatePositionClass();this.needsSpecialTransition(this.previousClass,n)&&this.transitionEnabled?this.handleSpecialTransition(n):this.applyClass(n)}needsSpecialTransition(n,c){return n==="prev-prev-prev"&&c==="next-next-next"||n==="next-next-next"&&c==="prev-prev-prev"}handleSpecialTransition(n){this.disableTransition(),this.previousClass==="prev-prev-prev"&&n==="next-next-next"?(this.renderer.removeClass(this.el.nativeElement,this.previousClass),this.renderer.addClass(this.el.nativeElement,"other-right"),this.currentClass="other-right"):this.previousClass==="next-next-next"&&n==="prev-prev-prev"&&(this.renderer.removeClass(this.el.nativeElement,this.previousClass),this.renderer.addClass(this.el.nativeElement,"other-left"),this.currentClass="other-left"),setTimeout(()=>{this.applyClass(n),this.enableTransition()},5)}disableTransition(){this.transitionEnabled=!1,this.renderer.setStyle(this.el.nativeElement,"transition","none")}enableTransition(){this.transitionEnabled=!0,this.renderer.removeStyle(this.el.nativeElement,"transition")}applyClass(n){this.currentClass&&this.renderer.removeClass(this.el.nativeElement,this.currentClass),n&&(this.renderer.addClass(this.el.nativeElement,n),this.currentClass=n)}calculatePositionClass(){if(this.totalItems<=0)return null;if(this.totalItems<=3){if(this.totalItems===1)return"center";if(this.totalItems===2)return this.itemIndex===this.currentIndex?"center":this.itemIndex>this.currentIndex?"next":"prev";if(this.totalItems===3)return this.itemIndex===this.currentIndex?"center":this.itemIndex===(this.currentIndex+1)%this.totalItems?"next":"prev"}if(this.totalItems<=5){let c=(this.itemIndex-this.currentIndex+this.totalItems)%this.totalItems;return c===0?"center":c===1?"next":c===2?"next-next":c===this.totalItems-1?"prev":"prev-prev"}if(this.itemIndex===this.currentIndex)return"center";let n=this.getRelativePosition(this.itemIndex,this.currentIndex,this.totalItems);return n===-1?"prev":n===1?"next":n===-2?"prev-prev":n===2?"next-next":n===-3?"prev-prev-prev":n===3?"next-next-next":this.itemIndex<this.currentIndex?"other-left":"other-right"}getRelativePosition(n,c,d){let a=n-c,z=n-c+d,J=n-c-d;return Math.abs(a)<=Math.abs(z)&&Math.abs(a)<=Math.abs(J)?a:Math.abs(z)<=Math.abs(J)?z:J}static{this.\u0275fac=function(c){return new(c||h)(se(kr),se(uu))}}static{this.\u0275dir=ha({type:h,selectors:[["","appCarouselPosition",""]],inputs:{itemIndex:"itemIndex",currentIndex:"currentIndex",totalItems:"totalItems"},standalone:!0,features:[ma]})}}return h})();var bc=(()=>{class h{constructor(){this.swipeThreshold=40,this.swipeLeft=new Kn,this.swipeRight=new Kn,this.touchStartX=null,this.touchEndX=null}onPointerDown(n){n.pointerType==="mouse"&&n.button!==0||(this.touchStartX=n.clientX)}onPointerUp(n){this.touchStartX!==null&&(this.touchEndX=n.clientX,this.handleSwipe(),this.resetTouch())}onPointerCancel(){this.resetTouch()}handleSwipe(){if(this.touchStartX===null||this.touchEndX===null)return;let n=this.touchEndX-this.touchStartX;Math.abs(n)<this.swipeThreshold||(n<0?this.swipeLeft.emit():this.swipeRight.emit())}resetTouch(){this.touchStartX=null,this.touchEndX=null}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275dir=ha({type:h,selectors:[["","appSwipeHorizontal",""]],hostBindings:function(c,d){c&1&&Ot("pointerdown",function(z){return d.onPointerDown(z)})("pointerup",function(z){return d.onPointerUp(z)})("pointercancel",function(){return d.onPointerCancel()})},outputs:{swipeLeft:"swipeLeft",swipeRight:"swipeRight"},standalone:!0})}}return h})();var Qy=["carousel"],Ff=(h,k)=>({$implicit:h,i:k});function Jy(h,k){h&1&&vi(0)}function tx(h,k){if(h&1&&(I(0,"a",9),ut(1,Jy,1,0,"ng-container",10),E()),h&2){let n=A(),c=n.$implicit,d=n.$index,a=hc(0);A();let z=Yn(11);j("href",c.linkUrl,Se),qt("tabindex",a?"0":"-1")("aria-hidden",a?null:"true")("aria-current",a?"true":null),w(),j("ngTemplateOutlet",z)("ngTemplateOutletContext",en(6,Ff,c,d))}}function ex(h,k){h&1&&vi(0)}function nx(h,k){if(h&1&&ut(0,ex,1,0,"ng-container",10),h&2){let n=A(),c=n.$implicit,d=n.$index;A();let a=Yn(11);j("ngTemplateOutlet",a)("ngTemplateOutletContext",en(2,Ff,c,d))}}function ix(h,k){if(h&1&&(pc(0),ut(1,tx,2,9,"a",9)(2,nx,1,5,"ng-container")),h&2){let n=k.$implicit,c=k.$index,d=A();uc(c===d.currentIndex),w(),rt(n.linkUrl?1:2)}}function ox(h,k){if(h&1&&it(0,"img",11),h&2){let n=A(),c=n.$implicit,d=n.i,a=A();j("src",c.image.url,Se)("itemIndex",d)("currentIndex",a.currentIndex)("totalItems",a.images().length)("alt",c.image.altText||"Image")}}function rx(h,k){if(h&1&&it(0,"img",11),h&2){let n=A(),c=n.$implicit,d=n.i,a=A();j("src",c.url,Se)("itemIndex",d)("currentIndex",a.currentIndex)("totalItems",a.images().length)("alt",c.altText||"Image")}}function ax(h,k){if(h&1&&ut(0,ox,1,5,"img",11)(1,rx,1,5,"img",11),h&2){let n=k.$implicit;rt(n.image!=null&&n.image.url?0:1)}}var Rf=(()=>{class h{constructor(){this.images=zt.required(),this.title=zt.required(),this.currentIndex=0,this.iconNameType=ge,this.needsBalancing=!1}ngOnInit(){this.calculateInitialIndex()}calculateInitialIndex(){if(this.images().length===0){this.currentIndex=-1;return}this.needsBalancing?this.images().length<=3?this.currentIndex=0:this.images().length<=5?this.currentIndex=1:this.currentIndex=2:this.currentIndex=Math.floor(this.images().length/2)}scrollLeft(){this.currentIndex=this.currentIndex===0?this.images().length-1:this.currentIndex-1}scrollRight(){this.currentIndex=this.currentIndex===this.images().length-1?0:this.currentIndex+1}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-option-1"]],viewQuery:function(c,d){if(c&1&&$e(Qy,5),c&2){let a;Ge(a=Ze())&&(d.carouselRef=a.first)}},inputs:{images:[1,"images"],title:[1,"title"]},standalone:!0,features:[Kt],decls:14,vars:3,consts:[["carousel",""],["imageTpl",""],[1,"image-carousel-wrapper"],[1,"title"],[1,"carousel-container"],["type","button","aria-label","Previous image",1,"nav-button","left",3,"click"],[1,"icon",3,"name"],["appSwipeHorizontal","",1,"image-carousel",3,"swipeLeft","swipeRight"],["type","button","aria-label","Next image",1,"nav-button","right",3,"click"],["target","_blank","rel","noopener noreferrer",3,"href"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["appCarouselPosition","",1,"image",3,"src","itemIndex","currentIndex","totalItems","alt"]],template:function(c,d){if(c&1){let a=Yt();I(0,"div",2)(1,"h2",3),X(2),E(),I(3,"div",4)(4,"button",5),Ot("click",function(){return kt(a),Et(d.scrollLeft())}),it(5,"app-icon",6),E(),I(6,"div",7,0),Ot("swipeLeft",function(){return kt(a),Et(d.scrollRight())})("swipeRight",function(){return kt(a),Et(d.scrollLeft())}),le(8,ix,3,2,null,null,Ce),ut(10,ax,2,1,"ng-template",null,1,ki),E(),I(12,"button",8),Ot("click",function(){return kt(a),Et(d.scrollRight())}),it(13,"app-icon",6),E()()()}c&2&&(w(2),St(d.title().data),w(3),j("name",d.iconNameType.arrow),w(3),ce(d.images()),w(5),j("name",d.iconNameType.arrow))},dependencies:[ve,Ar,Ae,Pu,bc],styles:['[_nghost-%COMP%]{--gap: 11px;--center-image-width: 120px;--center-image-height: 157px;--prev-image-width: 120px;--prev-image-height: 177px;--prev-prev-image-width: 140px;--prev-prev-image-height: 197px;--prev-prev-prev-image-width: 140px;--prev-prev-prev-image-height: 197px;--image-carousel-padding-inline: 24px;--image-carousel-padding-bottom: 16px}@media (min-width: 728px){[_nghost-%COMP%]{--gap: 24px;--center-image-width: 180px;--center-image-height: 246px;--prev-image-width: 180px;--prev-image-height: 278px;--prev-prev-image-width: 212px;--prev-prev-image-height: 326px;--prev-prev-prev-image-width: 240px;--prev-prev-prev-image-height: 374px}}@media (min-width: 768px){[_nghost-%COMP%]{--image-carousel-padding-inline: 52px;--image-carousel-padding-bottom: 32px}}@media (min-width: 1024px){[_nghost-%COMP%]{--image-carousel-padding-inline: 120px}}.image-carousel-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%;padding:32px var(--image-carousel-padding-inline) var(--image-carousel-padding-bottom);gap:32px}.image-carousel-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:0;text-align:center;font-size:32px;font-style:normal;font-weight:700;line-height:normal;font-style:italic;font-family:Caveat,"sans-serif"}@media (max-width: 767px){.image-carousel-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:var(--font-size-lg)}}.carousel-container[_ngcontent-%COMP%]{position:relative;width:100%;height:var(--prev-prev-prev-image-height);border-radius:15px;overflow:hidden;max-width:calc((var(--center-image-width) / 2 + var(--prev-image-width) + var(--prev-prev-image-width) + var(--prev-prev-prev-image-width) + var(--gap) * 3) * 2)}
725.image-carousel[_ngcontent-%COMP%]{position:relative;height:var(--prev-prev-prev-image-height);width:100%;overflow:visible;scrollbar-width:none;-ms-overflow-style:none;touch-action:pan-y}.image-carousel[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.image-carousel[_ngcontent-%COMP%]   .image[_ngcontent-%COMP%]{position:absolute;width:var(--center-image-width);top:50%;left:50%;transition:all .3s ease-in-out;border-radius:15px;visibility:visible;object-fit:cover}.image-carousel[_ngcontent-%COMP%]   .image.center[_ngcontent-%COMP%]{width:var(--center-image-width);height:var(--center-image-height);transform:translate(-50%,-50%);z-index:10}.image-carousel[_ngcontent-%COMP%]   .image.prev[_ngcontent-%COMP%]{width:var(--prev-image-width);height:var(--prev-image-height);transform:translate(calc(-100% - var(--center-image-width) / 2 - var(--gap)),-50%);z-index:9}.image-carousel[_ngcontent-%COMP%]   .image.prev-prev[_ngcontent-%COMP%]{width:var(--prev-prev-image-width);height:var(--prev-prev-image-height);transform:translate(calc(-100% - var(--center-image-width) / 2 - var(--prev-image-width) - var(--gap) * 2),-50%);z-index:8}.image-carousel[_ngcontent-%COMP%]   .image.prev-prev-prev[_ngcontent-%COMP%]{width:var(--prev-prev-prev-image-width);height:var(--prev-prev-prev-image-height);transform:translate(calc(-100% - var(--center-image-width) / 2 - var(--prev-image-width) - var(--prev-prev-image-width) - var(--gap) * 3),-50%);z-index:4}.image-carousel[_ngcontent-%COMP%]   .image.next[_ngcontent-%COMP%]{width:var(--prev-image-width);height:var(--prev-image-height);transform:translate(calc(0% + var(--center-image-width) / 2 + (var(--gap))),-50%);z-index:9}.image-carousel[_ngcontent-%COMP%]   .image.next-next[_ngcontent-%COMP%]{width:var(--prev-prev-image-width);height:var(--prev-prev-image-height);transform:translate(calc(0% + var(--center-image-width) / 2 + var(--prev-image-width) + var(--gap) * 2),-50%);z-index:8}.image-carousel[_ngcontent-%COMP%]   .image.next-next-next[_ngcontent-%COMP%]{width:var(--prev-prev-prev-image-width);height:var(--prev-prev-prev-image-height);transform:translate(calc(0% + var(--center-image-width) / 2 + var(--prev-image-width) + var(--prev-prev-image-width) + var(--gap) * 3),-50%);z-index:4}.image-carousel[_ngcontent-%COMP%]   .image.other-left[_ngcontent-%COMP%]{width:var(--prev-prev-prev-image-width);height:var(--prev-prev-prev-image-height);transform:translate(calc(-50% - 900px),-50%);z-index:1;visibility:hidden}.image-carousel[_ngcontent-%COMP%]   .image.other-right[_ngcontent-%COMP%]{width:var(--prev-prev-prev-image-width);height:var(--prev-prev-prev-image-height);transform:translate(calc(-50% + 900px),-50%);z-index:1;visibility:hidden}.nav-button[_ngcontent-%COMP%]{position:absolute;z-index:10;width:32px;height:32px;border-radius:50%;top:50%;transform:translateY(-50%);background:var(--primary-inverse);color:var(--primary);cursor:pointer;display:flex;align-items:center;justify-content:center}.nav-button[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{display:flex;min-width:11px}.nav-button.left[_ngcontent-%COMP%]{left:10px}.nav-button.left[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{transform:rotate(90deg)}.nav-button.right[_ngcontent-%COMP%]{right:10px}.nav-button.right[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{transform:rotate(270deg)}.nav-button[_ngcontent-%COMP%]:hover{box-shadow:inset 0 2px 4px #00000026}']})}}return h})();var sx=["carousel"],Bf=(h,k)=>({$implicit:h,i:k});function lx(h,k){h&1&&vi(0)}function cx(h,k){if(h&1&&(I(0,"div",9)(1,"a",10),ut(2,lx,1,0,"ng-container",11),E()()),h&2){let n=A(),c=n.$implicit,d=n.$index,a=hc(0),z=A(),J=Yn(11);j("itemIndex",d)("currentIndex",z.currentIndex)("totalItems",z.images().length),w(),j("href",c.linkUrl,Se),qt("tabindex",a?"0":"-1")("aria-hidden",a?null:"true")("aria-current",a?"true":null),w(),j("ngTemplateOutlet",J)("ngTemplateOutletContext",en(9,Bf,c,d))}}function dx(h,k){h&1&&vi(0)}function px(h,k){if(h&1&&(I(0,"div",9),ut(1,dx,1,0,"ng-container",11),E()),h&2){let n=A(),c=n.$implicit,d=n.$index,a=A(),z=Yn(11);j("itemIndex",d)("currentIndex",a.currentIndex)("totalItems",a.images().length),w(),j("ngTemplateOutlet",z)("ngTemplateOutletContext",en(5,Bf,c,d))}}function ux(h,k){if(h&1&&(pc(0),ut(1,cx,3,12,"div",9)(2,px,2,8,"div",9)),h&2){let n=k.$implicit,c=k.$index,d=A();uc(c===d.currentIndex),w(),rt(n.linkUrl?1:2)}}function hx(h,k){if(h&1&&it(0,"img",12),h&2){let n=A().$implicit;j("src",n.image==null?null:n.image.url,Se)("alt",(n.image==null?null:n.image.altText)||"Image")}}function mx(h,k){if(h&1&&it(0,"img",13),h&2){let n=A().$implicit;j("ngSrc",n.url||"assets/images/default-theme-images/placeholder.jpg")("alt",n.altText||"Image")}}function gx(h,k){if(h&1&&ut(0,hx,1,2,"img",12)(1,mx,1,2,"img",13),h&2){let n=k.$implicit;rt(n.image!=null&&n.image.url?0:1)}}var Nf=(()=>{class h{constructor(){this.images=zt.required(),this.title=zt.required(),this.currentIndex=0,this.iconNameType=ge,this.needsBalancing=!1}ngOnInit(){this.calculateInitialIndex()}calculateInitialIndex(){if(this.images().length===0){this.currentIndex=-1;return}this.needsBalancing?this.images().length<=3?this.currentIndex=0:this.images().length<=5?this.currentIndex=1:this.currentIndex=2:this.currentIndex=Math.floor(this.images().length/2)}scrollLeft(){this.currentIndex=this.currentIndex===0?this.images().length-1:this.currentIndex-1}scrollRight(){this.currentIndex=this.currentIndex===this.images().length-1?0:this.currentIndex+1}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-option-2"]],viewQuery:function(c,d){if(c&1&&$e(sx,5),c&2){let a;Ge(a=Ze())&&(d.carouselRef=a.first)}},inputs:{images:[1,"images"],title:[1,"title"]},standalone:!0,features:[Kt],decls:14,vars:3,consts:[["carousel",""],["imageTpl",""],[1,"image-carousel-wrapper"],[1,"title"],[1,"carousel-container"],["type","button","aria-label","Previous image",1,"nav-button","left",3,"click"],[1,"icon",3,"name"],["appSwipeHorizontal","",1,"image-carousel",3,"swipeLeft","swipeRight"],["type","button","aria-label","Next image",1,"nav-button","right",3,"click"],["appCarouselPosition","",1,"image",3,"itemIndex","currentIndex","totalItems"],["target","_blank","rel","noopener noreferrer",3,"href"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"image-content",2,"position","absolute","width","100%","height","100%","inset","0","object-fit","cover",3,"src","alt"],["fill","",1,"image-content",3,"ngSrc","alt"]],template:function(c,d){if(c&1){let a=Yt();I(0,"div",2)(1,"h2",3),X(2),E(),I(3,"div",4)(4,"button",5),Ot("click",function(){return kt(a),Et(d.scrollLeft())}),it(5,"app-icon",6),E(),I(6,"div",7,0),Ot("swipeLeft",function(){return kt(a),Et(d.scrollRight())})("swipeRight",function(){return kt(a),Et(d.scrollLeft())}),le(8,ux,3,2,null,null,Ce),ut(10,gx,2,1,"ng-template",null,1,ki),E(),I(12,"button",8),Ot("click",function(){return kt(a),Et(d.scrollRight())}),it(13,"app-icon",6),E()()()}c&2&&(w(2),St(d.title().data),w(3),j("name",d.iconNameType.arrow),w(3),ce(d.images()),w(5),j("name",d.iconNameType.arrow))},dependencies:[ve,Ar,mn,Ae,Pu,bc],styles:['[_nghost-%COMP%]{--gap: 11px;--image-width: 120px;--image-height: 177px;--image-carousel-padding-inline: 24px;--image-carousel-padding-bottom: 16px}@media (min-width: 768px){[_nghost-%COMP%]{--gap: 20px;--image-width: 251px;--image-height: 347px;--image-carousel-padding-inline: 52px;--image-carousel-padding-bottom: 32px}}@media (min-width: 1024px){[_nghost-%COMP%]{--image-carousel-padding-inline: 120px}}.image-carousel-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%;padding:32px var(--image-carousel-padding-inline) var(--image-carousel-padding-bottom);gap:2rem}.image-carousel-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:0;text-align:center;font-size:40px;font-style:normal;font-weight:700;line-height:normal;font-family:Caveat,"sans-serif";width:100%;display:flex}@media (max-width: 767px){.image-carousel-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:var(--font-size-lg)}}.carousel-container[_ngcontent-%COMP%]{position:relative;width:100%;height:var(--image-height);border-radius:15px;overflow:hidden;max-width:calc(var(--image-width) * 7)}
725.image-carousel[_ngcontent-%COMP%]{position:relative;height:var(--image-height);width:100%;overflow:visible;scrollbar-width:none;-ms-overflow-style:none;touch-action:pan-y}.image-carousel[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.image-carousel[_ngcontent-%COMP%]   .image[_ngcontent-%COMP%]{position:absolute;top:0;left:50%;transition:all .3s ease-in-out;border-radius:15px;visibility:visible;width:var(--image-width);height:var(--image-height)}.image-carousel[_ngcontent-%COMP%]   .image.center[_ngcontent-%COMP%]{transform:translate(-50%);z-index:10}.image-carousel[_ngcontent-%COMP%]   .image.prev[_ngcontent-%COMP%]{transform:translate(calc(-100% - var(--image-width) / 2 - var(--gap)));z-index:9}.image-carousel[_ngcontent-%COMP%]   .image.prev-prev[_ngcontent-%COMP%]{transform:translate(calc(-100% - var(--image-width) / 2 - var(--image-width) - var(--gap) * 2));z-index:8}.image-carousel[_ngcontent-%COMP%]   .image.prev-prev-prev[_ngcontent-%COMP%]{transform:translate(calc(-100% - var(--image-width) / 2 - var(--image-width) * 2 - var(--gap) * 3));z-index:4}.image-carousel[_ngcontent-%COMP%]   .image.next[_ngcontent-%COMP%]{transform:translate(calc(0% + var(--image-width) / 2 + (var(--gap))));z-index:9}.image-carousel[_ngcontent-%COMP%]   .image.next-next[_ngcontent-%COMP%]{transform:translate(calc(0% + var(--image-width) / 2 + var(--image-width) + var(--gap) * 2));z-index:8}.image-carousel[_ngcontent-%COMP%]   .image.next-next-next[_ngcontent-%COMP%]{transform:translate(calc(0% + var(--image-width) / 2 + var(--image-width) * 2 + var(--gap) * 3));z-index:4}.image-carousel[_ngcontent-%COMP%]   .image.other-left[_ngcontent-%COMP%]{transform:translate(calc(-50% - 900px));z-index:1;visibility:hidden}.image-carousel[_ngcontent-%COMP%]   .image.other-right[_ngcontent-%COMP%]{transform:translate(calc(-50% + 900px));z-index:1;visibility:hidden}.image-carousel[_ngcontent-%COMP%]   .image[_ngcontent-%COMP%]   .image-content[_ngcontent-%COMP%]{border-radius:inherit;object-fit:cover}.nav-button[_ngcontent-%COMP%]{position:absolute;z-index:10;width:32px;height:32px;border-radius:50%;top:50%;transform:translateY(-50%);background:var(--primary-inverse);color:var(--primary);cursor:pointer;display:flex;align-items:center;justify-content:center}.nav-button[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{display:flex;min-width:11px}.nav-button.left[_ngcontent-%COMP%]{left:10px}.nav-button.left[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{transform:rotate(90deg)}.nav-button.right[_ngcontent-%COMP%]{right:10px}.nav-button.right[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{transform:rotate(270deg)}.nav-button[_ngcontent-%COMP%]:hover{box-shadow:inset 0 2px 4px #00000026}']})}}return h})();var Vf=(()=>{class h{constructor(n,c){this.el=n,this.renderer=c,this.itemIndex=0,this.currentIndex=0,this.totalItems=0,this.currentClass=null,this.previousClass=null,this.transitionEnabled=!0,this.isInTransition=!1,this.positionInList=["first","second-selected","third","fourth","fifth","sixth","seventh"]}ngOnChanges(n){(n.currentIndex||n.itemIndex||n.totalItems)&&(this.previousClass=this.currentClass,this.updatePosition())}updatePosition(){if(this.isInTransition)return;let n=this.calculatePositionClass();this.needsSpecialTransition(this.previousClass,n)?this.handleSpecialTransition(n):this.applyClass(n)}needsSpecialTransition(n,c){return(n==="first"&&(c==="seventh"||c==="sixth"||c==="fifth")||n==="seventh"&&(c==="first"||c==="second-selected")||n==="sixth"&&c==="first"||n==="fifth"&&c==="first"||n==="first"&&c==="hidden"||n==="seventh"&&c==="hidden"||n==="hidden"&&(c==="first"||c==="seventh"))&&this.transitionEnabled}handleSpecialTransition(n){this.isInTransition=!0,this.disableTransition(),this.previousClass&&this.renderer.removeClass(this.el.nativeElement,this.previousClass),this.renderer.setStyle(this.el.nativeElement,"opacity","0"),this.renderer.setStyle(this.el.nativeElement,"visibility","hidden"),this.renderer.setStyle(this.el.nativeElement,"pointer-events","none"),setTimeout(()=>{this.applyClass(n),setTimeout(()=>{this.renderer.removeStyle(this.el.nativeElement,"visibility"),this.renderer.removeStyle(this.el.nativeElement,"pointer-events"),this.enableTransition(),this.renderer.removeStyle(this.el.nativeElement,"opacity"),this.isInTransition=!1},50)},50)}disableTransition(){this.transitionEnabled=!1,this.renderer.setStyle(this.el.nativeElement,"transition","none")}enableTransition(){this.transitionEnabled=!0,this.renderer.removeStyle(this.el.nativeElement,"transition"),this.renderer.setStyle(this.el.nativeElement,"transition","opacity 0.2s ease-in-out, transform 0.3s ease-in-out, left 0.3s ease-in-out, width 0.3s ease-in-out, height 0.3s ease-in-out")}applyClass(n){this.currentClass&&this.renderer.removeClass(this.el.nativeElement,this.currentClass),n&&(this.renderer.addClass(this.el.nativeElement,n),this.currentClass=n,n==="hidden"?this.renderer.setStyle(this.el.nativeElement,"visibility","hidden"):this.renderer.removeStyle(this.el.nativeElement,"visibility"))}calculatePositionClass(){if(this.totalItems<=0)return null;switch(this.getRelativePosition(this.itemIndex,this.currentIndex,this.totalItems)){case-1:return"first";
725case 0:return"second-selected";case 1:return"third";case 2:return"fourth";case 3:return"fifth";case 4:return"sixth";case 5:return"seventh";case-2:return this.positionInList[this.totalItems-1];case-3:return this.positionInList[this.totalItems-2];case-4:return this.positionInList[this.totalItems-3];case-5:return this.positionInList[this.totalItems-4];case-6:return this.positionInList[this.totalItems-5];default:return"hidden"}}getRelativePosition(n,c,d){let a=n-c,z=n-c+d,J=n-c-d;return Math.abs(a)<=Math.abs(z)&&Math.abs(a)<=Math.abs(J)?a:Math.abs(z)<=Math.abs(J)?z:J}static{this.\u0275fac=function(c){return new(c||h)(se(kr),se(uu))}}static{this.\u0275dir=ha({type:h,selectors:[["","appOption3CarouselDirective",""]],inputs:{itemIndex:"itemIndex",currentIndex:"currentIndex",totalItems:"totalItems"},standalone:!0,features:[ma]})}}return h})();var fx=["*"],jf=(()=>{class h{static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-inverted-border"]],standalone:!0,features:[Kt],ngContentSelectors:fx,decls:1,vars:0,template:function(c,d){c&1&&(mu(),gu(0))},styles:["[_nghost-%COMP%]{--size: 25px;--rotation: 0deg;position:absolute;width:var(--size);height:var(--size);transform:rotate(var(--rotation));-webkit-mask:radial-gradient(circle var(--size) at 0px 0px,transparent var(--size),black var(--size))}"]})}}return h})();var _x=["carousel"],Uf=(h,k)=>({$implicit:h,i:k});function yx(h,k){h&1&&vi(0)}function xx(h,k){if(h&1&&(I(0,"a",10),ut(1,yx,1,0,"ng-container",11),E()),h&2){let n=A(),c=n.$implicit,d=n.$index,a=hc(0);A();let z=Yn(11);j("href",c.linkUrl,Se),qt("tabindex",a?"0":"-1")("aria-hidden",a?null:"true")("aria-current",a?"true":null),w(),j("ngTemplateOutlet",z)("ngTemplateOutletContext",en(6,Uf,c,d))}}function vx(h,k){h&1&&vi(0)}function bx(h,k){if(h&1&&ut(0,vx,1,0,"ng-container",11),h&2){let n=A(),c=n.$implicit,d=n.$index;A();let a=Yn(11);j("ngTemplateOutlet",a)("ngTemplateOutletContext",en(2,Uf,c,d))}}function Cx(h,k){if(h&1&&(pc(0),I(1,"div",8),ut(2,xx,2,9,"a",10)(3,bx,1,5,"ng-container"),E()),h&2){let n=k.$implicit,c=k.$index,d=A();uc(c===d.currentIndex),w(),j("itemIndex",c)("currentIndex",d.currentIndex)("totalItems",d.images().length),w(),rt(n.linkUrl?2:3)}}function wx(h,k){if(h&1&&it(0,"img",12),h&2){let n=A().$implicit;j("src",n.image==null?null:n.image.url,Se)("alt",(n.image==null?null:n.image.altText)||"Image")}}function Mx(h,k){if(h&1&&it(0,"img",13),h&2){let n=A().$implicit;j("ngSrc",n.url||"assets/images/default-theme-images/placeholder.jpg")("alt",n.altText||"Image")}}function Px(h,k){if(h&1&&ut(0,wx,1,2,"img",12)(1,Mx,1,2,"img",13),h&2){let n=k.$implicit;rt(n.image!=null&&n.image.url?0:1)}}var $f=(()=>{class h{constructor(n){this.platformId=n,this.images=zt.required(),this.title=zt.required(),this.currentIndex=0,this.iconNameType=ge,this.needsBalancing=!0}ngOnInit(){this.calculateInitialIndex()}calculateInitialIndex(){if(this.images().length===0){this.currentIndex=-1;return}this.needsBalancing?this.images().length<=3?this.currentIndex=0:this.images().length<=5?this.currentIndex=1:this.currentIndex=1:this.currentIndex=Math.floor(this.images().length/2)}scrollLeft(){this.currentIndex=this.currentIndex===0?this.images().length-1:this.currentIndex-1}scrollRight(){this.currentIndex=this.currentIndex===this.images().length-1?0:this.currentIndex+1}static{this.\u0275fac=function(c){return new(c||h)(se(rn))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-option-3"]],viewQuery:function(c,d){if(c&1&&$e(_x,5),c&2){let a;Ge(a=Ze())&&(d.carouselRef=a.first)}},inputs:{images:[1,"images"],title:[1,"title"]},standalone:!0,features:[Kt],decls:15,vars:11,consts:[["carousel",""],["imageTpl",""],[1,"image-carousel-wrapper"],[1,"title"],[1,"carousel-container"],["type","button","aria-label","Previous image",1,"nav-button","left",3,"click"],[1,"icon",3,"name"],["appSwipeHorizontal","",1,"image-carousel",3,"swipeLeft","swipeRight"],["appOption3CarouselDirective","",1,"image",3,"itemIndex","currentIndex","totalItems"],["type","button","aria-label","Next image",1,"nav-button","right",3,"click"],["target","_blank","rel","noopener noreferrer",3,"href"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"image-content",2,"position","absolute","width","100%","height","100%","inset","0","object-fit","cover",3,"src","alt"],["fill","",1,"image-content",3,"ngSrc","alt"]],template:function(c,d){if(c&1){let a=Yt();I(0,"div",2)(1,"h2",3),X(2),E(),I(3,"div",4)(4,"button",5),Ot("click",function(){return kt(a),Et(d.scrollLeft())}),it(5,"app-icon",6),E(),I(6,"div",7,0),Ot("swipeLeft",function(){return kt(a),Et(d.scrollRight())})("swipeRight",function(){return kt(a),Et(d.scrollLeft())}),le(8,Cx,4,5,"div",8,Ce),ut(10,Px,2,1,"ng-template",null,1,ki),E(),I(12,"button",9),Ot("click",function(){return kt(a),Et(d.scrollRight())}),it(13,"app-icon",6),E(),it(14,"app-inverted-border"),E()()}c&2&&(w(2),St(d.title().data),w(3),j("name",d.iconNameType.arrow),w(3),ce(d.images()),w(5),j("name",d.iconNameType.arrow),w(),ue("--size","15px")("top","calc(var(--image-height) - 15px)")("right","0")("background","var(--page-background)"))},dependencies:[ve,Ar,mn,Ae,Vf,jf,bc],styles:['[_nghost-%COMP%]{--gap: 11px;--image-width: 120px;--image-height: 177px;--selected-image-width: 165px;--selected-image-height: 243px;--image-carousel-padding-inline: 24px;--image-carousel-padding-bottom: 16px}@media (min-width: 768px){[_nghost-%COMP%]{--gap: 20px;--image-width: 251px;--image-height: 347px;--selected-image-width: 397px;--selected-image-height: 549px;--image-carousel-padding-inline: 52px;--image-carousel-padding-bottom: 32px}}@media (min-width: 1024px){[_nghost-%COMP%]{--image-carousel-padding-inline: 120px}}.image-carousel-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%;padding:32px var(--image-carousel-padding-inline) var(--image-carousel-padding-bottom);gap:32px}.image-carousel-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:0;text-align:center;font-size:40px;font-style:normal;font-weight:700;line-height:normal;font-family:Caveat,"sans-serif";width:100%;display:flex}@media (max-width: 767px){.image-carousel-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:var(--font-size-lg)}}.carousel-container[_ngcontent-%COMP%]{position:relative;width:100%;height:var(--selected-image-height);border-radius:15px;overflow-x:hidden;max-width:calc(var(--image-width) * 7)}
725.image-carousel[_ngcontent-%COMP%]{position:relative;height:var(--selected-image-height);width:100%;overflow:visible;scrollbar-width:none;-ms-overflow-style:none;touch-action:pan-y}.image-carousel[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.image-carousel[_ngcontent-%COMP%]   .image[_ngcontent-%COMP%]{position:absolute;top:0;left:0;transition:all .3s ease-in-out;border-radius:15px;visibility:visible;width:var(--image-width);height:var(--image-height);opacity:.7}.image-carousel[_ngcontent-%COMP%]   .image.first[_ngcontent-%COMP%]{opacity:.7}@media (max-width: 465px){.image-carousel[_ngcontent-%COMP%]   .image.first[_ngcontent-%COMP%]{left:50%;transform:translate(calc(-100% - var(--selected-image-width) / 2 - var(--gap)))}}.image-carousel[_ngcontent-%COMP%]   .image.second-selected[_ngcontent-%COMP%]{left:calc(var(--image-width) + var(--gap));width:var(--selected-image-width);height:var(--selected-image-height);opacity:1}@media (max-width: 465px){.image-carousel[_ngcontent-%COMP%]   .image.second-selected[_ngcontent-%COMP%]{left:50%;transform:translate(-50%)}}.image-carousel[_ngcontent-%COMP%]   .image.third[_ngcontent-%COMP%]{left:calc(var(--image-width) + var(--selected-image-width) + var(--gap) * 2);opacity:.7}@media (max-width: 465px){.image-carousel[_ngcontent-%COMP%]   .image.third[_ngcontent-%COMP%]{left:50%;transform:translate(calc(var(--selected-image-width) / 2 + var(--gap)))}}.image-carousel[_ngcontent-%COMP%]   .image.fourth[_ngcontent-%COMP%]{left:calc(var(--image-width) * 2 + var(--selected-image-width) + var(--gap) * 3);opacity:.7}.image-carousel[_ngcontent-%COMP%]   .image.fifth[_ngcontent-%COMP%]{left:calc(var(--image-width) * 3 + var(--selected-image-width) + var(--gap) * 4);opacity:.7}.image-carousel[_ngcontent-%COMP%]   .image.sixth[_ngcontent-%COMP%]{left:calc(var(--image-width) * 4 + var(--selected-image-width) + var(--gap) * 5);opacity:.7}.image-carousel[_ngcontent-%COMP%]   .image.seventh[_ngcontent-%COMP%]{left:calc(var(--image-width) * 5 + var(--selected-image-width) + var(--gap) * 6);opacity:.7}.image-carousel[_ngcontent-%COMP%]   .image[_ngcontent-%COMP%]   .image-content[_ngcontent-%COMP%]{border-radius:inherit;object-fit:cover}.image-carousel[_ngcontent-%COMP%]   .image[_ngcontent-%COMP%]   .image-content[_ngcontent-%COMP%]:focus-visible{outline:3px solid var(--primary);outline-offset:4px}.nav-button[_ngcontent-%COMP%]{position:absolute;z-index:10;width:32px;height:32px;border-radius:50%;top:calc(var(--image-height) / 2);transform:translateY(-50%);background:var(--primary-inverse);color:var(--primary);cursor:pointer;display:flex;align-items:center;justify-content:center}.nav-button[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{display:flex;min-width:11px}.nav-button.left[_ngcontent-%COMP%]{left:10px}.nav-button.left[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{transform:rotate(90deg)}.nav-button.right[_ngcontent-%COMP%]{right:10px}.nav-button.right[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{transform:rotate(270deg)}.nav-button[_ngcontent-%COMP%]:hover{box-shadow:inset 0 2px 4px #00000026}']})}}return h})();var Ox=["carousel"];function Sx(h,k){if(h&1&&it(0,"app-option-3",0),h&2){let n=A();j("images",n.data.images.data)("title",n.data.title)}}function Tx(h,k){if(h&1&&it(0,"app-option-2",0),h&2){let n=A();j("images",n.data.images.data)("title",n.data.title)}}function Ix(h,k){if(h&1&&it(0,"app-option-1",0),h&2){let n=A();j("images",n.data.images.data)("title",n.data.title)}}var Gf=(()=>{class h{constructor(n){this.componentConfig=n,this.currentIndex=0,this.iconNameType=ge,this.needsBalancing=!1,this.data=te(te({},Df),this.componentConfig?.data)}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-image-carousel"]],viewQuery:function(c,d){if(c&1&&$e(Ox,5),c&2){let a;Ge(a=Ze())&&(d.carouselRef=a.first)}},standalone:!0,features:[Kt],decls:3,vars:1,consts:[[3,"images","title"]],template:function(c,d){c&1&&ut(0,Sx,1,2,"app-option-3",0)(1,Tx,1,2,"app-option-2",0)(2,Ix,1,2,"app-option-1",0),c&2&&rt(d.data.layoutOption.data==="Option 3"?0:d.data.layoutOption.data==="Option 2"?1:2)},dependencies:[ve,Rf,Nf,$f],styles:['[_nghost-%COMP%]{--gap: 24px;--center-image-width: 180px;--center-image-height: 246px;--prev-image-width: 180px;--prev-image-height: 278px;--prev-prev-image-width: 212px;--prev-prev-image-height: 326px;--prev-prev-prev-image-width: 240px;--prev-prev-prev-image-height: 374px;--image-carousel-padding-inline: 24px;--image-carousel-padding-bottom: 16px}@media (min-width: 768px){[_nghost-%COMP%]{--image-carousel-padding-inline: 52px;--image-carousel-padding-bottom: 32px}}@media (min-width: 1024px){[_nghost-%COMP%]{--image-carousel-padding-inline: 120px}}.image-carousel-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%;padding:32px var(--image-carousel-padding-inline) var(--image-carousel-padding-bottom);gap:2rem}.image-carousel-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{text-align:center;font-size:32px;font-style:normal;font-weight:700;line-height:normal;font-style:italic;font-family:Caveat,"sans-serif"}.carousel-container[_ngcontent-%COMP%]{position:relative;width:100%;height:374px;border-radius:15px;overflow:hidden}@media (max-width: 1330px){.carousel-container[_ngcontent-%COMP%]{height:326px}}@media (max-width: 717px){.carousel-container[_ngcontent-%COMP%]{height:278px}}.carousel-container[_ngcontent-%COMP%]   .overlay[_ngcontent-%COMP%]{position:absolute;background-color:var(--page-background);top:50%;left:50%;height:100%;transform:translate(-50%,-50%);width:calc(var(--center-image-width) + var(--prev-image-width) * 2 + var(--prev-prev-image-width) * 2 + var(--gap) * 6);z-index:6}
725.image-carousel[_ngcontent-%COMP%]{position:relative;height:374px;width:100%;overflow:hidden;scrollbar-width:none;-ms-overflow-style:none;border-radius:15px}@media (max-width: 1330px){.image-carousel[_ngcontent-%COMP%]{height:326px}}@media (max-width: 714px){.image-carousel[_ngcontent-%COMP%]{height:278px}}.image-carousel[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.image-carousel[_ngcontent-%COMP%]   .image[_ngcontent-%COMP%]{position:absolute;width:300px;top:50%;left:50%;transition:all .3s ease-in-out;border-radius:15px;visibility:visible;object-fit:cover}.image-carousel[_ngcontent-%COMP%]   .image.center[_ngcontent-%COMP%]{width:180px;height:246px;transform:translate(-50%,-50%);z-index:10}.image-carousel[_ngcontent-%COMP%]   .image.prev[_ngcontent-%COMP%]{width:180px;height:278px;transform:translate(calc(-100% - var(--center-image-width) / 2 - var(--gap)),-50%);z-index:9}.image-carousel[_ngcontent-%COMP%]   .image.prev-prev[_ngcontent-%COMP%]{width:212px;height:326px;transform:translate(calc(-100% - var(--center-image-width) / 2 - var(--prev-image-width) - var(--gap) * 2),-50%);z-index:8}.image-carousel[_ngcontent-%COMP%]   .image.prev-prev-prev[_ngcontent-%COMP%]{width:240px;height:374px;transform:translate(calc(-100% - var(--center-image-width) / 2 - var(--prev-image-width) - var(--prev-prev-image-width) - var(--gap) * 3),-50%);z-index:4}.image-carousel[_ngcontent-%COMP%]   .image.next[_ngcontent-%COMP%]{width:180px;height:278px;transform:translate(calc(0% + var(--center-image-width) / 2 + (var(--gap))),-50%);z-index:9}.image-carousel[_ngcontent-%COMP%]   .image.next-next[_ngcontent-%COMP%]{width:212px;height:326px;transform:translate(calc(0% + var(--center-image-width) / 2 + var(--prev-image-width) + var(--gap) * 2),-50%);z-index:8}.image-carousel[_ngcontent-%COMP%]   .image.next-next-next[_ngcontent-%COMP%]{width:240px;height:374px;transform:translate(calc(0% + var(--center-image-width) / 2 + var(--prev-image-width) + var(--prev-prev-image-width) + var(--gap) * 3),-50%);z-index:4}.image-carousel[_ngcontent-%COMP%]   .image.other-left[_ngcontent-%COMP%]{width:240px;height:374px;transform:translate(calc(-50% - 900px),-50%);z-index:1;visibility:hidden}.image-carousel[_ngcontent-%COMP%]   .image.other-right[_ngcontent-%COMP%]{width:240px;height:374px;transform:translate(calc(-50% + 900px),-50%);z-index:1;visibility:hidden}.nav-button[_ngcontent-%COMP%]{position:absolute;z-index:10;width:32px;height:32px;border-radius:50%;top:50%;transform:translateY(-50%);background:var(--primary-inverse);color:var(--primary);cursor:pointer;display:flex;align-items:center;justify-content:center}.nav-button[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{display:flex;min-width:11px}.nav-button.left[_ngcontent-%COMP%]{left:10px}.nav-button.left[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{transform:rotate(90deg)}.nav-button.right[_ngcontent-%COMP%]{right:10px}.nav-button.right[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{transform:rotate(270deg)}.nav-button[_ngcontent-%COMP%]:hover{box-shadow:inset 0 2px 4px #00000026}']})}}return h})();var fa=function(h){return h[h.State=0]="State",h[h.Transition=1]="Transition",h[h.Sequence=2]="Sequence",h[h.Group=3]="Group",h[h.Animate=4]="Animate",h[h.Keyframes=5]="Keyframes",h[h.Style=6]="Style",h[h.Trigger=7]="Trigger",h[h.Reference=8]="Reference",h[h.AnimateChild=9]="AnimateChild",h[h.AnimateRef=10]="AnimateRef",h[h.Query=11]="Query",h[h.Stagger=12]="Stagger",h}(fa||{}),UO="*";function nl(h,k){return{type:fa.Trigger,name:h,definitions:k,options:{}}}function es(h,k=null){return{type:fa.Animate,styles:k,timings:h}}function $O(h,k=null){return{type:fa.Group,steps:h,options:k}}function GO(h,k=null){return{type:fa.Sequence,steps:h,options:k}}function Wo(h){return{type:fa.Style,styles:h,offset:null}}function _a(h,k,n){return{type:fa.State,name:h,styles:k,options:n}}function ns(h,k,n=null){return{type:fa.Transition,expr:h,animation:k,options:n}}function ZO(h,k,n=null){return{type:fa.Query,selector:h,animation:k,options:n}}var Zf=class{constructor(k=0,n=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=k+n}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(k=>k()),this._onDoneFns=[])}onStart(k){this._originalOnStartFns.push(k),this._onStartFns.push(k)}onDone(k){this._originalOnDoneFns.push(k),this._onDoneFns.push(k)}onDestroy(k){this._onDestroyFns.push(k)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(k=>k()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(k=>k()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(k){this._position=this.totalTime?k*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(k){let n=k=="start"?this._onStartFns:this._onDoneFns;
725n.forEach(c=>c()),n.length=0}},Hf=class{constructor(k){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=k;let n=0,c=0,d=0,a=this.players.length;a==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(z=>{z.onDone(()=>{++n==a&&this._onFinish()}),z.onDestroy(()=>{++c==a&&this._onDestroy()}),z.onStart(()=>{++d==a&&this._onStart()})}),this.totalTime=this.players.reduce((z,J)=>Math.max(z,J.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(k=>k()),this._onDoneFns=[])}init(){this.players.forEach(k=>k.init())}onStart(k){this._onStartFns.push(k)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(k=>k()),this._onStartFns=[])}onDone(k){this._onDoneFns.push(k)}onDestroy(k){this._onDestroyFns.push(k)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(k=>k.play())}pause(){this.players.forEach(k=>k.pause())}restart(){this.players.forEach(k=>k.restart())}finish(){this._onFinish(),this.players.forEach(k=>k.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(k=>k.destroy()),this._onDestroyFns.forEach(k=>k()),this._onDestroyFns=[])}reset(){this.players.forEach(k=>k.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(k){let n=k*this.totalTime;this.players.forEach(c=>{let d=c.totalTime?Math.min(1,n/c.totalTime):1;c.setPosition(d)})}getPosition(){let k=this.players.reduce((n,c)=>n===null||c.totalTime>n.totalTime?c:n,null);return k!=null?k.getPosition():0}beforeDestroy(){this.players.forEach(k=>{k.beforeDestroy&&k.beforeDestroy()})}triggerCallback(k){let n=k=="start"?this._onStartFns:this._onDoneFns;n.forEach(c=>c()),n.length=0}},HO="!";function qf(h,k="300ms"){return nl("rotate",[_a("true",Wo({transform:"*"})),_a("false",Wo({transform:`rotate(${h})`})),ns("false <=> true",es(`${k}`))])}function XO(){return nl("openClose",[ns(":enter",[Wo({transform:"translateY(100%)",opacity:0}),es("300ms ease-in",Wo({transform:"translateY(0)",opacity:1}))]),ns(":leave",[es("300ms ease-out",Wo({transform:"translateY(100%)",opacity:0}))])])}var Ex=["accountButton"],zx=["dropdownContainer"],Ax=["dropdownMenu"],Lx=h=>({"label-visible":h}),Dx=h=>({expanded:h}),Fx=h=>({"logged-in":h}),Rx=h=>({hidden:h}),Bx=()=>["/","account","profile"],Nx=()=>["/","account","notification-options"],Vx=()=>["/","account","address-book"];function jx(h,k){if(h&1&&(I(0,"span",11),X(1),E()),h&2){let n=A();Ie("withVideo",n.hasVideo()),w(),St(n.localizationService.getLocalizationString("header.sign_in"))}}function Ux(h,k){if(h&1&&it(0,"app-icon",9),h&2){let n=A();j("name",n.iconName.arrow)}}function $x(h,k){if(h&1){let n=Yt();I(0,"div",12,2),Ot("keydown.escape",function(d){return kt(n),A().closeDropdown(!0),Et(d.stopPropagation())}),I(2,"span",13),X(3),E(),I(4,"div",14)(5,"button",15),Ot("click",function(){kt(n);let d=A();return Et(d.closeDropdown())}),it(6,"app-icon",16),X(7),E(),I(8,"button",15),Ot("click",function(){kt(n);let d=A();return Et(d.closeDropdown())}),it(9,"app-icon",16),X(10),E(),I(11,"button",15),Ot("click",function(){kt(n);let d=A();return Et(d.closeDropdown())}),it(12,"app-icon",16),X(13),E(),I(14,"div",17),it(15,"div",18),E(),I(16,"button",19),Ot("click",function(d){return kt(n),A().logout(),Et(d.stopPropagation())}),it(17,"app-icon",16),X(18),E()()()}if(h&2){let n,c=A();Ie("bottom",c.showDropdown()),j("ngClass",me(19,Rx,!c.showDropdown())),qt("aria-labelledby","account_dropdown_button"),w(3),St((n=c.authService.account())==null?null:n.name),w(2),j("routerLink",Ii(21,Bx))("routerLinkActive","active-page"),w(),j("name",c.iconName.user),w(),Rt(" ",c.localizationService.getLocalizationString("header.account_button.profile")," "),w(),j("routerLink",Ii(22,Nx))("routerLinkActive","active-page"),w(),j("name",c.iconName.notification),w(),Rt(" ",c.localizationService.getLocalizationString("header.account_button.notification_options")," "),w(),j("routerLink",Ii(23,Vx))("routerLinkActive","active-page"),w(),j("name",c.iconName.addressBook),w(),Rt(" ",c.localizationService.getLocalizationString("header.account_button.address_book")," "),w(4),j("name",c.iconName.logout),w(),Rt(" ",c.localizationService.getLocalizationString("header.account_button.sign_out")," ")}}var Wf=(()=>{class h{constructor(n){this.router=n,this.layoutService=gt(pn),this.modalService=gt(Gn),this.authService=gt(Mn),this.merchantId=gt(Wn).merchantId(),this.localizationService=gt(un),this.iconName=ge,this.showDropdown=Te(!1),this.hasVideo=zt(!1),this.isLoggedIn=Ut(()=>this.authService.account())}handleClick(){this.isLoggedIn()?this.toggleDropdown():this.modalService.closeAllModals().subscribe(()=>
725{this.modalService.openModal(Ln.SignIn)})}toggleDropdown(){let n=!this.showDropdown();this.showDropdown.set(n),n?(document.documentElement.style.setProperty("--header-z-index","700"),setTimeout(()=>this.focusFirstDropdownItem())):document.documentElement.style.setProperty("--header-z-index","200"),this.modalService.closeAllModals()}onClick(n){this.showDropdown()&&this.dropdownContainer&&!this.dropdownContainer.nativeElement.contains(n.target)&&this.closeDropdown()}onFocusIn(n){this.showDropdown()&&this.dropdownContainer&&!this.dropdownContainer.nativeElement.contains(n.target)&&this.closeDropdown()}closeDropdown(n=!1){this.showDropdown()&&(this.showDropdown.set(!1),document.documentElement.style.setProperty("--header-z-index","200"),n&&setTimeout(()=>this.accountButton?.nativeElement.focus()))}logout(){this.authService.logout().subscribe(()=>{this.closeDropdown(),this.router.url.includes("account")?this.router.navigateByUrl("/"):this.router.navigateByUrl(this.router.url)})}focusFirstDropdownItem(){this.dropdownMenu?.nativeElement.querySelector('[role="menuitem"], button:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')?.focus()}static{this.\u0275fac=function(c){return new(c||h)(se(Ja))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-account-button"]],viewQuery:function(c,d){if(c&1&&($e(Ex,5),$e(zx,5),$e(Ax,5)),c&2){let a;Ge(a=Ze())&&(d.accountButton=a.first),Ge(a=Ze())&&(d.dropdownContainer=a.first),Ge(a=Ze())&&(d.dropdownMenu=a.first)}},hostBindings:function(c,d){c&1&&Ot("click",function(z){return d.onClick(z)},!1,dr)("focusin",function(z){return d.onFocusIn(z)},!1,dr)},inputs:{hasVideo:[1,"hasVideo"]},standalone:!0,features:[Kt],decls:10,vars:17,consts:[["dropdownContainer",""],["accountButton",""],["dropdownMenu",""],[1,"dropdown-container"],["id","account_dropdown_button","type","button",1,"button-undecorated","account-button",3,"click","ngClass"],[1,"label",3,"withVideo"],[1,"expandable-view-container",3,"ngClass"],[1,"user-icon-container",3,"ngClass"],[1,"user-icon",3,"name"],[1,"arrow-icon",3,"name"],["id","account_dropdown_menu","role","menu","tabindex","-1",1,"dropdown-menu",3,"bottom","ngClass"],[1,"label"],["id","account_dropdown_menu","role","menu","tabindex","-1",1,"dropdown-menu",3,"keydown.escape","ngClass"],["role","none",1,"name"],[1,"text-button-group"],["role","menuitem","type","button",1,"button-undecorated","text-button",3,"click","routerLink","routerLinkActive"],[1,"icon",3,"name"],[1,"divider-container"],[1,"divider"],["role","menuitem","type","button",1,"button-undecorated","text-button",3,"click"]],template:function(c,d){if(c&1){let a=Yt();I(0,"div",3,0)(2,"button",4,1),Ot("click",function(){return kt(a),Et(d.handleClick())}),ut(4,jx,2,3,"span",5),I(5,"div",6)(6,"div",7),it(7,"app-icon",8),E(),ut(8,Ux,1,1,"app-icon",9),E()(),ut(9,$x,19,24,"div",10),E()}c&2&&(w(2),j("ngClass",me(11,Lx,d.layoutService.headerBreakpoint()!=="mobileView"&&!d.authService.account())),qt("aria-label",d.authService.account()?"Open account menu":"Sign In")("aria-haspopup",d.authService.account()?"menu":null)("aria-controls",d.authService.account()?"account_dropdown_menu":null)("aria-expanded",d.authService.account()?d.showDropdown():null),w(2),rt(d.layoutService.headerBreakpoint()!=="mobileView"&&!d.authService.account()?4:-1),w(),j("ngClass",me(13,Dx,d.authService.account())),w(),j("ngClass",me(15,Fx,d.authService.account())),w(),j("name",d.iconName.user),w(),rt(d.authService.account()?8:-1),w(),rt(d.showDropdown()?9:-1))},dependencies:[ve,Ye,Ae,Lr,vu],styles:["[_nghost-%COMP%]{display:flex}.label[_ngcontent-%COMP%]{color:var(--primary-dark);font-weight:500;font-size:1rem;line-height:1.25rem;margin-left:.5rem;text-wrap:nowrap}.withVideo[_ngcontent-%COMP%]{color:var(--white)}.header-theme-dark[_nghost-%COMP%]   .label[_ngcontent-%COMP%], .header-theme-dark   [_nghost-%COMP%]   .label[_ngcontent-%COMP%]{color:#353535}.account-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:1rem;border-radius:1.625rem}.expandable-view-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:0;gap:.5rem;height:2.75rem;width:2.75rem;border-radius:1.625rem;background-color:var(--primary-container);color:var(--primary-dark)}.expandable-view-container.expanded[_ngcontent-%COMP%]{padding:.156rem .188rem;width:auto}.expandable-view-container[_ngcontent-%COMP%]:not(.expanded)   .arrow-icon[_ngcontent-%COMP%]{display:none}.user-icon-container[_ngcontent-%COMP%]{display:flex;width:2.5rem;height:2.5rem;justify-content:center;align-items:center;border-radius:100%;will-change:transform}@media (max-width: 900px){.user-icon-container[_ngcontent-%COMP%]{width:2.25rem;height:2.25rem}}.user-icon-container.logged-in[_ngcontent-%COMP%]{background-color:var(--white);color:var(--primary)}.user-icon[_ngcontent-%COMP%]{min-width:1.1rem;width:1.1rem;height:100%;display:flex}@media (max-width: 900px){.user-icon[_ngcontent-%COMP%]{width:.85rem}}.arrow-icon[_ngcontent-%COMP%]{min-width:1.17444rem;height:100%;display:flex;margin-right:.625rem}@media (max-width: 900px){.arrow-icon[_ngcontent-%COMP%]{width:1.063rem;margin-right:.56rem}}.dropdown-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative}.dropdown-menu[_ngcontent-%COMP%]{position:absolute;top:3.5rem;right:0;display:flex;flex-direction:column;align-items:flex-start;gap:.5rem;width:15.125rem;background-color:var(--white);border-radius:.5rem;border:.5px solid var(--line-color);visibility:visible;white-space:nowrap;padding:1rem .5rem}@media (max-width: 900px){.dropdown-menu[_ngcontent-%COMP%]{top:2.75rem}}.dropdown-menu.hidden[_ngcontent-%COMP%]{visibility:hidden}.dropdown-menu[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{margin-left:.5rem;color:var(--text);font-weight:500;line-height:1.25rem;text-transform:capitalize;max-width:20ch;white-space:normal;overflow:hidden;text-overflow:ellipsis;text-align:start}.dropdown-menu[_ngcontent-%COMP%]   .text-button-group[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.dropdown-menu[_ngcontent-%COMP%]   .text-button-group[_ngcontent-%COMP%]   .text-button[_ngcontent-%COMP%]{display:flex;border-radius:.25rem;gap:.5rem;align-items:center;padding:.5rem;width:100%;font-weight:var(--font-weight-regular);color:var(--text)}.dropdown-menu[_ngcontent-%COMP%]   .text-button-group[_ngcontent-%COMP%]   .text-button.active-page[_ngcontent-%COMP%]{color:var(--primary);font-weight:var(--font-weight-semi-bold)}.dropdown-menu[_ngcontent-%COMP%]   .text-button-group[_ngcontent-%COMP%]   .text-button[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{min-width:16px;color:var(--primary)}.dropdown-menu[_ngcontent-%COMP%]   .text-button-group[_ngcontent-%COMP%]   .text-button[_ngcontent-%COMP%]:hover{background:var(--page-background)}.dropdown-menu[_ngcontent-%COMP%]   .text-button-content[_ngcontent-%COMP%]{color:var(--text)}.dropdown-menu[_ngcontent-%COMP%]   .text-button-content.focused[_ngcontent-%COMP%]{font-weight:600;color:var(--primary)}.dropdown-menu[_ngcontent-%COMP%]   .divider-container[_ngcontent-%COMP%]{width:100%;padding:0 .5rem}.dropdown-menu[_ngcontent-%COMP%]   .divider-container[_ngcontent-%COMP%]   .divider[_ngcontent-%COMP%]{background:var(--line-color);width:100%;height:.0625rem}"]})}}return h})();var rm={moreLabel:{type:"string",data:"more"},extraLinks:{type:"array",objectInputType:[{key:"url",type:{type:"string",data:"https://example.com"}},{key:"label",type:{type:"string",data:"Example Link 2"}}],data:[]},buttonText:{type:"string",data:"Order Now"}};var Xf={buttonText:{type:"string",data:"Order Now"}};var Gx=(h,k)=>({"full-width":h,"hero-order-now":k});function Zx(h,k){h&1&&(ac(),I(0,"svg",3),it(1,"path",4),E())}function Hx(h,k){if(h&1){let n=Yt();I(0,"button",2),Ot("click",function(){kt(n);let d=A();return Et(d.openModal())}),X(1),ut(2,Zx,2,0,":svg:svg",3),E()}if(h&2){let n=A();j("ngClass",en(3,Gx,n.fullWidth(),n.heroButton())),w(),Rt(" ",n.buttonText()," "),w(),rt(n.heroButton()?2:-1)}}function qx(h,k){if(h&1){let n=Yt();I(0,"button",5),Ot("click",function(){kt(n);let d=A();return Et(d.openModal())}),X(1),I(2,"span"),X(3,"\u2192"),E()()}if(h&2){let n=A();ue("color",n.textColor()||"var(--text)"),w(),Rt("",n.buttonText()," ")}}var Ou=(()=>{class h{constructor(n){this.componentConfig=n,this.modalService=gt(Gn),this.textColor=zt(),this.configService=gt(Ee),this.authService=gt(Mn),this.gtmService=gt(ts),this.buttonText=zt("Order Now"),this.fullWidth=zt(!1),this.style=zt("button"),this.heroButton=zt(!1),this.singleStore=this.configService.singleStore}ngOnInit(){this.data=te(cn(te({},Xf),{buttonText:this.buttonText}),this.componentConfig?.data)}openModal(){this.gtmService.pushEvent("order_started",{cta_name:this.buttonText(),cta_location:this.heroButton()?"hero":"page_content"});let n=!!this.authService.account()?.favoriteStore?.id;
725this.modalService.openModal(!this.singleStore()&&!n?Ln.StoreSelector:Ln.StoresMap)}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-order-now"]],inputs:{textColor:[1,"textColor"],buttonText:[1,"buttonText"],fullWidth:[1,"fullWidth"],style:[1,"style"],heroButton:[1,"heroButton"]},standalone:!0,features:[Kt],decls:3,vars:1,consts:[[1,"button-accent","order-now",3,"ngClass"],[1,"transparent-button",3,"color"],[1,"button-accent","order-now",3,"click","ngClass"],["viewBox","0 0 24 24","aria-hidden","true",1,"arrow-icon"],["d","M5 12h14M13 5l7 7-7 7","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"transparent-button",3,"click"]],template:function(c,d){c&1&&($o(0),ut(1,Hx,3,6,"button",0)(2,qx,4,3,"button",1),Go()),c&2&&(w(),rt(d.style()==="button"?1:2))},dependencies:[ve,Ye],styles:[".fullWidth[_ngcontent-%COMP%]{width:100%}.transparent-button[_ngcontent-%COMP%]{appearance:none;background:transparent;border:0;cursor:pointer;font-weight:700;font-size:var(--font-size-med)}@media (min-width: 768px){.transparent-button[_ngcontent-%COMP%]{font-size:2rem}}.transparent-button[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-weight:900}.button-accent.order-now.hero-order-now[_ngcontent-%COMP%]{border-radius:999px;padding:1rem 1.5rem;min-width:12rem;background-color:var(--primary-inverse);color:var(--primary);font-weight:400;font-size:var(--font-size-xl);transition:transform .15s ease,box-shadow .15s ease,opacity .15s ease;display:inline-flex;align-items:center;justify-content:center;gap:0rem}.button-accent.order-now.hero-order-now[_ngcontent-%COMP%]   .arrow-icon[_ngcontent-%COMP%]{width:24px;height:24px;margin-left:8px;vertical-align:middle;flex-shrink:0}.button-accent.order-now.hero-order-now[_ngcontent-%COMP%]:hover{transform:translateY(-1px);box-shadow:0 .75rem 1.25rem #0000001f;opacity:.95}.button-accent.order-now.hero-order-now[_ngcontent-%COMP%]:active{transform:translateY(0);box-shadow:0 .25rem .5rem #00000014}@media (max-width: 768px){.button-accent.order-now.hero-order-now[_ngcontent-%COMP%]{font-size:var(--font-size-med);padding:.75rem 1rem;min-width:10rem}.button-accent.order-now.hero-order-now[_ngcontent-%COMP%]   .arrow-icon[_ngcontent-%COMP%]{width:20px;height:20px}}.button-accent.order-now[_ngcontent-%COMP%]{gap:0rem}"]})}}return h})();var Su=(()=>{class h{constructor(){this.httpClient=gt(Zi)}getOrders(n){let c=new xu().appendAll(n);return this.httpClient.get(`${qn.api}/orderTracker/query`,{params:c})}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275prov=zn({token:h,factory:h.\u0275fac,providedIn:"root"})}}return h})();var Kf=["utm_source","utm_campaign"],is=(()=>{class h{constructor(){this.platformId=gt(rn),An(this.platformId)&&this.captureFromUrl()}captureFromUrl(){let n=new URLSearchParams(window.location.search),c=[...n.keys()].filter(z=>z.startsWith("utm_"));if(c.length===0)return;for(let z of Kf){let J=n.get(z);J&&sessionStorage.setItem(z,J)}for(let z of c)n.delete(z);let d=n.toString(),a=window.location.pathname+(d?`?${d}`:"")+window.location.hash;window.history.replaceState(null,"",a)}appendUtmParams(n){if(An(this.platformId))for(let c of Kf){let d=sessionStorage.getItem(c);d&&n.searchParams.set(c,d)}}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275prov=zn({token:h,factory:h.\u0275fac,providedIn:"root"})}}return h})();var Wx=["header"],Xx=["menu"],Kx=["leftContainer"],Yx=["rightContainer"],Qx=["logo"],Jx=["routeMeasurements"],am=(h,k)=>k.path,tv=h=>({visible:h}),ev=()=>({exact:!0});function nv(h,k){if(h&1){let n=Yt();I(0,"a",35,6),Ot("click",function(){kt(n);let d=A(2);return Et(d.showMore(!1))}),I(2,"span",36),X(3),E()()}if(h&2){let n=k.$implicit,c=Yn(1),d=A(2);Ie("withVideoLinks",d.hasVideo())("active-video",d.hasVideo()&&c.isActive),j("ariaLabel",n.displayName)("routerLink",d.routeLink(n))("routerLinkActiveOptions",Ii(9,ev))("routerLinkActive","active-page"),w(3),St(n.displayName)}}function iv(h,k){if(h&1){let n=Yt();I(0,"button",37),Ot("click",function(){kt(n);let d=A(2);return Et(d.showMore())}),X(1),it(2,"app-icon",17),E()}if(h&2){let n=A(2);Ie("withVideoLinks",n.hasVideo()),qt("aria-expanded",n.showMoreRoutes()),w(),Rt(" ",n.data==null||n.data.moreLabel==null?null:n.data.moreLabel.data," "),w(),j("name",n.iconNameType.arrow)("@rotate",!n.showMoreRoutes())}}function ov(h,k){if(h&1&&(I(0,"div",13,5),le(2,nv,4,10,"a",33,am),ut(4,iv,3,6,"button",34),E()),h&2){let n=A();
725w(2),ce(n.headerLinks),w(2),rt(n.moreLinks.length||!(n.data==null||n.data.extraLinks==null||n.data.extraLinks.data==null)&&n.data.extraLinks.data.length&&n.layoutService.viewport()!=="mobile"?4:-1)}}function rv(h,k){if(h&1&&(I(0,"span",15),X(1),E()),h&2){let n=k.$implicit;w(),St(n.displayName)}}function av(h,k){if(h&1&&it(0,"app-order-now",20),h&2){let n=A();j("buttonText",n.data==null||n.data.buttonText==null?null:n.data.buttonText.data)}}function sv(h,k){if(h&1&&it(0,"app-icon",9),h&2){let n=A().$implicit,c=A();j("name",c.iconName(n.path))}}function lv(h,k){if(h&1){let n=Yt();I(0,"a",38),Ot("click",function(){kt(n);let d=A();return Et(d.showMore(!1))}),ut(1,sv,1,1,"app-icon",9),I(2,"span",36),X(3),E()()}if(h&2){let n=k.$implicit,c=A();j("ariaLabel",n.displayName)("routerLink",c.routeLink(n))("routerLinkActive","active-page"),w(),rt(c.iconName(n.path)?1:-1),w(2),St(n.displayName)}}function cv(h,k){if(h&1){let n=Yt();I(0,"a",39),Ot("click",function(){kt(n);let d=A();return Et(d.showMore(!1))}),it(1,"app-icon",9),I(2,"span",36),X(3),E()()}if(h&2){let n=k.$implicit,c=A();j("href",c.normalizeExternalUrl(n==null?null:n.url),Se)("ariaLabel",n.label),w(),j("name",c.iconNameType.link),w(2),St(n.label)}}function dv(h,k){if(h&1&&(I(0,"div",27)(1,"span",40),it(2,"app-icon",41),X(3),E()()),h&2){let n=A();w(2),j("name",n.iconNameType.error),w(),St(n.serverErrors.message)}}function pv(h,k){if(h&1&&(I(0,"span",30),it(1,"app-icon",41),X(2),E()),h&2){let n=A(2);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.phone.required," ")}}function uv(h,k){if(h&1&&(I(0,"span",30),it(1,"app-icon",41),X(2),E()),h&2){let n=A(2);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.phone.min_max," ")}}function hv(h,k){if(h&1&&ut(0,pv,3,2,"span",30)(1,uv,3,2,"span",30),h&2){let n=A();rt(n.phone.hasError("required")?0:-1),w(),rt(n.phone.hasError("minlength")||n.phone.hasError("maxlength")?1:-1)}}function mv(h,k){if(h&1&&(I(0,"span",30),it(1,"app-icon",41),X(2),E()),h&2){let n=A();w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.phone.noOrderFound," ")}}function gv(h,k){if(h&1&&(I(0,"span",30),it(1,"app-icon",41),X(2),E()),h&2){let n=A(2);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.orderNumber.required," ")}}function fv(h,k){if(h&1&&(I(0,"div",28),it(1,"app-input",42),ut(2,gv,3,2,"span",30),E()),h&2){let n=A();w(),j("placeholder","Order number")("type","number")("required",!0)("invalid",n.showValidationErrors&&n.orderNumber.invalid),w(),rt(n.showValidationErrors&&n.orderNumber.invalid?2:-1)}}function _v(h,k){if(h&1&&(I(0,"div",45)(1,"a",48),it(2,"img",49),E()()),h&2){let n=A(2);w(),Ya("href",n.androidAppLink,Se),qt("aria-label","Google Play (opens in a new tab)"),w(),j("ngSrc","../../../assets/components/mobile-app-ad/googleplay.svg")("alt","Google Play Store logo")}}function yv(h,k){if(h&1&&(I(0,"div",45)(1,"a",48),it(2,"img",50),E()()),h&2){let n=A(2);w(),Ya("href",n.iosAppLink,Se),qt("aria-label","App Store (opens in a new tab)"),w(),j("ngSrc","../../../assets/components/mobile-app-ad/appstore.svg")("alt","App Store logo")}}function xv(h,k){if(h&1&&(I(0,"div",32)(1,"div",43)(2,"span",44),X(3,"Download Our App"),E(),ut(4,_v,3,4,"div",45)(5,yv,3,4,"div",45),E(),I(6,"div",46),it(7,"img",47),E()()),h&2){let n=A();w(4),rt(n.androidAppLink?4:-1),w(),rt(n.iosAppLink?5:-1),w(2),j("ngSrc","../../../assets/components/header/mobile.avif")("alt","Smartphone image")}}var Yf=(()=>{class h{ngOnInit(){this.data=te(te(te({},rm),this.headerConfig()??{}),this.componentConfig?.data)}get phone(){return this.searchForm.controls.phone}get orderNumber(){return this.searchForm.controls.orderNumber}get androidAppLink(){return this.merchantConfig()?.brand?.androidAppId?this.GOOGLE_PLAY_LINK+this.merchantConfig()?.brand?.androidAppId:""}get iosAppLink(){return this.merchantConfig()?.brand?.iOSAppId?this.APPS_APPLE_LINK+this.merchantConfig()?.brand?.iOSAppId:""}get resolvedRoutes(){return(this.merchantConfig()?.theme.routes??[]).map(c=>this.resolveHeaderRoute(c))}get visibleRouteCount(){let n=this.resolvedRoutes.length;
725return this.layoutService.headerBreakpoint()==="desktopView"?Math.min(this.desktopViewHeaderLinkLimit,this.amountOfFittingMenuItems(),n):n}get headerLinks(){return this.resolvedRoutes.slice(0,this.visibleRouteCount)}get moreLinks(){return this.resolvedRoutes.slice(this.visibleRouteCount)}constructor(n,c){this.elementRef=n,this.componentConfig=c,this.brandConfigService=gt(Ee),this.appService=gt(vc),this.merchantConfig=gt(Wn).merchantConfig,this.layoutService=gt(pn),this.modalsService=gt(Gn),this.singleStore=this.brandConfigService.singleStore,this.platformId=gt(rn),this.errorsService=gt($r),this.orderTrackerService=gt(Su),this.localizationService=gt(un),this.utmService=gt(is),this.document=gt(Qa),this.destroyed=!1,this.storeData=this.brandConfigService.storeData,this.heroVisible=Te(!0),this.heroObserver=null,this.headerConfig=Ut(()=>this.merchantConfig()?.theme.headerConfig?.data),this.amountOfFittingMenuItems=Te(0),this.desktopViewHeaderLinkLimit=3,this.GOOGLE_PLAY_LINK="https://play.google.com/store/apps/details?id=",this.APPS_APPLE_LINK="https://apps.apple.com/app/id",this.maskPatternType=fc,this.searchForm=new Rr({phone:new Fi("",an.compose([an.required,an.minLength(10),an.maxLength(10)]))}),this.searchSubscription=null,this.validationMessages={phone:{required:"Phone Number is required",min_max:"Phone Number is invalid",noOrderFound:"No order has been found for the given information"},orderNumber:{required:"Order Number is required"}},this.showValidationErrors=!1,this.noOrdersFound=!1,this.askForOrderNumber=!1,this.requireOrderNumber=!1,this.iconNameType=ge,this.showMoreRoutes=Te(!1),this.isSideNavOpen=Ut(()=>this.modalsService.isModalOpen(Ln.MobileSideNav)),this.hasVideo=Ut(()=>this.heroVisible()&&!this.showMoreRoutes()&&this.layoutService.heroHasVideo()&&!this.isSideNavOpen()),ii(()=>{this.data=te(te(te({},rm),this.headerConfig()??{}),this.componentConfig?.data)}),ii(()=>{this.layoutService.heroHasVideo()?setTimeout(()=>this.setupHeroObserver(),0):this.disconnectHeroObserver()}),hu(()=>{this.menuResizeObserver||(this.menuResizeObserver=new ResizeObserver(()=>this.scheduleMenuMeasurement()),this.menuResizeObserver.observe(this.header.nativeElement),this.menuResizeObserver.observe(this.rightContainer.nativeElement),this.document.fonts.ready.then(()=>{this.destroyed||this.scheduleMenuMeasurement()})),this.scheduleMenuMeasurement()})}setupHeroObserver(){if(!An(this.platformId))return;this.disconnectHeroObserver();let n=this.document.getElementById("hero");if(!n){this.heroVisible.set(!1);return}this.heroVisible.set(!0),new IntersectionObserver(([d])=>{this.heroVisible.set(d.isIntersecting)},{root:null,threshold:.1}).observe(n)}disconnectHeroObserver(){this.heroObserver?.disconnect(),this.heroObserver=null}scheduleMenuMeasurement(){this.menuMeasureFrame===void 0&&(this.menuMeasureFrame=requestAnimationFrame(()=>{this.menuMeasureFrame=void 0,this.getMenuItemsLimits()}))}getMenuItemsLimits(){let n=this.routeMeasurements?.nativeElement;if(!n||!this.menu||this.layoutService.headerBreakpoint()!=="desktopView")return;let c=this.header.nativeElement,d=this.leftContainer.nativeElement,a=this.menu.nativeElement,z=getComputedStyle(c),J=getComputedStyle(a),yt=parseFloat(J.columnGap)||0,ie=c.clientWidth-parseFloat(z.paddingLeft)-parseFloat(z.paddingRight),bt=Math.min(parseFloat(getComputedStyle(d).maxWidth),ie-this.rightContainer.nativeElement.getBoundingClientRect().width)-this.logo.nativeElement.getBoundingClientRect().width-(parseFloat(getComputedStyle(d).columnGap)||0)-parseFloat(J.paddingRight)-parseFloat(J.paddingLeft),ne=Array.from(n.querySelectorAll(".route-measurement")),Ve=n.querySelector(".more-button").getBoundingClientRect().width,_n=Math.min(this.desktopViewHeaderLinkLimit,ne.length);for(;_n>0;_n--){let Dn=_n<ne.length||!!this.data?.extraLinks?.data?.length;if(ne.slice(0,_n).reduce((Fn,Pn)=>Fn+Pn.getBoundingClientRect().width,0)+(Dn?Ve:0)+yt*Math.max(0,_n+Number(Dn)-1)<=bt)break}this.amountOfFittingMenuItems.set(_n)}iconName(n){switch(n){case"about":return ge.about;case"careers":return ge.suitcase;case"contact":return ge.contact;case"giftcards":return ge.giftcards;case"locations":return ge.pin;case"rewards":return ge.rewardCup;case"menu":return ge.menu;default:return ge.globe}}showMore(n){this.showMoreRoutes.set(n!==void 0?n:!this.showMoreRoutes())}toggleSidebar(){this.modalsService.toggleModal(Ln.MobileSideNav,void 0,!0)}onDocumentClick(n){let c=n.target;this.elementRef.nativeElement.contains(c)||this.showMoreRoutes.set(!1)}
725handleOrderNow(){this.singleStore()?.baseUrl&&window.location.assign(this.singleStore().baseUrl)}routeLink(n){return n.path==="home"?["/"]:["/",n.path]}normalizeExternalUrl(n){if(!n)return;let c=n.trim();return/^[a-z][a-z0-9+.-]*:/i.test(c)||c.startsWith("//")||c.startsWith("/")?c:`https://${c}`}resolveHeaderRoute(n){return n}searchOrders(){if(this.showValidationErrors=!1,this.serverErrors=void 0,!this.searchForm.valid){this.showValidationErrors=!0;return}this.searchSubscription=this.orderTrackerService.getOrders({phone:this.parsePhone(this.phone.value),lat:this.singleStore().lat,lng:this.singleStore().lng}).subscribe({next:n=>{this.searchSubscription=null,this.noOrdersFound=!1,n.length?window.location.href=n[0].trackerLink:this.noOrdersFound=!0},error:n=>{n.status===409&&!this.requireOrderNumber&&(this.askForOrderNumber=!0,this.searchForm.addControl("orderNumber",new Fi("",an.compose([an.required])))),this.searchSubscription=null,this.serverErrors=this.errorsService.parseAllErrorsFromResponse(n)}})}parsePhone(n){let c=n.replace(/\D/g,"");return c.length===10?`${c.slice(0,3)}-${c.slice(3,6)}-${c.slice(6,10)}`:n}ngOnDestroy(){this.destroyed=!0,this.searchSubscription?.unsubscribe(),this.menuResizeObserver?.disconnect(),this.menuMeasureFrame!==void 0&&cancelAnimationFrame(this.menuMeasureFrame)}static{this.\u0275fac=function(c){return new(c||h)(se(kr),se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-header"]],viewQuery:function(c,d){if(c&1&&($e(Wx,5),$e(Xx,5),$e(Kx,5),$e(Yx,5),$e(Qx,5),$e(Jx,5)),c&2){let a;Ge(a=Ze())&&(d.header=a.first),Ge(a=Ze())&&(d.menu=a.first),Ge(a=Ze())&&(d.leftContainer=a.first),Ge(a=Ze())&&(d.rightContainer=a.first),Ge(a=Ze())&&(d.logo=a.first),Ge(a=Ze())&&(d.routeMeasurements=a.first)}},hostBindings:function(c,d){c&1&&Ot("click",function(z){return d.onDocumentClick(z)},!1,dr)},standalone:!0,features:[Kt],decls:41,vars:35,consts:[["header",""],["leftContainer",""],["logo",""],["routeMeasurements",""],["rightContainer",""],["menu",""],["rla","routerLinkActive"],[1,"header-container",3,"ngClass"],["type","button","aria-haspopup","dialog","aria-controls","mobile-nav-menu",1,"button-undecorated","hamburder-button",3,"click"],[3,"name"],[1,"left-container"],["routerLink","/",1,"logo-link"],["alt","Logo","fill","","priority","",1,"logo",3,"ngSrc"],[1,"routes"],["aria-hidden","true","inert","",1,"route-measurements"],[1,"header-button","route-measurement","active-page"],[1,"header-button","more-button"],[1,"more-icon",3,"name"],[1,"right-container"],[3,"hasVideo"],[3,"buttonText"],["aria-hidden","true",1,"more-routes-overlay",3,"click"],["id","more-routes-menu",1,"more-routes-container",3,"ngClass"],[1,"button-undecorated","route-button",3,"ariaLabel","routerLink","routerLinkActive"],["target","_blank",1,"button-undecorated","route-button",3,"href","ariaLabel"],[1,"track-order-label"],[1,"form-container",3,"formGroup"],[1,"generic-errors"],[1,"input-wrapper"],["formControlName","phone",3,"maskPattern","label","invalid","borderRadius","spacing","background"],[1,"input-error"],["appAsyncButton","",1,"button-accent","search-button",3,"click","subscription"],[1,"mobile-ads-container"],[1,"button-undecorated","header-button",3,"withVideoLinks","ariaLabel","routerLink","routerLinkActiveOptions","active-video","routerLinkActive"],["type","button","aria-controls","more-routes-menu",1,"button-undecorated","header-button","more-button",3,"withVideoLinks"],[1,"button-undecorated","header-button",3,"click","ariaLabel","routerLink","routerLinkActiveOptions","routerLinkActive"],[1,"label"],["type","button","aria-controls","more-routes-menu",1,"button-undecorated","header-button","more-button",3,"click"],[1,"button-undecorated","route-button",3,"click","ariaLabel","routerLink","routerLinkActive"],["target","_blank",1,"button-undecorated","route-button",3,"click","href","ariaLabel"],[1,"error"],[1,"icon",3,"name"],["formControlName","orderNumber",3,"placeholder","type","required","invalid"],[1,"links"],[1,"title"],[1,"social-links"],[1,"phone-img"],["loading","lazy","width","232","height","239",3,"ngSrc","alt"],[3,"href"],["width","136","height","40",3,"ngSrc","alt"],["width","135","height","40",3,"ngSrc","alt"]],template:function(c,d){if(c&1){let a=Yt();I(0,"div",7,0)(2,"button",8),Ot("click",function(){return kt(a),Et(d.toggleSidebar())}),it(3,"app-icon",9),E(),I(4,"div",10,1)(6,"a",11),it(7,"img",12,2),E(),ut(9,ov,5,1,"div",13),E(),I(10,"div",14,3),le(12,rv,2,1,"span",15,am),I(14,"span",16),X(15),it(16,"app-icon",17),E()(),I(17,"div",18,4),it(19,"app-account-button",19),ut(20,av,1,1,"app-order-now",20),E()(),I(21,"div",21),Ot("click",function(){return kt(a),Et(d.showMore(!1))}),E(),I(22,"div",22)(23,"div",10),le(24,lv,4,5,"a",23,am),le(26,cv,4,4,"a",24,Ce),E(),I(28,"div",18)(29,"span",25),X(30,"Track Your Order"),E(),I(31,"form",26),ut(32,dv,4,2,"div",27),I(33,"div",28),it(34,"app-mask-field-input",29),ut(35,hv,2,2)(36,mv,3,2,"span",30),I(37,"button",31),Ot("click",function(){return kt(a),Et(d.searchOrders())}),X(38),E()(),ut(39,fv,3,5,"div",28),E(),ut(40,xv,8,4,"div",32),E()()}if(c&2){let a,z;Ie("withVideo",d.hasVideo()),j("ngClass",d.hasVideo()&&d.layoutService.headerTheme()?"header-theme-"+d.layoutService.headerTheme():""),w(2),Ie("withVideoLinks",d.hasVideo()),qt("aria-label",d.isSideNavOpen()?"Close mobile navigation menu":"Open mobile navigation menu")("aria-expanded",d.isSideNavOpen()),w(),j("name",d.iconNameType.hamburger),w(4),j("ngSrc",((a=d.merchantConfig())==null||a.theme==null?null:a.theme.logo)||"../../../assets/images/default-theme-images/logo.png"),w(2),rt(!((z=d.merchantConfig())==null||z.theme==null||z.theme.routes==null)&&z.theme.routes.length?9:-1),w(3),ce(d.resolvedRoutes),w(3),Rt(" ",d.data==null||d.data.moreLabel==null?null:d.data.moreLabel.data," "),w(),j("name",d.iconNameType.arrow),w(3),j("hasVideo",d.hasVideo()),w(),rt(d.layoutService.viewport()!=="mobile"&&d.layoutService.viewport()!=="tablet"&&!d.hasVideo()?20:-1),w(),Ie("visible",d.showMoreRoutes()),w(),j("ngClass",me(33,tv,d.showMoreRoutes())),qt("aria-hidden",!d.showMoreRoutes())("inert",d.showMoreRoutes()?null:""),w(2),ce(d.moreLinks),w(2),ce(d.data==null||d.data.extraLinks==null?null:d.data.extraLinks.data),w(5),j("formGroup",d.searchForm),w(),rt(d.serverErrors&&d.serverErrors.message?32:-1),w(2),j("maskPattern",d.maskPatternType.phone)("label",d.layoutService.viewport()!=="mobile"?"Enter your Mobile Phone":"Mobile Phone")("invalid",d.showValidationErrors&&d.phone.invalid||d.noOrdersFound)("borderRadius","10rem")("spacing","1.5rem")("background","var(--grey-background)"),w(),rt(d.showValidationErrors&&d.phone.invalid?35:-1),w(),rt(d.noOrdersFound?36:-1),w(),j("subscription",d.searchSubscription),w(),Rt(" ",d.localizationService.getLocalizationString("header.more.track")," "),w(),rt(d.requireOrderNumber||d.askForOrderNumber?39:-1),w(),rt(d.androidAppLink||d.iosAppLink?40:-1)}},dependencies:[ve,Ye,mn,Lr,Ae,Wf,Ou,vu,_c,Ur,yc,Ho,Br,Hi,Fr,jr,Nr,Vr],styles:['.header-container[_ngcontent-%COMP%]{position:fixed;top:var(--main-header-sticky-top);left:0;right:0;height:var(--mobile-main-header-height);background-color:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 24px;z-index:500}@media (min-width: 768px){.header-container[_ngcontent-%COMP%]{padding:11px;height:var(--desktop-header-height)}}@media (min-width: 1200px){.header-container[_ngcontent-%COMP%]{padding:11px 52px;height:var(--desktop-header-height)}}.header-container[_ngcontent-%COMP%]   .hamburder-button[_ngcontent-%COMP%]{display:flex;color:var(--primary-dark)}@media (min-width: 1024px){.header-container[_ngcontent-%COMP%]   .hamburder-button[_ngcontent-%COMP%]{display:none}}.header-container[_ngcontent-%COMP%]   .left-container[_ngcontent-%COMP%]{max-width:675p
725x;min-width:0;display:flex;gap:40px;align-items:center}@media (width > 1300px){.header-container[_ngcontent-%COMP%]   .left-container[_ngcontent-%COMP%]{max-width:890px}}.header-container[_ngcontent-%COMP%]   .right-container[_ngcontent-%COMP%]{flex-shrink:0;display:flex;gap:32px;align-items:center}.header-container[_ngcontent-%COMP%]   .order-now[_ngcontent-%COMP%]{display:none}@media (min-width: 1024px){.header-container[_ngcontent-%COMP%]   .order-now[_ngcontent-%COMP%]{display:flex}}.header-container[_ngcontent-%COMP%]   .routes[_ngcontent-%COMP%]{display:none;gap:40px}@media (min-width: 1024px){.header-container[_ngcontent-%COMP%]   .routes[_ngcontent-%COMP%]{padding-right:40px;display:flex}}.header-container[_ngcontent-%COMP%]   .logo-link[_ngcontent-%COMP%]{flex-shrink:0;position:relative;display:block;width:160px;height:72px}@media (max-width: 425px){.header-container[_ngcontent-%COMP%]   .logo-link[_ngcontent-%COMP%]{height:62px}}.header-container[_ngcontent-%COMP%]   .logo[_ngcontent-%COMP%]{object-fit:contain}.header-container[_ngcontent-%COMP%]   .route-measurements[_ngcontent-%COMP%]{position:fixed;visibility:hidden;pointer-events:none;display:flex;width:max-content;max-width:100%;overflow:hidden;top:0;left:0;contain:layout}.header-container[_ngcontent-%COMP%]   .header-button[_ngcontent-%COMP%]{flex-shrink:0;position:relative;border-radius:.875rem;text-transform:uppercase;color:var(--text-unselected);text-wrap:nowrap;font-size:1rem;line-height:1.5rem;font-weight:var(--font-weight-regular)}.header-container[_ngcontent-%COMP%]   .header-button.active-page[_ngcontent-%COMP%]{color:var(--text);font-weight:var(--font-weight-medium);position:relative}.header-container[_ngcontent-%COMP%]   .header-button.active-page[_ngcontent-%COMP%]:after{position:absolute;content:"";width:100%;height:2px;bottom:-1px;left:0;border-radius:2px;background-color:var(--primary)}.header-container[_ngcontent-%COMP%]   .withVideoLinks[_ngcontent-%COMP%]{color:var(--white)}.header-container[_ngcontent-%COMP%]   .more-button[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.header-container[_ngcontent-%COMP%]   .more-button[_ngcontent-%COMP%]   .more-icon[_ngcontent-%COMP%]{min-width:14px;width:14px;height:14px}.withVideo[_ngcontent-%COMP%]{background:transparent}.more-routes-container[_ngcontent-%COMP%]{position:fixed;top:calc(var(--main-header-sticky-top) + var(--desktop-header-height));left:50%;transform:translate(-50%,-180%);display:flex;border-radius:0 0 24px 24px;transition:transform .5s ease-in-out;z-index:400;background-color:#fff}.more-routes-container.visible[_ngcontent-%COMP%]{transform:translate(-50%)}.more-routes-container[_ngcontent-%COMP%]   .left-container[_ngcontent-%COMP%]{padding:2.5rem 4.625rem 1.875rem 3rem;display:flex;flex-direction:column;gap:1.5rem;border-right:1px solid var(--line-color)}.more-routes-container[_ngcontent-%COMP%]   .left-container[_ngcontent-%COMP%]   .route-button[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;text-wrap:nowrap;color:var(--text-unselected);font-size:1rem;font-weight:400;text-transform:uppercase}.more-routes-container[_ngcontent-%COMP%]   .left-container[_ngcontent-%COMP%]   .route-button.active-page[_ngcontent-%COMP%]{color:var(--text);font-weight:var(--font-weight-medium);position:relative;line-height:1.5rem}.more-routes-container[_ngcontent-%COMP%]   .left-container[_ngcontent-%COMP%]   .route-button[_ngcontent-%COMP%]   .active-video[_ngcontent-%COMP%]{color:var(--white)}.more-routes-container[_ngcontent-%COMP%]   .left-container[_ngcontent-%COMP%]   .route-button[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{width:24px;justify-content:center;display:grid}.more-routes-container[_ngcontent-%COMP%]   .right-container[_ngcontent-%COMP%]{padding:26px 60px 0 7rem;min-width:36rem}.more-routes-container[_ngcontent-%COMP%]   .right-container[_ngcontent-%COMP%]   .track-order-label[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;margin-bottom:8px;display:block}.more-routes-container[_ngcontent-%COMP%]   .right-container[_ngcontent-%COMP%]   .track-order-input-container[_ngcontent-%COMP%]{display:flex}.more-routes-container[_ngcontent-%COMP%]   .right-container[_ngcontent-%COMP%]   .track-order-input-container[_ngcontent-%COMP%]   .input-field[_ngcontent-%COMP%]{border-radius:100px 0 0 100px;width:289px;padding-right:30px}.more-routes-container[_ngcontent-%COMP%]   .right-container[_ngcontent-%COMP%]   .track-order-input-container[_ngcontent-%COMP%]   .input-field[_ngcontent-%COMP%]:focus{border:none;background-color:var(--grey-background)}.more-routes-container[_ngcontent-%COMP%]   .right-container[_ngcontent-%COMP%]   .track-order-input-container[_ngcontent-%COMP%]   .input-field[_ngcontent-%COMP%]::placeholder{font-size:1rem;font-weight:400;line-height:1.25rem;color:var(--grey)}.more-routes-container[_ngcontent-%COMP%]   .right-container[_ngcontent-%COMP%]   .track-order-input-container[_ngcontent-%COMP%]   .track-button[_ngcontent-%COMP%]{margin-left:-30px}.more-routes-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;
725background:#020202;opacity:0;transition:opacity .3s ease-in-out;z-index:350;display:none}.more-routes-overlay.visible[_ngcontent-%COMP%]{display:block;opacity:.3;pointer-events:auto}.mobile-ads-container[_ngcontent-%COMP%]{display:grid;grid-auto-flow:column;grid-template-columns:auto 14.5rem;min-width:25.25rem;margin-top:3.75rem}.mobile-ads-container[_ngcontent-%COMP%]   .links[_ngcontent-%COMP%]{padding-top:4.875rem;padding-left:.75rem;row-gap:.5rem;display:flex;flex-flow:column}.mobile-ads-container[_ngcontent-%COMP%]   .links[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:40px;font-weight:var(--font-weight-bold);font-family:Caveat,sans-serif}.mobile-ads-container[_ngcontent-%COMP%]   .links[_ngcontent-%COMP%]   .social-links[_ngcontent-%COMP%]{width:7.5rem}.mobile-ads-container[_ngcontent-%COMP%]   .links[_ngcontent-%COMP%]   .social-links[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:flex}.mobile-ads-container[_ngcontent-%COMP%]   .links[_ngcontent-%COMP%]   .social-links[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:auto}.mobile-ads-container[_ngcontent-%COMP%]   .phone-img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{vertical-align:bottom}.form-container[_ngcontent-%COMP%]   .input-wrapper[_ngcontent-%COMP%]{position:relative}.form-container[_ngcontent-%COMP%]   .input-wrapper[_ngcontent-%COMP%]   .search-button[_ngcontent-%COMP%]{position:absolute;right:0;top:0;z-index:3;padding:1rem 2.5rem;font-size:var(--font-size-sm);font-weight:var(--font-weight-bold)}.form-container[_ngcontent-%COMP%]   .generic-errors[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:.75rem 1rem;background-color:var(--general-red-container);border-radius:.5rem;gap:9.875rem;margin-top:1rem;margin-bottom:1rem}@media (max-width: 767px){.form-container[_ngcontent-%COMP%]   .generic-errors[_ngcontent-%COMP%]{gap:.5rem}}.form-container[_ngcontent-%COMP%]   .generic-errors[_ngcontent-%COMP%]   .error[_ngcontent-%COMP%]{font-size:var(--font-size-md);line-height:1.5rem;display:flex;color:var(--general-red);align-items:center;gap:.5rem;font-weight:var(--font-weight-medium)}@media (max-width: 767px){.form-container[_ngcontent-%COMP%]   .generic-errors[_ngcontent-%COMP%]   .error[_ngcontent-%COMP%]{font-size:var(--font-size-med);line-height:1.5rem}}.form-container[_ngcontent-%COMP%]   .generic-errors[_ngcontent-%COMP%]   .error[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{height:1rem;min-width:1rem;display:flex;align-self:start;margin-top:3.5px}@media (max-width: 425px){.header-container[_ngcontent-%COMP%]{height:var(--mobile-header-height)}}@media (min-width: 426px) and (max-width: 767px){.header-container[_ngcontent-%COMP%]{height:var(--tablet-header-height)}}.header-container.withVideo.header-theme-light[_ngcontent-%COMP%]{color:var(--text)}.header-container.withVideo.header-theme-light[_ngcontent-%COMP%]   .hamburder-button[_ngcontent-%COMP%], .header-container.withVideo.header-theme-light[_ngcontent-%COMP%]   .header-button[_ngcontent-%COMP%], .header-container.withVideo.header-theme-light[_ngcontent-%COMP%]   .header-button.active-page[_ngcontent-%COMP%]{color:#fff}.header-container.withVideo.header-theme-light[_ngcontent-%COMP%]   .header-button.active-page[_ngcontent-%COMP%]:after{background-color:var(--primary)}.header-container.withVideo.header-theme-light[_ngcontent-%COMP%]   .more-button[_ngcontent-%COMP%]{color:#fff}.header-container.withVideo.header-theme-dark[_ngcontent-%COMP%], .header-container.withVideo.header-theme-dark[_ngcontent-%COMP%]   .hamburder-button[_ngcontent-%COMP%], .header-container.withVideo.header-theme-dark[_ngcontent-%COMP%]   .header-button[_ngcontent-%COMP%], .header-container.withVideo.header-theme-dark[_ngcontent-%COMP%]   .header-button.active-page[_ngcontent-%COMP%]{color:#353535}.header-container.withVideo.header-theme-dark[_ngcontent-%COMP%]   .header-button.active-page[_ngcontent-%COMP%]:after{background-color:var(--primary)}.header-container.withVideo.header-theme-dark[_ngcontent-%COMP%]   .more-button[_ngcontent-%COMP%]{color:#353535}'],data:{animation:[qf("-180deg")]}})}}return h})();var Qf={display:{type:"boolean",data:!1},text:{type:"text",data:"Add your announcement here"},url:{type:"string",data:""},color:{type:"string",data:"#FFF"},backgroundColor:{type:"string",data:"#D44316"}};function vv(h,k){if(h&1&&(I(0,"a",2),X(1),E()),h&2){let n=A(2);j("href",n.linkUrl,Se),qt("target",n.isExternalLink?"_blank":null)("rel",n.isExternalLink?"noopener noreferrer":null),w(),Rt(" ",n.data.text.data," ")}}function bv(h,k){if(h&1&&(I(0,"span",3),X(1),E()),h&2){let n=A(2);w(),St(n.data.text.data)}}function Cv(h,k){if(h&1){let n=Yt();I(0,"div",1),ut(1,vv,2,4,"a",2)(2,bv,2,1,"span",3),I(3,"button",4),Ot("click",function(){kt(n);let d=A();
725return Et(d.dismiss())}),X(4," \xD7 "),E()()}if(h&2){let n=A();ue("color",n.data.color.data||"var(--white)")("background-color",n.data.backgroundColor.data||"var(--primary)"),w(),rt(n.linkUrl?1:2)}}var Jf=(()=>{class h{get data(){return te(te({},Qf),this.config?.data??this.componentConfig?.data)}get linkUrl(){return this.normalizeUrl(this.data.url.data)}get shouldDisplay(){return this.data.display.data}get isExternalLink(){return/^https?:\/\//i.test(this.linkUrl)}constructor(n,c,d){this.document=n,this.platformId=c,this.componentConfig=d,this.height="40px",this.previousAnnouncementHeight="",this.previousHeaderOffset="",this.offsetsApplied=!1,this.isDismissed=Te(!1),this.dismissed=new Kn}ngOnInit(){if(!An(this.platformId)||!this.shouldDisplay)return;let n=this.document.documentElement.style;this.previousAnnouncementHeight=n.getPropertyValue("--header-announcement-height"),this.previousHeaderOffset=n.getPropertyValue("--main-header-sticky-top"),n.setProperty("--header-announcement-height",this.height),n.setProperty("--main-header-sticky-top",this.height),this.offsetsApplied=!0}ngOnDestroy(){this.restoreOffsets()}dismiss(){this.isDismissed.set(!0),this.restoreOffsets(),this.dismissed.emit()}normalizeUrl(n){let c=n?.trim();return c?/^[a-z][a-z0-9+.-]*:/i.test(c)||c.startsWith("//")||c.startsWith("/")?c:`https://${c}`:""}restoreProperty(n,c,d){if(d){n.setProperty(c,d);return}n.removeProperty(c)}restoreOffsets(){if(!An(this.platformId)||!this.offsetsApplied)return;let n=this.document.documentElement.style;this.restoreProperty(n,"--header-announcement-height",this.previousAnnouncementHeight),this.restoreProperty(n,"--main-header-sticky-top",this.previousHeaderOffset),this.offsetsApplied=!1}static{this.\u0275fac=function(c){return new(c||h)(se(Qa),se(rn),se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-header-announcement"]],inputs:{config:"config"},outputs:{dismissed:"dismissed"},standalone:!0,features:[Kt],decls:1,vars:1,consts:[["id","top-banner","role","region","aria-label","Site announcement",1,"header-announcement",3,"color","background-color"],["id","top-banner","role","region","aria-label","Site announcement",1,"header-announcement"],[1,"announcement-text","announcement-link",3,"href"],[1,"announcement-text"],["type","button","aria-label","Dismiss announcement",1,"dismiss-button",3,"click"]],template:function(c,d){c&1&&ut(0,Cv,5,5,"div",0),c&2&&rt(d.shouldDisplay&&!d.isDismissed()?0:-1)},styles:["[_nghost-%COMP%]{display:block}.header-announcement[_ngcontent-%COMP%]{position:fixed;inset:0 0 auto;z-index:501;box-sizing:border-box;height:var(--header-announcement-height);padding:0 54px 0 1rem;background:var(--primary);color:var(--white);display:grid;grid-template-columns:minmax(0,1fr) 2rem;align-items:center;gap:1rem}@media (max-width: 1023px){.header-announcement[_ngcontent-%COMP%]{padding-right:1rem}}.announcement-text[_ngcontent-%COMP%]{display:-webkit-box;flex:1;min-width:0;overflow:hidden;overflow-wrap:anywhere;text-align:center;white-space:normal;font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);line-height:1rem;-webkit-box-orient:vertical;-webkit-line-clamp:2}@media (max-width: 575px){.announcement-text[_ngcontent-%COMP%]{font-size:var(--font-size-xs)}}.announcement-link[_ngcontent-%COMP%]{color:inherit;text-decoration:underline;text-underline-offset:.15rem}.announcement-link[_ngcontent-%COMP%]:hover, .announcement-link[_ngcontent-%COMP%]:focus-visible{text-decoration-thickness:2px}.dismiss-button[_ngcontent-%COMP%]{width:2rem;height:2rem;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;font-size:1.75rem;line-height:2rem}.dismiss-button[_ngcontent-%COMP%]:hover, .dismiss-button[_ngcontent-%COMP%]:focus-visible{opacity:.75}"]})}}return h})();var io={layoutOption:{type:"string",data:"Option 1"},title:{type:"string",data:"Where Quality Meets Flavor"},description:{type:"string",data:"Experience the best of pizza with our commitment to fresh ingredients and exceptional taste. Each slice is crafted to perfection for a truly unforgettable dining experience."},buttonText:{type:"string",data:"Order Now",option:"Option 1 , Option 3"},buttonStyle:{type:"string",data:"Option 1",option:"Option 3"},textColor:{type:"string",data:"#ffffff",option:"Option 1 , Option 3"},backgroundImage:{type:"image",data:{url:"assets/images/default-theme-images/6957506c398cdb665f21e0c9cc384061d4f02175.webp",altText:"Restaurant background image"},option:"Option 1"},backgroundVideo:{type:"video",data:{url:"/assets/merchants/timeout/hero/pizza-video.mp4"},option:"Option 3"},foregroundImage:{type:"image",data:{url:"assets/images/default-theme-images/33c8b5c103c9705ea2dcf0d2c9aa249b8fad9601.webp",altText:"Side image of the restaurant"},option:"Option 1"},optionTwoImage:{type:"string",data:"Pizza 1",option:"Option 2"},sideTextLeft:{type:"string",data:"great pizza made with love",option:"Option 2"},sideTextRight:{type:"string",data:"exceptional taste!",option:"Option 2"},headerTheme:{type:"string",data:"light",option:"Option 3"}};var sm=[{label:"Pizza 1",url:"assets/images/heroOptionTwoList/pizza-1.avif",altText:"A whole pizza topped with black olives, tomatoes, basil, and mushrooms"},{label:"Pasta 1",url:"assets/images/heroOptionTwoList/pasta-1.avif",altText:"A gourmet pasta dish with cream sauce served on a white plate against a dark background"},{label:"Pizza 2",url:"assets/images/heroOptionTwoList/pizza-2.avif",altText:"Pizza cut into slices and arranged in a circular pattern, viewed from above"},{label:"Burger 1",url:"assets/images/heroOptionTwoList/burger-1.avif",altText:"A fresh burger with a sesame seed bun, lettuce, and tomato"},{label:"Pasta 2",url:"assets/images/heroOptionTwoList/pasta-2.avif",altText:"A plate of pasta with tomato sauce and fresh basil"},{label:"Pizza 3",url:"assets/images/heroOptionTwoList/pizza-3.avif",altText:"A pepperoni pizza with melted cheese and red sauce, viewed from above"},{label:"Pizza 4",url:"assets/images/heroOptionTwoList/pizza-4.avif",altText:"A pepperoni pizza in a pan with melted cheese and tomato sauce"}],t_=sm[0];function wv(h,k){if(h&1){let n=Yt();I(0,"div",3)(1,"div",4)(2,"video",5),Ot("loadeddata",function(){kt(n);let d=A();return Et(d.videoReady.set(!0))})("canplay",function(){kt(n);let d=A();return Et(d.videoReady.set(!0))})("error",function(){kt(n);let d=A();return Et(d.videoFailed.set(!0))}),E(),it(3,"div",6),E(),I(4,"div",7)(5,"h2",8),X(6),E(),I(7,"p",9),X(8),E(),it(9,"app-order-now",10),E()()}if(h&2){let n=A();Ie("is-hidden",n.videoReady()&&!n.videoFailed()),w(2),j("src",n.data==null||n.data.backgroundVideo==null||n.data.backgroundVideo.data==null?null:n.data.backgroundVideo.data.url,Se)("muted",!0),w(3),ue("color",(n.data==null||n.data.textColor==null?null:n.data.textColor.data)||"var(--text)"),w(),St(n.data==null||n.data.title==null?null:n.data.title.data),w(),ue("color",(n.data==null||n.data.textColor==null?null:n.data.textColor.data)||"var(--text)"),w(),St(n.data==null||n.data.description==null?null:n.data.description.data),w(),X
725a((n.data==null||n.data.buttonStyle==null?null:n.data.buttonStyle.data)==="Option 1"?"link":"button"),j("buttonText",(n.data==null||n.data.buttonText==null?null:n.data.buttonText.data)||"")("textColor",n.data==null||n.data.textColor==null?null:n.data.textColor.data)("heroButton",!0)}}function Mv(h,k){if(h&1){let n=Yt();I(0,"section",1)(1,"div",11)(2,"h2",8),X(3),E(),I(4,"div",12)(5,"div",13),Ot("animationend",function(){kt(n);let d=A();return Et(d.onOption2ImageAnimationEnd())}),I(6,"img",14),Ot("load",function(){kt(n);let d=A();return Et(d.onOption2ImageLoad())}),E(),I(7,"p",15),X(8),E(),I(9,"p",16),X(10),E()()(),I(11,"p",17),X(12),E()()()}if(h&2){let n=A();w(3),St(n.data==null||n.data.title==null?null:n.data.title.data),w(2),Ie("hero__image-wrap--enter",n.option2ImageEnterStarted()),w(),j("ngSrc",n.optionTwoImageUrl),qt("alt",n.optionTwoImageAltText),w(),Ie("hero__overlay--visible",n.option2ImageEnterDone()),w(),Rt(" ",n.data==null||n.data.sideTextLeft==null?null:n.data.sideTextLeft.data," "),w(),Ie("hero__overlay--visible",n.option2ImageEnterDone()),w(),St(n.data==null||n.data.sideTextRight==null?null:n.data.sideTextRight.data),w(2),Rt(" ",n.data==null||n.data.description==null?null:n.data.description.data," ")}}function Pv(h,k){if(h&1&&(I(0,"div",20),it(1,"img",21),E()),h&2){let n=A(2);w(),j("ngSrc",(n.data==null||n.data.foregroundImage==null||n.data.foregroundImage.data==null?null:n.data.foregroundImage.data.url)||"assets/images/default-theme-images/33c8b5c103c9705ea2dcf0d2c9aa249b8fad9601.webp"),qt("alt",(n.data==null||n.data.foregroundImage==null||n.data.foregroundImage.data==null?null:n.data.foregroundImage.data.altText)||"")}}function Ov(h,k){if(h&1&&(I(0,"div",2),it(1,"img",18),I(2,"div",7)(3,"h2",8),X(4),E(),I(5,"p",9),X(6),E(),it(7,"app-order-now",19),E(),ut(8,Pv,2,2,"div",20),E()),h&2){let n=A();w(),j("ngSrc",(n.data==null||n.data.backgroundImage==null||n.data.backgroundImage.data==null?null:n.data.backgroundImage.data.url)||"assets/images/default-theme-images/6957506c398cdb665f21e0c9cc384061d4f02175.webp"),qt("alt",(n.data==null||n.data.backgroundImage==null||n.data.backgroundImage.data==null?null:n.data.backgroundImage.data.altText)||""),w(2),ue("color",(n.data==null||n.data.textColor==null?null:n.data.textColor.data)||"var(--text)"),w(),St(n.data==null||n.data.title==null?null:n.data.title.data),w(),ue("color",(n.data==null||n.data.textColor==null?null:n.data.textColor.data)||"var(--text)"),w(),St(n.data==null||n.data.description==null?null:n.data.description.data),w(),j("buttonText",(n.data==null||n.data.buttonText==null?null:n.data.buttonText.data)||""),w(),rt(!(n.data==null||n.data.foregroundImage==null||n.data.foregroundImage.data==null)&&n.data.foregroundImage.data.url?8:-1)}}var e_=(()=>{class h{constructor(n){this.componentConfig=n,this.videoReady=Te(!1),this.videoFailed=Te(!1),this.layoutService=gt(pn),this.option2ImageEnterStarted=Te(!1),this.option2ImageEnterDone=Te(!1)}ngOnInit(){let n=this.componentConfig?.data??{};this.data={title:n.title??io.title,description:n.description??io.description,buttonText:n.buttonText??io.buttonText,buttonStyle:n.layoutOption?.data==="Option 3"?n.buttonStyle??io.buttonStyle:io.buttonStyle,textColor:n.textColor??io.textColor,backgroundImage:n.backgroundImage??io.backgroundImage,foregroundImage:n.foregroundImage??n.foreGroundImage??n.sideImage??io.foregroundImage,backgroundVideo:n.backgroundVideo??io.backgroundVideo,layoutOption:n.layoutOption??io.layoutOption,optionTwoImage:n.optionTwoImage??io.optionTwoImage,sideTextLeft:n.sideTextLeft??io.sideTextLeft,sideTextRight:n.sideTextRight??io.sideTextRight,headerTheme:n.headerTheme??io.headerTheme};let c=this.data.layoutOption?.data==="Option 3"&&!!this.data.backgroundVideo?.data?.url;this.layoutService.heroHasVideo.set(c),this.layoutService.heroLayoutOption.set(this.data.layoutOption?.data??null);let d=c?this.data.headerTheme?.data:null;this.layoutService.headerTheme.set(d==="light"||d==="dark"?d:null),this.option2ImageEnterStarted.set(!1),this.option2ImageEnterDone.set(!1),typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches&&this.option2ImageEnterDone.set(!0)}get optionTwoImageUrl(){return this.getOptionTwoImage().url}get optionTwoImageAltText(){return this.getOptionTwoImage().altText}getOptionTwoImage(){let n=this.data?.optionTwoImage?.data;return sm.find(({label:c,url:d})=>n===c||n===d)??t_}onOption2ImageLoad(){if(typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){this.option2ImageEnterDone.set(!0);return}this.option2ImageEnterStarted.set(!1),requestAnimationFrame(()=>this.option2ImageEnterStarted.set(!0))}onOption2ImageAnimationEnd(){this.option2ImageEnterDone.set(!0)}ngOnDestroy(){this.layoutService.heroHasVideo.set(!1),this.layoutService.headerTheme.set(null)}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-hero"]],standalone:!0,features:[Kt],decls:3,vars:1,consts:[["id","hero",1,"hero","hero_with_vid",3,"is-hidden"],[1,"hero__option-2"],[1,"hero"],["id","hero",1,"hero","hero_with_vid"],[1,"hero__media"],["autoplay","","loop","","playsinline","",1,"hero__video",3,"loadeddata","canplay","error","src","muted"],[1,"hero__fallback"],[1,"hero__content"],[1,"hero__title"],[1,"hero__description"],[3,"buttonText","textColor","heroButton"],[1,"hero__inner"],[1,"hero__content-2"],[1,"hero__image-wrap",3,"animationend"],["priority","","width","746","height","455",1,"hero__image",3,"load","ngSrc"],[1,"hero__tagline","hero__overlay","hero__overlay--left"],[1,"hero__note","hero__overlay","hero__overlay--right"],[1,"hero__desc"],["aria-hidden","true","fill","","priority","","sizes","100vw",1,"hero__background-image",3,"ngSrc"],[3,"buttonText"],[1,"hero__side-image"],["fill","","sizes","(min-width: 768px) 50vw, 100vw","priority","",1,"hero__side-image-element",3,"ngSrc"]
725],template:function(c,d){c&1&&ut(0,wv,10,15,"div",0)(1,Mv,13,12,"section",1)(2,Ov,9,10,"div",2),c&2&&rt((d.data==null||d.data.layoutOption==null?null:d.data.layoutOption.data)==="Option 3"&&(!(d.data==null||d.data.backgroundVideo==null||d.data.backgroundVideo.data==null)&&d.data.backgroundVideo.data.url)?0:(d.data==null||d.data.layoutOption==null?null:d.data.layoutOption.data)==="Option 2"?1:2)},dependencies:[Ou,mn],styles:['.hero[_ngcontent-%COMP%]{width:100%;min-height:600px;background-size:cover;background-position:center;background-repeat:no-repeat;display:flex;align-items:center;position:relative;padding:3em 1em;gap:48px;justify-content:space-between;flex-direction:column;background-color:#00000001}.hero__background-image[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;z-index:0}@media (max-width: 768px){.hero__background-image[_ngcontent-%COMP%]{object-position:left}}@media (min-width: 768px){.hero[_ngcontent-%COMP%]{flex-direction:row;padding:5em 3em}}.hero[_ngcontent-%COMP%]   .hero__media[_ngcontent-%COMP%]{position:absolute;inset:0}.hero[_ngcontent-%COMP%]   .hero__media[_ngcontent-%COMP%]   .hero__fallback[_ngcontent-%COMP%]{height:calc(100% + 90px);position:absolute;inset:0;background:#000;opacity:1;transform:translateY(-90px)}.hero[_ngcontent-%COMP%]   .hero__media[_ngcontent-%COMP%]   .hero__fallback[_ngcontent-%COMP%]   .hero__fallback.is-hidden[_ngcontent-%COMP%]{opacity:0;pointer-events:none}.hero[_ngcontent-%COMP%]   .hero__video[_ngcontent-%COMP%]{height:calc(100% + 90px);width:100%;position:absolute;inset:1;z-index:1;object-fit:cover;object-position:center;transform:translateY(-90px)}.hero[_ngcontent-%COMP%]:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.hero__content[_ngcontent-%COMP%]{color:var(--text);position:relative;z-index:2;width:100%;max-width:650px}.hero__title[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;margin-bottom:30px;line-height:40px}@media (min-width: 768px){.hero__title[_ngcontent-%COMP%]{font-size:2.5rem;line-height:52px}}.hero__description[_ngcontent-%COMP%]{font-size:.95rem;margin-bottom:30px;line-height:24px;font-weight:600}@media (min-width: 768px){.hero__description[_ngcontent-%COMP%]{font-size:1rem;line-height:32px}}.hero__side-image[_ngcontent-%COMP%]{position:relative;z-index:2;width:96%;margin-left:5%;aspect-ratio:4/2;margin-bottom:3%}@media (min-width: 768px){.hero__side-image[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:60%;height:100%;margin-left:0}}@media (min-width: 1024px){.hero__side-image[_ngcontent-%COMP%]{width:50%}}.hero__side-image[_ngcontent-%COMP%]:before{content:"";position:absolute;top:-5%;left:-5%;width:100%;height:100%;border:2px solid #9d9c93;z-index:1;border-radius:var(--main-radius)}.hero__side-image-element[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;object-position:center;border-radius:var(--main-radius)}.hero_with_vid[_ngcontent-%COMP%]{justify-content:center;height:calc(100vh - 90px);background-color:#0000000d}@media (max-width: 767px){.hero_with_vid[_ngcontent-%COMP%]{height:auto;min-height:360px;padding:2em 1em}}.hero_with_vid[_ngcontent-%COMP%]   .hero__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;max-width:800px}.hero_with_vid[_ngcontent-%COMP%]   .hero__content[_ngcontent-%COMP%]   .hero__title[_ngcontent-%COMP%]{font-size:2rem;line-height:.9;text-align:right;text-shadow:0 4px 4px rgba(0,0,0,.25)}@media (min-width: 768px){.hero_with_vid[_ngcontent-%COMP%]   .hero__content[_ngcontent-%COMP%]   .hero__title[_ngcontent-%COMP%]{font-size:80px}}.hero_with_vid[_ngcontent-%COMP%]   .hero__content[_ngcontent-%COMP%]   .hero__description[_ngcontent-%COMP%]{font-size:var(--font-size-med);text-align:right}@media (min-width: 768px){.hero_with_vid[_ngcontent-%COMP%]   .hero__content[_ngcontent-%COMP%]   .hero__description[_ngcontent-%COMP%]{font-size:var(--font-size-lg)}}@keyframes _ngcontent-%COMP%_hero-image-enter{0%{opacity:0;transform:translate(-120vw,-120vh) rotate(-1turn) scale(.9)}to{opacity:1;transform:translate(0) rotate(0) scale(1)}}.hero__option-2[_ngcontent-%COMP%]{background:#fff;padding:54px 16px}.hero__option-2[_ngcontent-%COMP%]   .hero__inner[_ngcontent-%COMP%]{margin:0 auto;text-align:center}.hero__option-2[_ngcontent-%COMP%]   .hero__title[_ngcontent-%COMP%]{margin:0 0 22px;color:var(--primary-dark, #C2390F);font-size:64px;font-style:normal;font-weight:700;line-height:52px;letter-spacing:-3.2px}.hero__option-2[_ngcontent-%COMP%]   .hero__content-2[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;align-items:center;margin:-38px auto 16px;position:relative;z-index:2}.hero__option-2[_ngcontent-%COMP%]   .hero__tagline[_ngcontent-%COMP%]{margin:0;color:#d36a57;font-weight:700;line-height:1.15;font-size:clamp(18px,2vw,22px);text-transform:lowercase}.hero__option-2[_ngcontent-%COMP%]   .hero__note[_ngcontent-%COMP%]{margin:0;color:#c63b1e;font-weight:700;font-style:italic;font-size:clamp(13px,1.6vw,15px);white-space:nowrap}.hero__option-2[_ngcontent-%COMP%]   .hero__image-wrap[_ngcontent-%COMP%]{position:relative;width:min(95vw,720px);margin:0 auto;opacity:0;transform:translate(-120vw,-120vh) rotate(-1turn) scale(.9);will-change:transform,opacity}.hero__option-2[_ngcontent-%COMP%]   .hero__image-wrap--enter[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_hero-image-enter 3s cubic-bezier(.16,1,.3,1) forwards}.hero__option-2[_ngcontent-%COMP%]   .hero__image[_ngcontent-%COMP%]{width:100%;height:auto;max-height:min(70vh,620px);
725display:block;object-fit:contain;object-position:center}.hero__option-2[_ngcontent-%COMP%]   .hero__overlay[_ngcontent-%COMP%]{position:absolute;z-index:2;max-width:45%;padding:6px 10px;opacity:0;transform:translateY(6px);transition:opacity .25s ease,transform .25s ease}.hero__option-2[_ngcontent-%COMP%]   .hero__overlay--visible[_ngcontent-%COMP%]{opacity:1;transform:translateY(0)}.hero__option-2[_ngcontent-%COMP%]   .hero__overlay--left[_ngcontent-%COMP%]{left:clamp(-60px,2vw,-70px);bottom:clamp(7px,2vw,-3px);text-align:left;width:300px;transform:none;color:#e99f88;font-size:32px}.hero__option-2[_ngcontent-%COMP%]   .hero__overlay--right[_ngcontent-%COMP%]{right:-120px;top:42%;transform:translateY(-50%);text-align:right;font-family:Caveat;font-size:var(--font-size-3xl)}@media (min-width: 901px) and (max-width: 1023px){.hero__option-2[_ngcontent-%COMP%]   .hero__overlay--right[_ngcontent-%COMP%]{right:-40px}}.hero__option-2[_ngcontent-%COMP%]   .hero__desc[_ngcontent-%COMP%]{max-width:884px;margin:2rem auto 0;color:#777;line-height:1.6;color:var(--Text-Unselected, #737373);text-align:center;font-family:Poppins;font-size:16px;font-style:normal;font-weight:600}@media (max-width: 900px){.hero__option-2[_ngcontent-%COMP%]   .hero__desc[_ngcontent-%COMP%]{margin:6rem auto 0}.hero__option-2[_ngcontent-%COMP%]   .hero__overlay[_ngcontent-%COMP%]{max-width:80%}.hero__option-2[_ngcontent-%COMP%]   .hero__content-2[_ngcontent-%COMP%]{margin:30px auto 16px}.hero__option-2[_ngcontent-%COMP%]   .hero__overlay--right[_ngcontent-%COMP%]{left:75%;right:auto;transform:translate(-50%,-50%);text-align:center;top:clamp(-20px,0vw,-40px)}.hero__option-2[_ngcontent-%COMP%]   .hero__overlay--left[_ngcontent-%COMP%]{left:clamp(60px,20vw,153px);top:100%;right:auto;transform:translate(-50%,-50%);text-align:center}}@media (max-width: 767px){.hero__option-2[_ngcontent-%COMP%]   .hero__title[_ngcontent-%COMP%]{font-size:var(--font-size-3xl);line-height:auto}.hero__option-2[_ngcontent-%COMP%]   .hero__desc[_ngcontent-%COMP%]{margin:3rem auto 0}.hero__option-2[_ngcontent-%COMP%]   .hero__overlay--right[_ngcontent-%COMP%]{font-size:24px}.hero__option-2[_ngcontent-%COMP%]   .hero__overlay--left[_ngcontent-%COMP%]{font-size:var(--font-size-med);width:150px;text-align:left}}']})}}return h})();var n_={textColor:{type:"string",data:"#353535"},iconColor:{type:"string",data:"#D44316"},iconBackgroundColor:{type:"string",data:"#FFE6DE"},backgroundColor:{type:"string",data:"#ffffff"}};function Sv(h,k){if(h&1&&(I(0,"div",2),it(1,"app-icon",6),I(2,"span",7),X(3,"Favorite Store"),E(),I(4,"span",8)(5,"span",9),X(6),E(),I(7,"span",10),X(8),E()()()),h&2){let n=A(2);w(),j("name",n.iconName.location)("size","18px"),w(5),St(n.favoriteStoreAddress().streetAddress),w(2),St(n.favoriteStoreAddress().cityStateZip)}}function Tv(h,k){if(h&1&&(I(0,"p",11),X(1),E()),h&2){let n=A(2);ue("color",(n.data==null||n.data.textColor==null?null:n.data.textColor.data)||"var(--text)"),w(),Rt(" ",n.localizationService.getLocalizationString("shared_components.hero_banner_services.preview_estimated_times")," ")}}function Iv(h,k){if(h&1&&(I(0,"div",5)(1,"div",12),it(2,"app-icon",13),E(),I(3,"div",14)(4,"h3",15),X(5),E(),it(6,"p",16),E()()),h&2){let n=k.$implicit,c=A(2);w(),ue("background-color",(c.data==null||c.data.iconBackgroundColor==null?null:c.data.iconBackgroundColor.data)||"var(--primary-container)"),w(),j("name",n.icon)("size","22px")("color",(c.data==null||c.data.iconColor==null?null:c.data.iconColor.data)||"var(--primary-dark)"),w(2),ue("color",(c.data==null||c.data.textColor==null?null:c.data.textColor.data)||"var(--text)"),w(),St(n.title),w(),ue("color",(c.data==null||c.data.textColor==null?null:c.data.textColor.data)||"var(--text)"),j("innerHTML",n.description,Ti)}}function kv(h,k){if(h&1&&(I(0,"div",1),ut(1,Sv,9,4,"div",2)(2,Tv,2,3,"p",3),I(3,"div",4),le(4,Iv,7,11,"div",5,Ce),E()()),h&2){let n=A();ue("background-color",(n.data==null||n.data.backgroundColor==null?null:n.data.backgroundColor.data)||"var(--white)"),Ie("services-banner--layout-option-2",n.heroLayoutOption()==="Option 2")("services-banner--layout-option-3",n.heroLayoutOption()==="Option 3"),w(),rt(n.favoriteStoreAddress()?1:-1),w(),rt(n.showEditorPreviewData()?2:-1),w(2),ce(n.data==null?null:n.data.services)}}var i_=(()=>{class h{constructor(n){this.componentConfig=n,this.iconName=ge,this.brandConfigService=gt(Ee),this.storeStatus=this.brandConfigService.storeStatus,this.storeData=this.brandConfigService.storeData,this.singleStore=this.brandConfigService.singleStore,this.localizationService=gt(un),this.layoutService=gt(pn),this.heroLayoutOption=this.layoutService.heroLayoutOption,this.authService=gt(Mn),this.account=this.authService.account,this.iframeC
725ommunicator=gt(xc),this.shouldDisplay=!1,this.showEditorPreviewData=Ut(()=>qn.merchantId==="edit-mode"&&this.iframeCommunicator.isInIframe()&&(this.brandConfigService.brandConfig()?.stores?.length??0)>1&&!this.authService.state().isLoggedIn),this.editorPreviewServices=[{title:"Delivery",description:"Average Time 45 Minutes",icon:ge.truck},{title:"Pickup",description:"Average Time 20 Minutes",icon:ge.pickup},{title:"Curbside",description:"Average Time 15 Minutes",icon:ge.curbside}],this.storeOrderTypes=Ut(()=>{let c=this.singleStore();return c?c.orderTypes??[]:this.account()?.favoriteStore?.id?this.storeData()?.orderTypes??[]:[]}),this.favoriteStoreAddress=Ut(()=>{if(this.singleStore()||!this.account()?.favoriteStore?.id)return null;let d=this.storeData();return d?{streetAddress:d.address,cityStateZip:`${d.city}, ${d.state} ${d.zip}`}:null}),ii(()=>{let c=this.storeStatus();this.baseData&&this.applyStoreStatus(c)})}ngOnInit(){let n=te(te({},n_),this.componentConfig?.data);this.baseData=n,this.data=n,this.applyStoreStatus(this.storeStatus())}applyStoreStatus(n){if(!this.baseData)return;let c=this.storeOrderTypes(),d=n?.promiseTimes??[];if(!c.length){this.data=cn(te({},this.baseData),{services:this.showEditorPreviewData()?this.editorPreviewServices:[]}),this.shouldDisplay=this.showEditorPreviewData();return}let a=c.flatMap(z=>{let J=this.getMinutesForOrderType(z,d);return J?[{title:z.displayName||z.type,description:`Average Time ${J} Minutes`,icon:this.getIconByOrderType(z.type)}]:[]});if(a.length<=1){this.shouldDisplay=!1;return}this.data=cn(te({},this.baseData),{services:a}),this.shouldDisplay=!0}getMinutesForOrderType(n,c){let d=[n.type,n.displayName].filter(Boolean).map(z=>this.normalize(z));return c.find(z=>d.includes(this.normalize(z.orderType)))?.minutes??null}getIconByOrderType(n){let c=this.normalize(n);return c==="delivery"?ge.truck:c==="pickup"||c==="takeout"||c==="carryout"?ge.pickup:c==="curbside"?ge.curbside:c==="dinein"||c==="divein"?ge.bell:ge.pickup}normalize(n){return(n??"").trim().toLowerCase().replace(/[\s-]+/g,"")}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-hero-banner-services"]],standalone:!0,features:[Kt],decls:1,vars:1,consts:[[1,"services-banner",3,"services-banner--layout-option-2","services-banner--layout-option-3","backgroundColor"],[1,"services-banner"],[1,"favorite-store-bar"],[1,"services-banner__preview-note",3,"color"],[1,"services-banner__container"],[1,"services-banner__item"],[3,"name","size"],[1,"favorite-store-bar__label"],[1,"favorite-store-bar__address"],[1,"favorite-store-bar__street"],[1,"favorite-store-bar__city-state-zip"],[1,"services-banner__preview-note"],[1,"services-banner__icon-container"],[3,"name","size","color"],[1,"services-banner__content"],[1,"services-banner__item-title"],[1,"services-banner__item-description",3,"innerHTML"]],template:function(c,d){c&1&&ut(0,kv,6,8,"div",0),c&2&&rt(d.shouldDisplay?0:-1)},dependencies:[ve,Ae],styles:["[_nghost-%COMP%]{background-color:var(--white);display:block;--services-banner-overlap: clamp(3rem, 5vw, 5.5rem)}.favorite-store-bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem;font-size:1rem;color:var(--text);justify-content:center}.favorite-store-bar__label[_ngcontent-%COMP%]{font-weight:400;white-space:nowrap;font-size:14px}.favorite-store-bar__address[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.favorite-store-bar__street[_ngcontent-%COMP%]{color:var(--primary);font-weight:700}.favorite-store-bar__city-state-zip[_ngcontent-%COMP%]{font-weight:400}@media (max-width: 767px){.favorite-store-bar[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto minmax(0,max-content);gap:0 .5rem;justify-content:center;align-items:center;line-height:1.25rem}.favorite-store-bar[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{align-self:start;margin-top:.125rem;color:var(--medium-gray)}}@media (max-width: 767px){.favorite-store-bar__label[_ngcontent-%COMP%]{white-space:normal;max-width:4.25rem}.favorite-store-bar__address[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:0;min-width:0}.favorite-store-bar__street[_ngcontent-%COMP%], .favorite-store-bar__city-state-zip[_ngcontent-%COMP%]{white-space:nowrap}}.services-banner[_ngcontent-%COMP%]{position:relative;z-index:9;background:#fff;width:calc(100% - 104px);margin:calc(-1 * var(--services-banner-overlap)) auto 0;border-radius:8px;box-shadow:0 4px 20px #00000014;padding:1.8em 4em}.services-banner--layout-option-2[_ngcontent-%COMP%]{margin-top:calc(-1 * var(--services-banner-overlap) + 45px)}@media (max-width: 767px){.services-banner--layout-option-3[_ngcontent-%COMP%]{--services-banner-overlap: 1.5rem}}@media (max-width: 767px){.services-banner[_ngcontent-%COMP%]{padding:1.75rem 2rem;width:calc(100% - 48px)}}@media (min-width: 1600px){.services-banner[_ngcontent-%COMP%]{padding:2em;width:calc(100% - 240px)}}.services-banner__container[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:2.5rem;justify-content:center}@media (max-width: 1023px){.services-banner__container[_ngcontent-%COMP%]{flex-direction:column}}.services-banner__preview-note[_ngcontent-%COMP%]{font-size:.875rem;font-weight:600;margin:0 0 1.25rem;text-align:center}.services-banner__item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;flex-direction:row;justify-content:center}@media (min-width: 768px){.services-banner__item[_ngcontent-%COMP%]{flex-direction:row;align-items:center;column-gap:1.5rem}}@media (min-width: 1024px){.services-banner__item[_ngcontent-%COMP%]{align-items:flex-start;flex-direction:column}}@media (min-width: 1600px){.services-banner__item[_ngcontent-%COMP%]{align-items:center;flex-direction:row;column-gap:1rem}}.services-banner__icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:56px;height:56px;background-color:var(--primary-container);border-radius:50%;flex-shrink:0;color:var(--primary-dark)}.services-banner__content[_ngcontent-%COMP%]{flex:1;min-width:0}.services-banner__item-title[_ngcontent-%COMP%]{font-size:var(--font-size-lg);font-weight:700;margin-bottom:.75rem;color:var(--text)}.services-banner__item-description[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500;line-height:2rem;color:var(--text);margin:0}"]})}}return h})();var os={componentTitle:{type:"string",data:"Find Us"},locationTitle:{type:"string",data:"Our Location"},businessHoursTitle:{type:"string",data:"We are Open"},contactsTitle:{type:"string",data:"Contact Phone"}};var Cc=(()=>{class h{constructor(){this.daysMap={sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday"}}formatStoreHours(n){let c={};n.any.forEach(a=>{let z=`${a.openTime} - ${a.closeTime}`;c[z]||(c[z]=[]),c[z].push(this.daysMap[a.day.toLowerCase()])});let d=`We are open
726`;for(let[a,z]of Object.entries(c)){let J=this.formatDays(z);d+=`${J}
727${a}
728`}return d.trim()}formatDays(n){if(n.length===1)return n[0];let c=n[0],d=n[n.length-1];return n.length===2?`${c} - ${d}`:`${c} - ${d}`}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275prov=zn({token:h,factory:h.\u0275fac,providedIn:"root"})}}return h})();var Mo=Jg(dm(),1);var Ev=["content"],zv=["*"],Av=["container"];var r_=h=>Object.keys(h).reduce((k,n)=>{let c=n;return h[c]===void 0?k:cn(te({},k),{[c]:h[c]})},{}),pm=(()=>{class h{constructor(){this.zone=gt(em),this.subscriptionsPerInstance=new Map,this.mapCreated=new Qh,this.mapLoaded=new Qh,this.markersToRemove=Te([]),this.popupsToRemove=Te([]),this.imageIdsToRemove=Te([]),this.mapCreated$=this.mapCreated.asObservable(),this.mapLoaded$=this.mapLoaded.asObservable()}setup(n){this.createMap(n.mapOptions),this.hookEvents(n.mapEvents),this.mapEvents=n.mapEvents,this.mapCreated.next(void 0),this.mapCreated.complete(),(n.mapOptions.terrain||n.mapOptions.projection)&&this.mapInstance.on("load",()=>{n.mapOptions.projection&&this.setProjection(n.mapOptions.projection),n.mapOptions.terrain&&this.setTerrain(n.mapOptions.terrain)})}destroyMap(){this.mapInstance&&this.mapInstance.remove()}updateMinZoom(n){return this.zone.runOutsideAngular(()=>{this.mapInstance.setMinZoom(n)})}updateMaxZoom(n){return this.zone.runOutsideAngular(()=>{this.mapInstance.setMaxZoom(n)})}updateMinPitch(n){return this.zone.runOutsideAngular(()=>{this.mapInstance.setMinPitch(n)})}updateMaxPitch(n){return this.zone.runOutsideAngular(()=>{this.mapInstance.setMaxPitch(n)})}updateRenderWorldCopies(n){return this.zone.runOutsideAngular(()=>{this.mapInstance.setRenderWorldCopies(n)})}updateScrollZoom(n){return this.zone.runOutsideAngular(()=>{n?this.mapInstance.scrollZoom.enable():this.mapInstance.scrollZoom.disable()})}updateDragRotate(n){return this.zone.runOutsideAngular(()=>{n?this.mapInstance.dragRotate.enable():this.mapInstance.dragRotate.disable()})}updateTouchPitch(n){return this.zone.runOutsideAngular(()=>{n?this.mapInstance.touchPitch.enable():this.mapInstance.touchPitch.disable()})}updateTouchZoomRotate(n){return this.zone.runOutsideAngular(()=>{n?this.mapInstance.touchZoomRotate.enable():this.mapInstance.touchZoomRotate.disable()})}updateDoubleClickZoom(n){return this.zone.runOutsideAngular(()=>{n?this.mapInstance.doubleClickZoom.enable():this.mapInstance.doubleClickZoom.disable()})}updateKeyboard(n){return this.zone.runOutsideAngular(()=>{n?this.mapInstance.keyboard.enable():this.mapInstance.keyboard.disable()})}updateDragPan(n){return this.zone.runOutsideAngular(()=>{n?this.mapInstance.dragPan.enable():this.mapInstance.dragPan.disable()})}updateBoxZoom(n){return this.zone.runOutsideAngular(()=>{n?this.mapInstance.boxZoom.enable():this.mapInstance.boxZoom.disable()})}updateStyle(n){return this.zone.runOutsideAngular(()=>{this.mapInstance.setStyle(n)})}updateMaxBounds(n){return this.zone.runOutsideAngular(()=>{this.mapInstance.setMaxBounds(n)})}setProjection(n){return this.zone.runOutsideAngular(()=>{this.mapInstance.setProjection(n)})}setTerrain(n){return this.zone.runOutsideAngular(()=>{this.mapInstance.setTerrain(n)})}getTerrain(){return this.zone.runOutsideAngular(()=>this.mapInstance.getTerrain())}setCenterElevation(n){return this.zone.runOutsideAngular(()=>{this.mapInstance.setCenterElevation(n)})}changeCanvasCursor(n){let c=this.mapInstance.getCanvasContainer();c.style.cursor=n}queryRenderedFeatures(n,c){return this.mapInstance.queryRenderedFeatures(n,c)}panTo(n,c){return this.zone.runOutsideAngular(()=>{this.mapInstance.panTo(n,c)})}move(n,c,d,a,z,J,yt){return this.zone.runOutsideAngular(()=>{this.mapInstance[n](cn(te({},c),{zoom:d??this.mapInstance.getZoom(),center:a??this.mapInstance.getCenter(),bearing:z??this.mapInstance.getBearing(),pitch:J??this.mapInstance.getPitch(),roll:yt??this.mapInstance.getRoll()}
728))})}addLayer(n,c,d){this.zone.runOutsideAngular(()=>{if(Object.keys(n.layerOptions).forEach(J=>{let yt=J;n.layerOptions[yt]===void 0&&delete n.layerOptions[yt]}),this.mapInstance.addLayer(n.layerOptions,d),!c)return;let a=[];a.push(this.createSubscriptionForLayer(n.layerOptions.id,"click",n.layerEvents.layerClick)),a.push(this.createSubscriptionForLayer(n.layerOptions.id,"dblclick",n.layerEvents.layerDblClick)),a.push(this.createSubscriptionForLayer(n.layerOptions.id,"mousedown",n.layerEvents.layerMouseDown)),a.push(this.createSubscriptionForLayer(n.layerOptions.id,"mouseup",n.layerEvents.layerMouseUp)),a.push(this.createSubscriptionForLayer(n.layerOptions.id,"mouseenter",n.layerEvents.layerMouseEnter)),a.push(this.createSubscriptionForLayer(n.layerOptions.id,"mouseleave",n.layerEvents.layerMouseLeave)),a.push(this.createSubscriptionForLayer(n.layerOptions.id,"mousemove",n.layerEvents.layerMouseMove)),a.push(this.createSubscriptionForLayer(n.layerOptions.id,"mouseover",n.layerEvents.layerMouseOver)),a.push(this.createSubscriptionForLayer(n.layerOptions.id,"mouseout",n.layerEvents.layerMouseOut)),a.push(this.createSubscriptionForLayer(n.layerOptions.id,"contextmenu",n.layerEvents.layerContextMenu)),a.push(this.createSubscriptionForLayer(n.layerOptions.id,"touchstart",n.layerEvents.layerTouchStart)),a.push(this.createSubscriptionForLayer(n.layerOptions.id,"touchend",n.layerEvents.layerTouchEnd)),a.push(this.createSubscriptionForLayer(n.layerOptions.id,"touchcancel",n.layerEvents.layerTouchCancel));let z=this.mapInstance.getLayer(n.layerOptions.id);z&&this.subscriptionsPerInstance.set(z,a)})}removeLayer(n){this.zone.runOutsideAngular(()=>{let c=this.mapInstance.getLayer(n);if(c!=null){let d=this.subscriptionsPerInstance.get(c)||[];for(let a of d)a.unsubscribe();this.subscriptionsPerInstance.delete(c),this.mapInstance.removeLayer(n)}})}addMarker(n){let c={offset:n.markersOptions.offset,anchor:n.markersOptions.anchor,color:n.markersOptions.color,scale:n.markersOptions.scale,draggable:!!n.markersOptions.draggable,rotationAlignment:n.markersOptions.rotationAlignment,rotation:n.markersOptions.rotation,pitchAlignment:n.markersOptions.pitchAlignment,clickTolerance:n.markersOptions.clickTolerance,element:n.markersOptions.element.childNodes.length>0?n.markersOptions.element:void 0,opacity:n.markersOptions.opacity,opacityWhenCovered:n.markersOptions.opacityWhenCovered,subpixelPositioning:n.markersOptions.subpixelPositioning},d=new Mo.Marker(c);d.on("dragstart",z=>{if(z){let{target:J}=z;this.zone.run(()=>{n.markersEvents.markerDragStart.emit(J)})}}),d.on("drag",z=>{if(z){let{target:J}=z;this.zone.run(()=>n.markersEvents.markerDrag.emit(J))}}),d.on("dragend",z=>{if(z){let{target:J}=z;this.zone.run(()=>n.markersEvents.markerDragEnd.emit(J))}});let a=n.markersOptions.feature?n.markersOptions.feature.geometry.coordinates:n.markersOptions.lngLat;return d.setLngLat(a),this.zone.runOutsideAngular(()=>(d.addTo(this.mapInstance),d))}removeMarker(n){this.markersToRemove.update(c=>[...c,n])}createPopup(n,c){return this.zone.runOutsideAngular(()=>{let d=r_(n.popupOptions),a=new Mo.Popup(d);a.setDOMContent(c);let z=[];return z.push(this.createSubscriptionForPopup(a,"open",n.popupEvents.popupOpen)),z.push(this.createSubscriptionForPopup(a,"close",n.popupEvents.popupClose)),this.subscriptionsPerInstance.set(a,z),a})}addPopupToMap(n,c){return this.zone.runOutsideAngular(()=>{n.setLngLat(c),n.addTo(this.mapInstance)})}addPopupToMarker(n,c){return this.zone.runOutsideAngular(()=>{n.setPopup(c)})}removePopupFromMap(n){if(this.subscriptionsPerInstance.has(n)){let c=this.subscriptionsPerInstance.get(n)||[];for(let d of c)d.unsubscribe();this.subscriptionsPerInstance.delete(n)}this.popupsToRemove.update(c=>[...c,n])}removePopupFromMarker(n){return this.zone.runOutsideAngular(()=>{let c=n.getPopup();if(this.subscriptionsPerInstance.has(c)){let d=this.subscriptionsPerInstance.get(c)||[];for(let a of d)a.unsubscribe();this.subscriptionsPerInstance.delete(c)}n.setPopup(void 0)})}addControl(n,c){return this.zone.runOutsideAngular(()=>{this.mapInstance.addControl(n,c)})}
728removeControl(n){return this.zone.runOutsideAngular(()=>{this.mapInstance.removeControl(n)})}loadAndAddImage(n,c,d){return cu(this,null,function*(){return this.zone.runOutsideAngular(()=>cu(this,null,function*(){let a=yield this.mapInstance.loadImage(c);this.addImage(n,a.data,d)}))})}addImage(n,c,d){return this.zone.runOutsideAngular(()=>{this.mapInstance.addImage(n,c,d)})}removeImage(n){this.imageIdsToRemove.update(c=>[...c,n])}addSource(n,c){return this.zone.runOutsideAngular(()=>{Object.keys(c).forEach(d=>c[d]===void 0&&delete c[d]),this.mapInstance.addSource(n,c)})}getSource(n){return this.mapInstance.getSource(n)}removeSource(n){this.zone.runOutsideAngular(()=>{this.findLayersBySourceId(n).forEach(c=>this.mapInstance.removeLayer(c.id)),this.mapInstance.removeSource(n)})}setAllLayerPaintProperty(n,c){return this.zone.runOutsideAngular(()=>{Object.keys(c).forEach(d=>{this.mapInstance.setPaintProperty(n,d,c[d])})})}setAllLayerLayoutProperty(n,c){return this.zone.runOutsideAngular(()=>{Object.keys(c).forEach(d=>{this.mapInstance.setLayoutProperty(n,d,c[d])})})}setLayerFilter(n,c){return this.zone.runOutsideAngular(()=>{this.mapInstance.setFilter(n,c)})}setLayerBefore(n,c){return this.zone.runOutsideAngular(()=>{this.mapInstance.moveLayer(n,c)})}setLayerZoomRange(n,c,d){return this.zone.runOutsideAngular(()=>{this.mapInstance.setLayerZoomRange(n,c||0,d||20)})}fitBounds(n,c){return this.zone.runOutsideAngular(()=>{this.mapInstance.fitBounds(n,c)})}fitScreenCoordinates(n,c,d){return this.zone.runOutsideAngular(()=>{this.mapInstance.fitScreenCoordinates(n[0],n[1],c,d)})}clearMapElements(){this.zone.runOutsideAngular(()=>{this.removeMarkers(),this.removePopups(),this.removeImages()})}createMap(n){em.assertNotInAngularZone();let c=r_(n);this.mapInstance=new Mo.Map(c),window&&/msie\s|trident\/|edge\//i.test(window.navigator.userAgent)&&this.mapInstance.setStyle(n.style)}removeMarkers(){for(let n of this.markersToRemove())n.remove();this.markersToRemove.set([])}removePopups(){for(let n of this.popupsToRemove())n.remove();this.popupsToRemove.set([])}removeImages(){for(let n of this.imageIdsToRemove())this.mapInstance.removeImage(n);this.imageIdsToRemove.set([])}findLayersBySourceId(n){let c=this.mapInstance.getStyle().layers;return c==null?[]:c.filter(d=>"source"in d?d.source===n:!1)}hookEvents(n){this.mapInstance.on("load",c=>{this.mapLoaded.next(void 0),this.mapLoaded.complete(),this.zone.run(()=>{n.mapLoad.emit(c.target)})}),this.mapInstance.on("resize",c=>this.zone.run(()=>{n.mapResize.emit(c)})),this.mapInstance.on("remove",c=>this.zone.run(()=>{n.mapRemove.emit(c)})),this.mapInstance.on("mousedown",c=>this.zone.run(()=>{n.mapMouseDown.emit(c)})),this.mapInstance.on("mouseup",c=>this.zone.run(()=>{n.mapMouseUp.emit(c)})),this.mapInstance.on("mousemove",c=>this.zone.run(()=>{n.mapMouseMove.emit(c)})),this.mapInstance.on("click",c=>this.zone.run(()=>{n.mapClick.emit(c)})),this.mapInstance.on("dblclick",c=>this.zone.run(()=>{n.mapDblClick.emit(c)})),this.mapInstance.on("mouseover",c=>this.zone.run(()=>{n.mapMouseOver.emit(c)})),this.mapInstance.on("mouseout",c=>this.zone.run(()=>{n.mapMouseOut.emit(c)})),this.mapInstance.on("contextmenu",c=>this.zone.run(()=>{n.mapContextMenu.emit(c)})),this.mapInstance.on("touchstart",c=>this.zone.run(()=>{n.mapTouchStart.emit(c)})),this.mapInstance.on("touchend",c=>this.zone.run(()=>{n.mapTouchEnd.emit(c)})),this.mapInstance.on("touchmove",c=>this.zone.run(()=>{n.mapTouchMove.emit(c)})),this.mapInstance.on("touchcancel",c=>this.zone.run(()=>{n.mapTouchCancel.emit(c)})),this.mapInstance.on("wheel",c=>this.zone.run(()=>{n.mapWheel.emit(c)})),this.mapInstance.on("movestart",c=>this.zone.run(()=>n.moveStart.emit(c))),this.mapInstance.on("move",c=>this.zone.run(()=>n.move.emit(c))),this.mapInstance.on("moveend",c=>this.zone.run(()=>n.moveEnd.emit(c))),this.mapInstance.on("dragstart",c=>this.zone.run(()=>{n.mapDragStart.emit(c)})),this.mapInstance.on("drag",c=>this.zone.run(()=>{n.mapDrag.emit(c)})),this.mapInstance.on("dragend",c=>this.zone.run(()=>{n.mapDragEnd.emit(c)})),this.mapInstance.on("zoomstart",c=>this.zone.run(()=>n.zoomStart.emit(c))),this.mapInstance.on("zoom",c=>this.zone.run(()=>n.zoomEvt.emit(c))),this.mapInstance.on("zoomend",c=>this.zone.run(()=>n.zoomEnd.emit(c))),this.mapInstance.on("rotatestart",c=>this.zone.run(()=>n.rotateStart.emit(c))),this.mapInstance.on("rotate",c=>this.zone.run(()=>n.rotate.emit(c))),this.mapInstance.on("rotateend",c=>this.zone.run(()=>n.rotateEnd.emit(c))),this.mapInstance.on("pitchstart",c=>this.zone.run(()=>n.pitchStart.emit(c))),this.mapInstance.on("pitch",c=>this.zone.run(()=>n.pitchEvt.emit(c))),this.mapInstance.on("pitchend",c=>this.zone.run(()=>n.pitchEnd.emit(c))),this.mapInstance.on("boxzoomstart",c=>this.zone.run(()=>n.boxZoomStart.emit(c))),this.mapInstance.on("boxzoomend",c=>this.zone.run(()=>n.boxZoomEnd.emit(c))),this.mapInstance.on("boxzoomcancel",c=>this.zone.run(()=>n.boxZoomCancel.emit(c))),this.mapInstance.on("webglcontextlost",c=>this.zone.run(()=>n.webGlContextLost.emit(c))),this.mapInstance.on("webglcontextrestored",c=>this.zone.run(()=>n.webGlContextRestored.emit(c))),this.mapInstance.on("render",c=>this.zone.run(()=>n.render.emit(c))),this.mapInstance.on("error",c=>this.zone.run(()=>{n.mapError.emit(c)})),this.mapInstance.on("data",c=>this.zone.run(()=>n.data.emit(c))),this.mapInstance.on("styledata",c=>this.zone.run(()=>n.styleData.emit(c))),this.mapInstance.on("sourcedata",c=>this.zone.run(()=>n.sourceData.emit(c))),this.mapInstance.on("dataloading",c=>this.zone.run(()=>n.dataLoading.emit(c))),this.mapInstance.on("styledataloading",c=>this.zone.run(()=>n.styleDataLoading.emit(c))),this.mapInstance.on("sourcedataloading",c=>this.zone.run(()=>n.sourceDataLoading.emit(c))),this.mapInstance.on("styleimagemissing",c=>this.zone.run(()=>n.styleImageMissing.emit(c))),this.mapInstance.on("idle",c=>this.zone.run(()=>n.idle.emit(c)))}createSubscriptionForLayer(n,c,d){let a=z=>{this.zone.run(()=>
728{d.emit(z)})};return this.mapInstance.on(c,n,a),{unsubscribe:()=>{this.mapInstance.off(c,n,a)}}}createSubscriptionForPopup(n,c,d){let a=z=>{this.zone.run(()=>{d.emit(z)})};return n.on(c,a),{unsubscribe:()=>{n.off(c,a)}}}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275prov=zn({token:h,factory:h.\u0275fac})}}return h})();var a_=(()=>{class h{get mapInstance(){return this.mapService.mapInstance}constructor(){this.mapService=gt(pm),this.elementRef=gt(kr),this.collectResourceTiming=zt(),this.crossSourceCollisions=zt(),this.customMapboxApiUrl=zt(),this.fadeDuration=zt(),this.hash=zt(),this.refreshExpiredTiles=zt(),this.canvasContextAttributes=zt(),this.bearingSnap=zt(),this.interactive=zt(),this.pitchWithRotate=zt(),this.clickTolerance=zt(),this.attributionControl=zt(),this.logoPosition=zt(),this.maxTileCacheSize=zt(),this.localIdeographFontFamily=zt(),this.trackResize=zt(),this.transformRequest=zt(),this.bounds=zt(),this.locale=zt(),this.cooperativeGestures=zt(),this.cancelPendingTileRequestsWhileZooming=zt(),this.centerClampedToGround=zt(),this.maplibreLogo=zt(),this.maxCanvasSize=zt(),this.maxTileCacheZoomLevels=zt(),this.pixelRatio=zt(),this.rollEnabled=zt(),this.transformCameraUpdate=zt(),this.validateStyle=zt(),this.minZoom=zt(),this.maxZoom=zt(),this.minPitch=zt(),this.maxPitch=zt(),this.scrollZoom=zt(),this.dragRotate=zt(),this.touchPitch=zt(),this.touchZoomRotate=zt(),this.doubleClickZoom=zt(),this.keyboard=zt(),this.dragPan=zt(),this.boxZoom=zt(),this.style=zt.required(),this.center=zt(),this.maxBounds=zt(),this.zoom=zt(),this.bearing=zt(),this.pitch=zt(),this.roll=zt(),this.fitBoundsOptions=zt(),this.renderWorldCopies=zt(),this.elevation=zt(),this.terrain=zt(),this.projection=zt(),this.movingMethod=zt("flyTo"),this.movingOptions=zt(),this.fitBounds=zt(),this.fitScreenCoordinates=zt(),this.centerWithPanTo=zt(),this.panToOptions=zt(),this.cursorStyle=zt(),this.mapResize=Le(),this.mapRemove=Le(),this.mapMouseDown=Le(),this.mapMouseUp=Le(),this.mapMouseMove=Le(),this.mapClick=Le(),this.mapDblClick=Le(),this.mapMouseOver=Le(),this.mapMouseOut=Le(),this.mapContextMenu=Le(),this.mapTouchStart=Le(),this.mapTouchEnd=Le(),this.mapTouchMove=Le(),this.mapTouchCancel=Le(),this.mapWheel=Le(),this.moveStart=Le(),this.move=Le(),this.moveEnd=Le(),this.mapDragStart=Le(),this.mapDrag=Le(),this.mapDragEnd=Le(),this.zoomStart=Le(),this.zoomEvt=Le(),this.zoomEnd=Le(),this.rotateStart=Le(),this.rotate=Le(),this.rotateEnd=Le(),this.pitchStart=Le(),this.pitchEvt=Le(),this.pitchEnd=Le(),this.boxZoomStart=Le(),this.boxZoomEnd=Le(),this.boxZoomCancel=Le(),this.webGlContextLost=Le(),this.webGlContextRestored=Le(),this.mapLoad=Le(),this.idle=Le(),this.render=Le(),this.mapError=Le(),this.data=Le(),this.styleData=Le(),this.sourceData=Le(),this.dataLoading=Le(),this.styleDataLoading=Le(),this.sourceDataLoading=Le(),this.styleImageMissing=Le(),this.mapContainer=lc.required("container"),im(()=>{if(this.canvasContextAttributes()?.preserveDrawingBuffer){let c=this.elementRef.nativeElement;c.setAttribute("data-cy","map"),this.mapLoad.subscribe(()=>{c.setAttribute("data-loaded","true")}),this.idle.subscribe(()=>{c.setAttribute("data-idle","true")}),this.render.subscribe(()=>{c.removeAttribute("data-idle")})}this.mapService.setup({mapOptions:{collectResourceTiming:this.collectResourceTiming(),container:this.mapContainer().nativeElement,crossSourceCollisions:this.crossSourceCollisions(),fadeDuration:this.fadeDuration(),minZoom:this.minZoom(),maxZoom:this.maxZoom(),minPitch:this.minPitch(),maxPitch:this.maxPitch(),style:this.style(),hash:this.hash(),interactive:this.interactive(),bearingSnap:this.bearingSnap(),pitchWithRotate:this.pitchWithRotate(),clickTolerance:this.clickTolerance(),attributionControl:this.attributionControl(),logoPosition:this.logoPosition(),canvasContextAttributes:this.canvasContextAttributes(),refreshExpiredTiles:this.refreshExpiredTiles(),maxBounds:this.maxBounds(),scrollZoom:this.scrollZoom(),boxZoom:this.boxZoom(),dragRotate:this.dragRotate(),dragPan:this.dragPan(),keyboard:this.keyboard(),doubleClickZoom:this.doubleClickZoom(),touchPitch:this.touchPitch(),touchZoomRotate:this.touchZoomRotate(),trackResize:this.trackResize(),center:this.center(),zoom:this.zoom(),bearing:this.bearing(),pitch:this.pitch(),roll:this.roll(),renderWorldCopies:this.renderWorldCopies(),maxTileC
728acheSize:this.maxTileCacheSize(),localIdeographFontFamily:this.localIdeographFontFamily(),transformRequest:this.transformRequest(),bounds:this.bounds()?this.bounds():this.fitBounds(),fitBoundsOptions:this.fitBoundsOptions(),locale:this.locale,cooperativeGestures:this.cooperativeGestures(),cancelPendingTileRequestsWhileZooming:this.cancelPendingTileRequestsWhileZooming(),centerClampedToGround:this.centerClampedToGround(),elevation:this.elevation(),maplibreLogo:this.maplibreLogo(),maxCanvasSize:this.maxCanvasSize(),maxTileCacheZoomLevels:this.maxTileCacheZoomLevels(),pixelRatio:this.pixelRatio(),rollEnabled:this.rollEnabled(),transformCameraUpdate:this.transformCameraUpdate(),validateStyle:this.validateStyle(),terrain:this.terrain(),projection:this.projection()},mapEvents:this});let n=this.cursorStyle();n&&this.mapService.changeCanvasCursor(n)}),hu(()=>{this.mapService.clearMapElements()})}ngOnDestroy(){this.mapService.destroyMap()}ngOnChanges(n){return cu(this,null,function*(){yield ef(this.mapService.mapCreated$);let c=this.zoom(),d=this.bearing(),a=this.pitch(),z=this.center();n.cursorStyle&&!n.cursorStyle.isFirstChange()&&this.mapService.changeCanvasCursor(n.cursorStyle.currentValue),n.minZoom&&!n.minZoom.isFirstChange()&&this.mapService.updateMinZoom(n.minZoom.currentValue),n.maxZoom&&!n.maxZoom.isFirstChange()&&this.mapService.updateMaxZoom(n.maxZoom.currentValue),n.minPitch&&!n.minPitch.isFirstChange()&&this.mapService.updateMinPitch(n.minPitch.currentValue),n.maxPitch&&!n.maxPitch.isFirstChange()&&this.mapService.updateMaxPitch(n.maxPitch.currentValue),n.renderWorldCopies&&!n.renderWorldCopies.isFirstChange()&&this.mapService.updateRenderWorldCopies(n.renderWorldCopies.currentValue),n.scrollZoom&&!n.scrollZoom.isFirstChange()&&this.mapService.updateScrollZoom(n.scrollZoom.currentValue),n.dragRotate&&!n.dragRotate.isFirstChange()&&this.mapService.updateDragRotate(n.dragRotate.currentValue),n.touchPitch&&!n.touchPitch.isFirstChange()&&this.mapService.updateTouchPitch(n.touchPitch.currentValue),n.touchZoomRotate&&!n.touchZoomRotate.isFirstChange()&&this.mapService.updateTouchZoomRotate(n.touchZoomRotate.currentValue),n.doubleClickZoom&&!n.doubleClickZoom.isFirstChange()&&this.mapService.updateDoubleClickZoom(n.doubleClickZoom.currentValue),n.keyboard&&!n.keyboard.isFirstChange()&&this.mapService.updateKeyboard(n.keyboard.currentValue),n.dragPan&&!n.dragPan.isFirstChange()&&this.mapService.updateDragPan(n.dragPan.currentValue),n.boxZoom&&!n.boxZoom.isFirstChange()&&this.mapService.updateBoxZoom(n.boxZoom.currentValue),n.style&&!n.style.isFirstChange()&&this.mapService.updateStyle(n.style.currentValue),n.maxBounds&&!n.maxBounds.isFirstChange()&&this.mapService.updateMaxBounds(n.maxBounds.currentValue),n.fitBounds&&n.fitBounds.currentValue&&!n.fitBounds.isFirstChange()&&this.mapService.fitBounds(n.fitBounds.currentValue,this.fitBoundsOptions()),n.fitScreenCoordinates&&n.fitScreenCoordinates.currentValue&&((z||c||a||this.fitBounds())&&n.fitScreenCoordinates.isFirstChange()&&console.warn("[ngx-maplibre-gl] center / zoom / pitch / fitBounds inputs are being overridden by fitScreenCoordinates input"),this.mapService.fitScreenCoordinates(n.fitScreenCoordinates.currentValue,d?d[0]:0,this.movingOptions())),this.centerWithPanTo()&&n.center&&!n.center.isFirstChange()&&!n.zoom&&!n.bearing&&!n.pitch&&!n.roll?this.mapService.panTo(this.center(),this.panToOptions()):(n.center&&!n.center.isFirstChange()||n.zoom&&!n.zoom.isFirstChange()||n.bearing&&!n.bearing.isFirstChange()&&!n.fitScreenCoordinates||n.pitch&&!n.pitch.isFirstChange()||n.roll&&!n.roll.isFirstChange())&&this.mapService.move(this.movingMethod(),this.movingOptions(),n.zoom&&c?c[0]:void 0,n.center?z:void 0,n.bearing&&d?d[0]:void 0,n.pitch&&a?a[0]:void 0,n.roll?n.roll.currentValue:void 0),n.terrain&&!n.terrain.isFirstChange()&&this.mapService.setTerrain(n.terrain.currentValue),n.projection&&!n.projection.isFirstChange()&&this.mapService.setProjection(n.projection.currentValue),n.elevation&&!n.elevation.isFirstChange()&&this.mapService.setCenterElevation(n.elevation.currentValue)})}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["mgl-map"]],viewQuery:function(c,d){c&1&&cc(d.mapContainer,Av,5),c&2&&Hd()},inputs:{collectResourceTiming:[1,"collectResourceTiming"],crossSourceCollisions:[1,"crossSourceCollisions"],customMapboxApiUrl:[1,"customMapboxApiUrl"],fadeDuration:[1,"fadeDuration"],hash:[1,"hash"],refreshExpiredTiles:[1,"refreshExpiredTiles"],canvasContextAttributes:[1,"canvasContextAttributes"],bearingSnap:[1,"bearingSnap"],interactive:[1,"interactive"],pitchWithRotate:[1,"pitchWithRotate"],clickTolerance:[1,"clickTolerance"],attributionControl:[1,"attributionControl"],logoPosition:[1,"logoPosition"],maxTileC
728acheSize:[1,"maxTileCacheSize"],localIdeographFontFamily:[1,"localIdeographFontFamily"],trackResize:[1,"trackResize"],transformRequest:[1,"transformRequest"],bounds:[1,"bounds"],locale:[1,"locale"],cooperativeGestures:[1,"cooperativeGestures"],cancelPendingTileRequestsWhileZooming:[1,"cancelPendingTileRequestsWhileZooming"],centerClampedToGround:[1,"centerClampedToGround"],maplibreLogo:[1,"maplibreLogo"],maxCanvasSize:[1,"maxCanvasSize"],maxTileCacheZoomLevels:[1,"maxTileCacheZoomLevels"],pixelRatio:[1,"pixelRatio"],rollEnabled:[1,"rollEnabled"],transformCameraUpdate:[1,"transformCameraUpdate"],validateStyle:[1,"validateStyle"],minZoom:[1,"minZoom"],maxZoom:[1,"maxZoom"],minPitch:[1,"minPitch"],maxPitch:[1,"maxPitch"],scrollZoom:[1,"scrollZoom"],dragRotate:[1,"dragRotate"],touchPitch:[1,"touchPitch"],touchZoomRotate:[1,"touchZoomRotate"],doubleClickZoom:[1,"doubleClickZoom"],keyboard:[1,"keyboard"],dragPan:[1,"dragPan"],boxZoom:[1,"boxZoom"],style:[1,"style"],center:[1,"center"],maxBounds:[1,"maxBounds"],zoom:[1,"zoom"],bearing:[1,"bearing"],pitch:[1,"pitch"],roll:[1,"roll"],fitBoundsOptions:[1,"fitBoundsOptions"],renderWorldCopies:[1,"renderWorldCopies"],elevation:[1,"elevation"],terrain:[1,"terrain"],projection:[1,"projection"],movingMethod:[1,"movingMethod"],movingOptions:[1,"movingOptions"],fitBounds:[1,"fitBounds"],fitScreenCoordinates:[1,"fitScreenCoordinates"],centerWithPanTo:[1,"centerWithPanTo"],panToOptions:[1,"panToOptions"],cursorStyle:[1,"cursorStyle"]},outputs:{mapResize:"mapResize",mapRemove:"mapRemove",mapMouseDown:"mapMouseDown",mapMouseUp:"mapMouseUp",mapMouseMove:"mapMouseMove",mapClick:"mapClick",mapDblClick:"mapDblClick",mapMouseOver:"mapMouseOver",mapMouseOut:"mapMouseOut",mapContextMenu:"mapContextMenu",mapTouchStart:"mapTouchStart",mapTouchEnd:"mapTouchEnd",mapTouchMove:"mapTouchMove",mapTouchCancel:"mapTouchCancel",mapWheel:"mapWheel",moveStart:"moveStart",move:"move",moveEnd:"moveEnd",mapDragStart:"mapDragStart",mapDrag:"mapDrag",mapDragEnd:"mapDragEnd",zoomStart:"zoomStart",zoomEvt:"zoomEvt",zoomEnd:"zoomEnd",rotateStart:"rotateStart",rotate:"rotate",rotateEnd:"rotateEnd",pitchStart:"pitchStart",pitchEvt:"pitchEvt",pitchEnd:"pitchEnd",boxZoomStart:"boxZoomStart",boxZoomEnd:"boxZoomEnd",boxZoomCancel:"boxZoomCancel",webGlContextLost:"webGlContextLost",webGlContextRestored:"webGlContextRestored",mapLoad:"mapLoad",idle:"idle",render:"render",mapError:"mapError",data:"data",styleData:"styleData",sourceData:"sourceData",dataLoading:"dataLoading",styleDataLoading:"styleDataLoading",sourceDataLoading:"sourceDataLoading",styleImageMissing:"styleImageMissing"},standalone:!0,features:[Er([pm]),ma,Kt],decls:2,vars:0,consts:[["container",""]],template:function(c,d){c&1&&it(0,"div",null,0)},styles:["[_nghost-%COMP%]{display:block}div[_ngcontent-%COMP%]{height:100%;width:100%}"],changeDetection:0})}}return h})(),s_=(()=>{class h{constructor(){this.mapService=gt(pm),this.destroyRef=gt(cf),this.offset=zt(),this.anchor=zt(),this.clickTolerance=zt(),this.color=zt(),this.scale=zt(),this.opacity=zt(),this.opacityWhenCovered=zt(),this.subpixelPositioning=zt(),this.feature=zt(),this.lngLat=zt(),this.draggable=zt(),this.popupShown=zt(),this.className=zt(),this.pitchAlignment=zt(),this.rotationAlignment=zt(),this.rotation=zt(),this.markerDragStart=Le(),this.markerDragEnd=Le(),this.markerDrag=Le(),this.content=lc.required("content"),this.markerInstance=Te(null),im(()=>{this.mapService.mapCreated$.pipe(Tf(this.destroyRef)).subscribe(()=>{let n=this.mapService.addMarker({markersOptions:{element:this.content().nativeElement,feature:this.feature(),lngLat:this.lngLat(),offset:this.offset(),anchor:this.anchor(),color:this.color(),scale:this.scale(),draggable:!!this.draggable(),clickTolerance:this.clickTolerance(),rotation:this.rotation(),rotationAlignment:this.rotationAlignment(),pitchAlignment:this.pitchAlignment(),opacity:this.opacity(),opacityWhenCovered:this.opacityWhenCovered(),subpixelPositioning:this.subpixelPositioning()},markersEvents:{markerDragStart:this.markerDragStart,markerDrag:this.markerDrag,markerDragEnd:this.markerDragEnd}});this.markerInstance.set(n)})})}ngOnDestroy(){this.removeMarker()}ngOnInit(){if(this.feature()&&this.lngLat())throw new Error("feature and lngLat input are mutually exclusive")}ngOnChanges(n){let c=this.markerInstance();n.lngLat&&!n.lngLat.isFirstChange()&&c.setLngLat(n.lngLat.currentValue),n.feature&&!n.feature.is
728FirstChange()&&c.setLngLat(n.feature.currentValue.geometry.coordinates),n.draggable&&!n.draggable.isFirstChange()&&c.setDraggable(!!n.draggable.currentValue),n.popupShown&&!n.popupShown.isFirstChange()&&(n.popupShown.currentValue?c.getPopup().addTo(this.mapService.mapInstance):c.getPopup().remove()),n.pitchAlignment&&!n.pitchAlignment.isFirstChange()&&c.setPitchAlignment(n.pitchAlignment.currentValue),n.rotationAlignment&&!n.rotationAlignment.isFirstChange()&&c.setRotationAlignment(n.rotationAlignment.currentValue),n.rotation&&!n.rotation.isFirstChange()&&c.setRotation(n.rotation.currentValue)}removeMarker(){this.mapService.removeMarker(this.markerInstance()),this.markerInstance.set(null)}togglePopup(){this.markerInstance().togglePopup()}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["mgl-marker"]],viewQuery:function(c,d){c&1&&cc(d.content,Ev,5),c&2&&Hd()},inputs:{offset:[1,"offset"],anchor:[1,"anchor"],clickTolerance:[1,"clickTolerance"],color:[1,"color"],scale:[1,"scale"],opacity:[1,"opacity"],opacityWhenCovered:[1,"opacityWhenCovered"],subpixelPositioning:[1,"subpixelPositioning"],feature:[1,"feature"],lngLat:[1,"lngLat"],draggable:[1,"draggable"],popupShown:[1,"popupShown"],className:[1,"className"],pitchAlignment:[1,"pitchAlignment"],rotationAlignment:[1,"rotationAlignment"],rotation:[1,"rotation"]},outputs:{markerDragStart:"markerDragStart",markerDragEnd:"markerDragEnd",markerDrag:"markerDrag"},standalone:!0,features:[ma,Kt],ngContentSelectors:zv,decls:3,vars:2,consts:[["content",""]],template:function(c,d){c&1&&(mu(),I(0,"div",null,0),gu(2),E()),c&2&&Ka(d.className())},encapsulation:2,changeDetection:0})}}return h})();var qd=Jg(dm());var l_=h=>[h],Lv=h=>({"locations-page-map":h}),Dv=h=>({selected:h});function Fv(h,k){if(h&1&&(I(0,"span",2),it(1,"app-icon",4),E()),h&2){let n=A(2);w(),j("name",n.iconName.pin)("color","var(--primary)")("size","18px")}}function Rv(h,k){if(h&1){let n=Yt();I(0,"button",5),Ot("click",function(){kt(n);let d=A().$index,a=A();return Et(a.selectMarker(d))}),it(1,"app-icon",4),E()}if(h&2){let n=A().$index,c=A();j("ngClass",me(5,Dv,c.selectedMarkerIndex===n)),qt("aria-label",c.markerAriaLabel(n)),w(),j("name",c.iconName.pin)("color","var(--primary)")("size",c.selectedMarkerIndex===n?"29px":"18px")}}function Bv(h,k){if(h&1&&(I(0,"mgl-marker",1),ut(1,Fv,2,3,"span",2)(2,Rv,2,7,"button",3),E()),h&2){let n=k.$implicit,c=A();j("lngLat",n),w(),rt(c.isMarkerInteractive()?2:1)}}var rs=(()=>{class h{set markers(n){this.markersChanged(n)&&(this._markers=n,this.pins.forEach(c=>c.remove()),this.pins=[],this.bounds=new qd.LngLatBounds,this.drawMarkers())}get markers(){return this._markers}markersChanged(n){return this._markers.length!==n.length?!0:n.some((c,d)=>{let a=this._markers[d];return c[0]!==a[0]||c[1]!==a[1]})}tryRenderDeliveryLayers(){this.map&&this.showDeliveryLayer()&&this.deliveryLayers()?.length&&this.handleDeliveryLayer()}constructor(){this.markerFocusZoom=14,this.clickAction=new Kn,this.layoutService=gt(pn),this.httpClient=gt(Zi),this.platformId=gt(rn),this._markers=[],this.bounds=new qd.LngLatBounds,this.iconName=ge,this.selectedMarkerIndex=null,this.center=zt(),this.pitch=zt(60),this.zoom=zt(12),this.selectedMarker=zt(null),this.pinsDisabled=zt(!1),this.doubleClickZoom=zt(!0),this.storeId=zt(),this.multipleStores=zt(),this.showDeliveryLayer=zt(),this.isLocationsPage=zt(!1),this.configService=gt(Ee),this.pins=[],this.deliveryLayers=Te([]),this.deliveryLayersByStore=Te({}),this.deliveryLayersRendered=!1,ii(()=>{let n=this.selectedMarker();n!==this.selectedMarkerIndex&&this.selectMarker(n,!1)}),ii(()=>{let n=this.deliveryLayers();this.showDeliveryLayer()&&n.length>0&&this.map?this.handleDeliveryLayer():!this.showDeliveryLayer()&&n.length>0&&this.hideDeliveryLayer()})}ngOnInit(){if(!An(this.platformId))return;let n=this.multipleStores();n?.length?(this.deliveryLayersRendered=!1,this.setDeliveryLayersWithStoreInfo(n)):this.storeId()?this.configService.getStoreData(this.storeId()).subscribe(()=>{this.deliveryLayersRendered=!1;let c=this.configService.storeData();this.setDeliveryLayersWithStoreInfo(c?[c]:[])}):this.configService.getMultipleStoresData().subscribe(c=>{this.deliveryLayersRendered=!1,this.setDeliveryLayersWithStoreInfo(c)})}setDeliveryLayersWithStoreInfo(n){let c={},d=[];
728n.forEach((a,z)=>{let J=a.deliveryAreas??[];J.forEach(yt=>{yt.storeIndex=z,d.push(yt)}),c[z]=J}),this.deliveryLayers.set(d),this.deliveryLayersByStore.set(c)}onMapLoad(n){this.map=n,this.map.addControl(new qd.NavigationControl,"bottom-right"),this.map&&this.drawMarkers(),this.tryRenderDeliveryLayers(),this.selectedMarkerIndex!==null&&this.focusMarker(this.selectedMarkerIndex)}drawMarkers(){this.markers.forEach(n=>{n[0]&&n[1]&&this.bounds.extend(n)}),this.fitMap()}isBoundsValid(){return this.bounds._ne.lat&&this.bounds._ne.lng&&this.bounds._sw.lat&&this.bounds._sw.lng}fitMap(n){this.map?.resize();let a=this.layoutService.viewport()==="mobile"?55:120;if(!this.bounds.isEmpty()&&this.isBoundsValid()){let z={animate:!0,duration:1e3,maxZoom:this.markerFocusZoom,padding:{top:105,bottom:a,left:40,right:80},easing:J=>J*(2-J)};n!==void 0&&(z.zoom=n),this.map?.fitBounds(this.bounds,z)}}selectMarker(n,c=!0){if(!this.pinsDisabled()){if(n===null){this.selectedMarkerIndex=null;return}c&&this.clickAction.emit(this.markers[n]),n!==null&&this.selectedMarkerIndex!==n&&this.focusMarker(n),this.selectedMarkerIndex=n!==this.selectedMarkerIndex?n:null}}focusMarker(n){this.map?.flyTo({center:[this.markers[n][0],this.markers[n][1]],zoom:this.markerFocusZoom,speed:3,curve:1})}markerAriaLabel(n){let c=n+1;return this.selectedMarkerIndex===n?`Selected location marker ${c}`:`Select location marker ${c}`}isMarkerInteractive(){return!this.pinsDisabled()&&this.markers.length>1}handleDeliveryLayer(){if(this.deliveryLayersRendered)return;if(!this.map?.isStyleLoaded()){this.map?.once("style.load",()=>this.handleDeliveryLayer());return}let n=["#E1BC88","#FF6B6B","#4ECDC4","#45B7D1","#FFA07A","#98D8C8"];this.deliveryLayers()?.forEach((c,d)=>{let a=c.storeIndex??0,z=n[a%n.length],J=c.points.map(ie=>[ie.lng,ie.lat]);J.length>0&&(J[0][0]!==J[J.length-1][0]||J[0][1]!==J[J.length-1][1])&&(J=[...J,J[0]]);let yt={type:"Feature",properties:{id:"delivery"},geometry:{type:"Polygon",coordinates:[J]}};try{this.map?.addSource(`delivery_${d}`,{type:"geojson",data:yt});let ee=Object.values(this.deliveryLayersByStore()).flat().slice(0,d+1).filter(ne=>ne.storeIndex===a).length-1,bt=Math.max(.1,.5-ee*.1);this.map?.addLayer({id:`delivery_${d}`,type:"fill",source:`delivery_${d}`,layout:{},paint:{"fill-color":z,"fill-opacity":bt,"fill-outline-color":"#9e6f2c"}}),c.points?.forEach(ne=>{this.bounds.extend(ne)})}catch{}}),this.deliveryLayersRendered=!0,this.fitMap()}hideDeliveryLayer(){this.deliveryLayers()?.forEach((n,c)=>{this.map?.removeLayer(`delivery_${c}`),this.map?.removeSource(`delivery_${c}`)}),this.deliveryLayersRendered=!1}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-mapbox-map"]],inputs:{center:[1,"center"],pitch:[1,"pitch"],zoom:[1,"zoom"],selectedMarker:[1,"selectedMarker"],pinsDisabled:[1,"pinsDisabled"],doubleClickZoom:[1,"doubleClickZoom"],storeId:[1,"storeId"],multipleStores:[1,"multipleStores"],showDeliveryLayer:[1,"showDeliveryLayer"],isLocationsPage:[1,"isLocationsPage"],markers:"markers"},outputs:{clickAction:"clickAction"},standalone:!0,features:[Kt],decls:3,vars:15,consts:[[3,"mapLoad","zoom","center","attributionControl","scrollZoom","pitch","doubleClickZoom","ngClass"],[3,"lngLat"],["aria-hidden","true",1,"maplibregl-marker"],["type","button",1,"maplibregl-marker",3,"ngClass"],[3,"name","color","size"],["type","button",1,"maplibregl-marker",3,"click","ngClass"]],template:function(c,d){c&1&&(I(0,"mgl-map",0),Ot("mapLoad",function(z){return d.onMapLoad(z)}),le(1,Bv,3,2,"mgl-marker",1,Ce),E()),c&2&&(Xa("//cdn.foodtecsolutions.com/services/map/style.json"),j("zoom",me(9,l_,d.zoom()))("center",d.center())("attributionControl",!1)("scrollZoom",!1)("pitch",me(11,l_,d.pitch()))("doubleClickZoom",d.doubleClickZoom())("ngClass",me(13,Lv,d.isLocationsPage())),w(),ce(d.markers))},dependencies:[a_,s_,ve,Ye,Ae],styles:["[_nghost-%COMP%]{width:100%;height:100%;position:relative;display:inline-flex}mgl-map[_ngcontent-%COMP%]{display:flex;height:100%;width:100%}@media (max-width: 767px){mgl-map.locations-page-map[_ngcontent-%COMP%]{min-height:425px}}.maplibregl-marker[_ngcontent-%COMP%]{background:none;cursor:pointer;padding:0}.maplibregl-marker[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{position:absolute;transform:translate(-50%,-100%)}"]})}}return h})();var Nv=(h,k)=>[h,k],Vv=h=>[h];function jv(h,k){if(h&1&&(I(0,"div",7)(1,"span",11),X(2),E(),I(3,"span",12),X(4),E()()),h&2){let n=k.$implicit;w(),qt("aria-label",n.days.replace("-","to")),w(),St(n.days),w(2),St(n.time)}}function Uv(h,k){if(h&1&&it(0,"app-mapbox-map",10),h&2){let n,c,d=A();j("center",d.signleStoreMapPosition())("markers",me(10,Vv,en(7,Nv,(n=(n=d.singleStore(
728))==null?null:n.lng)!==null&&n!==void 0?n:0,(n=(n=d.singleStore())==null?null:n.lat)!==null&&n!==void 0?n:0)))("pitch",0)("pinsDisabled",!0)("zoom",14)("storeId",(c=d.singleStore())==null?null:c.id)("showDeliveryLayer",!0)}}var c_=(()=>{class h{constructor(n,c){this.platformId=n,this.componentConfig=c,this.brandConfigService=gt(Ee),this.storeHoursService=gt(Cc),this.iconName=ge,this.weekdayOrder=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],this.isBrowser=!1,this.brandConfig=this.brandConfigService.brandConfig,this.singleStore=this.brandConfigService.singleStore,this.storeData=this.brandConfigService.storeData,this.storeAddress=Ut(()=>{if(this.storeData())return this.storeData()?.address}),this.signleStoreMapPosition=Ut(()=>{if(this.storeData()?.lng&&this.storeData()?.lat)return[this.storeData()?.lng??0,this.storeData()?.lat??0]}),this.storePhone=Ut(()=>Dr(this.storeData()?.telephone??"")),this.storeCityStateZip=Ut(()=>{if(this.storeData())return`${this.storeData()?.city}, ${this.storeData()?.state} ${this.storeData()?.zip}`}),this.groupStoreHours=Ut(()=>{let d=this.storeData();if(d?.storeHours){let a=[...d.storeHours.any].sort((J,yt)=>this.getWeekdayIndex(J.day)-this.getWeekdayIndex(yt.day)),z={};for(let J of a){let yt=J?.openTime&&J?.closeTime?`${wn(J.openTime)} - ${wn(J.closeTime)}`:"Closed";(z[yt]??=[]).push(J.day)}return Object.entries(z).map(([J,yt])=>({days:this.formatDays(yt),time:J}))}}),this.isBrowser=An(this.platformId),this.data=te(te({},os),this.componentConfig?.data)}formatDays(n){if(n.length===1)return this.capitalize(n[0]);let c=this.capitalize(n[0]),d=this.capitalize(n[n.length-1]);return n.length===2?`${c} - ${d}`:`${c} - ${d}`}capitalize(n){return n.charAt(0).toUpperCase()+n.slice(1)}getWeekdayIndex(n){let c=this.weekdayOrder.indexOf(n.toLowerCase());return c===-1?this.weekdayOrder.length:c}static{this.\u0275fac=function(c){return new(c||h)(se(rn),se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-single-store-location-and-contact"]],standalone:!0,features:[Kt],decls:25,vars:10,consts:[[1,"location-and-contact__inner"],[1,"location-and-contact__left"],[1,"location-and-contact__info-tile"],[1,"location-and-contact__icon",3,"name"],[1,"location-and-contact__info-title"],[1,"description-wrapper"],[1,"description-text"],[1,"description-wrapper","store-hours__item"],[1,"location-and-contact__info-description"],[1,"location-and-contact__right"],[3,"center","markers","pitch","pinsDisabled","zoom","storeId","showDeliveryLayer"],[1,"store-hours__days"],[1,"store-hours__time"]],template:function(c,d){c&1&&(I(0,"div",0)(1,"div",1)(2,"div",2),it(3,"app-icon",3),I(4,"span",4),X(5),E(),I(6,"span",5)(7,"span",6),X(8),E(),I(9,"span",6),X(10),E()()(),I(11,"div",2),it(12,"app-icon",3),I(13,"span",4),X(14),E(),le(15,jv,5,3,"div",7,Ce),E(),I(17,"div",2),it(18,"app-icon",3),I(19,"span",4),X(20),E(),I(21,"span",8),X(22),E()()(),I(23,"div",9),ut(24,Uv,1,12,"app-mapbox-map",10),E()()),c&2&&(w(3),j("name",d.iconName.pin),w(2),St(d.data.locationTitle.data),w(3),St(d.storeAddress()),w(2),St(d.storeCityStateZip()),w(2),j("name",d.iconName.clock),w(2),St(d.data.businessHoursTitle.data),w(),ce(d.groupStoreHours()),w(3),j("name",d.iconName.phone),w(2),St(d.data.contactsTitle.data),w(2),St(d.storePhone()),w(2),rt(d.isBrowser?24:-1))},dependencies:[Ae,rs],styles:[".location-and-contact[_ngcontent-%COMP%]{padding:25px 24px;background-color:var(--white)}@media (min-width: 768px){.location-and-contact[_ngcontent-%COMP%]{padding:25px 52px}}.location-and-contact__title[_ngcontent-%COMP%]{font-size:40px;font-weight:700;margin-bottom:32px;font-style:italic;display:block;font-family:Caveat,sans-serif;padding-left:16px}@media (min-width: 900px){.location-and-contact__title[_ngcontent-%COMP%]{padding:0}}.location-and-contact__inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}@media (min-width: 900px){.location-and-contact__inner[_ngcontent-%COMP%]{flex-direction:row}}.location-and-contact__left[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--text);gap:16px}@media (max-width: 900px){.location-and-contact__left[_ngcontent-%COMP%]{padding:0 16px}}.location-and-contact__right[_ngcontent-%COMP%]{flex-grow:2;min-height:350px;background-color:var(--disabled-tile);border-radius:20px;overflow:hidden;width:100%;display:grid}@media (min-width: 900px){.location-and-contact__right[_ngcontent-%COMP%]{min-height:100%}}.location-and-contact__info-tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:var(--disabled-tile);width:100%;padding:24px;gap:8px;border-radius:20px}@media (min-width: 900px){.location-and-contact__info-tile[_ngcontent-%COMP%]{width:330px}}.location-and-contact__info-tile[_ngcontent-%COMP%]   .description-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:4px}.location-and-contact__info-tile[_ngcontent-%COMP%]   .description-text[_ngcontent-%COMP%]{font-size:1rem;font-weight:400}.location-and-contact__info-tile[_ngcontent-%COMP%]   .store-hours__item[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:center}.location-and-contact__info-tile[_ngcontent-%COMP%]   .store-hours__item[_ngcontent-%COMP%]   .store-hours__days[_ngcontent-%COMP%]{font-weight:500}.location-and-contact__icon[_ngcontent-%COMP%]{width:24px;height:24px;color:var(--primary)}.location-and-contact__info-title[_ngcontent-%COMP%]{padding-top:.3rem;font-size:1.25rem;font-weight:600}"]}
728)}}return h})();var d_=(h,k)=>[h,k],$v=h=>[h],Gv=h=>({rotated:h}),Zv=h=>({visible:h}),Hv=h=>({today:h});function qv(h,k){h&1&&(I(0,"span",8),X(1,"Store Closed"),E())}function Wv(h,k){if(h&1&&X(0),h&2){let n=A().$implicit,c=A(3);Qn(" ",c.formatAMPM(n.openTime)," - ",c.formatAMPM(n.closeTime)," ")}}function Xv(h,k){if(h&1&&X(0),h&2){let n=A(4);Rt(" ",n.localizationService.getLocalizationString("modals.stores_map.closed")," ")}}function Kv(h,k){if(h&1&&(I(0,"div",20)(1,"div",21),X(2),E(),I(3,"div",17),ut(4,Wv,1,2)(5,Xv,1,1),E()()),h&2){let n=k.$implicit,c=k.$index;j("ngClass",me(3,Hv,!c)),w(2),St(n.day.slice(0,3)),w(2),rt(n.openTime&&n.closeTime?4:5)}}function Yv(h,k){if(h&1){let n=Yt();I(0,"button",14),Ot("click",function(){kt(n);let d=A().$index,a=A();return Et(a.openHoursDetails(d))}),it(1,"app-icon",10),I(2,"div",15)(3,"div",16),X(4),E(),it(5,"app-icon",10),I(6,"div",17),X(7),I(8,"span",18),it(9,"app-icon",10),E(),I(10,"div",19),le(11,Kv,6,5,"div",20,Ce),E()()()()}if(h&2){let n,c,d,a,z=A(),J=z.$implicit,yt=z.$index,ie=A();w(),j("name",ie.iconNameType.clock)("size","16px"),w(2),j("ngClass",(n=ie.openedHours(J))!=null&&n.openedState.closed?"closed":"opened"),w(),Rt(" ",!((c=ie.openedHours(J))==null||c.openedState==null)&&c.openedState.closed?"Closed":"Open"," "),w(),j("name",ie.iconNameType.dot)("size","4px"),w(2),Rt(" ",(d=ie.openedHours(J))!=null&&d.openedState.closed?(d=ie.openedHours(J))==null?null:d.openedState.openTime:(d=ie.openedHours(J))==null?null:d.openedState.closeTime," "),w(),j("ngClass",me(11,Gv,ie.openedDetailsIndex===yt)),w(),j("name",ie.iconNameType.triangle)("size","9px"),w(),j("ngClass",me(13,Zv,ie.openedDetailsIndex===yt)),w(),ce((a=ie.openedHours(J))==null?null:a.businessHours)}}function Qv(h,k){if(h&1&&(I(0,"div",1)(1,"div",2),it(2,"app-mapbox-map",3),E(),I(3,"div",4)(4,"div",5)(5,"div",6)(6,"span",7),X(7),E(),ut(8,qv,2,0,"span",8),E(),I(9,"div",9),it(10,"app-icon",10),I(11,"span",11),X(12),E()(),I(13,"div",12),it(14,"app-icon",10),X(15),E(),ut(16,Yv,13,15,"button",13),E()()()),h&2){let n,c,d,a,z=k.$implicit,J=A();w(2),j("center",en(17,d_,(n=z==null?null:z.lng)!==null&&n!==void 0?n:0,(n=z==null?null:z.lat)!==null&&n!==void 0?n:0))("markers",me(23,$v,en(20,d_,(c=z==null?null:z.lng)!==null&&c!==void 0?c:0,(c=z==null?null:z.lat)!==null&&c!==void 0?c:0)))("pitch",0)("pinsDisabled",!0)("zoom",12),w(5),Rt(" ",z==null?null:z.name," "),w(),rt(!((d=J.openedHours(z))==null||d.openedState==null)&&d.openedState.closed?8:-1),w(2),j("name",J.iconNameType.pin)("size","13.5px"),w(2),dc(" ",z.address,", ",z.city,", ",z.state," ",z.zip," "),w(2),j("name",J.iconNameType.phone)("size","16px"),w(),Rt("",J.storePhone(z)," "),w(),rt((a=J.openedHours(z))!=null&&a.businessHours?16:-1)}}var p_=(()=>{class h{constructor(n,c){this.platformId=n,this.componentConfig=c,this.brandConfigService=gt(Ee),this.storeHoursService=gt(Cc),this.localizationService=gt(un),this.iconNameType=ge,this.formatAMPM=wn,this.stores=this.brandConfigService?.brandConfig()?.stores,this.brandConfig=this.brandConfigService.brandConfig,this.todayIndexInTheWeek=new Date().getDay(),this.openedDetailsIndex=null,this.data=te(te({},os),this.componentConfig?.data)}storeAddress(n){if(n)return n?.address}storePhone(n){return Dr(n?.telephone??"")}openedHours(n){if(!n?.storeHours||!n?.storeHours.any||!n?.storeHours.any[this.todayIndexInTheWeek])return;let c=n.storeHours.any;return{openedState:this.findNextTimeOpen(c,this.todayIndexInTheWeek,n.timeZone),businessHours:this.reorderBusinessDays(c)}}findNextTimeOpen(n,c,d){let a=d??Ee.FALLBACK_TIME_ZONE,z=new Date(new Date().toLocaleString("en-US",{timeZone:a})),J=z.getDay(),yt=z.getHours();return n[c].closed?{closed:!0,openTime:`${this.findNextTimeOpen(n,n[c+1]?c+1:0,d).openTime}`}:J!==c?{closed:!0,openTime:`Opens at ${wn(n[c].openTime)}, ${n[c].day.slice(0,1).toUpperCase()}${n[c].day.slice(1,3)}`}:yt<parseInt(n[c].openTime??"")?{closed:!0,openTime:`Opens at ${wn(n[c].openTime)}`}:yt<parseInt(n[c].closeTime??"")?{closed:!1,closeTime:`Closes at ${wn(n[c].closeTime)}`}:{closed:!0,openTime:`${this.findNextTimeOpen(n,n[c+1]?c+1:0,d).openTime}`}}reorderBusinessDays(n){let c=[],d=JSON.parse(JSON.stringify(this.todayIndexInTheWeek));
728return n.forEach(()=>{c.push(n[d]),d=d===6?0:d+1}),c}openHoursDetails(n){this.openedDetailsIndex=this.openedDetailsIndex===n?null:n}static{this.\u0275fac=function(c){return new(c||h)(se(rn),se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-up-to-3-stores-location-and-contact"]],standalone:!0,features:[Kt],decls:3,vars:0,consts:[[1,"location-and-contact-wrapper"],[1,"location-and-contact-card"],[1,"location-and-contact-card-map"],[3,"center","markers","pitch","pinsDisabled","zoom"],[1,"location-and-contact-card-details"],[1,"store-info"],[1,"store-name"],[1,"store-name-label"],[1,"store-closed-label"],[1,"store-address-wrapper"],[3,"name","size"],[1,"store-address"],[1,"store-tel"],[1,"store-hours"],[1,"store-hours",3,"click"],[1,"opened_closed"],[3,"ngClass"],[1,"time"],[1,"drowdown-handler",3,"ngClass"],[1,"business-hours-dropdown",3,"ngClass"],[1,"business-hours-item",3,"ngClass"],[1,"day"]],template:function(c,d){if(c&1&&(I(0,"div",0),le(1,Qv,17,25,"div",1,Ce),E()),c&2){let a;w(),ce((a=d.brandConfig())==null?null:a.stores)}},dependencies:[Ae,rs,ve,Ye],styles:["[_nghost-%COMP%]{display:block;width:100%}.location-and-contact-wrapper[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1.25rem;justify-content:center}@media (max-width: 767px){.location-and-contact-wrapper[_ngcontent-%COMP%]{flex-direction:column;align-items:center;row-gap:1.5rem}}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:.25rem;padding-bottom:.5rem!important}@media (max-width: 767px){.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]{padding-bottom:1rem}}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:8px;width:1rem;vertical-align:middle;color:#6a6a6a}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-name[_ngcontent-%COMP%]{font-size:var(--font-size-lg);font-weight:var(--font-weight-bold);line-height:2rem;display:grid;grid-auto-flow:column;grid-auto-columns:auto 110px;column-gap:1rem;margin-bottom:.25rem}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-name[_ngcontent-%COMP%]   .store-name-label[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-name[_ngcontent-%COMP%]   .store-closed-label[_ngcontent-%COMP%]{background-color:#ebebeb;color:var(--text);font-weight:var(--font-weight-bold);font-size:var(--font-size-sm);padding:.25rem .5rem;border-radius:.938rem;vertical-align:top;width:6.875rem;line-height:1.313rem;height:1.813rem;box-sizing:border-box;margin-top:2px}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-address[_ngcontent-%COMP%]{font-size:var(--font-size-med);font-weight:var(--font-weight-medium);width:calc(100% - 1.5rem);display:inline-block}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-address-wrapper[_ngcontent-%COMP%]{line-height:1.5rem}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-address-wrapper[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{vertical-align:top;margin-top:.25rem}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-tel[_ngcontent-%COMP%]{font-size:var(--font-size-sm);font-weight:var(--font-weight-semi-bold);color:#6a6a6a;letter-spacing:.053rem;line-height:21px;display:flex}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]{font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);max-width:100%;display:flex;flex-wrap:nowrap;position:relative;background:none;padding:0}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .opened_closed[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;position:relative;min-width:16rem;justify-content:flex-start}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .opened_closed[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:0}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .opened_closed[_ngcontent-%COMP%]   .closed[_ngcontent-%COMP%]{color:var(--general-red)}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .opened_closed[_ngcontent-%COMP%]   .opened[_ngcontent-%COMP%]{color:var(--general-green)}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .opened_closed[_ngcontent-%COMP%]   .time[_ngcontent-%COMP%]{color:#6a6a6a;display:flex;justify-content:center;align-items:center;gap:.5rem}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .opened_closed[_ngcontent-%COMP%]   .drowdown-handler[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{transition:transform .3s ease;transform-origin:center;width:9px}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .opened_closed[_ngcontent-%COMP%]   .drowdown-handler.rotated[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]{position:absolute;top:22px;left:22px;width:15.188rem;background-color:var(--white);border-radius:8px;box-shadow:0 2px 4px #0000001a;z-index:10;display:flex;flex-direction:column;height:0;line-height:1.313rem;overflow:hidden;transition:height .3s ease-in-out}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .business-hours-dropdown.visible[_ngcontent-%COMP%]{height:10.188rem}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item[_ngcontent-%COMP%]{display:flex;padding:0rem 1.75rem;justify-content:space-between;font-size:var(--font-size-sm);color:#6a6a6a;font-weight:var(--font-weight-regular)}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item[_ngcontent-%COMP%]:first-child{margin-top:.5rem}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item[_ngcontent-%COMP%]:last-child{margin-bottom:.5rem}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item.today[_ngcontent-%COMP%]{font-weight:var(--font-weight-medium)}.location-and-contact-wrapper[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item[_ngcontent-%COMP%]   .day[_ngcontent-%COMP%]{text-transform:capitalize}.location-and-contact-card[_ngcontent-%COMP%]{border-radius:1rem;box-shadow:2.5px 5px 20px 5px #4545451a;background-color:var(--white);min-height:18.5rem;display:grid;grid-auto-flow:row;row-gap:.75rem;grid-auto-rows:10.125rem auto;width:330px}@media (max-width: 767px){.location-and-contact-card[_ngcontent-%COMP%]{width:300px}}.location-and-contact-card-map[_ngcontent-%COMP%]{border-top-left-radius:1rem;border-top-right-radius:1rem;overflow:hidden}
728.location-and-contact-card-details[_ngcontent-%COMP%]{padding:0 1.5rem}@media (max-width: 767px){.location-and-contact-card-details[_ngcontent-%COMP%]{padding:0 .75rem}}"]})}}return h})();var Jv=()=>["/","locations"],u_=(()=>{class h{constructor(n,c){this.platformId=n,this.componentConfig=c,this.brandConfigService=gt(Ee),this.layoutService=gt(pn),this.iconNameType=ge,this.stores=this.brandConfigService?.brandConfig()?.stores,this.data=te(te({},os),this.componentConfig?.data)}static{this.\u0275fac=function(c){return new(c||h)(se(rn),se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-more-than-3-stores-location-and-contact"]],standalone:!0,features:[Kt],decls:11,vars:5,consts:[[1,"location-and-contact-wrapper"],[1,"title"],[1,"subtitle"],[1,"button",3,"routerLink"],[1,"icon"],[3,"name","size"]],template:function(c,d){c&1&&(I(0,"div",0)(1,"h2",1),X(2," Serving You from "),it(3,"br"),X(4),E(),I(5,"div",2),X(6,"We have dine-in restaurants and carryout and delivery only locations, so before you settle on a location, make sure they accommodate what you\u2019re looking for!"),E(),I(7,"button",3),X(8," Find My Location "),I(9,"span",4),it(10,"app-icon",5),E()()()),c&2&&(w(4),Rt(" ",d.stores==null?null:d.stores.length," Locations Across the USA "),w(3),j("routerLink",Ii(4,Jv)),w(3),j("name",d.iconNameType.arrow)("size","14px"))},dependencies:[ve,Ae,Cf,Lr],styles:[".location-and-contact-wrapper[_ngcontent-%COMP%]{text-align:center}.location-and-contact-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:0;color:var(--text);text-align:center;font-size:2rem;font-style:normal;font-weight:var(--font-weight-semi-bold);line-height:3.25rem;letter-spacing:1.92px;text-transform:uppercase}@media (max-width: 767px){.location-and-contact-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{text-align:center;font-size:1.125rem;line-height:2.188rem;letter-spacing:1.08px}}@media screen and (min-width: 426px){.location-and-contact-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]   br[_ngcontent-%COMP%]{display:none}}.location-and-contact-wrapper[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{color:var(--grey);text-align:center;font-size:1rem;font-style:normal;font-weight:var(--font-weight-medium);line-height:1.75rem;margin-top:1rem;margin-bottom:1.5rem}@media (max-width: 767px){.location-and-contact-wrapper[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{font-size:var(--font-size-sm)}}.location-and-contact-wrapper[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{display:inline-flex;padding:.5rem .5rem .5rem 2rem;background-color:var(--primary-container);color:var(--primary-dark);border-radius:2rem;text-align:center;font-size:1rem;font-style:normal;font-weight:var(--font-weight-bold);line-height:2rem;transition:all .3s}.location-and-contact-wrapper[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover{background-color:var(--primary);color:#fff}.location-and-contact-wrapper[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{width:2rem;height:2rem;background:var(--white);border-radius:50%;line-height:2rem;text-align:center;margin-left:1rem;color:var(--primary)}.location-and-contact-wrapper[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{transform:rotate(-90deg);display:inline-flex;vertical-align:middle;margin-top:-2px;margin-right:-1px}"]})}}return h})();var t1=(h,k,n)=>({"option-1-layout":h,"option-2-layout":k,"option-3-layout":n});function e1(h,k){h&1&&it(0,"app-single-store-location-and-contact")}function n1(h,k){h&1&&it(0,"app-up-to-3-stores-location-and-contact")}function i1(h,k){if(h&1&&(I(0,"h2",1),X(1),E(),ut(2,e1,1,0,"app-single-store-location-and-contact")(3,n1,1,0,"app-up-to-3-stores-location-and-contact")),h&2){let n,c=A();w(),St(c.data.componentTitle.data),w(),rt(((n=c.brandConfig())==null||n.stores==null?null:n.stores.length)===1?2:3)}}function o1(h,k){h&1&&it(0,"app-more-than-3-stores-location-and-contact")}var h_=(()=>{class h{constructor(n,c){this.platformId=n,this.componentConfig=c,this.brandConfigService=gt(Ee),this.brandConfig=this.brandConfigService.brandConfig,this.stores=this.brandConfig()?.stores,this.data=te(te({},os),this.componentConfig?.data)}static{this.\u0275fac=function(c){return new(c||h)(se(rn),se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-location-and-contact"]],standalone:!0,features:[Kt],decls:3,vars:6,consts:[[1,"location-and-contact",3,"ngClass"],[1,"location-and-contact__title"]],template:function(c,d){if(c&1&&(I(0,"div",0),ut(1,i1,4,2)(2,o1,1,0,"app-more-than-3-stores-location-and-contact"),E()),c&2){let a;j("ngClass",zr(2,t1,d.stores.length===1,d.stores.length<=3&&d.stores.length>1,d.stores.length>3)),w(),rt(!((a=d.brandConfig())==null||a.stores==null)&&a.stores.length&&d.brandConfig().stores.length<=3?1:2)}},dependencies:[c_,p_,u_,ve,Ye],styles:[".location-and-contact[_ngcontent-%COMP%]{background-color:var(--white)}.location-and-contact.option-1-layout[_ngcontent-%COMP%]{padding:2rem 52px}@media (max-width: 767px){.location-and-contact.option-1-layout[_ngcontent-%COMP%]{padding:25px 24px}}.location-and-contact.option-1-layout[_ngcontent-%COMP%]   .location-and-contact__title[_ngcontent-%COMP%]{margin-bottom:2rem}@media (max-width: 767px){.location-and-contact.option-1-layout[_ngcontent-%COMP%]   .location-and-contact__title[_ngcontent-%COMP%]{margin-bottom:.5rem;font-size:1.5rem}}.location-and-contact.option-2-layout[_ngcontent-%COMP%]{padding:3.5rem 3.25rem}@media (max-width: 767px){.location-and-contact.option-2-layout[_ngcontent-%COMP%]{padding:2rem 3rem}}.location-and-contact.option-2-layout[_ngcontent-%COMP%]   .location-and-contact__title[_ngcontent-%COMP%]{margin-bottom:1.5rem;font-size:2rem}@media (max-width: 767px){.location-and-contact.option-2-layout[_ngcontent-%COMP%]   .location-and-contact__title[_ngcontent-%COMP%]{padding-left:0;font-size:1.5rem}}.location-and-contact.option-3-layout[_ngcontent-%COMP%]{padding:1.75rem calc(16px + (100% - 250px) / 987 * 50);display:flex;justify-content:center}@media (max-width: 767px){.location-and-contact.option-3-layout[_ngcontent-%COMP%]{padding:1rem calc(16px + (100% - 250px)/987px*50px)}}.location-and-contact__title[_ngcontent-%COMP%]{font-size:40px;font-weight:700;display:block;font-family:Caveat,sans-serif;padding-left:16px}@media (min-width: 900px){.location-and-contact__title[_ngcontent-%COMP%]{padding:0}}"]})}}return h})();var m_={layoutOption:{type:"string",data:"Option 2"},title:{type:"string",data:"Order More. Earn More. Enjoy More!"},description:{type:"string",data:"Sign up for our Rewards Program to start earning points every time you order. Redeem your points for exclusive rewards and exciting privileges!"},buttonText:{type:"string",data:"Explore Rewards"},textColor:{type:"string",data:"#ffffff"},backgroundImage:{type:"string",data:{url:"assets/images/default-theme-images/top-view-table-full-food_23-2149209253.avif",altText:"Loyalty Promo background image"},option:"Option 1"},backgroundColor:{type:"string",data:"rgb(127, 45, 21)",option:"Option 2"}};var r1=h=>({"image-overlay":h}),a1=()=>["/","rewards"];function s1(h,k){if(h&1&&it(0,"img",2),h&2){let n=A(2);j("ngSrc",n.data==null||n.data.backgroundImage==null||n.data.backgroundImage.data==null?null:n.data.backgroundImage.data.url),qt("alt",(n.data==null||n.data.backgroundImage==null||n.data.backgroundImage.data==null?null:n.data.backgroundImage.data.altText)||"")}}function l1(h,k){if(h&1&&(I(0,"div",1),ut(1,s1,1,2,"img",2),I(2,"div",3)(3,"h2",4),X(4),E(),it(5,"span",5),I(6,"button",6),it(7,"app-icon",7),X(8),E()()()),h&2){let n=A();ue("background-color",(n.data==null||n.data.backgroundColor==null?null:n.data.backgroundColor.data)||"var(--page-background)"),j("ngClass",me(11,r1,(n.data==null||n.data.backgroundImage==null?null:n.data.backgroundImage.data)&&(n.data==null||n.data.layoutOption==null?null:n.data.layoutOption.data)==="Option 1")),w(),rt(!(n.data==null||n.data.backgroundImage==null||n.data.backgroundImage.data==null)&&n.data.backgroundImage.data.url&&(n.data==null||n.data.layoutOption==null?null:n.data.layoutOption.data)==="Option 1"?1:-1),w(),ue("color",(n.data==null||n.data.textColor==null?null:n.data.textColor.data)||"var(--text)"),w(2),St(n.data==null||n.data.title==null?null:n.data.title.data),w(),j("innerHTML",n.data==null||n.data.description==null?null:n.data.description.data,Ti),w(),j("routerLink",Ii(13,a1)),w(),j("name",n.iconName.gift),w(),Rt(" ",n.data==null||n.data.buttonText==null?null:n.data.buttonText.data," ")}}var g_=(()=>{class h{constructor(n){this.componentConfig=n,this.merchantConfig=gt(Wn).merchantConfig,this.iconName=ge,this.loyaltyPlan=gt(Wn).configService.loyaltyState}ngOnInit(){this.data=te(te({},m_),this.componentConfig?.data)}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-loyalty-promo"]],standalone:!0,features:[Kt],decls:1,vars:1,consts:[[1,"loyalty-promo",3,"background-color","ngClass"],[1,"loyalty-promo",3,"ngClass"],["aria-hidden","true","fill","","sizes","100vw",1,"loyalty-promo__background-image",3,"ngSrc"],[1,"promo-content"],[1,"title"],[1,"description",3,"innerHTML"],[1,"button-accent","explore-rewards",3,"routerLink"],[3,"name"]],template:function(c,d){c&1&&ut(0,l1,9,14,"div",0),c&2&&rt(d.loyaltyPlan()?0:-1)},dependencies:[ve,Ye,mn,Ae,Lr],styles:['.loyalty-promo[_ngcontent-%COMP%]{min-height:420px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;position:relative;display:flex;justify-content:center;align-items:center;background-color:var(--white)}.loyalty-promo__background-image[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;z-index:0}.loyalty-promo.image-overlay[_ngcontent-%COMP%]:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:#0009;z-index:1}.loyalty-promo[_ngcontent-%COMP%]   .promo-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;max-width:850px;z-index:2;padding:48px 16px;color:var(--text)}@media (min-width: 768px){.loyalty-promo[_ngcontent-%COMP%]   .promo-content[_ngcontent-%COMP%]{padding:48px}}.loyalty-promo[_ngcontent-%COMP%]   .promo-content[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:700;margin-bottom:16px}@media (min-width: 768px){.loyalty-promo[_ngcontent-%COMP%]   .promo-content[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:2rem}}.loyalty-promo[_ngcontent-%COMP%]   .promo-content[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;margin-bottom:24px;line-height:normal}@media (min-width: 768px){.loyalty-promo[_ngcontent-%COMP%]   .promo-content[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%]{font-size:1.25rem}}.loyalty-promo[_ngcontent-%COMP%]   .promo-content[_ngcontent-%COMP%]   .explore-rewards[_ngcontent-%COMP%]{display:flex;gap:16px}']})}}return h})();var Tu={signUpTitle:{type:"string",data:"Sign Up For Our Newsletter"},signUpDescription:{type:"string",data:"Enter your mail to receive the latest news and to learn about our events."},successTitle:{type:"string",data:"You're Signed Up!"},successDescription:{type:"string",data:"Thanks for subscribing. We'll 
728keep you updated with the latest news and events."},image:{type:"image",data:{url:"assets/images/furnance.avif",altText:"Subscription promo image"}}};function c1(h,k){if(h&1&&(I(0,"span",15),it(1,"app-icon",16),X(2),E()),h&2){let n=A(3);j("id",n.emailErrorId),w(),j("name",n.iconName.error),w(),Rt(" ",n.validationMessages.email.required," ")}}function d1(h,k){if(h&1&&(I(0,"span",15),it(1,"app-icon",16),X(2),E()),h&2){let n=A(3);j("id",n.emailErrorId),w(),j("name",n.iconName.error),w(),Rt(" ",n.validationMessages.email.invalid," ")}}function p1(h,k){if(h&1&&ut(0,c1,3,3,"span",15)(1,d1,3,3,"span",15),h&2){let n=A(2);rt(n.email.hasError("required")?0:-1),w(),rt(n.email.hasError("email")?1:-1)}}function u1(h,k){if(h&1){let n=Yt();I(0,"div",10)(1,"label",11),X(2,"Email address"),E(),it(3,"input",12),I(4,"button",13),Ot("click",function(){kt(n);let d=A();return Et(d.handleSignup())}),X(5),E()(),I(6,"div",14),ut(7,p1,2,2),E()}if(h&2){let n=A();w(),j("for",n.emailInputId),w(2),j("id",n.emailInputId)("formControl",n.email)("placeholder",n.isMobile()?"Email":"Enter your email")("required",!0),qt("aria-invalid",n.showErrors&&n.email.invalid?"true":"false")("aria-describedby",n.showErrors&&n.email.invalid?n.emailErrorId:null),w(2),St(n.localizationService.getLocalizationString("shared_components.signing_forms.registration_form.sign_up_promo")),w(2),rt(n.showErrors&&n.email.invalid?7:-1)}}function h1(h,k){if(h&1&&it(0,"img",8),h&2){let n=A();j("src",n.inlinePromoImageUrl(),Se)("alt",n.promoImageAlt())}}function m1(h,k){if(h&1&&it(0,"img",9),h&2){let n=A();j("ngSrc",n.promoImageUrl())("alt",n.promoImageAlt())}}var f_=(()=>{class h{constructor(n){this.componentConfig=n,this.iconName=ge,this.subscriptionService=gt(wf),this.layoutService=gt(pn),this.localizationService=gt(un),this.sanitizer=gt(Zo),this.DATA_IMAGE_PATTERN=/^data:image\/(?:png|jpe?g|gif|webp|avif|bmp);base64,/i,this.emailInputId="subscriptions-promo-email",this.emailErrorId=`${this.emailInputId}-error`,this.signedUp=Te(!1),this.showErrors=!1,this.email=new Fi("",{nonNullable:!0,validators:[an.required,an.email]}),this.isMobile=Ut(()=>this.layoutService.viewport()==="mobile"),this.title=Ut(()=>this.signedUp()?this.data?.successTitle?.data:this.data?.signUpTitle?.data),this.description=Ut(()=>this.signedUp()?this.data?.successDescription?.data:this.data?.signUpDescription?.data),this.promoImageUrl=Ut(()=>{let c=this.data?.image?.data,d=c?.source?.trim(),a=c?.url?.trim();return(d&&this.DATA_IMAGE_PATTERN.test(d)?d:a||d)||Tu.image.data.url||"assets/images/furnance.avif"}),this.promoImageAlt=Ut(()=>this.data?.image?.data?.altText||Tu.image.data.altText||"Subscription promo image"),this.isInlinePromoImage=Ut(()=>this.DATA_IMAGE_PATTERN.test(this.promoImageUrl())),this.inlinePromoImageUrl=Ut(()=>this.sanitizer.bypassSecurityTrustUrl(this.promoImageUrl())),this.validationMessages={email:{required:"Email is required.",invalid:"Please enter a valid email."}},this.data=te(te({},Tu),this.componentConfig?.data)}handleSignup(){if(this.showErrors=!1,this.email.invalid){this.showErrors=!0,this.email.markAsTouched(),this.email.markAsDirty();return}this.subscriptionService.subscribeToOffers(this.email.value).subscribe({next:()=>this.signedUp.set(!0),error:()=>{this.showErrors=!0}})}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-subscriptions-promo"]],standalone:!0,features:[Kt],decls:13,vars:4,consts:[[1,"subscriptions-promo"],[1,"promo-container"],[1,"title"],[1,"description"],[1,"background-container"],["width","939","height","416","viewBox","0 0 939 416","preserveAspectRatio","none","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M54 31.871L47.5 25.5806L40.5 19.7097L32 13.4194L26.1557 9.33463C26.0521 9.26224 25.9419 9.19984 25.8266 9.14824L18.5 5.87097L0 0H939V416H267L283.5 407.613L301.329 396.398C301.443 396.326 301.549 396.243 301.646 396.151L314.089 384.253L335.103 368.196L348.612 360.533L365.123 350.681L383.635 341.558L405.65 333.53L427.664 327.326L452.681 319.663L470.193 313.095L488.205 305.796L507.218 294.849L521.463 283.743C521.638 283.607 521.789 283.442 521.91 283.255L530.595 269.884C530.687 269.742 530.761 269.589 530.814 269.429L535.634 255.018C535.702 254.813 535.737 254.599 535.737 254.383V242.347C535.737 242.076 535.682 241.809 535.575 241.56L530.832 230.491C530.767 230.337 530.682 230.193 530.58 230.06L523.874 221.326C523.778 221.2 523.666 221.087 523.543 220.987L514.506 213.702C514.318 213.551 514.105 213.435 513.876 213.36L498.712 208.365L473.376 203.655C473.256 203.632 473.133 203.621 473.011 203.621H447.178L425.163 205.081H405.65H383.812C383.694 205.081 383.577 205.07 383.461 205.05L363.304 201.464C363.182 201.442 363.063 201.41 362.948 201.366L348.849 196.048C348.691 195.988 348.542 195.909 348.404 195.812L334.375 185.933C334.194 185.805 334.036 185.649 333.906 185.47L324.596 172.604L315.089 159.467L306.083 147.425L297.577 136.477L288.17 125.644C288.104 125.568 288.033 125.497 287.956 125.432L279.065 117.867L273.252 111.861C273.125 111.73 272.981 111.
728616 272.823 111.524L260.553 104.365L245.543 96.7017L230.032 90.8632L214.021 86.1193L184.001 79.5509L161.987 75.1719L145.476 71.1579L126.463 67.5088L106.45 62.0351L88.4375 55.1018L74.6443 48.6347C74.5007 48.5674 74.3655 48.4832 74.2418 48.3839L61.5 38.1613L54 31.871Z","fill","#f0f0f0"],[1,"image-container"],["loading","lazy","width","400","height","300",1,"promo-image",3,"src","alt"],["loading","lazy","width","400","height","300",1,"promo-image",3,"ngSrc","alt"],[1,"sign-up-input-container"],[1,"visually-hidden",3,"for"],["type","email","autocomplete","email","name","email",1,"input-field",3,"id","formControl","placeholder","required"],["type","button",1,"button-accent","sign-up",3,"click"],[1,"errors-wrapper"],["role","alert",1,"input-error",3,"id"],[1,"icon",3,"name"]],template:function(c,d){c&1&&(I(0,"div",0)(1,"div",1)(2,"h2",2),X(3),E(),I(4,"span",3),X(5),E(),ut(6,u1,8,9),E(),I(7,"div",4),ac(),I(8,"svg",5),it(9,"path",6),E()(),lf(),I(10,"div",7),ut(11,h1,1,2,"img",8)(12,m1,1,2,"img",9),E()()),c&2&&(w(3),St(d.title()),w(2),St(d.description()),w(),rt(d.signedUp()?-1:6),w(5),rt(d.isInlinePromoImage()?11:12))},dependencies:[lo,Pf,Hi,jr,mn,Ae,Ho,Of],styles:[".subscriptions-promo[_ngcontent-%COMP%]{display:flex;position:relative;background-color:#fff;padding:24px 52px;min-height:318.53px}@media (min-width: 769px){.subscriptions-promo[_ngcontent-%COMP%]{justify-content:space-between;min-height:416px}}@media (max-width: 768px){.subscriptions-promo[_ngcontent-%COMP%]{flex-direction:column;align-items:center;gap:8px}}.subscriptions-promo[_ngcontent-%COMP%]   .promo-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:start;color:var(--text);z-index:2;gap:8px}@media (max-width: 768px){.subscriptions-promo[_ngcontent-%COMP%]   .promo-container[_ngcontent-%COMP%]{order:1;text-align:center;align-items:center}}.subscriptions-promo[_ngcontent-%COMP%]   .promo-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:0;font-size:1.75rem;font-weight:700;font-family:Caveat,sans-serif}@media (max-width: 767px){.subscriptions-promo[_ngcontent-%COMP%]   .promo-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:var(--font-size-lg)}}.subscriptions-promo[_ngcontent-%COMP%]   .promo-container[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%]{font-size:1rem;font-weight:500;line-height:normal}@media (max-width: 767px){.subscriptions-promo[_ngcontent-%COMP%]   .promo-container[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%]{font-size:var(--font-size-sm)}}.subscriptions-promo[_ngcontent-%COMP%]   .promo-container[_ngcontent-%COMP%]   .sign-up-input-container[_ngcontent-%COMP%]{display:flex;margin-top:1rem;width:100%;color:var(--text-unselected)}.subscriptions-promo[_ngcontent-%COMP%]   .promo-container[_ngcontent-%COMP%]   .sign-up-input-container[_ngcontent-%COMP%]   .input-field[_ngcontent-%COMP%]{border-radius:100px 0 0 100px;width:100%;padding-right:30px;font-size:var(--font-size-med)}@media (max-width: 1024px){.subscriptions-promo[_ngcontent-%COMP%]   .promo-container[_ngcontent-%COMP%]   .sign-up-input-container[_ngcontent-%COMP%]   .input-field[_ngcontent-%COMP%]{font-size:.875rem}}.subscriptions-promo[_ngcontent-%COMP%]   .promo-container[_ngcontent-%COMP%]   .sign-up-input-container[_ngcontent-%COMP%]   .input-field[_ngcontent-%COMP%]:focus{border:none;background-color:var(--grey-background)}.subscriptions-promo[_ngcontent-%COMP%]   .promo-container[_ngcontent-%COMP%]   .sign-up-input-container[_ngcontent-%COMP%]   .input-field[_ngcontent-%COMP%]::placeholder{font-size:1rem;font-weight:400;line-height:1.25rem;color:var(--grey)}@media (max-width: 1024px){.subscriptions-promo[_ngcontent-%COMP%]   .promo-container[_ngcontent-%COMP%]   .sign-up-input-container[_ngcontent-%COMP%]   .input-field[_ngcontent-%COMP%]::placeholder{font-size:.875rem}}.subscriptions-promo[_ngcontent-%COMP%]   .promo-container[_ngcontent-%COMP%]   .sign-up-input-container[_ngcontent-%COMP%]   .sign-up[_ngcontent-%COMP%]{margin-left:-30px}@media (max-width: 1024px){.subscriptions-promo[_ngcontent-%COMP%]   .promo-container[_ngcontent-%COMP%]   .sign-up-input-container[_ngcontent-%COMP%]   .sign-up[_ngcontent-%COMP%]{font-size:.875rem;padding:10px 30px}}.subscriptions-promo[_ngcontent-%COMP%]   .promo-container[_ngcontent-%COMP%]   .visually-hidden[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.subscriptions-promo[_ngcontent-%COMP%]   .image-container[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;min-height:100%;z-index:2;padding-right:0;justify-content:center}@media (min-width: 769px){.subscriptions-promo[_ngcontent-%COMP%]   .image-container[_ngcontent-%COMP%]{justify-content:end}}@media (min-width: 900px){.subscriptions-promo[_ngcontent-%COMP%]   .image-container[_ngcontent-%COMP%]{padding-right:100px}}@media (min-width: 1248px){.subscriptions-promo[_ngcontent-%COMP%]   .image-container[_ngcontent-%COMP%]{padding-right:200px}}.subscriptions-promo[_ngcontent-%COMP%]   .image-container[_ngcontent-%COMP%]   .promo-image[_ngcontent-%COMP%]{max-width:141px;height:105px;width:100%}@media (min-width: 769px){.subscriptions-promo[_ngcontent-%COMP%]   .image-container[_ngcontent-%COMP%]   .promo-image[_ngcontent-%COMP%]{max-width:270px;height:203px}}@media (min-width: 1024px){.subscriptions-promo[_ngcontent-%COMP%]   .image-container[_ngcontent-%COMP%]   .promo-image[_ngcontent-%COMP%]{max-width:342px;height:256px}}.subscriptions-promo[_ngcontent-%COMP%]   .background-container[_ngcontent-%COMP%]{width:1172px;bottom:-1px;position:absolute;max-width:calc(100% - 22rem);top:0;right:0;display:flex;justify-content:end}@media (max-width: 768px){.subscriptions-promo[_ngcontent-%COMP%]   .background-container[_ngcontent-%COMP%]{display:none}}.subscriptions-promo[_ngcontent-%COMP%]   .background-container[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{height:100%}.subscriptions-promo[_ngcontent-%COMP%]   .vector-behind-image[_ngcontent-%COMP%]{display:flex;min-height:100%}"]})}}return h})();var __=(()=>{class h{constructor(){this.swipeLeft=new Kn,this.swipeRight=new Kn,this.startX=0,this.threshold=40}onPointerDown(n){this.startX=n.clientX}onPointerUp(n){let c=n.clientX-this.startX;Math.abs(c)>this.threshold&&(c>0?this.swipeRight.emit():this.swipeLeft.emit()),this.reset()}reset(){this.startX=0}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275dir=ha({type:h,selectors:[["","appSwipeX",""]],hostBindings:function(c,d){c&1&&Ot("pointerdown",function(z){return d.onPointerDown(z)})("pointerup",function(z){return d.onPointerUp(z)})("pointercancel",function(){return d.reset()})("pointerleave",function(){return d.reset()})},outputs:{swipeLeft:"swipeLeft",swipeRight:"swipeRight"},standalone:!0})}}return h})();var y_={layoutOption:{type:"string",data:"Option 1"},title:{type:"text",data:"What people say about us"}};var g1=h=>({index:h,selected:!0}),f1=h=>({comment:h,position:"prev"}),_1=h=>({comment:h,position:""}),y1=h=>({comment:h,position:"next"}),x_=h=>({"option-2":h}),x1=(h,k,n)=>({center:h,previous:k,next:n}),v_=()=>[],v1=(h,k)=>({active:h,filled:k}),b1=(h,k,n,c,d,a)=>({prev:h,next:k,"static-state":n,"single-state":c,"from-left":d,"from-right":a}),C1=h=>({filled:h});function w1(h,k){if(h&1&&(I(0,"button",6)(1,"div",8),it(2,"app-icon",9),E(),I(3,"span",10),X(4),E(),I(5,"div",11),it(6,"app-icon",9),E()()),h&2){let n=A(2);w(2),j("name",n.iconName.doubleQuotes)("size",n.layoutService.viewport()==="mobile"?"36px":"51px"),w(2),St(n.localizationService.getLocalizationString("featured_components.no_comments")),w(2),j("name",n.iconName.doubleQuotes)("size",n.layoutService.viewport()==="mobile"?"36px":"51px")}}function M1(h,k){if(h&1&&(I(0,"div",7),it(1,"app-icon",12),I(2,"span",10),X(3),E()()),h&2){let n=A(2);w(),j("name",n.iconName.doubleQuotes),w(2),St(n.localizationService.getLocalizationString("featured_components.no_comments"))}}function P1(h,k){if(h&1&&(I(0,"div",4),ut(1,w1,7,5,"button",6)(2,M1,4,2,"div",7),E()),h&2){let n=A();w(),rt(n.data.layoutOption.data==="Option 2"?1:2)}}function O1(h,k){if(h&1&&vi(0,14),h&2){let n=k.$index;A(3);let c=Yn(7);j("ngTemplateOutlet",c)("ngTemplateOutletContext",me(2,g1,n))}}function S1(h,k){if(h&1&&(I(0,"div",4),le(1,O1,1,4,"ng-container",14,Ce),E()),h&2){let n=A(2);w(),ce(n.featuredComments())}}function T1(h,k){if(h&1&&vi(0,14),h&2){let n=k.$implicit;A(3);let c=Yn(9);j("ngTemplateOutlet",c)("ngTemplateOutletContext",me(2,f1,n))}}function I1(h,k){if(h&1&&vi(0,14),h&2){let n=k.$implicit;A(3);let c=Yn(9);j("ngTemplateOutlet",c)("ngTemplateOutletContext",me(2,_1,n))}}function k1(h,k){if(h&1&&vi(0,14),h&2){let n=k.$implicit;A(3);let c=Yn(9);j("ngTemplateOutlet",c)("ngTemplateOutletContext",me(2,y1,n))}}function E1(h,k){if(h&1&&(I(0,"div",4),le(1,T1,1,4,"ng-container",14,Ce),le(3,I1,1,4,"ng-container",14,Ce),le(5,k1,1,4,"ng-container",14,Ce),E()),h&2){let n=A(2);w(),ce(n.getPreviousCardStack),w(2),ce(n.featuredComments().slice(n.bulletIndex*2,n.bulletIndex*2+2)),w(2),ce(n.getNextCardStack)}}function z1(h,k){if(h&1){let n=Yt();I(0,"div",13)(1,"button",15),Ot("click",function(){kt(n);let d=A(2);return Et(d.scrollLeft())}),it(2,"app-icon",16),E(),I(3,"button",17),Ot("click",function(){kt(n);let d=A(2);return Et(d.scrollRight())}),it(4,"app-icon",16),E()()}if(h&2){let n=A(2);j("ngClass",me(3,x_,n.data.layoutOption.data==="Option 2")),w(2),j("name",n.iconName.arrow),w(2),j("name",n.iconName.arrow)}}function A1(h,k){if(h&1&&ut(0,S1,3,0,"div",4)(1,E1,7,0,"div",4)(2,z1,5,5,"div",13),h&2){let n=A();rt(n.data.layoutOption.data==="Option 1"?0:n.data.layoutOption.data==="Option 2"?1:-1),w(2),rt(n.hasMultipleFeaturedCommentPages()?2:-1)}}function L1(h,k){if(h&1&&(I(0,"div",5)(1,"a",18),X(2),E()()),h&2){let n=A();j("ngClass",me(3,x_,n.data.layoutOption.data==="Option 2")),w(),j("href",n.getFeedbackUrl(),Se),w(),Rt(" ",n.localizationService.getLocalizationString("featured_components.tell_us_what_you_think")," ")}}function D1(h,k){if(h&1&&it(0,"app-icon",21),h&2){let n=k.$index,c=A().index,d=A();j("name",d.iconName.star)("ngClass",en(2,v1,c===d.currentIndex,n<d.Math.floor(d.featuredComments()[c].rating)))}}function F1(h,k){if(h&1){let n=Yt();I(0,"button",19),Ot("click",function(){let d=kt(n).index,a=A();return Et(a.handleCardClick(d))}),it(1,"app-icon",12),I(2,"span",10),X(3),E(),I(4,"div",20),le(5,D1,1,5,"app-icon",21,Ce),E(),I(7,"span",22),X(8),E()()}if(h&2){let n=k.index,c=A();j("ngClass",zr(5,x1,n===c.currentIndex,c.hasMultipleFeaturedComments()&&(c.currentIndex===0?n===c.featuredComments().length-1:n===c.currentIndex-1),c.hasMultipleFeaturedComments()&&(c.currentIndex===c.featuredComments().length-1?n===0:n===c.currentIndex+1))),w(),j("name",c.iconName.doubleQuotes),w(2),St(c.featuredComments()[n].text),w(),qt("aria-label","Rating: "+c.featuredComments()[n].rating+" out of 5"),w(),ce(Ii(9,v_).constructor(5)),w(3),St(c.featuredComments()[n].name)}}function R1(h,k){if(h&1&&it(0,"app-icon",21),h&2){let n=k.$index,c=A().comment,d=A();j("name",d.iconName.star)("ngClass",me(2,C1,n<d.Math.floor(c.rating)))}}function B1(h,k){if(h&1&&(I(0,"button",23)(1,"div",8),it(2,"app-icon",9),E(),I(3,"span",10),X(4),E(),I(5,"div",20),le(6,R1,1,4,"app-icon",21,Ce),E(),I(8,"span",22),X(9),E(),I(10,"div",11),it(11,"app-icon",9),E()()),h&2){let n=k.comment,c=k.position,d=A();j("ngClass",gf(8,b1,d.hasMultipleFeaturedCommentPages()&&c==="prev",d.hasMultipleFeaturedCommentPages()&&c==="next",!d.hasMultipleFeaturedCommentPages(),!d.hasMultipleFeaturedComments(),d.hasMultipleFeaturedCommentPages()&&d.animationApproach==="from-left",d.hasMultipleFeaturedCommentPages()&&d.animationApproach==="from-right")),w(2),j("name",d.iconName.doubleQuotes)("size",d.layoutService.viewport()==="mobile"?"36px":"51px"),w(2),St(n.text),w(),qt("aria-label","Rating: "+n.rating+" out of 5"),w(),ce(Ii(15,v_).constructor(5)),w(3),St(n.name),w(2),j("name",d.iconName.doubleQuotes)("size",d.layoutService.viewport()==="mobile"?"36px":"51px")}}var b_=(()=>{class h{constructor(n){this.componentConfig=n,this.featuredComments=gt(Ee).featuredComments,this.layoutService=gt(pn),this.storeData=gt(Ee).storeData,this.localizationService=gt(un),this.Math=Math,this.iconName=ge,this.singleStore=gt(Ee).singleStore,this.brandConfig=gt(Ee).brandConfig,this.hasMultipleFeaturedComments=Ut(()=>this.featuredComments().length>1),this.currentIndex=0,this.numberOfBullets=Ut(()=>this.data.layoutOption.data==="Option 1"?this.featuredComments().length>5?5:this.featuredComments().length:this.Math.ceil(this.featuredComments().length/2)),this.hasMultipleFeaturedCommentPages=Ut(()=>this.numberOfBullets()>1),this.lastNavigationIndex=Ut(()=>this.data.layoutOption.data==="Option 2"?Math.max(this.numberOfBullets()-1,0):Math.max(this.featuredComments().length-1,0)),this.bulletIndex=0,this.animationApproach="",this.data=te(te({},y_),this.componentConfig?.data)}scrollLeft(){this.animationApproach="from-left",setTimeout(()=>{this.currentIndex===0?this.currentIndex=this.lastNavigationIndex():this.currentIndex--,this.setBulletIndex(),this.animationApproach=""},1)}scrollRight(){this.animationApproach="from-right",setTimeout(()=>{this.currentIndex===this.lastNavigationIndex()?this.currentIndex=0:this.currentIndex++,this.setBulletIndex(),this.animationApproach=""},1)}setBulletIndex(){if(this.data.layoutOption.data==="Option 2"){this.bulletIndex=this.currentIndex;return}this.featuredComments().length>5?this.bulletIndex=this.currentIndex%5:this.bulletIndex=this.currentIndex}handleCardClick(n){if(n!==this.currentIndex){if(this.currentIndex===0?n===this.featuredComments().length-1:n===this.currentIndex-1){this.scrollLeft();return}if(this.currentIndex===this.featuredComments().length-1?n===0:n===this.currentIndex+1){this.scrollRight();return}}}get getPreviousCardStack(){return this.hasMultipleFeaturedCommentPages()?this.bulletIndex?this.featuredComments().slice((this.bulletIndex-1)*2,(this.bulletIndex-1)*2+2):this.featuredComments().slice(-2):[]}get getNextCardStack(){return this.hasMultipleFeaturedCommentPages()?this.bulletIndex+1<this.numberOfBullets()?this.featuredComments().slice((this.bulletIndex+1)*2,(this.bulletIndex+1)*2+2):this.featuredComments().slice(0,2):[]}getFeedbackUrl(){let n=this.storeData()?.baseUrl;return n?this.storeData()?.isCloudWeb?`${n.replace(/^https:\/\/([^.]+)\.foodtecsolutions\.com$/,"https://order.foodtecsolutions.
728com/ordering/$1")}/questionnaire?type=Feedback`:`${n}/ordering/questionnaire?type=Feedback`:null}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-featured-comments"]],standalone:!0,features:[Kt],decls:10,vars:4,consts:[["commentCardRef",""],["commentColumnRef",""],["appSwipeX","",1,"featured-comments-section",3,"ngClass"],[1,"section-title"],[1,"featured-comments"],[1,"feedback-link-container",3,"ngClass"],["type","button",1,"button-undecorated","featured-comment-column","empty-state"],[1,"button-undecorated","featured-comment-card","center"],[1,"double-quotes"],[3,"name","size"],[1,"comment-text"],[1,"double-quotes","reversed"],[1,"double-quotes",3,"name"],[1,"navigator",3,"ngClass"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button","aria-label","Previous award",1,"arrow-left","left",3,"click"],[1,"icon",3,"name"],["type","button","aria-label","Next award",1,"arrow-right","right",3,"click"],["rel","noopener noreferrer",1,"feedback-button",3,"href"],[1,"button-undecorated","featured-comment-card",3,"click","ngClass"],[1,"star-rating"],[1,"star-icon",3,"name","ngClass"],[1,"name"],[1,"button-undecorated","featured-comment-column",3,"ngClass"]],template:function(c,d){c&1&&(I(0,"div",2)(1,"h2",3),X(2),E(),ut(3,P1,3,1,"div",4)(4,A1,3,2)(5,L1,3,5,"div",5),E(),ut(6,F1,9,10,"ng-template",null,0,ki)(8,B1,12,16,"ng-template",null,1,ki)),c&2&&(j("ngClass",d.data.layoutOption.data.toLowerCase().replace(" ","-")+"-layout"),w(2),Rt(" ",d.data.title.data," "),w(),rt(d.featuredComments().length===0?3:4),w(2),rt(d.singleStore()?5:-1))},dependencies:[ve,Ye,Ar,Ae,__],styles:['.featured-comments-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px;padding:2rem;background-color:var(--white);justify-content:center;align-items:center;touch-action:pan-y;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.featured-comments-section[_ngcontent-%COMP%]   .section-title[_ngcontent-%COMP%]{margin-bottom:0;font-size:40px;font-weight:700;font-family:Caveat,"sans-serif";text-transform:capitalize}@media (max-width: 767px){.featured-comments-section[_ngcontent-%COMP%]   .section-title[_ngcontent-%COMP%]{font-size:var(--font-size-xl)}}.featured-comments-section[_ngcontent-%COMP%]   .bullets-container[_ngcontent-%COMP%]{display:flex;gap:4px;height:13px;justify-content:center;align-items:center}.featured-comments-section[_ngcontent-%COMP%]   .bullets-container[_ngcontent-%COMP%]   .bullet[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:100%;background-color:#d9d9d9;transition:all .3s ease-in-out}.featured-comments-section[_ngcontent-%COMP%]   .bullets-container[_ngcontent-%COMP%]   .bullet.active[_ngcontent-%COMP%]{width:13px;height:13px;background-color:var(--primary)}.featured-comments[_ngcontent-%COMP%]{height:241px;position:relative}@media (min-width: 768px){.featured-comments[_ngcontent-%COMP%]{height:387px}}.navigator[_ngcontent-%COMP%]{margin-top:1.25rem;display:flex;width:100%;align-items:center;justify-content:center;gap:13px}.navigator.option-2[_ngcontent-%COMP%]{margin-top:0}.arrow-left[_ngcontent-%COMP%], .arrow-right[_ngcontent-%COMP%]{width:34px;height:34px;border:none;border-radius:50%;background:var(--page-background);color:var(--primary);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .3s linear}.arrow-left[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%], .arrow-right[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{display:flex;min-width:11px}.arrow-left.left[_ngcontent-%COMP%], .arrow-right.left[_ngcontent-%COMP%]{left:10px}.arrow-left.left[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%], .arrow-right.left[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{transform:rotate(90deg)}.arrow-left.right[_ngcontent-%COMP%], .arrow-right.right[_ngcontent-%COMP%]{right:10px}.arrow-left.right[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%], .arrow-right.right[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{transform:rotate(270deg)}.arrow-left[_ngcontent-%COMP%]:hover, .arrow-right[_ngcontent-%COMP%]:hover{box-shadow:inset 0 2px 4px #00000026}.arrow-left.disable-animation[_ngcontent-%COMP%], .arrow-right.disable-animation[_ngcontent-%COMP%]{transition:none}.feedback-link-container[_ngcontent-%COMP%]{display:flex;justify-content:center}.feedback-link-container.option-2[_ngcontent-%COMP%]{margin-top:2rem}.feedback-link-container[_ngcontent-%COMP%]   .feedback-button[_ngcontent-%COMP%]{background-color:transparent;color:var(--primary);cursor:pointer;font-size:var(--font-size-med);font-weight:var(--font-weight-medium);text-decoration:underline}.featured-comment-card[_ngcontent-%COMP%]{width:177px;height:241px;padding:1rem;border-radius:10.32px;background-color:var(--page-background);color:var(--text);position:absolute;
728left:50%;top:50%;transform:translate(-50%,-50%);transition:all .5s ease-in-out;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center}@media (min-width: 768px){.featured-comment-card[_ngcontent-%COMP%]{width:300px;height:387px;padding:1.61rem;gap:12.5px}}.featured-comment-card.center[_ngcontent-%COMP%]{background-color:var(--primary);color:var(--primary-inverse);z-index:2}.featured-comment-card.previous[_ngcontent-%COMP%]{height:200px;z-index:1;transform:translate(-90%,-50%)}@media (min-width: 768px){.featured-comment-card.previous[_ngcontent-%COMP%]{height:341px;width:264px;transform:translate(-130%,-50%)}}.featured-comment-card.next[_ngcontent-%COMP%]{height:200px;z-index:1;transform:translate(-10%,-50%)}@media (min-width: 768px){.featured-comment-card.next[_ngcontent-%COMP%]{height:341px;width:264px;transform:translate(30%,-50%)}}.featured-comment-card[_ngcontent-%COMP%]   .double-quotes[_ngcontent-%COMP%]{width:51.6px;height:51.6px;max-width:32px;opacity:.4}@media (min-width: 768px){.featured-comment-card[_ngcontent-%COMP%]   .double-quotes[_ngcontent-%COMP%]{max-width:51.6px}}.featured-comment-card[_ngcontent-%COMP%]   .comment-text[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden}@media (min-width: 768px){.featured-comment-card[_ngcontent-%COMP%]   .comment-text[_ngcontent-%COMP%]{font-size:1rem;-webkit-line-clamp:10}}.featured-comment-card[_ngcontent-%COMP%]   .star-rating[_ngcontent-%COMP%]{display:flex;gap:4px}.featured-comment-card[_ngcontent-%COMP%]   .star-rating[_ngcontent-%COMP%]   .star-icon[_ngcontent-%COMP%]{width:24px;height:24px;color:var(--primary);opacity:.1;max-width:20px}@media (min-width: 768px){.featured-comment-card[_ngcontent-%COMP%]   .star-rating[_ngcontent-%COMP%]   .star-icon[_ngcontent-%COMP%]{max-width:24px}}.featured-comment-card[_ngcontent-%COMP%]   .star-rating[_ngcontent-%COMP%]   .star-icon.active[_ngcontent-%COMP%]{color:var(--primary-inverse)}.featured-comment-card[_ngcontent-%COMP%]   .star-rating[_ngcontent-%COMP%]   .star-icon.filled[_ngcontent-%COMP%]{opacity:1}.featured-comment-card[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-size:.75rem;font-weight:400}@media (min-width: 768px){.featured-comment-card[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-size:1rem}}.option-2-layout[_ngcontent-%COMP%]{padding:3rem 0 4.75rem;gap:0}@media (max-width: 767px){.option-2-layout[_ngcontent-%COMP%]{padding:2rem 0;gap:0}}.option-2-layout[_ngcontent-%COMP%]   .section-title[_ngcontent-%COMP%]{margin-bottom:3.375rem;font-size:2rem;text-transform:capitalize}@media (max-width: 767px){.option-2-layout[_ngcontent-%COMP%]   .section-title[_ngcontent-%COMP%]{margin-bottom:2.125rem;font-size:var(--font-size-xl)}}.option-2-layout[_ngcontent-%COMP%]   .featured-comments[_ngcontent-%COMP%]{overflow:hidden;display:flex;width:51.719rem;max-width:100%;height:19rem;flex-wrap:nowrap;column-gap:2rem;margin-bottom:3.125rem}@media (max-width: 767px){.option-2-layout[_ngcontent-%COMP%]   .featured-comments[_ngcontent-%COMP%]{width:100%;column-gap:1rem;padding:0 1rem;margin-bottom:2.5rem}}.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column[_ngcontent-%COMP%]{position:relative;width:calc(50% - 1rem);min-width:calc(50% - 1rem);transform:translate(calc(-200% - 4rem));display:flex;justify-content:center;align-items:center;row-gap:1.5rem;flex-direction:column;border:5.5px var(--primary) solid;border-radius:1.5rem;height:19rem;padding:0 2.25rem}@media (max-width: 767px){.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column[_ngcontent-%COMP%]{width:calc(50% - .5rem);min-width:calc(50% - .5rem);transform:translate(calc(-200% - 2rem));padding:0 1.313rem;row-gap:1rem}}.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column.from-left[_ngcontent-%COMP%]{transform:translate(0)}.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column.from-right[_ngcontent-%COMP%]{transform:translate(calc(-400% - 8rem))}@media (max-width: 767px){.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column.from-right[_ngcontent-%COMP%]{transform:translate(calc(-400% - 4rem))}}.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column.empty-state[_ngcontent-%COMP%]{transform:none;margin:0 auto}.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column.static-state[_ngcontent-%COMP%]{transform:none}.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column.single-state[_ngcontent-%COMP%]{margin:0 auto}.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column[_ngcontent-%COMP%]   .double-quotes[_ngcontent-%COMP%]{color:var(--primary);position:absolute;
728left:-6px;top:-6px;padding-bottom:.25rem;padding-right:.25rem;background-color:var(--white)}.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column[_ngcontent-%COMP%]   .double-quotes.reversed[_ngcontent-%COMP%]{inset:auto -6px -6px auto;transform:rotate(180deg)}.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column[_ngcontent-%COMP%]   .comment-text[_ngcontent-%COMP%]{font-weight:var(--font-weight-medium);color:var(--text);line-height:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:8;overflow:hidden}@media (max-width: 767px){.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column[_ngcontent-%COMP%]   .comment-text[_ngcontent-%COMP%]{font-size:var(--font-size-med)}}.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column[_ngcontent-%COMP%]   .star-rating[_ngcontent-%COMP%]{display:flex;column-gap:4px}.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column[_ngcontent-%COMP%]   .star-rating[_ngcontent-%COMP%]   .star-icon[_ngcontent-%COMP%]{width:24px;height:24px;color:var(--primary);opacity:.1;max-width:20px}@media (min-width: 768px){.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column[_ngcontent-%COMP%]   .star-rating[_ngcontent-%COMP%]   .star-icon[_ngcontent-%COMP%]{max-width:24px}}.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column[_ngcontent-%COMP%]   .star-rating[_ngcontent-%COMP%]   .star-icon.active[_ngcontent-%COMP%]{color:var(--primary-inverse)}.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column[_ngcontent-%COMP%]   .star-rating[_ngcontent-%COMP%]   .star-icon.filled[_ngcontent-%COMP%]{opacity:1}.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-size:var(--font-size-med);font-weight:var(--font-weight-regular)}@media (max-width: 767px){.option-2-layout[_ngcontent-%COMP%]   .featured-comment-column[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-size:var(--font-size-sm)}}']})}}return h})();var Gr={layoutOption:{type:"string",data:"Option 1"},image:{type:"image",data:{url:"assets/images/default-theme-images/chef-taking-pizza-out-woodburning-oven-old-cafe-city-center-small-local-business%201.png",altText:"Chef cooking in a professional kitchen"}},title:{type:"string",data:"About [merchant Name]"},description:{type:"string",data:`Located at [address] in [city], [merchant Name] proudly serves the local community with a variety of freshly prepared menu favorites. Whether you're looking for [order types], our team is committed to providing quality food and friendly service for every guest.
729
730    Our menu features a selection of [tabs Name] and other customer favorites, offering something for every appetite. Visit us for a convenient dining experience or place an order to enjoy your meal wherever you are.`},textColor:{type:"string",data:"#212529"},infoTiles:{type:"array",objectInputType:[{key:"icon",inputType:"select",options:["persons","pizza","salad","plateAndTools","burger"],type:{type:"string",data:"persons"}},{key:"title",type:{type:"string",data:"Delicious Pizzas"}},{key:"description",type:{type:"string",data:"Our pizzas are made daily with fresh dough and top-quality, fresh ingredients."}}],option:"Option 1",data:[{icon:"persons",title:"Family-owned restaurant",description:"We\u2019re a family-owned-and-operated restaurant that opened in 1984."},{icon:"pizza",title:"Delicious Pizzas",description:"Our pizzas are made daily with fresh dough and top-quality, fresh ingredients."},{icon:"salad",title:"Our Famous Greek Salads",description:"Eat a delicious and filling Greek salad from our restaurant."}]},cardTiles:{type:"array",objectInputType:[{key:"image",inputType:"image",type:{type:"image",data:{url:"",altText:""}}},{key:"title",type:{type:"string",data:"Fresh Flavor & Warm Hospitality"}},{key:"firstDescription",type:{type:"string",data:"Enjoy a welcoming atmosphere where every visit feels like a local favorite."}},{key:"secondDescription",type:{type:"string",data:"Our team serves quality meals with care, whether you\u2019re dining in or taking out."}}],option:"Option 2",data:[{image:{url:"assets/images/default-theme-images/black-and-white-photograph-of-a-family-posing.webp",altText:"Chef preparing food in a kitchen"},title:"family-owned",firstDescription:"We\u2019re a family-owned-and-operated restaurant that opened in 1984.",secondDescription:"Since establishment, we have provided great service and food to ensure you have an enjoyable dining experience."},{image:{url:"assets/images/default-theme-images/mediterranean-salad-on-a-table.webp",altText:"Fresh ingredients prepared for service"},title:"delicious pizzas",firstDescription:"Our pizzas are made daily with fresh dough and sauce. They are topped with 100% 
730whole milk mozzarella cheese and other top-quality, fresh ingredients.",secondDescription:"Eat a delicious and filling Greek salad from our restaurant."},{image:{url:"assets/images/default-theme-images/pizza-on-a-table-during-the-evening.webp",altText:"Fresh ingredients prepared for service"},title:"famous salads",firstDescription:"We are widely known for our Porto-Fino\xA0Special and House Special. Eat a delicious and filling Greek salad from our restaurant.",secondDescription:"Our salads  are made with fresh, crisp lettuce, cucumbers, thick slices of feta cheese, kalamata olives, and  pepperoncini peppers. We top it with our famous homemade Greek dressing."},{image:{url:"assets/images/default-theme-images/mediterranean-salad-on-a-table.webp",altText:"Fresh ingredients prepared for service"},title:"delicious pizzas",firstDescription:"We are widely known for our Porto-Fino\xA0Special and House Special. Eat a delicious and filling Greek salad from our restaurant.",secondDescription:"Our salads  are made with fresh, crisp lettuce, cucumbers, thick slices of feta cheese, kalamata olives, and  pepperoncini peppers. We top it with our famous homemade Greek dressing."}]}};var Iu=(()=>{class h{constructor(){this.httpClient=gt(Zi),this.REQUEST_TIMEOUT_MS=1e4,this.BASE_PATH="/ws/integrated/v1/menu",this.storeUrl="",this.imageBaseUrl="",this.storeId="",this.isCloudWeb=!1,this._menu=Te(null),this.menu=Ut(()=>this._menu()),this._activeTab=Te(""),this.activeTab=Ut(()=>this._activeTab()),this._isLoading=Te(!1),this.isLoading=Ut(()=>this._isLoading()),this._error=Te(null),this.error=Ut(()=>this._error())}fetchPanels(n,c="Any",d){let a=n.baseUrl;this.imageBaseUrl=a,this.isCloudWeb=n.isCloudWeb??!1,this.infoId=n.infoId;let z=a.match(/^https:\/\/([^.]+)\.foodtecsolutions\.com$/);this.storeId=z?z[1]:n.urlName||n.name||"",this._isLoading.set(!0),this._error.set(null);let J=new xu().set("page","Web").set("orderType",c).set("compact","true").set("compactItems","true").set("compactTabs","false");return d&&(J=J.set("date",d)),this.isCloudWeb?this.fetchFromUrl("https://order.foodtecsolutions.com",J,this.isCloudWeb).pipe(ua(()=>this.fetchFromUrl(a,J,this.isCloudWeb)),Uo(yt=>{this._menu.set(yt),yt.tabs&&yt.tabs.length>0&&this.setActiveTab(yt.tabs[0].keyName),this._isLoading.set(!1)}),ua(yt=>{throw this._isLoading.set(!1),this._error.set("This menu is currently unavailable. Please try again later or visit our online ordering menu."),yt}),Zd(()=>this._isLoading.set(!1))):this.fetchFromUrl(a,J,this.isCloudWeb).pipe(ua(()=>this.fetchFromUrl("https://order.foodtecsolutions.com",J,this.isCloudWeb)),Uo(yt=>{this._menu.set(yt),yt.tabs&&yt.tabs.length>0&&this.setActiveTab(yt.tabs[0].keyName),this._isLoading.set(!1)}),ua(yt=>{throw this._isLoading.set(!1),this._error.set("This menu is currently unavailable. Please try again later or visit our online ordering menu."),yt}),Zd(()=>this._isLoading.set(!1)))}fetchFromUrl(n,c,d=!0){this.storeUrl=n;let a=d?`${n}${this.BASE_PATH}/panels`:`${n}${this.BASE_PATH}/panels`;return this.httpClient.get(a,{params:c,headers:this.getHeaders()}).pipe(Jh(this.REQUEST_TIMEOUT_MS),Uo({error:z=>console.warn("[menu] Panels request failed",{merchantId:qn.merchantId,storeId:this.storeId,endpoint:a.split("?")[0],errorName:z?.name,status:z?.status})}))}fetchAllTabGroups(){let n=this._menu();if(!n?.tabs||n.tabs.length===0)return $i({name:"",tabs:[]});let c=n.tabs.map(a=>{let z=a.links?.find(ie=>ie.rel==="groups");if(!z?.href)return null;let J=z.href,yt=new URL(J);return yt.searchParams.set("compact","false"),{tab:a,url:yt.toString(),originalUrl:J}}).filter(a=>a!==null);if(c.length===0)return $i(n);let d=c.map(a=>this.httpClient.get(a.url,{headers:this.getHeaders()}).pipe(Jh(this.REQUEST_TIMEOUT_MS),ua(z=>(console.warn("[menu] Groups request failed; using empty groups",{merchantId:qn.merchantId,tab:a.tab.keyName,errorName:z?.name,status:z?.status}),$i([])))));return nf(d).pipe(wo(a=>{let z=te({},n);return z.tabs=n.tabs.map((J,yt)=>cn(te({},J),{groups:a[yt]||[]})),z}),Uo(a=>{this._menu.set(a)}),ua(a=>{throw a}))}setMenuData(n,c){this.imageBaseUrl=c,this._menu.set(n),n.tabs&&n.tabs.length>0&&this.setActiveTab(n.tabs[0].keyName)}getHeaders(){return this.isCloudWeb?{"x-fts-client":"latte","x-fts-store":String(this.infoId),accept:"application/expanded+json"}:{accept:"application/expanded+json"}}resolveImageUrl(n){if(!n||!this.imageBaseUrl)return n;try{return new URL(n,this.imageBaseUrl).href}catch{return n}}getImageBaseUrl(){return this.imageBaseUrl}setActiveTab(n){this._activeTab.set(n)}getActiveTab(){let n=this._menu();if(!n||!n.tabs)return;let c=this._activeTab();return n.tabs.find(d=>d.keyName===c)}getTabs(){return this._menu()?.tabs??[]}clearError(){this._error.set(null)}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275prov=zn({token:h,factory:h.\u0275fac,providedIn:"root"})}}return h})();function N1(h,k){if(h&1&&(I(0,"div",1),it(1,"img",5),E()),h&2){let n=A(2);w(),j("ngSrc",n.data.image.data.url||"assets/images/default-theme-images/placeholder.jpg")("alt",n.data.image.data.altText||"About us image")}}function V1(h,k){if(h&1&&(I(0,"h2",6),X(1),E()),h&2){let n=A(3);w(),St(n.interpolatedTitle())}}function j1(h,k){if(h&1&&(I(0,"p",8),X(1),E()),h&2){let n=A(3);ue("color",n.textColor()),w(),Rt(" ",n.interpolatedDescription()," ")}}function U1(h,k){if(h&1&&(I(0,"div",2),ut(1,V1,2,1,"h2",6)(2,j1,2,3,"p",7),E()),h&2){let n=A(2);w(),rt(!(n.data==null||n.data.title==null)&&n.data.title.data?1:-1),w(),rt(!(n.data==null||n.data.description==null)&&n.data.description.data?2:-1)}}function $1(h,k){if(h&1&&(I(0,"div",10),it(1,"img",15),E()),h&2){let n=A().$implicit;w(),j("src",n.image==null?null:n.image.url,Se)("alt",(n.image==null?null:n.image.altText)||n.title||"About Us Card Image")}}function G1(h,k){if(h&1&&(I(0,"div",4)(1,"div",9),ut(2,$1,2,2,"div",10),I(3,"span",11),X(4),E()(),I(5,"div",12)(6,"span",13),X(7),E(),I(8,"span",14),X(9),E()()()),h&2){let n=k.$implicit,c=A(2);w(2),rt(n.image!=null&&n.image.url?2:-1),w(2),St(n.title),w(2),ue("color",c.textColor()),w(),St(n.firstDescription),w(),ue("color",c.textColor()),w(),St(n.secondDescription)}}function Z1(h,k){if(h&1&&(I(0,"div",0),ut(1,N1,2,2,"div",1)(2,U1,3,2,"div",2),I(3,"div",3),le(4,G1,10,8,"div",4,Ce),E()()),h&2){let n=A();w(),rt(!(n.data==null||n.data.image==null)&&n.data.image.data?1:-1),w(),rt(!(n.data==null||n.data.title==null)&&n.data.title.data||!(n.data==null||n.data.description==null)&&n.data.description.data?2:-1),w(2),ce(n.cardTiles)}}function H1(h,k){if(h&1&&(I(0,"div",1),it(1,"img",18),E()),h&2){let n=A(2);w(),j("ngSrc",n.data.image.data.url||"assets/images/default-theme-images/placeholder.jpg")("alt",n.data.image.data.altText||"About us image")}}function q1(h,k){if(h&1&&(I(0,"h2",6),X(1),E()),h&2){let n=A(3);w(),St(n.interpolatedTitle())}}function W1(h,k){if(h&1&&(I(0,"p",8),X(1),E()),h&2){let n=A(3);ue("color",n.textColor()),w(),Rt(" ",n.interpolatedDescription()," ")}}function X1(h,k){if(h&1&&(I(0,"div",2),ut(1,q1,2,1,"h2",6)(2,W1,2,3,"p",7),E()),h&2){let n=A(2);w(),rt(!(n.data==null||n.data.title==null)&&n.data.title.data?1:-1),w(),rt(!(n.data==null||n.data.description==null)&&n.data.description.data?2:-1)}}function K1(h,k){if(h&1&&(I(0,"div",17)(1,"div",19),it(2,"app-icon",20),E(),I(3,"span",11),X(4),E(),I(5,"span",21),X(6),E()()),h&2){let n=k.$implicit,c=A(2);w(),ue("color",c.textColor()),w(),j("sharedIconName",n.icon)("color",c.textColor()),w(),ue("color",c.textColor()),w(),St(n.title),w(),ue("color",c.textColor()),w(),St(n.description)}}function Y1(h,k){if(h&1&&(I(0,"div",0),ut(1,H1,2,2,"div",1)(2,X1,3,2,"div",2),I(3,"div",16),le(4,K1,7,10,"div",17,Ce),E()()),h&2){let n=A();w(),rt(!(n.data==null||n.data.image==null)&&n.data.image.data?1:-1),w(),rt(!(n.data==null||n.data.title==null)&&n.data.title.data||!(n.data==null||n.data.description==null)&&n.data.description.data?2:-1),w(2),ce(n.infoTiles)}}var C_=(()=>{class h{formatOrderTypes(n){return n.length===0?"":n.length===1?n[0]:n.length===2?`${n[0]} or ${n[1]}`:`${n.slice(0,-1).join(", ")} or ${n[n.length-1]}`}constructor(n){this.componentConfig=n,this.textColor=Ut(()=>this.data?.textColor?.data??"var(--text)"),this.infoTiles=[],this.cardTiles=[],this.brandConfigService=gt(Ee),this.brandConfig=this.brandConfigService.brandConfig,this.singleStore=this.brandConfigService.singleStore,this.menuService=gt(Iu),this.localizationService=gt(un),this.featuredTabs=Ut(()=>this.menuService.menu()?.tabs?.slice(0,3)||[]),this.storeInfo=Ut(()=>
730{let c=this.singleStore(),d=this.brandConfig();return c?{name:d?.name||"",address:c.address||"",city:c.city||"",orderTypes:this.formatOrderTypes(c.orderTypes?.map(a=>a.type)||[])}:{name:d?.name||"",address:d?.address||"",city:d?.city||"",orderTypes:this.formatOrderTypes(d?.orderTypes?.map(a=>a.type)||[])}}),this.interpolatedTitle=Ut(()=>{let c=this.componentConfig?.data?.title?.data??Gr.title.data,d=this.storeInfo();return c.replace("[merchant Name]",d.name)}),this.interpolatedDescription=Ut(()=>{let c=this.componentConfig?.data?.description?.data??Gr.description.data,d=this.storeInfo(),a=this.featuredTabs(),z=a.length>0?a.map(J=>J.name).join(", "):this.localizationService.getLocalizationString("route.about.menu_fallback");return c=c.replace("[merchant Name]",d.name).replace("[address]",d.address).replace("[city]",d.city).replace("[order types]",d.orderTypes).replace("[tabs Name]",z),!d.address&&!d.city?c=c.replace(/Located at .*? in .*?(, |\.|$)/,""):!d.address&&d.city?c=c.replace(/Located at\s+in/,"Located in"):d.address&&!d.city&&(c=c.replace(/\s+in\s+,/,",")),c}),this.data={layoutOption:this.componentConfig?.data?.layoutOption??Gr.layoutOption,image:this.componentConfig?.data?.image??Gr?.image,title:this.componentConfig?.data?.title??Gr.title,description:this.componentConfig?.data?.description??Gr.description,textColor:this.componentConfig?.data?.textColor??Gr.textColor,infoTiles:this.componentConfig?.data?.infoTiles??Gr.infoTiles,cardTiles:this.componentConfig?.data?.cardTiles??Gr.cardTiles},this.infoTiles=this.data.infoTiles.data.map(c=>({icon:c.icon,title:c.title,description:c.description})),this.cardTiles=(this.data.cardTiles?.data||[]).map(c=>({image:c.image,title:c.title,firstDescription:c.firstDescription,secondDescription:c.secondDescription}))}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-about-us"]],standalone:!0,features:[Kt],decls:2,vars:1,consts:[[1,"about-us"],[1,"about-image"],[1,"about-heading"],[1,"card-wrapper"],[1,"card-container"],["priority","","fill","","sizes","100vw",3,"ngSrc","alt"],[1,"about-heading-title"],[1,"about-heading-description",3,"color"],[1,"about-heading-description"],[1,"card-visual"],[1,"card-image"],[1,"title"],[1,"card-content"],[1,"firstDescription"],[1,"secondDescription"],["fill","",3,"src","alt"],[1,"info-wrapper"],[1,"info-container"],["fill","","sizes","100vw",3,"ngSrc","alt"],[1,"icon-container"],[1,"icon",3,"sharedIconName","color"],[1,"description"]],template:function(c,d){c&1&&ut(0,Z1,6,2,"div",0)(1,Y1,6,2,"div",0),c&2&&rt((d.data==null||d.data.layoutOption==null?null:d.data.layoutOption.data)==="Option 2"?0:1)},dependencies:[Ae,mn],styles:[".about-us[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column}.about-us[_ngcontent-%COMP%]   .about-image[_ngcontent-%COMP%]{position:relative;width:100%;height:250px}@media (min-width: 768px){.about-us[_ngcontent-%COMP%]   .about-image[_ngcontent-%COMP%]{height:400px}}@media (min-width: 1024px){.about-us[_ngcontent-%COMP%]   .about-image[_ngcontent-%COMP%]{height:710px}}.about-us[_ngcontent-%COMP%]   .about-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{object-fit:cover}.about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .about-heading[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:12px;padding:32px 40px 0;text-align:center;background-color:var(--page-background)}.about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .about-heading[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], .about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .about-heading[_ngcontent-%COMP%]   .about-heading-title[_ngcontent-%COMP%]{margin:0;font-size:var(--font-size-xl);font-weight:var(--font-weight-semi-bold);line-height:1.2;color:var(--text)}.about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .about-heading[_ngcontent-%COMP%]   p[_ngcontent-%COMP%], .about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .about-heading[_ngcontent-%COMP%]   .about-heading-description[_ngcontent-%COMP%]{margin:0;font-size:var(--font-size-med);font-weight:var(--font-weight-regular);line-height:1.5;color:var(--text);text-align:left}@media (min-width: 768px){.about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .about-heading[_ngcontent-%COMP%]{padding:32px 40px 0}}@media (min-width: 1024px){.about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .about-heading[_ngcontent-%COMP%]{padding:32px 178px 0;max-width:1333px;margin:0 auto}.about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .about-heading[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], .about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .about-heading[_ngcontent-%COMP%]   .about-heading-title[_ngcontent-%COMP%]{font-size:var(--font-size-3xl)}}.about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .info-wrapper[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:48px;padding:32px 40px 48px;background-color:var(--page-background)}@media (min-width: 768px){.about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .info-wrapper[_ngcontent-%COMP%]{padding:32px 40px 48px}}@media (min-width: 1024px){.about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .info-wrapper[_ngcontent-%COMP%]{padding:96px 178px;gap:80px}}.about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .info-wrapper[_ngcontent-%COMP%]   .info-container[_ngcontent-%COMP%]{max-width:400px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:8px}.about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .info-wrapper[_ngcontent-%COMP%]   .info-container[_ngcontent-%COMP%]   .icon-container[_ngcontent-%COMP%]{width:80px;height:80px;margin-bottom:16px;color:var(--primary)}.about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .info-wrapper[_ngcontent-%COMP%]   .info-container[_ngcontent-%COMP%]   .icon-container[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{width:100%;height:100%}.about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .info-wrapper[_ngcontent-%COMP%]   .info-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:0;font-size:var(--font-size-lg);font-weight:var(--font-weight-semi-bold)}.about-us[_ngcontent-%COMP%]:has(.info-wrapper)   .info-wrapper[_ngcontent-%COMP%]   .info-container[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%]{font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:1.25;color:var(--text)}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]{background:url(/../assets/images/default-theme-images/timeline-connection.png);background-repeat:no-repeat;background-size:auto 80%;background-position:center;display:flex;flex-direction:column;align-items:center}@media (max-width: 767px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]{background:url(/../assets/images/default-theme-images/timeline-connection-mobile.png);background-size:90% 70%;background-repeat:no-repeat;background-position:center calc(50% - 150px)}}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-visual[_ngcontent-%COMP%]{display:flex;flex-direction:column}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-visual[_ngcontent-%COMP%]   .card-image[_ngcontent-%COMP%]{flex:0 0 auto}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-visual[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:0;font-weight:inherit;font-size:40px;font-family:Caveat,sans-serif;flex:1;display:flex;align-items:center;color:var(--primary-dark)}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .about-heading[_ngcontent-%COMP%]{justify-content:space-between}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .about-heading[_ngcontent-%COMP%]   .about-heading-title[_ngcontent-%COMP%]{font-family:Caveat,sans-serif;color:var(--primary-dark)}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .about-heading[_ngcontent-%COMP%]   .about-heading-description[_ngcontent-%COMP%]{font-weight:var(--font-weight-regular);line-height:1.5}@media (min-width: 1024px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .about-heading[_ngcontent-%COMP%]{padding:48px 96px 40px}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .about-heading[_ngcontent-%COMP%]   .about-heading-title[_ngcontent-%COMP%]{font-size:48px}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .about-heading[_ngcontent-%COMP%]   .about-heading-description[_ngcontent-%COMP%]{font-size:var(--font-size-med)}}@media (min-width: 768px) and (max-width: 1023px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .about-heading[_ngcontent-%COMP%]{padding:32px 72px}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .about-heading[_ngcontent-%COMP%]   .about-heading-title[_ngcontent-%COMP%]{font-size:36px}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .about-heading[_ngcontent-%COMP%]   .about-heading-description[_ngcontent-%COMP%]{font-size:var(--font-size-med)}}@media (max-width: 767px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .about-heading[_ngcontent-%COMP%]{padding:24px}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .about-heading[_ngcontent-%COMP%]   .about-heading-title[_ngcontent-%COMP%]{font-size:var(--font-size-3xl)}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .about-heading[_ngcontent-%COMP%]   .about-heading-description[_ngcontent-%COMP%]{font-size:var(--font-size-sm)}}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .firstDescription[_ngcontent-%COMP%], .about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .secondDescription[_ngcontent-%COMP%]{max-width:500px}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]{background:url(/../assets/images/default-theme-images/timeline-connection.png);background-repeat:no-repeat;background-size:auto 80%;background-position:center;display:flex;flex-direction:column;align-items:center}@media (max-width: 767px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]{background:url(/../assets/images/default-theme-images/timeline-connection-mobile.png);background-size:90% 70%;background-repeat:no-repeat;background-position:center calc(50% - 150px)}}@media (min-width: 1024px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]{padding:40px 96px}}@media (min-width: 768px) and (max-width: 1023px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]{padding:40px 72px}}@media (max-width: 767px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]{padding:40px 60px}}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]{text-align:center;display:flex;max-width:1200px;padding:150px 0}@media (max-width: 767px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]{flex-direction:column;align-items:center}}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]   .card-visual[_ngcontent-%COMP%]{background:#f0f0f0;box-shadow:0 5px 5px #00000040}@media (min-width: 1024px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]   .card-visual[_ngcontent-%COMP%]{padding:24px;width:488px;height:538px}}@media (min-width: 768px) and (max-width: 1023px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]   .card-visual[_ngcontent-%COMP%]{padding:18px;width:366px;height:403px}}@media (max-width: 767px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]   .card-visual[_ngcontent-%COMP%]{padding:16px;width:300px;height:325px}}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]   .card-visual[_ngcontent-%COMP%]   .card-image[_ngcontent-%COMP%]{position:relative;overflow:hidden}@media (min-width: 1024px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]   .card-visual[_ngcontent-%COMP%]   .card-image[_ngcontent-%COMP%]{width:440px;height:387px}}@media (min-width: 768px) and (max-width: 1023px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]   .card-visual[_ngcontent-%COMP%]   .card-image[_ngcontent-%COMP%]{width:330px;height:290px}}@media (max-width: 767px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]   .card-visual[_ngcontent-%COMP%]   .card-image[_ngcontent-%COMP%]{width:268px;height:230px}}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]   .card-visual[_ngcontent-%COMP%]   .card-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{display:block;width:100%;height:100%;object-fit:cover;object-position:center}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;align-items:center}@media (min-width: 1024px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]{font-size:var(--font-size-lg)}}@media (min-width: 768px) and (max-width: 1023px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]{font-size:var(--font-size-med)}}@media (max-width: 767px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]{font-size:var(--font-size-med)}}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(1){padding-top:0}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(1)   .card-content[_ngcontent-%COMP%]{margin-left:50px}@media (max-width: 767px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(1){padding:0}}@media (min-width: 1024px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(1)   .firstDescription[_ngcontent-%COMP%]{padding-top:40px;margin-top:72px;max-width:400px}}@media (min-width: 768px) and (max-width: 1023px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(1)   .firstDescription[_ngcontent-%COMP%]{padding-top:0;margin-top:0}}@media (max-width: 767px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(1)   .firstDescription[_ngcontent-%COMP%]{padding-top:40px;margin-top:24px}}@media (max-width: 767px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(1)   .secondDescription[_ngcontent-%COMP%]{margin-top:100px}}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(2)   .card-visual[_ngcontent-%COMP%]{transform:rotate(10deg)}@media (min-width: 1024px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(2){flex-direction:row-reverse}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(2)   .firstDescription[_ngcontent-%COMP%]{margin-right:100px}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(2)   .secondDescription[_ngcontent-%COMP%]{transform:translate(-50px,30px)}}@media (min-width: 768px) and (max-width: 1023px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(2){flex-direction:row-reverse}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .ca
730rd-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(2)   .firstDescription[_ngcontent-%COMP%]{transform:translateY(-100px)}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(2)   .secondDescription[_ngcontent-%COMP%]{transform:translate(50px,50px)}}@media (max-width: 767px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(2){padding:100px 0}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(2)   .card-content[_ngcontent-%COMP%]{transform:translateY(100px);gap:100px}}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(3)   .card-visual[_ngcontent-%COMP%]{transform:rotate(-15deg)}@media (min-width: 1024px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(3)   .firstDescription[_ngcontent-%COMP%]{transform:translateY(-150px)}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(3)   .secondDescription[_ngcontent-%COMP%]{transform:translateY(150px)}}@media (min-width: 768px) and (max-width: 1023px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(3)   .firstDescription[_ngcontent-%COMP%]{transform:translateY(-150px)}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(3)   .secondDescription[_ngcontent-%COMP%]{transform:translateY(150px)}}@media (max-width: 767px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(3){padding:100px 0}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(3)   .card-content[_ngcontent-%COMP%]{transform:translateY(100px);gap:100px}}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(4)   .card-visual[_ngcontent-%COMP%]{transform:rotate(10deg)}@media (min-width: 1024px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(4){flex-direction:row-reverse}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(4)   .firstDescription[_ngcontent-%COMP%]{transform:translate(-50px)}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(4)   .secondDescription[_ngcontent-%COMP%]{transform:translate(-60px,150px)}}@media (min-width: 768px) and (max-width: 1023px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(4){flex-direction:row-reverse}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(4)   .firstDescription[_ngcontent-%COMP%]{transform:translateY(-101px)}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(4)   .secondDescription[_ngcontent-%COMP%]{transform:translateY(150px)}}@media (max-width: 767px){.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(4){padding:100px 0}.about-us[_ngcontent-%COMP%]:has(.card-wrapper)   .card-wrapper[_ngcontent-%COMP%]   .card-container[_ngcontent-%COMP%]:nth-child(4)   .card-content[_ngcontent-%COMP%]{transform:translateY(100px);gap:100px}}"]})}}return h})();var Wd={layoutOption:{type:"string",data:"Option 1"},title:{type:"string",data:"Track Your Order"},subTitle:{type:"string",data:"Please enter your Mobile Phone Number",option:"Option 1, Option 3"},backgroundImage:{type:"string",data:{url:"assets/components/order-tracker/map_big.avif",altText:"Order Tracker Backgroun
730d Image"},option:"Option 3"}};var Q1=["searchInput"],J1=["trigger"],tb=(h,k)=>({required:h,"empty-selection":k}),eb=(h,k)=>({selected:h,invalid:k}),nb=h=>({padding:h}),ib=h=>({transform:h});function ob(h,k){if(h&1&&it(0,"app-icon",6),h&2){let n=A();j("name",n.iconNameType[n.placeholderIcon()]),qt("aria-hidden",!0)}}function rb(h,k){if(h&1){let n=Yt();I(0,"div",9)(1,"input",13,1),Ot("input",function(d){kt(n);let a=A(2);return Et(a.onSearchInput(d))})("keydown",function(d){kt(n);let a=A(2);return Et(a.onSearchKeydown(d))})("click",function(d){return kt(n),Et(d.stopPropagation())}),E()()}if(h&2){let n=A(2);w(),j("placeholder",n.searchPlaceholder())("value",n.searchTerm()),qt("aria-label",n.localizationService.getLocalizationString("shared_components.dropdown_search.aria_label_input"))}}function ab(h,k){if(h&1){let n=Yt();I(0,"div",14),Ot("click",function(){let d=kt(n).$implicit,a=A(2);return Et(a.selectOption(d))})("keydown",function(d){let a=kt(n).$implicit,z=A(2);return Et(z.onOptionKeydown(d,a))})("mouseenter",function(){let d=kt(n).$index,a=A(2);return Et(a.activeIndex.set(d))}),X(1),E()}if(h&2){let n=k.$implicit,c=k.$index,d=A(2);Ie("selected",d.getOptionValue(n)===d.selectedValue())("active",c===d.activeIndex()),j("id","option-"+c),qt("aria-selected",d.getOptionValue(n)===d.selectedValue()),w(),Rt(" ",d.getOptionLabel(n)," ")}}function sb(h,k){if(h&1&&(I(0,"div",12),X(1),E()),h&2){let n=A(2);w(),Rt(" ",n.localizationService.getLocalizationString("shared_components.dropdown_search.no_results")," ")}}function lb(h,k){if(h&1&&(I(0,"div",8),ut(1,rb,3,3,"div",9),I(2,"div",10),le(3,ab,2,7,"div",11,ga().trackByValue,!0,sb,2,1,"div",12),E()()),h&2){let n=A();j("id","dropdown-list-"+n.label()),qt("aria-label",n.localizationService.getLocalizationString("shared_components.dropdown_search.aria_label_options")+n.label()),w(),rt(n.showSearchInput()&&n.options().length>=10?1:-1),w(2),ce(n.filteredOptions())}}var w_=(()=>{class h{constructor(){this.localizationService=gt(un),this.label=zt.required(),this.options=zt.required(),this.disabled=zt(!1),this.required=zt(!1),this.invalid=zt(!1),this.placeholderIcon=zt(),this.searchPlaceholder=zt("Search..."),this.showSearchInput=zt(!0),this.selectedValue=nm(""),this.selectionChange=Le(),this.elementRef=gt(kr),this.iconNameType=ge,this.searchInputRef=lc("searchInput"),this.triggerRef=lc("trigger"),this.isOpen=Te(!1),this.searchTerm=Te(""),this.activeIndex=Te(0),this.filteredOptions=Ut(()=>{let n=this.searchTerm().trim().toLowerCase(),c=this.options();return n?c.filter(d=>this.getOptionLabel(d).toLowerCase().includes(n)):c}),this.selectedLabel=Ut(()=>{let n=this.selectedValue();if(!n)return"";let c=this.options().find(d=>this.getOptionValue(d)===n);return c?this.getOptionLabel(c):n}),this.onChange=n=>n,this.onTouched=()=>{}}getOptionLabel(n){return typeof n=="string"?n:n.label}getOptionValue(n){return typeof n=="string"?n:n.value}trackByValue(n,c){return this.getOptionValue(c)??n.toString()}writeValue(n){this.selectedValue.set(n??"")}registerOnChange(n){this.onChange=n}registerOnTouched(n){this.onTouched=n}toggleDropdown(){this.disabled()||(this.isOpen()?this.closeDropdown():this.openDropdown())}openDropdown(){if(this.disabled())return;this.isOpen.set(!0),this.searchTerm.set("");let n=this.findSelectedIndex()??0;this.activeIndex.set(n),setTimeout(()=>this.searchInputRef()?.focus()),this.onTouched()}closeDropdown(){this.isOpen.set(!1),this.searchTerm.set(""),this.activeIndex.set(0)}onSearchInput(n){let c=n.target;this.searchTerm.set(c.value),this.activeIndex.set(0)}selectOption(n){if(this.disabled())return;let c=this.getOptionValue(n);this.selectedValue.set(c),this.onChange(c),this.selectionChange.emit(c),this.closeDropdown(),this.onTouched()}onTriggerKeydown(n){if(this.disabled())return;let c=n.key;if(!this.isOpen()){(c==="Enter"||c===" ")&&(n.preventDefault(),this.openDropdown());return}if(c==="Enter"||c===" "){n.preventDefault();let d=this.filteredOptions()[this.activeIndex()];d&&this.selectOption(d);return}if(c==="Escape"){n.preventDefault(),this.closeDropdown(),this.triggerRef()?.nativeElement.focus();return}this.handleArrowNavigation(n)}onSearchKeydown(n){if(this.disabled()||!this.isOpen())return;let c=n.key;if(c==="Enter"){n.preventDefault();let d=this.filteredOptions()[this.activeIndex()];d&&this.selectOption(d);return}if(c==="Escape"){n.preventDefault(),this.closeDropdown(),this.triggerRef()?.nativeElement.focus();return}this.handleArrowNavigation(n)}onOptionKeydown(n,c){if(this.disabled())return;let d=n.key;(d==="Enter"||d===" ")&&(n.preventDefault(),this.selectOption(c))}handleArrowNavigation(n){let c=n.key,a=this.filteredOptions().length-1;switch(c){case"ArrowDown":n.preventDefault(),this.activeIndex.update(z=>z<a?z+1:0),this.scrollActiveIntoView();break;case"ArrowUp":n.preventDefault(),this.activeIndex.update(z=>z>0?z-1:a),this.scrollActiveIntoView();break;case"Home":n.preventDefault(),this.activeIndex.set(0),this.scrollActiveIntoView();break;case"End":n.preventDefault(),this.activeIndex.set(a),this.scrollActiveIntoView();break;default:break}}scrollActiveIntoView(){document.getElementById(`option-${this.activeIndex()}`)?.scrollIntoView({block:"nearest",behavior:"smooth"})}findSelectedIndex(){let n=this.selectedValue();if(!n)return null;
730let c=this.filteredOptions().findIndex(d=>this.getOptionValue(d)===n);return c>=0?c:null}onDocumentClick(n){if(!this.isOpen())return;let c=n.target;this.elementRef.nativeElement.contains(c)||this.closeDropdown()}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-dropdown-with-search"]],viewQuery:function(c,d){c&1&&(cc(d.searchInputRef,Q1,5),cc(d.triggerRef,J1,5)),c&2&&Hd(2)},hostBindings:function(c,d){c&1&&Ot("click",function(z){return d.onDocumentClick(z)},!1,dr)},inputs:{label:[1,"label"],options:[1,"options"],disabled:[1,"disabled"],required:[1,"required"],invalid:[1,"invalid"],placeholderIcon:[1,"placeholderIcon"],searchPlaceholder:[1,"searchPlaceholder"],showSearchInput:[1,"showSearchInput"],selectedValue:[1,"selectedValue"]},outputs:{selectedValue:"selectedValueChange",selectionChange:"selectionChange"},standalone:!0,features:[Er([{provide:gc,useExisting:Js(()=>h),multi:!0}]),Kt],decls:10,vars:31,consts:[["trigger",""],["searchInput",""],[1,"dropdown-container"],[1,"select-label",3,"ngClass","for"],["role","combobox","tabindex","0",1,"dropdown-trigger",3,"click","keydown","id","ngClass","ngStyle"],[1,"selected-text"],[1,"icon-placeholder",3,"name"],[1,"icon",3,"name","ngStyle"],["role","listbox",1,"dropdown-panel",3,"id"],[1,"search-wrapper"],[1,"options-list"],["role","option","tabindex","-1",1,"option-item",3,"id","selected","active"],["role","status","aria-live","polite",1,"no-results"],["type","text","autocomplete","off",1,"search-input",3,"input","keydown","click","placeholder","value"],["role","option","tabindex","-1",1,"option-item",3,"click","keydown","mouseenter","id"]],template:function(c,d){if(c&1){let a=Yt();I(0,"div",2)(1,"label",3),X(2),E(),I(3,"div",4,0),Ot("click",function(){return kt(a),Et(d.toggleDropdown())})("keydown",function(J){return kt(a),Et(d.onTriggerKeydown(J))}),I(5,"span",5),X(6),E()(),ut(7,ob,1,2,"app-icon",6),it(8,"app-icon",7),ut(9,lb,6,4,"div",8),E()}c&2&&(Ie("disabled",d.disabled()),w(),j("ngClass",en(21,tb,d.required(),!d.selectedValue()))("for","dropdown-label-"+d.label()),w(),Rt(" ",d.label()," "),w(),j("id","dropdown-label-"+d.label())("ngClass",en(24,eb,d.selectedValue(),d.invalid()))("ngStyle",me(27,nb,d.placeholderIcon()?"0 3.5rem":"0 1.5rem")),qt("aria-expanded",d.isOpen())("aria-controls","dropdown-list-"+d.label())("aria-labelledby","dropdown-label-"+d.label())("aria-activedescendant",d.isOpen()&&d.filteredOptions().length?"option-"+d.activeIndex():null)("aria-disabled",d.disabled())("aria-invalid",d.invalid())("aria-describedby",d.invalid()?"error-"+d.label():null),w(3),Rt(" ",d.selectedLabel()," "),w(),rt(d.placeholderIcon()?7:-1),w(),j("name",d.iconNameType.arrow)("ngStyle",me(29,ib,d.isOpen()?"rotate(-180deg)":"")),qt("aria-hidden",!0),w(),rt(d.isOpen()?9:-1))},dependencies:[ve,Ye,Gi,lo,Ae],styles:["[_nghost-%COMP%]{display:block;width:100%}.dropdown-container[_ngcontent-%COMP%]{position:relative;width:100%;-webkit-user-select:none;user-select:none}.dropdown-container.disabled[_ngcontent-%COMP%]{opacity:.6;pointer-events:none}.select-label[_ngcontent-%COMP%]{position:absolute;top:-10px;left:23px;padding:0 4px;color:var(--text);pointer-events:none;font-size:var(--font-size-sm);font-style:normal;font-weight:var(--font-weight-regular);line-height:20px;transition:all .3s ease;display:none}.select-label.empty-selection[_ngcontent-%COMP%]{font-size:var(--font-size-med);top:1rem;display:flex}.dropdown-trigger[_ngcontent-%COMP%]{display:flex;align-items:center;height:3.25rem;padding:0 1.5rem;margin:0;color:var(--text);border-radius:5rem;border:none;background:var(--white);cursor:pointer;font-size:var(--font-size-med);font-weight:var(--font-weight-regular);line-height:2rem;outline:none;transition:border .2s,box-shadow .2s}.dropdown-trigger[_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 2px var(--primary-light)}.dropdown-trigger.invalid[_ngcontent-%COMP%]{border:1px solid var(--general-red)}.dropdown-trigger[_ngcontent-%COMP%]   .selected-text[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media (max-width: 767px){.dropdown-trigger[_ngcontent-%COMP%]{font-size:var(--font-size-med);
730height:3.25rem}}.icon[_ngcontent-%COMP%]{position:absolute;top:.9685rem;right:1.5rem;width:1.313rem;height:1.313rem;color:var(--primary);transition:transform .3s ease-in-out;pointer-events:none}@media (max-width: 767px){.icon[_ngcontent-%COMP%]{top:1rem}}.icon-placeholder[_ngcontent-%COMP%]{position:absolute;top:.9685rem;left:1.5rem;width:1.313rem;height:1.313rem;color:var(--primary);pointer-events:none}@media (max-width: 767px){.icon-placeholder[_ngcontent-%COMP%]{top:1rem}}.dropdown-panel[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 4px);left:0;right:0;background:var(--white);border-radius:8px;box-shadow:0 4px 12px #00000026;z-index:10;max-height:280px;display:flex;flex-direction:column;border:1px solid var(--grey-light)}.search-wrapper[_ngcontent-%COMP%]{padding:.75rem;border-bottom:1px solid var(--grey-light)}.search-input[_ngcontent-%COMP%]{width:100%;padding:.5rem .75rem;border:1px solid var(--grey);border-radius:6px;font-size:var(--font-size-med);outline:none;background:var(--white)}.search-input[_ngcontent-%COMP%]::placeholder{color:var(--grey);opacity:1}.search-input[_ngcontent-%COMP%]:focus{border-color:var(--primary);box-shadow:0 0 0 2px var(--primary-light)}.options-list[_ngcontent-%COMP%]{overflow-y:auto;padding:.25rem 0}.option-item[_ngcontent-%COMP%]{padding:.75rem 1.5rem;cursor:pointer;font-size:var(--font-size-med);transition:background .15s}.option-item[_ngcontent-%COMP%]:hover, .option-item.active[_ngcontent-%COMP%]{background:var(--grey-background)}.option-item.selected[_ngcontent-%COMP%]{background:var(--primary-container);color:var(--primary-dark);font-weight:var(--font-weight-medium)}.option-item[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}.no-results[_ngcontent-%COMP%]{padding:1rem 1.5rem;text-align:center;color:var(--grey);font-style:italic}"]})}}return h})();function cb(h,k){if(h&1&&(I(0,"div",4),vi(1,5)(2,5)(3,5),E()),h&2){A();let n=Yn(4),c=Yn(6),d=Yn(8);w(),j("ngTemplateOutlet",n),w(),j("ngTemplateOutlet",c),w(),j("ngTemplateOutlet",d)}}function db(h,k){if(h&1&&(X(0),it(1,"br"),X(2)),h&2){let n=k,c=A(2);Rt(" ",c.localizationService.getLocalizationString("shared_components.order_tracker.delivery_hours"),": "),w(2),Qn(" ",n.openTime," - ",n.closeTime," ")}}function pb(h,k){if(h&1&&X(0),h&2){let n=A(2);Rt(" ",n.localizationService.getLocalizationString("shared_components.order_tracker.check_delivery_hours")," ")}}function ub(h,k){if(h&1&&X(0),h&2){let n=A();Rt(" - ",n.minutes+n.leewayTime,"")}}function hb(h,k){if(h&1&&(X(0),it(1,"br"),X(2),ut(3,ub,1,1),X(4,"min ")),h&2){let n=k,c=A(2);Rt(" ",c.localizationService.getLocalizationString("shared_components.order_tracker.delivery_time"),": "),w(2),Rt(" ",n.minutes,""),w(),rt(n.leewayTime>0?3:-1)}}function mb(h,k){if(h&1&&X(0),h&2){let n=A(2);Rt(" ",n.localizationService.getLocalizationString("shared_components.order_tracker.estomated_delivery_time")," ")}}function gb(h,k){if(h&1&&(I(0,"div",4),vi(1,5),I(2,"div",6)(3,"div",7),it(4,"img",8),I(5,"div",9),ut(6,db,3,3)(7,pb,1,1),E()(),I(8,"div",7),it(9,"img",10),I(10,"div",9),X(11),E()(),I(12,"div",7),it(13,"img",11),I(14,"div",9),ut(15,hb,5,3)(16,mb,1,1),E()()(),vi(17,5),E()),h&2){let n,c,d=A(),a=Yn(4),z=Yn(8);w(),j("ngTemplateOutlet",a),w(3),j("ngSrc","../../../assets/components/order-tracker/delivery_icon_1.svg")("alt","Our delivery hours"),w(2),rt((n=d.todaysStoreData())?6:7,n),w(3),j("ngSrc","../../../assets/components/order-tracker/delivery_icon_2.svg")("alt","check your order status"),w(2),Rt(" ",d.localizationService.getLocalizationString("shared_components.order_tracker.check_your_order")," "),w(2),j("ngSrc","../../../assets/components/order-tracker/delivery_icon_3.svg")("alt","Time to deliver your order"),w(2),rt((c=d.deliveryPromiseTime())?15:16,c),w(2),j("ngTemplateOutlet",z)}}function fb(h,k){if(h&1&&(I(0,"h2",12),X(1),E()),h&2){let n=A();w(),St(n.data.title.data)}}function _b(h,k){if(h&1&&(I(0,"div",13),X(1),E()),h&2){let n=A();w(),St(n.data.subTitle.data)}}function yb(h,k){if(h&1&&(I(0,"div",16)(1,"span",21),it(2,"app-icon",22),X(3),E()()),h&2){let n=A(2);w(2),j("name",n.iconNameType.error),w(),St(n.serverErrors.message)}}function xb(h,k){if(h&1&&(I(0,"span",19),it(1,"app-icon",22),X(2),E()),h&2){let n=A(3);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.store.required," ")}}
730function vb(h,k){if(h&1&&(I(0,"div",17),it(1,"app-dropdown-with-search",23),ut(2,xb,3,2,"span",19),E(),it(3,"br")),h&2){let n=A(2);w(),j("label","Select Store")("searchPlaceholder","Search Store")("options",n.storeDropdownOptions)("showSearchInput",n.brandStores.length>=10)("required",!0)("invalid",n.showValidationErrors&&n.store.invalid),w(),rt(n.showValidationErrors&&n.store.invalid?2:-1)}}function bb(h,k){if(h&1&&(I(0,"span",19),it(1,"app-icon",22),X(2),E()),h&2){let n=A(3);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.phone.required," ")}}function Cb(h,k){if(h&1&&(I(0,"span",19),it(1,"app-icon",22),X(2),E()),h&2){let n=A(3);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.phone.min_max," ")}}function wb(h,k){if(h&1&&ut(0,bb,3,2,"span",19)(1,Cb,3,2,"span",19),h&2){let n=A(2);rt(n.phone.hasError("required")?0:-1),w(),rt(n.phone.hasError("minlength")||n.phone.hasError("maxlength")?1:-1)}}function Mb(h,k){if(h&1&&(I(0,"span",19),it(1,"app-icon",22),X(2),E()),h&2){let n=A(2);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.phone.noOrderFound," ")}}function Pb(h,k){if(h&1&&(I(0,"span",19),it(1,"app-icon",22),X(2),E()),h&2){let n=A(3);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.orderNumber.required," ")}}function Ob(h,k){if(h&1&&(I(0,"div",17),it(1,"app-input",24),ut(2,Pb,3,2,"span",19),E()),h&2){let n=A(2);w(),j("placeholder","Order number")("type","number")("required",!0)("invalid",n.showValidationErrors&&n.orderNumber.invalid),w(),rt(n.showValidationErrors&&n.orderNumber.invalid?2:-1)}}function Sb(h,k){if(h&1){let n=Yt();I(0,"div",14)(1,"form",15),ut(2,yb,4,2,"div",16)(3,vb,4,7),I(4,"div",17),it(5,"app-mask-field-input",18),ut(6,wb,2,2)(7,Mb,3,2,"span",19),I(8,"button",20),Ot("click",function(){kt(n);let d=A();return Et(d.searchOrders())}),X(9),E()(),ut(10,Ob,3,5,"div",17),E()()}if(h&2){let n=A();w(),j("formGroup",n.searchForm),w(),rt(n.serverErrors&&n.serverErrors.message?2:-1),w(),rt(n.isMultistore?3:-1),w(2),j("maskPattern",n.maskPatternType.phone)("label",n.data.layoutOption.data==="Option 2"&&n.layoutService.viewport()!=="mobile"?"Enter your Mobile Phone":"Mobile Phone")("invalid",n.showValidationErrors&&n.phone.invalid||n.noOrdersFound)("borderRadius","10rem")("spacing","1.5rem")("background","var(--white)"),w(),rt(n.showValidationErrors&&n.phone.invalid?6:-1),w(),rt(n.noOrdersFound?7:-1),w(),j("subscription",n.searchSubscription),w(),Rt(" ",n.localizationService.getLocalizationString("header.more.track")," "),w(),rt(n.requireOrderNumber||n.askForOrderNumber?10:-1)}}var M_=(()=>{class h{get phone(){return this.searchForm.controls.phone}get orderNumber(){return this.searchForm.controls.orderNumber}get store(){return this.searchForm.controls.store}get storeDropdownOptions(){return this.brandStores.map(n=>({label:n.name,value:n.id}))}constructor(n){this.componentConfig=n,this.orderTrackerService=gt(Su),this.errorsService=gt($r),this.layoutService=gt(pn),this.localizationService=gt(un),this.brandConfigService=gt(Ee),this.storeConfig=this.brandConfigService.singleStore(),this.brandStores=this.brandConfigService.brandConfig()?.stores||[],this.isMultistore=this.brandStores.length>1||!1,this.storeData=gt(Ee).storeData,this.storeStatus=gt(Ee).storeStatus,this.iconNameType=ge,this.maskPatternType=fc,this.askForOrderNumber=!1,this.requireOrderNumber=!1,this.showValidationErrors=!1,this.noOrdersFound=!1,this.validationMessages={phone:{required:"Phone Number is required",min_max:"Phone Number is invalid",noOrderFound:"No order has been found for the given information"},orderNumber:{required:"Order Number is required"},store:{required:"Store is required"}},this.searchForm=new Rr({phone:new Fi("",an.compose([an.required,an.minLength(10),an.maxLength(10)]))}),this.searchSubscription=null,this.todaysStoreData=Ut(()=>{let d=new Date().toLocaleDateString("en-US",{weekday:"long"}).toLowerCase(),z=(this.storeData()?.webHours?.Delivery||[]).find(J=>J.day===d);return z?.closed?null:z??null}),this.deliveryPromiseTime=Ut(()=>{let a=(this.storeStatus()?.promiseTimes||[]).find(z=>z.orderType==="Delivery");return a?.minutes===0?null:a??null});let c=this.componentConfig?.data;this.data={layoutOption:c?.layoutOption??Wd.layoutOption,title:c?.title??Wd.title,subTitle:c?.subTitle??Wd.subTitle,backgroundImage:c?.backgroundImage??Wd.backgroundImage}}get backgroundImageUrl(){if(this.data.layoutOption?.data!=="Option 3")return;let n=this.data.backgroundImage?.data?.url;return n?encodeURI(n).replace(/'/g,"%27"):void 0}get backgroundImageAlt(){return this.data.layoutOption?.data!=="Option 3"?"":this.data.backgroundImage?.data?.altText||""}ngOnInit(){this.isMultistore&&this.searchForm.addControl("store",new Fi("",an.required))}searchOrders(){if(this.showValidationErrors=!1,this.serverErrors=void 0,!this.searchForm.valid){this.showValidationErrors=!0;return}let n=this.isMultistore?this.store.value:null,c=n?this.brandStores.find(d=>d.id===n):this.storeConfig;c&&(this.searchSubscription=this.orderTrackerService.getOrders({ph
730one:this.parsePhone(this.phone.value),lat:c.lat,lng:c.lng}).subscribe({next:d=>{this.searchSubscription=null,this.noOrdersFound=!1,d.length?window.location.href=d[0].trackerLink:this.noOrdersFound=!0},error:d=>{d.status===409&&!this.requireOrderNumber&&(this.askForOrderNumber=!0,this.searchForm.addControl("orderNumber",new Fi("",an.compose([an.required])))),this.searchSubscription=null,this.serverErrors=this.errorsService.parseAllErrorsFromResponse(d)}}))}parsePhone(n){let c=n.replace(/\D/g,"");return c.length===10?`${c.slice(0,3)}-${c.slice(3,6)}-${c.slice(6,10)}`:n}ngOnDestroy(){this.searchSubscription?.unsubscribe()}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-order-tracker"]],standalone:!0,features:[Kt],decls:9,vars:7,consts:[["title",""],["subTitle",""],["form",""],[1,"content-wrapper",3,"ngClass"],[1,"content"],[3,"ngTemplateOutlet"],[1,"icons"],[1,"icons-item"],["width","68","height","69",3,"ngSrc","alt"],[1,"icons-item-text"],["width","62","height","75",3,"ngSrc","alt"],["width","69","height","70",3,"ngSrc","alt"],[1,"title"],[1,"sub-title"],[1,"form-container"],[1,"inputs-wrapper",3,"formGroup"],[1,"generic-errors"],[1,"input-wrapper"],["formControlName","phone",3,"maskPattern","label","invalid","borderRadius","spacing","background"],[1,"input-error"],["appAsyncButton","",1,"button-accent","search-button",3,"click","subscription"],[1,"error"],[1,"icon",3,"name"],["formControlName","store",3,"label","searchPlaceholder","options","showSearchInput","required","invalid"],["formControlName","orderNumber",3,"placeholder","type","required","invalid"]],template:function(c,d){c&1&&(I(0,"div",3),ut(1,cb,4,3,"div",4)(2,gb,18,11,"div",4),E(),ut(3,fb,2,1,"ng-template",null,0,ki)(5,_b,2,1,"ng-template",null,1,ki)(7,Sb,11,14,"ng-template",null,2,ki)),c&2&&(ue("--order-tracker-custom-bg",d.backgroundImageUrl?"url('"+d.backgroundImageUrl+"')":null),Ie("has-custom-bg",!!d.backgroundImageUrl),j("ngClass",d.data.layoutOption.data.toLowerCase().replace(" ","-")+"-layout"),qt("aria-label",d.backgroundImageUrl?d.backgroundImageAlt:null),w(),rt(d.data.layoutOption.data==="Option 1"||d.data.layoutOption.data==="Option 3"?1:d.data.layoutOption.data==="Option 2"?2:-1))},dependencies:[Ur,_c,Ho,Br,Hi,Fr,jr,Nr,Vr,yc,Ae,ve,Ye,Ar,mn,w_],styles:['[_nghost-%COMP%]{width:100%;height:100%;display:flex;background:var(--white);color:var(--text);--order-tracker-padding-bottom: 32px}.content-wrapper[_ngcontent-%COMP%]{width:100%;position:relative}@media (max-width: 767px){.content-wrapper[_ngcontent-%COMP%]{width:calc(100vw - 32px)}}.content-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:0;font-size:1.75rem;font-weight:var(--font-weight-medium)}@media (min-width: 1024px){.content-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:1.5rem}}.content-wrapper[_ngcontent-%COMP%]   .sub-title[_ngcontent-%COMP%]{font-size:1rem;font-weight:var(--font-weight-regular)}@media (min-width: 1024px){.content-wrapper[_ngcontent-%COMP%]   .sub-title[_ngcontent-%COMP%]{font-size:.875rem}}.content-wrapper.option-1-layout[_ngcontent-%COMP%], .content-wrapper.option-3-layout[_ngcontent-%COMP%]{margin:3rem 3.25rem;background:url("./media/road-XG6PACXY.svg") no-repeat right center/cover,var(--page-background);padding:4rem 4.875rem var(--order-tracker-padding-bottom);border-radius:1.25rem}@media (max-width: 767px){.content-wrapper.option-1-layout[_ngcontent-%COMP%], .content-wrapper.option-3-layout[_ngcontent-%COMP%]{margin:2.125rem 1rem;padding:5.75rem 1.5rem var(--order-tracker-padding-bottom);background:url("./media/road_mobile_2-U4F2RPBO.svg") no-repeat right bottom,var(--page-background)}}@media (max-width: 420px) and (orientation: portrait){.content-wrapper.option-1-layout[_ngcontent-%COMP%], .content-wrapper.option-3-layout[_ngcontent-%COMP%]{background-position:-400px bottom}}@media (min-width: 768px) and (max-width: 1023px){.content-wrapper.option-1-layout[_ngcontent-%COMP%], .content-wrapper.option-3-layout[_ngcontent-%COMP%]{padding:5.75rem 2rem var(--order-tracker-pad
730ding-bottom);margin:2.125rem 1.5rem 1.625rem;background:url("./media/road_mobile_2-U4F2RPBO.svg") no-repeat right bottom,var(--page-background)}}@media (min-width: 1024px){.content-wrapper.option-1-layout[_ngcontent-%COMP%], .content-wrapper.option-3-layout[_ngcontent-%COMP%]{padding:5.75rem 2.25rem var(--order-tracker-padding-bottom);margin:2.125rem 2.25rem 1.25rem}}@media (min-width: 1400px){.content-wrapper.option-1-layout[_ngcontent-%COMP%], .content-wrapper.option-3-layout[_ngcontent-%COMP%]{padding:3.75rem 4.875rem var(--order-tracker-padding-bottom);margin:3rem 3.25rem}}@media (min-width: 1200px){.content-wrapper.option-1-layout[_ngcontent-%COMP%], .content-wrapper.option-3-layout[_ngcontent-%COMP%]{background-size:contain}}.content-wrapper.option-1-layout[_ngcontent-%COMP%]:after, .content-wrapper.option-3-layout[_ngcontent-%COMP%]:after{content:"";background:url("./media/bicycle_rider-ROINIR56.svg") no-repeat center center/contain;position:absolute;right:18.375rem;top:-1.938rem;width:9.813rem;height:13.938rem}@media (min-width: 1024px) and (max-width: 1199px){.content-wrapper.option-1-layout[_ngcontent-%COMP%]:after, .content-wrapper.option-3-layout[_ngcontent-%COMP%]:after{width:7.625rem;height:11.125rem}}@media (min-width: 1200px) and (max-width: 1399px){.content-wrapper.option-1-layout[_ngcontent-%COMP%]:after, .content-wrapper.option-3-layout[_ngcontent-%COMP%]:after{width:7.625rem;height:11.125rem}}@media (max-width: 1023px){.content-wrapper.option-1-layout[_ngcontent-%COMP%]:after, .content-wrapper.option-3-layout[_ngcontent-%COMP%]:after{width:6.5rem;height:9.438rem;right:9.438rem}}@media (max-width: 767px){.content-wrapper.option-1-layout[_ngcontent-%COMP%]:after, .content-wrapper.option-3-layout[_ngcontent-%COMP%]:after{width:5rem;height:7.313rem;right:6.438rem;top:.188rem}}@media (max-width: 420px) and (orientation: portrait){.content-wrapper.option-1-layout[_ngcontent-%COMP%]:after, .content-wrapper.option-3-layout[_ngcontent-%COMP%]:after{width:4.938rem;height:7.188rem;right:13vw}}@media (max-width: 767px){.content-wrapper.option-1-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%], .content-wrapper.option-3-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{width:19.375rem}}@media (max-width: 420px) and (orientation: portrait){.content-wrapper.option-1-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%], .content-wrapper.option-3-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{width:17.5rem}}@media (min-width: 768px) and (max-width: 1023px){.content-wrapper.option-1-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%], .content-wrapper.option-3-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{width:23rem}}@media (min-width: 1024px){.content-wrapper.option-1-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%], .content-wrapper.option-3-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{width:25.625rem}}@media (min-width: 1400px){.content-wrapper.option-1-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%], .content-wrapper.option-3-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{width:30rem}}@media (min-width: 1200px){.content-wrapper.option-1-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%], .content-wrapper.option-3-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{background-size:contain}}.content-wrapper.option-1-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .sub-title[_ngcontent-%COMP%], .content-wrapper.option-3-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .sub-title[_ngcontent-%COMP%]{margin-top:.75rem;margin-bottom:1.5rem}.content-wrapper.option-2-layout[_ngcontent-%COMP%]{width:100%;background:var(--page-background);padding:3rem clamp(2rem,17.14vw,20rem) var(--order-tracker-padding-bottom);text-align:center}@media (max-width: 767px){.content-wrapper.option-2-layout[_ngcontent-%COMP%]{padding:2.5rem 2rem var(--order-tracker-padding-bottom)}}@media (min-width: 768px) and (max-width: 1023px){.content-wrapper.option-2-layout[_ngcontent-%COMP%]{padding:2.5rem 3rem var(--order-tracker-padding-bottom)}}@media (min-width: 1024px){.content-wrapper.option-2-layout[_ngcontent-%COMP%]{padding:3rem 6rem var(--order-tracker-pad
730ding-bottom)}}.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{max-width:55rem;margin:0 auto}.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-family:Caveat,sans-serif;color:var(--text);font-weight:var(--font-weight-bold);font-size:3rem;margin-bottom:.938rem}@media (max-width: 767px){.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:2rem;margin-bottom:1.5rem}}.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .icons[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:clamp(1.5rem,10vw,10rem);margin-bottom:2.063rem}@media (max-width: 767px){.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .icons[_ngcontent-%COMP%]{flex-flow:column;align-items:center;gap:.5rem}}.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .icons-item[_ngcontent-%COMP%]{margin-top:-2.188rem;display:flex;flex-direction:column;align-items:center;flex:0 1 12rem}@media (max-width: 767px){.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .icons-item[_ngcontent-%COMP%]{margin:.25rem;flex:none}}.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .icons-item[_ngcontent-%COMP%]:nth-child(2){flex-direction:column-reverse;margin-top:0;justify-items:center}@media (max-width: 767px){.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .icons-item[_ngcontent-%COMP%]:nth-child(2){flex-direction:column}}.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .icons-item[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:auto;height:3.125rem;max-width:fit-content}.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .icons-item-text[_ngcontent-%COMP%]{margin:.563rem 0;color:var(--text);font-size:var(--font-size-lg);font-weight:var(--font-weight-bold);font-family:Caveat,sans-serif;width:100%}@media (max-width: 767px){.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .icons-item-text[_ngcontent-%COMP%]{margin:.75rem 0 1rem;font-size:1rem;max-width:10rem}}.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .form-container[_ngcontent-%COMP%]{width:clamp(20rem,34.28vw,36rem);margin:0 auto}@media (max-width: 767px){.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .form-container[_ngcontent-%COMP%]{width:16rem;margin:0 auto;min-width:auto}}@media (min-width: 768px) and (max-width: 1023px){.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .form-container[_ngcontent-%COMP%]{width:clamp(20rem,50vw,30rem)}}.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .form-container[_ngcontent-%COMP%]   .search-button[_ngcontent-%COMP%]{font-size:var(--font-size-sm)}@media (max-width: 767px){.content-wrapper.option-2-layout[_ngcontent-%COMP%]   .form-container[_ngcontent-%COMP%]   .search-button[_ngcontent-%COMP%]{padding:1rem 2.5rem}}.content-wrapper.option-3-layout[_ngcontent-%COMP%]{background:var(--order-tracker-custom-bg, url("./media/map-QJ75YJ75.avif")) no-repeat right -25px/cover;padding:1.75rem 4.5rem var(--order-tracker-padding-bottom);margin:2rem 2.25rem}@media (max-width: 420px) and (orientation: portrait){.content-wrapper.option-3-layout[_ngcontent-%COMP%]{background-position:calc(100% + 50px) top!important;background-size:auto 24.5vw!important;padding-top:24.5vw!important}}@media (max-width: 767px){.content-wrapper.option-3-layout[_ngcontent-%COMP%]{margin:2.125rem 1rem;padding:6.688rem 1rem var(--order-tracker-padding-bottom);background:var(--order-tracker-custom-bg, url("./media/map_mobile-2HJB73PK.avif")) no-repeat right top,var(--page-background)}}@media screen and (min-width: 420px) and (max-width: 638px){.content-wrapper.option-3-layout[_ngcontent-%COMP%]{background-position:calc(100% + (638px - 100vw)/218px*53px) top}}@media screen and (min-width: 639px) and (max-width: 767px){.content-wrapper.option-3-layout[_ngcontent-%COMP%]{background-size:calc(100% + 15.876rem) 100%;background-position:calc(100% + (100vw - 639px)/130px*53px);padding:2.25rem 1.5rem var(--order-tracker-padding-bottom);margin:2rem 1.5rem;background-image:var(--order-tracker-custom-bg, url("./media/map-QJ75YJ75.avif"))}}@media (min-width: 1024px) and (max-width: 1199px){.content-wrapper.option-3-layout[_ngcontent-%COMP%]{background-position:right center;
730padding:2.125rem 2.25rem var(--order-tracker-padding-bottom)}}@media (min-width: 768px) and (max-width: 1023px){.content-wrapper.option-3-layout[_ngcontent-%COMP%]{background-size:calc(100% + 15.876rem) 108%;background-position:calc(100% + (1024px - 100vw)/256px*53px) 108%;padding:2.25rem 1.5rem var(--order-tracker-padding-bottom)}}@media (min-width: 1400px){.content-wrapper.option-3-layout[_ngcontent-%COMP%]{background:var(--order-tracker-custom-bg, url("./media/map_big-WDZKAPYM.avif")) no-repeat right bottom/cover}}.content-wrapper.option-3-layout.has-custom-bg[_ngcontent-%COMP%]{background-repeat:no-repeat!important;background-position:center center!important;background-size:cover!important}.content-wrapper.option-3-layout[_ngcontent-%COMP%]:after{content:none}.content-wrapper.option-3-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{line-height:normal}@media screen and (max-width: 638px){.content-wrapper.option-3-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{padding-top:.625rem}}@media (min-width: 1024px){.content-wrapper.option-3-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:1.75rem}}@media (min-width: 1400px){.content-wrapper.option-3-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{line-height:2.625rem}}.content-wrapper.option-3-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .sub-title[_ngcontent-%COMP%]{line-height:1.5rem;white-space:nowrap}@media (max-width: 767px){.content-wrapper.option-3-layout[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .sub-title[_ngcontent-%COMP%]{white-space:wrap}}.form-container[_ngcontent-%COMP%]   .input-wrapper[_ngcontent-%COMP%]{position:relative}.form-container[_ngcontent-%COMP%]   .input-wrapper[_ngcontent-%COMP%]   .search-button[_ngcontent-%COMP%]{position:absolute;right:0;top:0;z-index:3;padding:1rem 2.5rem;font-size:var(--font-size-sm);font-weight:var(--font-weight-bold)}@media (max-width: 340px){.form-container[_ngcontent-%COMP%]   .input-wrapper[_ngcontent-%COMP%]   .search-button[_ngcontent-%COMP%]{right:calc(24px + 4vw)}}']})}}return h})();var P_={layoutOption:{type:"string",data:"Option 1"},phoneOption:{type:"string",data:"Option 1"},phoneImage:{type:"image",data:{url:"",altText:""},dependsOnOption:{key:"phoneOption",options:["Option 2"]}},title:{type:"string",data:"Get Our Mobile App Now!"},subTitle:{type:"text",data:"Ordering is as easy as eating a Pizza! With this app you can track your loyalty points, view your coupons, pay with your gift card and order your favorite food online.",option:"Option 1"}};function Tb(h,k){if(h&1&&(I(0,"div",2),X(1),E()),h&2){let n=A();w(),St(n.data.subTitle==null?null:n.data.subTitle.data)}}function Ib(h,k){if(h&1&&(I(0,"div",5)(1,"span",6)(2,"a",7),it(3,"img",8),E()()()),h&2){let n=A();w(2),Ya("href",n.androidAppLink,Se),qt("aria-label","Google Play (opens in a new tab)"),w(),j("ngSrc","../../../assets/components/mobile-app-ad/googleplay.svg")("alt","Google Play Store logo")}}function kb(h,k){if(h&1&&(I(0,"div",5)(1,"span",6)(2,"a",7),it(3,"img",9),E()()()),h&2){let n=A();w(2),Ya("href",n.iosAppLink,Se),qt("aria-label","App Store (opens in a new tab)"),w(),j("ngSrc","../../../assets/components/mobile-app-ad/appstore.svg")("alt","App Store logo")}}function Eb(h,k){if(h&1&&(I(0,"div",12)(1,"div",13),it(2,"img",14),E()()),h&2){let n,c=A(2);ue("--smartphone-image","url(/assets/components/mobile-app-ad/smartphone.avif)"),w(2),j("ngSrc",((n=c.merchantConfig())==null||n.theme==null?null:n.theme.logo)||"../../../assets/images/default-theme-images/logo.png")}}function zb(h,k){if(h&1&&(I(0,"div",16),it(1,"img",17),E()),h&2){let n=A(3);w(),j("src",n.data.phoneImage==null||n.data.phoneImage.data==null?null:n.data.phoneImage.data.url,Se)("alt",(n.data.phoneImage==null||n.data.phoneImage.data==null?null:n.data.phoneImage.data.altText)||"Phone preview")}}function Ab(h,k){if(h&1&&(I(0,"div",15),ut(1,zb,2,2,"div",16),E()),h&2){let n=A(2);ue("--smartphone-image","url(/assets/components/mobile-app-ad/smartphone-fullscreen.avif)"),w(),rt(!(n.data.phoneImage==null||n.data.phoneImage.data==null)&&n.data.phoneImage.data.url?1:-1)}}
730function Lb(h,k){if(h&1&&ut(0,Eb,3,3,"div",10)(1,Ab,2,3,"div",11),h&2){let n=A();rt((n.data.phoneOption==null?null:n.data.phoneOption.data)==="Option 1"?0:1)}}var O_=(()=>{class h{constructor(n){this.componentConfig=n,this.merchantConfig=gt(Wn).merchantConfig,this.GOOGLE_PLAY_LINK="https://play.google.com/store/apps/details?id=",this.APPS_APPLE_LINK="https://apps.apple.com/app/id",this.data=te(te({},P_),this.componentConfig?.data)}get androidAppLink(){return this.GOOGLE_PLAY_LINK+(this.merchantConfig()?.brand?.androidAppId??"")}get iosAppLink(){return this.APPS_APPLE_LINK+(this.merchantConfig()?.brand?.iOSAppId??"")}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-mobile-app-ad"]],standalone:!0,features:[Kt],decls:10,vars:6,consts:[[1,"mobile-app-ad",3,"ngClass"],[1,"title"],[1,"sub-title"],[1,"app-promotion"],[1,"scan-codes-wrapper"],[1,"scan-code-container"],[1,"social-links"],[3,"href"],["width","136","height","40",3,"ngSrc","alt"],["width","135","height","40",3,"ngSrc","alt"],[1,"smartphone-image",3,"--smartphone-image"],[1,"smartphone-image","smartphone-image--fullscreen",3,"--smartphone-image"],[1,"smartphone-image"],[1,"smartphone-logo"],["alt","Logo","fill","",1,"logo",3,"ngSrc"],[1,"smartphone-image","smartphone-image--fullscreen"],[1,"smartphone-insert"],["fill","",1,"phone-image",3,"src","alt"]],template:function(c,d){c&1&&($o(0),I(1,"div",0)(2,"h2",1),X(3),E(),ut(4,Tb,2,1,"div",2),I(5,"div",3)(6,"div",4),ut(7,Ib,4,4,"div",5)(8,kb,4,4,"div",5),E()(),ut(9,Lb,2,1),E(),Go()),c&2&&(w(),j("ngClass",d.data.layoutOption.data.toLowerCase().replace(" ","-")+"-layout"),w(2),St(d.data.title==null?null:d.data.title.data),w(),rt(d.data.layoutOption.data!=="Option 2"?4:-1),w(3),rt(d.androidAppLink?7:-1),w(),rt(d.iosAppLink?8:-1),w(),rt(d.data.layoutOption.data==="Option 2"?9:-1))},dependencies:[ve,Ye,mn],styles:['[_nghost-%COMP%]{display:block;width:100%;background-color:var(--white)}.mobile-app-ad[_ngcontent-%COMP%]{width:calc(100% - 6.5rem);margin:3.625rem 3.25rem;background-color:var(--primary);color:var(--white);border-radius:1.25rem;padding:2.5rem 25%;text-align:center}.mobile-app-ad[_ngcontent-%COMP%]   .app-promotion[_ngcontent-%COMP%]   .social-links[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:auto}@media (max-width: 767px){.mobile-app-ad[_ngcontent-%COMP%]{width:calc(100% - 3rem);padding:2rem;margin:2.75rem 1.5rem}}.mobile-app-ad.option-1-layout[_ngcontent-%COMP%]{display:inline-block}.mobile-app-ad.option-1-layout[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-family:Caveat,"sans-serif";font-size:40px;margin-bottom:1rem;font-weight:var(--font-weight-bold)}@media (max-width: 767px){.mobile-app-ad.option-1-layout[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:var(--font-size-xl);margin-bottom:2rem}}.mobile-app-ad.option-1-layout[_ngcontent-%COMP%]   .sub-title[_ngcontent-%COMP%]{font-size:var(--font-size-med);margin-bottom:1.5rem;font-weight:var(--font-weight-regular);line-height:normal}@media (max-width: 767px){.mobile-app-ad.option-1-layout[_ngcontent-%COMP%]   .sub-title[_ngcontent-%COMP%]{font-size:var(--font-size-sm);margin-bottom:2.5rem}}.mobile-app-ad.option-1-layout[_ngcontent-%COMP%]   .scan-codes-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:1.5rem}.mobile-app-ad.option-1-layout[_ngcontent-%COMP%]   .scan-codes-wrapper[_ngcontent-%COMP%]   .social-links[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:165px}@media (max-width: 767px){.mobile-app-ad.option-1-layout[_ngcontent-%COMP%]   .scan-codes-wrapper[_ngcontent-%COMP%]   .social-links[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:120px}}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]{padding:3rem 0rem 4.188rem 15.625rem;position:relative;margin:5.625rem 3.25rem;text-align:left;width:calc(100% - 6.5rem);display:inline-block}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .smartphone-image[_ngcontent-%COMP%]{background-image:var(--smartphone-image);background-repeat:no-repeat;background-position:left top;background-size:contain;width:20.688rem;height:26.125rem;position:absolute;top:-5.125rem;right:10.25rem}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .smartphone-image.smartphone-image--fullscreen[_ngcontent-%COMP%]{background-image:none}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .smartphone-image.smartphone-image--fullscreen[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:0;background-image:var(--smartphone-image);background-repeat:no-repeat;background-position:left top;background-size:contain;pointer-events:none;z-index:2}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .smartphone-image[_ngcontent-%COMP%]   .smartphone-insert[_ngcontent-%COMP%]{position:absolute;top:1%;left:47%;width:51.7%;height:91.4%;overflow:hidden;border-radius:17%/7.6%;z-index:1;transform:matrix(1,.1,-.42,.99,0,0);transform-origin:top left}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .smartphone-image[_ngcontent-%COMP%]   .smartphone-insert[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;object-position:center;display:block}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .smartphone-logo[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;width:clamp(6rem,42%,7rem);height:min(38%,6.25rem);max-width:42%;transform:translate(-58%,-50%) skewY(-7deg) rotate(21deg);transform-origin:center}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .smartphone-logo[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{object-fit:contain}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:2.25rem;font-weight:var(--font-weight-bold);text-transform:capitalize;margin-bottom:2.5rem;line-height:normal}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .scan-codes-wrapper[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;gap:1.5rem}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .scan-codes-wrapper[_ngcontent-%COMP%]   .social-links[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:165px}@media (max-width: 767px){.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .scan-codes-wrapper[_ngcontent-%COMP%]   .social-links[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{display:block}}@media (min-width: 1200px) and (max-width: 1399px){.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]{margin:5.063rem 2rem;padding:3rem 0rem 2.875rem 9.813rem;width:calc(100% - 4rem)}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:2rem;margin-bottom:1.5rem}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .smartphone-image[_ngcontent-%COMP%]{width:17.125rem;height:21.625rem;right:6.25rem;top:-4rem}}@media (min-width: 1024px) and (max-width: 1199px){.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]{margin:5.063rem 2rem;padding:3rem 0rem 2.875rem 9.813rem;width:calc(100% - 4rem)}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:2rem;margin-bottom:1.5rem}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .smartphone-image[_ngcontent-%COMP%]{width:17.125rem;height:21.625rem;right:6.25rem;top:-4rem}}@media (min-width: 768px) and (max-width: 1023px){.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]{margin:4.5rem 1rem;padding:3.5rem 0rem 2rem 6.25rem;width:calc(100% - 2rem)}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:1.5rem;margin-bottom:1.5rem}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .smartphone-image[_ngcontent-%COMP%]{width:15rem;height:19rem;right:3.75rem;top:-3.5rem}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .scan-codes-wrapper[_ngcontent-%COMP%]   .social-links[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:8.5rem}}@media screen and (max-width: 767px) and (min-width: 620px){.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]{margin:4.5rem 0;padding:3.5rem 0rem 2rem 0;padding-left:calc(67px + (100% - 620px)*1/148px*33px);width:100%;border-radius:0}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:1.5rem;margin-bottom:1.5rem}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .smartphone-image[_ngcontent-%COMP%]{width:15rem;height:19rem;right:calc(37px + (100vw - 620px)/148px*54px);top:-3.875rem}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .scan-codes-wrapper[_ngcontent-%COMP%]   .social-links[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:8.5rem}}@media screen and (max-width: 620px) and (min-width: 420px){.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]{margin:calc(46px + (100% - 420px)*1/200px*26px) 0;padding-top:calc(14px + (100vw - 420px)/200px*10px);padding-right:0;padding-bottom:1rem;padding-left:calc(24px + (100vw - 420px)/200px*43px);width:100%;border-radius:0}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:calc(16px + (100vw - 420px)/200px*8px);margin-bottom:calc(21px - ((100vw - 420px)/200px*9px))}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .smartphone-image[_ngcontent-%COMP%]{width:calc(194px + (100vw - 420px)/200px*26px);height:calc(245px + (100vw - 420px)/200px*33px);right:calc(8px + (100vw - 420px)/200px*29px);top:calc(-46px - ((100vw - 420px)/200px*10px))}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .scan-codes-wrapper[_ngcontent-%COMP%]{flex-wrap:wrap;gap:.5rem;width:8.25rem}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .scan-codes-wrapper[_ngcontent-%COMP%]   .social-links[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:calc(120px + (100vw - 420px)/200px*11px)}}@media (max-width: 420px) and (orientation: portrait){.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]{margin:2.875rem 0;padding:.875rem 0rem 1rem 1.5rem;width:100%;border-radius:0}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:1rem;margin-bottom:1.313rem}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .smartphone-image[_ngcontent-%COMP%]{width:12.125rem;height:15.313rem;right:.5rem;top:-2.875rem}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .scan-codes-wrapper[_ngcontent-%COMP%]{flex-wrap:wrap;gap:.5rem;width:8.25rem}.mobile-app-ad.option-2-layout[_ngcontent-%COMP%]   .scan-codes-wrapper[_ngcontent-%COMP%]   .social-links[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:7.5rem}}']})}}return h})();var S_={layoutOption:{type:"string",data:"Option 1"},mobileCardsLayoutOption:{type:"string",data:"Option 1"},title:{type:"string",data:"Earn, Redeem, Repeat"},subtitle:{type:"string",data:"Gain points and turn them into rewards"},join:{title:{type:"string",data:"Join as member to start enjoying the loyalty program"},button:{type:"string",data:"Join"}},points:{title:{type:"string",data:"Earn Points"},subtitle:{type:"string",data:"Join our loyalty program now and earn:"},coupon:{type:"string",data:"coupon"},welcome:{first:{type:"string",data:"points"},second:{type:"string",data:"as welcome bonus"}},rewards:{title:{type:"string",data:"Redeem Rewards"},subtitle:{type:"string",data:"Redeem your points for exclusive rewards and enjoy exciting privileges!"}}},backgroundColor:{type:"string",data:"rgb(53, 53, 53)",option:"Option 2"},backgroundImage:{type:"image",data:{url:"assets/images/default-theme-images/dba45f050aedc088f33871d032e7d1c731019c40.png"},option:"Option 1"}};var as=(()=>{class h{constructor(){this.authService=gt(Mn),this.merchantConfig=gt(Wn).merchantConfig,this.httpClient=gt(Zi),this._history=Te(null),this.history=Ut(()=>this._history()),this._notifications=Te(null),this.notifications=Ut(()=>this._notifications()),this._loyaltyMembership=Te(null),this.loayaltyMembership=Ut(()=>this._loyaltyMembership()),this._selectedLoyaltyStep=Te(0),this.selectedLoyaltyStep=Ut(()=>this._selectedLoyaltyStep()),ii(()=>{this.authService.state().account?.email&&this.authService.state().account?.signupForLoyalty&&this.fetchLoyaltyProgram().subscribe()})}fetchMembershipHistory(){return this.authService.account()?$i(this.authService.account().loyalty.memberships[0].history):$i([])}joinLoyaltyProgram(n){return this.httpClient.post(qn.api+"/loyalty/signup",n).pipe(Wa(()=>this.authService.initUser()),Wa(c=>$i(c)))}fetchLoyaltyProgram(){return this.authService.initUser().pipe(Wa(n=>(this._loyaltyMembership.set(n.loyalty.membership[0]),n.loyalty.membership[0])))}selectLoyaltyStep(n){this._selectedLoyaltyStep.set(n)}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275prov=zn({token:h,factory:h.\u0275fac,providedIn:"root"})}}return h})();function Db(h,k){if(h&1&&it(0,"app-icon",1),h&2){let n=A();j("name",n.iconNameType.spinnerIcon)("spin",!0)}}var ku=(()=>{class h{constructor(){this.label=zt.required(),this.loading=zt(!1),this.type=zt("button"),this.fontSize=zt(),this.padding=zt(),this.height=zt(),this.clickAction=new Kn,this.iconNameType=ge}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-accent-button"]],inputs:{label:[1,"label"],loading:[1,"loading"],type:[1,"type"],fontSize:[1,"fontSize"],padding:[1,"padding"],height:[1,"height"]},outputs:{clickAction:"clickAction"},standalone:!0,features:[Kt],decls:3,vars:10,consts:[[1,"button-accent",3,"click","type","ariaLabel"],[1,"loading-icon",3,"name","spin"]],template:function(c,d){c&1&&(I(0,"button",0),Ot("click",function(){return d.clickAction.emit()}),ut(1,Db,1,2,"app-icon",1),X(2),E()),c&2&&(ue("font-size",d.fontSize())("padding",d.padding())("height",d.height()),j("type",d.type())("ariaLabel",d.label()),w(),rt(d.loading()?1:-1),w(),Rt(" ",d.label(),`
731`))},dependencies:[Ae],styles:["[_nghost-%COMP%]{width:100%}button[_ngcontent-%COMP%]{width:100%;font-weight:700;display:flex;gap:8px}.loading-icon[_ngcontent-%COMP%]{min-width:16px}"]})}}return h})();var Fb=["scrollableProgressBar"],Rb=h=>({width:h}),Bb=h=>({left:h}),Nb=(h,k)=>({selected:h,reached:k}),Vb=h=>({transform:h}),T_=(h,k)=>({negative:h,positive:k});function jb(h,k){if(h&1){let n=Yt();I(0,"button",18),Ot("click",function(){let d=kt(n).$index,a=A();return Et(a.selectLoyaltyStep(d))}),I(1,"div",19)(2,"span"),X(3),E()()()}if(h&2){let n=k.$index,c=A();j("ngStyle",me(3,Bb,c.getLeftFromIndex(n))),w(),j("ngClass",en(5,Nb,n===c.selectedStep,c.isAwardReached(n))
731),w(2),St(n+1)}}function Ub(h,k){if(h&1&&(I(0,"div",20)(1,"div",21)(2,"span",6),X(3),E(),it(4,"app-icon",22),E()()),h&2){let n=A();Xa(n.historyExpanded?"padding-bottom: 20px; transition: all 0.2s":"padding-bottom: 0px; transition: all 0.2ss"),w(3),St(n.historyExpanded?"Hide History":"View History"),w(),j("name",n.iconName.arrow)("ngStyle",me(5,Vb,n.historyExpanded?"rotate(-180deg)":"rotate(0deg)"))}}function $b(h,k){h&1&&it(0,"div",24)}function Gb(h,k){if(h&1&&le(0,$b,1,0,"div",24,tl),h&2){let n=A(2);ce(n.ghostArray())}}function Zb(h,k){if(h&1){let n=Yt();I(0,"div",25),it(1,"img",26),I(2,"span",6),X(3,"No rewards activity yet."),E(),I(4,"span",27),X(5,"Start earning points with every order and unlock exclusive rewards!"),E(),I(6,"button",28),Ot("click",function(){kt(n);let d=A(3);return Et(d.backToMenu())}),X(7," Start Ordering "),E()()}h&2&&(w(),j("ngSrc","../../../assets/images/no-rewards-history.avif")("alt","No history"))}function Hb(h,k){if(h&1&&it(0,"app-icon",31),h&2){let n=A(5);j("name",n.iconName.star)("size","24px")}}function qb(h,k){h&1&&it(0,"img",32),h&2&&j("ngSrc","../../../assets/icons/open_gift_box.png")("alt","Open gift box")}function Wb(h,k){if(h&1&&it(0,"app-icon",33),h&2){let n=A(5);j("name",n.iconName.couponIcon)("size","3.625rem")}}function Xb(h,k){if(h&1&&(I(0,"span"),X(1),E()),h&2){let n=A(2).$implicit,c=A(4);w(),Qn(" ",n.points<0?"-":"+","",c.formatPoints(n.points)," points ")}}function Kb(h,k){if(h&1&&(I(0,"div",37),ut(1,Xb,2,2,"span"),E()),h&2){let n=A().$implicit;j("ngClass",en(2,T_,n.points<0,n.points>0)),w(),rt(n.points!==0?1:-1)}}function Yb(h,k){if(h&1&&(I(0,"div",29)(1,"div",5)(2,"div",30),ut(3,Hb,1,2,"app-icon",31)(4,qb,1,2,"img",32)(5,Wb,1,2,"app-icon",33),E(),I(6,"div",34)(7,"span",35),X(8),E(),I(9,"span",36),X(10),E()()(),ut(11,Kb,2,5,"div",37),E()),h&2){let n=k.$implicit,c=A(4);w(3),rt(n.points>0?3:n.points<0?4:5),w(3),j("ngClass",en(5,T_,n.points<0,n.points>0)),w(2),St(c.getInfoText(n)),w(2),St(c.getDate(n)),w(),rt(n.points!==0?11:-1)}}function Qb(h,k){if(h&1&&le(0,Yb,12,8,"div",29,tl),h&2){let n=A(3);ce(n.history())}}function Jb(h,k){if(h&1&&ut(0,Zb,8,2,"div",25)(1,Qb,2,0),h&2){let n=A(2);rt(n.history().length===0?0:1)}}function tC(h,k){if(h&1&&(I(0,"div",23),ut(1,Gb,2,0)(2,Jb,2,1),E()),h&2){let n=A();w(),rt(n.loadingHistory?1:2)}}var I_=(()=>{class h{constructor(){this.authService=gt(Mn),this.configService=gt(Ee),this.layoutService=gt(pn),this.httpClient=gt(Zi),this.loyaltyService=gt(as),this.router=gt(Ja),this.merchantConfig=gt(Wn).merchantConfig(),this.brandConfigService=gt(Ee),this.localizationService=gt(un),this.modalService=gt(Gn),this.storeData=this.brandConfigService.storeData,this.account=Ut(()=>this.authService.account()),this.storeId=this.brandConfigService.singleStore()?.id,this.iconName=ge,this.progressBarWidth=0,this.historyExpanded=!1,this.decimalPipe=gt(om),this.userCoupons=Ut(()=>{let n=this.authService.account();return n?n.loyalty.memberships?.flatMap(c=>c.coupons)??[]:[]}),this.lifetimePoints=Ut(()=>this.formatNumber(this.loyaltyMembership()?.lifetimePoints??0)),this.loyaltyMembership=Ut(()=>this.authService.account()?.loyalty?.memberships[0]??null),this.awards=Ut(()=>this.merchantConfig.brand.plans[0].planAwards),this.points=Ut(()=>this.loyaltyMembership()?.availablePoints??0),this.topAmount=Ut(()=>this.awards().reduce((n,c)=>n.amount>c.amount?n:c).amount),this.nextAward=Ut(()=>this.awards().sort((n,c)=>n.amount-c.amount).find(n=>n.amount>this.points())),this.focusAward=new Kn,this.history=Ut(()=>this.account()?.loyalty?.memberships[0]?.history||[]),this.loadingHistory=!1,this.historyFetched=!1,this.ghostArray=Ut(()=>Array.from({length:5},(n,c)=>c+1))}formatNumber(n){return this.decimalPipe.transform(n,"1.0-0")||""}handleExpansion(n){n&&!this.historyFetched&&(this.loadingHistory=!0,this.historyFetched=!0,this.loyaltyService.fetchMembershipHistory().subscribe({next:()=>{this.loadingHistory=!1},error:()=>{this.loadingHistory=!1}})),this.historyExpanded=n}clamp(n,c,d){return Math.max(c,Math.min(n,d))}ngOnChanges(n){if(n.selectedStep){let c=this.progressBar?.nativeElement.scrollWidth,a=this.awards()[this.clamp(this.selectedStep,0,this.awards().length-1)].amount/this.topAmount()*c-20-this.progressBar?.nativeElement.offsetWidth/2;this.progressBar?.nativeElement.scrollTo({left:a,behavior:"smooth"})}}backToMenu(){this.modalService.openModal(Ln.StoresMap)}isAwardReached(n){let c=this.awards()[n];return this.userCoupons().some(z=>z.name===c.name)||this.points()>=c.amount}get circleWidth(){return this.layoutService.viewport()==="mobile"?20:40}getLeftFromIndex(n){return`calc(${(n+1)/this.awards().length*100}% - ${this.circleWidth}px)`}getPercentageLoad(){if(this.points()>=this.topAmount())return"100%";let n=this.awards().length,c=this.awards().sort((yt,ie)=>yt.amount-ie.amount).findIndex(yt=>yt.amount>=this.points())-1;if(c===-1)return`${this.points()/this.awards()[0].amount*(100/n)}%`;let d=c+1,a=this.awards()[c].amount,z=this.awards()[d].amount,J=this.points()-a;return`${d/n*100+J/(z-a)*(100/n)}%`}getProgressText(){return this.topAmount()<=this.points()?this.localizationService.getLocalizationString("route.loyalty.membership.reached_goal").toString():this.nextAward()?this.localizationService.getLocalizationString("route.loyalty.membership.getting_there",{points:this.nextAward().amount-this.points()}).toString():this.localizationService.getLocalizationString("route.loyalty.membership.getting_there_generic").toString()}getInfoText(n){return n.type==="Award"?n.points===0?`Earned coupon "${n.reason}"`:`Redeemed coupon "${n.reason}"`:n.type==="Regular Order Points"?n.points===0?n.reason.split("of")[0].trim():n.reason.split("of")[0].trim()+" Points":n.reason}getDate(n){let c=new Date(n.when),d=c.getFullYear(),a=this.addZero(c.getMonth()+1),z=this.addZero(c.getDate());return`${a}/${z}/${d}`}addZero(n){let c=n;return n<10&&(c="0"+n),c}getCouponType(n){return n.type==="Award Issued"?"negative":"positive"}formatPoints(n){return Math.abs(n).toString()}get selectedStep(){return this.loyaltyService.selectedLoyaltyStep()}selectLoyaltyStep(n){this.loyaltyService.selectLoyaltyStep(n)}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-membership-progress-bar"]],viewQuery:function(c,d){if(c&1&&$e(Fb,5),c&2){let a;Ge(a=Ze())&&(d.progressBar=a.first)}}
731,outputs:{focusAward:"focusAward"},standalone:!0,features:[Er([om]),ma,Kt],decls:26,vars:9,consts:[["scrollableProgressBar",""],["heading",""],["content",""],[1,"colored-container"],[1,"inner-container"],[1,"title-container"],[1,"title"],[1,"points"],[1,"lifetime"],[1,"lifetimePoints"],[1,"progress-bar-wrapper"],[1,"progress-bar-container"],[1,"progress-bar"],[1,"progress",3,"ngStyle"],[1,"points-container"],[1,"undecorated-button",3,"ngStyle"],[1,"progress-text"],[1,"history-container",3,"isExpanded","ariaControlsName"],[1,"undecorated-button",3,"click","ngStyle"],[1,"point-circle",3,"ngClass"],[1,"header-container"],[1,"header"],[1,"icon",3,"name","ngStyle"],[1,"content"],[1,"history-item","ghost-item"],[1,"no-history"],["loading","lazy","width","200","height","150",3,"ngSrc","alt"],[1,"subtitle"],[1,"button-accent","button",3,"click"],[1,"history-item"],[1,"icon-container"],[1,"star-icon",3,"name","size"],["loading","lazy","width","40","height","40",3,"ngSrc","alt"],[3,"name","size"],[1,"title",3,"ngClass"],[1,"top"],[1,"date"],[1,"points-container",3,"ngClass"]],template:function(c,d){if(c&1){let a=Yt();I(0,"div",3)(1,"div",4)(2,"div",5)(3,"span",6),X(4),E(),I(5,"span",7),X(6),E(),I(7,"span",8),X(8),I(9,"span",9),X(10),E()()(),I(11,"div",10,0)(13,"div",11)(14,"div",12),it(15,"div",13),E(),I(16,"div",14),le(17,jb,4,8,"button",15,tl),E()()(),I(19,"span",16),X(20),E(),I(21,"app-expandable-component",17),Ot("isExpanded",function(J){return kt(a),Et(d.handleExpansion(J))}),ut(22,Ub,5,7,"ng-template",null,1,ki)(24,tC,3,1,"ng-template",null,2,ki),E()()()}c&2&&(w(4),Rt(" ",d.localizationService.getLocalizationString("rewards.points")," "),w(2),St(d.points()),w(2),Rt("",d.localizationService.getLocalizationString("rewards.lifetime_points"),": "),w(2),Rt(" ",d.lifetimePoints()," "),w(5),j("ngStyle",me(7,Rb,d.getPercentageLoad())),w(2),ce(d.awards()),w(3),Rt(" ",d.getProgressText()," "),w(),j("ariaControlsName","expandableTitle"))},dependencies:[ve,Ye,Gi,mn,Ae,If],styles:[".colored-container[_ngcontent-%COMP%]{border-radius:1rem;padding:2.375rem 1.5rem 2rem;width:100%;background:linear-gradient(130deg,var(--primary-dark) 0%,var(--primary-dark) 62%,var(--primary) 62.5%)}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]{padding:1.25rem 0 .625rem;margin:0;border-radius:0}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]{position:relative;width:100%;display:flex;flex-direction:column;align-items:center}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .star-icon[_ngcontent-%COMP%]{background-color:var(--general-green);color:var(--white);width:2.75rem;height:2.75rem;padding:10px;border-radius:100px;display:inline-block;vertical-align:middle}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .star-icon[_ngcontent-%COMP%]{display:none}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]{display:flex;text-align:center;flex-direction:column;gap:1.25rem}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]{gap:0}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:3.75rem;height:3.75rem}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{display:none}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{color:var(--white);text-align:center;font-size:var(--font-size-2xl);font-style:normal;font-weight:var(--font-weight-regular)}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:var(--font-size-sm)}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .points[_ngcontent-%COMP%]{color:var(--white);font-size:var(--font-size-3xl);font-style:normal;font-weight:var(--font-weight-bold);line-height:2.813rem}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .points[_ngcontent-%COMP%]{font-size:var(--font-size-xl);line-height:normal}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .lifetime[_ngcontent-%COMP%]{color:var(--white);text-align:center;font-size:var(--font-size-lg);font-weight:var(--font-weight-regular)}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .lifetime[_ngcontent-%COMP%]{font-size:var(--font-size-xs)}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .lifetime[_ngcontent-%COMP%]   .lifetimePoints[_ngcontent-%COMP%]{font-weight:var(--font-weight-semi-bold)}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .lifetime[_ngcontent-%COMP%]   .lifetimePoints[_ngcontent-%COMP%]{font-size:var(--font-size-sm)}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:3.25rem;display:flex;justify-content:center;-ms-overflow-style:none;scrollbar-width:none;margin-top:2.5rem;margin-bottom:2.25rem}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]{margin-top:.5rem;margin-bottom:1.5rem;height:1.5rem;padding-top:.5rem}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]   .progress-bar-container[_ngcontent-%COMP%]{align-self:center;width:100%;margin-top:-20px;min-width:300px;max-width:1200px;position:relative}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]   .progress-bar-container[_ngcontent-%COMP%]{width:calc(100% - 1.5rem);margin-top:0;align-self:start}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]   .progress-bar-container[_ngcontent-%COMP%]   .progress-bar[_ng
731content-%COMP%]{position:absolute;top:0;width:99.5%;background-color:var(--white);height:20px;border-radius:100px}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]   .progress-bar-container[_ngcontent-%COMP%]   .progress-bar[_ngcontent-%COMP%]{height:10px}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]   .progress-bar-container[_ngcontent-%COMP%]   .progress-bar[_ngcontent-%COMP%]   .progress[_ngcontent-%COMP%]{background-color:var(--text);height:20px;transition:width 1s ease-in-out;margin-left:-1px;border-radius:100px;filter:brightness(70%)}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]   .progress-bar-container[_ngcontent-%COMP%]   .progress-bar[_ngcontent-%COMP%]   .progress[_ngcontent-%COMP%]{height:10px}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]   .progress-bar-container[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]{position:absolute;width:100%}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]   .progress-bar-container[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .undecorated-button[_ngcontent-%COMP%]{position:absolute;top:-12px;margin:0;padding:0;background-color:transparent}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]   .progress-bar-container[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .undecorated-button[_ngcontent-%COMP%]{top:-8px}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]   .progress-bar-container[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .undecorated-button[_ngcontent-%COMP%]   .point-circle[_ngcontent-%COMP%]{width:2.5rem;height:2.5rem;display:flex;align-items:center;justify-content:center;border-radius:100px;color:var(--white);border:2px solid var(--white);background-color:var(--primary)}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]   .progress-bar-container[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .undecorated-button[_ngcontent-%COMP%]   .point-circle[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]   .progress-bar-container[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .undecorated-button[_ngcontent-%COMP%]   .point-circle.reached[_ngcontent-%COMP%]{background-color:var(--white);color:var(--primary)}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]   .progress-bar-container[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .undecorated-button[_ngcontent-%COMP%]   .point-circle.selected[_ngcontent-%COMP%]{border:2px solid var(--text);animation-name:_ngcontent-%COMP%_heartbeat;animation-duration:.3s;animation-iteration-count:2;animation-direction:alternate;animation-fill-mode:both}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]   .progress-bar-container[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .undecorated-button[_ngcontent-%COMP%]   .point-circle[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:var(--font-size-med);font-style:normal;font-weight:var(--font-weight-bold)}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-bar-wrapper[_ngcontent-%COMP%]   .progress-bar-container[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .undecorated-button[_ngcontent-%COMP%]   .point-circle[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:var(--font-size-sm)}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-text[_ngcontent-%COMP%]{color:var(--white);text-align:center;font-size:var(--font-size-lg);font-weight:var(--font-weight-medium);padding:0 1.25rem;margin-bottom:2.125rem}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .progress-text[_ngcontent-%COMP%]{font-size:var(--font-size-sm);margin-bottom:1.5rem;line-height:1.25rem}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]{max-width:1220px}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   [_ngcontent-%COMP%]::-webkit-scrollbar{width:14px;padding:1px;margin:1px}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   [_ngcontent-%COMP%]::-webkit-scrollbar-track{background:var(--page-background);border-radius:6px}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   [_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--primary-dark);border-radius:6px}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   [_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--primary-dark)}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .header-container[_ngcontent-%COMP%]{display:grid;width:100%;justify-content:center}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .header-container[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{display:flex;gap:.5rem;line-height:1.25rem}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .header-container[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{color:var(--white);font-size:var(--font-size-med);font-style:normal;font-weight:var(--font-weight-medium)}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .header-container[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:var(--font-size-sm)}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .header-container[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{color:var(--white);height:1rem;width:1rem;transition:all .3s ease-in-out}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .header-container[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{height:.75rem;width:.75rem;
731align-self:center}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{max-height:600px;display:flex;flex-direction:column;gap:.5rem;overflow-y:auto;padding:0 4px;margin-top:.375rem;margin-bottom:3.375rem}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{margin-top:0;padding:0 1rem}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;background-color:var(--white);border-radius:.5rem;padding:1rem 2rem}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]{flex-direction:column-reverse;gap:.5rem;padding:.5rem 1rem;align-items:start}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{height:44px;width:44px}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .icon-container[_ngcontent-%COMP%]{height:3.75rem;width:3.75rem;line-height:3.75rem}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .icon-container[_ngcontent-%COMP%]{display:none}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem;align-items:center}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:start;gap:.5rem;color:var(--text-color);font-size:var(--font-size-med);font-style:normal;font-weight:var(--font-weight-medium);text-align:start}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{row-gap:.25rem}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%]{font-size:var(--font-size-lg);font-weight:var(--font-weight-bold)}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%]{font-size:var(--font-size-med)}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{font-size:var(--font-size-med);font-style:normal;font-weight:var(--font-weight-medium)}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{font-size:var(--font-size-sm)}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .title.negative[_ngcontent-%COMP%]{color:var(--general-red)}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .title.positive[_ngcontent-%COMP%]{color:var(--general-green)}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]{padding:.5rem 1rem;border-radius:1.875rem;font-size:var(--font-size-med);font-weight:var(--font-weight-semi-bold)}@media (max-width: 767px){.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]{padding:.125rem .5rem;font-size:.75rem;gap:.5rem}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{line-height:1.25rem;font-weight:var(--font-weight-bold)}}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .points-container.negative[_ngcontent-%COMP%]{background-color:var(--general-red-container);color:var(--general-red)}.colored-container[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]   .history-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .history-item[_ngcontent-%COMP%]   .points-container.positive[_ngcontent-%COMP%]{background-color:var(--general-green-container);color:var(--general-green)}@keyframes _ngcontent-%COMP%_heartbeat{0%{transform:scale(1)}to{transform:scale(1.2)}}@keyframes _ngcontent-%COMP%_shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.ghost-item[_ngcontent-%COMP%]{min-height:82px;gap:1rem;background-color:transparent;background:linear-gradient(60deg,#c5c5c5 25%,#fff,#c5c5c5 75%);background-size:200% 100%;animation:_ngcontent-%COMP%_shimmer 2s infinite linear}.no-history[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;padding-bottom:4rem}@media (max-width: 767px){.no-history[_ngcontent-%COMP%]{padding-bottom:.813rem}}.no-history[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:268px;height:268px}@media (max-width: 767px){.no-history[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:12.75rem;height:12.75rem}}.no-history[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{color:var(--white);text-align:center;font-size:var(--font-size-lg);font-weight:var(--font-weight-semi-bold);margin-top:1rem;margin-bottom:.5rem}@media (max-width: 767px){.no-history[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:var(--font-size-med)}}.no-history[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{color:var(--white);text-align:center;font-size:var(--font-size-med);font-weight:var(--font-weight-regular);margin-bottom:1.25rem;max-width:390px}@media (max-width: 767px){.no-history[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{font-size:var(--font-size-sm);margin-bottom:1.5rem}}.no-history[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{background-color:var(--white);color:var(--primary)}"]})}}return h})();var eC=h=>({flipped:h}),nC=h=>({"with-form":h}),k_=h=>({disabled:h});function iC(h,k){if(h&1&&it(0,"img",3),h&2){let n=A();j("ngSrc",n.data==null||n.data.backgroundImage==null||n.data.backgroundImage.data==null?null:n.data.backgroundImage.data.url),qt("alt",(n.data==null||n.data.backgroundImage==null||n.data.backgroundImage.data==null?null:n.data.backgroundImage.data.altText)||"")}}function oC(h,k){if(h&1){let n=Yt();I(0,"button",24),Ot("click",function(){kt(n);let d=A();return Et(d.changeActiveTab(d.activeTab-1))}
731),it(1,"app-icon",25),E()}if(h&2){let n=A();j("ngClass",me(2,k_,!n.activeTab)),w(),j("name",n.iconNameType.arrow)}}function rC(h,k){if(h&1&&(I(0,"span",33),it(1,"app-icon",34),X(2),E()),h&2){let n=A(3);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.email.required," ")}}function aC(h,k){if(h&1&&(I(0,"span",33),it(1,"app-icon",34),X(2),E()),h&2){let n=A(3);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.email.invalid," ")}}function sC(h,k){if(h&1&&ut(0,rC,3,2,"span",33)(1,aC,3,2,"span",33),h&2){let n=A(2);rt(n.email.hasError("required")?0:-1),w(),rt(n.email.hasError("email")?1:-1)}}function lC(h,k){if(h&1&&(I(0,"span",33),it(1,"app-icon",34),X(2),E()),h&2){let n=A(3);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.phone.required," ")}}function cC(h,k){if(h&1&&(I(0,"span",33),it(1,"app-icon",34),X(2),E()),h&2){let n=A(3);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.phone.invalid," ")}}function dC(h,k){if(h&1&&ut(0,lC,3,2,"span",33)(1,cC,3,2,"span",33),h&2){let n=A(2);rt(n.phone.hasError("required")?0:-1),w(),rt(n.phoneLength?-1:1)}}function pC(h,k){if(h&1&&(I(0,"span",35),it(1,"app-icon",36),X(2),E()),h&2){let n=k.$implicit,c=A(3);w(),j("name",c.iconNameType.error)("size","16px"),w(),St(n)}}function uC(h,k){if(h&1&&(I(0,"div",31),le(1,pC,3,3,"span",35,Ce),E()),h&2){let n=A(2);w(),ce(n.allErrors)}}function hC(h,k){if(h&1){let n=Yt();I(0,"form",26),Ot("ngSubmit",function(){kt(n);let d=A();return Et(d.joinLoyalty())}),I(1,"span",20),X(2),E(),I(3,"div",27),it(4,"app-input",28),I(5,"div",29),ut(6,sC,2,2),E()(),I(7,"div",27),it(8,"app-mask-field-input",30),I(9,"div",29),ut(10,dC,2,2)(11,uC,3,0,"div",31),E()(),I(12,"app-accent-button",32),Ot("click",function(){kt(n);let d=A();return Et(d.joinLoyalty())})("loading",function(){return kt(n),Et(!1)}),E()()}if(h&2){let n,c=A();j("formGroup",c.loyaltyForm),w(2),St(c.data==null||c.data.join==null||c.data.join.title==null?null:c.data.join.title.data),w(2),j("type","email")("placeholder","Email")("required",(n=(n=c.loyaltyPlan())==null?null:n.needsEmail)!==null&&n!==void 0?n:!1)("invalid",c.showErrors&&c.email.invalid),w(2),rt(c.showErrors&&c.email.invalid?6:-1),w(2),j("label","Mobile Phone")("maskPattern",c.maskFieldInputType.phone)("invalid",c.showErrors&&c.phone.invalid||!c.phoneLength),w(2),rt(c.showErrors?10:-1),w(),rt(c.allErrors.length?11:-1),w(),Ya("label",c.data==null||c.data.join==null||c.data.join.button==null?null:c.data.join.button.data),j("fontSize",c.layoutService.viewport()==="mobile"?"0.875rem":"0.75rem")("padding","0.75rem 0")("height","2.5rem")}}function mC(h,k){if(h&1){let n=Yt();I(0,"div",20),X(1),E(),I(2,"button",37),Ot("click",function(){kt(n);let d=A();return Et(d.joinLoyalty())}),X(3),E()}if(h&2){let n=A();w(),Rt(" ",n.data==null||n.data.join==null||n.data.join.title==null?null:n.data.join.title.data," "),w(2),Rt(" ",n.data==null||n.data.join==null||n.data.join.button==null?null:n.data.join.button.data," ")}}function gC(h,k){if(h&1&&(I(0,"div",19),it(1,"app-icon",38),I(2,"span",13)(3,"span",39)(4,"span",40),X(5),E(),X(6),E()()()),h&2){let n,c=A();w(),j("name",c.iconNameType.gift)("color","var(--primary)"),w(),qt("aria-label",c.welcomeBonusText()),w(3),Qn(" ",(n=c.loyaltyPlan())==null?null:n.signUpBonus," ",c.data==null||c.data.points==null||c.data.points.welcome==null||c.data.points.welcome.first==null?null:c.data.points.welcome.first.data," "),w(),Rt(" ",c.data==null||c.data.points==null||c.data.points.welcome==null||c.data.points.welcome.second==null?null:c.data.points.welcome.second.data," ")}}function fC(h,k){if(h&1&&(I(0,"div",19),it(1,"app-icon",38),I(2,"span",41),X(3),E()()),h&2){let n=A();w(),j("name",n.iconNameType.gift)("color","var(--primary)"),w(2),Rt(" ",n.priiceFactor()," ")}}function _C(h,k){if(h&1&&(I(0,"div",19),it(1,"app-icon",38),I(2,"span",13)(3,"span",39)(4,"span",40),X(5),E(),X(6),E()()()),h&2){let n,c=A();w(),j("name",c.iconNameType.gift)("color","var(--primary)"),w(),qt("aria-label",c.couponAwardText()),w(3),Rt(" ",(n=c.awardFromSignUp())==null?null:n.name," "),w(),Rt(" ",c.data==null||c.data.points==null||c.data.points.coupon==null?null:c.data.points.coupon.data," ")}}function yC(h,k){if(h&1&&(I(0,"div",19),it(1,"app-icon",38),I(2,"span",13),X(3),E()()),h&2){let n=A();w(),j("name",n.iconNameType.gift)("color","var(--primary)"),w(2),St(n.firstRule())}}function xC(h,k){if(h&1){let n=Yt();I(0,"button",42),Ot("click",function(){kt(n);let d=A();return Et(d.changeActiveTab(d.activeTab+1))}
731),it(1,"app-icon",25),E()}if(h&2){let n=A();j("ngClass",me(2,k_,n.activeTab===n.tabsAmount-1)),w(),j("name",n.iconNameType.arrow)}}var um=(()=>{class h{get email(){return this.loyaltyForm.controls.email}get phone(){return this.loyaltyForm.controls.phone}get phoneLength(){let n=Number(this.loyaltyForm.value.phone?.replace(/\D/g,"").length);return n===10||n===0}constructor(n){this.componentConfig=n,this.merchantConfig=gt(Wn).merchantConfig,this.errorsService=gt($r),this.configService=gt(Ee),this.layoutService=gt(pn),this.modalService=gt(Gn),this.authService=gt(Mn),this.loyaltyService=gt(as),this.isInEnjoy=zt(!1),this.successfullLoyaltyRegistration=new Kn,this.showErrors=!1,this.allErrors=[],this.maskFieldInputType=fc,this.iconNameType=ge,this.joinLoyaltySubscription=null,this.activeTab=0,this.tabsAmount=3,this.isCardFlipped=!1,this.accountState=Ut(()=>this.authService.state()),this.isSignedUpForLoyalty=Ut(()=>this.authService.state().account?.signupForLoyalty??!1),this.isLoggedIn=Ut(()=>this.authService.state().isLoggedIn),this.loyaltyPlan=Ut(()=>this.configService.loyaltyState()),this.awardFromSignUp=Ut(()=>{let c=this.configService.loyaltyState();if(!(!c||!c.planAwards))return c.planAwards.find(d=>d.amount<=(c.signUpBonus??0))}),this.priiceFactor=Ut(()=>this.loyaltyPlan()?.details.find(c=>c.includes("spent you earn"))),this.firstRule=Ut(()=>this.loyaltyPlan()?.rules?.find(c=>c.name.toLowerCase().includes("for every")&&c.name.toLowerCase().includes("spent you earn"))),this.isJoiningFormVisible=Ut(()=>!this.isSignedUpForLoyalty()&&this.isLoggedIn()),this.userCoupons=Ut(()=>this.configService),this.validationMessages={phone:{required:"Phone is required.",invalid:"Phone Number is invalid."},email:{required:"Email is required.",invalid:"Email is invalid."}},ii(()=>{this.isCardFlipped=!!this.authService.account()?.loyalty?.memberships?.length}),ii(()=>{this.loyaltyForm&&this.loyaltyForm.patchValue({phone:this.accountState().account?.phone||"",email:this.accountState().account?.email||""})}),this.data=te(te({},S_),this.componentConfig?.data)}ngOnInit(){this.loyaltyForm=new Rr({phone:new Fi(this.accountState().account?.phone,an.compose([an.required])),email:new Fi(this.accountState().account?.email,this.loyaltyPlan()?.needsEmail?an.compose([an.required,an.email]):an.email)})}joinLoyalty(){if(!this.isSignedUpForLoyalty()){if(this.isLoggedIn()){this.joinLoyaltySubscription=this.loyaltyService.joinLoyaltyProgram({planName:this.loyaltyPlan().name,phone:this.loyaltyForm.value.phone,email:this.loyaltyForm.value.email,loyaltyCard:"",giftCard:"",name:this.accountState()?.account?.name}).subscribe({next:()=>{this.isCardFlipped=!0,this.successfullLoyaltyRegistration.emit(),this.joinLoyaltySubscription=null},error:n=>{if(n.status===500)this.allErrors=["There is a connectivity issue, please try again in a few moments"];else{let c=this.errorsService.parseErrorResponse(n);this.allErrors=c.allErrors,this.joinLoyaltySubscription=null}}});return}this.modalService.closeAllModals().subscribe(()=>{this.modalService.openModal(Ln.SignIn)})}}changeActiveTab(n){n>=0&&n<this.tabsAmount&&(this.activeTab=n)}get useMobileSliderLayout(){return this.data?.mobileCardsLayoutOption?.data!=="Option 1"}get contentStyle(){return this.layoutService.viewport()==="mobile"&&this.useMobileSliderLayout?{"margin-left":`${-100*this.activeTab}%`}:{}}get containerClassName(){return{"image-overlay":this.data?.backgroundImage?.data,isInEnjoy:this.isInEnjoy(),"mobile-slider-layout":this.useMobileSliderLayout}}welcomeBonusText(){return[this.loyaltyPlan()?.signUpBonus,this.data?.points?.welcome?.first?.data,this.data?.points?.welcome?.second?.data].filter(n=>n!=null&&n!=="").join(" ")}couponAwardText(){return[this.awardFromSignUp()?.name,this.data?.points?.coupon?.data].filter(n=>n!=null&&n!=="").join(" ")}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-loyalty-overview"]],inputs:{isInEnjoy:[1,"isInEnjoy"]},outputs:{successfullLoyaltyRegistration:"successfullLoyaltyRegistration"},standalone:!0,features:[Kt],decls:46,vars:26,consts:[[1,"rewards-overview-card",3,"ngClass"],[1,"rewards-face"],[1,"top-container",3,"ngClass"],["fill","","sizes","100vw",1,"top-container__background-image",3,"ngSrc"],[1,"title-container"],[1,"title"],[1,"subtitle"],[1,"cards-wrapper"],[1,"slider-control
731s","prev-slide",3,"ngClass"],[1,"cards-container"],[1,"content",3,"ngStyle"],[1,"card",3,"ngClass"],[1,"index-indicator"],[1,"text"],[1,"card-title"],[1,"join-form",3,"formGroup"],[1,"card"],[1,"card-subtitle",2,"text-align","start"],[1,"points-container"],[1,"point-container"],[1,"card-subtitle"],["alt","Gift boxes icon","width","140","height","92",1,"boxes-icon",3,"ngSrc"],[1,"slider-controls","next-slide",3,"ngClass"],[1,"progress-face"],[1,"slider-controls","prev-slide",3,"click","ngClass"],[3,"name"],[1,"join-form",3,"ngSubmit","formGroup"],[1,"input-wrapper"],["formControlName","email",3,"type","placeholder","required","invalid"],[1,"errors-wrapper"],["formControlName","phone",3,"label","maskPattern","invalid"],[1,"generic-errors"],["type","button",1,"button-accent","join-button",3,"click","loading","fontSize","padding","height","label"],[1,"input-error"],[1,"icon",3,"name"],[1,"error"],[1,"icon",3,"name","size"],[1,"button-accent","join-button",3,"click"],[3,"name","color"],["aria-hidden","true"],[1,"highlighted"],[1,"highlighted","text"],[1,"slider-controls","next-slide",3,"click","ngClass"]],template:function(c,d){if(c&1&&(I(0,"div",0)(1,"div",1)(2,"div",2),ut(3,iC,1,2,"img",3),I(4,"div",4)(5,"h2",5),X(6),E(),I(7,"span",6),X(8),E()(),I(9,"div",7),ut(10,oC,2,4,"button",8),I(11,"div",9)(12,"div",10)(13,"div",11)(14,"div",12)(15,"span",13),X(16,"1"),E()(),I(17,"div",14),X(18),E(),ut(19,hC,13,16,"form",15)(20,mC,4,2),E(),I(21,"div",16)(22,"div",12)(23,"span",13),X(24,"2"),E()(),I(25,"div",14),X(26),E(),I(27,"div",17),X(28),E(),I(29,"div",18),ut(30,gC,7,6,"div",19)(31,fC,4,3,"div",19)(32,_C,7,5,"div",19)(33,yC,4,3,"div",19),E()(),I(34,"div",16)(35,"div",12)(36,"span",13),X(37,"3"),E()(),I(38,"div",14),X(39),E(),I(40,"div",20),X(41),E(),it(42,"img",21),E()()(),ut(43,xC,2,4,"button",22),E()()(),I(44,"div",23),it(45,"app-membership-progress-bar"),E()()),c&2){let a,z;j("ngClass",me(22,eC,d.isCardFlipped)),w(2),ue("background-color",(d.data==null||d.data.backgroundColor==null?null:d.data.backgroundColor.data)||"var(--page-background)"),j("ngClass",d.containerClassName),w(),rt(!(d.data==null||d.data.backgroundImage==null||d.data.backgroundImage.data==null)&&d.data.backgroundImage.data.url&&(d.data==null||d.data.layoutOption==null?null:d.data.layoutOption.data)==="Option 1"?3:-1),w(3),St(d.data==null||d.data.title==null?null:d.data.title.data),w(2),St(d.data==null||d.data.subtitle==null?null:d.data.subtitle.data),w(2),rt(d.layoutService.viewport()==="mobile"&&d.useMobileSliderLayout?10:-1),w(2),j("ngStyle",d.contentStyle),w(),j("ngClass",me(24,nC,d.isJoiningFormVisible())),w(5),Rt(" ",d.data==null||d.data.join==null||d.data.join.button==null?null:d.data.join.button.data," "),w(),rt(d.isJoiningFormVisible()?19:20),w(7),Rt(" ",d.data==null||d.data.points==null||d.data.points.title==null?null:d.data.points.title.data," "),w(2),Rt(" ",d.data==null||d.data.points==null||d.data.points.subtitle==null?null:d.data.points.subtitle.data," "),w(2),rt((a=d.loyaltyPlan())!=null&&a.signUpBonus?30:-1),w(),rt(d.priiceFactor()?31:-1),w(),rt(d.awardFromSignUp()?32:-1),w(),rt(!d.awardFromSignUp()&&!((z=d.loyaltyPlan())!=null&&z.signUpBonus)&&d.firstRule()?33:-1),w(6),Rt(" ",d.data==null||d.data.points==null||d.data.points.rewards==null||d.data.points.rewards.title==null?null:d.data.points.rewards.title.data," "),w(2),Rt(" ",d.data==null||d.data.points==null||d.data.points.rewards==null||d.data.points.rewards.subtitle==null?null:d.data.points.rewards.subtitle.data," "),w(),j("ngSrc","../../../assets/images/gift_boxes.avif"),w(),rt(d.layoutService.viewport()==="mobile"&&d.useMobileSliderLayout?43:-1)}},dependencies:[Ur,Ae,ve,Ye,Gi,mn,Ho,Br,Hi,Fr,jr,Nr,Vr,ku,_c,I_],styles:[".rewards-overview-card[_ngcontent-%COMP%]{position:relative;transition:all .3s}.rewards-overview-card[_ngcontent-%COMP%]   .progress-face[_ngcontent-%COMP%]{display:none;transform:rotateX(180deg);transition:all .3s;opacity:0}.rewards-overview-card[_ngcontent-%COMP%]   .rewards-face[_ngcontent-%COMP%]{opacity:1;transition:all .3s}.rewards-overview-card.flipped[_ngcontent-%COMP%]{transform:rotateX(180deg)}.rewards-overview-card.flipped[_ngcontent-%COMP%]   .rewards-face[_ngcontent-%COMP%]{display:none;opacity:0}
731.rewards-overview-card.flipped[_ngcontent-%COMP%]   .progress-face[_ngcontent-%COMP%]{display:block;opacity:1}.top-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:3rem;gap:1.375rem;position:relative;overflow:hidden;min-height:600px}.top-container__background-image[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;z-index:0}.top-container[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(.top-container__background-image){position:relative;z-index:1}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]{padding:1rem;border-radius:0;gap:1rem}}@media (max-width: 1023px){.top-container.isInEnjoy[_ngcontent-%COMP%]{border-radius:0}}@media (max-width: 767px){.top-container.mobile-slider-layout[_ngcontent-%COMP%]{overflow:hidden;position:relative;row-gap:1.5rem;padding:3rem 0 0}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]{width:100%;position:relative;padding:0 3.313rem 3rem}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]{width:100%;overflow:hidden;align-items:baseline}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;width:300%;gap:0}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]{flex:0 0 33.333%;box-sizing:border-box;min-height:353px;padding:1.25rem .75rem;width:33.333%;max-width:none}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .card.with-form[_ngcontent-%COMP%]{padding:1.25rem 1.625rem 0}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .index-indicator[_ngcontent-%COMP%]{height:2.25rem;width:2.25rem;line-height:2.25rem}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .index-indicator[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-size:var(--font-size-lg);line-height:2.25rem}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .card-title[_ngcontent-%COMP%]{font-size:var(--font-size-xl);line-height:17px;padding:1.5rem 0 2rem}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .card-subtitle[_ngcontent-%COMP%]{font-size:var(--font-size-sm);max-height:31px;line-height:21px}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .join-button[_ngcontent-%COMP%]{margin-top:auto}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .boxes-icon[_ngcontent-%COMP%]{width:8.75rem;max-width:8.75rem;height:auto}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .slider-controls[_ngcontent-%COMP%]{width:34px;height:34px;border:none;border-radius:50%;background:var(--primary-inverse);color:var(--primary);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .3s linear;position:absolute;top:50%;margin-top:-1rem}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .slider-controls[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{transition:all .3s;display:flex;min-width:11px}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .slider-control
731s.prev-slide[_ngcontent-%COMP%]{left:6px;justify-content:center;display:inline-flex}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .slider-controls.prev-slide[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{transform:rotate(90deg)}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .slider-controls.next-slide[_ngcontent-%COMP%]{right:6px;justify-content:center;display:inline-flex}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .slider-controls.next-slide[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{transform:rotate(-90deg)}.top-container.mobile-slider-layout[_ngcontent-%COMP%]   .cards-wrapper[_ngcontent-%COMP%]   .slider-controls.disabled[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{opacity:.33}}.top-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:.5rem;color:var(--white)}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]{gap:1rem;line-height:17.813px}}.top-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:0;font-size:2rem;font-weight:700;text-align:center}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:1.5rem}}.top-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:var(--font-weight-semi-bold);text-align:center;line-height:1.113rem}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]   .title-container[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{font-size:1rem}}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:2rem;align-self:stretch;justify-content:stretch;flex-direction:row}@media (max-width: 1023px){.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{gap:20px}}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{flex-direction:column;align-self:center;margin-top:0}}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]{flex:1 1 0px;background-color:var(--white);padding:2rem;border-radius:.725rem;position:relative;min-height:327px;max-width:392px;display:flex;align-self:stretch;flex-direction:column;align-items:center}@media (min-width: 768px) and (max-width: 1023px){.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]{padding:1.5rem}}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card.with-form[_ngcontent-%COMP%]{min-height:350px}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card.with-form[_ngcontent-%COMP%]   .join-form[_ngcontent-%COMP%]{flex:1;width:100%}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card.with-form[_ngcontent-%COMP%]   .join-form[_ngcontent-%COMP%]   .join-button[_ngcontent-%COMP%]{margin-top:auto;margin-bottom:auto}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card.with-form[_ngcontent-%COMP%]{min-height:306px}}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]{max-width:500px;padding-top:1.1rem;min-height:242px;flex:auto}}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .join-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;margin-bottom:0}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .join-form[_ngcontent-%COMP%]   .join-button[_ngcontent-%COMP%]{align-self:center;margin-top:0;margin-bottom:0}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .index-indicator[_ngcontent-%COMP%]{width:2.25rem;height:2.25rem;flex-shrink:0;border-radius:100%;display:flex;justify-content:center;background-color:var(--primary-container);line-height:2.25rem}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .index-indicator[_ngcontent-%COMP%]{width:1.75rem;height:1.75rem;line-height:1.75rem}}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .index-indicator[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{color:var(--primary-dark);font-size:var(--font-size-lg);font-weight:700;line-height:2.25rem}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .index-indicator[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-size:var(--font-size-sm);line-height:1.75rem}}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;margin-top:3rem}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]{margin-top:1.25rem;margin-bottom:1.875rem;gap:.5rem}}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .point-container[_ngcontent-%COMP%]{display:flex;gap:.5rem}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .point-container[_ngcontent-%COMP%]   .svg-shade[_ngcontent-%COMP%]{fill:var
731(--primary);filter:brightness(115%)}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .point-container[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{width:1.5rem}@media (max-width: 1199px){.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .point-container[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{width:1rem}}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .point-container[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{color:var(--text);font-size:var(--font-size-med);font-style:normal;font-weight:400}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .point-container[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-size:var(--font-size-xs)}}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .point-container[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]   .highlighted[_ngcontent-%COMP%]{color:var(--primary);font-weight:bolder}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .point-container[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{min-width:1.5rem}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .points-container[_ngcontent-%COMP%]   .point-container[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{min-width:auto}}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .card-title[_ngcontent-%COMP%]{margin-bottom:0;padding-top:1.5rem;padding-bottom:1.5rem;font-size:var(--font-size-xl);text-align:center;font-weight:700;color:var(--primary);line-height:1rem}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .card-title[_ngcontent-%COMP%]{padding-top:1rem;padding-bottom:1rem;font-size:var(--font-size-med);line-height:1rem}}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .card-subtitle[_ngcontent-%COMP%]{color:var(--text);text-align:center;font-size:var(--font-size-med);font-style:normal;font-weight:bolder;line-height:normal}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .card-subtitle[_ngcontent-%COMP%]{font-size:var(--font-size-xs);line-height:normal}}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .join-button[_ngcontent-%COMP%]{margin-top:auto;max-width:12.25rem;width:100%;margin-bottom:0;font-size:var(--font-size-xs);height:2.5rem}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .join-button[_ngcontent-%COMP%]{margin-top:auto;margin-bottom:0;height:2.5rem;max-width:12.25rem;font-size:var(--font-size-sm)}}.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .boxes-icon[_ngcontent-%COMP%]{position:absolute;bottom:0;width:10.563rem;height:auto}@media (max-width: 767px){.top-container[_ngcontent-%COMP%]   .cards-container[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .boxes-icon[_ngcontent-%COMP%]{width:6rem;max-width:6rem;height:3.688rem;margin-top:.25rem}}.generic-errors[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:.81rem 1.62rem;background-color:var(--general-red-container);border-radius:.5rem;margin:1rem 0}.generic-errors[_ngcontent-%COMP%]   .error[_ngcontent-%COMP%]{font-size:1rem;line-height:1.25rem;display:flex;color:var(--general-red)!important;align-items:center;gap:.5rem;font-weight:500!important}.generic-errors[_ngcontent-%COMP%]   .error[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{height:1rem;width:1rem}"]})}}return h})();var E_={title:{type:"string",data:"How it works"},textColor:{type:"string",data:"#212529"}};function vC(h,k){if(h&1&&(I(0,"h2",4),X(1),E()),h&2){let n=A();ue("color",n.titleTextColor()),w(),Rt(" ",n.data.title==null?null:n.data.title.data," ")}}function bC(h,k){if(h&1&&(I(0,"div",6),it(1,"img",7),I(2,"span",8),X(3),E()()),h&2){let n=k.$implicit,c=k.$index,d=A(2);Ie("decreased",c===1),w(),j("ngSrc","../../assets/icons/"+d.getIcon(n)+".png"),w(2),St(n)}}function CC(h,k){if(h&1&&(I(0,"div",2),le(1,bC,4,4,"div",5,tl),E()),h&2){let n=A();w(),ce(n.rules())}}function wC(h,k){if(h&1&&(I(0,"div",9),it(1,"img",10),I(2,"span",8),X(3),E()()),h&2){let n=k.$implicit;w(),j("ngSrc","../../assets/icons/coin.png"),w(2),St(n)}}function MC(h,k){if(h&1&&(I(0,"div",3)(1,"span",4),X(2,"More Rules"),E(),le(3,wC,4,2,"div",9,tl),E()),h&2){let n=A();w(),ue("color",n.titleTextColor()),w(2),ce(n.moreRules())}}var Eu=(()=>{class h{constructor(n){this.componentConfig=n,this.configService=gt(Ee),this.authService=gt(Mn),this.loyaltyService=gt(as),this.merchantConfig=gt(Wn).merchantConfig,this.withTabs=zt(!1),this.sectionTitle=zt(),this.textColor=zt(),this.titleTextColor=Ut(()=>this.textColor()??this.data.textColor?.data??"var(--text)"),this.isCardFliped=!1,this.frontSideReverse=!1,this.selectedAwardIndex=0,this.loyaltyMembership=Ut(()=>this.authService.state().account?.loyalty.memberships?this.authService.state().account?.loyalty.memberships[0]:void 0),this.isLoggedIn=Ut(()=>this.authService.state()?.isLoggedIn),this.rules=Ut(()=>{let c=this.configService.loyaltyState();if(c?.details&&c.details.length>0)return[];let d=[],a=c?.rules.map(yt=>yt.name)??[],z=a?.find(yt=>yt.toLowerCase().includes("for every")&&yt.includes("spent you earn"));z&&d.push(z),c?.signUpBonus&&d.push(`Sign up bonus is ${c.signUpBonus} points `);let J=a?.find(yt=>
731yt.includes("points will reset")&&yt.includes("program will restart"));return J&&d.push(J),d}),this.moreRules=Ut(()=>{let c=this.configService.loyaltyState();return c?.details&&c.details.length>0?c.details:[]}),this.data=te(te({},E_),this.componentConfig?.data)}ngOnInit(){this.data=te({},this.data)}getIcon(n){return n.toLocaleLowerCase().includes("for every")?"money_box":n.toLowerCase().includes("sign up")?"sign_up_bonus":n.includes("points will reset")?"rewards_reset":"money_box"}getAltIcon(n){return n.toLocaleLowerCase().includes("for every")?"money box icon":n.toLowerCase().includes("sign up")?"sign up bonus icon":n.includes("points will reset")?"rewards reset icon":"money box icon"}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-how-it-works"]],inputs:{withTabs:[1,"withTabs"],sectionTitle:[1,"sectionTitle"],textColor:[1,"textColor"]},standalone:!0,features:[Kt],decls:4,vars:3,consts:[[1,"title",3,"color"],[1,"how-it-works-container"],[1,"basic-rules"],[1,"more-rules"],[1,"title"],[1,"basic-rule-card",3,"decreased"],[1,"basic-rule-card"],["alt","","aria-hidden","true","loading","lazy","width","100","height","122",3,"ngSrc"],[1,"subtitle"],[1,"more-rule-card"],["alt","","aria-hidden","true","loading","lazy","width","60","height","60",3,"ngSrc"]],template:function(c,d){c&1&&(ut(0,vC,2,3,"h2",0),I(1,"div",1),ut(2,CC,3,0,"div",2)(3,MC,5,2,"div",3),E()),c&2&&(rt(!(d.data.title==null||d.data.title.data==null)&&d.data.title.data.length&&!d.withTabs()?0:-1),w(2),rt(d.rules().length?2:-1),w(),rt(d.moreRules().length>0?3:-1))},dependencies:[ve,mn,lo],styles:['[_nghost-%COMP%]{padding-bottom:3.875rem;display:flex;flex-direction:column;align-items:center;width:100%;color:var(--text)}@media (max-width: 767px){[_nghost-%COMP%]{margin-bottom:2rem}}[_nghost-%COMP%] > .title[_ngcontent-%COMP%]{text-align:center;font-size:32px;font-style:normal;font-weight:700;line-height:normal;font-family:Caveat,"sans-serif";margin-top:3rem;margin-bottom:.5rem}@media (max-width: 767px){[_nghost-%COMP%] > .title[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:0}}.how-it-works-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:0 1rem;width:calc(100% - 10rem);max-width:75.25rem}@media (max-width: 767px){.how-it-works-container[_ngcontent-%COMP%]{max-width:500px;width:100%}}.how-it-works-container[_ngcontent-%COMP%]   .basic-rules[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem;margin:1.5rem 0 2rem;justify-content:center;width:100%}@media (max-width: 767px){.how-it-works-container[_ngcontent-%COMP%]   .basic-rules[_ngcontent-%COMP%]{flex-direction:column;margin:1.5rem 0;align-items:center}}.how-it-works-container[_ngcontent-%COMP%]   .basic-rules[_ngcontent-%COMP%]   .basic-rule-card[_ngcontent-%COMP%]{background-color:var(--white);border-radius:.5rem;padding:1.875rem;display:flex;flex-direction:column;align-items:center;gap:1.5rem;flex:1 1 0;max-width:24.375rem}.how-it-works-container[_ngcontent-%COMP%]   .basic-rules[_ngcontent-%COMP%]   .basic-rule-card.decreased[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:122px}@media (max-width: 767px){.how-it-works-container[_ngcontent-%COMP%]   .basic-rules[_ngcontent-%COMP%]   .basic-rule-card[_ngcontent-%COMP%]{width:100%}}.how-it-works-container[_ngcontent-%COMP%]   .basic-rules[_ngcontent-%COMP%]   .basic-rule-card[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:7.625rem}.how-it-works-container[_ngcontent-%COMP%]   .basic-rules[_ngcontent-%COMP%]   .basic-rule-card[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{font-size:var(--font-size-med);font-weight:var(--font-weight-regular);line-height:1.656rem;text-align:center;color:var(--text-color)}@media (max-width: 1199px){.how-it-works-container[_ngcontent-%COMP%]   .basic-rules[_ngcontent-%COMP%]   .basic-rule-card[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{font-size:var(--font-size-med)}}@media (max-width: 767px){.how-it-works-container[_ngcontent-%COMP%]   .basic-rules[_ngcontent-%COMP%]   .basic-rule-card[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{font-weight:var(--font-weight-medium);line-height:1.25rem}}.how-it-works-container[_ngcontent-%COMP%]   .more-rules[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding-top:1.5rem;width:100%}@media (max-width: 767px){.how-it-works-container[_ngcontent-%COMP%]   .more-rules[_ngcontent-%COMP%]{padding-top:2.5rem;max-width:24.375rem}}.how-it-works-container[_ngcontent-%COMP%]   .more-rules[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:var(--font-size-lg);font-style:normal;font-weight:var(--font-weight-semi-bold);line-height:1.5rem;color:var(--text-color);margin-bottom:.5rem}.how-it-works-container[_ngcontent-%COMP%]   .more-rules[_ngcontent-%COMP%]   .more-rule-card[_ngcontent-%COMP%]{background-color:var(--white);border-radius:.5rem;padding:1rem;display:flex;flex-direction:row;align-items:center;justify-content:start;gap:1rem}.how-it-works-container[_ngcontent-%COMP%]   .more-rules[_ngcontent-%COMP%]   .more-rule-card[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{font-size:var(--font-size-med);font-weight:var(--font-weight-medium);line-height:1.25rem;color:var(--text-color)}'],data:{animation:[nl("flipCard",[_a("true",Wo({transform:"rotateX(180deg)"})),_a("false",Wo({transform:"rotateX(0deg)"})),ns("false <=> true",[es("0.4s")])])]}})}}return h})();
731var wc=function(h){return h.APPLIED="APPLIED",h.APPLICABLE="APPLICABLE",h.NON_APPLICABLE="NON_APPLICABLE",h}(wc||{});var zu=(()=>{class h{loadCoupons(){return this.authState().isLoggedIn?this.httpClient.get(`${qn.api}/user/profile/coupons`).pipe(wo(n=>n.sort((c,d)=>c.status===wc.APPLIED&&d.status!==wc.APPLIED?-1:c.status!==wc.APPLIED&&d.status===wc.APPLIED?1:0)),Uo(n=>{this._coupons.set(n),this._unsubmittedCoupon()&&this._unsubmittedCoupon.update(c=>c={code:c?.code??""})})):$i([])}constructor(){this.httpClient=gt(Zi),this.authService=gt(Mn),this.authState=Ut(()=>this.authService.state()),this._coupons=Te([]),this.coupons=Ut(()=>this._coupons()),this._unsubmittedCoupon=Te(void 0),this.unsubmittedCoupon=Ut(()=>this._unsubmittedCoupon()),this._fetchCoupons=new Yh,this._fetchCoupons.asObservable().pipe(Gd(()=>this.authState().isLoggedIn),Wa(()=>this.loadCoupons())).subscribe()}addUnsubmittedCoupon(n){this._unsubmittedCoupon.set(n)}removeUnsubmittedCoupon(){this._unsubmittedCoupon.set(void 0)}reloadCoupons(){this._fetchCoupons.next()}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275prov=zn({token:h,factory:h.\u0275fac,providedIn:"root"})}}return h})();var z_=(()=>{class h{static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-coupons-icon"]],standalone:!0,features:[Kt],decls:20,vars:0,consts:[[1,"svg-container"],["width","78","height","68","viewBox","0 0 78 68","fill","none","xmlns","http://www.w3.org/2000/svg"],["clip-path","url(#clip0_2916_7860)"],["y","31.0078","width","65.193","height","30.1922","rx","2.56437","transform","rotate(-28.4005 0 31.0078)","fill","#ECD0C8"],["d","M39.8711 9.44922L55.0382 1.24819C56.284 0.574566 57.84 1.03842 58.5137 2.28422L70.4347 24.3311C71.1083 25.5769 70.6444 27.1329 69.3986 27.8066L54.2315 36.0076L39.8711 9.44922Z","fill","#C2390F"],["d","M49.743 17.3726C49.3877 16.7155 49.3018 16.0922 49.4853 15.5026C49.6781 14.908 50.0845 14.4431 50.7045 14.1078C51.3246 13.7726 51.9315 13.6896 52.5254 13.8588C53.1285 14.0231 53.6076 14.4337 53.9629 15.0908C54.3182 15.7478 54.4019 16.3783 54.2142 16.9821C54.0307 17.5717 53.6289 18.0342 53.0088 18.3694C52.3888 18.7047 51.7772 18.7902 51.1741 18.6259C50.5753 18.4474 50.0982 18.0296 49.743 17.3726ZM56.6514 11.0717L56.3368 23.728L54.7821 24.5686L55.0967 11.9123L56.6514 11.0717ZM51.2224 15.0656C50.6394 15.3809 50.5581 15.9272 50.9784 16.7045C51.4037 17.4912 51.9079 17.7268 52.4909 17.4116C52.7686 17.2615 52.9289 17.0492 52.9719 16.7748C53.0241 16.4954 52.9426 16.1567 52.7275 15.7588C52.5123 15.3609 52.276 15.1119 52.0186 15.0119C51.7655 14.8976 51.5001 14.9155 51.2224 15.0656ZM57.4909 20.5206C57.1356 19.8635 57.0497 19.2402 57.2333 18.6506C57.426 18.056 57.8324 17.5911 58.4525 17.2559C59.0633 16.9256 59.6656 16.8451 60.2594 17.0144C60.8625 17.1786 61.3417 17.5893 61.697 18.2463C62.0522 18.9034 62.136 19.5338 61.9482 20.1377C61.7647 20.7273 61.3675 21.1872 60.7568 21.5175C60.1367 21.8527 59.5252 21.9382 58.9221 21.774C58.3232 21.5954 57.8462 21.1777 57.4909 20.5206ZM58.9565 18.2212C58.6789 18.3713 58.5139 18.5861 58.4617 18.8655C58.4137 19.1306 58.4973 19.4622 58.7124 19.8601C58.9276 20.258 59.1618 20.5141 59.4149 20.6284C59.6723 20.7284 59.9398 20.7034 60.2175 20.5533C60.4951 20.4031 60.6579 20.1955 60.7059 19.9304C60.7581 19.651 60.6767 19.3123 60.4615 18.9144C60.2463 18.5164 60.0101 18.2674 59.7527 18.1674C59.4995 18.0531 59.2341 18.0711 58.9565 18.2212Z","fill","white"],["d","M7.83691 34.6719L23.7402 26.0728","stroke","#C2390F","stroke-width","3.61642","stroke-linecap","round"],["d","M17.1387 51.875L36.5563 41.3757","stroke","#F8D1C5","stroke-width","2.63012","stroke-linecap","round"],["d","M10.3398 39.3008L16.1651 36.151","stroke","#C2390F","stroke-width","3.61642","stroke-linecap","round"],["d","M15.3896 48.6406L26.7813 42.481","stroke","#F8D1C5","stroke-width","2.63012","stroke-linecap","round"],["x","2.43945","y","35.1875","width","72.8215","height","33.725","rx","2.56437","transform","rotate(-7 2.43945 35.1875)","fill","#FFE6DE"],["d","M52.6934 29.0156L72.1076 26.6319C73.5133 26.4593 74.7927 27.4589 74.9653 28.8646L78.4504 57.2478C78.623 58.6535 77.6233 59.9329 76.2176 60.1055L56.8034 62.4893L52.6934 29.0156Z","fill","#E05327"],["d","M59.6788 41.4885C59.5878 40.7471 59.7353 40.1355 60.1213 39.6535C60.5177 39.1702 61.0657 38.8857 61.7654 38.7998C62.465 38.7138 63.0604 38.858 63.5515 39.2323C64.0531 39.6053 64.3494 40.1625 64.4404 40.9039C64.5314 41.6453 64.3794 42.2628 63.9842 42.7565C63.5982 43.2385 63.0554 43.5224 62.3558 43.6083C61.6562 43.6942 61.0556 43.5507 60.554 43.1777C60.0616 42.793 59.7699 42.2299 59.6788 41.4885ZM68.4101 38.1429L63.499 49.8117L61.7448 50.0271L66.6558 38.3583L68.4101 38.1429ZM61.8981 39.8805C61.2402 39.9613 60.9651 40.4402 61.0728 41.3174C61.1818 42.2049 61.5652 42.6083 62.2231 42.5276C62.5363 42.4891 62.763 42.35 62.9032 42.1102C63.0538 41.8691 63.1015 41.5241 63.0464 41.075C62.9913 40.626 62.8621 40.308 62.659 40.121C62.465 39.9222 
73162.2113 39.842 61.8981 39.8805ZM65.7439 47.2466C65.6528 46.5052 65.8003 45.8936 66.1863 45.4116C66.5828 44.9283 67.1308 44.6437 67.8304 44.5578C68.5196 44.4732 69.1097 44.6181 69.6009 44.9923C70.1025 45.3653 70.3988 45.9225 70.4898 46.6639C70.5808 47.4053 70.4288 48.0228 70.0336 48.5165C69.6476 48.9985 69.11 49.2818 68.4208 49.3664C67.7212 49.4523 67.1206 49.3088 66.619 48.9358C66.1266 48.5511 65.8349 47.988 65.7439 47.2466ZM67.9474 45.6405C67.6342 45.679 67.4023 45.8188 67.2517 46.0598C67.1102 46.2892 67.0671 46.6284 67.1222 47.0774C67.1774 47.5264 67.3019 47.8503 67.4959 48.049C67.6991 48.2361 67.9573 48.3104 68.2705 48.2719C68.5838 48.2335 68.8112 48.0995 68.9526 47.8702C69.1032 47.6291 69.1509 47.2841 69.0958 46.8351C69.0406 46.3861 68.9115 46.068 68.7083 45.881C68.5143 45.6822 68.2607 45.6021 67.9474 45.6405Z","fill","white"],["d","M9.09668 42.1914L29.1408 39.7303","stroke","#D44316","stroke-width","3.61642","stroke-linecap","round"],["d","M11.7578 63.875L36.2314 60.87","stroke","#F8D1C5","stroke-width","2.63012","stroke-linecap","round"],["d","M9.81348 48.0273L17.1556 47.1259","stroke","#D44316","stroke-width","3.61642","stroke-linecap","round"],["d","M11.2578 59.7969L25.6157 58.034","stroke","#F8D1C5","stroke-width","2.63012","stroke-linecap","round"],["id","clip0_2916_7860"],["width","78","height","68","fill","white"]],template:function(c,d){c&1&&(I(0,"div",0),ac(),I(1,"svg",1)(2,"g",2),it(3,"rect",3)(4,"path",4)(5,"path",5)(6,"path",6)(7,"path",7)(8,"path",8)(9,"path",9)(10,"rect",10)(11,"path",11)(12,"path",12)(13,"path",13)(14,"path",14)(15,"path",15)(16,"path",16),E(),I(17,"defs")(18,"clipPath",17),it(19,"rect",18),E()()()())},styles:[".svg-container[_ngcontent-%COMP%]{display:flex}.svg-container[_ngcontent-%COMP%]   .primary-shader1[_ngcontent-%COMP%]{fill:var(--primary);stroke:var(--primary);filter:brightness(115%)}.svg-container[_ngcontent-%COMP%]   .primary-shader2[_ngcontent-%COMP%]{fill:var(--primary);stroke:var(--primary);filter:brightness(85%)}.svg-container[_ngcontent-%COMP%]   .primary-container-shader1[_ngcontent-%COMP%]{fill:var(--primary-container);stroke:var(--primary-container);filter:brightness(115%)}.svg-container[_ngcontent-%COMP%]   .primary-container-shader2[_ngcontent-%COMP%]{stroke:var(--primary-container);fill:var(--primary-container);filter:brightness(85%)}"]})}}return h})();var PC=["couponErrorModalContent"],OC=h=>({transform:h}),SC=h=>({"not-selected":h}),TC=h=>({"negative-margin":h}),IC=h=>({"pointer-events":h}),kC=h=>({days:h});function EC(h,k){if(h&1&&(I(0,"span",4),X(1),E()),h&2){let n=A();w(),St(n.award().description)}}function zC(h,k){if(h&1&&(I(0,"span",6)(1,"span"),X(2),E(),X(3),E()),h&2){let n=A();w(2),Rt(" ",n.award().howMany," "),w(),St(n.localizationService.getLocalizationString("rewards.rewards_card.x_earned"))}}function AC(h,k){if(h&1){let n=Yt();I(0,"button",14),Ot("click",function(){kt(n);let d=A();return Et(d.claimAward(d.award()))}),X(1),E()}if(h&2){let n=A();w(),Rt(" ",n.localizationService.getLocalizationString("rewards.rewards_card.claim")," ")}}function LC(h,k){if(h&1&&(I(0,"span",11),X(1),E()),h&2){let n=A();w(),Rt("Claim it until ",n.expireDate()," ")}}function DC(h,k){if(h&1&&(I(0,"span",11),X(1),E()),h&2){let n=A();w(),St(n.localizationService.getLocalizationString("rewards.rewards_card.valid_for",me(1,kC,n.award().daysExpires)))}}var A_=(()=>{class h{constructor(){this.awardSelect=new Kn,this.authService=gt(Mn),this.configService=gt(Ee),this.singleStore=gt(Ee).singleStore,this.accountCouponsService=gt(zu),this.localizationService=gt(un),this.modalService=gt(Gn),this.utmService=gt(is),this.gtmService=gt(ts),this.claimingCoupon=!1,this.iconNameType=ge,this.isLoggedIn=Ut(()=>this.authService.state().isLoggedIn),this.acount=Ut(()=>this.authService.state().account),this.expireDate=Ut(()=>{let n=this.award().expirationDate;return n?pr.fromISO(n).toLocal().toFormat("MM/dd/yy"):""}),this.isSignedUpForLoyalty=Ut(()=>this.authService.state().account?.signupForLoyalty??!1),this.award=zt.required(),this.transform=zt(),this.opacity=zt(),this.isSelected=zt.required(),this.isFocusable=zt(!0),this.zIndex=zt(),this.carouselDesignOption=zt()}claimAward(n){this.gtmService.pushEvent("coupon_claim_started",{coupon_source:"loyalty_rewards",reward_name:n.name});
731let c=n.code?n.code:n.couponCode,d=new URLSearchParams,a=this.authService.getAccessToken();a&&d.append("accessToken",a);let z="";if(this.singleStore())z=`${this.singleStore()?.baseUrl}/addCoupon?addCoupon=${c}&edit=true`;else if(this.acount()?.favoriteStore){this.modalService.openModal(Ln.StoresMap,{addCoupon:c,editCoupon:!0});return}let J=new URL(`${z}${d.toString()?"&"+d.toString():""}`);this.utmService.appendUtmParams(J),window.location.href=J.toString()}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-award-card"]],viewQuery:function(c,d){if(c&1&&$e(PC,5),c&2){let a;Ge(a=Ze())&&(d.awardSelect=a.first)}},inputs:{award:[1,"award"],transform:[1,"transform"],opacity:[1,"opacity"],isSelected:[1,"isSelected"],isFocusable:[1,"isFocusable"],zIndex:[1,"zIndex"],carouselDesignOption:[1,"carouselDesignOption"]},outputs:{awardSelect:"awardSelect"},standalone:!0,features:[Kt],decls:17,vars:22,consts:[[1,"card",3,"ngStyle","ngClass"],[1,"top"],[2,"max-width","78px"],[1,"name"],[1,"description"],[1,"points",3,"ngClass"],[1,"howMany"],[1,"rip"],[1,"dotted-line"],[1,"bottom"],["type","button",1,"claim-button"],[1,"expiration-text"],[1,"loading-container",3,"ngStyle"],[1,"loader"],["type","button",1,"claim-button",3,"click"]],template:function(c,d){c&1&&(I(0,"div",0)(1,"div",1),it(2,"app-coupons-icon",2),I(3,"h2",3),X(4),E(),ut(5,EC,2,1,"span",4),I(6,"span",5),X(7),E(),ut(8,zC,4,2,"span",6),E(),I(9,"div",7),it(10,"div",8),E(),I(11,"div",9),ut(12,AC,2,1,"button",10)(13,LC,2,1,"span",11)(14,DC,2,3,"span",11),E(),I(15,"div",12),it(16,"div",13),E()()),c&2&&(j("ngStyle",me(14,OC,d.transform()))("ngClass",me(16,SC,!d.isSelected()&&d.carouselDesignOption()==="Option 1")),qt("aria-hidden",d.isFocusable()?null:"true")("inert",d.isFocusable()?null:""),w(4),St(d.award().name),w(),rt(d.award().description?5:-1),w(),j("ngClass",me(18,TC,d.award().daysExpires)),w(),Qn("",d.award().amount," ",d.localizationService.getLocalizationString("rewards.points"),""),w(),rt(d.award().howMany?8:-1),w(4),rt(d.award().applicable?12:-1),w(),rt(d.award().expirationDate&&d.award().applicable?13:d.award().expirationDate&&!d.award().applicable?14:-1),w(2),j("@showLoading",d.claimingCoupon)("ngStyle",me(20,IC,d.claimingCoupon?"all":"none")))},dependencies:[ve,Ye,Gi,z_],styles:[".card[_ngcontent-%COMP%]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;width:261px;height:314px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;
731cursor:default}.card.not-selected[_ngcontent-%COMP%]{filter:grayscale(50%) brightness(.85)}.card[_ngcontent-%COMP%]   .info-container[_ngcontent-%COMP%]{position:absolute;top:13px;right:10px;z-index:2;color:var(--white)}.card[_ngcontent-%COMP%]   .info-container.claimed[_ngcontent-%COMP%]{color:var(--primary)}.card[_ngcontent-%COMP%]   .loading-container[_ngcontent-%COMP%]{position:absolute;background-color:#ffffff80;inset:0;display:flex;justify-content:center;align-items:center;height:100%;width:100%;transition:all .5s;border-radius:20px}.card[_ngcontent-%COMP%]   .rip[_ngcontent-%COMP%]{z-index:-1;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;position:absolute;top:220px;height:34px;margin:-1px 0;width:100%;background-color:var(--primary);-webkit-mask:radial-gradient(circle at left center,transparent 16px,black 17px) left,radial-gradient(circle at right center,transparent 16px,black 17px) right;mask:radial-gradient(circle at left center,transparent 16px,black 17px) left,radial-gradient(circle at right center,transparent 16px,black 17px) right;-webkit-mask-size:80% 100%;mask-size:80% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;padding:0 1rem}.card[_ngcontent-%COMP%]   .rip.claimed[_ngcontent-%COMP%]{background-color:var(--white)}.card[_ngcontent-%COMP%]   .rip[_ngcontent-%COMP%]   .dotted-line[_ngcontent-%COMP%]{position:absolute;top:50%;left:8%;height:2px;width:84%;background:repeating-linear-gradient(90deg,var(--white) 0 9px,rgba(0,0,0,0) 0 13px)}.card[_ngcontent-%COMP%]   .rip[_ngcontent-%COMP%]   .dotted-line.claimed[_ngcontent-%COMP%]{background:repeating-linear-gradient(90deg,var(--text) 0 9px,rgba(0,0,0,0) 0 13px)}.card[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%], .card[_ngcontent-%COMP%]   .bottom[_ngcontent-%COMP%]{display:block;background-color:var(--primary)}.card[_ngcontent-%COMP%]   .top.claimed[_ngcontent-%COMP%], .card[_ngcontent-%COMP%]   .bottom.claimed[_ngcontent-%COMP%]{background-color:var(--white)}.card[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%]{flex:1 1;border-radius:20px 20px 0 0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding-top:1rem;gap:10px;position:absolute;top:0;height:220px;width:100%}.card[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:55px}.card[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%]   .howMany[_ngcontent-%COMP%]{position:absolute;right:-7px;top:13px;width:55.4px;height:25px;background-color:var(--primary-dark);color:var(--white);font-size:8.5px;font-weight:500;padding:5px;display:flex;justify-content:center;align-items:flex-end;box-shadow:0 -1.423px 2.845px #ffffff26,0 2.845px 2.845px #00000026}.card[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%]   .howMany[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:11px}.card[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{margin-bottom:0;color:var(--white);overflow:hidden;-webkit-line-clamp:2;line-clamp:2;display:-webkit-box;-webkit-box-orient:vertical;text-align:center;font-size:var(--font-size-med);font-style:normal;font-weight:var(--font-weight-bold);width:230px;line-height:1.394rem;text-transform:uppercase}.card[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%]   .name.claimed[_ngcontent-%COMP%]{color:var(--primary)}.card[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%]{color:var(--white);text-align:center;font-size:var(--font-size-sm);font-style:normal;font-weight:var(--font-weight-regular);overflow:hidden;-webkit-line-clamp:2;line-height:1rem;line-clamp:2;display:-webkit-box;-webkit-box-orient:vertical;width:230px}.card[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%]   .description.claimed[_ngcontent-%COMP%]{color:var(--text-color)}.card[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%]   .points[_ngcontent-%COMP%]{display:flex;width:7.5rem;height:2.2rem;justify-content:center;align-items:center;border-radius:2rem;background-color:#ffe6de4d;color:var(--white);font-weight:var(--font-weight-bold)}.card[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%]   .points.claimed[_ngcontent-%COMP%]{background-color:var(--white);color:var(--primary-dark)}
731.card[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%]   .points[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{text-align:center;font-size:var(--font-size-xs);font-style:normal;font-weight:var(--font-weight-bold);line-height:1.25rem}@media (max-width: 1199px){.card[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%]   .points[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:var(--font-size-xs)}}.card[_ngcontent-%COMP%]   .bottom[_ngcontent-%COMP%]{flex:0 0 80px;border-radius:0 0 20px 20px;display:flex;flex-direction:column;align-items:center;padding:0 1rem;position:absolute;height:60px;width:100%;bottom:2px}.card[_ngcontent-%COMP%]   .bottom[_ngcontent-%COMP%]   .claim-button[_ngcontent-%COMP%]{font-size:var(--font-size-lg);font-style:normal;font-weight:var(--font-weight-bold);background-color:var(--white);padding:10px 43px;border-radius:40px;line-height:1.25rem;color:var(--primary);margin-top:-5px;cursor:pointer}.card[_ngcontent-%COMP%]   .bottom[_ngcontent-%COMP%]   .claim-button.negative-margin[_ngcontent-%COMP%]{margin-top:-5px}.card[_ngcontent-%COMP%]   .bottom[_ngcontent-%COMP%]   .claim-button.unclaim[_ngcontent-%COMP%]{background:var(--primary-container);color:var(--primary-dark);margin-top:1rem}.card[_ngcontent-%COMP%]   .bottom[_ngcontent-%COMP%]   .expiration-text[_ngcontent-%COMP%]{font-size:.75rem;color:var(--white);position:absolute;top:41px}.card[_ngcontent-%COMP%]   .bottom[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{color:var(--white);text-align:center;font-size:var(--font-size-med);font-style:normal;font-weight:var(--font-weight-semi-bold)}.card[_ngcontent-%COMP%]   .bottom[_ngcontent-%COMP%]   .subtitle.extra-light[_ngcontent-%COMP%]{font-size:var(--font-size-xs);font-weight:var(--font-weight-medium)}.card[_ngcontent-%COMP%]   .bottom[_ngcontent-%COMP%]   .subtitle.light[_ngcontent-%COMP%]{font-size:var(--font-size-sm)}.card[_ngcontent-%COMP%]   .bottom[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]   .clickable[_ngcontent-%COMP%]{text-decoration:underline;background-color:transparent;font-style:normal;color:var(--white);padding:0;font-weight:var(--font-weight-semi-bold);font-size:var(--font-size-sm)}.instruction-modal-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.instruction-modal-container[_ngcontent-%COMP%]   .special-title[_ngcontent-%COMP%]{font-size:var(--font-size-lg);font-weight:var(--font-weight-semi-bold);line-height:1.5rem;color:var(--text)}.instruction-modal-container[_ngcontent-%COMP%]   .special-title[_ngcontent-%COMP%]   .special-name[_ngcontent-%COMP%]{color:var(--primary-dark)}.instruction-modal-container[_ngcontent-%COMP%]   .modal-title[_ngcontent-%COMP%]{font-size:var(--font-size-med);font-weight:var(--font-weight-semi-bold);line-height:1.25rem;color:var(--text)}.instruction-modal-container[_ngcontent-%COMP%]   .modal-text[_ngcontent-%COMP%]{font-size:var(--font-size-med);font-weight:var(--font-weight-medium);line-height:1.25rem;color:var(--text)}.instruction-modal-container[_ngcontent-%COMP%]   .instruction-disclaimer-group[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem}.instruction-modal-container[_ngcontent-%COMP%]   .instruction-disclaimer-group[_ngcontent-%COMP%]   .title-text-wrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;row-gap:.5rem}"],data:{animation:[nl("showLoading",[_a("true",Wo({opacity:1})),_a("false",Wo({opacity:0})),ns("false <=> true",[es("0.3s")])])]}})}}return h})();var L_={layoutOption:{type:"string",data:"Option 1"},title:{type:"string",data:"Coupons"},textColor:{type:"string",data:"#212529"}};var FC=["awardsWrapper"],RC=["leftButton"],BC=["rightButton"],NC=(h,k,n)=>({"disable-animation":h,"animation-active":k,"single-item":n}),VC=(h,k,n,c)=>({transform:h,opacity:k,zIndex:n,left:c}),D_=(h,k)=>({selected:h,"disable-animation":k}),Au=h=>({"disable-animation":h});function jC(h,k){if(h&1&&(I(0,"h2",15),X(1),E()),h&2){let n=A();ue("color",n.titleTextColor()),w(),Rt(" ",n.data.title==null?null:n.data.title.data," ")}}function UC(h,k){if(h&1){let n=Yt();I(0,"app-toggle-switch",16),Ot("toggleEvent",function(d){kt(n);let a=A();return Et(a.onShowOnlyApplicableToggle(d))}),E()}if(h&2){let n=A();j("isChecked",n.showOnlyApplicable())("ariaLabel","Available Coupons")("formControlName","availableCoupons")}}function $C(h,k){if(h&1){let n=Yt();I(0,"app-award-card",17),Ot("click",function(){kt(n);let d=A();return Et(d.onAwardSelect(0))}),E()}if(h&2){let n=A();j("isSelected",!0)("isFocusable",!0)("award",n.awardsForShowing()[0])}}function GC(h,k){if(h&1){let n=Yt();I(0,"app-award-card",19),Ot("click",function(){let d=kt(n).$index,a=A(2);return Et(a.onAwardSelect(d))}),E()}if(h&2){let n=k.$implicit,c=k.$index,d=A(2);j("ngStyle",mf(7,VC,"scale("+d.getScaleOpacityFromIndex(c)+")",d.carouselDesignOption()==="Option 1"?1:d.getOpacityFromIndex(c),d.getZIndexFromIndex(c),d.getXPositionFromIndex(c)+"px"))("ngClass",en(12,D_,d.isDisplayIndexSelected(c),d.disableAnimation||d.gridView()))("isSelected",d.isDisplayIndexSelected(c))("ngClass",en(1
7315,D_,c===d.middle+1,d.disableAnimation||d.gridView()))("isFocusable",d.isAwardFocusable(c))("carouselDesignOption",d.carouselDesignOption())("award",n)}}function ZC(h,k){if(h&1&&le(0,GC,1,18,"app-award-card",18,Ce),h&2){let n=A();ce(n.awardsForShowing())}}function HC(h,k){if(h&1){let n=Yt();I(0,"button",20,1),Ot("click",function(){kt(n);let d=A();return Et(d.previous())}),it(2,"app-icon",21),E()}if(h&2){let n=A();j("ngClass",me(2,Au,n.disableAnimation)),w(2),j("name",n.iconNameType.arrow)}}function qC(h,k){if(h&1){let n=Yt();I(0,"button",22,2),Ot("click",function(){kt(n);let d=A();return Et(d.next())}),it(2,"app-icon",21),E()}if(h&2){let n=A();j("ngClass",me(2,Au,n.disableAnimation)),w(2),j("name",n.iconNameType.arrow)}}function WC(h,k){if(h&1){let n=Yt();I(0,"div",13)(1,"button",20),Ot("click",function(){kt(n);let d=A();return Et(d.previous())}),it(2,"app-icon",21),E(),I(3,"button",22),Ot("click",function(){kt(n);let d=A();return Et(d.next())}),it(4,"app-icon",21),E()()}if(h&2){let n=A();w(),j("ngClass",me(4,Au,n.disableAnimation)),w(),j("name",n.iconNameType.arrow),w(),j("ngClass",me(6,Au,n.disableAnimation)),w(),j("name",n.iconNameType.arrow)}}function XC(h,k){if(h&1){let n=Yt();I(0,"div",14)(1,"button",23),Ot("click",function(){kt(n);let d=A();return Et(d.toggleGridView())}),X(2),E()()}if(h&2){let n=A();w(2),Rt(" ",n.gridView()?"Collapse":"View All Coupons"," ")}}var Lu=(()=>{class h{constructor(n,c){this.platformId=n,this.componentConfig=c,this.awardChanged=new Kn,this.iconNameType=ge,this.couponsService=gt(zu),this.authService=gt(Mn),this.merchantConfig=gt(Wn).merchantConfig,this.sectionTitle=zt(),this.textColor=zt(),this.layoutOption=zt(),this.withTabs=zt(!1),this.layoutService=gt(pn),this.loyaltyService=gt(as),this.selectedStepIndex=Ut(()=>this.loyaltyService.selectedLoyaltyStep()),this.selectedAwardIndex=Te(0),this.allApplicable=!1,this.awards=[],this.animationActive=!1,this.disableAnimation=!1,this.swipeDirection="",this.cardWidth=254,this.middle=0,this.gridView=Te(!1),this.animationTime=300,this.showOnlyApplicable=Te(!1),this.applicableRewards=[],this.isLoggedIn=Ut(()=>this.authService.state().isLoggedIn),this.points=Ut(()=>this.authService.account()?.loyalty?.memberships[0]?.availablePoints??0),this.carouselDesignOption=Ut(()=>this.data.layoutOption?.data??"Option 1"),this.titleTextColor=Ut(()=>this.textColor()??this.data.textColor?.data??"var(--text)"),this.userCoupons=Ut(()=>{if(!this.isLoggedIn())return[];let d=this.authService.account();return d?d.loyalty.memberships?.flatMap(a=>a.coupons)??[]:[]}),this.awardsForShowing=Ut(()=>{let d=this.getAwardsSource();if(this.gridView()){let ne=new Map;for(let Ve of d){let tn=ne.get(Ve.name);(!tn||(Ve.amount??0)<(tn.amount??0))&&ne.set(Ve.name,Ve)}return Array.from(ne.values()).sort((Ve,tn)=>{let _n=(Ve.amount??0)-(tn.amount??0);return _n!==0?_n:Ve.name.localeCompare(tn.name)})}let a=d.length;if(!a)return[];if(a===1)return d;let z=a<=3?0:2;if(!this.animationActive&&this.middle!==z&&(this.middle=z),a===2)return d;let J=this.getSelectedSourceIndex(d),yt=a<=3?a:7,ie=Math.min(this.middle+1,yt-1),ee=(J-ie+a)%a,bt=[];for(let ne=0;ne<yt;ne+=1)bt.push(d[(ee+ne)%a]);return bt}),this.data=te(te({},L_),this.componentConfig?.data),ii(()=>{let d=this.selectedStepIndex()??0,a=this.awards[d];if(this.gridView())return;if(this.showOnlyApplicable()&&a&&!this.awardsForShowing().some(yt=>this.isSameAward(yt,a))){this.onShowOnlyApplicableToggle(!1);return}let z=this.selectedAwardIndex();if(d===z)return;if(this.animationActive){this.selectedAwardIndex.set(d);return}let J=d-z;J>0?this.next(J-1,!0):J<0&&this.previous(-1*J-1,!0),setTimeout(()=>{this.selectedAwardIndex.set(this.selectedStepIndex()??0)},this.animationTime)},{allowSignalWrites:!0})}ngOnInit(){this.awards=this.merchantConfig().brand.plans[0].planAwards,this.middle=this.awards.length<=3?0:2,this.data=cn(te({},this.data),{layoutOption:this.layoutOption()??this.data.layoutOption})}getAwardsSource(){let n=this.userCoupons(),c=new Map;for(let z of n){let J=c.get(z.name),yt=J?.expirationDate,ie=z.expirationDate,ee=yt;ie&&(ee?new Date(ie).getTime()<new Date(ee).getTime()&&(ee=ie):ee=ie),c.set(z.name,{howMany:(J?.howMany??0)+1,code:z.code??J?.code,expirationDate:ee})}let d=this.awards.map((z,J)=>{let yt=c.get(z.name),ie=yt?.howMany??0,ee=yt?.code,bt=yt?.expirationDate,
731ne=ie>0||z.amount<=this.points();return cn(te({},z),{applicable:ne,howMany:ie,code:ee,expirationDate:bt,index:J})}),a=d;return this.allApplicable=a.every(z=>z.applicable),this.applicableRewards=a.filter(z=>z.applicable),this.showOnlyApplicable()&&(d=d.filter(z=>z.applicable)),d}onScroll(n){this.calculateIndex(n.target.scrollLeft)}onAwardSelect(n){if(this.gridView())return;let c=this.awardsForShowing();if(c.length<=1)return;if(c.length===2){let a=this.getSelectedDisplayIndex(c);if(n===a)return;let z=this.getAwardIndex(c[n]);z>=0&&this.selectLoyaltyStep(z);return}let d=n-1-this.middle;d<0?this.previous((d+1)*-1):d>0&&this.next(d-1)}calculateIndex(n){let c=Math.round((n-20)/this.cardWidth);this.awardChanged.emit(c)}getSelectedDisplayIndex(n){return this.getSelectedSourceIndex(n)}getCenterIndex(n){return n.length===2?this.getSelectedDisplayIndex(n):this.middle+1}getAwardIndex(n){return this.awards.findIndex(c=>this.isSameAward(c,n))}getSelectedSourceIndex(n){if(!n.length)return 0;let c=this.awards[this.selectedAwardIndex()];if(!c)return 0;let d=n.findIndex(a=>this.isSameAward(a,c));return d>=0?d:0}isSameAward(n,c){return!!n&&!!c&&n.name===c.name}moveSelection(n,c=0){let d=this.getAwardsSource();if(d.length<=1)return;let a=this.getSelectedSourceIndex(d),z=c+1,J=(a+n*z+d.length*z)%d.length,yt=this.getAwardIndex(d[J]);yt>=0&&this.selectLoyaltyStep(yt)}isDisplayIndexSelected(n){let c=this.awardsForShowing();return c.length?n===this.getCenterIndex(c):!1}getScaleOpacityFromIndex(n){let c=this.awardsForShowing();if(c.length<=1)return 1;let a=this.getCenterIndex(c),z=Math.abs(a-n);return z<=.5||this.gridView()?1:z<=1?.77:z<=2?.565:0}getOpacityFromIndex(n){let c=this.awardsForShowing();if(c.length<=1)return 1;let a=this.getCenterIndex(c),z=Math.abs(a-n);return z<=.5||this.gridView()?1:z<=1?.8:z<=2?.4:0}getXPositionFromIndex(n){let c=this.awardsForShowing(),d=c.length;if(d<=1)return 0;let a=d<=3,z=this.getCenterIndex(c);if(this.gridView())return 0;if(d===2){let yt=(.5-z)*this.cardWidth;if(this.carouselDesignOption()==="Option 2"){if(n===z)return yt;let ie=83,ee=Math.sign(n-z);return yt-(this.cardWidth-ie)*ee}if(this.carouselDesignOption()==="Option 1"){if(n===z)return yt;let ie=this.cardWidth-15,ee=Math.sign(n-z);return yt-(this.cardWidth-ie)*ee}return yt}if(n===z)return 0;if(a){let yt=this.carouselDesignOption()==="Option 1"?15:173;return z-n>0?yt:-yt}if(this.middle===4&&n===1)return this.cardWidth*this.middle;if(this.middle===0&&n===this.awardsForShowing().length-2)return this.cardWidth*-4;if(n<=this.middle-2)return 700;if(n>this.middle+3)return-700;if(Math.abs(z-n)===1){let yt=this.carouselDesignOption()==="Option 1"?14:173;return z-n>0?yt:-yt}let J=this.carouselDesignOption()==="Option 1"?87:368;return z-n>0?J:-J}next(n=0,c=!1){if(this.awardsForShowing().length===2){if(c)return;this.moveSelection(1);return}if(!this.animationActive){this.animationActive=!this.animationActive,this.swipeDirection="next",this.middle=this.middle+1+n;let a="19.656rem";this.carouselDesignOption()==="Option 1"?this.awardsWrapper.nativeElement.style=`margin-left: ${this.cardWidth*-n-20}px; padding-right: calc(${a} + ${this.cardWidth*(2+n)}px)`:this.carouselDesignOption()==="Option 2"&&(this.awardsWrapper.nativeElement.style=`margin-left: ${this.cardWidth*-n}px; padding-right: calc(${a} + ${this.cardWidth*(2+n)}px)`),this.leftButton&&(this.leftButton.nativeElement.style=`margin-right: ${this.cardWidth*-1-8*(n+1)}px`),this.rightButton&&(this.rightButton.nativeElement.style=`margin-left: ${this.cardWidth*-1+8*(n+1)}px`),setTimeout(()=>{this.swipeDirection="",this.disableAnimation=!0,this.awardsWrapper.nativeElement.style="",this.middle=this.middle-1-n,c||this.moveSelection(1,n),this.leftButton&&(this.leftButton.nativeElement.style=""),this.rightButton&&(this.rightButton.nativeElement.style=""),setTimeout(()=>{this.disableAnimation=!1,this.animationActive=!this.animationActive},50)},this.animationTime)}}previous(n=0,c=!1){if(this.awardsForShowing().length===2){if(c)return;this.moveSelection(-1);return}if(!this.animationActive){this.animationActive=!this.animationActive,this.swipeDirection="prev",this.middle=this.middle-1-n;let a="19.656rem";this.data.layoutOption?.data==="Option 1"?this.awardsWrapper.nativeElement.style=`margin-left: calc(${this.cardWidth*n+20}px); padding-left: calc(${a} + ${this.cardWidth*(2+n)}px`:this.data.layoutOption?.data==="Option 2"&&(this.awardsWrapper.nativeElement.style=`margin-left: calc(${this.cardWidth*n}px); padding-left: calc(${a} + ${this.cardWidth*(2+n)}px`),this.leftButton&&(this.leftButton.nativeElement.style=`margin-right: ${this.cardWidth*(-1-n)+7*(n+1)}px`),this.rightButton&&(this.rightButton.nativeElement.style=`margin-left: ${this.cardWidth*(-1-n)-7*(n+1)}px`),setTimeout(()=>{this.swipeDirection="",this.disableAnimation=!0,this.awardsWrapper.nativeElement.style="",this.middle=this.middle+1+n,c||this.moveSelection(-1,n),this.leftButton&&(this.leftButton.nativeElement.style=""),this.rightButton&&(this.rightButton.nativeElement.style=""),setTimeout(()=>{this.disableAnimation=!1,this.animationActive=!this.animationActive},50)},this.animationTime)}}getZIndexFromIndex(n){let c=this.awardsForShowing();if(!c.length||this.gridView())return 1;let d=this.getCenterIndex(c);return Math.max(0,3-Math.abs(d-n))}isAwardFocusable(n){if(this.gridView())return!0;let c=this.awardsForShowing();return c.length<=1?!0:n===this.getCenterIndex(c)}getPositionInCarousel(n){return this.awards.length-this.middle<=2&&n<2?this.awards.length+n:n}onShowOnlyApplicableToggle(n){if(this.disableAnimation=!0,this.showOnlyApplicable.set(n),n){let c=this.getAwardsSource(),d=this.awards[this.selectedAwardIndex()];if(!c.some(z=>this.isSameAward(z,d))&&c.length){let z=this.getAwardIndex(c[0]);z>=0&&this.selectLoyaltyStep(z)}}setTimeout(()=>{this.disableAnimation=!1},0)}toggleGridView(){this.gridView.set(!this.gridView()),this.gridView()?this.selectedAwardIndex.set(0):this.selectedAwardIndex.set(this.selectedStepIndex()??0),setTimeout(()=>{this.disableAnimation=!this.disableAnimation},this.animationTime)}selectLoyaltyStep(n){this.selectedAwardIndex.set(n),this.loyaltyService.selectLoyaltyStep(n)}static{this.\u0275fac=function(c){return new(c||h)(se(rn),se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-awards-carousel"]],viewQuery:function(c,d){if(c&1&&($e(FC,5),$e(RC,5),$e(BC,5)),c&2){let a;Ge(a=Ze())&&(d.awardsWrapper=a.first),Ge(a=Ze())&&(d.leftButton=a.first),Ge(a=Ze())&&(d.rightButton=a.first)}},inputs:{sectionTitle:[1,"sectionTitle"],textColor:[1,"textColor"],layoutOption:[1,"layoutOption"],withTabs:[1,"withTabs"]},outputs:{awardChanged:"awardChanged"},standalone:!0,features:[Kt],decls:14,vars:17,consts:[["awardsWrapper",""],["leftButton",""],["rightButton",""],[1,"carousel-container",3,"ngClass"],[1,"carousel-title",3,"color"],[1,"toggle-switch-group"],[1,"field"],[3,"isChecked","ariaLabel","formControlName"],[1,"carousel-wrapper"],[1,"awards-wrapper",3,"scroll","ngClass"],[1,"award-container","single-award",3,"isSelected","isFocusable","award"],["type","button","aria-label","Previous award",1,"arrow-left","left",3,"ngClass"],["type","button","aria-label","Next award",1,"arrow-right","right",3,"ngClass"],[1,"navigator"],[1,"grid-toggle"],[1,"carousel-title"],[3,"toggleEvent","isChecked","ariaLabel","formControlName"],[1,"award-container","single-award",3,"click","isSelected","isFocusable","award"],[1,"award-container",3,"ngStyle","ngClass","isSelected","isFocusable","carouselDesignOption","award"],[1,"award-container",3,"click","ngStyle","ngClass","isSelected","isFocusable","carouselDesignOption","award"],["type","button","aria-label","Previous award",1,"arrow-left","left",3,"click","ngClass"],[1,"icon",3,"name"],["type","button","aria-label","Next award",1,"arrow-right","right",3,"click","ngClass"],["type","button",3,"click"]],template:function(c,d){if(c&1){let a=Yt();I(0,"div",3),ut(1,jC,2,3,"h2",4),I(2,"div",5)(3,"div",6),ut(4,UC,1,3,"app-toggle-switch",7),E()(),I(5,"div",8)(6,"div",9,0),Ot("scroll",function(J){return kt(a),Et(d.onScroll(J))}),ut(8,$C,1,3,"app-award-card",10)(9,ZC,2,0),E(),ut(10,HC,3,4,"button",11)(11,qC,3,4,"button",12),E(),ut(12,WC,5,8,"div",13)(13,XC,3,1,"div",14),E()}c&2&&(Ie("grid-layout",d.gridView()&&d.layoutService.viewport()!=="mobile"),j("ngClass",d.carouselDesignOption().toLowerCase().replace(" ","-")+"-layout"),w(),rt(!(d.data.title==null||d.data.title.data==null)&&d.data.title.data.length&&!d.withTabs()?1:-1),w(3),rt(d.isLoggedIn()&&d.applicableRewards.length>0&&!d.allApplicable?4:-1),w(),Ie("single-item",d.awardsForShowing().length===1),w(),j("ngClass",zr(13,NC,d.disableAnimation||d.gridView(),d.animationActive,d.awardsForShowing().length===1)),w(2),rt(d.awardsForShowing().length===1?8:9),w(2),rt(d.carouselDesignOption()==="Option 2"&&d.layoutService.viewport()!=="mobile"&&!d.gridView()&&d.awardsForShowing().length>1?10:-1),w(),rt(d.carouselDesignOption()==="Option 2"&&d.layoutService.viewport()!=="mobile"&&!d.gridView()&&d.awardsForShowing().length>1?11:-1),w(),rt((d.carouselDesignOption()!=="Option 2"||d.layoutService.viewport()==="mobile")&&d.awardsForShowing().length>1?12:-1),w(),rt(d.layoutService.viewport()!=="mobile"&&d.carouselDesignOption()==="Option 2"?13:-1))},dependencies:[A_,ve,Ye,Gi,Lf,Ae],styles:['.carousel-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:relative;flex-flow:column;padding:2rem 0 3rem;width:100%;overflow:hidden}@media (max-width: 767px){.carousel-container[_ngcontent-%COMP%]{padding:0 0 2rem}}.carousel-container[_ngcontent-%COMP%]   .toggle-switch-group[_ngcontent-%COMP%]{margin:1rem 0}.carousel-container.option-2-layout[_ngcontent-%COMP%]   .awards-wrapper[_ngcontent-%COMP%]{width:0;padding:0 19.656rem}
731.carousel-container.grid-layout[_ngcontent-%COMP%]   .awards-wrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr);gap:1.5rem;width:69.75rem}.carousel-container.grid-layout[_ngcontent-%COMP%]   .single-item[_ngcontent-%COMP%]{gap:0}.carousel-container[_ngcontent-%COMP%]   .arrow-left[_ngcontent-%COMP%], .carousel-container[_ngcontent-%COMP%]   .arrow-right[_ngcontent-%COMP%]{width:34px;height:34px;border:none;border-radius:50%;background:var(--primary-inverse);color:var(--primary);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .3s linear}.carousel-container[_ngcontent-%COMP%]   .arrow-left[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%], .carousel-container[_ngcontent-%COMP%]   .arrow-right[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{display:flex;min-width:11px}.carousel-container[_ngcontent-%COMP%]   .arrow-left.left[_ngcontent-%COMP%], .carousel-container[_ngcontent-%COMP%]   .arrow-right.left[_ngcontent-%COMP%]{left:10px}.carousel-container[_ngcontent-%COMP%]   .arrow-left.left[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%], .carousel-container[_ngcontent-%COMP%]   .arrow-right.left[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{transform:rotate(90deg)}.carousel-container[_ngcontent-%COMP%]   .arrow-left.right[_ngcontent-%COMP%], .carousel-container[_ngcontent-%COMP%]   .arrow-right.right[_ngcontent-%COMP%]{right:10px}.carousel-container[_ngcontent-%COMP%]   .arrow-left.right[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%], .carousel-container[_ngcontent-%COMP%]   .arrow-right.right[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{transform:rotate(270deg)}.carousel-container[_ngcontent-%COMP%]   .arrow-left[_ngcontent-%COMP%]:hover, .carousel-container[_ngcontent-%COMP%]   .arrow-right[_ngcontent-%COMP%]:hover{box-shadow:inset 0 2px 4px #00000026}.carousel-container[_ngcontent-%COMP%]   .arrow-left.disable-animation[_ngcontent-%COMP%], .carousel-container[_ngcontent-%COMP%]   .arrow-right.disable-animation[_ngcontent-%COMP%]{transition:none}.carousel-container[_ngcontent-%COMP%]   .carousel-title[_ngcontent-%COMP%]{text-align:center;font-size:32px;font-style:normal;font-weight:700;line-height:normal;font-family:Caveat,"sans-serif";margin-bottom:2rem;margin-top:1rem}@media (max-width: 767px){.carousel-container[_ngcontent-%COMP%]   .carousel-title[_ngcontent-%COMP%]{margin-bottom:0;margin-top:2rem}}.carousel-container[_ngcontent-%COMP%]   .carousel-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:relative;flex-flow:row;width:100%;overflow:hidden}@media (max-width: 767px){.carousel-container[_ngcontent-%COMP%]   .carousel-wrapper[_ngcontent-%COMP%]{padding-top:1.5rem}}.carousel-container[_ngcontent-%COMP%]   .carousel-wrapper[_ngcontent-%COMP%]   .arrow-left[_ngcontent-%COMP%]{order:1}.carousel-container[_ngcontent-%COMP%]   .carousel-wrapper[_ngcontent-%COMP%]   .awards-wrapper[_ngcontent-%COMP%]{order:2}.carousel-container[_ngcontent-%COMP%]   .carousel-wrapper[_ngcontent-%COMP%]   .arrow-right[_ngcontent-%COMP%]{order:3}.carousel-container[_ngcontent-%COMP%]   .awards-wrapper[_ngcontent-%COMP%]{display:flex;width:930px;padding:0 19.656rem;overflow:visible;scroll-snap-type:x mandatory;-ms-overflow-style:none;scrollbar-width:none;justify-content:center;transition:margin-left .3s linear,padding-left .3s linear,padding-right .3s linear}.carousel-container[_ngcontent-%COMP%]   .awards-wrapper.disable-animation[_ngcontent-%COMP%]{transition:none}.carousel-container[_ngcontent-%COMP%]   .awards-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.carousel-container[_ngcontent-%COMP%]   .awards-wrapper[_ngcontent-%COMP%]   .award-container[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:rgba(0,0,0,0);scroll-snap-align:center;display:flex;justify-content:start;align-items:center;flex-direction:column;text-align:center;cursor:pointer;transition:transform .3s linear,opacity .3s linear,left .3s linear;position:relative}.carousel-container[_ngcontent-%COMP%]   .awards-wrapper[_ngcontent-%COMP%]   .award-container.disable-animation[_ngcontent-%COMP%]{transition:none}
731.navigator[_ngcontent-%COMP%]{margin-top:1.25rem;display:flex;width:100%;align-items:center;justify-content:center;gap:13px}.grid-toggle[_ngcontent-%COMP%]{display:flex;width:100%;align-items:center;justify-content:center;padding-top:1.5rem}.grid-toggle[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{background:none;border:none;color:var(--primary);cursor:pointer;padding:.75rem 0;text-align:center;width:12.5rem;font-weight:var(--font-weight-bold);font-size:var(--font-size-xs)}.grid-toggle[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover{text-decoration:underline}']})}}return h})();var F_={layoutOptions:{type:"string",data:"With tabs"},awardsLayoutOptions:{type:"string",data:"Option 1"},textColor:{type:"string",data:"#212529"}};var KC=(h,k)=>({"background-color":h,"max-width":k}),YC=h=>({checked:h});function QC(h,k){if(h&1){let n=Yt();I(0,"label",1)(1,"input",2),Ot("change",function(){let d=kt(n).$implicit,a=A();return Et(a.selectTab(d))}),E(),X(2),E()}if(h&2){let n=k.$implicit,c=A();j("ngClass",me(5,YC,c.selectedOption===n)),w(),j("name",c.buttonGroupName())("value",n)("checked",c.selectedOption===n),w(),Rt(" ",n," ")}}var R_=(()=>{class h{constructor(){this.buttonGroupName=zt.required(),this.optionValues=zt.required(),this.selectedOption=null,this.backgroundColor=zt(""),this.adaptiveLayout=zt(!1),this.maxWidth=zt("18.9375rem"),this.onTouch=()=>{},this.onChange=n=>n}onFocusOut(){this.onTouch()}writeValue(n){n!=null&&(this.selectedOption=n)}registerOnChange(n){this.onChange=n}registerOnTouched(n){this.onTouch=n}selectTab(n){this.selectedOption=n,this.onChange(n)}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-button-group"]],hostBindings:function(c,d){c&1&&Ot("focusout",function(){return d.onFocusOut()})},inputs:{buttonGroupName:[1,"buttonGroupName"],optionValues:[1,"optionValues"],backgroundColor:[1,"backgroundColor"],adaptiveLayout:[1,"adaptiveLayout"],maxWidth:[1,"maxWidth"]},standalone:!0,features:[Er([{provide:gc,useExisting:Js(()=>h),multi:!0}]),Kt],decls:3,vars:6,consts:[[1,"tabs",3,"ngStyle"],[1,"tab",3,"ngClass"],["type","radio",1,"tab-group-input",3,"change","name","value","checked"]],template:function(c,d){c&1&&(I(0,"div",0),le(1,QC,3,7,"label",1,Ce),E()),c&2&&(Ie("adaptive-layout",d.adaptiveLayout()),j("ngStyle",en(3,KC,d.backgroundColor(),d.maxWidth())),w(),ce(d.optionValues()))},dependencies:[ve,Ye,Gi,lo],styles:["[_nghost-%COMP%]{width:100%;display:flex;justify-content:center}.tabs[_ngcontent-%COMP%]{display:flex;align-items:center;background-color:var(--primary-container);height:3.25rem;width:100%;max-width:18.9375rem;padding:.3125em;border-radius:6.25em;color:var(--text);overflow:hidden}.tabs.adaptive-layout[_ngcontent-%COMP%]{height:4.25rem}@media (max-width: 767px){.tabs.adaptive-layout[_ngcontent-%COMP%]{height:3.25rem}}.tabs.adaptive-layout[_ngcontent-%COMP%]   .tab[_ngcontent-%COMP%]{height:3.75rem;border-radius:2.5rem;font-size:1.25rem}@media (max-width: 767px){.tabs.adaptive-layout[_ngcontent-%COMP%]   .tab[_ngcontent-%COMP%]{height:2.875rem;font-size:1rem}}input[type=radio][_ngcontent-%COMP%]{-webkit-appearance:none;appearance:none;transform:translate(0)}.tab[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;z-index:1;height:2.875rem;font-weight:var(--font-weight-regular);border-radius:6.188em;cursor:pointer;margin-bottom:0;color:var(--text);text-wrap:nowrap;width:100%;color:var(--primary-dark);font-weight:600}.checked[_ngcontent-%COMP%]{color:var(--primary-inverse);font-weight:700;background-color:var(--primary);border:2px solid var(--primary)}.checked[_ngcontent-%COMP%]   .tab-group-input[_ngcontent-%COMP%]{cursor:auto}@media (max-width: 767px){.checked[_ngcontent-%COMP%]{height:2.875em}}.tab-group-input[_ngcontent-%COMP%]{position:absolute;inset:0;border-radius:6.1888em;cursor:pointer}.tab-group-input[_ngcontent-%COMP%]:focus-visible{outline-style:solid;outline-color:var(--primary-light);outline-offset:.125em;outline-width:.125em}"]})}}return h})();var JC=()=>["Coupons","How it works"];function tw(h,k){if(h&1&&it(0,"app-awards-carousel",3),h&2){let n=A(2);j("withTabs",!0)("textColor",n.data.textColor==null?null:n.data.textColor.data)("layoutOption",n.data.awardsLayoutOptions)}}function ew(h,k){if(h&1&&it(0,"app-how-it-works",4),h&2){let n=A(2);j("textColor",n.data.textColor==null?null:n.data.textColor.data)("withTabs",!0)}}function nw(h,k){if(h&1){let n=Yt();I(0,"div",0)(1,"app-button-group",1),yu("ngModelChange",function(d){kt(n);let a=A();return _u(a.activeTab,d)||(a.activeTab=d),Et(d)}),Ot("ngModelChange",function(d){kt(n);let a=A();return Et(a.onTabChange(d))}),E()(),I(2,"div",2),ut(3,tw,1,3,"app-awards-carousel",3)(4,ew,1,2,"app-how-it-works",4),E()}if(h&2){let n=A();w(),j("buttonGroupName","buttonGroup"),fu("ngModel",n.activeTab),j("optionValues",Ii(7,JC))("backgroundColor","var(--white)")("maxWidth",n.layoutService.viewport()==="mobile"?"18.875rem":"29.125rem")("adaptiveLayout",!0),w(2),rt(n.activeTab==="Coupons"?3:n.activeTab==="How it works"?4:-1)}}function iw(h,k){if(h&1&&it(0,"app-awards-carousel",5)(1,"app-how-it-works",6),h&2){let n=A();j("textColor",n.data.textColor==null?null:n.data.textColor.data)("layoutOption",n.data.awardsLayoutOptions),w(),j("textColor",n.data.textColor==null?null:n.data.textColor.data)}}var B_=(()=>{class h{constructor(n){this.componentConfig=n,this.layoutService=gt(pn),this.activeTab="Coupons";let c=this.componentConfig?.data??{},d=c.awardsLayoutOptions??c.awardsLayoutOptions??c.layoutOption;this.data=cn(te(te({},F_),c),{awardsLayoutOptions:d})}onTabChange(n){this.activeTab=n}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-loyalty-tabs"]],standalone:!0,features:[Kt],decls:3,vars:1,consts:[[1,"loyalty-tabs"],[3,"ngModelChange","buttonGroupName","ngModel","optionValues","backgroundColor","maxWidth","adaptiveLayout"],[1,"tab-content"],[3,"withTabs","textColor","layoutOption"],[3,"textColor","withTabs"],["sectionTitle","'Coupons'",3,"textColor","layoutOption"],["sectionTitle","'How it works'",3,"textColor"]],template:function(c,d){c&1&&($o(0),ut(1,nw,5,8)(2,iw,2,3),Go()),c&2&&(w(),rt((d.data.layoutOptions==null?null:d.data.layoutOptions.data)==="With tabs"?1:2))},dependencies:[Lu,Eu,R_,lo,Hi,Cu],styles:[".loyalty-tabs[_ngcontent-%COMP%]{padding-top:3rem}@media (max-width: 767px){.loyalty-tabs[_ngcontent-%COMP%]{padding-top:2rem}}"]})}}return h})();var ow=["map"],rw=["search"],aw=["addressFormComponent"],sw=["storesCards"],lw=(h,k)=>k.name,hm=h=>({selected:h}),cw=()=>({display:"flex"}),N_=h=>({active:h}),dw=h=>({visible:h}),V_=h=>({rotated:h}),pw=(h,k)=>({today:h,closed:k});function uw(h,k){if(h&1){let n=Yt();I(0,"button",15),Ot("click",function(){let d=kt(n).$index,a=A();return Et(a.selectOrderType(d))}),it(1,"app-icon",16),X(2),E()}if(h&2){let n=k.$implicit,c=k.$index,d=A();j("ngClass",me(4,hm,d.selectedOrderType===c)),w(),j("name",d.getIcon(n.type))("size",d.layoutService.viewport()==="mobile"?"20px":"22px"),w(),Rt(" ",n.displayName||n.type," ")}}function hw(h,k){if(h&1){let n=Yt();I(0,"button",24),ff(1,"highlight"),Ot("click",function(){let d=kt(n).$implicit,a=A(3);return Et(a.selectSuggestion(d))}),E()}if(h&2){let n,c=k.$implicit,d=A(3);j("innerHTML",_f(1,1,c.formattedAddress,(n=d.searchForm.get("address"))==null?null:n.value),Ti)}}function mw(h,k){if(h&1&&(I(0,"div",20)(1,"div",22),le(2,hw,2,4,"button",23,Ce),E()()),h&2){let n=A(2);w(2),ce(n.searchSuggestions)}}function gw(h,k){if(h&1&&(I(0,"div",21)(1,"div",22)(2,"button",25),X(3),E()()()),h&2){let n=A(2);w(3),St(n.localizationService.getLocalizationString("route.locations.no_address_found"))}}function fw(h,k){if(h&1){let n=Yt();I(0,"div",7),X(1),E(),I(2,"app-use-my-location-button",17),Ot("clickEvent",function(){kt(n);let d=A();return Et(d.findMyLocation())}),I(3,"u",18),X(4),E()(),it(5,"app-input",19),ut(6,mw,4,0,"div",20)(7,gw,4,1,"div",21)}if(h&2){let n=A();w(),St(n.localizationService.getLocalizationString("route.locations.enter_your_location")),w(),j("ngStyle",Ii(14,cw))("iconName",n.iconNameType.location)("ariaLabel","Use My Location")("iconSize","1rem")("iconColor","var(--primary)"),w(2),St(n.localizationService.getLocalizationString("route.locations.use_my_location")),w(),j("type","text")("placeholder","Enter Address or ZIP code")("hidePlaceholderOnFocus",!0)("borderRadius","1.625rem")("background","var(--white)")("appendInnerIcon",n.iconNameType.lens),w(),rt(n.searchSuggestions.length&&n.showSearchSuggestions?6:!n.searchSuggestions.length&&n.showSearchSuggestions?7:-1)}}function _w(h,k){if(h&1){let n=Yt();I(0,"div",30),Ot("click",function(){let d=kt(n).$implicit,a=A(3);return Et(a.selectAddress(d))})("keydown.enter",function(){let d=kt(n).$implicit,a=A(3);return Et(a.selectAddress(d))})("keydown.space",function(d){let a=kt(n).$implicit,z=A(3);return d.preventDefault(),Et(z.selectAddress(a))}),it(1,"app-icon",31),I(2,"div",32)(3,"span",33),X(4),E(),I(5,"span",34),X(6),E()(),I(7,"div",35)(8,"button",36),Ot("click",function(d){let a=kt(n).$implicit,z=A(3);return Et(z.editAddress(d,a))}
731),it(9,"app-icon",16),E(),it(10,"div",37),I(11,"button",38),Ot("click",function(d){let a=kt(n).$implicit,z=A(3);return Et(z.deleteAddress(d,a))}),it(12,"app-icon",16),E()()()}if(h&2){let n=k.$implicit,c=A(3);j("ngClass",me(10,hm,(c.selectedAddress==null?null:c.selectedAddress.name)===n.name)),w(),j("name",c.icon(n)),w(3),St(n.name),w(2),St(c.addressInfo(n)),w(2),qt("aria-label","Edit Address"),w(),j("name",c.iconNameType.edit)("size","1.5rem"),w(2),qt("aria-label","Delete Address"),w(),j("name",c.iconNameType.delete)("size","1.5rem")}}function yw(h,k){if(h&1){let n=Yt();I(0,"div",27),le(1,_w,13,12,"div",28,lw),E(),I(3,"button",29),Ot("click",function(){kt(n);let d=A(2);return Et(d.addNewAddress())}),X(4),E()}if(h&2){let n=A(2);w(),ce(n.savedAddresses()),w(3),St(n.localizationService.getLocalizationString("route.locations.add_new"))}}function xw(h,k){if(h&1){let n=Yt();I(0,"app-address-form",39,0),Ot("formChanging",function(){kt(n);let d=A(2);return Et(d.handleFormChanging())})("isFormValid",function(d){kt(n);let a=A(2);return Et(a.handleAddressFormValidity(d))}),E()}if(h&2){let n=A(2);j("allErrors",n.serverErrors)}}function vw(h,k){if(h&1&&(I(0,"div",11)(1,"div",7),X(2),E(),ut(3,yw,5,1)(4,xw,2,1,"app-address-form",26),E()),h&2){let n=A();w(2),St(n.savedAddresses().length?n.localizationService.getLocalizationString("route.locations.saved_address"):n.localizationService.getLocalizationString("route.locations.address")),w(),rt(n.savedAddresses().length&&!n.showAddressForm?3:4)}}function bw(h,k){if(h&1){let n=Yt();I(0,"div",12)(1,"button",40),Ot("click",function(){kt(n);let d=A();return Et(d.showMap())}),X(2),E(),I(3,"button",40),Ot("click",function(){kt(n);let d=A();return Et(d.showStoreListView())}),X(4),E()()}if(h&2){let n=A();w(),j("ngClass",me(4,N_,!n.showStoreList)),w(),St(n.localizationService.getLocalizationString("route.locations.map")),w(),j("ngClass",me(6,N_,n.showStoreList)),w(),St(n.localizationService.getLocalizationString("route.locations.list"))}}function Cw(h,k){if(h&1&&(I(0,"div",58),X(1),E(),it(2,"app-icon",48),I(3,"div",59),X(4),I(5,"span",60),it(6,"app-icon",48),E()()),h&2){let n,c=A(2),d=c.$implicit,a=c.$index,z=A(3);w(),St(z.localizationService.getLocalizationString("route.locations.closed")),w(),j("name",z.iconNameType.dot)("size","4px"),w(2),Rt(" ",(n=z.openedHours(d))==null?null:n.openTime," "),w(),j("ngClass",me(7,V_,a===z.showDropdownIndex)),w(),j("name",z.iconNameType.triangle)("size","9px")}}function ww(h,k){if(h&1&&(I(0,"div",61),X(1),E(),it(2,"app-icon",48),I(3,"div",59),X(4),I(5,"span",60),it(6,"app-icon",48),E()()),h&2){let n,c=A(2),d=c.$implicit,a=c.$index,z=A(3);w(),St(z.localizationService.getLocalizationString("route.locations.open")),w(),j("name",z.iconNameType.dot)("size","4px"),w(2),Rt(" ",(n=z.openedHours(d))==null?null:n.closeTime," "),w(),j("ngClass",me(7,V_,a===z.showDropdownIndex)),w(),j("name",z.iconNameType.triangle)("size","9px")}}function Mw(h,k){if(h&1&&X(0),h&2){let n=A().$implicit,c=A(5);Qn(" ",c.formatAMPM(n.openTime)," - ",c.formatAMPM(n.closeTime)," ")}}function Pw(h,k){if(h&1&&X(0),h&2){let n=A(6);St(n.localizationService.getLocalizationString("route.locations.closed_lowercase"))}}function Ow(h,k){if(h&1&&(I(0,"div",57)(1,"div",62),X(2),E(),I(3,"div",63),ut(4,Mw,1,2)(5,Pw,1,1),E()()),h&2){let n=k.$implicit,c=k.$index,d=A(5);j("ngClass",en(4,pw,!c,n.closed)),qt("aria-label",d.businessHoursItemLabel(n)),w(2),St(n.day.slice(0,3)),w(2),rt(n.closed?5:4)}}function Sw(h,k){if(h&1){let n=Yt();I(0,"div",50)(1,"button",54),Ot("click",function(){kt(n);let d=A().$index,a=A(3);return Et(a.showBusinessHours(d))}),it(2,"app-icon",48),I(3,"div",55),ut(4,Cw,7,9)(5,ww,7,9),E()(),I(6,"div",56),le(7,Ow,6,7,"div",57,Ce),E()()}if(h&2){let n,c=A(),d=c.$implicit,a=c.$index,z=A(3);w(),qt("aria-controls","business-hours-dropdown-"+a)("aria-expanded",a===z.showDropdownIndex),w(),j("name",z.iconNameType.clock)("size","16px"),w(2),rt((n=z.openedHours(d))!=null&&n.closed?4:5),w(2),j("id","business-hours-dropdown-"+a)("ngClass",me(9,dw,a===z.showDropdownIndex)),qt("aria-hidden",a!==z.showDropdownIndex)("inert",a===z.showDropdownIndex?null:""),w(),ce(z.businessHours(d))}}function Tw(h,k){if(h&1&&(I(0,"div",53),X(1),E()),h&2){let n=A().$implicit,c=A(3);w(),Qn("",n.distance.toFixed(2)," ",c.localizationService.getLocalizationString("route.locations.miles"),"")}}function Iw(h,k){if(h&1){let n=Yt();I(0,"div",43,1),Ot("click",function(d){let a=kt(n).$implicit,z=A(3);return Et(z.selectStoreFromCard(d,[a.lng,a.lat]))})("keydown.enter",function(d){let a=kt(n).$implicit,z=A(3);return Et(z.selectStoreFromCard(d,[a.lng,a.lat]))})("keydown.space",function(d){let a=kt(n).$implicit,z=A(3);return Et(z.selectStoreFromCard(d,[a.lng,a.lat]))}),I(2,"div",44)(3,"h3",45),X(4),E()(),I(5,"div",46)(6,"div",47),it(7,"app-icon",48),I(8,"span",49),X(9),E()(),ut(10,Sw,9,11,"div",50),E(),I(11,"div",51)(12,"button",52),Ot("click",function(d){let a=kt(n).$implicit,z=A(3);return d.stopPropagation(),Et(z.openMerchantStore(a))}),X(13),E(),ut(14,Tw,2,2,"div",53),E()()}if(h&2){let n=k.$implicit,c=k.$index,d=A(3);j("ngClass",me(13,hm,d.selectedStoreIndex===c)),qt("aria-current",d.selectedStoreIndex===c?"true":null)("aria-label",d.storeCardAriaLabel(n)),w(4),St(n.name),w(3),j("name",d.iconNameType.pin)("size","16px"),w(2),dc(" ",n.address,", ",n.city,", ",n.state," ",n.zip," "),w(),rt(d.openedHours(n)?10:-1),w(3),St(d.localizationService.getLocalizationString("route.locations.order_online")),w(),rt(n.distance?14:-1)}}function kw(h,k){if(h&1&&le(0,Iw,15,15,"div",42,Ce),h&2){let n=A(2);ce(n.stores)}}function Ew(h,k){if(h&1&&(I(0,"div",41),it(1,"img",64),I(2,"div",65),X(3),E(),I(4,"div",66),X(5),E()()),h&2){let n=A(2);w(),j("ngSrc","../../../assets/components/locations/no-stores-found.png")("alt",n.localizationService.getLocalizationString("route.locations.no_stores_image_alt")),w(2),St(n.localizationService.getLocalizationString("route.locations.no_stores_found")),w(2),St(n.localizationService.getLocalizationString("route.locations.try_searching_different_address"))}}function zw(h,k){if(h&1&&(I(0,"div",13),ut(1,kw,2,0)(2,Ew,6,4,"div",41),E()),h&2){let n=A();w(),rt(n.stores&&n.stores.length?1:2)}}function Aw(h,k){if(h&1){let n=Yt();I(0,"div",14)(1,"app-mapbox-map",67,2),Ot("clickAction",function(d){kt(n);let a=A();return Et(a.selectStore(d))}),E()()}if(h&2){let n=A();w(),j("markers",n.markers)("zoom",n.zoom)("selectedMarker",n.selectedStoreIndex)("pitch",0)("doubleClickZoom",!1)("showDeliveryLayer",!0)("isLocationsPage",!0)}}var j_=(()=>{class h{constructor(){this.addressService=gt(zf),this.authService=gt(Mn),this.utmService=gt(is),this.accountAddressesService=gt(bu),this.addressBookService=gt(Mu),this.errorsService=gt($r),this.modalService=gt(Gn),this.localizationService=gt(un),this.iconNameType=ge,this.configService=gt(Ee),this.merchantConfig=gt(Wn).merchantConfig,this.layoutService=gt(pn),this.activatedRoute=gt(bf),this.selectedOrderType=null,this.stores=this.merchantConfig()?.brand?.stores,this.selectedStoreIndex=null,this.selectedMarkerPosition=[this.stores[0].lng,this.stores[0].lat],this.todayIndexInTheWeek=new Date().getDay(),this.showDropdownIndex=null,this.searchTerm="",this.addressSelected=!1,this.showSearchSuggestions=!1,this.searchSuggestions=[],this.showStoreList=this.layoutService.viewport()!=="mobile",this.zoom=3,this.formatAMPM=wn,this.savedAddresses=Ut(()=>this.accountAddressesService.addresses()),this.selectedAddress=null,this.showAddressForm=!1,this.lastDeliverySearchTerm="",this.fetchedAddressesForSession=!1,this.MIN_GEOCODE_SEARCH_LENGTH=3,this.GEO
731CODE_DEBOUNCE_MS=500,ii(()=>{if(!this.authService.state().isLoggedIn){this.fetchedAddressesForSession=!1,this.selectedAddress=null;return}this.fetchedAddressesForSession||(this.fetchedAddressesForSession=!0,this.fetchSavedAddresses())})}ngOnInit(){if(this.searchForm=new Rr({address:new Fi("")}),this.activatedRoute.snapshot.queryParams.address){let n=this.activatedRoute.snapshot.queryParams.address;this.searchForm.controls.address.setValue(n),this.addressSelected=!0,this.showSearchSuggestions=!1,this.selectedOrderType=this.merchantConfig().brand.orderTypes.findIndex(c=>c.type==="Delivery"),this.findStores(n)}this.searchForm.controls.address.valueChanges.pipe(wo(n=>String(n??"").trim()),af(),of(this.GEOCODE_DEBOUNCE_MS),Wa(n=>this.handleAddressSearchTerm(n))).subscribe({next:n=>{this.addressSelected||this.applySearchSuggestions(n)}})}selectOrderType(n){if(this.selectedOrderType===n?this.selectedOrderType=null:this.selectedOrderType=n,this.selectedStoreIndex=null,this.serverErrors=void 0,this.lastDeliverySearchTerm="",this.selectedOrderTypeName()==="Delivery"){this.searchSuggestions=[],this.showSearchSuggestions=!1,this.showAddressForm=!1,this.selectedAddress=this.savedAddresses().length?this.savedAddresses()[0]:null,this.selectedAddress?(this.addressSelected=!0,this.findStores(this.addressInfo(this.selectedAddress))):this.filterStores(this.merchantConfig()?.brand?.stores||[]);return}this.selectedAddress=null,this.showAddressForm=!1;let c=this.searchForm.controls.address;c.value.length?this.findStores(c.value):this.filterStores(this.merchantConfig()?.brand?.stores||[])}selectedOrderTypeName(){return this.selectedOrderType===null?null:this.merchantConfig()?.brand?.orderTypes?.[this.selectedOrderType]?.type??null}getIcon(n){return this.iconNameType[n.toLocaleLowerCase()]||this.iconNameType.pickup}storePhone(n){return Dr(n.telephone??"")}storeCardAriaLabel(n){let c=this.openedHours(n),d=[n.name,n.address,n.city,n.state,n.zip,this.storePhone(n)];return c?.closed?d.push("Store Closed",c.openTime):c&&d.push("Open",c.closeTime),n.distance&&d.push(`${n.distance.toFixed(2)} miles`),d.filter(Boolean).join(", ")}storeBusinessHours(n){let c=new Date().getDay();return!n.storeHours||!n.storeHours.any?{openTime:"",closeTime:""}:n.storeHours.any[c]}selectStore(n,c=!1){let d=this.stores?.findIndex(a=>n[0]===a.lng&&n[1]===a.lat)??null;d===null||d<0||(d!=this.selectedStoreIndex?(this.selectedStoreIndex=d,c?this.showStoreList=!1:this.showStoreList=!0,this.scrollToSelectedStore(!c)):this.selectedStoreIndex=null,c&&this.mapRef?.selectMarker(this.selectedStoreIndex,!1))}selectStoreFromCard(n,c){n.target instanceof Element&&n.target.closest("button, .business-hours-container")||(n instanceof KeyboardEvent&&n.preventDefault(),this.selectStore(c,!0))}scrollToSelectedStore(n=!1){setTimeout(()=>{if(this.selectedStoreIndex===null||!this.shouldRenderStoreList())return;let c=this.storesCardsRef?.get(this.selectedStoreIndex)?.nativeElement;c&&(c.scrollIntoView({block:"center",behavior:"smooth"}),n&&c.focus({preventScroll:!0}))},300)}openedHours(n){return!n.storeHours||!n.storeHours.any||!n.storeHours.any[this.todayIndexInTheWeek]?null:this.findNextTimeOpen(n.storeHours.any,this.todayIndexInTheWeek,n.timeZone)}businessHours(n){return!n.storeHours||!n.storeHours.any||!n.storeHours.any[this.todayIndexInTheWeek]?null:this.reorderBusinessDays(n.storeHours.any)}findNextTimeOpen(n,c,d){let a=d??Ee.FALLBACK_TIME_ZONE,z=new Date(new Date().toLocaleString("en-US",{timeZone:a})),J=z.getDay(),yt=z.getHours();return n[c].closed?{closed:!0,openTime:wn(this.findNextTimeOpen(n,n[c+1]?c+1:0,d).openTime)}:J!==c?{closed:!0,openTime:`Opens at ${wn(n[c].openTime)}, ${n[c].day.slice(0,1).toUpperCase()}${n[c].day.slice(1,3)}`}:parseInt(n[c].openTime??"")>yt?{closed:!0,openTime:`Opens at ${wn(n[c].openTime)}`}:parseInt(n[c].closeTime??"")>yt?{closed:!1,closeTime:`Closes at ${wn(n[c].closeTime)}`}:{closed:!0,openTime:wn(this.findNextTimeOpen(n,n[c+1]?c+1:0,d).openTime)}}openMerchantStore(n){if(this.selectedOrderTypeName()==="Delivery"){this.openDeliveryStore(n);return}let c=new URL(`${n.baseUrl}${this.selectedOrderType!==null?`?orderType=${n.orderTypes[this.selectedOrderType].type}`:""}`);this.utmService.appendUtmParams(c),window.location.href=c.toString()}reorderBusinessDays(n){let c=[],d=JSON.parse(JSON.stringify(this.todayIndexInTheWeek));
731return n.forEach(()=>{c.push(n[d]),d=d===6?0:d+1}),c}businessHoursItemLabel(n){let c=n.day.charAt(0).toUpperCase()+n.day.slice(1);return!n.closed&&n.openTime&&n.closeTime?`${c}, ${wn(n.openTime)} to ${wn(n.closeTime)}`:`${c}, closed`}showBusinessHours(n){this.showDropdownIndex=n===this.showDropdownIndex?null:n}autoSelectSingleStore(){this.stores&&this.stores.length===1&&(this.selectedStoreIndex=0)}findStores(n){let c=n.trim();if(!c){this.filterStores(this.merchantConfig()?.brand?.stores||[]),this.showSearchSuggestions=!1;return}if(!this.addressSelected&&c.length<this.MIN_GEOCODE_SEARCH_LENGTH){this.searchSuggestions=[],this.showSearchSuggestions=!1;return}this.getGeocodeResponse(c).subscribe({next:d=>this.applyGeocodeResponse(d),error:()=>this.handleGeocodeError()})}handleAddressSearchTerm(n){return this.addressSelected=!1,this.searchTerm=n,n?n.length<this.MIN_GEOCODE_SEARCH_LENGTH?(this.searchSuggestions=[],this.showSearchSuggestions=!1,du):this.getGeocodeResponse(n).pipe(ua(()=>(this.handleGeocodeError(),du))):(this.filterStores(this.merchantConfig()?.brand?.stores||[]),this.showSearchSuggestions=!1,du)}getGeocodeResponse(n){let c=this.selectedOrderType!==null?this.merchantConfig().brand.orderTypes[this.selectedOrderType].type:"";return this.addressService.geocodeAddress(n,{orderType:c})}applyGeocodeResponse(n){if(!this.addressSelected){this.applySearchSuggestions(n);return}this.stores=n.stores??[],this.showSearchSuggestions=!1,this.autoSelectSingleStore()}applySearchSuggestions(n){this.searchSuggestions=n.results??[],this.showSearchSuggestions=!!this.searchSuggestions.length}handleGeocodeError(){this.searchSuggestions=[],this.showSearchSuggestions=!0}filterStores(n){let c=this.selectedOrderType!==null?this.merchantConfig().brand.orderTypes[this.selectedOrderType].type:null;c===null?this.stores=n:this.stores=n.filter(d=>d.orderTypes&&d.orderTypes.find(a=>a.type===c)),this.autoSelectSingleStore()}selectSuggestion(n){this.searchTerm=n.formattedAddress,this.addressSelected=!0,this.showSearchSuggestions=!1,this.searchForm.controls.address.setValue(n.formattedAddress,{emitEvent:!1}),this.findStores(n.formattedAddress),this.selectedMarkerPosition=[n.location.lng,n.location.lat]}handleAddressFormValidity(n){if(!n||this.selectedOrderTypeName()!=="Delivery"||!this.addressFormComponent)return;let c=this.getDeliveryAddressSearchTerm();!c||c===this.lastDeliverySearchTerm||(this.lastDeliverySearchTerm=c,this.addressSelected=!0,this.findStores(c))}handleFormChanging(){this.serverErrors=void 0,this.selectedOrderTypeName()==="Delivery"&&!this.selectedAddress&&this.isDeliveryAddressFormEmpty()&&(this.lastDeliverySearchTerm="",this.addressSelected=!1,this.selectedStoreIndex=null,this.filterStores(this.merchantConfig()?.brand?.stores||[]))}selectAddress(n){this.selectedAddress=n,this.showAddressForm=!1,this.addressSelected=!0,this.findStores(this.addressInfo(n))}fetchSavedAddresses(){this.accountAddressesService.fetchAddresses().subscribe({next:n=>{this.selectedOrderTypeName()==="Delivery"&&!this.selectedAddress&&n.length&&this.selectAddress(n[0])},error:()=>{this.fetchedAddressesForSession=!1}})}addNewAddress(){this.showAddressForm=!0,this.selectedAddress=null,this.serverErrors=void 0}editAddress(n,c){n.stopPropagation(),this.addressBookService.updateState(c),this.modalService.openModal(Ln.EditAddress).subscribe(()=>{this.accountAddressesService.fetchAddresses().subscribe()})}deleteAddress(n,c){n.stopPropagation(),this.accountAddressesService.deleteAddress(c).subscribe({next:()=>{this.selectedAddress?.name===c.name&&(this.selectedAddress=null),this.accountAddressesService.fetchAddresses().subscribe({next:d=>{this.selectedOrderTypeName()==="Delivery"&&!this.selectedAddress&&d.length&&this.selectAddress(d[0])}})},error:()=>{}})}icon(n){switch(n.addressType){case qo.APARTMENT:return this.iconNameType.apartment;case qo.SINGLE_FAMILY:return this.iconNameType.home;case qo.BUSINESS:return this.iconNameType.business;case qo.HOSPITAL:return this.iconNameType.hospital;case qo.HOTEL:return this.iconNameType.hotel;default:return this.iconNameType.otherAddressType}}addressInfo(n){return`${n.address}, ${n.city}, ${n.state} ${n.zip}`}openDeliveryStore(n){let c=this.addressFormComponent?new mc().deserialize(this.addressFormComponent.addressForm.value):null;if(!this.selectedAddress&&this.addressFormComponent&&!this.addressFormComponent.addressForm.valid){this.addressFormComponent.enableErrors();return}if(!this.selectedAddress&&c?.saveToAddressBook){c.address=this.formatDeliveryAddress(c),this.accountAddressesService.addAddress(c).subscribe({next:()=>this.redirectToStore(n),error:d=>{let a=this.errorsService.parseErrorResponse(d);this.serverErrors=a.errors}});return}this.redirectToStore(n)}redirectToStore(n){let c=new URL(n.baseUrl),d=this.selectedOrderTypeName(),a=this.authService.getAccessToken();d&&c.searchParams.set("orderType",d),d==="Delivery"&&this.appendDeliveryAddressParams(c.searchParams),a&&c.searchParams.set("accessToken",a),this.utmService.appendUtmParams(c),window.location.href=c.toString()}appendDeliveryAddressParams(n){let c=this.selectedAddress??this.addressFormComponent?.addressForm.value;if(!c)return;let d=this.formatDeliveryAddress(c);c.name&&(c.saveToAddressBook||this.selectedAddress)&&this.appendIfDefined(n,"addressName",c.name),this.appendIfDefined(n,"address",d),this.appendIfDefined(n,"zip",c.zip),this.appendIfDefined(n,"addressType",c.addressType);for(let a=1;a<=3;a++)this.appendIfDefined(n,`diff${a}`,c[`value${a}`]);this.appendIfDefined(n,"deliveryInstructions",c.deliveryInstructions)}getDeliveryAddressSearchTerm(){if(!this.addressFormComponent)return"";let n=this.addressFormComponent.addressForm.value;return[this.formatDeliveryAddress(n),n.city,n.state,n.zip].filter(
731Boolean).join(", ")}isDeliveryAddressFormEmpty(){if(!this.addressFormComponent)return!0;let n=this.addressFormComponent.addressForm.value;return!String(n.street??"").trim()&&!String(n.zip??"").trim()}formatDeliveryAddress(n){if(n.address)return String(n.address);let c=[];return n.street&&c.push(String(n.street)),n.city&&c.push(String(n.city)),n.state&&c.push(String(n.state)),c.join(", ")}appendIfDefined(n,c,d){d!=null&&d!==""&&n.append(c,String(d))}findMyLocation(){"geolocation"in navigator&&navigator.geolocation.getCurrentPosition(n=>{this.getAddressByLatLng({lat:n.coords.latitude,lng:n.coords.longitude})})}getAddressByLatLng(n){this.addressService.reverseGeocode(n.lat,n.lng).subscribe({next:c=>{let d=c.results?.[0]?.formattedAddress;d&&(this.addressSelected=!0,this.searchForm.controls.address.setValue(d,{emitEvent:!1}),this.findStores(d))},error:()=>this.handleGeocodeError()})}showMap(){this.showStoreList=!1}showStoreListView(){this.showStoreList=!0,this.scrollToSelectedStore()}shouldRenderStoreList(){return this.showStoreList||this.layoutService.viewport()!=="mobile"}get markers(){return this.stores.map(n=>[n.lng??0,n.lat??0])}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-locations"]],viewQuery:function(c,d){if(c&1&&($e(ow,5),$e(rw,5),$e(aw,5),$e(sw,5)),c&2){let a;Ge(a=Ze())&&(d.mapRef=a.first),Ge(a=Ze())&&(d.searchRef=a.first),Ge(a=Ze())&&(d.addressFormComponent=a.first),Ge(a=Ze())&&(d.storesCardsRef=a)}},standalone:!0,features:[Kt],decls:17,vars:8,consts:[["addressFormComponent",""],["storesCards",""],["map",""],[1,"sidebar"],[1,"location-container",3,"formGroup"],[1,"page-title"],[1,"order-types-container"],[1,"section-title"],[1,"order-types"],[1,"order-type",3,"ngClass"],[1,"locations-content"],[1,"delivery-address-container"],[1,"view-toggle-buttons"],[1,"stores-container"],[1,"map"],[1,"order-type",3,"click","ngClass"],[1,"icon",3,"name","size"],[1,"location-button",3,"clickEvent","ngStyle","iconName","ariaLabel","iconSize","iconColor"],[1,"location-text"],["formControlName","address",3,"type","placeholder","hidePlaceholderOnFocus","borderRadius","background","appendInnerIcon"],[1,"address-suggestions-dropdown"],[1,"address-suggestions-dropdown","no-results"],[1,"address-suggestions-list"],[1,"address-suggestions-list-item",3,"innerHTML"],[1,"address-suggestions-list-item",3,"click","innerHTML"],[1,"address-suggestions-list-item"],[3,"allErrors"],[1,"saved-addresses-list"],["role","button","tabindex","0",1,"saved-addresses-list-item",3,"ngClass"],[1,"button-undecorated","add-new-btn",3,"click"],["role","button","tabindex","0",1,"saved-addresses-list-item",3,"click","keydown.enter","keydown.space","ngClass"],[1,"saved-addresses-list-item-icon",3,"name"],[1,"saved-addresses-list-item-info"],[1,"saved-addresses-list-item-name"],[1,"saved-addresses-list-item-address"],[1,"saved-addresses-list-item-actions"],[1,"button-undecorated","btn-edit",3,"click"],[1,"saved-addresses-list-item-actions-divider"],[1,"button-undecorated","btn-delete",3,"click"],[3,"formChanging","isFormValid","allErrors"],[1,"toggle-btn",3,"click","ngClass"],[1,"no-stores"],["tabindex","0","role","group",1,"store",3,"ngClass"],["tabindex","0","role","group",1,"store",3,"click","keydown.enter","keydown.space","ngClass"],[1,"store-main-details"],[1,"store-title"],[1,"store-info"],[1,"store-ad
731dress-wrapper"],[3,"name","size"],[1,"store-address"],[1,"business-hours-container"],[1,"store-actions"],[1,"button-accent","confirm-btn",3,"click"],[1,"store-distance"],["type","button",1,"store-hours",3,"click"],[1,"opened_closed"],[1,"business-hours-dropdown",3,"id","ngClass"],["tabindex","0",1,"business-hours-item",3,"ngClass"],[1,"closed"],[1,"time"],[1,"drowdown-handler",3,"ngClass"],[1,"opened"],["aria-hidden","true",1,"day"],["aria-hidden","true",1,"time"],["loading","lazy","width","156","height","227",1,"no-stores-image",3,"ngSrc","alt"],[1,"no-stores-text"],[1,"no-stores-subtext"],[3,"clickAction","markers","zoom","selectedMarker","pitch","doubleClickZoom","showDeliveryLayer","isLocationsPage"]],template:function(c,d){if(c&1&&($o(0),I(1,"div",3)(2,"form",4)(3,"h2",5),X(4),E(),I(5,"div",6)(6,"div",7),X(7),E(),I(8,"div",8),le(9,uw,3,6,"button",9,Ce),E()(),ut(11,fw,8,15),E(),I(12,"div",10),ut(13,vw,5,2,"div",11)(14,bw,5,8,"div",12)(15,zw,3,1,"div",13),E()(),ut(16,Aw,3,7,"div",14),Go()),c&2){let a;w(2),j("formGroup",d.searchForm),w(2),St(d.localizationService.getLocalizationString("route.locations.page_title")),w(3),St(d.localizationService.getLocalizationString("route.locations.how_would_you_like_to_order")),w(2),ce((a=d.merchantConfig())==null||a.brand==null?null:a.brand.orderTypes),w(2),rt(d.selectedOrderTypeName()!=="Delivery"?11:-1),w(2),rt(d.selectedOrderTypeName()==="Delivery"?13:-1),w(),rt(d.layoutService.viewport()==="mobile"?14:-1),w(),rt(d.shouldRenderStoreList()?15:-1),w(),rt(d.layoutService.viewport()!=="mobile"||!d.showStoreList?16:-1)}},dependencies:[Ae,ve,Ye,Gi,mn,Ur,rs,kf,Ho,Br,Hi,Fr,Nr,Vr,Ef,wu],styles:['[_nghost-%COMP%]{display:grid;grid-auto-flow:column;grid-template-columns:27.5rem auto;min-height:calc(100vh - var(--desktop-header-height))}@media (min-width: 768px){[_nghost-%COMP%]{margin-top:var(--desktop-header-height);min-height:calc(100vh - var(--desktop-header-height))}}@media (min-width: 1700px){[_nghost-%COMP%]{min-height:calc(100vh - var(--desktop-header-height))}}@media (max-width: 767px){[_nghost-%COMP%]{grid-auto-flow:row;grid-template-columns:auto;grid-template-rows:max-content}}.sidebar[_ngcontent-%COMP%]{width:100%;padding:1.5rem 1.969rem 0;display:grid;grid-template-rows:none;grid-auto-flow:row;position:relative}@media (min-width: 768px){.sidebar[_ngcontent-%COMP%]{height:calc(100vh - var(--desktop-header-height));padding:1.625rem 0 0 2.5rem;grid-template-rows:auto auto minmax(0,1fr)}}@media (min-width: 1280px){.sidebar[_ngcontent-%COMP%]{height:calc(100vh - var(--desktop-header-height));padding:1.625rem 0 0 2.5rem;width:27.5rem;grid-template-rows:auto auto minmax(0,1fr)}}@media (min-width: 1700px){.sidebar[_ngcontent-%COMP%]{height:calc(100vh - var(--desktop-header-height));padding:1.625rem 0 0 2.5rem;width:27.5rem;grid-template-rows:auto auto minmax(0,1fr)}}.sidebar[_ngcontent-%COMP%]   .location-container[_ngcontent-%COMP%]{margin-right:2rem;margin-bottom:1rem;position:relative}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]   .location-container[_ngcontent-%COMP%]{margin-right:0}}.sidebar[_ngcontent-%COMP%]   .location-container[_ngcontent-%COMP%]   .page-title[_ngcontent-%COMP%]{font-size:40px;font-weight:var(--font-weight-bold);font-family:Caveat,"sans-serif";margin-bottom:1rem;line-height:1.25rem;height:1.25rem}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]   .location-container[_ngcontent-%COMP%]   .page-title[_ngcontent-%COMP%]{font-size:var(--font-size-xl);margin-bottom:0;margin-top:0}}.sidebar[_ngcontent-%COMP%]   .location-container[_ngcontent-%COMP%]   .location-button[_ngcontent-%COMP%]{padding-bottom:.5rem}.sidebar[_ngcontent-%COMP%]   .location-container[_ngcontent-%COMP%]   .location-button[_ngcontent-%COMP%]   .location-text[_ngcontent-%COMP%]{color:var(--primary);text-decoration:none}.sidebar[_ngcontent-%COMP%]   .location-container[_ngcontent-%COMP%]   .address-suggestions-dropdown[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 2px);z-index:2;border-radius:24px;background:var(--white);padding:1rem 0;width:100%;border:1px solid var(--grey);box-shadow:3.5px 3px 4.4px -.5px #0000000d;overflow:hidden}.sidebar[_ngcontent-%COMP%]   .location-container[_ngcontent-%COMP%]   .address-suggestions-dropdown.no-results[_ngcontent-%COMP%]{padding:0}.sidebar[_ngcontent-%COMP%]   .location-container[_ngcontent-%COMP%]   .address-suggestions-dropdown.no-results[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{padding:1rem 1.5rem}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]   .location-container[_ngcontent-%COMP%]   .address-suggestions-dropdown[_ngcontent-%COMP%]{z-index:4}}.sidebar[_ngcontent-%COMP%]   .location-container[_ngcontent-%COMP%]   .address-suggestions-list[_ngcontent-%COMP%]{display:grid;grid-auto-flow:row;max-height:21rem;overflow:auto}.sidebar[_ngcontent-%COMP%]   .location-container[_ngcontent-%COMP%]   .address-suggestions-list-item[_ngcontent-%COMP%]{padding:.625rem 1.5rem;cursor:pointer;background:none;text-align:left}.sidebar[_ngcontent-%COMP%]   .location-container[_ngcontent-%COMP%]   .address-suggestions-list-item[_ngcontent-%COMP%]:hover{background-color:var(--grey-background)}.sidebar[_ngcontent-%COMP%]   .section-title[_ngcontent-%COMP%]{color:var(--text);font-size:var(--font-size-med);font-weight:var(--font-weight-regular);line-height:1.5rem;margin-bottom:.5rem}.sidebar[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(98px,33.3333333333%),1fr));gap:.5rem;width:100%;margin-right:2rem}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]{gap:.5rem}}.sidebar[_ngcontent-%COMP%]   .order-types-container[_ngcontent-%COMP%]{padding-bottom:1rem;margin-top:1rem}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]   .order-types-container[_ngcontent-%COMP%]{padding:1rem 0;margin-top:0}}.sidebar[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]   .order-type[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;height:4rem;text-align:center;color:#6a6a6a;border-radius:8px;background-color:var(--white);font-weight:var(--font-weight-semi-bold)}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]   .order-type[_ngcontent-%COMP%]{height:3.375rem;gap:.3rem;font-size:var(--font-size-sm)}}.sidebar[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]   .order-type.selected[_ngcontent-%COMP%]{color:var(--primary-dark);background-color:var(--primary-container);border:2px solid var(--primary-dark)}.sidebar[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]   .order-type[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{width:24px;height:24px}.sidebar[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]   .order-type[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-size:var(--font-size-med);color:var(--text-color)}.sidebar[_ngcontent-%COMP%]   .locations-content[_ngcontent-%COMP%]{min-height:0;overflow:auto;margin-right:1rem;padding-right:1rem}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]   .locations-content[_ngcontent-%COMP%]{overflow:visible;margin-right:0;padding-right:0}}.sidebar[_ngcontent-%COMP%]   .locations-content[_ngcontent-%COMP%]::-webkit-scrollbar{width:5px}.sidebar[_ngcontent-%COMP%]   .locations-content[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:var(--line-color);border-radius:5px;overflow:hidden}.sidebar[_ngcontent-%COMP%]   .locations-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background-color:#a8a8a8;border-radius:5px;cursor:pointer;transition:all 1s}.sidebar[_ngcontent-%COMP%]   .locations-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background-color:#c3c3c3}.sidebar[_ngcontent-%COMP%]   .delivery-address-container[_ngcontent-%COMP%]{margin-bottom:1rem}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]   .delivery-address-container[_ngcontent-%COMP%]{margin-right:0}}.sidebar[_ngcontent-%COMP%]   .delivery-address-container[_ngcontent-%COMP%]   .section-title[_ngcontent-%COMP%]{color:var(--text);font-size:var(--font-size-lg);font-weight:var(--font-weight-regular);line-height:1.5rem;margin-bottom:.5rem}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]   .delivery-address-container[_ngcontent-%COMP%]   .section-title[_ngcontent-%COMP%]{font-size:var(--font-size-med)}}.sidebar[_ngcontent-%COMP%]   .delivery-address-container[_ngcontent-%COMP%] > app-address-form[_ngcontent-%COMP%]{display:block;padding:0;background-color:transparent;--dropdown-selected-background: var(--grey-background);--dropdown-label-background: var(--grey-background);--input-focused-label-background: var(--grey-background)}.sidebar[_ngcontent-%COMP%]   .delivery-address-container[_ngcontent-%COMP%]   .add-new-btn[_ngcontent-%COMP%]{margin-top:.5rem;padding:0;background:none;color:var(--primary);font-size:var(--font-size-med);font-weight:var(--font-weight-regular);line-height:1.25rem;text-align:left}.sidebar[_ngcontent-%COMP%]   .saved-addresses-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%}.sidebar[_ngcontent-%COMP%]   .saved-addresses-list-item[_ngcontent-%COMP%]{display:grid;grid-template-columns:2rem auto 4.875rem;grid-column-gap:1rem;align-items:center;width:100%;padding:.5rem 1rem;border:2px solid transparent;border-radius:.5rem;background-color:var(--white);color:var(--text);cursor:pointer;text-align:left}.sidebar[_ngcontent-%COMP%]   .saved-addresses-list-item.selected[_ngcontent-%COMP%]{color:var(--primary-dark);background-color:var(--primary-container);border:2px solid var(--primary-dark)}.sidebar[_ngcontent-%COMP%]   .saved-addresses-list-item[_ngcontent-%COMP%]:not(.selected):hover{background-color:var(--primary-container)}.sidebar[_ngcontent-%COMP%]   .saved-addresses-list-item-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:2rem;height:2rem}.sidebar[_ngcontent-%COMP%]   .saved-addresses-list-item-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;overflow:hidden}.sidebar[_ngcontent-%COMP%]   .saved-addresses-list-item-name[_ng
731content-%COMP%]{font-size:var(--font-size-med);font-weight:var(--font-weight-semi-bold);line-height:1.25rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar[_ngcontent-%COMP%]   .saved-addresses-list-item-address[_ngcontent-%COMP%]{font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:1.25rem}.sidebar[_ngcontent-%COMP%]   .saved-addresses-list-item-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.sidebar[_ngcontent-%COMP%]   .saved-addresses-list-item-actions-divider[_ngcontent-%COMP%]{width:2px;margin:0 .875rem;border-radius:5px;background-color:#ffffff4d}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]{display:grid;grid-auto-flow:row;gap:.5rem;padding-left:1rem;padding-bottom:1rem;margin-left:-1rem;transition:all .3s;align-content:space-between;min-height:0}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]{padding:0 0 1rem;margin:0;width:100%;background:var(--page-background);margin-top:.5rem}.sidebar[_ngcontent-%COMP%]   .stores-container.collapsed[_ngcontent-%COMP%]{height:0;margin-bottom:0;padding:0 1.969rem}}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]::-webkit-scrollbar{width:5px}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:var(--line-color);border-radius:5px;overflow:hidden}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background-color:#a8a8a8;border-radius:5px;cursor:pointer;transition:all 1s}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background-color:#c3c3c3}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store[_ngcontent-%COMP%]{padding:.5rem 1rem;border-radius:1rem;background:var(--white);display:grid;grid-auto-flow:row;gap:.5rem;transition:all .3s;border-left-width:0;text-align:left;box-shadow:2.5px 5px 20px 5px #4545451a;cursor:pointer}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store.selected[_ngcontent-%COMP%]{border-left:3px var(--primary) solid}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-main-details[_ngcontent-%COMP%]{font-size:var(--font-size-lg);font-weight:var(--font-weight-bold);line-height:2rem;display:grid;grid-auto-flow:column;grid-auto-columns:auto 110px;column-gap:1rem}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-main-details[_ngcontent-%COMP%]   .store-title[_ngcontent-%COMP%]{margin-bottom:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-title[_ngcontent-%COMP%]{color:var(--Text-Color, #353535);font-size:1rem;font-weight:var(--font-weight-bold);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:.5rem;padding-bottom:.5rem}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:8px;width:1rem;vertical-align:middle;color:#6a6a6a}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-name[_ngcontent-%COMP%]{font-size:var(--font-size-lg);font-weight:var(--font-weight-medium);line-height:2}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-address[_ngcontent-%COMP%]{font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);width:calc(100% - 1.5rem);display:inline-block}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-address-wrapper[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{vertical-align:top}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-container[_ngcontent-%COMP%]{display:inline-block;max-width:100%;position:relative}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]{font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);max-width:100%;display:flex;flex-wrap:nowrap;position:relative;background:none;padding:0}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .opened_closed[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;cursor:pointer;position:relative;min-width:16rem;justify-content:flex-start}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .opened_closed[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{margin-right:0;display:inline-flex;justify-content:center}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .opened_closed[_ngcontent-%COMP%]   .closed[_ngcontent-%COMP%]{color:var(--general-red)}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .opened_closed[_ngcontent-%COMP%]   .opened[_ngcontent-%COMP%]{color:var(--general-green)}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .opened_closed[_ngcontent-%COMP%]   .drowdown-handler[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{transition:transform .3s ease;transform-origin:center;width:9px}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .opened_closed[_ngcontent-%COMP%]   .drowdown-handler.rotated[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]{position:absolute;top:22px;left:22px;width:15.188rem;background-color:var(--white);border-radius:8px;box-shadow:0 2px 4px #0000001a;z-index:10;display:flex;flex-direction:column;height:0;line-height:1.313rem;overflow:hidden;transition:height .3s ease-in-out}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown.visible[_ngcontent-%COMP%]{height:10.188rem}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item[_ngcontent-%COMP%]{display:flex;padding:0rem 1.75rem;justify-content:space-between;font-size:var(--font-size-sm);color:#6a6a6a;font-weight:var(--font-weight-regular)}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item[_ngcontent-%COMP%]:first-child{margin-top:.5rem}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item[_ngcontent-%COMP%]:last-child{margin-bottom:.5rem}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item.today[_ngcontent-%COMP%]{font-weight:var(--font-weight-medium)}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item.closed[_ngcontent-%COMP%]{opacity:.5}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item[_ngcontent-%COMP%]   .day[_ngcontent-%COMP%]{text-transform:capitalize}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-actions[_ngcontent-%COMP%]{display:grid;grid-template-columns:10.25rem auto;column-gap:1rem;height:2.875rem}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-actions[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{height:2.875rem;font-size:var(--font-size-sm);font-weight:var(--font-weight-extra-bold)}.sidebar[_ngcontent-%COMP%]   .stores-container[_ngcontent-%COMP%]   .store-actions[_ngcontent-%COMP%]   .store-distance[_ngcontent-%COMP%]{color:var(--grey);font-size:.875rem;font-weight:var(--font-weight-semi-bold);line-height:100%;align-self:center;text-align:left}@media (max-width: 767px){.map[_ngcontent-%COMP%]{width:100%}}.view-toggle-buttons[_ngcontent-%COMP%]{display:flex;gap:1.5rem;justify-content:space-around;border-bottom:1px solid var(--line-color)}.view-toggle-buttons[_ngcontent-%COMP%]   .toggle-btn[_ngcontent-%COMP%]{background:none;width:50%;border:none;padding:.5rem 0;color:var(--text);cursor:pointer;position:relative;font-weight:var(--font-weight-medium)}.view-toggle-buttons[_ngcontent-%COMP%]   .toggle-btn.active[_ngcontent-%COMP%]{color:var(--primary);border-bottom:2px solid var(--primary);font-weight:var(--font-weight-semi-bold)}.no-stores[_ngcontent-%COMP%]{text-align:center;color:var(--text)}.no-stores[_ngcontent-%COMP%]   .no-stores-image[_ngcontent-%COMP%]{margin-top:1rem}.no-stores[_ngcontent-%COMP%]   .no-stores-text[_ngcontent-%COMP%]{font-size:var(--font-size-med);font-weight:var(--font-weight-medium);margin-top:1rem;line-height:1.5rem}.no-stores[_ngcontent-%COMP%]   .no-stores-subtext[_ngcontent-%COMP%]{font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:1.25rem;margin-top:.5rem}']})}}return h})();var Lw=["hoursContainer"],Dw=["addressFormComponent"],Fw=["scrollC
731ontainer"],Rw=h=>({"modal-header-actions-only":h}),Bw=h=>({decreased:h}),Nw=h=>({rotated:h}),Vw=h=>({visible:h}),jw=(h,k)=>({today:h,closed:k}),Uw=(h,k)=>[h,k],$w=h=>[h],U_=h=>({selected:h}),Gw=h=>({address:h});function Zw(h,k){if(h&1&&(I(0,"div",6)(1,"h2",27),X(2),E()()),h&2){let n=A(2);w(),j("ngClass",n.addCoupon&&"coupon-title"),w(),Rt(" ",n.addCoupon?n.localizationService.getLocalizationString("modals.stores_map.coupon_checkout_title"):n.localizationService.getLocalizationString("modals.stores_map.favorite_store")," ")}}function Hw(h,k){if(h&1&&(I(0,"div",10),X(1),E()),h&2){let n=A(2);w(),Rt(" ",n.localizationService.getLocalizationString("modals.stores_map.favorite_store")," ")}}function qw(h,k){if(h&1&&(I(0,"div",16),it(1,"app-icon",15),X(2),E()),h&2){let n=A(2);w(),j("name",n.iconNameType.phone)("size","16px"),w(),St(n.storePhone())}}function Ww(h,k){if(h&1&&(I(0,"div",36),X(1),E()),h&2){let n=A().$implicit,c=A(3);w(),Qn(" ",c.formatAMPM(n.openTime)," - ",c.formatAMPM(n.closeTime)," ")}}function Xw(h,k){if(h&1&&(I(0,"div",37),X(1),E()),h&2){let n=A(4);w(),St(n.localizationService.getLocalizationString("modals.stores_map.closed"))}}function Kw(h,k){if(h&1&&(I(0,"div",34)(1,"div",35),X(2),E(),ut(3,Ww,2,2,"div",36)(4,Xw,2,1,"div",37),E()),h&2){let n=k.$implicit,c=k.$index,d=A(3);j("ngClass",en(4,jw,!c,n.closed)),qt("aria-label",d.businessHoursItemLabel(n)),w(2),St(n.day.slice(0,3)),w(),rt(n.openTime&&n.closeTime?3:4)}}function Yw(h,k){if(h&1){let n=Yt();I(0,"div",17,2)(2,"button",28),Ot("click",function(){kt(n);let d=A(2);return Et(d.showBusinessHours=!d.showBusinessHours)}),it(3,"app-icon",15),I(4,"div",29),X(5),it(6,"app-icon",30),E(),I(7,"div",31),X(8),I(9,"span",32),it(10,"app-icon",15),E()()(),I(11,"div",33),le(12,Kw,5,7,"div",34,Ce),E()()}if(h&2){let n,c,d,a=A(2);w(2),qt("aria-expanded",a.showBusinessHours),w(),j("name",a.iconNameType.clock)("size","16px"),w(),j("ngClass",(n=a.openedHours())!=null&&n.closed?"closed":"opened"),w(),Rt("",(c=a.openedHours())!=null&&c.closed?"Closed":"Open"," "),w(),j("color","#353535")("name",a.iconNameType.dot)("size","4px"),w(2),Rt(" ",(d=a.openedHours())!=null&&d.closed?(d=a.openedHours())==null?null:d.openTime:(d=a.openedHours())==null?null:d.closeTime," "),w(),j("ngClass",me(15,Nw,a.showBusinessHours)),w(),j("name",a.iconNameType.triangle)("size","9px"),w(),j("ngClass",me(17,Vw,a.showBusinessHours)),qt("aria-hidden",!a.showBusinessHours)("inert",a.showBusinessHours?null:""),w(),ce(a.businessHours)}}function Qw(h,k){if(h&1&&it(0,"app-mapbox-map",19),h&2){let n,c,d=A(2);j("center",d.singleStoreMapPosition())("markers",me(8,$w,en(5,Uw,(n=(n=d.storeData())==null?null:n.lng)!==null&&n!==void 0?n:0,(n=(n=d.storeData())==null?null:n.lat)!==null&&n!==void 0?n:0)))("pitch",0)("showDeliveryLayer",d.selectedOrderType==="Delivery")("storeId",(c=d.storeData())==null?null:c.id)}}function Jw(h,k){if(h&1){let n=Yt();I(0,"button",38),Ot("click",function(){kt(n);let d=A(2);return Et(d.selectAnotherStore())}),it(1,"app-icon",39),I(2,"span",40),X(3),E()()}if(h&2){let n=A(2);w(),j("name",n.iconNameType.arrow)("size","14px"),w(2),St(n.localizationService.getLocalizationString("modals.stores_map.select_another_store"))}}function tM(h,k){if(h&1&&X(0),h&2){let n=A().$implicit;Qn(" ",n.minutes," - ",n.minutes+n.leewayTime," mins ")}}function eM(h,k){if(h&1&&X(0),h&2){let n=A().$implicit;Rt(" ",n.minutes," mins ")}}function nM(h,k){if(h&1){let n=Yt();I(0,"button",41),Ot("click",function(){let d=kt(n).$implicit,a=A(2);return Et(a.selectOrderType(d.type))}),it(1,"app-icon",39),I(2,"span",40),X(3),I(4,"div",42),ut(5,tM,1,2)(6,eM,1,1),E()()()}if(h&2){let n=k.$implicit,c=A(2);j("ngClass",me(5,U_,c.selectedOrderType===n.type)),w(),j("name",c.getIcon(n.type))("size","24px"),w(2),Rt(" ",n.type," "),w(2),rt(n&&n.minutes>0&&n.leewayTime>0?5:n&&n.minutes>0?6:-1)}}function iM(h,k){if(h&1){let n=Yt();I(0,"div",43)(1,"h2",22),X(2),E(),I(3,"app-address-form",44,3),Ot("formChanging",function(){kt(n);let d=A(3);return Et(d.handleFormChanging())}),E()()}if(h&2){let n=A(3);w(2),St(n.localizationService.getLocalizationString("modals.stores_map.address")),w(),j("allErrors",n.serverErrors)}}function oM(h,k){if(h&1){let n=Yt();I(0,"button",50),Ot("click",function(){let d=kt(n).$implicit,a=A(4);return Et(a.selectAddress(d))}),it(1,"app-icon",51),I(2,"div",52)(3,"span",53),X(4),E(),I(5,"span",54),X(6),E()(),I(7,"div",55)(8,"button",56),Ot("click",function(){let d=kt(n).$implicit,a=A(4);return Et(a.editAddress(d))}),it(9,"app-icon",39),E(),it(10,"div",57),I(11,"button",58),Ot("click",function(){let d=kt(n).$implicit,a=A(4);return Et(a.deleteAddress(d))}),it(12,"app-icon",39),E()()()}if(h&2){let n=k.$implicit,c=A(4);j("ngClass",me(10,U_,(c.selectedAddress==null?null:c.selectedAddress.name)===n.name)),w(),j("name",c.icon(n)),w(3),St(n.name),w(2),St(c.addressInfo(n)),w(2),qt("aria-label","Edit Address"),w(),j("name",c.iconNameType.edit)("size","1.5rem"),w(2),qt("aria-label","Delete Address"),w(),j("name",c.iconNameType.delete)("size","1.5rem")}}function rM(h,k){if(h&1){let n=Yt();I(0,"button",59),Ot("click",function(){kt(n);let d=A(4);return Et(d.addNewAddress())}),I(1,"span",40),X(2),E()()}if(h&2){let n=A(4);
731w(2),St(n.localizationService.getLocalizationString("modals.stores_map.add_new"))}}function aM(h,k){if(h&1){let n=Yt();I(0,"h2",22),X(1),E(),I(2,"app-address-form",44,3),Ot("formChanging",function(){kt(n);let d=A(4);return Et(d.handleFormChanging())}),E()}if(h&2){let n=A(4);w(),St(n.localizationService.getLocalizationString("modals.stores_map.new_address")),w(),j("allErrors",n.serverErrors)}}function sM(h,k){if(h&1&&(I(0,"div",45)(1,"h2",22),X(2),E(),I(3,"div",46),le(4,oM,13,12,"button",47,Ce),E()(),I(6,"div",48),ut(7,rM,3,1,"button",49)(8,aM,4,2),E()),h&2){let n=A(3);w(2),St(n.localizationService.getLocalizationString("modals.stores_map.saved_addresses")),w(2),ce(n.savedAddresses()),w(3),rt(n.showAddressForm?8:7)}}function lM(h,k){if(h&1&&ut(0,iM,5,2,"div",43)(1,sM,9,2),h&2){let n=A(2);rt(n.savedAddresses().length?1:0)}}function cM(h,k){if(h&1){let n=Yt();I(0,"div",5),ut(1,Zw,3,2,"div",6),I(2,"button",7),Ot("click",function(){kt(n);let d=A();return Et(d.modalService.closeModal())}),it(3,"app-icon",8),E()(),I(4,"div",9,1),ut(6,Hw,2,1,"div",10),I(7,"div",11)(8,"div",12)(9,"span",13),X(10),E()(),I(11,"div",14),it(12,"app-icon",15),X(13),E(),ut(14,qw,3,3,"div",16)(15,Yw,14,19,"div",17),E(),I(16,"div",18),ut(17,Qw,1,10,"app-mapbox-map",19),E(),ut(18,Jw,4,3,"button",20),I(19,"div",21)(20,"h2",22),X(21),E(),I(22,"div",23),le(23,nM,7,7,"button",24,Ce),E()(),ut(25,lM,2,1),E(),I(26,"div",25)(27,"button",26),Ot("click",function(){kt(n);let d=A();return Et(d.openMerchantStore())}),X(28),E()()}if(h&2){let n,c,d,a,z,J=A();j("ngClass",me(20,Rw,J.singleStore()&&!J.addCoupon)),w(),rt(J.singleStore()?-1:1),w(),qt("aria-label","Close Signing Modal"),w(),j("name",J.iconNameType.close),w(3),rt(J.addCoupon?6:-1),w(4),Rt(" ",(n=J.storeData())==null?null:n.name," "),w(2),j("name",J.iconNameType.pin)("size","16px"),w(),dc("",(c=J.storeData())==null?null:c.address,", ",(c=J.storeData())==null?null:c.city,", ",(c=J.storeData())==null?null:c.state," ",(c=J.storeData())==null?null:c.zip,""),w(),rt(J.addCoupon?-1:14),w(),rt(J.openedHours()?15:-1),w(),j("ngClass",me(22,Bw,((d=J.storeData())==null||d.orderTypes==null?null:d.orderTypes.length)>=3)),w(),rt(J.isBrowser?17:-1),w(),rt(J.singleStore()?-1:18),w(3),St(J.localizationService.getLocalizationString("modals.stores_map.how_to_order")),w(2),ce(J.mergedOrderTypes()),w(2),rt(J.selectedOrderType==="Delivery"&&((a=J.storeData())==null||a.orderTypes==null?null:a.orderTypes.length)>1?25:-1),w(3),Rt(" ",(z=J.openedHours())!=null&&z.closed?"Order for Later":"Order Online"," ")}}function dM(h,k){if(h&1){let n=Yt();I(0,"div",60)(1,"h2",61)(2,"button",62),Ot("click",function(){kt(n);let d=A();return Et(d.addressToEdit=null)}),it(3,"app-icon",8),E(),X(4),E(),I(5,"button",7),Ot("click",function(){kt(n);let d=A();return Et(d.modalService.closeModal())}),it(6,"app-icon",8),E()(),I(7,"div",9)(8,"app-address-form",63,3),Ot("formChanging",function(){kt(n);let d=A();return Et(d.handleFormChanging())})("overrideAddress",function(){kt(n);let d=A();return Et(d.handleOverrideAddress())}),E()(),I(10,"div",25)(11,"button",64),Ot("click",function(){kt(n);let d=A();return Et(d.saveEditedAddress())}),X(12),E()()}if(h&2){let n=A();w(2),qt("aria-label","Close Signing Modal"),w(),j("name",n.iconNameType.arrow),w(),Rt(" ",n.localizationService.getLocalizationString("modals.stores_map.edit_address",me(11,Gw,n.addressToEdit.name))," "),w(),qt("aria-label","Close Signing Modal"),w(),j("name",n.iconNameType.close),w(2),j("address",n.addressToEdit)("editing",!0)("allErrors",n.serverErrors)("isAddressBook",!0),w(3),j("subscription",n.loadingSubscription),w(),Rt(" ",n.localizationService.getLocalizationString("modals.stores_map.done")," ")}}var $_=(()=>{class h{constructor(){this.authService=gt(Mn),this.utmService=gt(is),this.modalService=gt(Gn),this.brandConfigService=gt(Ee),this.storeHoursService=gt(Cc),this.platformId=gt(rn),this.router=gt(Ja),this.accountAddressesService=gt(bu),this.addressBookService=gt(Mu),this.errorsService=gt($r),this.localizationService=gt(un),this.businessHours=[],this.showBusinessHours=!1,this.todayIndexInTheWeek=new Date().getDay(),this.savedAddresses=Ut(()=>this.accountAddressesService.addresses()),this.iconNameType=ge,this.isBrowser=!1,this.brandConfig=this.brandConfigService.brandConfig,this.storeData=this.brandConfigService.storeData,this.selectedOrderType=null,this.daysOfWeek=this.storeHoursService.daysMap,this.storeStatus=this.brandConfigService.storeStatus,this.selectedAddress=null,this.showAddressForm=!1,this.addressToEdit=null,this.addressToAdd=void 0,this.loadingSubscription=null,this.addCoupon=null,this.editCoupon=!1,this.singleStore=this.brandConfigService.singleStore,this.formatAMPM=wn,this.mergedOrderTypes=Ut(()=>{let n=this.storeData(),d=this.storeStatus()?.promiseTimes??[];if(!n?.orderTypes)return[];let a=z=>z?.trim().toLowerCase();return n.orderTypes.map(z=>{let J=d.find(ee=>a(ee.orderType)===a(z.type)),yt=J?.minutes??null,ie=J?.leewayTime??0;return yt===null&&(a(z.type)==="delivery"&&(yt=45),a(z.type)==="pickup"&&(yt=20)),cn(te({},z),{minutes:yt,leewayTime:ie})})}),this.singleStoreMapPosition=Ut(()=>{if(this.storeData()?.lng&&this.storeData()?.lat)return[this.storeData()?.lng??0,this.storeData()?.lat??0]}),this.storePhone=Ut(()=>Dr(this.storeData()?.telephone??"")),this.openedHours=Ut(()=>{let n=this.storeData();if(!n?.storeHours||!n.storeHours.any||!n.storeHours.any[this.todayIndexInTheWeek])return;let c=this.brandConfigService.storeTimeZone(),d=this.selectedOrderType&&n.webHours?.[this.selectedOrderType]?n.webHours[this.selectedOrderType]:n.storeHours.any,a=this.reorderBusinessDays(d);return this.businessHours=this.applyWholeDayClosuresToReordered(a,n.storeEvents??[],c),this.findNextTimeOpen(d,this.todayIndexInTheWeek,n.storeEvents??[])})}ngOnInit(){this.isBrowser=An(this.platformId),this.accountAddressesService.fetchAddresses().subscribe();let n=this.modalService.stateForModal(Ln.StoresMap);n&&(this.selectedOrderType=n.selectedOrderType??null,this.addCoupon=n.addCoupon??null,this.editCoupon=n.editCoupon??!1,n.selectedAddress&&(this.selectedAddress=n.selectedAddress??null))}handleOutsideClick(n){this.hoursContainer&&(this.hoursContainer.nativeElement.contains(n.target)||(this.showBusinessHours=!1))}getIcon(n){return this.iconNameType[n.toLocaleLowerCase()]||this.iconNameType.pickup}closeModal(){this.modalService.closeModal()}selectAnotherStore(){this.modalService.closeModal(Ln.StoresMap),this.modalService.openModal(Ln.StoreSelector,{addCoupon:this.addCoupon,editCoupon:this.editCoupon,selectedOrderType:this.selectedOrderType})}buildClosedDaysSetByDate(n,c,d){let a=new Set;for(let z of n??[]){if(z.eventType!=="StoreClose")continue;let J=pr.fromMillis(z.startDate,{zone:c}),yt=pr.fromMillis(z.endDate,{zone:c}),ie=J.startOf("day"),ee=yt.startOf("day"),bt=yt.weekday%7,ne=d[bt];if(ne&&!ne.closed&&ne.openTime){let[tn,_n]=ne.openTime.split(":"),Dn=parseInt(tn,10),hi=_n?parseInt(_n,10):0,ri=Dn*60+hi;yt.hour*60+yt.minute<ri&&(ee=ee.minus({days:1}))}if(ee<ie)continue;let Ve=ie;for(let tn=0;tn<14&&(a.add(Ve.toFormat("yyyy-LL-dd")),!Ve.hasSame(ee,"day"));
731tn++)Ve=Ve.plus({days:1})}return a}applyWholeDayClosuresToReordered(n,c,d=this.brandConfigService.storeTimeZone()){let a=this.buildClosedDaysSetByDate(c,d,n),z=pr.now().setZone(d).startOf("day");return n.map((J,yt)=>{let ee=z.plus({days:yt}).toFormat("yyyy-LL-dd"),bt=a.has(ee);return cn(te({},J),{closed:J.closed||bt})})}findNextTimeOpen(n,c,d=[]){let a=this.brandConfigService.storeTimeZone(),z=pr.now().setZone(a),J=z.toJSDate().getDay();if(!n.some(Dn=>Dn.closed?!1:Dn.openTime&&Dn.closeTime))return{closed:!0,openTime:"Visit store to check opening hours"};if(d.length>0&&d.find(hi=>hi.eventType==="StoreClose"&&z.toMillis()>=hi.startDate&&z.toMillis()<=hi.endDate))return{closed:!0,openTime:"Visit store to check today\u2019s opening hours"};let ie=d.find(Dn=>{if(Dn.eventType!=="StoreClose")return!1;let hi=pr.fromMillis(Dn.startDate,{zone:a});return hi.hasSame(z,"day")&&hi>z}),ee=n[c];if(!ee)return{closed:!0};if(ee.closed){let Dn=n[c+1]?c+1:0;return{closed:!0,openTime:this.findNextTimeOpen(n,Dn,d).openTime}}else if(J!==c)return{closed:!0,openTime:`Opens at ${wn(ee.openTime)}, ${ee.day[0].toUpperCase()+ee.day.slice(1,3)}`};let bt=ee.openTime??"",ne=ee.closeTime??"",Ve=pr.fromFormat(bt,"HH:mm",{zone:a}).set({year:z.year,month:z.month,day:z.day}),tn=pr.fromFormat(ne,"HH:mm",{zone:a}).set({year:z.year,month:z.month,day:z.day});if(tn<=Ve&&(tn=tn.plus({days:1})),z<Ve)return{closed:!0,openTime:`Opens at ${wn(bt)}`};if(z>=Ve&&z<tn){if(ie){let hi=pr.fromMillis(ie.startDate,{zone:a}).toFormat("HH:mm");return{closed:!1,closeTime:`Closes at ${wn(hi)}`}}return{closed:!1,closeTime:`Closes at ${wn(ne)}`}}let _n=n[c+1]?c+1:0;return{closed:!0,openTime:this.findNextTimeOpen(n,_n,d).openTime}}scrollToBottom(){this.scrollContainer&&this.scrollContainer.nativeElement.scrollTo({top:this.scrollContainer.nativeElement.scrollHeight,behavior:"smooth"})}selectOrderType(n){this.selectedOrderType===n?this.selectedOrderType=null:this.selectedOrderType=n,this.selectedOrderType==="Delivery"&&(this.showAddressForm=!1,this.addressToEdit=null,this.addressToAdd=void 0,this.serverErrors=void 0,this.selectedAddress=this.savedAddresses().length?this.savedAddresses()[0]:null,setTimeout(()=>{this.scrollToBottom()}))}handleOverrideAddress(){this.saveEditedAddress()}handleFormChanging(){this.serverErrors=void 0}openMerchantStore(){if(this.addressToAdd||this.addressFormComponent){let n=new mc().deserialize(this.addressFormComponent.addressForm.value),c=["addressType","diff1","diff2","diff3"],d=Object.entries(this.addressFormComponent.addressForm.value).filter(([a])=>!c.includes(a)).every(([,a])=>!a||a.toString().trim()==="");if(!this.addressFormComponent.addressForm.valid&&(!d||n.saveToAddressBook)){this.addressFormComponent.enableErrors();return}n.saveToAddressBook?(n.address=n.number?`${n.street}, ${n.number}`:n.street,this.accountAddressesService.addAddress(n).subscribe({next:()=>{this.redirect()},error:a=>{let z=this.errorsService.parseErrorResponse(a);this.serverErrors=z.errors}})):this.redirect()}else this.redirect()}appendIfDefined(n,c,d){d!=null&&d!==""&&n.append(c,String(d))}redirect(){let n=this.authService.getAccessToken(),c=new URLSearchParams;if(this.selectedOrderType){c.append("orderType",this.selectedOrderType);let a;if(this.selectedOrderType==="Delivery"){this.selectedAddress?a=this.selectedAddress:this.addressFormComponent&&(a=this.addressFormComponent.addressForm.value);let z=a.address;if(!z){let J=[];if(a.street){let yt=a.street;a.suffix&&(yt+=` ${a.suffix}`),a.number&&(yt+=`, ${a.number}`),J.push(yt)}a.city&&J.push(a.city),a.state&&J.push(a.state),z=J.join(", ")}a.name&&(a.saveToAddressBook||this.selectedAddress)&&this.appendIfDefined(c,"addressName",a.name),this.appendIfDefined(c,"address",z),this.appendIfDefined(c,"zip",a.zip),this.appendIfDefined(c,"addressType",a.addressType);for(let J=1;J<=3;J++)a["value"+J]&&c.append("diff"+J,a["value"+J]);a.deliveryInstructions&&c.append("deliveryInstructions",a.deliveryInstructions)}}n&&c.append("accessToken",n);let d=new URL(this.addCoupon?`${this.storeData().baseUrl}/addCoupon`:this.storeData().baseUrl);
731this.addCoupon&&(d.searchParams.set("addCoupon",this.addCoupon),d.searchParams.set("edit",String(this.editCoupon))),c.forEach((a,z)=>d.searchParams.append(z,a)),this.utmService.appendUtmParams(d),window.location.href=d.toString()}reorderBusinessDays(n){let c=[],d=JSON.parse(JSON.stringify(this.todayIndexInTheWeek));return n.forEach(()=>{c.push(n[d]),d=d===6?0:d+1}),c}businessHoursItemLabel(n){let c=n.day.charAt(0).toUpperCase()+n.day.slice(1);return n.openTime&&n.closeTime?`${c}, ${wn(n.openTime)} to ${wn(n.closeTime)}`:`${c}, ${this.localizationService.getLocalizationString("modals.stores_map.closed")}`}icon(n){switch(n.addressType){case qo.APARTMENT:return this.iconNameType.apartment;case qo.SINGLE_FAMILY:return this.iconNameType.home;case qo.BUSINESS:return this.iconNameType.business;case qo.HOSPITAL:return this.iconNameType.hospital;case qo.HOTEL:return this.iconNameType.hotel;default:return this.iconNameType.otherAddressType}}addressInfo(n){return`${n.address}, ${n.city}, ${n.state?.toUpperCase()} ${n.zip}`}selectAddress(n){if(this.selectedAddress?.name===n.name){this.selectedAddress=null;return}this.selectedAddress=n,this.showAddressForm=!1,this.addressToAdd=void 0}addNewAddress(){setTimeout(()=>{this.scrollToBottom()}),this.showAddressForm=!0,this.selectedAddress=null,this.addressToAdd=new mc}editAddress(n){this.addressToEdit=n,this.addressBookService.updateState(n)}saveEditedAddress(){let n=new mc().deserialize(this.addressFormComponent.addressForm.value);n.address=n.number?`${n.street}, ${n.number}`:n.street,n.force=!0,this.loadingSubscription=this.accountAddressesService.updateAddress(n).subscribe({next:()=>{this.accountAddressesService.fetchAddresses().subscribe(),this.loadingSubscription=null,this.addressToEdit=null},error:c=>{let d=this.errorsService.parseErrorResponse(c);this.serverErrors=d.errors,this.loadingSubscription=null}})}deleteAddress(n){this.accountAddressesService.deleteAddress(n).subscribe({next:()=>{this.selectedAddress?.name===n.name&&(this.selectedAddress=null),this.accountAddressesService.fetchAddresses().subscribe()},error:c=>console.error("Error deleting address",c)})}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-stores-map-modal"]],viewQuery:function(c,d){if(c&1&&($e(Lw,5),$e(Dw,5),$e(Fw,5)),c&2){let a;Ge(a=Ze())&&(d.hoursContainer=a.first),Ge(a=Ze())&&(d.addressFormComponent=a.first),Ge(a=Ze())&&(d.scrollContainer=a.first)}},hostBindings:function(c,d){c&1&&Ot("click",function(z){return d.handleOutsideClick(z)},!1,dr)},standalone:!0,features:[Kt],decls:4,vars:1,consts:[["modalContainer",""],["scrollContainer",""],["hoursContainer",""],["addressFormComponent",""],["cdkFocusInitial","",1,"container"],[1,"modal-header",3,"ngClass"],[1,"header-copy"],[1,"button-undecorated","btn-close",3,"click"],[1,"icon",3,"name"],[1,"modal-content"],[1,"subtitle"],[1,"store-info"],[1,"store-name"],[1,"store-name-label"],[1,"store-ad
731dress"],[3,"name","size"],[1,"store-tel"],[1,"business-hours-container"],[1,"map-container",3,"ngClass"],[3,"center","markers","pitch","showDeliveryLayer","storeId"],["type","button",1,"button-undecorated","other-store-container"],[1,"order-types-container"],[1,"title"],[1,"order-types"],[1,"order-type",3,"ngClass"],[1,"modal-actions"],[1,"button-accent","confirm-btn",3,"click"],[1,"title",3,"ngClass"],["type","button","cdkFocusInitial","","data-initial-focus","","aria-controls","business-hours-dropdown",1,"store-hours",3,"click"],[3,"ngClass"],[1,"iconDot",3,"color","name","size"],[1,"time"],[1,"drowdown-handler",3,"ngClass"],["id","business-hours-dropdown",1,"business-hours-dropdown",3,"ngClass"],["tabindex","0",1,"business-hours-item",3,"ngClass"],["aria-hidden","true",1,"day"],["aria-hidden","true",1,"time"],["aria-hidden","true",1,"time","closed-time"],["type","button",1,"button-undecorated","other-store-container",3,"click"],[1,"icon",3,"name","size"],[1,"text"],[1,"order-type",3,"click","ngClass"],[1,"estimated-delivery-time"],[1,"empty-saved-addresses"],[3,"formChanging","allErrors"],[1,"saved-addresses-container"],[1,"saved-addresses-list"],[1,"saved-addresses-list-item",3,"ngClass"],[1,"add-new-container"],[1,"add-new-btn"],[1,"saved-addresses-list-item",3,"click","ngClass"],[1,"saved-addresses-list-item-icon",3,"name"],[1,"saved-addresses-list-item-info"],[1,"saved-addresses-list-item-name"],[1,"saved-addresses-list-item-address"],[1,"saved-addresses-list-item-actions"],[1,"button-undecorated","btn-edit",3,"click"],[1,"saved-addresses-list-item-actions-divider"],[1,"button-undecorated","btn-delete",3,"click"],[1,"add-new-btn",3,"click"],[1,"modal-header"],["tabindex","-1","cdkFocusInitial","",1,"title"],[1,"btn-back",3,"click"],[3,"formChanging","overrideAddress","address","editing","allErrors","isAddressBook"],["appAsyncButton","",1,"button-accent","confirm-btn",3,"click","subscription"]],template:function(c,d){c&1&&(I(0,"div",4,0),ut(2,cM,29,24)(3,dM,13,13),E()),c&2&&(w(2),rt(d.addressToEdit?3:2))},dependencies:[Ae,rs,ve,Ye,wu,yc,Sf],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;align-items:end;width:100%;min-width:100%}@media (min-width: 768px){[_nghost-%COMP%]{align-items:center}}.container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;align-self:stretch;background-color:var(--white);border-radius:1rem;width:100%;color:#353535;max-height:88vh;overflow:hidden}@media (max-width: 767px){.container[_ngcontent-%COMP%]{border-bottom-right-radius:0;border-bottom-left-radius:0;justify-content:end}}.modal-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:1rem 1rem 0;width:100%}@media (max-width: 767px){.modal-header[_ngcontent-%COMP%]{padding:1.25rem 1rem 0}}.modal-header.modal-header-actions-only[_ngcontent-%COMP%]{position:absolute;top:1rem;right:1rem;z-index:2;justify-content:flex-end;width:auto;height:auto;padding:0}.modal-header[_ngcontent-%COMP%]   .btn-close[_ngcontent-%COMP%]{width:44px;height:44px;border-radius:50%;background-color:var(--primary-container);display:flex;justify-content:center;align-items:center}.modal-header[_ngcontent-%COMP%]   .btn-close[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{min-width:18px;color:var(--primary-dark)}.modal-header[_ngcontent-%COMP%]   .btn-back[_ngcontent-%COMP%]{border-radius:50%;display:inline-flex;justify-content:center;background:none;padding:0}.modal-header[_ngcontent-%COMP%]   .btn-back[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{min-width:16px;color:var(--primary-dark);transform:rotate(90deg)}.modal-header[_ngcontent-%COMP%]   .header-copy[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.modal-header[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:0;color:var(--text-color);font-size:1rem;font-style:normal;font-weight:500;line-height:2rem}.modal-header[_ngcontent-%COMP%]   .coupon-title[_ngcontent-%COMP%]{font-weight:var(--font-weight-regular)}.modal-content[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;padding:0 1rem 1.5rem;max-height:calc(100vh - 12rem);overflow:auto;color:var(--text)}@media (max-width: 767px){.modal-content[_ngcontent-%COMP%]{max-height:calc(100vh - 160px);overflow:auto}}.modal-content[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{color:var(--text);font-size:1rem;line-height:1.25rem;font-weight:500;margin-bottom:.5rem}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:.5rem;padding-bottom:1.5rem}@media (max-width: 767px){.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]{padding-bottom:1rem}}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:8px;vertical-align:middle;color:#6a6a6a}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-name[_ng
731content-%COMP%]{font-size:var(--font-size-lg);font-weight:var(--font-weight-bold);line-height:2rem;margin-top:1rem}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-name-label[_ngcontent-%COMP%]{max-width:calc(100% - 5rem);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-name[_ngcontent-%COMP%]   .store-closed-label[_ngcontent-%COMP%]{background-color:#ebebeb;color:var(--text);font-weight:var(--font-weight-bold);font-size:var(--font-size-sm);padding:.25rem .5rem;border-radius:.938rem;margin-left:1rem;vertical-align:top}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-address[_ngcontent-%COMP%]{font-size:var(--font-size-med);font-weight:var(--font-weight-medium)}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-tel[_ngcontent-%COMP%]{font-size:var(--font-size-sm);font-weight:var(--font-weight-semi-bold);letter-spacing:.053rem}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-container[_ngcontent-%COMP%]{position:relative}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]{font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);max-width:100%;display:flex;align-items:flex-start;background:none;padding:0}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%] >
731 .closed[_ngcontent-%COMP%], .modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%] > .opened[_ngcontent-%COMP%], .modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%] > .closed[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%], .modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%] > .opened[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%], .modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%] > .time[_ngcontent-%COMP%] > .drowdown-handler[_ngcontent-%COMP%], .modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%] > .time[_ngcontent-%COMP%] > .drowdown-handler[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{color:var(--text)}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%] > .closed[_ngcontent-%COMP%], .modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%] > .closed[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{color:var(--general-red)}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%] >
731 .opened[_ngcontent-%COMP%], .modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%] > .opened[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{color:var(--general-green)}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .time[_ngcontent-%COMP%]{color:var(--text);padding-left:.4rem;line-height:1.5}@media (max-width: 435px){.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .time[_ngcontent-%COMP%]{flex-basis:70%}}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .closed-time[_ngcontent-%COMP%]{flex-basis:65%;text-align:start}@media (max-width: 435px){.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .closed-time[_ngcontent-%COMP%]{flex-basis:68%}}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .closed[_ngcontent-%COMP%]{display:flex;line-height:1.5}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .closed[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{margin-right:0;justify-items:center;margin-left:.4rem}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .opened[_ngcontent-%COMP%]{display:flex;line-height:1.5}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .opened[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{margin-right:0;justify-items:center;margin-left:.4rem}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .drowdown-handler[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{transition:transform .3s ease;transform-origin:center;width:9px}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]   .drowdown-handler.rotated[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]{position:absolute;top:22px;left:22px;width:15.188rem;background-color:var(--white);border-radius:8px;box-shadow:0 2px 4px #0000001a;z-index:10;display:flex;flex-direction:column;height:0;line-height:1.313rem;overflow:hidden;transition:height .3s ease-in-out}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown.visible[_ngcontent-%COMP%]{height:10.188rem}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item[_ngcontent-%COMP%]{display:flex;padding:0rem 1.75rem;justify-content:space-between;font-size:var(--font-size-sm);color:#6a6a6a;font-weight:var(--font-weight-regular)}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item[_ngcontent-%COMP%]:first-child{margin-top:.5rem}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item[_ngcontent-%COMP%]:last-child{margin-bottom:.5rem}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item.today[_ngcontent-%COMP%]   .day[_ngcontent-%COMP%], .modal
731-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item.today[_ngcontent-%COMP%]   .time[_ngcontent-%COMP%]{color:var(--text)}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item.closed[_ngcontent-%COMP%]{opacity:.5}.modal-content[_ngcontent-%COMP%]   .store-info[_ngcontent-%COMP%]   .business-hours-dropdown[_ngcontent-%COMP%]   .business-hours-item[_ngcontent-%COMP%]   .day[_ngcontent-%COMP%]{text-transform:capitalize}.modal-content[_ngcontent-%COMP%]   .map-container[_ngcontent-%COMP%]{width:100%;height:336px;min-height:336px;background-color:var(--disabled-tile);position:relative;display:inline-flex}.modal-content[_ngcontent-%COMP%]   .map-container[_ngcontent-%COMP%]   app-mapbox-map[_ngcontent-%COMP%]{width:100%;height:100%}@media (max-width: 767px){.modal-content[_ngcontent-%COMP%]   .map-container[_ngcontent-%COMP%]{height:320px;min-height:320px}}.modal-content[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(117px,1fr));gap:1rem;width:100%}.modal-content[_ngcontent-%COMP%]   .order-types-container[_ngcontent-%COMP%]{padding-top:1.5rem}.modal-content[_ngcontent-%COMP%]   .order-types-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:0;font-weight:var(--font-weight-medium);font-size:var(--font-size-med);padding-bottom:.5rem}@media (max-width: 767px){.modal-content[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fit,minmax(min(98px,33.3333333333%),1fr))}}.modal-content[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]   .order-type[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;height:4rem;text-align:center;color:#6a6a6a;border-radius:8px}.modal-content[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]   .order-type.selected[_ngcontent-%COMP%]{color:var(--primary-dark);background-color:var(--primary-container);border:2px solid var(--primary-dark)}.modal-content[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]   .order-type[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.modal-content[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]   .order-type[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-size:var(--font-size-med);color:var(--text-color);font-weight:var(--font-weight-semi-bold);line-height:1.25rem}.modal-content[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]   .order-type[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]   .estimated-delivery-time[_ngcontent-%COMP%]{font-size:var(--font-size-xs);font-weight:var(--font-weight-regular);line-height:1.25rem}@media (max-width: 767px){.modal-content[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]   .order-type[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-size:var(--font-size-sm)}.modal-content[_ngcontent-%COMP%]   .order-types[_ngcontent-%COMP%]   .order-type[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]   .estimated-delivery-time[_ngcontent-%COMP%]{font-size:var(--font-size-xs)}}.other-store-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-top:1rem;width:100%;cursor:pointer}.other-store-container[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{color:var(--text-unselected);transform:rotate(90deg)}.other-store-container[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-size:14px;color:var(--text-unselected);font-weight:var(--font-weight-semi-bold);line-height:1.25rem}.saved-addresses-container[_ngcontent-%COMP%]{padding-top:1.5rem}.saved-addresses-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:0;font-weight:var(--font-weight-medium);font-size:var(--font-size-lg)}.saved-addresses-list[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-direction:column;gap:.5rem;width:100%}.saved-addresses-list-item[_ngcontent-%COMP%]{display:grid;grid-template-columns:2rem auto 4.875rem;grid-auto-flow:column;grid-column-gap:1rem;align-items:center;padding:.5rem 1rem;border-radius:.5rem;cursor:pointer;background-color:var(--grey-background);color:var(--grey)}.saved-addresses-list-item.selected[_ngcontent-%COMP%]{color:var(--primary-dark);background-color:var(--primary-container);border:2px solid var(--primary-dark)}.saved-addresses-list-item[_ngcontent-%COMP%]:not(.selected):hover{background-color:var(--primary-container)}.saved-addresses-list-item-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:2rem;height:2rem}.saved-addresses-list-item-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;overflow:hidden;text-align:left}
731.saved-addresses-list-item-name[_ngcontent-%COMP%]{font-size:var(--font-size-med);font-weight:var(--font-weight-semi-bold);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.25rem}.saved-addresses-list-item-address[_ngcontent-%COMP%]{font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:1.25rem}.saved-addresses-list-item-actions[_ngcontent-%COMP%]{display:flex}.saved-addresses-list-item-actions-divider[_ngcontent-%COMP%]{background-color:#ffffff4d;width:2px;border-radius:5px;margin:0 .875rem}.empty-saved-addresses[_ngcontent-%COMP%]{padding-top:1.5rem}.empty-saved-addresses[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:0;font-weight:var(--font-weight-medium);font-size:var(--font-size-lg);padding-bottom:.5rem}.add-new-container[_ngcontent-%COMP%]{padding-top:1rem}.add-new-container[_ngcontent-%COMP%]   .add-new-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;background:none;border:none;color:var(--primary);font-size:var(--font-size-med);font-weight:var(--font-weight-regular);cursor:pointer}.add-new-container[_ngcontent-%COMP%]   .add-new-btn[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{line-height:1.25rem}.add-new-container[_ngcontent-%COMP%]   .button-undecorated[_ngcontent-%COMP%]{margin-top:1rem;text-align:right;font-size:var(--font-size-med);font-style:normal;font-weight:var(--font-weight-medium);line-height:1.25rem;color:var(--primary)}.add-new-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:0;font-weight:var(--font-weight-medium);font-size:var(--font-size-lg)}@media (max-width: 767px){.add-new-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:.5rem}}.modal-actions[_ngcontent-%COMP%]{width:100%;box-shadow:0 -1px 4px #00000017;padding:.75rem 1rem 1rem;height:5rem}.modal-actions[_ngcontent-%COMP%]   .confirm-btn[_ngcontent-%COMP%]{width:100%;text-transform:none}"],data:{animation:[]}})}}return h})();var G_={giftServerUrl:{type:"string",data:""},image:{type:"image",data:{url:"assets/images/default-theme-images/Frame2030.png",altText:"placeholder image"}},title:{type:"string",data:"Gift cards can be used when visiting our store"},description:{type:"string",data:"You can even use our gift cards when placing an order online! Share your love with a gift card or just make a gift to yourself."},textColor:{type:"string",data:"#353535"},backgroundColor:{type:"string",data:"#ffffff"}};function pM(h,k){if(h&1&&(I(0,"div",1)(1,"h2",2),X(2," Gift Cards "),E(),I(3,"div",3)(4,"div",4),it(5,"img",5),E(),I(6,"div",6)(7,"div",7),X(8),E(),it(9,"div",8),I(10,"div",9)(11,"a",10),X(12,"Purchase an e-gift"),E(),I(13,"a",11),X(14,"Reload your gift card"),E()()()()()),h&2){let n,c=A();ue("background-color",(c.data==null||c.data.backgroundColor==null?null:c.data.backgroundColor.data)||"var(--page-background)"),w(5),j("ngSrc",(c.data==null||c.data.image==null||c.data.image.data==null?null:c.data.image.data.url)||"assets/images/default.jpg")("alt",c.data==null||c.data.image==null||c.data.image.data==null?null:c.data.image.data.altText),w(),ue("color",(c.data==null||c.data.textColor==null?null:c.data.textColor.data)||"var(--text)"),w(2),Rt(" ",c.data==null||c.data.title==null?null:c.data.title.data," "),w(),ue("color",(n=c.data==null||c.data.textColor==null?null:c.data.textColor.data)!==null&&n!==void 0?n:"var(--text)"),j("innerHTML",c.data==null||c.data.description==null?null:c.data.description.data,Ti),w(2),j("href",c.giftCardUrl,Se),w(2),j("href",c.giftCardUrl,Se)}}var Z_=(()=>{class h{constructor(n){this.componentConfig=n,this.configService=gt(Ee),this.iframeC
731ommunicator=gt(xc),this.singleStore=this.configService.singleStore,this.giftCardUrl=null}get shouldDisplayGiftCards(){return!!this.giftCardUrl||this.iframeCommunicator.isInIframe()||!!this.singleStore()}ngOnInit(){this.data=te(te({},G_),this.componentConfig?.data);let n=this.data?.giftServerUrl?.data;this.singleStore()?.baseUrl?this.giftCardUrl=`${this.singleStore()?.baseUrl}/giftcards`:n&&n!=="https://example.com/gift-cards/actions"?this.giftCardUrl=n:this.giftCardUrl=null}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-gift-cards"]],standalone:!0,features:[Kt],decls:1,vars:1,consts:[[1,"gift-cards",3,"background-color"],[1,"gift-cards"],[1,"component-title"],[1,"gift-cards-wrapper"],[1,"gift-cards-img"],["loading","lazy","width","400","height","251",3,"ngSrc","alt"],[1,"gift-cards-content"],[1,"gift-cards-title"],[1,"gift-cards-description",3,"innerHTML"],[1,"gift-cards-actions"],[1,"button-link","primary",3,"href"],[1,"button-link","reload",3,"href"]],template:function(c,d){c&1&&ut(0,pM,15,12,"div",0),c&2&&rt(d.shouldDisplayGiftCards?0:-1)},dependencies:[ve,mn],styles:[".reload-button[_ngcontent-%COMP%]{background-color:var(--primary-container);color:var(--primary-dark);height:52px;padding:.5rem 3rem;justify-content:center;align-items:center;border-radius:2rem;font-weight:var(--font-weight-semi-bold);width:fit-content}.button-accent[_ngcontent-%COMP%]{padding:1rem 1.375rem;text-transform:none;width:fit-content}.gift-cards[_ngcontent-%COMP%]{padding:3.25rem 0;letter-spacing:normal}.gift-cards[_ngcontent-%COMP%]   .component-title[_ngcontent-%COMP%]{margin-bottom:0;font-size:40px;font-weight:var(--font-weight-bold);font-family:Caveat,sans-serif;padding-left:3.25rem}@media screen and (max-width: 638px){.gift-cards[_ngcontent-%COMP%]   .component-title[_ngcontent-%COMP%]{padding-left:0;font-size:var(--font-size-xl)}}.gift-cards-wrapper[_ngcontent-%COMP%]{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(280px,400px) 1fr;column-gap:clamp(2rem,5vw,5.5rem);margin-top:3rem;justify-content:center;max-width:1400px;margin-inline:auto;padding-inline:52px}.gift-cards-img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{display:block;width:100%;height:auto;object-fit:contain}@media screen and (max-width: 1023px){.gift-cards-img[_ngcontent-%COMP%]{width:min(380px,100%);height:240px;margin-inline:auto}.gift-cards-img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain}}.gift-cards-title[_ngcontent-%COMP%]{font-size:var(--font-size-lg);font-style:normal;font-weight:var(--font-weight-medium);line-height:normal}.gift-cards-description[_ngcontent-%COMP%]{font-size:var(--font-size-med);font-style:normal;font-weight:var(--font-weight-medium);line-height:normal;margin-top:1.75rem}.gift-cards-actions[_ngcontent-%COMP%]{margin-top:2.5rem;display:flex;column-gap:1rem}@media (min-width: 1024px) and (max-width: 1199px){.gift-cards-wrapper[_ngcontent-%COMP%]{column-gap:2.5rem;width:auto;padding:0 calc(52px + (100vw - 1024px)/416px*84px)}.gift-cards-actions[_ngcontent-%COMP%]{margin-top:1rem}}@media (min-width: 1200px) and (max-width: 1399px){.gift-cards-wrapper[_ngcontent-%COMP%]{column-gap:2.5rem;width:auto;padding:0 calc(52px + (100vw - 1024px)/416px*84px)}.gift-cards-actions[_ngcontent-%COMP%]{margin-top:1rem}}@media (min-width: 768px) and (max-width: 1023px){.gift-cards-wrapper[_ngcontent-%COMP%]{grid-auto-flow:row;padding:0 calc(52px + 98 * (100vw - 768px) / 256);grid-auto-columns:unset;text-align:center;margin-top:2.5rem;width:auto}.gift-cards-img[_ngcontent-%COMP%]{width:min(380px,100%);margin-inline:auto}.gift-cards-content[_ngcontent-%COMP%]{margin-top:2rem}.gift-cards-actions[_ngcontent-%COMP%]{justify-content:center;margin-top:1.5rem;column-gap:1.5rem}}@media screen and (max-width: 767px) and (min-width: 639px){.gift-cards-wrapper[_ngcontent-%COMP%]{grid-auto-flow:row;padding:0 3.25rem;grid-auto-columns:unset;text-align:center;margin-top:2.5rem;width:auto}.gift-cards-content[_ngcontent-%COMP%]{margin-top:2rem}.gift-cards-actions[_ngcontent-%COMP%]{justify-content:center;margin-top:1.5rem;column-gap:1.5rem}}@media screen and (max-width: 638px) and (min-width: 430px){.gift-cards[_ngcontent-%COMP%]{justify-content:center;display:flex;flex-flow:column;align-items:center;text-align:center;padding:1.5rem 0 3rem}.gift-cards-wrapper[_ngcontent-%COMP%]{grid-auto-flow:row;padding:0;grid-auto-columns:unset;text-align:center;margin-top:1.5rem;width:382px}.gift-cards-content[_ngcontent-%COMP%]{margin-top:2rem}.gift-cards-title[_ngcontent-%COMP%]{padding-left:0;font-size:var(--font-size-med)}.gift-cards-description[_ngcontent-%COMP%]{font-size:.813rem}.gift-cards-actions[_ngcontent-%COMP%]{justify-items:center;margin-top:3rem;column-gap:1.5rem;grid-auto-flow:row;grid-auto-columns:unset;display:grid;row-gap:1rem}}@media screen and (max-width: 429px){.gift-cards[_ngcontent-%COMP%]{justify-content:center;display:flex;flex-flow:column;align-items:center;text-align:center;padding:1.5rem 0 3rem}.gift-cards-wrapper[_ngcontent-%COMP%]{grid-auto-flow:row;padding:0;grid-auto-columns:unset;text-align:center;width:auto;margin:1.5rem 1.5rem 0}.gift-cards-content[_ngcontent-%COMP%]{margin-top:2rem}.gift-cards-title[_ngcontent-%COMP%]{padding-left:0;font-size:var(--font-size-med)}.gift-cards-description[_ngcontent-%COMP%]{font-size:.813rem}.gift-cards-actions[_ngcontent-%COMP%]{justify-content:center;margin-top:3rem;column-gap:1.5rem;grid-auto-flow:row;grid-auto-columns:unset;display:grid;row-gap:1rem;justify-items:center}}"]})}}return h})();var H_={title:{type:"string",data:"Check Your Balance"},textColor:{type:"string",data:"#353535"},backgroundColor:{type:"string",data:"#ffffff"}};var q_=(h,k)=>k.key,uM=(h,k,n)=>
731({capitalize:h,"lower-case":k,"upper-case":n}),W_=(h,k,n)=>({"align-center":h,"align-left":k,"align-right":n});function hM(h,k){if(h&1&&(I(0,"th",4),X(1),E()),h&2){let n=A().$implicit;j("ngClass",zr(2,uM,n.labelFormat==="capitalize",n.labelFormat==="lowercase",n.labelFormat==="uppercase")),w(),Rt(" ",n.label," ")}}function mM(h,k){if(h&1&&ut(0,hM,2,6,"th",4),h&2){let n=k.$implicit,c=A();rt(c.layoutService.viewport()!=="mobile"||c.layoutService.viewport()==="mobile"&&!n.isTitle?0:-1)}}function gM(h,k){if(h&1&&(I(0,"td",6),X(1),E()),h&2){let n=k.$implicit,c=k.$index,d=A().$implicit,a=A(2);j("ngStyle",a.getColumnProps(c).style)("ngClass",zr(3,W_,a.getColumnProps(c).align==="center",a.getColumnProps(c).align==="left",a.getColumnProps(c).align==="right")),w(),Rt(" ",a.getCellData(d,n.key,c)," ")}}function fM(h,k){if(h&1&&(I(0,"tr",5),le(1,gM,2,7,"td",6,q_),E()),h&2){let n=A(2);w(),ce(n.headers())}}function _M(h,k){if(h&1&&le(0,fM,3,0,"tr",5,Ce),h&2){let n=A();ce(n.data())}}function yM(h,k){if(h&1&&(I(0,"td",6),X(1),E()),h&2){let n=A(),c=n.$implicit,d=n.$index,a=A().$implicit,z=A(2);j("ngStyle",z.getColumnProps(d).style)("ngClass",zr(3,W_,z.getColumnProps(d).align==="center",z.getColumnProps(d).align==="left",z.getColumnProps(d).align==="right")),w(),Rt(" ",z.getCellData(a,c.key,d)," ")}}function xM(h,k){if(h&1&&ut(0,yM,2,7,"td",6),h&2){let n,c=k.$implicit,d=A(3);rt(((n=d.cellAsRowTitle())==null?null:n.key)!==c.key?0:-1)}}function vM(h,k){if(h&1&&(I(0,"tr",7)(1,"td",8),X(2),E()(),I(3,"tr",5),le(4,xM,1,1,null,null,q_),E()),h&2){let n,c=k.$implicit,d=A(2);w(),j("ngStyle",(n=d.cellAsRowTitle())==null?null:n.style),qt("colspan",d.headers().length-1),w(),Rt(" ",c[d.cellAsRowTitle().key]," "),w(2),ce(d.headers())}}function bM(h,k){if(h&1&&le(0,vM,6,3,null,null,Ce),h&2){let n=A();ce(n.data())}}var X_=(()=>{class h{isDate(n){return n instanceof Date||typeof n=="string"&&!isNaN(Date.parse(n))}formatDate(n){let c=n instanceof Date?n:new Date(n);return(this.datePipe.transform(c,"MM/dd/yyyy")||"").replace(/(\d{2})\/(\d{2})\/\d{2}(\d{2})/,"$1/$2/$3")}constructor(){this.platformId=gt(rn),this.layoutService=gt(pn),this.data=zt.required(),this.headers=zt.required(),this.styles=zt(),this.datePipe=new yf("en-US")}getColumnProps(n){return this.headers()[n]}getCellData(n,c,d){let a=n[c],z=this.headers()[d].formatValue;return z&&(a=z(a)),this.isDate(a)&&(a=this.formatDate(a)),a}cellAsRowTitle(){return this.headers().find(n=>n.isTitle)}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-data-table"]],inputs:{data:[1,"data"],headers:[1,"headers"],styles:[1,"styles"]},standalone:!0,features:[Kt],decls:10,vars:3,consts:[[1,"data-table-wrapper"],[1,"data-table"],[1,"data-table-headers"],[1,"data-table-body"],[1,"data-table-headers-item",3,"ngClass"],[1,"data-table-body-item"],[1,"data-table-body-item-cell",3,"ngStyle","ngClass"],[1,"data-table-body-item","title"],[1,"data-table-body-item-cell",3,"ngStyle"]],template:function(c,d){c&1&&($o(0),I(1,"div",0)(2,"table",1)(3,"thead",2)(4,"tr"),le(5,mM,1,1,null,null,Ce),E()(),I(7,"tbody",3),ut(8,_M,2,0)(9,bM,2,0),E()()(),Go()),c&2&&(w(),Xa(d.styles()),w(4),ce(d.headers()),w(3),rt(d.layoutService.viewport()!=="mobile"||!d.cellAsRowTitle()?8:9))},dependencies:[ve,Ye,Gi],styles:[".data-table-wrapper[_ngcontent-%COMP%]{overflow:auto}.data-table[_ngcontent-%COMP%]{width:100%;color:var(--text);border-spacing:0;margin-bottom:0}@media (max-width: 767px){.data-table[_ngcontent-%COMP%]{width:100%}}.data-table[_ngcontent-%COMP%]   .upper-case[_ngcontent-%COMP%]{text-transform:uppercase}.data-table[_ngcontent-%COMP%]   .lower-case[_ngcontent-%COMP%]{text-transform:lowercase}.data-table[_ngcontent-%COMP%]   .capitalize[_ngcontent-%COMP%]{text-transform:capitalize}.data-table[_ngcontent-%COMP%]   .align-left[_ngcontent-%COMP%]{text-align:left}.data-table[_ngcontent-%COMP%]   .align-center[_ngcontent-%COMP%]{text-align:center}.data-table[_ngcontent-%COMP%]   .align-left[_ngcontent-%COMP%]{text-align:right}.data-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]{padding-top:1rem}.data-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .data-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{font-weight:var(--font-weight-medium)}.data-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{line-height:1.5rem}@media (max-width: 767px){.data-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:first-child{text-align:left}}.data-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:1.125rem 0 1.375rem;border-bottom:1px #DADADA solid;line-height:1.5rem}@media (max-width: 767px){.data-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:0 0 .25rem}}.data-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:last-child   td[_ngcontent-%COMP%]{border-width:0;padding-bottom:0}.data-table[_ngcontent-%COMP%]   .data-table-headers-item[_ngcontent-%COMP%]{padding-bottom:1rem}.data-table[_ngcontent-%COMP%]   .data-table-body-item.title[_ngcontent-%COMP%]   .data-table-body-item-cell[_ngcontent-%COMP%]{padding:.5rem 0 0!important;border-bottom:0}.data-table[_ngcontent-%COMP%]   .data-table-body-item.title[_ngcontent-%COMP%] ~ tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding-top:0}.data-table[_ngcontent-%COMP%]   .data-table-body-item.title[_ngcontent-%COMP%] ~ tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{text-align:left}"]})}}return h})();var K_=(()=>{class h{constructor(){this.httpClient=gt(Zi)}
731getGiftBalance(n,c){return this.httpClient.post(`${qn.api}/gift/info`,{cardNumber:n,pin:c})}getGiftHistory(n,c){return this.httpClient.post(`${qn.api}/gift/history`,{cardNumber:n,pin:c})}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275prov=zn({token:h,factory:h.\u0275fac,providedIn:"root"})}}return h})();var CM=["history"],wM=h=>({maxHeight:h});function MM(h,k){if(h&1&&(I(0,"span",13),it(1,"app-icon",14),X(2),E()),h&2){let n=A(3);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.giftCardNumber.required," ")}}function PM(h,k){if(h&1&&(I(0,"span",13),it(1,"app-icon",14),X(2),E()),h&2){let n=A(3);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.giftCardNumber.min_max," ")}}function OM(h,k){if(h&1&&ut(0,MM,3,2,"span",13)(1,PM,3,2,"span",13),h&2){let n=A(2);rt(n.giftCardNumber.hasError("required")?0:-1),w(),rt(n.giftCardNumber.hasError("minlength")||n.giftCardNumber.hasError("maxlength")?1:-1)}}function SM(h,k){if(h&1&&(I(0,"span",13),it(1,"app-icon",14),X(2),E()),h&2){let n=A(3);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.giftCardPIN.required," ")}}function TM(h,k){if(h&1&&(I(0,"span",13),it(1,"app-icon",14),X(2),E()),h&2){let n=A(3);w(),j("name",n.iconNameType.error),w(),Rt(" ",n.validationMessages.giftCardPIN.min_max," ")}}function IM(h,k){if(h&1&&ut(0,SM,3,2,"span",13)(1,TM,3,2,"span",13),h&2){let n=A(2);rt(n.giftCardPIN.hasError("required")?0:-1),w(),rt(n.giftCardPIN.hasError("minlength")||n.giftCardPIN.hasError("maxlength")?1:-1)}}function kM(h,k){if(h&1){let n=Yt();I(0,"form",5),Ot("ngSubmit",function(){kt(n);let d=A();return Et(d.onSubmit())}),I(1,"div",6)(2,"app-input",7),Ot("input",function(d){kt(n);let a=A();return Et(a.allowOnlyNumbers(d))}),E(),I(3,"div",8),ut(4,OM,2,2),E()(),I(5,"div",6)(6,"app-input",9),Ot("input",function(d){kt(n);let a=A();return Et(a.allowOnlyNumbers(d))}),E(),I(7,"div",8),ut(8,IM,2,2),E()()(),I(9,"div",10),X(10," The 12 digit gift card number and the 4 digit pin will be found on the back of the card. "),E(),I(11,"div",11)(12,"app-accent-button",12),Ot("clickAction",function(){kt(n);let d=A();return Et(d.onSubmit())}),E()()}if(h&2){let n=A();j("formGroup",n.form),w(2),j("type","text")("placeholder","Gift Card Number")("required",!0)("maxLength",12)("invalid",n.showErrors.giftCardNumber&&n.giftCardNumber.invalid),w(2),rt(n.showErrors.giftCardNumber&&n.giftCardNumber.invalid?4:-1),w(2),j("type","text")("placeholder","Gift Card PIN")("required",!0)("maxLength",4)("invalid",n.showErrors.giftCardPIN&&n.giftCardPIN.invalid),w(2),rt(n.showErrors.giftCardPIN&&n.giftCardPIN.invalid?8:-1),w(),ue("color",(n.data==null||n.data.textColor==null?null:n.data.textColor.data)||"var(--text)"),w(3),j("label","Check Balance")("loading",n.loading)}}function EM(h,k){if(h&1){let n=Yt();I(0,"div",15)(1,"div",16)(2,"div",17),X(3,"Card Number"),E(),I(4,"div",18),X(5),E()(),I(6,"div",19)(7,"div",17),X(8,"My Balance"),E(),I(9,"div",18),X(10),E()(),I(11,"div",20),X(12," Your balance is ready to use online or in-store. Want to check another card? "),E()(),I(13,"div",11)(14,"app-accent-button",21),Ot("clickAction",function(){kt(n);let d=A();return Et(d.showHistory())}),E(),I(15,"button",22),Ot("click",function(){kt(n);let d=A();return Et(d.resetForm())}),X(16,"Check Another Card"),E()()}if(h&2){let n=A();w(5),St(n.giftCardNumber.value),w(5),St(n.giftCardBalance||n.moneyFormat(123)),w(4),j("loading",n.historyLoading)("label","View Gift Card History")}}function zM(h,k){if(h&1&&(I(0,"div",23),it(1,"app-data-table",24),E()),h&2){let n=A();w(),j("data",n.giftCardHistory)("headers",n.giftCardHistoryHeaders)("styles",me(3,wM,n.layoutService.viewport()==="mobile"?"318px":"344px"))}}var Y_=(()=>{class h{get giftCardNumber(){return this.form.controls.giftCardNumber}get giftCardPIN(){return this.form.controls.giftCardPIN}constructor(n){this.componentConfig=n,this.configService=gt(Ee),this.modalService=gt(Gn),this.appService=gt(vc),this.platformId=gt(rn),this.layoutService=gt(pn),this.giftCardService=gt(K_),this.toastService=gt(Af),this.iconNameType=ge,this.loading=!1,this.singleStore=this.configService.singleStore,this.giftCardHistory=[],this.giftCardBalance=null,this.giftCardBalanceShowed=!1,this.historyLoading=!1,this.giftCardHistoryHeaders=[{label:"",key:"title",isTitle:!0,style:{"font-weight":400}}
731,{label:"date",key:"date",labelFormat:"uppercase",align:"center"},{label:"time",key:"time",labelFormat:"uppercase",align:"center"},{label:"amount",key:"amount",labelFormat:"uppercase",align:"center"},{label:"balance",key:"balance",labelFormat:"uppercase",align:"center"}],this.form=new Rr({giftCardNumber:new Fi("",an.compose([an.required,an.minLength(12),an.maxLength(12)])),giftCardPIN:new Fi("",an.compose([an.required,an.minLength(4),an.maxLength(4)]))}),this.showErrors={giftCardNumber:!1,giftCardPIN:!1},this.validationMessages={giftCardNumber:{required:"Gift Card Number is required",min_max:"Gift Card Number must be 12 characters."},giftCardPIN:{required:"Gift Card PIN is required",min_max:"Gift Card PIN must be 4 characters."}},this.formatDateISO=c=>{let d=new Date(c),a=String(d.getMonth()+1).padStart(2,"0"),z=String(d.getDate()).padStart(2,"0"),J=d.getFullYear();return`${a}/${z}/${J}`},this.formatTimeISO=c=>{let d=new Date(c),a=d.getHours(),z=String(d.getMinutes()).padStart(2,"0"),J=a>=12?"PM":"AM";return a=a%12||12,`${a}:${z}${J}`},this.capitalize=c=>c&&c.length?c.charAt(0).toUpperCase()+c.slice(1):""}
731ngOnInit(){this.data=te(te({},H_),this.componentConfig?.data)}onSubmit(){if(this.resetValidation(),!this.form.valid){this.giftCardNumber.invalid&&(this.showErrors.giftCardNumber=!0),this.giftCardPIN.invalid&&(this.showErrors.giftCardPIN=!0);return}this.giftCardService.getGiftBalance(this.giftCardNumber.value,this.giftCardPIN.value).subscribe({next:n=>{this.giftCardBalanceShowed=!0,this.giftCardBalance=n.balance},error:n=>{let c=n?.error?.errors?.message;n.status===500&&(c="There is a connectivity issue, please try again in a few moments"),this.toastService.showError(c)}})}resetValidation(){this.showErrors={giftCardNumber:!1,giftCardPIN:!1}}resetForm(){this.form.controls.giftCardNumber.setValue(""),this.form.controls.giftCardPIN.setValue(""),this.giftCardBalanceShowed=!1}allowOnlyNumbers(n){let c=n.target;c.value=c.value.replace(/[^0-9]/g,"")}showHistory(){this.historyLoading=!0,this.giftCardService.getGiftHistory(this.giftCardNumber.value,this.giftCardPIN.value).pipe(Zd(()=>{this.historyLoading=!1,this.giftCardHistory.length>0&&this.modalService.openGenericModal({modalTitle:"History",modalContent:this.historyTemplateRef,confirmButtonText:"Close",modalStyles:{"max-width":"45rem","min-width":"45rem"}})})).subscribe({next:n=>{this.giftCardHistory=n.map(c=>({title:`${this.capitalize(c.action)} at ${c.orderStore}`,date:this.formatDateISO(c.timeCreated),time:this.formatTimeISO(c.timeCreated),amount:this.formatSignedAmount(c.amount),balance:c.balance}))}})}formatSignedAmount(n){if(!n)return"";let c=n.replace(/\$/g,"").trim();return c.startsWith("-")?c:`+${c}`}moneyFormat(n){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n)}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-gift-cards-check-balance"]],viewQuery:function(c,d){if(c&1&&$e(CM,5),c&2){let a;Ge(a=Ze())&&(d.historyTemplateRef=a.first)}},standalone:!0,features:[Kt],decls:10,vars:6,consts:[["history",""],[1,"gift-cards"],[1,"component-title"],[1,"gift-cards-wrapper"],[1,"gift-cards-content"],[1,"gift-cards-form",3,"ngSubmit","formGroup"],[1,"gift-cards-form-field"],["formControlName","giftCardNumber",3,"input","type","placeholder","required","maxLength","invalid"],[1,"errors-wrapper"],["formControlName","giftCardPIN",3,"input","type","placeholder","required","maxLength","invalid"],[1,"gift-cards-disclaimer"],[1,"gift-cards-actions"],[3,"clickAction","label","loading"],[1,"input-error"],[1,"icon",3,"name"],[1,"gift-cards-balance"],[1,"gift-cards-balance-number"],[1,"gift-cards-balance-card-field-label"],[1,"gift-cards-balance-card-field-value"],[1,"gift-cards-balance-balance"],[1,"gift-cards-balance-disclaimer"],["appAsyncButton","",3,"clickAction","loading","label"],[1,"gift-cards-reset-button",3,"click"],[1,"gift-cards-history"],[3,"data","headers","styles"]],template:function(c,d){c&1&&($o(0),I(1,"div",1)(2,"h2",2),X(3),E(),I(4,"div",3)(5,"div",4),ut(6,kM,13,17)(7,EM,17,4),E()()(),Go(),ut(8,zM,2,5,"ng-template",null,0,ki)),c&2&&(w(),ue("background-color",(d.data==null||d.data.backgroundColor==null?null:d.data.backgroundColor.data)||"var(--page-background)"),w(2),Rt(" ",d.data==null||d.data.title==null?null:d.data.title.data," "),w(),Ie("gift-cards-wrapper--balance",d.giftCardBalanceShowed),w(2),rt(d.giftCardBalanceShowed?7:6))},dependencies:[ve,Ur,lo,Br,Hi,Fr,jr,Ho,Nr,Vr,ku,Ae,X_],styles:['.button-accent[_ngcontent-%COMP%]{padding:1rem 1.375rem;text-transform:none;width:fit-content}  app-accent-button button{font-weight:600!important}.gift-cards[_ngcontent-%COMP%]{background-color:var(--white);padding:2.5rem 0;letter-spacing:normal}@media (max-width: 767px){.gift-cards[_ngcontent-%COMP%]{padding:1.5rem 0}}.gift-cards[_ngcontent-%COMP%]   .component-title[_ngcontent-%COMP%]{margin-bottom:0;font-size:40px;font-weight:var(--font-weight-bold);font-family:Caveat,sans-serif;padding-left:3.25rem}@media (max-width: 767px){.gift-cards[_ngcontent-%COMP%]   .component-title[_ngcontent-%COMP%]{text-align:center;padding-left:0;font-size:var(--font-size-xl)}}.gift-cards-wrapper[_ngcontent-%COMP%]{justify-content:center;width:100%;justify-self:center;margin-top:2rem;padding:0 calc(24px + (100vw - 430px) / 1010 * 300)}@media (max-width: 767px){.gift-cards-wrapper[_ngcontent-%COMP%]{margin-top:3rem}}.gift-cards-wrapper--balance[_ngcontent-%COMP%]{padding:0 calc(24px + (100vw - 430px) / 1010 * 300)}@media (min-width: 768px) and (max-width: 1023px){.gift-cards-wrapper--balance[_ngcontent-%COMP%]{padding:0 1.5rem;max-width:943px}}
731@media (min-width: 1024px){.gift-cards-wrapper--balance[_ngcontent-%COMP%]{padding:0 2.5rem;max-width:943px}}.gift-cards-content[_ngcontent-%COMP%]{width:100%;text-align:center}@media (max-width: 767px){.gift-cards-content[_ngcontent-%COMP%]{padding:0 1rem}}.gift-cards-form[_ngcontent-%COMP%]{display:grid;grid-auto-flow:row;row-gap:1rem;margin-bottom:0}.gift-cards-disclaimer[_ngcontent-%COMP%]{text-align:center;margin:.75rem 0 1.5rem;color:var(--text);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);font-style:normal;line-height:normal}@media (max-width: 767px){.gift-cards-disclaimer[_ngcontent-%COMP%]{margin:.75rem 0 2rem}}.gift-cards-actions[_ngcontent-%COMP%]{display:inline-flex;column-gap:1rem}@media (max-width: 767px){.gift-cards-actions[_ngcontent-%COMP%]{flex-flow:column;column-gap:normal;row-gap:1rem}}.gift-cards-actions[_ngcontent-%COMP%]   .gift-cards-reset-button[_ngcontent-%COMP%]{background-color:var(--primary-container);color:var(--primary-dark);height:52px;padding:.5rem 3rem;justify-content:center;align-items:center;border-radius:2rem;font-weight:var(--font-weight-semi-bold);width:fit-content;white-space:nowrap}@media (max-width: 767px){.gift-cards-actions[_ngcontent-%COMP%]   .gift-cards-reset-button[_ngcontent-%COMP%]{align-self:center}}.gift-cards-balance[_ngcontent-%COMP%]{background-color:var(--page-background);padding:2.25rem 0 1rem 41px;border-radius:1.5rem;text-align:left;display:grid;grid-auto-flow:row;position:relative;margin-bottom:2rem}@media (max-width: 767px){.gift-cards-balance[_ngcontent-%COMP%]{margin-top:.625rem;padding:6.5rem 2rem .75rem}}.gift-cards-balance[_ngcontent-%COMP%]:after{position:absolute;content:"";right:24px;top:-2.75rem;width:11.938rem;height:12.75rem;background:url("./media/money-in-pocket-X3TBVQLN.png") no-repeat left top;background-size:contain}@media (max-width: 767px){.gift-cards-balance[_ngcontent-%COMP%]:after{width:7.438rem;height:7.938rem;left:50%;top:-2.125rem;transform:translate(-50%)}}.gift-cards-balance-card-field-label[_ngcontent-%COMP%]{color:var(--grey);font-size:var(--font-size-lg);font-weight:var(--font-weight-regular);width:12rem}@media (max-width: 767px){.gift-cards-balance-card-field-label[_ngcontent-%COMP%]{font-size:var(--font-size-med);width:6.875rem;margin-right:1rem}}.gift-cards-balance-number[_ngcontent-%COMP%]{display:flex;line-height:2.25rem}@media (max-width: 767px){.gift-cards-balance-number[_ngcontent-%COMP%]{line-height:1.875rem}}.gift-cards-balance-number[_ngcontent-%COMP%]   .gift-cards-balance-card-field-value[_ngcontent-%COMP%]{font-size:var(--font-size-xl);font-weight:var(--font-weight-regular);color:var(--text)}@media (max-width: 767px){.gift-cards-balance-number[_ngcontent-%COMP%]   .gift-cards-balance-card-field-value[_ngcontent-%COMP%]{font-size:var(--font-size-lg)}}.gift-cards-balance-balance[_ngcontent-%COMP%]{display:flex;line-height:3.375rem;margin:1.25rem 0 .563rem}@media (max-width: 767px){.gift-cards-balance-balance[_ngcontent-%COMP%]{margin:1rem 0 1.5rem}}.gift-cards-balance-balance[_ngcontent-%COMP%]   .gift-cards-balance-card-field-value[_ngcontent-%COMP%]{color:var(--primary-dark);font-size:2.25rem;font-weight:var(--font-weight-semi-bold)}@media (max-width: 767px){.gift-cards-balance-balance[_ngcontent-%COMP%]   .gift-cards-balance-card-field-value[_ngcontent-%COMP%]{font-size:2rem}}.gift-cards-balance-disclaimer[_ngcontent-%COMP%]{color:var(--grey);font-size:var(--font-size-sm);font-style:normal;font-weight:var(--font-weight-regular);line-height:normal}.gift-cards-history[_ngcontent-%COMP%]{padding-bottom:1rem}@media (max-width: 767px){.gift-cards-history[_ngcontent-%COMP%]{padding-bottom:0}}']})}}return h})();var Q_={iframeLink:{type:"string",data:"https://foodtecsolutions.com"},height:{type:"string",data:"500px"}};var J_=(()=>{class h{constructor(n){this.componentConfig=n,this.sanitizer=gt(Zo),this.data=te(te({},Q_),this.componentConfig?.data),this.safeUrl=this.sanitizer.bypassSecurityTrustResourceUrl(this.data.iframeLink.data??"")}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-iframe-section"]],standalone:!0,features:[Kt],decls:1,vars:3,consts:[["frameborder","0","allowfullscreen","","sandbox","allow-same-origin allow-scripts allow-forms",3,"src","width","height"]],template:function(c,d){c&1&&it(0,"iframe",0),c&2&&j("src",d.safeUrl,uf)("width","100%")("height",d.data==null||d.data.height==null?null:d.data.height.data)},styles:["[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center}"]})}}return h})();var Xd={backgroundColor:{type:"string",data:"#ffffff"},padding:{type:"string",data:"24px"},layout:{type:"string",data:"flex-column"},components:{type:"array",objectInputType:[{key:"type",relatedComponent:["text","image","route-button","external-link","dynamic"],inputType:"select",options:["text","image","route-button","external-link","dynamic"],type:{type:"string",data:"text"}},{key:"content",relatedComponent:"text",inputType:"textarea",type:{type:"string",data:"Enter your text here"}},{key:"fontSize",relatedComponent:"text",inputType:"input",type:{type:"string",data:"16px"}},{key:"fontWeight",relatedComponent:"text",inputType:"select",options:["normal","bold","300","400","500","600","700"],type:{type:"string",data:"normal"}},{key:"color",relatedComponent:["text","external-link"],inputType:"color",type:{type:"string",data:"#000000"}},{key:"url",relatedComponent:["image","external-link"],inputType:"link",type:{type:"string",data:""}},{key:"altText",relatedComponent:"image",inputType:"input",type:{type:"string",data:""}},{key:"width",relatedComponent:"image",inputType:"input",type:{type:"string",data:"100%"}},{key:"height",relatedComponent:"image",inputType:"input",type:{type:"string",data:"400"}},{key:"label",relatedComponent:["route-button","external-link"],inputType:"input",type:{type:"string",data:"Click here"}},{key:"route",relatedComponent:"route-button",inputType:"input",type:{type:"string",data:"/"}},{key:"backgroundColor",relatedComponent:["route-button","dynamic"],inputType:"color",type:{type:"string",data:"#0056B3"}},{key:"textColor",relatedComponent:"route-button",inputType:"color",type:{type:"string",data:"#ffffff"}},{key:"openInNewTab",relatedComponent:"external-link",inputType:"boolean",type:{type:"boolean",data:!0}
731},{key:"layout",relatedComponent:"dynamic",inputType:"select",options:["flex-row","flex-column","grid-2","grid-3","grid-4"],type:{type:"string",data:"flex-row"}},{key:"gap",relatedComponent:"dynamic",inputType:"input",type:{type:"string",data:"16px"}},{key:"components",relatedComponent:"dynamic",inputType:"array",type:{type:"array",data:[]}}],data:[{type:"text",content:"Welcome to our restaurant",fontSize:"32px",fontWeight:"bold",color:"#333333"},{type:"text",content:"We serve the best food in town with fresh ingredients and amazing flavors.",fontSize:"16px",fontWeight:"normal",color:"#666666"},{type:"image",url:"https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?w=800",altText:"Restaurant interior",width:"800",height:"600"},{type:"dynamic",layout:"flex-row",gap:"12px",components:[{type:"route-button",label:"View Menu",route:"/menu",backgroundColor:"#0056B3",textColor:"#ffffff"},{type:"route-button",label:"Order Now",route:"/order",backgroundColor:"#1E7E34",textColor:"#ffffff"},{type:"external-link",label:"Follow us on Instagram",url:"https://instagram.com",openInNewTab:!0,color:"#C2185B"}]}]}};var Du=(()=>{class h{static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-primitive-text"]],inputs:{data:"data"},standalone:!0,features:[Kt],decls:2,vars:7,consts:[[1,"primitive-text"]],template:function(c,d){if(c&1&&(I(0,"span",0),X(1),E()),c&2){let a,z,J;ue("font-size",(a=d.data.fontSize)!==null&&a!==void 0?a:"16px")("font-weight",(z=d.data.fontWeight)!==null&&z!==void 0?z:"normal")("color",(J=d.data.color)!==null&&J!==void 0?J:"#000000"),w(),Rt(" ",d.data.content,`
732`)}},styles:[".primitive-text[_ngcontent-%COMP%]{display:block;line-height:1.5;word-wrap:break-word;text-align:center}"]})}}return h})();var Fu=(()=>{class h{getDimension(n,c){if(!n)return c;let d=parseInt(n,10);return isNaN(d)||d<=0?c:d}get width(){return this.getDimension(this.data.width,800)}get height(){return this.getDimension(this.data.height,600)}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-primitive-image"]],inputs:{data:"data"},standalone:!0,features:[Kt],decls:1,vars:4,consts:[["loading","lazy",1,"primitive-image",3,"ngSrc","alt","width","height"]],template:function(c,d){c&1&&it(0,"img",0),c&2&&j("ngSrc",d.data.url)("alt",d.data.altText)("width",d.width)("height",d.height)},dependencies:[ve,mn],styles:[".primitive-image[_ngcontent-%COMP%]{display:block;max-width:100%;object-fit:cover;border-radius:4px}"]})}}return h})();var Ru=(()=>{class h{constructor(){this.gtmService=gt(ts)}trackClick(){this.gtmService.pushEvent("cta_click",{cta_name:this.data.label,cta_location:"dynamic_content",destination:this.data.route})}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-primitive-route-button"]],inputs:{data:"data"},standalone:!0,features:[Kt],decls:2,vars:6,consts:[[1,"primitive-route-button",3,"click","routerLink"]],template:function(c,d){if(c&1&&(I(0,"a",0),Ot("click",function(){return d.trackClick()}),X(1),E()),c&2){let a,z;ue("background-color",(a=d.data.backgroundColor)!==null&&a!==void 0?a:"#007bff")("color",(z=d.data.textColor)!==null&&z!==void 0?z:"#ffffff"),j("routerLink",d.data.route),w(),Rt(" ",d.data.label,`
733`)}},dependencies:[Lr],styles:[".primitive-route-button[_ngcontent-%COMP%]{display:inline-block;padding:12px 24px;border-radius:4px;text-decoration:none;font-weight:500;cursor:pointer;transition:opacity .2s ease}.primitive-route-button[_ngcontent-%COMP%]:hover{opacity:.9}"]})}}return h})();var Bu=(()=>{class h{static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-primitive-external-link"]],inputs:{data:"data"},standalone:!0,features:[Kt],decls:2,vars:6,consts:[[1,"primitive-external-link",3,"href","target","rel"]],template:function(c,d){if(c&1&&(I(0,"a",0),X(1),E()),c&2){let a;ue("color",(a=d.data.color)!==null&&a!==void 0?a:"#007bff"),j("href",d.data.url,Se)("target",d.data.openInNewTab?"_blank":"_self")("rel",d.data.openInNewTab?"noopener noreferrer":""),w(),Rt(" ",d.data.label,`
734`)}},styles:[".primitive-external-link[_ngcontent-%COMP%]{display:inline-block;text-decoration:underline;cursor:pointer;transition:opacity .2s ease}.primitive-external-link[_ngcontent-%COMP%]:hover{opacity:.8}"]})}}return h})();function AM(h,k){if(h&1&&it(0,"app-primitive-text",1),h&2){let n=A().$implicit,c=A();j("data",c.asText(n))}}function LM(h,k){if(h&1&&it(0,"app-primitive-image",1),h&2){let n=A().$implicit,c=A();j("data",c.asImage(n))}}function DM(h,k){if(h&1&&it(0,"app-primitive-route-button",1),h&2){let n=A().$implicit,c=A();j("data",c.asRouteButton(n))}}function FM(h,k){if(h&1&&it(0,"app-primitive-external-link",1),h&2){let n=A().$implicit,c=A();j("data",c.asExternalLink(n))}}function RM(h,k){if(h&1&&ut(0,AM,1,1,"app-primitive-text",1)(1,LM,1,1,"app-primitive-image",1)(2,DM,1,1,"app-primitive-route-button",1)(3,FM,1,1,"app-primitive-external-link",1),h&2){let n,c=k.$implicit;rt((n=c.type)==="text"?0:n==="image"?1:n==="route-button"?2:n==="external-link"?3:-1)}}var t0=(()=>{class h{asText(n){return n}asImage(n){return n}asRouteButton(n){return n}asExternalLink(n){return n}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-primitive-nested-dynamic"]],inputs:{data:"data"},standalone:!0,features:[Kt],decls:3,vars:8,consts:[[1,"nested-dynamic"],[3,"data"]],template:function(c,d){if(c&1&&(I(0,"div",0),le(1,RM,4,1,null,null,Ce),E()),c&2){let a,z,J;Ka(d.data.layout),ue("background-color",(a=d.data.backgroundColor)!==null&&a!==void 0?a:"transparent")("padding",(z=d.data.padding)!==null&&z!==void 0?z:"0")("gap",(J=d.data.gap)!==null&&J!==void 0?J:"16px"),w(),ce(d.data.components)}},dependencies:[Du,Fu,Ru,Bu],styles:[".nested-dynamic[_ngcontent-%COMP%]{width:100%;box-sizing:border-box}.nested-dynamic.flex-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center}.nested-dynamic.flex-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.nested-dynamic.grid-2[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr)}.nested-dynamic.grid-3[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr)}.nested-dynamic.grid-4[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr)}@media (max-width: 768px){.nested-dynamic.grid-3[_ngcontent-%COMP%], .nested-dynamic.grid-4[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}.nested-dynamic.flex-row[_ngcontent-%COMP%]{flex-direction:column}}@media (max-width: 480px){.nested-dynamic.grid-2[_ngcontent-%COMP%], .nested-dynamic.grid-3[_ngcontent-%COMP%], .nested-dynamic.grid-4[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]})}}return h})();function BM(h,k){if(h&1&&it(0,"app-primitive-text",1),h&2){let n=A().$implicit,c=A();j("data",c.asText(n))}}function NM(h,k){if(h&1&&it(0,"app-primitive-image",1),h&2){let n=A().$implicit,c=A();j("data",c.asImage(n))}}
734function VM(h,k){if(h&1&&it(0,"app-primitive-route-button",1),h&2){let n=A().$implicit,c=A();j("data",c.asRouteButton(n))}}function jM(h,k){if(h&1&&it(0,"app-primitive-external-link",1),h&2){let n=A().$implicit,c=A();j("data",c.asExternalLink(n))}}function UM(h,k){if(h&1&&it(0,"app-primitive-nested-dynamic",1),h&2){let n=A().$implicit,c=A();j("data",c.asNestedDynamic(n))}}function $M(h,k){if(h&1&&ut(0,BM,1,1,"app-primitive-text",1)(1,NM,1,1,"app-primitive-image",1)(2,VM,1,1,"app-primitive-route-button",1)(3,jM,1,1,"app-primitive-external-link",1)(4,UM,1,1,"app-primitive-nested-dynamic",1),h&2){let n,c=k.$implicit;rt((n=c.type)==="text"?0:n==="image"?1:n==="route-button"?2:n==="external-link"?3:n==="dynamic"?4:-1)}}var e0=(()=>{class h{constructor(n){this.componentConfig=n,this.components=[],this.layout="flex-column",this.data={backgroundColor:this.componentConfig?.data?.backgroundColor??Xd.backgroundColor,padding:this.componentConfig?.data?.padding??Xd.padding,layout:this.componentConfig?.data?.layout??Xd.layout,components:this.componentConfig?.data?.components??Xd.components},this.components=this.data.components.data,this.layout=this.data.layout.data}asText(n){return n}asImage(n){return n}asRouteButton(n){return n}asExternalLink(n){return n}asNestedDynamic(n){return n}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-dynamic"]],standalone:!0,features:[Kt],decls:3,vars:6,consts:[[1,"dynamic-section"],[3,"data"]],template:function(c,d){c&1&&(I(0,"section",0),le(1,$M,5,1,null,null,Ce),E()),c&2&&(Ka(d.layout),ue("background-color",d.data.backgroundColor.data)("padding",d.data.padding.data),w(),ce(d.components))},dependencies:[Du,Fu,Ru,Bu,t0],styles:[".dynamic-section[_ngcontent-%COMP%]{width:100%;box-sizing:border-box}.dynamic-section.flex-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;gap:16px;align-items:center;justify-content:center}.dynamic-section.flex-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px}.dynamic-section.grid-2[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.dynamic-section.grid-3[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.dynamic-section.grid-4[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}@media (max-width: 768px){.dynamic-section.grid-3[_ngcontent-%COMP%], .dynamic-section.grid-4[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}.dynamic-section.flex-row[_ngcontent-%COMP%]{flex-direction:column}}@media (max-width: 480px){.dynamic-section.grid-2[_ngcontent-%COMP%], .dynamic-section.grid-3[_ngcontent-%COMP%], .dynamic-section.grid-4[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]})}}return h})();var n0={layoutOption:{type:"string",data:"Option 1"}};var ss=(()=>{class h{constructor(){this.macroPattern=/\$\{([^}]+)\}/g,this.authService=gt(Mn),this.configService=gt(Ee),this.modalService=gt(Gn)}resolveUrl(n){if(!n)return{kind:"url",value:""};let c=this.extractMacros(n);for(let a of c){let z=this.resolveMacro(a,n);if(z?.kind==="action")return z}return{kind:"url",value:n.replace(this.macroPattern,(a,z)=>{let J=this.resolveMacro(z.trim(),n);return J?.kind==="url"?J.value:a})}}extractMacros(n){return n?[...n.matchAll(this.macroPattern)].map(c=>c[1].trim()):[]}resolveMacro(n,c){switch(n){case"store.webAddress":return this.resolveStoreWebAddress(c);default:return}}resolveStoreWebAddress(n){let c=this.configService.singleStore();return c?{kind:"url",value:c.baseUrl??""}:this.authService.state().isLoggedIn?{kind:"url",value:this.authService.account()?.favoriteStore?.baseUrl??""}:{kind:"action",run:()=>this.modalService.openModal(Ln.StoreSelector,{pendingMacroUrl:n})}}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275prov=zn({token:h,factory:h.\u0275fac,providedIn:"root"})}}return h})();var GM=["tabsContainer"],ZM=["categorySection"];function HM(h,k){if(h&1&&(I(0,"div",3)(1,"p"),X(2),E()()),h&2){let n=A();qt("aria-label",n.localizationService.getLocalizationString("route.menu.loading_aria_label")),w(2),St(n.localizationService.getLocalizationString("route.menu.loading_message"))}}function qM(h,k){if(h&1&&(I(0,"div",4)(1,"p"),X(2),E()()),h&2){let n=A();qt("aria-label",n.localizationService.getLocalizationString("route.menu.error_aria_label")),w(2),St(n.error())}}function WM(h,k){if(h&1){let n=Yt();I(0,"button",13),Ot("click",function(){let d=kt(n).$implicit,a=A(3);return Et(a.onTabChange(d.keyName))}),X(1),E()}if(h&2){let n=k.$implicit,c=A(3);Ie("active",c.activeTab()===n.keyName),qt("aria-current",c.activeTab()===n.keyName?"location":null)("aria-controls","tab-"+n.keyName)("id","category-"+n.keyName),w(),Rt(" ",n.name," ")}}function XM(h,k){if(h&1){let n=Yt();I(0,"div",6)(1,"button",8),Ot("click",function(){kt(n);let d=A(2);return Et(d.scrollTabs("prev"))}),it(2,"app-icon",9),E(),I(3,"div",10,0),Ot("scroll",function(){kt(n);let d=A(2);return Et(d.updateScrollState())}),le(5,WM,2,6,"button",11,ga().trackByTabKeyName,!0),E(),I(7,"button",12),Ot("click",function(){kt(n);let d=A(2);return Et(d.scrollTabs("next"))}),it(8,"app-icon",9),E()()}if(h&2){let n=A(2);qt("aria-label",n.localizationService.getLocalizationString("route.menu.categories_aria_label")),w(),j("disabled",!n.canScrollPrev()),qt("aria-label",n.localizationService.getLocalizationString("route.menu.scroll_prev_aria_label")),w(),ue("transform","rotate(90deg)"),j("name",n.iconNameType.arrow),w(3),ce(n.menu().tabs),w(2),j("disabled",!n.canScrollNext()),qt("aria-label",n.localizationService.getLocalizationString("route.menu.scroll_next_aria_label")),w(),ue("transform","rotate(-90deg)"),j("name",n.iconNameType.arrow)}}function KM(h,k){if(h&1&&(I(0,"p",19),X(1),E()),h&2){let n=A().$implicit;w(),St(n.description)}}function YM(h,k){if(h&1&&(I(0,"p",24),X(1),E()),h&2){let n=A().$implicit;w(),St(n.description)}}function QM(h,k){if(h&1){let n=Yt();I(0,"div",30)(1,"img",33),Ot("error",function(d){kt(n);let a=A(9);return Et(a.onImageError(d))}),E()()}if(h&2){let n=A().$implicit,c=A(8);w(),j("src",c.menuService.resolveImageUrl(n.pictures[0].src),Se)("alt",n.label||n.name)}}function JM(h,k){if(h&1&&(I(0,"p",32),X(1),E()),h&2){let n=A().$implicit;w(),St(n.description)}}function tP(h,k){if(h&1&&(I(0,"span",36)(1,"span",37),X(2),E(),I(3,"span",38),X(4),E()()),h&2){let n=k.$implicit;w(2),St(n.label||n.size),w(2),Rt("$",n.price.toFixed(2),"")}}function eP(h,k){if(h&1&&(I(0,"div",34),le(1,tP,5,2,"span",36,Ce),E()),h&2){let n=A(2).$implicit;w(),ce(n.sizePrices)}}function nP(h,k){if(h&1&&(I(0,"p",35),X(1),E()),h&2){let n,c,d=A(2).$implicit,a=A(8);qt("aria-label",(d.sizePrices.length>1?a.localizationService.getLocalizationString("route.menu.price_from"):"")+"Price: "+(((n=a.getLowestPrice(d.sizePrices))==null?null:n.toFixed(2))||"0.00")+" dollars"),w(),Qn("",d.sizePrices.length>1?a.localizationService.getLocalizationString("route.menu.price_from"):"","$",(c=a.getLowestPrice(d.sizePrices))==null?null:c.toFixed(2),"")}}function iP(h,k){if(h&1&&ut(0,eP,3,0,"div",34)(1,nP,2,3,"p",35),h&2){let n,c=A(9);rt(((n=c.data().layoutOption)==null?null:n.data)==="Option 2"?0:1)}}function oP(h,k){if(h&1){let n=Yt();I(0,"a",26),Ot("click",function(d){let a=kt(n).$implicit,z=A(2).$implicit,J=A(2).$implicit,yt=A(2).$implicit,ie=A(2);return Et(ie.onOrderingClick(d,a,J,z,yt))}),I(1,"div",27)(2,"h3",28),X(3),E()(),I(4,"div",29),ut(5,QM,2,2,"div",30),I(6,"div",31),ut(7,JM,2,1,"p",32)(8,iP,2,1),E()()()}if(h&2){let n=k.$implicit,c=A(8);Ie("item-card--action",c.isOrderingAction()),qt("href",c.getOrderingHref(n.links),Se)("role",c.isOrderingAction()?"button":"listitem"),w(3),St(n.label||n.name),w(2),rt(n.pictures&&n.pictures.length>0?5:-1),w(2),rt(n.description?7:-1),w(),rt(n.sizePrices&&n.sizePrices.length>0?8:-1)}}function rP(h,k){if(h&1&&(I(0,"div",20),le(1,oP,9,8,"a",25,ga().trackByItemKeyName,!0),E()),h&2){let n=A().$implicit;w(),ce(n.panelItems)}}function aP(h,k){if(h&1&&(I(0,"p",21),X(1),E()),h&2){let n=A(7);w(),St(n.localizationService.getLocalizationString("route.menu.no_items_subgroup"))}}function sP(h,k){if(h&1&&(I(0,"div",22)(1,"h3",23),X(2),E(),ut(3,YM,2,1,"p",24)(4,rP,3,0,"div",20)(5,aP,2,1,"p",21),E()),h&2){let n=k.$implicit,c=A(2).$implicit,d=A(2).$implicit;qt("aria-labelledby","subgroup-"+d.keyName+"-"+(c.keyName||c.keyname)+"-"+(n.keyName||n.keyname)),w(),qt("id","subgroup-"+d.keyName+"-"+(c.keyName||c.keyname)+"-"+(n.keyName||n.keyname)),w(),St(n.name),w(),rt(n.description?3:-1),w(),rt(n.panelItems&&n.panelItems.length>0?4:5)}}function lP(h,k){if(h&1&&le(0,sP,6,5,"div",22,ga().trackByGroupKeyName,!0),h&2){let n=A().$implicit;ce(n.subGroups)}}function cP(h,k){if(h&1){let n=Yt();I(0,"div",30)(1,"img",33),Ot("error",function(d){kt(n);let a=A(7);return Et(a.onImageError(d))}),E()()}if(h&2){let n=A().$implicit,c=A(6);w(),j("src",c.menuService.resolveImageUrl(n.pictures[0].src),Se)("alt",n.label||n.name)}}function dP(h,k){if(h&1&&(I(0,"p",32),X(1),E()),h&2){let n=A().$implicit;w(),St(n.description)}}function pP(h,k){if(h&1&&(I(0,"span",36)(1,"span",37),X(2),E(),I(3,"span",38),X(4),E()()),h&2){let n=k.$implicit;w(2),St(n.label||n.size),w(2),Rt("$",n.price.toFixed(2),"")}}function uP(h,k){if(h&1&&(I(0,"div",34),le(1,pP,5,2,"span",36,Ce),E()),h&2){let n=A(2).$implicit;w(),ce(n.sizePrices)}}function hP(h,k){if(h&1&&(I(0,"p",35),X(1),E()),h&2){let n,c,d=A(2).$implicit,a=A(6);qt("aria-label",(d.sizePrices.length>1?a.localizationService.getLocalizationString("route.menu.price_from"):"")+"Price: "+(((n=a.getLowestPrice(d.sizePrices))==null?null:n.toFixed(2))||"0.00")+" dollars"),w(),Qn("",d.sizePrices.length>1?a.localizationService.getLocalizationString("route.menu.price_from"):"","$",(c=a.getLowestPrice(d.sizePrices))==null?null:c.toFixed(2),"")}}function mP(h,k){if(h&1&&ut(0,uP,3,0,"div",34)(1,hP,2,3,"p",35),h&2){let n,c=A(7);rt(((n=c.data().layoutOption)==null?null:n.data)==="Option 2"?0:1)}}function gP(h,k){if(h&1){let n=Yt();I(0,"a",26),Ot("click",function(d){let a=kt(n).$implicit,z=A(2).$implicit,J=A(2).$implicit,yt=A(2);return Et(yt.onOrderingClick(d,a,z,void 0,J))}),I(1,"div",27)(2,"h3",28),X(3),E()(),I(4,"div",29),ut(5,cP,2,2,"div",30),I(6,"div",31),ut(7,dP,2,1,"p",32)(8,mP,2,1),E()()()}if(h&2){let n=k.$implicit,c=A(6);Ie("item-card--action",c.isOrderingAction()),qt("href",c.getOrderingHref(n.links),Se)("role",c.isOrderingAction()?"button":"listitem"),w(3),St(n.label||n.name),w(2),rt(n.pictures&&n.pictures.length>0?5:-1),w(2),rt(n.description?7:-1),w(),rt(n.sizePrices&&n.sizePrices.length>0?8:-1)}}function fP(h,k){if(h&1&&(I(0,"div",20),le(1,gP,9,8,"a",25,ga().trackByItemKeyName,!0),E()),h&2){let n=A().$implicit;w(),ce(n.panelItems)}}function _P(h,k){if(h&1&&(I(0,"p",21),X(1),E()),h&2){let n=A(5);w(),St(n.localizationService.getLocalizationString("route.menu.no_items_group"))}}function yP(h,k){if(h&1&&(I(0,"section",16)(1,"div",17)(2,"h2",18),X(3),E(),ut(4,KM,2,1,"p",19),E(),ut(5,lP,2,0)(6,fP,3,0,"div",20)(7,_P,2,1,"p",21),E()),h&2){let n=k.$implicit,c=A(2).$implicit;qt("aria-labelledby","group-"+c.keyName+"-"+(n.keyName||n.keyname)),w(2),qt("id","group-"+c.keyName+"-"+(n.keyName||n.keyname)),w(),St(n.name),w(),rt(n.description?4:-1),w(),rt(n.subGroups&&n.subGroups.length>0?5:-1),w(),rt((!n.subGroups||n.subGroups.length===0)&&n.panelItems&&n.panelItems.length>0?6:!n.subGroups||n.subGroups.length===0&&(!n.panelItems||n.panelItems.length===0)?7:-1)}}function xP(h,k){if(h&1&&le(0,yP,8,6,"section",16,ga().trackByGroupKeyName,!0),h&2){let n=A().$implicit;ce(n.groups)}}function vP(h,k){if(h&1&&(I(0,"p",15),X(1),E()),h&2){let n=A(3);w(),St(n.localizationService.getLocalizationString("route.menu.no_groups"))}}function bP(h,k){if(h&1&&(I(0,"div",7,1)(2,"div",14),ut(3,xP,2,0)(4,vP,2,1,"p",15),E()()),h&2){let n=k.$implicit;qt("id","tab-"+n.keyName)("aria-labelledby","category-"+n.keyName),w(3),rt(n.groups&&n.groups.length>0?3:4)}}function CP(h,k){if(h&1&&(I(0,"div",5),ut(1,XM,9,11,"div",6),le(2,bP,5,3,"div",7,ga().trackByTabKeyName,!0),E()),h&2){let n=A();w(),rt(n.menu().tabs&&n.menu().tabs.length>0?1:-1),w(),ce(n.menu().tabs)}}var i0=(()=>{class h{constructor(){this.configService=gt(Ee),this.menuService=gt(Iu),this.localizationService=gt(un),this.macroReplacementService=gt(ss),this.modalService=gt(Gn),this.gtmService=gt(ts),this.merchantConfigService=gt(Wn),this.isBrowser=An(gt(rn)),this.webOrderingUrl="${store.webAddress}",this.iconNameType=ge,this.menu=Ut(()=>this.menuService.menu()),this.activeTab=Ut(()=>this.menuService.activeTab()),this.isLoading=Ut(()=>this.menuService.isLoading()),this.error=Ut(()=>this.menuService.error()),this.canScrollPrevSignal=Te(!1),this.canScrollNextSignal=Te(!0),this.activeTabData=Ut(()=>{let n=this.menuService.menu(),c=this.menuService.activeTab();return n?.tabs&&c&&n.tabs.find(a=>a.keyName===c)||null}),this.data=Ut(()=>({layoutOption:{type:"string",data:this.merchantConfigService.merchantConfig()?.theme.routes?.find(c=>c.path==="menu")?.menuComponent?.data?.layoutOption?.data??n0.layoutOption.data}}))}holdClickedCategory(){clearTimeout(this.categoryScrollTimer),this.categoryScrollTimer=setTimeout(()=>this.releaseClickedCategory(),150)}releaseClickedCategory(){clearTimeout(this.categoryScrollTimer),this.categoryScrollTimer=void 0}ngOnInit(){this.isBrowser&&setTimeout(()=>{this.updateScrollState(),this.onPageScroll()},0)}ngOnDestroy(){this.releaseClickedCategory(),this.scrollFrame!==void 0&&this.tabsContainer?.nativeElement.ownerDocument.defaultView?.cancelAnimationFrame(this.scrollFrame)}onPageScroll(){if(!this.isBrowser)return;this.categoryScrollTimer!==void 0&&this.holdClickedCategory();let n=this.tabsContainer?.nativeElement.ownerDocument.defaultView;!n||this.scrollFrame!==void 0||(this.scrollFrame=n.requestAnimationFrame(()=>{this.scrollFrame=void 0,this.categoryScrollTimer===void 0&&this.updateActiveCategory(),this.updateScrollState()}))}updateActiveCategory(){let n=this.categorySections?.toArray().map(ie=>ie.nativeElement),c=this.tabsContainer?.nativeElement.ownerDocument.defaultView;if(!n?.length||!c)return;let d=parseFloat(c.getComputedStyle(n[0]).scrollMarginTop)||0,a=n.filter(ie=>{let ee=ie.getBoundingClientRect();return ee.bottom>d&&ee.top<c.innerHeight});if(!a.length)return;let z=a[0],J=z.ownerDocument;c.scrollY+c.innerHeight>=J.documentElement.scrollHeight-2&&(z=a[a.length-1]);let yt=z.id.slice(4);this.activeTab()!==yt&&(this.menuService.setActiveTab(yt),this.revealCategoryButton(yt))}revealCategoryButton(n){let c=this.tabsContainer?.nativeElement,d=c?.ownerDocument.getElementById(`category-${n}`);if(!c||!d)return;let a=c.getBoundingClientRect(),z=d.getBoundingClientRect(),J=z.left<a.left?z.left-a.left:z.right>a.right?z.right-a.right:0;J&&c.scrollBy({left:J,behavior:"instant"})}onTabChange(n){this.menuService.setActiveTab(n),this.revealCategoryButton(n);let c=this.categorySections?.find(a=>a.nativeElement.id===`tab-${n}`)?.nativeElement,d=c?.ownerDocument.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches;c&&this.holdClickedCategory(),c?.scrollIntoView({behavior:d?"instant":"smooth",block:"start"})}scrollTabs(n){if(!this.tabsContainer)return;let c=this.tabsContainer.nativeElement,d=300;n==="prev"?c.scrollBy({left:-d,behavior:"smooth"}):c.scrollBy({left:d,behavior:"smooth"})}canScrollPrev(){return this.canScrollPrevSignal()}canScrollNext(){return this.canScrollNextSignal()}updateScrollState(){if(!this.tabsContainer)return;let n=this.tabsContainer.nativeElement,c=n.scrollLeft>0,d=n.scrollLeft<n.scrollWidth-n.clientWidth-10;this.canScrollPrevSignal.set(c),this.canScrollNextSignal.set(d)}getLowestPrice(n){return!n||n.length===0?null:Math.min(...n.map(c=>c.price))}onImageError(n){n.target.closest(".item-image")?.style.setProperty("display","none")}trackByTabKeyName(n,c){return c.keyName}trackByGroupKeyName(n,c){return c.keyName||c.keyname}trackByItemKeyName(n,c){return c.keyName||c.name}isOrderingAction(){return this.macroReplacementService.resolveUrl(this.webOrderingUrl).kind==="action"}extractItemParams(n){let c=n?.[0],d=c?.rel==="special",a=d||c?.rel==="item"?c.href:n?.f
734ind(z=>z.rel==="self"||z.href?.includes("categoryItem"))?.href;if(!a)return{categoryName:null,itemName:null,specialName:null};try{let z=new URL(a);return{categoryName:z.searchParams.get("categoryName"),itemName:d?null:z.searchParams.get("itemName"),specialName:d?z.searchParams.get("specialName")??z.searchParams.get("itemName"):null}}catch{return{categoryName:null,itemName:null,specialName:null}}}getOrderingHref(n){let c=this.macroReplacementService.resolveUrl(this.webOrderingUrl);if(c.kind!=="url"||!c.value)return null;let{categoryName:d,itemName:a,specialName:z}=this.extractItemParams(n);try{let J=new URL(c.value);return d&&J.searchParams.set("category",d),a&&J.searchParams.set("item",a),z&&(J.searchParams.delete("item"),J.searchParams.set("specialName",z)),J.toString()}catch{return c.value}}onOrderingClick(n,c,d,a,z){if(this.trackMenuItemClick(c,d,a,z),this.macroReplacementService.resolveUrl(this.webOrderingUrl).kind==="action"){n.preventDefault();let{categoryName:yt,itemName:ie,specialName:ee}=this.extractItemParams(c.links);this.modalService.openModal(Ln.StoreSelector,te({category:yt},c.links?.[0]?.rel==="special"?{specialName:ee}:{item:ie}))}}trackMenuItemClick(n,c,d,a){let{categoryName:z}=this.extractItemParams(n.links),J=n.label||n.name,yt=this.getLowestPrice(n.sizePrices),ie={item_name:J},ee=c?.name??z,bt=a?.name??this.activeTabData()?.name??this.activeTab();n.keyName&&(ie.item_id=n.keyName),ee&&(ie.item_category=ee),d?.name&&(ie.item_subcategory=d.name),bt&&(ie.menu_tab=bt),yt!==null&&(ie.price=yt),this.gtmService.pushEvent("menu_item_click",ie)}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-menu"]],viewQuery:function(c,d){if(c&1&&($e(GM,5),$e(ZM,5)),c&2){let a;Ge(a=Ze())&&(d.tabsContainer=a.first),Ge(a=Ze())&&(d.categorySections=a)}},hostBindings:function(c,d){c&1&&Ot("wheel",function(){return d.releaseClickedCategory()},!1,sc)("touchstart",function(){return d.releaseClickedCategory()},!1,sc)("scroll",function(){return d.onPageScroll()},!1,sc)("resize",function(){return d.onPageScroll()},!1,sc)},standalone:!0,features:[Kt],decls:4,vars:3,consts:[["tabsContainer",""],["categorySection",""],[1,"menu-container"],["role","status","aria-live","polite",1,"loading-state"],["role","alert","aria-live","assertive",1,"error-state"],["role","main",1,"menu-content"],["role","navigation",1,"tabs-navigation-container"],["role","region",1,"category-section"],["type","button",1,"tab-nav-button","prev-button",3,"click","disabled"],[3,"name"],[1,"tabs-navigation",3,"scroll"],["type","button",1,"tab-button",3,"active"],["type","button",1,"tab-nav-button","next-button",3,"click","disabled"],["type","button",1,"tab-button",3,"click"],[1,"tab-content"],[1,"no-groups"],[1,"group-section"],[1,"group-header"],[1,"group-name"],[1,"group-description"],["role","list",1,"items-grid"],[1,"no-items"],[1,"subgroup-container"],[1,"subgroup-name"],[1,"subgroup-description"],["role","listitem",1,"item-card",3,"item-card--action"],["role","listitem",1,"item-card",3,"click"],[1,"item-name-section"],[1,"item-name"],[1,"item-main-content"],[1,"item-image"],[1,"item-description-section"],[1,"item-description"],["loading","lazy",3,"error","src","alt"],[1,"item-size-prices"],[1,"item-price"],[1,"item-size-price"],[1,"item-size-label"],[1,"item-size-price-value"]],template:function(c,d){c&1&&(I(0,"div",2),ut(1,HM,3,2,"div",3)(2,qM,3,2,"div",4)(3,CP,4,1,"div",5),E()),c&2&&(w(),rt(d.isLoading()?1:-1),w(),rt(d.error()&&!d.isLoading()?2:-1),w(),rt(d.menu()&&!d.isLoading()&&!d.error()?3:-1))},dependencies:[Ae],styles:[".menu-container[_ngcontent-%COMP%]{--category-scroll-offset: calc(90px + 5rem) ;padding:2rem 140px;min-height:calc(100vh - 90px);background:var(--white);border-top:2px solid var(--grey-background)}.menu-container[_ngcontent-%COMP%]   .loading-state[_ngcontent-%COMP%]{text-align:center;padding:3rem;color:var(--grey);font-size:var(--font-size-lg)}.menu-container[_ngcontent-%COMP%]   .error-state[_ngcontent-%COMP%]{text-align:center;padding:2rem;color:var(--general-red);background-color:var(--general-red-container);border-radius:8px;margin-bottom:2rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .category-section[_ngcontent-%COMP%]{scroll-margin-top:var(--category-scroll-offset)}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:1.5rem;position:sticky;top:90px;z-index:10;background:var(--white)}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]   .tab-nav-button[_ngcontent-%COMP%]{font-size:1.2rem;cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;line-height:1;background:transparent}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]   .tab-nav-button[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{display:flex;width:22px;height:13px;padding:2.3px 3.2px;justify-content:center;align-items:center;flex-shrink:0;color:var(--primary)}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]   .tab-nav-button[_ngcontent-%COMP%]:hover:not(:disabled){opacity:.7}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]   .tab-nav-button[_ngcontent-%COMP%]:disabled{opacity:0;cursor:not-allowed}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]   .tab-nav-button.prev-button[_ngcontent-%COMP%]{order:-1}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]   .tab-nav-button.next-button[_ngcontent-%COMP%]{order:1}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]   .tabs-navigation[_ngcontent-%COMP%]{display:flex;gap:.75rem;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;flex:1;padding:1rem 0;border-bottom:none;order:0;scrollbar-width:none}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]   .tabs-navigation[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]   .tabs-navigation[_ngcontent-%COMP%]   .tab-button[_ngcontent-%COMP%]{background:var(--grey-background);border:none;border-radius:24px;padding:1px 1rem;font-weight:var(--font-weight-regular);color:var(--grey);cursor:pointer;white-space:nowrap;flex-shrink:0;height:32px}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]   .tabs-navigation[_ngcontent-%COMP%]   .tab-button.active[_ngcontent-%COMP%]{background:var(--primary-container);color:var(--primary-dark);font-weight:var(--font-weight-semi-bold)}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]{margin-bottom:3rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .group-header[_ngcontent-%COMP%]{margin-bottom:1rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .group-header[_ngcontent-%COMP%]   .group-name[_ng
734content-%COMP%]{font-size:var(--font-size-xl);font-weight:var(--font-weight-bold);color:var(--text-unselected);margin-bottom:1rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .group-header[_ngcontent-%COMP%]   .group-description[_ngcontent-%COMP%]{color:var(--text-unselected);font-weight:var(--font-weight-regular);margin:0}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .subgroup-container[_ngcontent-%COMP%]{margin-bottom:2.5rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .subgroup-container[_ngcontent-%COMP%]   .subgroup-name[_ngcontent-%COMP%]{font-size:var(--font-size-lg);font-weight:var(--font-weight-semi-bold);color:var(--text);margin:0 0 .5rem;padding-left:1rem;border-left:3px solid var(--general-red)}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .subgroup-container[_ngcontent-%COMP%]   .subgroup-description[_ngcontent-%COMP%]{color:var(--grey);font-size:var(--font-size-sm);margin:0 0 1rem;padding-left:1rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:2rem 5rem;margin-top:1.5rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]{min-width:0;display:flex;flex-direction:column;gap:.5rem;align-items:start;margin-bottom:.5rem;cursor:pointer;border-radius:8px;padding:.75rem;margin:-.75rem;transition:box-shadow .2s ease,transform .2s ease;text-decoration:none}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]:hover{box-shadow:0 4px 16px #0000001a;transform:translateY(-2px)}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-name-section[_ngcontent-%COMP%]{grid-column:1/-1;margin-bottom:0}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-name-section[_ngcontent-%COMP%]   .item-name[_ngcontent-%COMP%]{font-weight:var(--font-weight-regular);color:var(--text);margin:0;text-transform:uppercase;font-size:var(--font-size-med)}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]{min-width:0;width:100%;grid-column:1/-1;display:grid;grid-template-columns:140px 1fr;gap:12px}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]:not(:has(.item-image)){grid-template-columns:1fr}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-image[_ngcontent-%COMP%]{width:140px;height:140px;flex-shrink:0;background-color:var(--disabled-tile);border-radius:4px;overflow:hidden}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-description-section[_ngcontent-%COMP%]{min-width:0;display:flex;flex-direction:column}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-description-section[_ngcontent-%COMP%]   .item-description[_ngcontent-%COMP%]{font-size:var(--font-size-med);color:var(--text-unselected);margin:0 0 .75rem;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-weight:var(--font-weight-regular)}.item-main-content[_ngcontent-%COMP%]:not(:has(.item-image))   .menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-description-section[_ngcontent-%COMP%]   .item-description[_ngcontent-%COMP%]{max-width:none}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-description-section[_ngcontent-%COMP%]   .item-price[_ngcontent-%COMP%]{font-weight:var(--font-weight-regular);color:var(--text);margin-bottom:0}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-description-section[_ngcontent-%COMP%]   .item-size-prices[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.375rem .75rem;font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);color:var(--text)}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-description-section[_ngcontent-%COMP%]   .item-size-price[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:wrap;gap:.25rem;max-width:100%;overflow-wrap:anywhere;align-items:baseline}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-description-section[_ngcontent-%COMP%]   .item-size-label[_ngcontent-%COMP%]{color:var(--text-unselected);font-size:14px}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-description-section[_ngcontent-%COMP%]   .item-size-price-value[_ngcontent-%COMP%]{color:var(--text);font-size:16px}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .group-description-text[_ngcontent-%COMP%]{color:var(--text-unselected);margin:.5rem 0 1.5rem;line-height:1.5;font-weight:var(--font-weight-regular)}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .no-items[_ngcontent-%COMP%], .menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .no-groups[_ngcontent-%COMP%]{text-align:center;color:var(--grey);padding:2rem}@media (max-width: 1024px){.menu-container[_ngcontent-%COMP%]{padding:2rem 80px}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr);gap:1.5rem 2rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]{grid-template-columns:100px 1fr;gap:1rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-image[_ngcontent-%COMP%]{width:100px;height:100px}}@media (max-width: 768px){.menu-container[_ngcontent-%COMP%]{--category-scroll-offset: calc(60px + 5rem) ;padding:1.5rem 40px}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]{top:60px}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:2rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]{grid-template-columns:140px 1fr;gap:1rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-image[_ngcontent-%COMP%]{width:140px;height:140px}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-description-section[_ngcontent-%COMP%]   .item-description[_ngcontent-%COMP%]{font-size:var(--font-size-sm);-webkit-line-clamp:5;line-clamp:5}}@media (max-width: 480px){.menu-container[_ngcontent-%COMP%]{padding:1.5rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]{gap:.25rem;margin-bottom:1.5rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]   .tab-nav-button[_ngcontent-%COMP%]{width:24px;height:24px;font-size:1rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]   .tabs-navigation[_ngcontent-%COMP%]{gap:.5rem;padding:.75rem 0}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tabs-navigation-container[_ngcontent-%COMP%]   .tabs-navigation[_ngcontent-%COMP%]   .tab-button[_ngcontent-%COMP%]{padding:.4rem 1rem;font-size:.8rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:1rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]{gap:.5rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-name-section[_ngcontent-%COMP%]   .item-name[_ng
734content-%COMP%]{font-size:var(--font-size-med)}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]{grid-template-columns:140px 1fr;gap:.75rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-image[_ngcontent-%COMP%]{width:140px;height:140px}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-description-section[_ngcontent-%COMP%]   .item-description[_ngcontent-%COMP%]{font-size:var(--font-size-sm);padding-bottom:.25rem}.menu-container[_ngcontent-%COMP%]   .menu-content[_ngcontent-%COMP%]   .tab-content[_ngcontent-%COMP%]   .group-section[_ngcontent-%COMP%]   .items-grid[_ngcontent-%COMP%]   .item-card[_ngcontent-%COMP%]   .item-main-content[_ngcontent-%COMP%]   .item-description-section[_ngcontent-%COMP%]   .item-price[_ngcontent-%COMP%]{font-size:14px}}"]})}}return h})();var o0=[{question:"Where are you located?",answer:"We are located at [STORE_LOCATION]."},{question:"What are your hours?",answer:`Our store hours are:
735
736[STORE_HOURS]`},{question:"What ordering options are available?",answer:"[STORE_NAME] offers multiple ways to enjoy our food, including [ORDER_TYPES]."},{question:"Can I order online for pickup?",answer:"Absolutely! You can place your order online at [STORE_NAME] and pick it up at our location."},{question:"How do I contact you?",answer:"You can reach [STORE_NAME] at [STORE_PHONE] or visit us at [STORE_LOCATION]."},{question:"Do you have a rewards program?",answer:"Yes! Join our loyalty program and earn points on every purchase at [STORE_NAME]. Redeem your points for free items and exclusive offers."},{question:"Do you sell gift cards?",answer:"Yes, we offer both digital and physical gift cards in various denominations. They make great gifts and never expire."}];var r0={default_questions:{type:"array",objectInputType:[{key:"question",inputType:"select",options:["Where are you located?","What are your hours?","What ordering options are available?","Can I order online for pickup?","How do I contact you?","Do you have a rewards program?","Do you sell gift cards?"],type:{type:"string",data:""}}],data:[{question:"Where are you located?"},{question:"What are your hours?"},{question:"What ordering options are available?"},{question:"Can I order online for pickup?"},{question:"How do I contact you?"},{question:"Do you have a rewards program?"}]},custom_questions:{type:"array",objectInputType:[{key:"question",inputType:"input",type:{type:"string",data:""}},{key:"answer",inputType:"textarea",type:{type:"string",data:""}}],data:[]}};var wP=/<(script|style|iframe|object|embed|form|svg|math|head|noscript|template)\b[\s\S]*?<\/\1>/gi,MP=/<!--[\s\S]*?-->/g,PP=/<\/?([a-zA-Z][\w:-]*)(?:\s[^<>]*)?>/g,OP=new Set(["b","br","em","i","li","ol","p","span","strong","ul","u","a"]),SP=new Set(["http:","https:","mailto:","tel:"]),TP=/\s+([a-zA-Z][\w:-]*)\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]*))/g;function IP(h){let k={},n;for(;(n=TP.exec(h))!==null;){let c=n[1].toLowerCase();k[c]=n[2]||n[3]||n[4]||""}return k}function ls(h,k){return k?(h.sanitize(pf.HTML,k.replace(wP,"").replace(MP,""))??"").replace(PP,(c,d)=>{let a=d.toLowerCase();if(!OP.has(a))return"";if(c.startsWith("</"))return`</${a}>`;if(a==="a"){let z=IP(c),J="<a";return z.href&&EP(z.href)&&(J+=` href="${kP(z.href)}"`,J+=' rel="noopener noreferrer nofollow"'),J+">"}return a==="br"?"<br>":`<${a}>`}).trim():""}function kP(h){return h.replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function EP(h){let k=h.replace(/[\u0000-\u001F\u007F-\u009F]/g,"").trim();if(k==="")return!0;let n=k.match(/^([a-zA-Z][a-zA-Z\d+.-]*):/);return n?SP.has(n[1].toLowerCase()+":"):!0}var a0=(()=>{class h{constructor(){this.document=gt(Qa),this.defaultCountry="US",this.previewWordLimit=500,this.jsonLdScriptId="restaurant-json-ld",this.seoDataScriptId="seo-data"}buildSeoObjects(n,c,d=""){return{organization:this.getOrganizationLdJson(n),restaurants:this.getRestaurantLdJson(n),webSite:this.getWebSiteLdJson(n),breadcrumbList:this.getBreadcrumbListLdJson(n,c),seoData:this.getAiReadableJson(n,c,d)}}updateSeoScripts(n){if(!n){this.removeScript(this.jsonLdScriptId),this.removeScript(this.seoDataScriptId);return}let c=this.jsonLdGraph(n);c?this.upsertScript(this.jsonLdScriptId,"application/ld+json",this.serializeJson(c)):this.removeScript(this.jsonLdScriptId),this.upsertScript(this.seoDataScriptId,"application/json",this.serializeJson(n.seoData))}getOrganizationLdJson(n){let c=this.resolveSiteUrl(n),d=n.brand?.name,a=n.brand;if(!c||!d||(a?.stores??[]).length<=1)return;let z=this.absoluteUrl(n.theme.logo,c),J=this.socialLinks(a);return this.compactRecord({"@context":"https://schema.org","@type":"Organization","@id":`${c}#organization`,name:d,url:c,logo:z,image:z,telephone:a?.phone,sameAs:J.length?J:void 0})}getRestaurantLdJson(n){let c=this.resolveSiteUrl(n),d=n.brand?.name;if(!c||!d)return[];let a=n.brand,z=a?.stores??[],J=z[0],yt=this.absoluteUrl(n.theme.logo,c),ie=this.postalAddress(J,a),ee=this.socialLinks(a),bt=this.seoGeneralValues(n),ne=bt.cuisine,Ve=bt.priceRange??"$$";return z.length>1?z.filter(tn=>this.hasValidPostalAddress(tn,a)).map((tn,_n)=>this.storeRestaurantNode(tn,n,c,_n,`${c}#organization`,bt)):this.hasValidPostalAddress(J,a)?[this.compactRecord({"@context":"https://schema.org","@type":"Restaurant","@id":`${c}#restaurant`,name:d,url:c,logo:yt,image:yt,telephone:J?.telephone||a?.phone,address:ie,geo:this.geoCoordinates(J),openingHoursSpecification:this.openingHours(J),hasMenu:z.length===1?J?.baseUrl:void 0,servesCuisine:ne,priceRange:Ve,sameAs:ee.length?ee:void 0})]:[]}getWebSiteLdJson(n){let c=this.resolveSiteUrl(n),d=n.brand?.name;if(!c||!d)return;let a=(n.brand?.stores??[]).length>1?`${c}#organization`:`${c}#restaurant`;return this.compactRecord({"@context":"https://schema.org","@type":"WebSite","@id":`${c}#website`,name:d,url:c,publisher:{"@id":a},inLanguage:"en-US"})}getBreadcrumbListLdJson(n,c){let d=this.resolveSiteUrl(n);if(!d)return;let a=[{"@type":"ListItem",position:1,name:"Home",item:d}];return c?.path&&c.path!=="home"&&a.push({"@type":"ListItem",position:2,name:c.displayName||c.title,item:this.pageUrl(d,c.path)}),{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:a}}getAiReadableJson(n,c,d=""){let a=this.resolveSiteUrl(n),z=this.pageTitle(n,c),J=this.componentText(c?.components??[]),yt=z?[z]:[],ie=this.locationSummaries(n.brand),ee=this.keyEntities(n,c,J),bt=this.previewText([z,d,...yt,...J,...ie.map(ne=>
736[ne.name,ne.address,ne.city,ne.state,ne.telephone].filter(Boolean).join(", "))]);return{pageTitle:z,metaDescription:d,mainHeadings:yt,plainTextPreview:bt,keyEntities:ee,links:this.linkSummary(n,c,a),locations:ie}}storeRestaurantNode(n,c,d,a,z,J=this.seoGeneralValues(c)){let yt=this.absoluteUrl(c.theme.logo,d),ie=c.brand,ee=this.socialLinks(ie),bt=J.cuisine,ne=J.priceRange??"$$";return this.compactRecord({"@context":"https://schema.org","@type":"Restaurant","@id":`${d}#restaurant-${this.nodeId(n,a)}`,name:n.name||c.brand?.name,url:n.baseUrl,logo:yt,image:yt,telephone:n.telephone,address:this.postalAddress(n,c.brand),geo:this.geoCoordinates(n),openingHoursSpecification:this.openingHours(n),hasMenu:n.baseUrl,servesCuisine:bt,priceRange:ne,sameAs:ee.length?ee:void 0,parentOrganization:z?{"@id":z}:void 0})}seoGeneralValues(n){let c=n.theme["seo-general"]??n.theme.seoGeneral;if(!this.isRecord(c))return{};let d=this.isRecord(c.data)?c.data:c;return{cuisine:this.normalizeSeoStringList(d.servesCuisine)??this.normalizeSeoStringList(d.cuisine),priceRange:this.normalizeSeoString(d.priceRange)}}normalizeSeoString(n){let c=this.extractValue(n);return typeof c=="string"&&c.trim()||void 0}normalizeSeoStringList(n){let c=this.extractValue(n);if(Array.isArray(c)){let d=c.map(a=>typeof a=="string"?a.trim():"").filter(Boolean);return d.length?d:void 0}return this.normalizeSeoString(c)}extractValue(n){return this.isRecord(n)&&"data"in n?n.data:n}hasValidPostalAddress(n,c){return!!(n?.address||c?.address||n?.city||c?.city)}postalAddress(n,c){let d=n?.address||c?.address,a=n?.city||c?.city,z=n?.state||c?.state,J=n?.zip;if(!(!d&&!a&&!z&&!J))return this.compactRecord({"@type":"PostalAddress",streetAddress:d,addressLocality:a,addressRegion:z,postalCode:J,addressCountry:this.defaultCountry})}geoCoordinates(n){if(!(typeof n?.lat!="number"||typeof n.lng!="number"))return{"@type":"GeoCoordinates",latitude:n.lat,longitude:n.lng}}openingHours(n){let c=n?.storeHours;if(!c)return;let d=Object.entries(c).flatMap(([a,z])=>(z??[]).map(J=>this.openingHoursSpec(J,a)).filter(J=>!!J));return d.length?d:void 0}openingHoursSpec(n,c){if(n.closed)return;let d=this.normalizeDay(n.day||c),a=this.normalizeTime(n.openTime),z=this.normalizeTime(n.closeTime);if(!(!d||!a||!z))return{"@type":"OpeningHoursSpecification",dayOfWeek:d,opens:a,closes:z}}normalizeDay(n){if(!n)return;let c=n.trim().toLowerCase();return{sunday:"Sunday",sun:"Sunday",monday:"Monday",mon:"Monday",tuesday:"Tuesday",tue:"Tuesday",tues:"Tuesday",wednesday:"Wednesday",wed:"Wednesday",thursday:"Thursday",thu:"Thursday",thur:"Thursday",thurs:"Thursday",friday:"Friday",fri:"Friday",saturday:"Saturday",sat:"Saturday"}[c]??void 0}normalizeTime(n){if(!n)return;let c=n.trim(),d=c.match(/^(\d{1,2})(?::?(\d{2}))?(?::\d{2})?\s*([ap]\.?m\.?)?$/i);if(!d||!c.includes(":")&&!d[3])return;let a=Number(d[1]),z=Number(d[2]??0),J=d[3]?.toLowerCase().replace(/\./g,"");if(!(Number.isNaN(a)||Number.isNaN(z)||z>59)&&(J==="pm"&&a<12&&(a+=12),J==="am"&&a===12&&(a=0),!(a>23)))return`${a.toString().padStart(2,"0")}:${z.toString().padStart(2,"0")}`}resolveSiteUrl(n){return n.brand?.staticSiteAddress??void 0}absoluteUrl(n,c){if(n)return new URL(n,`${c}/`).toString()}pageUrl(n,c){let d=this.routePath(c);return d==="/"?n:`${n}${d}`}routePath(n){let c=String(n||"").trim().replace(/^\/+/,"").replace(/[?#].*$/,"");return!c||c==="home"?"/":`/${c.split("/").filter(Boolean).map(d=>encodeURIComponent(d)).join("/")}`}pageTitle(n,c){let d=c?.seoTitle?.trim();if(d)return d;let a=n.brand?.name,z=c?.title==="Home"?"":c?.title,J=this.titleLocation(n.brand);
736return[a,z,J].filter(Boolean).join(" | ")}titleLocation(n){if(n?.stores?.length!==1)return;let c=n.stores[0];return[c.city||n.city,c.state||n.state].filter(Boolean).join(", ")||void 0}componentText(n){let c=[];return n.forEach(d=>{this.collectStrings(d.data,c,{headingOnly:!1,currentKey:""}),this.collectStrings(d.children,c,{headingOnly:!1,currentKey:""})}),[...new Set(c)].slice(0,80)}collectStrings(n,c,d){if(typeof n=="string"){let a=this.cleanText(n);this.shouldCollectString(a,d)&&c.push(a);return}if(Array.isArray(n)){n.forEach(a=>{this.collectStrings(a,c,d)});return}this.isRecord(n)&&Object.entries(n).forEach(([a,z])=>{this.collectStrings(z,c,{headingOnly:d.headingOnly,currentKey:a})})}shouldCollectString(n,c){if(!n||n.length<2)return!1;let d=c.currentKey.toLowerCase();return new Set(["selector","type","inputtype","layout","layoutoption","backgroundcolor","textcolor","fontsize","fontweight","width","height","color","icon","option","source"]).has(d)||/^option\s+\d+$/i.test(n)||this.looksLikeUrl(n)||this.isAssetUrl(n)||this.looksLikeColor(n)?!1:c.headingOnly?/title|heading|headline|label|name/i.test(d):!0}linkSummary(n,c,d){let a=[],z=[];d&&n.theme.routes.forEach(yt=>{a.push({label:yt.displayName||yt.title||yt.path,url:this.pageUrl(d,yt.path)})});let J=n.brand;return J?.stores?.forEach(yt=>{let ie=yt.baseUrl;ie&&z.push({label:`${yt.name||J.name} menu and ordering`,url:ie})}),this.socialLinks(J).forEach(yt=>{z.push({label:"Social media",url:yt})}),[J?.privacyPolicyUrl,J?.termsAndConditionsUrl,J?.androidAppId?`https://play.google.com/store/apps/details?id=${J.androidAppId}`:void 0,J?.iOSAppId?`https://apps.apple.com/app/id${J.iOSAppId}
736`:void 0].forEach(yt=>{let ie=yt?.trim();!ie||this.isAssetUrl(ie)||(d&&ie.startsWith(d)?a.push({label:"Internal link",url:ie}):z.push({label:"External link",url:ie}))}),{internal:this.uniqueLinks(a),external:this.uniqueLinks(z)}}keyEntities(n,c,d){let a=n.brand,z=a?.plans??[],J=[n.brand?.name,c?.displayName,c?.title,...(a?.stores??[]).flatMap(yt=>[yt.name,yt.city,yt.state,yt.zip]),...(a?.orderTypes??[]).map(yt=>this.orderTypeName(yt)),...z.flatMap(yt=>this.planEntities(yt)),...d.filter(yt=>/\$\d|\d+\.\d{2}/.test(yt))];return[...new Set(J.filter(yt=>!!yt))].slice(0,80)}orderTypeName(n){return n.displayName||n.type}planEntities(n){return[n.name,...n.rules.map(c=>c.name),...n.planAwards.map(c=>this.awardName(c)),...n.thirdPartyAwards.map(c=>this.thirdPartyAwardName(c))]}awardName(n){return[n.name,n.description].filter(Boolean).join(" - ")}thirdPartyAwardName(n){return[n.displayName,n.description].filter(Boolean).join(" - ")}locationSummaries(n){return(n?.stores??[]).map(c=>this.compactRecord({name:c.name||n?.name,address:c.address,city:c.city,state:c.state,postalCode:c.zip,telephone:c.telephone,url:c.baseUrl}))}previewText(n){let d=this.cleanText(n.filter(Boolean).join(" ")).split(/\s+/).filter(Boolean);return d.length<=this.previewWordLimit?d.join(" "):d.slice(0,this.previewWordLimit).join(" ")}socialLinks(n){return[...new Set((n?.socialMediaLinks??[]).map(c=>c.socialMediaUrl).filter(c=>!!c))]}nodeId(n,c){return String(n.urlName||n.id||c+1).trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}cleanText(n){return n.replace(/<[^>]*>/g," ").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/\s+/g," ").trim()}looksLikeUrl(n){return/^(https?:)?\/\//i.test(n)||/^[a-z][a-z0-9+.-]*:/i.test(n)}looksLikeColor(n){return/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(n)||/^rgb(a)?\(/i.test(n)||/^\d{1,3},\s*\d{1,3},\s*\d{1,3}$/.test(n)}isAssetUrl(n){return/\/assets\//i.test(n)||/\.(avif|gif|jpe?g|png|svg|webp|mp4|webm)(\?|$)/i.test(n)}compactRecord(n){return Object.entries(n).reduce((c,[d,a])=>{let z=this.compactValue(a);return this.isEmptyValue(z)||(c[d]=z),c},{})}compactValue(n){if(Array.isArray(n)){let c=n.map(d=>this.compactValue(d)).filter(d=>!this.isEmptyValue(d));return c.length?c:void 0}return this.isRecord(n)?this.compactRecord(n):n}isEmptyValue(n){return n==null?!0:typeof n=="string"?n.trim()==="":Array.isArray(n)?n.length===0:this.isRecord(n)?Object.keys(n).length===0:!1}isRecord(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}uniqueLinks(n){let c=new Set;return n.filter(d=>c.has(d.url)?!1:(c.add(d.url),!0))}jsonLdGraph(n){let c=[n.organization,...n.restaurants,n.webSite,n.breadcrumbList].filter(d=>!!d).map(d=>this.omitContext(d));if(c.length)return{"@context":"https://schema.org","@graph":c}}omitContext(n){return Object.fromEntries(Object.entries(n).filter(([c])=>c!=="@context"))}upsertScript(n,c,d){let a=this.document.getElementById(n),z=a??this.document.createElement("script");z.setAttribute("id",n),z.setAttribute("type",c),a?.textContent!==d&&(z.textContent=d,a||this.document.head.appendChild(z))}removeScript(n){this.document.getElementById(n)?.remove()}injectJsonLdSchema(n,c){let d=this.serializeJson(c);this.upsertScript(n,"application/ld+json",d)}removeJsonLdSchema(n){this.removeScript(n)}serializeJson(n){return JSON.stringify(n).replace(/</g,"\\u003c")}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275prov=zn({token:h,factory:h.\u0275fac,providedIn:"root"})}}return h})();function AP(h,k){if(h&1&&(I(0,"p",5),X(1),I(2,"a",9),X(3),E()()),h&2){let n=A(2);w(),Rt(" ",n.localizationService.getLocalizationString("route.faq.contact_text")," "),w(),hf("href","tel:",n.storePhoneRaw(),"",Se),w(),St(n.storePhone())}}function LP(h,k){if(h&1&&(I(0,"div",21),X(1),E()),h&2){let n=k.$implicit;w(),Qn("",n.days,": ",n.time,"")}}function DP(h,k){if(h&1&&(I(0,"div",19),le(1,LP,2,2,"div",21,Ce),E()),h&2){let n=A(5);w(),ce(n.storeHoursGroups())}}function FP(h,k){if(h&1&&it(0,"p",20),h&2){let n=A(2).$implicit;j("innerHTML",n.answer,Ti)}}function RP(h,k){if(h&1){let n=Yt();I(0,"div",13)(1,"h3",14)(2,"button",15),Ot("click",function(){kt(n);let d=A().$index,a=A(3);return Et(a.toggleItem(d))}),I(3,"span",16),X(4),E(),it(5,"app-icon",17),E()(),I(6,"div",18),ut(7,DP,3,0,"div",19)(8,FP,1,1,"p",20),E()()}if(h&2){let n,c=A(),d=c.$implicit,a=c.$index,z=A(3);Ie("expanded",z.isExpanded(a)),w(2),j("id",z.getFaqQuestionId(a)),qt("aria-expanded",z.isExpanded(a))("aria-controls","faq-answer-"+a),w(2),St(d.question),w(),j("name",z.iconName.arrow),w(),Ie("open",z.isExpanded(a)),j("id","faq-answer-"+a),qt("aria-labelledby","faq-question-"+a),w(),rt(d.question==="What are your hours?"&&((n=z.storeHoursGroups())!=null&&n.length)?7:8)}}function BP(h,k){if(h&1&&ut(0,RP,9,12,"div",12),h&2){let n=k.$index;rt(n%2===0?0:-1)}}function NP(h,k){if(h&1&&(I(0,"div",21),X(1),E()),h&2){let n=k.$implicit;w(),Qn("",n.days,": ",n.time,"")}}function VP(h,k){if(h&1&&(I(0,"div",19),le(1,NP,2,2,"div",21,Ce),E()),h&2){let n=A(5);w(),ce(n.storeHoursGroups())}}function jP(h,k){if(h&1&&it(0,"div",20),h&2){let n=A(2).$implicit;j("innerHTML",n.answer,Ti)}}function UP(h,k){if(h&1){let n=Yt();I(0,"div",13)(1,"h3",14)(2,"button",15),Ot("click",function(){kt(n);let d=A().$index,a=A(3);return Et(a.toggleItem(d))}),I(3,"span",16),X(4),E(),it(5,"app-icon",17),E()(),I(6,"div",18),ut(7,VP,3,0,"div",19)(8,jP,1,1,"div",20),E()()}if(h&2){let n,c=A(),d=c.$implicit,a=c.$index,z=A(3);Ie("expanded",z.isExpanded(a)),w(2),j("id",z.getFaqQuestionId(a)),qt("aria-expanded",z.isExpanded(a))("aria-controls","faq-answer-"+a),w(2),St(d.question),w(),j("name",z.iconName.arrow),w(),Ie("open",z.isExpanded(a)),j("id","faq-answer-"+a),qt("aria-labelledby","faq-question-"+a),w(),rt(d.question==="What are your hours?"&&((n=z.storeHoursGroups())!=null&&n.length)?7:8)}}function $P(h,k){if(h&1&&ut(0,UP,9,12,"div",12),h&2){let n=k.$index;rt(n%2===1?0:-1)}}function GP(h,k){if(h&1&&(I(0,"div",10)(1,"div",11),le(2,BP,1,1,null,null,Ce),E(),I(4,"div",11),le(5,$P,1,1,null,null,Ce),E()()),h&2){let n=A(2);Ie("hidden",!n.faqExpanded),qt("aria-label","FAQ Questions"),w(2),ce(n.data().items),w(3),ce(n.data().items)}}function ZP(h,k){if(h&1){let n=Yt();I(0,"section",0)(1,"section",1)(2,"div",2)(3,"div",3)(4,"div")(5,"h2",4),X(6),E(),ut(7,AP,4,4,"p",5),E(),I(8,"button",6),Ot("click",function(){kt(n);let d=A();return Et(d.toggleFaqVisibility())}
736),it(9,"app-icon",7),E()()(),ut(10,GP,7,3,"div",8),E()()}if(h&2){let n=A();w(),qt("aria-labelledby","faq-title"),w(4),j("id","faq-title"),w(),Rt(" ",n.localizationService.getLocalizationString("route.faq.title"),""),w(),rt(n.storePhone()?7:-1),w(),qt("aria-expanded",n.faqExpanded)("aria-label",n.faqExpanded?"Collapse all FAQ questions":"Expand all FAQ questions"),w(),Ie("rotated",n.faqExpanded),j("name",n.iconName.plusButton),w(),rt(n.data().items&&n.data().items.length>0?10:-1)}}var s0=(()=>{class h{constructor(n,c){this.componentConfig=n,this.seoScriptsService=c,this.expandedIndex=null,this.faqExpanded=!1,this.iconName=ge,this.localizationService=gt(un),this.sanitizer=gt(Zo),this.brandConfigService=gt(Ee),this.brandConfig=this.brandConfigService.brandConfig,this.singleStore=this.brandConfigService.singleStore,this.storeData=this.brandConfigService.storeData,this.weekdayOrder=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],this.storePhoneRaw=Ut(()=>this.singleStore()?.telephone??this.brandConfig()?.phone??""),this.storePhone=Ut(()=>Dr(this.storePhoneRaw())),this.storeInfo=Ut(()=>{let d=this.singleStore(),a=this.brandConfig();return d?{name:d.name||"",address:d.address||"",city:d.city||"",state:d.state||"",zip:d.zip||"",orderTypes:d.orderTypes||[]}:{name:a?.name||"",address:a?.address||"",city:a?.city||"",state:a?.state||"",zip:"",orderTypes:a?.orderTypes||[]}}),this.groupStoreHours=Ut(()=>{let d=this.storeData();if(!d?.storeHours)return;let a=[...d.storeHours.any].sort((J,yt)=>this.getWeekdayIndex(J.day)-this.getWeekdayIndex(yt.day)),z={};for(let J of a){let yt=J?.openTime&&J?.closeTime?`${wn(J.openTime)} - ${wn(J.closeTime)}`:"Closed";(z[yt]??=[]).push(J.day)}return Object.entries(z).map(([J,yt])=>({days:this.formatDays(yt),time:J}))}),this.formattedStoreHours=Ut(()=>{let d=this.groupStoreHours();return d?d.map(a=>`${a.days}: ${a.time}`).join(`
737`):"Please visit our stores to view their hours."}),this.formattedOrderTypes=Ut(()=>{let d=this.storeInfo().orderTypes;if(!d||d.length===0)return"";let a=d.map(z=>z.displayName||z.type).map(z=>z.charAt(0).toUpperCase()+z.slice(1).toLowerCase());return a.length===1?a[0]:a.length===2?`${a[0]} and ${a[1]}`:`${a.slice(0,-1).join(", ")} and ${a[a.length-1]}`}),this.formattedStoreLocation=Ut(()=>{let d=this.storeInfo();return[d.address,d.city,d.state,d.zip].filter(Boolean).join(", ")}),this.storeHoursGroups=Ut(()=>this.groupStoreHours()),this.data=Ut(()=>{let d=this.componentConfig?.data?.default_questions?.data??r0.default_questions.data,a=this.componentConfig?.data?.custom_questions?.data??[],z=this.storeInfo(),J=(this.brandConfig()?.plans?.length??0)>0,yt=d?.map(Ve=>o0.find(_n=>_n.question===Ve.question)||{question:Ve.question,answer:""})||[];J||(yt=yt.filter(Ve=>Ve.question!=="Do you have a rewards program?"));let ie=a?.map(Ve=>({question:Ve.question,answer:Ve.answer}))||[],ee=[...yt,...ie],bt=(Ve,tn)=>{if(tn==="What are your hours?")return this.formattedStoreHours();if(tn==="Where are you located?"&&!z.address)return"Explore our stores locations in the locations page.";if(tn==="How do I contact you?"){if(!z.address&&!this.storePhone())return"Visit our stores in the locations page and find out how to contact us.";if(!z.address&&this.storePhone())return`You can reach ${z.name||"[STORE_NAME]"} at ${this.storePhone()}.`;if(z.address&&!this.storePhone())return`You can visit us at ${this.formattedStoreLocation()}.`}return Ve.replace(/\[STORE_NAME\]/g,z.name||"").replace(/\[STORE_ADDRESS\]/g,z.address||"").replace(/\[STORE_CITY\]/g,z.city||"").replace(/\[STORE_STATE\]/g,z.state||"").replace(/\[STORE_ZIP\]/g,z.zip||"").replace(/\[STORE_LOCATION\]/g,this.formattedStoreLocation()).replace(/\[STORE_PHONE\]/g,this.storePhone()||"").replace(/\[STORE_HOURS\]/g,this.formattedStoreHours()||"Please call for hours").replace(/\[ORDER_TYPES\]/g,this.formattedOrderTypes()||"dine-in, pickup, and delivery")};return{items:ee?.map(Ve=>cn(te({},Ve),{answer:ls(this.sanitizer,bt(Ve.answer,Ve.question))}))||[]}}),this.jsonLdSchema=Ut(()=>{let d=this.data().items;return!d||d.length===0?null:{"@context":"https://schema.org","@type":"FAQPage",mainEntity:d.map(z=>
737({"@type":"Question",name:z.question,acceptedAnswer:{"@type":"Answer",text:z.answer}}))}}),ii(()=>{let d=this.jsonLdSchema();d?this.seoScriptsService.injectJsonLdSchema("faq-json-ld",d):this.seoScriptsService.removeJsonLdSchema("faq-json-ld")})}toggleItem(n){this.expandedIndex=this.expandedIndex===n?null:n}isExpanded(n){return this.expandedIndex===n}toggleFaqVisibility(){this.faqExpanded=!this.faqExpanded}getFaqQuestionId(n){return`faq-question-${n}`}formatDays(n){if(n.length===1)return this.capitalize(n[0]);let c=this.capitalize(n[0]),d=this.capitalize(n[n.length-1]);return n.length===2?`${c} - ${d}`:`${c} - ${d}`}capitalize(n){return n.charAt(0).toUpperCase()+n.slice(1)}getWeekdayIndex(n){let c=this.weekdayOrder.indexOf(n.toLowerCase());return c===-1?this.weekdayOrder.length:c}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8),se(a0))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-faq"]],standalone:!0,features:[Kt],decls:1,vars:1,consts:[[1,"faq-wrapper"],["role","region",1,"faq-container"],[1,"faq-header"],[1,"header-content"],[1,"faq-title",3,"id"],[1,"faq-description"],["type","button",1,"faq-toggle-btn",3,"click"],["aria-hidden","true",1,"plus-icon",3,"name"],["role","region",1,"faq-items-wrapper",3,"hidden"],[1,"phone-link",3,"href"],["role","region",1,"faq-items-wrapper"],[1,"faq-items-column"],[1,"faq-item",3,"expanded"],[1,"faq-item"],[1,"faq-question-heading"],["type","button",1,"faq-question",3,"click","id"],[1,"question-text"],["aria-hidden","true",1,"toggle-icon",3,"name"],["role","region",1,"faq-answer",3,"id"],[1,"store-hours"],[3,"innerHTML"],[1,"hours-line"]],template:function(c,d){c&1&&ut(0,ZP,11,10,"section",0),c&2&&rt(d.data()?0:-1)},dependencies:[ve,Ae],styles:[".faq-wrapper[_ngcontent-%COMP%]{background-color:var(--white)}.faq-container[_ngcontent-%COMP%]{width:100%;max-width:1400px;margin:0 auto;padding:2rem 1rem;background-color:var(--white)}@media (max-width: 768px){.faq-container[_ngcontent-%COMP%]{padding:40px 0rem}}.faq-header[_ngcontent-%COMP%]{margin-bottom:3rem}@media (max-width: 768px){.faq-header[_ngcontent-%COMP%]{margin-bottom:0;padding:0 2rem}}.header-content[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:flex-start;gap:1rem;text-align:center}@media (max-width: 768px){.header-content[_ngcontent-%COMP%]{align-items:center;justify-content:space-between;text-align:left}}.faq-title[_ngcontent-%COMP%]{font-size:2rem;font-weight:600;margin:0 0 1rem;color:var(--text)}@media (max-width: 768px){.faq-title[_ngcontent-%COMP%]{font-size:1.5rem}}.faq-description[_ngcontent-%COMP%]{font-size:14px;color:var(--text);margin:0;font-weight:var(--font-weight-regular)}.faq-description[_ngcontent-%COMP%]   .phone-link[_ngcontent-%COMP%]{color:inherit;cursor:pointer;text-decoration:underline}.faq-items-wrapper[_ngcontent-%COMP%]{display:flex;gap:0;width:100%}@media (max-width: 1400px){.faq-items-wrapper[_ngcontent-%COMP%]{flex-direction:column}}@media (max-width: 768px){.faq-items-wrapper.hidden[_ngcontent-%COMP%]{display:none}}.faq-items-column[_ngcontent-%COMP%]{flex:1}@media (max-width: 1400px){.faq-items-column[_ngcontent-%COMP%]{flex:1 100%}}.faq-item[_ngcontent-%COMP%]{overflow:hidden;transition:all .3s ease;border-bottom:1px solid var(--text);margin:0 2rem}.faq-question-heading[_ngcontent-%COMP%]{margin:0;font-size:inherit}.faq-question[_ngcontent-%COMP%]{width:100%;padding:1rem 0;border:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;font-weight:var(--font-weight-medium);color:var(--text);transition:all .3s ease;background:var(--white)}.faq-question[_ngcontent-%COMP%]   .question-text[_ngcontent-%COMP%]{text-align:left;flex:1}.faq-question[_ngcontent-%COMP%]   .toggle-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:12px;height:6px;flex-shrink:0;margin-left:1rem;transition:transform .3s ease;color:#666}.faq-question[_ngcontent-%COMP%]   .toggle-icon[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:100%;height:100%}.faq-question[aria-expanded=true][_ngcontent-%COMP%]   .toggle-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}.faq-answer[_ngcontent-%COMP%]{max-height:0;opacity:0;overflow:hidden;padding:0;transition:max-height .3s ease,opacity .3s ease,padding .3s ease}.faq-answer[_ngcontent-%COMP%]   p[_ngcontent-%COMP%], .faq-answer[_ngcontent-%COMP%]   .store-hours[_ngcontent-%COMP%]{margin:0;font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);color:var(--grey);line-height:1.8}.faq-answer[_ngcontent-%COMP%]   .hours-line[_ngcontent-%COMP%]{margin:.5rem 0}.faq-answer[_ngcontent-%COMP%]   .hours-line[_ngcontent-%COMP%]:first-child{margin-top:0}.faq-answer.open[_ngcontent-%COMP%]{max-height:500px;opacity:1;padding:0 0 1rem}.faq-toggle-btn[_ngcontent-%COMP%]{display:none;background:none;border:none;cursor:pointer;padding:0;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;align-self:flex-start}@media (max-width: 768px){.faq-toggle-btn[_ngcontent-%COMP%]{display:flex}}.plus-icon[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:300;color:var(--text);transition:transform .3s ease}.plus-icon.rotated[_ngcontent-%COMP%]{transform:rotate(45deg)}"]})}}return h})();var l0={boxes:{type:"array",objectInputType:[{key:"type",relatedComponent:["image","text","video"],inputType:"select",options:["image","text","video"],type:{type:"string",data:"text"}},{key:"image",relatedComponent:"image",inputType:"image",type:{type:"image",data:{url:"assets/images/default-theme-images/tasty-italian-pizza-with-tomato-sauce-parmesan_1220-4259.avif",altText:"Italian pizza with tomato sauce"}}},{key:"video",relatedComponent:"video",inputType:"video",type:{type:"video",data:{url:""}}},{key:"title",relatedComponent:["image","text","video"],inputType:"input",type:{type:"string",data:"Fresh Ingredients"}},{key:"description",relatedComponent:["image","text","video"],inputType:"textarea",type:{type:"string",data:"Prepared daily with quality ingredients and consistent care."}},{key:"textColor",relatedComponent:["image","text","video"],inputType:"color",type:{type:"string",data:"#222222"}},{key:"backgroundColor",relatedComponent:"text",inputType:"color",type:{type:"string",data:"#ffffff"}},{key:"boxUrl",relatedComponent:["image","text","video"],inputType:"input",type:{type:"string",data:""}}],data:[{type:"text",title:"Fresh Ingredients",description:"Prepared daily with quality ingredients and consistent care.",textColor:"#222222",backgroundColor:"#ffffff",boxUrl:""},{type:"text",title:"Easy Ordering",description:"Order ahead for pickup or delivery whenever it works for you.",textColor:"#222222",backgroundColor:"#ffffff",boxUrl:""},{type:"image",image:{url:"assets/images/default-theme-images/tasty-italian-pizza-with-tomato-sauce-parmesan_1220-4259.avif",altText:"Italian pizza with tomato sauce"},boxUrl:""},{type:"text",title:"Customer Favorites",description:"A menu built around reliable classics and popular choices.",textColor:"#222222",backgroundColor:"#ffffff",boxUrl:""}]}};function HP(h,k){if(h&1&&it(0,"video",4),h&2){let n=A().$implicit,c=A(2);j("src",c.getVideoUrl(n),Se)("muted",!0)}}function qP(h,k){if(h&1&&(I(0,"h2",6),X(1),E()),h&2){let n=A().$implicit;w(),St(n.title)}}function WP(h,k){if(h&1&&it(0,"div",7),h&2){let n=A().$implicit;j("innerHTML",n.sanitizedDescription,Ti)}}function XP(h,k){if(h&1){let n=Yt();I(0,"a",3),Ot("click",function(d){let a=kt(n).$implicit,z=A(2);return Et(z.onBoxClick(a,d))}),ut(1,HP,1,2,"video",4),I(2,"div",5),ut(3,qP,2,1,"h2",6)(4,WP,1,1,"div",7),E()()}if(h&2){let n=k.$implicit,c=A(2);
737ue("background-image",c.isImageBox(n)?c.getBackgroundImage(n):"")("background-color",c.getBackgroundColor(n))("color",c.getTextColor(n)),Ie("highlight-horizontal-row__box--action",c.isActionBox(n))("highlight-horizontal-row__box--image",c.isImageBox(n))("highlight-horizontal-row__box--video",c.isVideoBox(n))("highlight-horizontal-row__box--media-with-text",c.isMediaBox(n)&&c.hasTextContent(n)),qt("href",c.getBoxHref(n),Se)("role",c.isActionBox(n)?"button":null)("aria-label",c.isImageBox(n)&&!n.title&&!n.description?c.getAltText(n):null),w(),rt(c.isVideoBox(n)?1:-1),w(2),rt(n.title?3:-1),w(),rt(n.description?4:-1)}}function KP(h,k){if(h&1&&(I(0,"section",1),le(1,XP,5,20,"a",2,Ce),E()),h&2){let n=A();ue("--box-count",n.boxes.length)("--box-gap",n.boxes.length===2?"1.5rem":"1rem")("--tablet-box-count",n.boxes.length>1?2:1),Ie("highlight-horizontal-row--tablet-center-last",n.boxes.length>1&&n.boxes.length%2===1),qt("data-box-count",n.boxes.length),w(),ce(n.boxes)}}var YP=4,d0=(()=>{class h{constructor(n,c,d){this.sanitizer=n,this.macroReplacementService=c,this.componentConfig=d,this.boxes=[];let a=this.componentConfig?.data?.boxes??l0.boxes,z=Array.isArray(a.data)?a.data:[];this.boxes=z.slice(0,YP).map(J=>cn(te({},J),{content:J.type??"text",sanitizedDescription:this.sanitizeHtml(J.description)})),this.data={boxes:cn(te({},a),{data:this.boxes})}}isImageBox(n){return n.type==="image"&&!!n.image?.url}isVideoBox(n){return n.type==="video"&&!!n.video?.url}isMediaBox(n){return this.isImageBox(n)||this.isVideoBox(n)}hasTextContent(n){return!!(n.title?.trim()||n.description?.trim())}getImageUrl(n){return n.image?.url??""}getVideoUrl(n){return n.video?.url??""}getBackgroundImage(n){let c=this.getImageUrl(n);return c?`url("${c.replace(/"/g,'\\"')}")`:""}getAltText(n){return n.image?.altText??""}getTextColor(n){return n.textColor??(this.isMediaBox(n)?"var(--white)":"var(--text)")}getBackgroundColor(n){return n.backgroundColor??"var(--white)"}getSanitizedDescription(n){return this.sanitizeHtml(n)}getBoxUrlResolution(n){return this.macroReplacementService.resolveUrl(n.boxUrl)}isActionBox(n){return this.getBoxUrlResolution(n).kind==="action"}getBoxHref(n){let c=this.getBoxUrlResolution(n);return c.kind==="url"&&c.value||null}onBoxClick(n,c){let d=this.getBoxUrlResolution(n);d.kind==="action"&&(c.preventDefault(),d.run())}sanitizeHtml(n){return ls(this.sanitizer,n)}static{this.\u0275fac=function(c){return new(c||h)(se(Zo),se(ss),se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-highlight-horizontal-row"]],standalone:!0,features:[Kt],decls:1,vars:1,consts:[["aria-label","Highlights",1,"highlight-horizontal-row",3,"highlight-horizontal-row--tablet-center-last","--box-count","--box-gap","--tablet-box-count"],["aria-label","Highlights",1,"highlight-horizontal-row"],[1,"highlight-horizontal-row__box",3,"highlight-horizontal-row__box--action","highlight-horizontal-row__box--image","highlight-horizontal-row__box--video","highlight-horizontal-row__box--media-with-text","backgroundImage","backgroundColor","color"],[1,"highlight-horizontal-row__box",3,"click"],["autoplay","","loop","","playsinline","","preload","metadata",1,"highlight-horizontal-row__video",3,"src","muted"],[1,"highlight-horizontal-row__content"],[1,"highlight-horizontal-row__title"],[1,"highlight-horizontal-row__description",3,"innerHTML"]],template:function(c,d){c&1&&ut(0,KP,3,9,"section",0),c&2&&rt(d.boxes.length?0:-1)},styles:['[_nghost-%COMP%]{display:block;background:var(--white)}.highlight-horizontal-row[_ngcontent-%COMP%]{--highlight-horizontal-padding: 52px;--box-count: 1;--box-gap: 1rem;--box-max-width: 960px;--tablet-box-count: 1;width:100%;margin-inline:auto;display:grid;grid-template-columns:minmax(0,var(--box-max-width));justify-content:safe center;gap:var(--box-gap);box-sizing:border-box;padding:2rem var(--highlight-horizontal-padding);overflow-x:auto}.highlight-horizontal-row[data-box-count="2"][_ngcontent-%COMP%]{--box-max-width: 544px}.highlight-horizontal-row[data-box-count="3"][_ngcontent-%COMP%]{--box-max-width: 480px}.highlight-horizontal-row[data-box-count="4"][_ngcontent-%COMP%]{--box-max-width: 400px}@media (max-width: 767px){.highlight-horizontal-row[_ngcontent-%COMP%]{--highlight-horizontal-padding: 1rem}.highlight-horizontal-row[data-box-count="2"][_ngcontent-%COMP%]{--box-max-width: 100%}}@media (min-width: 768px){.highlight-horizontal-row[_ngcontent-%COMP%]{grid-template-columns:repeat(var(--tablet-box-count),minmax(0,var(--box-max-width)))}}@media (min-width: 768px) and (max-width: 1023px){.highlight-horizontal-row--tablet-ce
737nter-last[_ngcontent-%COMP%]   .highlight-horizontal-row__box[_ngcontent-%COMP%]:last-child{grid-column:1/-1;justify-self:center;width:100%;max-width:var(--box-max-width)}}@media (min-width: 1024px){.highlight-horizontal-row[_ngcontent-%COMP%]{grid-template-columns:repeat(var(--box-count),minmax(0,var(--box-max-width)))}}.highlight-horizontal-row__box[_ngcontent-%COMP%]{position:relative;width:100%;height:267px;display:flex;flex-direction:column;justify-content:center;gap:12px;box-sizing:border-box;padding:1rem 1.5rem;border:1px solid var(--primary-container);border-radius:20px;text-align:center;overflow:hidden;text-decoration:none;color:inherit}.highlight-horizontal-row__box[href][_ngcontent-%COMP%], .highlight-horizontal-row__box--action[_ngcontent-%COMP%]{cursor:pointer}.highlight-horizontal-row__box--image[_ngcontent-%COMP%], .highlight-horizontal-row__box--video[_ngcontent-%COMP%]{min-height:220px}.highlight-horizontal-row__box--image[_ngcontent-%COMP%]{background-position:center;background-size:cover;background-repeat:no-repeat}.highlight-horizontal-row__box--media-with-text[_ngcontent-%COMP%]:before{position:absolute;inset:0;z-index:1;content:"";background:#0000004d}.highlight-horizontal-row__video[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:0;width:100%;height:100%;display:block;object-fit:cover}.highlight-horizontal-row__content[_ngcontent-%COMP%]{position:relative;z-index:2;display:flex;flex-direction:column;gap:1.5rem}.highlight-horizontal-row__title[_ngcontent-%COMP%]{margin:0;color:inherit;font-size:var(--font-size-lg);font-weight:var(--font-weight-semi-bold);line-height:1.2}.highlight-horizontal-row__description[_ngcontent-%COMP%]{margin:0;color:inherit;font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:1.5}']})}}return h})();var gm={boxes:{type:"array",objectInputType:[{key:"type",relatedComponent:["media","text","split"],inputType:"select",options:["media","text","split"],type:{type:"string",data:"text"}},{key:"mediaType",relatedComponent:["media","split"],inputType:"select",options:["image","video"],type:{type:"string",data:"image"}},{key:"image",relatedComponent:["media","split"],inputType:"image",option:"image",type:{type:"image",data:{url:"assets/images/default-theme-images/tasty-italian-pizza-with-tomato-sauce-parmesan_1220-4259.avif",altText:"Italian pizza with tomato sauce"}}},{key:"video",relatedComponent:["media","split"],inputType:"video",option:"video",type:{type:"video",data:{url:""}}},{key:"title",relatedComponent:["media","text","split"],inputType:"input",type:{type:"string",data:"Box Title"}},{key:"description",relatedComponent:["media","text","split"],inputType:"textarea",type:{type:"string",data:"Box description goes here"}},{key:"textColor",relatedComponent:["media","text","split"],inputType:"color",type:{type:"string",data:"#222222"}},{key:"backgroundColor",relatedComponent:["media","text","split"],inputType:"color",type:{type:"string",data:"#f0f0f0"}},{key:"boxUrl",relatedComponent:["media","text","split"],inputType:"input",type:{type:"string",data:""}},{key:"colSpan",relatedComponent:["media","text","split"],inputType:"select",options:["1","2","3","4"],type:{type:"text",data:1}},{key:"rowSpan",relatedComponent:["media","text","split"],inputType:"select",options:["1","2","3","4"],type:{type:"text",data:1}},{key:"splitDirection",relatedComponent:"split",inputType:"select",options:["horizontal","vertical"],type:{type:"string",data:"horizontal"}}],data:[{type:"text",title:"Box One",description:"This is the first box in the grid",textColor:"#222222",backgroundColor:"#f0f0f0",boxUrl:"",colSpan:1,rowSpan:1},{type:"text",title:"Box Two",description:"This is the second box in the grid",textColor:"#222222",backgroundColor:"#f0f0f0",boxUrl:"",colSpan:1,rowSpan:1},{type:"text",title:"Box Three",description:"This is the third box in the grid",textColor:"#222222",backgroundColor:"#f0f0f0",boxUrl:"",colSpan:1,rowSpan:1},{type:"text",title:"Box Four",description:"This is the fourth box in the grid",textColor:"#222222",backgroundColor:"#f0f0f0",boxUrl:"",colSpan:1,rowSpan:1}]}};function QP(h,k){if(h&1&&(I(0,"video",10),it(1,"source",12),E()),h&2){let n=A(3).$implicit,c=A(2);qt("aria-label",c.getAltText(n)),w(),j("src",n.video==null?null:n.video.url,Se)}}function JP(h,k){if(h&1&&it(0,"div",13),h&2){let n=A(3).$implicit,c=A(2);
737ue("background-image",c.getBackgroundImage(n)),qt("aria-label",c.getAltText(n))}}function t2(h,k){if(h&1&&ut(0,QP,2,2,"video",10)(1,JP,1,3,"div",11),h&2){let n=A(2).$implicit,c=A(2);rt(c.isVideoMedia(n)?0:c.isImageMedia(n)?1:-1)}}function e2(h,k){if(h&1&&(I(0,"h2",8),X(1),E()),h&2){let n=A(2).$implicit;w(),St(n.title)}}function n2(h,k){if(h&1&&it(0,"div",9),h&2){let n=A(2).$implicit;j("innerHTML",n.sanitizedDescription,Ti)}}function i2(h,k){if(h&1&&(I(0,"div",6),ut(1,t2,2,1),I(2,"div",7),ut(3,e2,2,1,"h2",8)(4,n2,1,1,"div",9),E()()),h&2){let n=A().$implicit,c=A(2);Ie("highlight-bento-box__split-container--vertical",c.getSplitDirection(n)==="vertical"),w(),rt(c.isImageMedia(n)||c.isVideoMedia(n)?1:-1),w(),ue("background-color",c.getBackgroundColor(n)),w(),rt(n.title?3:-1),w(),rt(n.description?4:-1)}}function o2(h,k){if(h&1&&(I(0,"video",14),it(1,"source",12),E()),h&2){let n=A(2).$implicit,c=A(2);qt("aria-label",c.getAltText(n)),w(),j("src",n.video==null?null:n.video.url,Se)}}function r2(h,k){if(h&1&&(I(0,"h3",8),X(1),E()),h&2){let n=A(2).$implicit;w(),St(n.title)}}function a2(h,k){if(h&1&&it(0,"div",9),h&2){let n=A(2).$implicit;j("innerHTML",n.sanitizedDescription,Ti)}}function s2(h,k){if(h&1&&(ut(0,o2,2,2,"video",14),I(1,"div",5),ut(2,r2,2,1,"h3",8)(3,a2,1,1,"div",9),E()),h&2){let n=A().$implicit,c=A(2);rt(c.isVideoMedia(n)?0:-1),w(2),rt(n.title?2:-1),w(),rt(n.description?3:-1)}}function l2(h,k){if(h&1){let n=Yt();I(0,"a",3),Ot("click",function(d){let a=kt(n).$implicit,z=A(2);return Et(z.onBoxClick(a,d))}),ut(1,i2,5,7,"div",4)(2,s2,4,3,"div",5),E()}if(h&2){let n=k.$implicit,c=A(2);ue("background-image",c.isImageMedia(n)&&!c.isSplitBox(n)?c.getBackgroundImage(n):"")("background-color",c.getBackgroundColor(n))("color",c.getTextColor(n))("grid-column",n.centered?"1 / -1":(n.gridCol||1)+" / span "+(n.colSpan||1))("grid-row",(n.gridRow||1)+" / span "+(n.rowSpan||1)),Ie("highlight-bento-box__box--action",c.isActionBox(n))("highlight-bento-box__box--centered",n.centered)("highlight-bento-box__box--media",c.isImageMedia(n))("highlight-bento-box__box--media-only",c.isMediaBox(n)&&!c.hasTextContent(n))("highlight-bento-box__box--video-with-text",c.isMediaBox(n)&&c.isVideoMedia(n)&&c.hasTextContent(n))("highlight-bento-box__box--media-with-text",c.isMediaBox(n)&&c.hasTextContent(n))("highlight-bento-box__box--split",c.isSplitBox(n)),qt("href",c.getBoxHref(n),Se)("role",c.isActionBox(n)?"button":null)("data-col-span",n.colSpan||1)("aria-label",c.isMediaBox(n)&&!n.title&&!n.description?c.getAltText(n):null),w(),rt(c.isSplitBox(n)?1:2)}}function c2(h,k){if(h&1&&(I(0,"section",1),le(1,l2,3,29,"a",2,Ce),E()),h&2){let n=A();ue("--box-count",n.boxes.length),qt("data-box-count",n.boxes.length),w(),ce(n.boxes)}}var p0=(()=>{class h{constructor(n,c,d){this.sanitizer=n,this.macroReplacementService=c,this.componentConfig=d,this.boxes=[],this.GRID_COLUMNS=4,this.GRID_ROWS=8,this.videoUrlPattern=/\.(mp4|webm|ogg|ogv|mov|m4v|m3u8)(?:[?#].*)?$/i,this.videoMimePattern=/^(data:video\/|video\/)/i;let z=(this.componentConfig?.data??gm).boxes??gm.boxes,J=Array.isArray(z.data)?z.data:[];this.boxes=J.map(yt=>cn(te({},yt),{content:yt.type??"text",sanitizedDescription:this.sanitizeHtml(yt.description),colSpan:this.getClampedSpan(yt.colSpan),rowSpan:this.getClampedSpan(yt.rowSpan)}
737)),this.placeBoxesInFixedGrid(),this.centerLoneBoxes(),this.data={boxes:cn(te({},z),{data:this.boxes})}}placeBoxesInFixedGrid(){let n=new Map,c=1,d=1;for(let a of this.boxes){let z=Math.min(a.colSpan||1,this.GRID_COLUMNS),J=Math.min(a.rowSpan||1,this.GRID_ROWS);for(;!this.doesBoxFit(c,d,z,J,n);)if(d++,d>this.GRID_COLUMNS&&(d=1,c++),c>this.GRID_ROWS)return;a.gridCol=d,a.gridRow=c;for(let yt=c;yt<c+J;yt++)for(let ie=d;ie<d+z;ie++)n.set(`${yt},${ie}`,!0);d+=z,d>this.GRID_COLUMNS&&(d=1,c++)}}centerLoneBoxes(){for(let n of this.boxes){let c=n.gridRow||1,d=c+(n.rowSpan||1);n.centered=!this.boxes.some(a=>{if(a===n)return!1;let z=a.gridRow||1,J=z+(a.rowSpan||1);return c<J&&z<d})}}doesBoxFit(n,c,d,a,z){if(c+d-1>this.GRID_COLUMNS||n+a-1>this.GRID_ROWS)return!1;for(let J=n;J<n+a;J++)for(let yt=c;yt<c+d;yt++)if(z.get(`${J},${yt}`))return!1;return!0}getClampedSpan(n){let c=Number(n)||1;return Math.min(Math.max(c,1),this.GRID_COLUMNS)}isMediaBox(n){return n.type==="media"&&(this.isImageMedia(n)||this.isVideoMedia(n))}isImageMedia(n){return this.getActiveMediaType(n)==="image"&&!!n.image?.url?.trim()}isVideoMedia(n){return this.getActiveMediaType(n)==="video"&&this.hasValidVideoUrl(n.video?.url)}isSplitBox(n){return n.type==="split"&&(this.isImageMedia(n)||this.isVideoMedia(n))}getSplitDirection(n){return n.splitDirection??"horizontal"}hasTextContent(n){return!!(n.title?.trim()||n.description?.trim())}getImageUrl(n){return n.image?.url??""}getBackgroundImage(n){let c=n.image?.url??"";return c?`url("${c.replace(/"/g,'\\"')}")`:""}getAltText(n){return n.image?.altText??""}getTextColor(n){return n.textColor??(this.isImageMedia(n)?"var(--white)":"var(--text)")}getBackgroundColor(n){return n.backgroundColor??"var(--white)"}getBoxUrlResolution(n){return this.macroReplacementService.resolveUrl(n.boxUrl)}isActionBox(n){return this.getBoxUrlResolution(n).kind==="action"}getBoxHref(n){let c=this.getBoxUrlResolution(n);return c.kind==="url"&&c.value||null}onBoxClick(n,c){let d=this.getBoxUrlResolution(n);d.kind==="action"&&(c.preventDefault(),d.run())}sanitizeHtml(n){return ls(this.sanitizer,n)}getActiveMediaType(n){if(!(n.type!=="media"&&n.type!=="split"))return n.mediaType==="image"?"image":n.mediaType==="video"||this.hasValidVideoUrl(n.video?.url)?"video":n.image?.url?.trim()?"image":void 0}hasValidVideoUrl(n){let c=n?.trim()??"";return!!c&&(this.videoUrlPattern.test(c)||this.videoMimePattern.test(c))}static{this.\u0275fac=function(c){return new(c||h)(se(Zo),se(ss),se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-highlight-bento-box"]],standalone:!0,features:[Kt],decls:1,vars:1,consts:[["aria-label","Bento Box",1,"highlight-bento-box",3,"--box-count"],["aria-label","Bento Box",1,"highlight-bento-box"],[1,"highlight-bento-box__box",3,"highlight-bento-box__box--action","highlight-bento-box__box--centered","highlight-bento-box__box--media","highlight-bento-box__box--media-only","highlight-bento-box__box--video-with-text","highlight-bento-box__box--media-with-text","highlight-bento-box__box--split","backgroundImage","backgroundColor","color","gridColumn","gridRow"],[1,"highlight-bento-box__box",3,"click"],[1,"highlight-bento-box__split-container",3,"highlight-bento-box__split-container--vertical"],[1,"highlight-bento-box__content"],[1,"highlight-bento-box__split-container"],[1,"highlight-bento-box__split-content"],[1,"highlight-bento-box__title"],[1,"highlight-bento-box__description",3,"innerHTML"],["autoplay","","muted","","loop","","playsinline","",1,"highlight-bento-box__split-video"],[1,"highlight-bento-box__split-image",3,"backgroundImage"],[3,"src"],[1,"highlight-bento-box__split-image"],["autoplay","","muted","","loop","","playsinline","",1,"highlight-bento-box__video"]],template:function(c,d){c&1&&ut(0,c2,3,3,"section",0),c&2&&rt(d.boxes.length?0:-1)},dependencies:[ve],styles:['[_nghost-%COMP%]{display:block;background:var(--white)}.highlight-bento-box[_ngcontent-%COMP%]{--highlight-horizontal-padding: 52px;--box-gap: 1rem;--row-height: clamp(150px, 15vw, 240px);width:100%;margin-inline:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:minmax(var(--row-height),auto);justify-content:safe center;align-items:stretch;gap:var(--box-gap);box-sizing:border-box;padding:2rem var(--highlight-horizontal-padding)}@media (max-width: 767px){.highlight-bento-box[_ngcontent-%COMP%]{--highlight-horizontal-padding: 1rem;grid-template-columns:minmax(0,1fr);grid-auto-rows:auto;padding:1rem var(--highlight-horizontal-padding)}.highlight-bento-box[_ngcontent-%COMP%]   .highlight-bento-box__box[_ngcontent-%COMP%]{grid-row:auto!important;grid-column:1/-1!important;max-width:500px;justify-self:center}.highlight-bento-box[_ngcontent-%COMP%]   .highlight-bento-box__box--media-only[_ngcontent-%COMP%]{aspect-ratio:4/3}.highlight-bento-box[_ngcontent-%COMP%]   .highlight-bento-box__box--video-with-text[_ngcontent-%COMP%]{aspect-ratio:4/3;min-height:min-content}}.highlight-bento-box__box[_ngcontent-%COMP%]{position:relative;width:100%;min-width:0;overflow-wrap:anywhere;display:flex;flex-direction:column;justify-content:center;gap:12px;box-sizing:border-box;padding:1rem 1.5rem;border:1px solid transparent;border-radius:20px;text-align:center;overflow:hidden;text-decoration:none;color:inherit;transition:transform .2s ease,box-shadow .2s ease}.highlight-bento-box__box[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000001a}.highlight-bento-box__box--centered[_ngcontent-%COMP%]{justify-self:center}@media (min-width: 768px){.highlight-bento-box__box--centered[data-col-span="1"][_ngcontent-%COMP%]{width:calc(25% - var(--box-gap) * .75)}.highlight-bento-box__box--centered[data-col-span="2"][_ngcontent-%COMP%]{width:calc(50% - var(--box-gap) * .5)}.highlight-bento-box__box--centered[data-col-span="3"][_ngcontent-%COMP%]{width:calc(75% - var(--box-gap) * .25)}.highlight-bento-box__box--centered[data-col-span="4"][_ngcontent-%COMP%]{width:calc(100% - var(--box-gap) * 0)}}.highlight-bento-box__box--media[_ngcontent-%COMP%]{background-position:center;background-size:cover;background-repeat:no-repeat}.highlight-bento-box__box--media[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0;z-index:1}.highlight-bento-box__box--media-with-text[_ngcontent-%COMP%]:before{background:#0000004d}
737.highlight-bento-box__box--split[_ngcontent-%COMP%]{justify-content:flex-start;padding:0;background-color:transparent!important}.highlight-bento-box__box--split[_ngcontent-%COMP%]:before{display:none}.highlight-bento-box__box--action[_ngcontent-%COMP%]{cursor:pointer}.highlight-bento-box__split-container[_ngcontent-%COMP%]{position:relative;z-index:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));flex:1;width:100%;gap:0}.highlight-bento-box__split-container--vertical[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(var(--row-height),1fr) auto;min-width:0}@media (max-width: 767px){.highlight-bento-box__split-container[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;flex:auto}}.highlight-bento-box__split-image[_ngcontent-%COMP%]{background-position:center;background-size:cover;background-repeat:no-repeat;min-width:0}@media (max-width: 767px){.highlight-bento-box__split-image[_ngcontent-%COMP%]{aspect-ratio:4/3}}.highlight-bento-box__split-video[_ngcontent-%COMP%]{align-self:stretch;width:100%;height:0;min-height:100%;object-fit:cover;object-position:center;min-width:0}@media (max-width: 767px){.highlight-bento-box__split-video[_ngcontent-%COMP%]{height:auto;min-height:0;aspect-ratio:4/3}}.highlight-bento-box__video[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;object-position:center;z-index:2}.highlight-bento-box__split-content[_ngcontent-%COMP%]{min-width:0;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:1rem 1.5rem;box-sizing:border-box;background-color:inherit}.highlight-bento-box__split-container--vertical[_ngcontent-%COMP%]   .highlight-bento-box__split-content[_ngcontent-%COMP%]{align-items:flex-start}.highlight-bento-box__content[_ngcontent-%COMP%]{position:relative;z-index:2;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px}.highlight-bento-box__title[_ngcontent-%COMP%]{margin:0;font-size:1.25rem;font-weight:600;line-height:1.3}.highlight-bento-box__split-content[_ngcontent-%COMP%]   .highlight-bento-box__title[_ngcontent-%COMP%]{text-align:left;font-size:1.1rem}.highlight-bento-box__description[_ngcontent-%COMP%]{font-size:.95rem;line-height:1.5;opacity:.95}.highlight-bento-box__split-content[_ngcontent-%COMP%]   .highlight-bento-box__description[_ngcontent-%COMP%]{text-align:left;font-size:.9rem}.highlight-bento-box__description[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:deep(p){margin:.5rem 0}.highlight-bento-box__description[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:deep(p):first-child{margin-top:0}.highlight-bento-box__description[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:deep(p):last-child{margin-bottom:0}.highlight-bento-box__description[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:deep(a){text-decoration:underline;font-weight:500}.highlight-bento-box__description[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:deep(a):hover{opacity:.8}']})}}return h})();var ur={layoutOption:{type:"string",data:"media-first"},mediaType:{type:"string",data:"image"},image:{type:"image",option:"image",data:{url:"assets/images/default-theme-images/tasty-italian-pizza-with-tomato-sauce-parmesan_1220-4259.avif",altText:"Italian pizza with tomato sauce"}},video:{type:"video",option:"video",data:{url:""}},mediaBoxUrl:{type:"string",data:""},title:{type:"string",data:"Made with care"},description:{type:"string",data:"Quality ingredients and thoughtful preparation come together in every order."},textColor:{type:"string",data:"#222222"},backgroundColor:{type:"string",data:"#ffffff"},textBoxUrl:{type:"string",data:""}};function d2(h,k){if(h&1&&it(0,"video",6),h&2){let n=A(2);j("src",n.data.video.data.url,Se)("muted",!0)}}function p2(h,k){if(h&1&&ut(0,d2,1,2,"video",6),h&2){let n=A();rt(n.data.video.data.url?0:-1)}}function u2(h,k){if(h&1&&it(0,"img",2),h&2){let n=A();j("src",n.data.image.data.url,Se)("alt",n.data.image.data.altText||"")}}function h2(h,k){if(h&1&&(I(0,"h2",4),X(1),E()),h&2){let n=A();w(),St(n.data.title.data)}}function m2(h,k){if(h&1&&it(0,"div",5),h&2){let n=A();j("innerHTML",n.descriptionHtml,Ti)}}var u0=(()=>{class h{constructor(n,c,d){this.sanitizer=n,this.macroReplacementService=c,this.descriptionHtml="";let a=d?.data??{};this.data={layoutOption:a.layoutOption??ur.layoutOption,mediaType:a.mediaType??ur.mediaType,image:a.image??ur.image,video:a.video??ur.video,mediaBoxUrl:a.mediaBoxUrl??ur.mediaBoxUrl,title:a.title??ur.title,de
737scription:a.description??ur.description,textBoxUrl:a.textBoxUrl??ur.textBoxUrl,textColor:a.textColor??ur.textColor,backgroundColor:a.backgroundColor??ur.backgroundColor},this.descriptionHtml=this.sanitizeHtml(this.data.description.data)}get isVideo(){return this.data.mediaType.data==="video"}get isTextFirst(){return this.data.layoutOption.data==="text-first"}getSanitizedDescription(){return this.descriptionHtml}getMediaResolution(){return this.macroReplacementService.resolveUrl(this.data.mediaBoxUrl.data)}get isMediaAction(){return this.getMediaResolution().kind==="action"}get mediaHref(){let n=this.getMediaResolution();return n.kind==="url"&&n.value||null}onMediaClick(n){let c=this.getMediaResolution();c.kind==="action"&&(n.preventDefault(),c.run())}getTextResolution(){return this.macroReplacementService.resolveUrl(this.data.textBoxUrl.data)}get isTextAction(){return this.getTextResolution().kind==="action"}get textHref(){let n=this.getTextResolution();return n.kind==="url"&&n.value||null}onTextClick(n){let c=this.getTextResolution();c.kind==="action"&&(n.preventDefault(),c.run())}sanitizeHtml(n){return ls(this.sanitizer,n)}static{this.\u0275fac=function(c){return new(c||h)(se(Zo),se(ss),se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-highlight-split-view"]],standalone:!0,features:[Kt],decls:7,vars:17,consts:[[1,"highlight-split-view"],[1,"highlight-split-view__media",3,"click"],[1,"highlight-split-view__media-element",3,"src","alt"],[1,"highlight-split-view__text",3,"click"],[1,"highlight-split-view__title"],[1,"highlight-split-view__description",3,"innerHTML"],["autoplay","","loop","","playsinline","","preload","metadata",1,"highlight-split-view__media-element",3,"src","muted"]],template:function(c,d){c&1&&(I(0,"section",0)(1,"a",1),Ot("click",function(z){return d.onMediaClick(z)}),ut(2,p2,1,1)(3,u2,1,2,"img",2),E(),I(4,"a",3),Ot("click",function(z){return d.onTextClick(z)}),ut(5,h2,2,1,"h2",4)(6,m2,1,1,"div",5),E()()),c&2&&(Ie("highlight-split-view--text-first",d.isTextFirst),w(),Ie("highlight-split-view__media--action",d.isMediaAction),qt("href",d.mediaHref,Se)("role",d.isMediaAction?"button":null),w(),rt(d.isVideo?2:d.data.image.data.url?3:-1),w(2),ue("color",d.data.textColor.data||"var(--text)")("background-color",d.data.backgroundColor.data||"var(--white)"),Ie("highlight-split-view__text--action",d.isTextAction),qt("href",d.textHref,Se)("role",d.isTextAction?"button":null),w(),rt(d.data.title.data?5:-1),w(),rt(d.data.description.data?6:-1))},styles:["[_nghost-%COMP%]{display:block;background:var(--white)}.highlight-split-view[_ngcontent-%COMP%]{--highlight-horizontal-padding: 52px;width:100%;margin-inline:auto;display:flex;flex-direction:column;align-items:center;box-sizing:border-box;padding:2rem var(--highlight-horizontal-padding);overflow-x:auto}@media (max-width: 767px){.highlight-split-view[_ngcontent-%COMP%]{--highlight-horizontal-padding: 1rem;flex-direction:column;overflow-x:visible}}@media (min-width: 768px){.highlight-split-view[_ngcontent-%COMP%]{align-items:center}}@media (min-width: 1024px){.highlight-split-view[_ngcontent-%COMP%]{flex-direction:row;justify-content:safe center}}.highlight-split-view--text-first[_ngcontent-%COMP%]   .highlight-split-view__media[_ngcontent-%COMP%]{order:1}.highlight-split-view--text-first[_ngcontent-%COMP%]   .highlight-split-view__text[_ngcontent-%COMP%]{order:2}@media (min-width: 1024px){.highlight-split-view--text-first[_ngcontent-%COMP%]   .highlight-split-view__media[_ngcontent-%COMP%]{order:2;margin-left:-1px;border-radius:0 20px 20px 0}.highlight-split-view--text-first[_ngcontent-%COMP%]   .highlight-split-view__text[_ngcontent-%COMP%]{order:1;margin-left:0;border-radius:20px 0 0 20px}}.highlight-split-view__media[_ngcontent-%COMP%], .highlight-split-view__text[_ngcontent-%COMP%]{width:100%;max-width:476px;height:367px;min-width:0;min-height:267px;flex:0 0 267px;box-sizing:border-box;text-decoration:none}@media (min-width: 768px){.highlight-split-view__media[_ngcontent-%COMP%], .highlight-split-view__text[_ngcontent-%COMP%]{width:476px;min-width:476px}}@media (min-width: 1024px){.highlight-split-view__media[_ngcontent-%COMP%], .highlight-split-view__text[_ngcontent-%COMP%]{flex:1 1 50%;max-width:none;min-width:0}}.highlight-split-view__media[href][_ngcontent-%COMP%], .highlight-split-view__text[href][_ngcontent-%COMP%]{cursor:pointer}.highlight-split-view__media[_ngcontent-%COMP%]{border-radius:20px 20px 0 0;overflow:hidden;background:var(--primary-container)}@media (min-width: 1024px){.highlight-split-view__media[_ngcontent-%COMP%]{border-radius:20px 0 0 20px}}.highlight-split-view__media-element[_ngcontent-%COMP%]{width:100%;height:100%;display:block;object-fit:cover}.highlight-split-view__media--action[_ngcontent-%COMP%], .highlight-split-view__text--action[_ngcontent-%COMP%]{cursor:pointer}.highlight-split-view__text[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;gap:1.5rem;padding:2rem;border:1px solid var(--primary-container);border-radius:0 0 20px 20px;margin-top:-1px;overflow:hidden}@media (min-width: 1024px){.highlight-split-view__text[_ngcontent-%COMP%]{padding:4rem;margin-top:0;margin-left:-1px;border-radius:0 20px 20px 0}}.highlight-split-view__title[_ngcontent-%COMP%]{margin:0;color:inherit;font-size:var(--font-size-xl);font-weight:var(--font-weight-semi-bold);line-height:1.2}.highlight-split-view__description[_ngcontent-%COMP%]{margin:0;color:inherit;font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:1.5;overflow-wrap:anywhere}"]})}}return h})();var fm={display:{type:"toggle",data:!1},layoutOption:{type:"string",data:"Option 2"},image:{type:"image",data:{url:"assets/images/default-theme-images/close-up-person-cooking_23-2150980258.avif",altText:"Close up of person cooking"},option:"Option 2, Option 3"},title:{type:"string",data:"A Special Offer Just for You!"},description:{type:"text",data:"25% OFF orders over $40 during June and July! Use PROMO25 at checkout."},textWithURL:{type:"string",data:"Learn more about this offer"},URL:{type:"string",data:"https://www.example.com/promo"},button:{type:"toggle",data:!0}
737,buttonText:{type:"string",data:"Order Online"},buttonURL:{type:"string",data:"https://www.example.com/order-online"},backgroundColor:{type:"string",data:"#ffffff"},textColor:{type:"string",data:"#333334"}};function g2(h,k){if(h&1&&it(0,"img",2),h&2){let n=A(2);j("src",n.popupImageUrl,Se)}}function f2(h,k){if(h&1&&(I(0,"div",3),it(1,"app-icon",11),E()),h&2){let n=A(2);w(),j("name",n.iconNameType.announcementpopup)}}function _2(h,k){if(h&1&&(I(0,"figure",8),it(1,"img",12),E()),h&2){let n=A(2);w(),j("src",n.popupImageUrl,Se)("alt",n.popupImageAlt)}}function y2(h,k){if(h&1&&(I(0,"p",9),X(1),E()),h&2){let n=A(2);w(),Rt(" ",n.data().description.data," ")}}function x2(h,k){if(h&1&&(I(0,"a",13),X(1),E()),h&2){let n=A(3);j("href",n.textUrl,Se),w(),St(n.linkedText)}}function v2(h,k){if(h&1&&(I(0,"p",14),X(1),E()),h&2){let n=A(3);w(),St(n.linkedText)}}function b2(h,k){if(h&1&&ut(0,x2,2,2,"a",13)(1,v2,2,1,"p",14),h&2){let n=A(2);rt(n.textUrl?0:1)}}function C2(h,k){if(h&1&&(I(0,"a",10),X(1),E()),h&2){let n=A(2);j("href",n.buttonHref,Se),w(),Rt(" ",n.data().buttonText.data," ")}}function w2(h,k){if(h&1){let n=Yt();I(0,"article",1),ut(1,g2,1,1,"img",2)(2,f2,2,1,"div",3),I(3,"button",4),Ot("click",function(){kt(n);let d=A();return Et(d.close())}),I(4,"span",5),X(5,"\xD7"),E()(),I(6,"div",6)(7,"h2",7),X(8),E(),ut(9,_2,2,2,"figure",8)(10,y2,2,1,"p",9)(11,b2,2,1)(12,C2,2,2,"a",10),E()()}if(h&2){let n=A();ue("background-color",n.data().backgroundColor.data)("color",n.data().textColor.data),Ie("popup-announcement_text-only",n.isTextPopup)("popup-announcement_with-image",n.showInlineImage)("popup-announcement_with-background-image",n.showBackgroundImage),qt("aria-labelledby","popup-announcement-title")("aria-describedby",n.data().description.data?"popup-announcement-description":null),w(),rt(n.showBackgroundImage?1:-1),w(),rt(n.showBackgroundImage?-1:2),w(6),St(n.data().title.data),w(),rt(n.showInlineImage?9:-1),w(),rt(n.data().description.data?10:-1),w(),rt(n.linkedText?11:-1),w(),rt(n.showButton?12:-1)}}var h0=(()=>{class h{constructor(n){this.componentConfig=n,this.modalService=gt(Gn),this.platformId=gt(rn),this.editModeLastShownKey="popup-announcement:edit:last-shown",this.sessionStorageKeyPrefix="popup-announcement:shown:",this.openedAsTrigger=!1,this.modalName=Ln.PopupAnnouncement,this.iconNameType=ge,this.popupLayoutOptions={text:"Option 1",image:"Option 2",backgroundImage:"Option 3"},this.data=Ut(()=>te(te({},fm),this.componentConfig?.data??this.modalService.stateForModal(this.modalName)??{}))}ngOnInit(){if(this.componentConfig){let n=this.data();n.display.data&&An(this.platformId)&&!this.wasShownThisSession(n)&&(this.openedAsTrigger=!0,this.modalService.openModal(this.modalName,n).subscribe(),this.markShownThisSession(n));return}}ngOnDestroy(){this.openedAsTrigger&&this.modalService.isModalOpen(this.modalName)&&this.modalService.closeModal(this.modalName).subscribe()}close(){this.modalService.closeModal(this.modalName,{canceled:!0}).subscribe()}get isImagePopup(){return this.popupLayoutOption===this.popupLayoutOptions.image}get isBackgroundImagePopup(){return this.popupLayoutOption===this.popupLayoutOptions.backgroundImage}get isTextPopup(){return!this.isImagePopup&&!this.isBackgroundImagePopup}get showInlineImage(){return this.isImagePopup&&!!this.popupImageUrl}get showBackgroundImage(){return this.isBackgroundImagePopup&&!!this.popupImageUrl}get popupImageUrl(){return this.data().image?.data?.url?.trim()||""}get popupImageAlt(){return this.data().image?.data?.altText?.trim()||""}get linkedText(){return this.data().textWithURL.data?.trim()??""}get textUrl(){return this.normalizeUrl(this.data().URL.data)}get buttonHref(){return this.normalizeUrl(this.data().buttonURL.data)}get showButton(){let n=this.data();return n.button.data&&!!n.buttonText.data?.trim()&&!!this.buttonHref}get popupLayoutOption(){return this.data().layoutOption?.data?.trim()||fm.layoutOption.data}normalizeUrl(n){let c=n?.trim()??"";return c?/^(https?:|mailto:|tel:|\/|#)/i.test(c)?c:`https://${c}`:""}wasShownThisSession(n){try{let c=this.getSessionStorageKey(n);return qn.merchantId==="edit-mode"?window.sessionStorage.getItem(this.editModeL
737astShownKey)===c:window.sessionStorage.getItem(c)==="true"}catch{return!1}}markShownThisSession(n){try{let c=this.getSessionStorageKey(n);if(qn.merchantId==="edit-mode"){window.sessionStorage.setItem(this.editModeLastShownKey,c);return}window.sessionStorage.setItem(c,"true")}catch{return}}getSessionStorageKey(n){return`${this.sessionStorageKeyPrefix}${this.hashString(JSON.stringify({selector:this.componentConfig?.selector??this.modalName,title:n.title.data,description:n.description.data,textWithURL:n.textWithURL.data,URL:n.URL.data,button:n.button.data,buttonText:n.buttonText.data,buttonURL:n.buttonURL.data,imageUrl:n.image.data?.url,imageAltText:n.image.data?.altText,layoutOption:n.layoutOption.data,backgroundColor:n.backgroundColor.data,textColor:n.textColor.data}))}`}hashString(n){let c=0;for(let d=0;d<n.length;d++)c=Math.imul(31,c)+n.charCodeAt(d)|0;return Math.abs(c).toString(36)}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-popup-announcement"]],standalone:!0,features:[Kt],decls:1,vars:1,consts:[[1,"popup-announcement",3,"popup-announcement_text-only","popup-announcement_with-image","popup-announcement_with-background-image","background-color","color"],[1,"popup-announcement"],["alt","","loading","lazy","aria-hidden","true",1,"announcement-background",3,"src"],["aria-hidden","true",1,"announcement-icon"],["type","button","aria-label","Close announcement",1,"close-button",3,"click"],["aria-hidden","true"],[1,"announcement-content"],["id","popup-announcement-title"],[1,"announcement-image"],["id","popup-announcement-description",1,"description"],[1,"order-button",3,"href"],["size","2.375rem",3,"name"],["loading","lazy",3,"src","alt"],[1,"text-link",3,"href"],[1,"text-link","text-link_plain"]],template:function(c,d){c&1&&ut(0,w2,13,19,"article",0),c&2&&rt(d.componentConfig?-1:0)},dependencies:[ve,Ae],styles:['[_nghost-%COMP%]{display:block}.popup-announcement[_ngcontent-%COMP%]{--popup-accent: var(--primary);position:relative;width:21.625rem;max-width:calc(100% - 2rem);max-height:568px;margin:2rem auto;padding:3.5rem 1.25rem 1rem;border-radius:1rem;box-shadow:0 1rem 2.5rem #00000047;box-sizing:border-box;isolation:isolate;text-align:center}@media (min-width: 576px){.popup-announcement[_ngcontent-%COMP%]{width:28.25rem;padding:3.5rem 1rem 1rem}}.announcement-content[_ngcontent-%COMP%]{max-height:calc(568px - 4.5rem)}.popup-announcement_with-background-image[_ngcontent-%COMP%]:before{position:absolute;z-index:-1;border-radius:inherit;background-color:inherit;content:"";inset:0;opacity:.5}.announcement-background[_ngcontent-%COMP%]{position:absolute;z-index:-2;width:100%;height:100%;border-radius:inherit;inset:0;object-fit:cover}.announcement-icon[_ngcontent-%COMP%]{position:absolute;z-index:1;top:-1.75rem;left:50%;display:grid;width:3.75rem;height:3.75rem;border:.45rem solid #fff;border-radius:50%;background:var(--popup-accent);color:#fff;place-items:center;transform:translate(-50%);box-sizing:border-box}.close-button[_ngcontent-%COMP%]{position:absolute;top:.85rem;right:.85rem;display:grid;width:2.35rem;height:2.35rem;padding:0;border-radius:50%;background:color-mix(in srgb,var(--popup-accent) 14%,#fff);color:var(--popup-accent);font-size:1.8rem;font-weight:600;line-height:1;place-items:center}
737h2[_ngcontent-%COMP%]{margin:0 2rem 1.15rem;color:inherit;font-size:clamp(1.25rem,4.5vw,1.5rem);font-weight:600;line-height:1.25}p[_ngcontent-%COMP%]{margin-right:auto;margin-left:auto;white-space:pre-line}.description[_ngcontent-%COMP%]{max-width:25rem;margin-top:0;margin-bottom:.9rem;font-size:.98rem;line-height:1.55}.announcement-image[_ngcontent-%COMP%]{margin:0 auto 1.15rem;overflow:hidden;border-radius:.75rem}.announcement-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{display:block;width:100%;height:200px;object-fit:cover}.text-link[_ngcontent-%COMP%]{display:inline-block;max-width:25rem;margin:0 auto 1.4rem;color:inherit;font-size:.92rem;font-weight:600;line-height:1.45;text-decoration:underline;text-underline-offset:.18em}.text-link_plain[_ngcontent-%COMP%]{color:inherit;font-weight:400;text-decoration:none}.order-button[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:100%;min-height:2.75rem;padding:.75rem 1.5rem;border-radius:999px;background:var(--popup-accent);color:var(--white);font-size:.95rem;font-weight:700;line-height:1.2;text-decoration:none}']})}}return h})();var Nu={display:{type:"toggle",data:!1},layoutOption:{type:"string",data:"Pop Up with image"},image:{type:"image",data:{url:"assets/images/default-theme-images/close-up-person-cooking_23-2150980258.avif",altText:"Close up of person cooking"},option:"Pop Up with image"},title:{type:"string",data:"A Special Offer Just for You!"},description:{type:"text",data:"25% OFF orders over $40 during June and July! Use PROMO25 at checkout."},textWithURL:{type:"string",data:"Valid for pick up orders only."},URL:{type:"string",data:""},button:{type:"toggle",data:!0},buttonText:{type:"string",data:"Order Online"},buttonURL:{type:"string",data:"https://www.example.com/order-online"},backgroundColor:{type:"string",data:"#ffffff",option:"Pop Up with text"},textColor:{type:"string",data:"#333334"}};function M2(h,k){if(h&1&&(I(0,"h2",11),X(1),E()),h&2){let n=A(3);w(),St(n.data.title.data)}}function P2(h,k){if(h&1&&(I(0,"p",12),X(1),E()),h&2){let n=A(3);w(),St(n.data.description.data)}}function O2(h,k){if(h&1&&(I(0,"a",14),X(1),E()),h&2){let n=A(4);j("href",n.textUrl,Se),qt("target",n.isTextExternalLink?"_blank":null)("rel",n.isTextExternalLink?"noopener noreferrer":null),w(),Rt(" ",n.linkedText," ")}}function S2(h,k){if(h&1&&(I(0,"span",15),X(1),E()),h&2){let n=A(4);w(),Rt(" ",n.linkedText," ")}}function T2(h,k){if(h&1&&ut(0,O2,2,4,"a",14)(1,S2,2,1,"span",15),h&2){let n=A(3);rt(n.textUrl?0:1)}}function I2(h,k){if(h&1&&(I(0,"a",13),X(1),E()),h&2){let n=A(3);j("href",n.buttonHref,Se),qt("target",n.isButtonExternalLink?"_blank":null)("rel",n.isButtonExternalLink?"noopener noreferrer":null),w(),Rt(" ",n.data.buttonText.data," ")}}function k2(h,k){if(h&1){let n=Yt();I(0,"article",5)(1,"button",6),Ot("click",function(){kt(n);let d=A(2);return Et(d.close())}),I(2,"div",7),it(3,"app-icon",8),E()(),I(4,"div",9)(5,"div",10),ut(6,M2,2,1,"h2",11)(7,P2,2,1,"p",12)(8,T2,2,1)(9,I2,2,4,"a",13),E()()()}if(h&2){let n=A(2);ue("background-image",n.isImageLayout?n.imageBackground:null),Ie("fab-announcement__panel_text",!n.isImageLayout),qt("aria-describedby",n.data.description.data?"fab-announcement-description":null),w(3),j("name",n.iconNameType.announcementClose),w(3),rt(n.data.title.data?6:-1),w(),rt(n.data.description.data?7:-1),w(),rt(n.linkedText?8:-1),w(),rt(n.showButton?9:-1)}}function E2(h,k){if(h&1){let n=Yt();I(0,"aside",1),ut(1,k2,10,10,"article",2),I(2,"button",3),Ot("click",function(){kt(n);let d=A();return Et(d.toggle())}),it(3,"app-icon",4),E()()}if(h&2){let n=A();ue("--fab-announcement-background",n.data.backgroundColor.data)("--fab-announcement-color",n.data.textColor.data),Ie("fab-announcement_open",n.isOpen()),w(),rt(n.isOpen()?1:-1),w(),qt("aria-expanded",n.isOpen())("aria-label",n.isOpen()?"Close announcement":"Open announcement"),w(),j("name",n.iconNameType.announcement)}}var m0=(()=>{class h{constructor(n){this.componentConfig=n,this.iconNameType=ge,this.isOpen=Te(!1),this.EXTERNAL_URL_PATTERN=/^https?:\/\//i,this.data=te(te({},Nu),this.componentConfig?.data??{})}get shouldDisplay(){return this.data.display.data}get isImageLayout(){return this.layoutOption.toLowerCase().includes("image")}get imageUrl(){return this.data.image?.data?.url?.trim()??Nu.image.data.url??""}
737get imageBackground(){return`url("${this.imageUrl.replace(/"/g,'\\"')}")`}get linkedText(){return this.data.textWithURL.data?.trim()??""}get textUrl(){return this.normalizeUrl(this.data.URL.data)}get buttonHref(){return this.normalizeUrl(this.data.buttonURL.data)}get showButton(){return this.data.button.data&&!!this.data.buttonText.data?.trim()&&!!this.buttonHref}get isButtonExternalLink(){return this.EXTERNAL_URL_PATTERN.test(this.buttonHref)}get isTextExternalLink(){return this.EXTERNAL_URL_PATTERN.test(this.textUrl)}toggle(){this.isOpen.update(n=>!n)}close(){this.isOpen.set(!1)}handleEscapeKey(){this.close()}get layoutOption(){return this.data.layoutOption?.data?.trim()||Nu.layoutOption.data}normalizeUrl(n){let c=n?.trim()??"";return c?/^(https?:|mailto:|tel:|\/|#)/i.test(c)?c:`https://${c}`:""}static{this.\u0275fac=function(c){return new(c||h)(se("componentConfig",8))}}static{this.\u0275cmp=Xt({type:h,selectors:[["app-floating-action-button-announcement"]],hostBindings:function(c,d){c&1&&Ot("keydown.escape",function(){return d.handleEscapeKey()},!1,dr)},standalone:!0,features:[Kt],decls:1,vars:1,consts:[["aria-label","Announcement",1,"fab-announcement",3,"fab-announcement_open","--fab-announcement-background","--fab-announcement-color"],["aria-label","Announcement",1,"fab-announcement"],["id","fab-announcement-panel","role","dialog","aria-modal","false","aria-labelledby","fab-announcement-title",1,"fab-announcement__panel",3,"fab-announcement__panel_text","backgroundImage"],["type","button","aria-controls","fab-announcement-panel",1,"fab-announcement__button",3,"click"],["size","54px",3,"name"],["id","fab-announcement-panel","role","dialog","aria-modal","false","aria-labelledby","fab-announcement-title",1,"fab-announcement__panel"],["type","button","aria-label","Close announcement",1,"fab-announcement__close",3,"click"],[1,"fab-announcement__close-icon"],["size","44px",3,"name"],[1,"fab-announcement__panel-inner"],[1,"fab-announcement__content"],["id","fab-announcement-title"],["id","fab-announcement-description"],[1,"fab-announcement__cta",3,"href"],[1,"fab-announcement__link",3,"href"],[1,"fab-announcement__link","fab-announcement__link_plain"]],template:function(c,d){c&1&&ut(0,E2,4,10,"aside",0),c&2&&rt(d.shouldDisplay?0:-1)},dependencies:[ve,Ae],styles:["[_nghost-%COMP%]{display:contents}.fab-announcement[_ngcontent-%COMP%]{position:fixed;right:1.25rem;bottom:1.25rem;z-index:510;display:flex;flex-direction:column;align-items:flex-end;gap:.875rem;color:var(--fab-announcement-color)}.fab-announcement__button[_ngcontent-%COMP%]{position:relative;display:inline-flex;align-items:center;justify-content:center;width:3.5rem;height:3.5rem;padding:0;border:0;border-radius:999px;background:var(--white);color:var(--primary);box-shadow:0 .75rem 1.75rem #00000042;cursor:pointer;transition:box-shadow .18s ease,transform .18s ease}.fab-announcement__button[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{position:relative;z-index:1}.fab-announcement__button[_ngcontent-%COMP%]:hover, .fab-announcement__button[_ngcontent-%COMP%]:focus-visible{box-shadow:0 1rem 2rem #0000004d;transform:translateY(-1px)}.fab-announcement__panel[_ngcontent-%COMP%]{position:relative;box-sizing:border-box;overflow:hidden;border-radius:1rem;background-color:var(--fab-announcement-background);background-position:center;background-repeat:no-repeat;background-size:cover;color:var(--fab-announcement-color);width:364px;max-height:473px;padding:12px;display:flex;align-items:flex-end}.fab-announcement__panel-inner[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;align-items:flex-end}.fab-announcement__panel_text[_ngcontent-%COMP%]{border-radius:12px;padding:4px}.fab-announcement__panel_text[_ngcontent-%COMP%]   .fab-announcement__panel-inner[_ngcontent-%COMP%]{width:100%;height:100%;border:1px solid var(--Grey, #6A6A6A);border-radius:8px;display:flex;flex-direction:column;align-items:flex-end}.fab-announcement__close[_ngcontent-%COMP%]{position:absolute;top:12px;right:12px;z-index:3;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:0;border-radius:999px;background:transparent;color:var(--primary);cursor:pointer}.fab-announcement__close-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:999px;background:#ffe6de}.fab-announcement__shape[_ngcontent-%COMP%], .fab-announcement__burst[_ng
737content-%COMP%]{position:absolute;pointer-events:none}.fab-announcement__shape_large[_ngcontent-%COMP%]{top:-2.75rem;right:2.25rem;width:7.75rem;height:4.875rem;border-radius:999px;background:#efefef;transform:rotate(17deg)}.fab-announcement__shape_small[_ngcontent-%COMP%]{top:1.75rem;right:2.875rem;width:4.875rem;height:1.375rem;border-radius:999px;background:#efefef;transform:rotate(31deg)}.fab-announcement__burst[_ngcontent-%COMP%]{width:.45rem;height:.075rem;border-radius:999px;background:var(--primary)}.fab-announcement__burst_one[_ngcontent-%COMP%]{top:4.75rem;right:4rem;transform:rotate(35deg)}.fab-announcement__burst_two[_ngcontent-%COMP%]{top:6.375rem;right:6rem;transform:rotate(-20deg)}.fab-announcement__burst_three[_ngcontent-%COMP%]{top:2.625rem;right:1.875rem;opacity:.55;transform:rotate(105deg)}.fab-announcement__content[_ngcontent-%COMP%]{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:20px;padding:calc(.625rem + 54px) 0 0;color:var(--fab-announcement-color);text-align:center}.fab-announcement__content[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:var(--font-size-3xl);font-weight:var(--font-weight-semi-bold)}.fab-announcement__content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:20px 0;font-size:var(--font-size-lg);line-height:1.35}.fab-announcement__link[_ngcontent-%COMP%]{color:inherit;font-size:var(--font-size-sm);font-weight:400;line-height:1.3;text-decoration:none}.fab-announcement__link[_ngcontent-%COMP%]:hover{text-decoration:underline;text-underline-offset:.125rem}.fab-announcement__link_plain[_ngcontent-%COMP%]{text-decoration:none}.fab-announcement__cta[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:100%;height:52px;padding:.5rem 1rem;border-radius:999px;background:var(--primary);color:var(--primary-inverse);font-weight:var(--font-weight-extra-bold);text-align:center;text-decoration:none}.fab-announcement__panel_text[_ngcontent-%COMP%]   .fab-announcement__cta[_ngcontent-%COMP%]{width:calc(100% - 24px);margin:0 12px 12px}@media (max-width: 576px){.fab-announcement__button[_ngcontent-%COMP%]{width:3.5rem;height:3.5rem}}"]})}}return h})();var d6={header:Yf,"header-announcement":Jf,"image-carousel":Gf,hero:e_,"hero-banner-services":i_,"location-and-contact":h_,"loyalty-promo":g_,"how-it-works":Eu,"subscriptions-promo":f_,"featured-comments":b_,"about-us":C_,"loyalty-overview":um,"loyalty-tabs":B_,"awards-carousel":Lu,"order-tracker":M_,"mobile-app-ad":O_,"stores-map-modal":$_,locations:j_,"gift-cards":Z_,"gift-cards-check-balance":Y_,"iframe-section":J_,dynamic:e0,menu:i0,faq:s0,"highlight-horizontal-row":d0,"highlight-bento-box":p0,"highlight-split-view":u0,"popup-announcement":h0,"floating-action-button-announcement":m0},cs=function(h){return h.Header="header",h.HeaderAnnouncement="header-announcement",h.ImageCarousel="image-carousel",h.Hero="hero",h.HeroBannerServices="hero-banner-services",h.LocationAndContact="location-and-contact",h.LoyaltyPromo="loyalty-promo",h.HowItWorks="how-it-works",h.SubscriptionsPromo="subscriptions-promo",h.FeaturedComments="featured-comments",h.AboutUs="about-us",h.LoyaltyOverview="loyalty-overview",h.LoyaltyTabs="loyalty-tabs",h.AwardsCarousel="awards-carousel",h.OrderTracker="order-tracker",h.MobileAppAd="mobile-app-ad",h.StoresMapModal="stores-map-modal",h.Locations="locations",h.GiftCards="gift-cards",h.GiftCardsCheckBalance="gift-cards-check-balance",h.IframeSection="iframe-section",h.Dynamic="dynamic",h.Menu="menu",h.Faq="faq",h.HighlightHorizontalRow="highlight-horizontal-row",h.HighlightBentoBox="highlight-bento-box",h.HighlightSplitView="highlight-split-view",h.PopupA
737nnouncement="popup-announcement",h.FloatingActionButtonAnnouncement="floating-action-button-announcement",h}(cs||{});var Wn=(()=>{class h{constructor(){this.platform_id=gt(rn),this.transferState=gt(df),this.document=gt(Qa),this.configService=gt(Ee),this.httpClient=gt(Zi),this.authService=gt(Mn);this.iframeCommunicator=gt(xc),this.merchantId=Te(qn.merchantId),this.tempFlagToRerenderPageTemplate=Te(!1),this._merchantConfig=Te(void 0),this.merchantConfig=Ut(()=>this._merchantConfig()),this.appService=gt(vc)}getInitialTheme(n){return An(this.platform_id)&&qn.merchantId==="edit-mode"&&this.iframeCommunicator.isInIframe()?this.iframeCommunicator.waitForTheme().pipe(wo(c=>this.normalizeTheme(c))):this.fetchConfigFromDatabase(n)}fetchConfigFromDatabase(n){let c=`merchant-theme-${n}`;if(An(this.platform_id)&&this.transferState.hasKey(c)){let J=this.transferState.get(c,null);if(this.transferState.remove(c),J)return $i(J)}let d=`${qn.api}/static-site-build/merchant/theme/${n}`,a=qn.gitlabTriggerToken?.trim(),z=a?new xf({"X-FTS-GITLAB-TRIGGER":a}):void 0;return this.httpClient.get(d,{headers:z}).pipe(wo(J=>this.normalizeTheme(J)),Uo(J=>{An(this.platform_id)||this.transferState.set(c,J)}))}fetchConfig(n,c=!1){return this.merchantId.set(n),this.getInitialTheme(n).pipe(pu(d=>{let a=n||d.merchantId;return a?(a!==n&&this.merchantId.set(a),this.configService.getBrand(a,c).pipe(wo(z=>({brand:z,theme:d})))):(console.warn("[MerchantConfig] Missing merchant id for config bootstrap"),$i({brand:null,theme:d}))}),pu(d=>this.configService.getReviews().pipe(wo(()=>d))),Uo(d=>{this.setupTheme(d.theme),this.injectLocationsRoute(d.brand?.stores,d.theme.routes),this.configService.loyaltyState()||(d.theme.routes=d.theme.routes.filter(z=>z.path!=="rewards")),this._merchantConfig.set(d);
737qn.merchantId==="edit-mode"&&An(this.platform_id)&&this.iframeCommunicator.sendMerchantTheme(d.theme)}),pu(()=>An(this.platform_id)?this.authService.initUser():$i(null)),Uo(()=>{setTimeout(()=>{this.appService.appInitStatus.set("COMPLETE")},600)}))}setupTheme(n){if(n.fontFamily&&this.document.documentElement.style.setProperty("--font-family",n.fontFamily),n.colors){let c=n.colors;this.setThemeCssColor("--primary",c.primary),this.setThemeCssColor("--primary-dark",c.primaryDark),this.setThemeCssColor("--primary-container",c.primaryContainer),this.setThemeCssColor("--text",c.text)}(n.favicon||n.logo)&&this.document.getElementById("app-favicon")?.setAttribute("href",n.favicon||n.logo)}updateTheme(n){let c=this.normalizeTheme(n);this._merchantConfig.update(d=>(this.injectLocationsRoute(d?.brand?.stores,c.routes),{brand:d?.brand??null,theme:c}))}injectLocationsRoute(n,c){let d="locations";n&&n.length>1&&!c.find(a=>a.path===d)&&c.splice(1,0,{path:d,displayName:"Locations",title:"Locations",components:[{selector:cs.Locations}]})}normalizeSelector(n){if(!n)return;let c=n.trim();if(c==="tracker-form")return cs.OrderTracker;let d=Object.values(cs);if(d.includes(c))return c;let a=c.replace(/^MerchantComponentType\./,""),z=a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase();if(d.includes(z))return z;let J=a.replace(/[^a-zA-Z0-9]/g,"").toLowerCase();return J==="trackerform"?cs.OrderTracker:Object.entries(cs).find(([ie])=>ie.toLowerCase()===J)?.[1]}normalizeTheme(n){let c=(n.routes??[]).map(d=>{let a=(d.components??[]).map(z=>cn(te({},z),{selector:this.normalizeSelector(z.selector)??z.selector}));return cn(te({},d),{title:d.path==="menu"?d.title||"Menu":d.title,displayName:d.path==="menu"?d.displayName||"Menu":d.displayName,components:d.path==="menu"&&a.length===0?[{selector:cs.Menu}]:a})});return cn(te({},n),{headerConfig:n.headerConfig?cn(te({},n.headerConfig),{selector:this.normalizeSelector(n.headerConfig.selector)??n.headerConfig.selector}):n.headerConfig,routes:c})}normalizeCssColor(n){if(!n)return null;let c=n.trim();return c.startsWith("rgb(")||c.startsWith("rgba(")||c.startsWith("#")||c.startsWith("var(")?c:/^\d+\s*,\s*\d+\s*,\s*\d+/.test(c)?`rgb(${c})`:c}setThemeCssColor(n,c){let d=this.normalizeCssColor(c);d&&this.document.documentElement.style.setProperty(n,d)}static{this.\u0275fac=function(c){return new(c||h)}}static{this.\u0275prov=zn({token:h,factory:h.\u0275fac,providedIn:"root"})}}return h})();export{vc as a,fa as b,UO as c,nl as d,es as e,$O as f,GO as g,Wo as h,_a as i,ns as j,ZO as k,Zf as l,Hf as m,HO as n,XO as o,rm as p,Ou as q,is as r,Yf as s,Jf as t,io as u,xc as v,rs as w,Gr as x,Iu as y,S_ as z,ku as A,Lf as B,R_ as C,$_ as D,a0 as E,h0 as F,d6 as G,cs as H,Wn as I};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.